Data cache optimization method and device, non-volatile storage medium, and electronic device
By using neural networks to predict hotspot data and pre-cache, the problem of slow data reading speed caused by low cache hit rate is solved, and cache efficiency and stability are improved in high concurrency and big data systems.
Patent Information
- Application Number
- CN202111649851.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2041-12-29
AI Technical Summary
In the prior art, the cache hit rate is not high, resulting in slow data reading speed. In high concurrency and big data systems, cache service resources are rapidly consumed, which may cause cache avalanche.
Predict hotspot data by obtaining the target object request data and inputting it into a pre-trained neural network model. Based on the predicted hotspot data and the pre-determined hotspot data characteristics, the target hotspot data is determined and pre-caches are performed to optimize the data cache.
Improve cache hit rate, reduce the problem of slow data reading speed, and prevent cache avalanches by pre-caching hotspot data.
Smart Images

Figure CN114297099B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data caching, and specifically, to a data caching optimization method and device, a non-volatile storage medium, and an electronic device. Background Art
[0002] With the development and popularization of Internet applications and big data, and the exponential growth in the number of data accesses per unit time, data reading and writing will become the biggest bottleneck. A large number of accesses will increase the burden on the database and deteriorate the response, which will eventually lead to delays in website display. In order to solve these problems, high-performance distributed cache services have been widely used.
[0003] At present, memory-based object caching systems have been deployed and applied on a large scale within data centers. The specific memory caching systems used are mainly open source Memcached (distributed high-speed caching system) and Redis (remote dictionary service). Data can be returned quickly based on these two caches to avoid increasing response time due to frequent database queries, but the traditional cache data loading mode has the following problems: low data hit rate. Caches usually store data in a Key-Value (distributed storage system) key-value pair structure and set a passive expiration time for the data. When the data expiration time expires, the data automatically expires. However, passive data expiration obviously cannot meet the cache requirements of high-frequency synchronization and short life cycle, and due to changes in business and request data, it is easy to cause the demand and memory data to be out of sync, resulting in a large amount of data still being read from the database, making the cache unable to play its real role; frequent access to data leads to server performance degradation. In a system with high concurrency of big data, the disordered use of cache services will result in rapid consumption of cache service resources, a large amount of low-hit rate data will accumulate in the cache, the resource consumption of the cache server will increase sharply, and the input and output of the backend database will be too frequent. At the same time, a large amount of network input and output is very likely to cause the cache bottomless pit problem (when the cache system performance is poor, adding nodes still does not improve), which will cause a batch operation to involve multiple network operations, which means that the batch operation will take longer and longer as the number of instances increases. Moreover, if a large number of requests penetrate the cache at the same time, all requests will go to the database, which will cause the database CPU and memory load to be too high at this moment, or even crash (cache avalanche phenomenon).
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a data cache optimization method and device, a non-volatile storage medium, and an electronic device to at least solve the technical problem of slow data reading speed caused by low cache hit rate.
[0006] According to one aspect of an embodiment of the present application, a data cache optimization method is provided, including: obtaining target object request data; inputting the target object request data into a pre-trained neural network model to obtain predicted hotspot data; determining target hotspot data based on the predicted hotspot data and predetermined hotspot data features; and pre-caching the target hotspot data to optimize the data cache.
[0007] Optionally, the predetermined hotspot data features are determined in the following manner: determining the information gain of the hotspot data set and the non-hotspot data set; when the information gain of the hotspot data set is equal to a set first information gain threshold, the features corresponding to the data in the set are used as the first feature set; when the information gain of the non-hotspot data set is equal to a set second information gain threshold, the features corresponding to the data in the set are used as the second feature set; and the features in the first feature set that are consistent with the features in the second feature set are eliminated to form the hotspot data features.
[0008] Optionally, the hotspot data set and the non-hotspot data set are determined in the following manner, including: obtaining the target object request history data and historical access data; forming the hotspot data set from the data in the request history data whose request times are higher than a first set threshold; and determining the non-hotspot data set from the data in the historical access data whose access times are lower than a second set threshold and whose cache hit rate is lower than a third set threshold.
[0009] Optionally, determining the information gain of the hotspot data set includes: determining the information entropy of the hotspot data set; determining the sample entropy of the hotspot data set; and taking the difference between the information entropy of the hotspot data set and the sample entropy of the hotspot data set as the information gain of the hotspot data set.
[0010] Optionally, the pre-trained neural network model is trained in the following manner: the pre-trained neural network model is trained using the request history data as sample data and the hot spot data as sample labels of the sample data.
[0011] Optionally, before training the pre-trained neural network model, the method further includes: converting the timestamps of the data in the hotspot data set and the non-hotspot data set into timestamps in floating point format.
[0012] Optionally, before pre-caching the target hotspot data to optimize the data cache, the method also includes: obtaining the number of non-hotspot data; when the number of non-hotspot data is less than a fourth set threshold, pre-caching the target hotspot data to optimize the data cache.
[0013] According to another aspect of an embodiment of the present application, a data cache optimization device is also provided, including: an acquisition module for acquiring target object request data; a prediction module for inputting the target object request data into a pre-trained neural network model to obtain predicted hotspot data; a determination module for determining the target hotspot data based on the predicted hotspot data and predetermined hotspot data features; and an optimization module for pre-caching the target hotspot data to optimize the data cache.
[0014] According to another aspect of the embodiments of the present application, a non-volatile storage medium is provided, wherein the non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the above-mentioned data cache optimization method.
[0015] According to another aspect of the embodiments of the present application, an electronic device, a memory and a processor are also provided; the processor is used to run a program, wherein the above-mentioned data caching method is executed when the program is running.
[0016] In the embodiment of the present application, the target object request data is obtained; the target object request data is input into a pre-trained neural network model to obtain predicted hotspot data; the target hotspot data is determined according to the predicted hotspot data and pre-determined hotspot data features; the target hotspot data is pre-cached to optimize the data cache. In this way, while predicting through the neural network, feature analysis is performed on the original cache data and the user request data, and the cache data is pre-loaded based on the feature analysis result combined with the user request hotspot data prediction, so as to achieve the purpose of improving the cache hit rate, thereby achieving the technical effect of pre-loading hotspot data, and further solving the technical problem of slow data reading speed caused by low cache hit rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 is a schematic diagram of an optional data cache optimization method according to an embodiment of the present application;
[0019] Figure 2is a schematic diagram of an optional data cache optimization device according to an embodiment of the present application;
[0020] Figure 3 It is a schematic diagram of another optional data cache optimization device according to an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0023] According to an embodiment of the present application, a method embodiment of data cache optimization is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0024] Figure 1 A data cache optimization method according to an embodiment of the present application is as follows: Figure 1 As shown, the method comprises the following steps:
[0025] Step S102, obtaining target object request data;
[0026] Step S104, inputting data into a pre-trained neural network model to obtain predicted hotspot data;
[0027] Step S106, determining target hotspot data according to the predicted hotspot data and pre-determined hotspot data features;
[0028] Step S108, pre-caching the data to optimize the data cache.
[0029] Through the above steps, it is possible to perform feature analysis on the original cache data and user request data while predicting through the neural network, and preload the cache data based on the feature analysis results combined with the prediction of user requested hot data, thereby achieving the purpose of improving the cache hit rate, thereby achieving the technical effect of preloading hot data, and further solving the technical problem of slow data reading speed caused by low cache hit rate.
[0030] It should be noted that the target hotspot data is determined based on the predicted hotspot data and the predetermined hotspot data features. Specifically, a data set that matches the hotspot data features is found from a database and combined with the predicted hotspot data to form the target hotspot data.
[0031] In some embodiments of the present application, the predetermined hotspot data features are determined in the following manner: determining the information gain of a hotspot data set and a non-hotspot data set; when the information gain of the hotspot data set is equal to a set first information gain threshold, the features corresponding to the data in the set are used as a first feature set; when the information gain of the non-hotspot data set is equal to a set second information gain threshold, the features corresponding to the data in the set are used as a second feature set; and the features in the first feature set that are consistent with the features in the second feature set are eliminated to form the hotspot data features.
[0032] Specifically, the hot data set is S1, and the non-hot data set is S2; determine the information gain of each data in the feature analysis, and ensure the uniqueness of the attributes when selecting the data sets S1 and S2, so as to improve the accuracy of classification. The larger the entropy of the set, the more uniform the data sample distribution, and the smaller the value of the information gain. Each attribute value corresponds to an information gain value, and we need to select the one with the smallest gain value as the classification node, that is, when the information gain of the data, that is, the data sets S1 and S2, reaches the set first information gain threshold and the set second information gain threshold respectively, for example: when the information entropy of the data sets S1 and S2 reaches the maximum value respectively, that is, when the information gain of the data sets S1 and S2 is the minimum, the obtained decision tree has a significant and unique feature for the classification of the data set, and at this time determine the first feature set L1 corresponding to the data set S1 and the second feature set L2 corresponding to the data set S2; remove the features consistent with the features in the second feature set L2 in the first feature set L1, so as to obtain the hot data feature set L3; which can be expressed as L3 = L1-(L1∩L2).
[0033] In some embodiments of the present application, determining a hotspot data set and a non-hotspot data set includes: obtaining target object request history data and historical access data; forming the hotspot data set from data in the request history data whose request times are higher than a first set threshold; and determining the non-hotspot data set from data in the historical access data whose access times are lower than a second set threshold and whose cache hit rate is lower than a third set threshold.
[0034] It should be noted that the first set threshold can be the median number of requests or other numbers, which can be adjusted according to needs; the second set threshold can be the median number of accesses; the third set threshold corresponds to the cache hit rate and can be the median cache hit rate; historical access data is obtained from the cache statistics.
[0035] For example, the data whose target object request times are above the median value and the user's demand keywords are extracted to form a hot data set, and the data whose cache hit rate and access times are both below the median value are formed into a non-hot data set.
[0036] In some embodiments of the present application, the information gain of a hotspot data set can be determined by the following steps, including: determining the information entropy of the hotspot data set; determining the sample entropy of the hotspot data set; and taking the difference between the information entropy of the hotspot data set and the sample entropy of the hotspot data set as the information gain of the hotspot data set. The calculation formula is as follows: Taking the hotspot data set as S1 and the non-hotspot data set as S2 as an example, the information entropy of set S1 is p i is the element in set S1, i = 0…1; the information entropy of set S2 is where p g is an element in the set, g = 0…1. The sample entropy is Among them, when a=1, S a is S1, when a=2, S a S2; S j For S a A sub-collection of .
[0037] In some embodiments of the present application, the pre-trained neural network model is trained in the following manner: the pre-trained neural network model is trained using the request history data as sample data and the hot spot data as sample labels of the sample data.
[0038] Specifically, determine the number and size of training time windows: take windows as △t1,△t2,...,△t m(m≥1). The number of windows is required to be at least one, and the window size increases with the index m. An artificial neural network is constructed under different time windows. The network includes the following features: an input layer, at least one hidden layer, and an output layer; each hidden layer contains at least one node or more. A nonlinear activation function is used. The loss function contains a regularization term, and the value of the regularization term is related to the time window size. In order to prevent over-simulation during data prediction, we need to add a penalty term to the loss function to reduce the number of non-zero parameters. At the same time, the first normal form will be used as the regularization term for sparse data:
[0039]
[0040] In the formula, loss new (w,b) is the loss function with regularization term, loss(w,b) is the original loss function, is the regularization term.
[0041] In the regularization term, the summation function It is used to calculate the norm and weight of the nodes connected between layers, and mλ is the adjustment parameter of the regularization term.
[0042] The amount of data access requested by users in a fixed time period is taken as a training set, and the ratio of each adjacent time period satisfies the constant α (α≥1). At the same time, for the prediction of medium- and long-term data, it is necessary to increase the ratio of each time window to △t1 and construct the regularization adjustment coefficient λ. λ and r should satisfy the following formula:
[0043]
[0044] In the formula, i is the index of different time windows. The λ that conforms to the above calculation formula will become larger as the time window increases, thereby improving the ability of the medium and long-term windows to suppress noise and short-term drastic fluctuations during training, improving the prediction accuracy of the neural network model, and preventing overfitting during training. i is a constant.
[0045] When loss new The training ends when (w,b) reaches the minimum value when it approaches 0 infinitely. Or the training ends when the neural network model reaches the maximum number of iterations.
[0046] When the request history data is used as sample data and the hot data is used as sample label training for the sample data, the request history data of multiple time periods are obtained, and the duration of each time period is different, so as to obtain the hot data of different time periods and improve the accuracy of training.
[0047] Use multiple time windows to predict the trend of user requests within different time limits, and train and predict multiple time windows in parallel. Improve the accuracy of medium- and long-term predictions: and introduce regularization terms in the neural network to prevent overfitting of data.
[0048] In some embodiments of the present application, before obtaining the information gain of each data in the hotspot data set and the non-hotspot data set, the method also includes: converting the timestamps of the data in the hotspot data set and the non-hotspot data set into timestamps in floating point format.
[0049] Specifically, the timestamp of the data is converted: time items in different formats are converted into timestamps in floating point format (unit: seconds), and the calculation formula is as follows:
[0050]
[0051] In the formula, t is the timestamp after conversion, t' is the timestamp corresponding to the time item, and t start is the starting timestamp of the current data collection window, t end is the end timestamp of the current data collection window, and Δt represents the time window, that is, the collection period of the user requested data.
[0052] In some embodiments of the present application, before pre-caching the target hotspot data to optimize the data cache, the method also includes: obtaining the number of non-hotspot data; when the number of non-hotspot data is less than a fourth set threshold, pre-caching the target hotspot data to optimize the data cache.
[0053] By increasing the threshold setting, a termination point is set for the system operation. When the amount of non-hot data is less than the threshold, the manager will stop optimizing the cache data to prevent the hit rate from decreasing due to continuous optimization of the cache data.
[0054] In some embodiments of the present application, a data cache optimization device is also proposed, such as Figure 2 As shown, including:
[0055] Cache data processor: used to extract data whose cache hit rate / access times are both below the median value to form a data set;
[0056] Request data processor: used to record user API (application programming interface) requests and parameters, merge and count the request items of the same type, write the recorded number into the counter, take out the data with the number of request types above the median in the counter, and extract the user's demand keywords to form the user request data set;
[0057] Counter: used to record the number of accesses to each data in the cache and the cache hit rate, as well as the number of requests for data by users;
[0058] Manager: used to periodically poll the cache and counters, and delete non-hotspot data sets from the cache to release space; the manager sets thresholds. When the number of data accesses and cache hit rate in the non-hotspot data set are greater than the set access number threshold and the set hit cache hit rate threshold, the system will stop optimizing the cache data. Only when the number of accesses and hit rate in the non-hotspot data set are less than the set access number threshold and the set hit cache hit rate threshold, will the cache data optimization run;
[0059] Feature analysis module: used to perform feature analysis on the hotspot data set and the non-hotspot data set to form a first feature set and a second feature set, and remove the second feature set from the first feature set to obtain the hotspot feature set as the final data preloading feature set;
[0060] Neural prediction module: used to predict hotspot data through neural network;
[0061] Hotspot loading module: used to load data in the database that meets the hotspot feature set, as well as rising hotspot data predicted by the neural network into the cache.
[0062] The present application also proposes a data cache optimization device, such as Figure 3 As shown, it includes: an acquisition module 30, used to obtain target object request data; a prediction module 32, used to input the target object request data into a pre-trained neural network model to obtain predicted hotspot data; a determination module 34, used to determine the target hotspot data based on the predicted hotspot data and pre-determined hotspot data features; an optimization module 36, used to pre-cache the target hotspot data to optimize the data cache.
[0063] The prediction module 32 includes: a model submodule; wherein the model submodule is used to train the pre-trained neural network model using the request history data as sample data and the hot spot data as sample labels of the sample data.
[0064] The determination module 34 includes: a hot data feature determination submodule and an information gain determination submodule; the hot data feature determination submodule is used to, when the information gain of the hot data set is equal to the set first information gain threshold, use the features corresponding to the data in the set as the first feature set; when the information gain of the non-hot data set is equal to the set second information gain threshold, use the features corresponding to the data in the set as the second feature set; and eliminate the features in the first feature set that are consistent with the features in the second feature set to form the hot data features.
[0065] The information gain determination submodule is used to determine the information entropy of the hotspot data set; determine the sample entropy of the hotspot data set; and use the difference between the information entropy of the hotspot data set and the sample entropy of the hotspot data set as the information gain of the hotspot data set.
[0066] The information gain determination submodule includes a timestamp conversion unit; the timestamp conversion unit is used to convert the timestamps of the data in the hotspot data set and the non-hotspot data set into timestamps in floating point format.
[0067] The hot data feature determination submodule includes: a data determination unit, used to obtain the target object request history data and historical access data; the hot data set is composed of data in the request history data whose request times are higher than a first set threshold; and the non-hot data set is determined by the data in the historical access data whose access times are lower than a second set threshold and whose cache hit rate is lower than a third set threshold.
[0068] The optimization module 36 includes: a judgment submodule; the judgment submodule is used to obtain the number of non-hotspot data; when the number of non-hotspot data is less than a fourth set threshold, the target hotspot data is pre-cached to optimize the data cache.
[0069] According to another aspect of the embodiments of the present application, a non-volatile storage medium is provided, wherein the non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the above-mentioned data cache optimization method.
[0070] The above-mentioned non-volatile storage medium is used to store programs with the following functions: obtaining target object request data; inputting the target object request data into a pre-trained neural network model to obtain predicted hotspot data; determining target hotspot data based on the predicted hotspot data and predetermined hotspot data features; and pre-caching the target hotspot data to optimize data caching.
[0071] According to another aspect of the embodiments of the present application, an electronic device, a memory and a processor are also provided; the processor is used to run a program, wherein the above-mentioned data caching method is executed when the program is running.
[0072] The electronic device is used to store and execute a program for the following functions: obtaining target object request data; inputting the target object request data into a pre-trained neural network model to obtain predicted hotspot data; determining target hotspot data based on the predicted hotspot data and predetermined hotspot data features; and pre-caching the target hotspot data to optimize data caching.
[0073] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0074] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0075] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0076] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0077] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0078] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0079] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A data cache optimization method, characterized in that: include: Get the target object request data; Inputting the target object request data into a pre-trained neural network model to obtain predicted hotspot data; Determining target hotspot data according to the predicted hotspot data and predetermined hotspot data features; Pre-caching the target hotspot data to optimize data caching; The predetermined hotspot data features are determined by: determining the information gain of the hotspot data set and the non-hotspot data set; when the information gain of the hotspot data set is equal to a set first information gain threshold, the features corresponding to the data in the set are used as the first feature set; When the information gain of the non-hotspot data set is equal to the set second information gain threshold, the features corresponding to the data in the set are used as the second feature set; the features in the first feature set that are consistent with the features in the second feature set are removed to form the hotspot data features; The determining of the information gain of the hotspot data set includes: determining the information entropy of the hotspot data set; determining the sample entropy of the hotspot data set; and taking the difference between the information entropy of the hotspot data set and the sample entropy of the hotspot data set as the information gain of the hotspot data set.
2. The method according to claim 1, characterized in that: The hotspot data set and the non-hotspot data set are determined by the following methods, including: Obtain the historical request data and historical access data of the target object; The hotspot data set is formed by the data in the request history data whose request times are higher than a first set threshold; The data whose access times are lower than the second set threshold and whose cache hit rate is lower than the third set threshold in the historical access data are determined as the non-hotspot data set.
3. The method according to claim 2, characterized in that The pre-trained neural network model is trained in the following way: The pre-trained neural network model is obtained by training with the request history data as sample data and the hot spot data as sample labels of the sample data.
4. The method according to claim 1, characterized in that: Prior to training the pre-trained neural network model, the method further comprises: The timestamps of the data in the hotspot data set and the non-hotspot data set are converted into timestamps in floating point format.
5. The method according to claim 1, characterized in that Before pre-caching the target hotspot data to optimize the data cache, the method further includes: Get the number of non-hotspot data; When the amount of the non-hotspot data is less than a fourth set threshold, the target hotspot data is pre-cached to optimize the data cache.
6. A data cache optimization device, characterized in that: include: The acquisition module is used to obtain the target object request data; A prediction module, used for inputting the target object request data into a pre-trained neural network model to obtain predicted hotspot data; A determination module, used to determine target hotspot data according to the predicted hotspot data and predetermined hotspot data features; An optimization module, used for pre-caching the target hotspot data to optimize the data cache; The predetermined hotspot data features are determined by: determining the information gain of the hotspot data set and the non-hotspot data set; when the information gain of the hotspot data set is equal to a set first information gain threshold, the features corresponding to the data in the set are used as the first feature set; When the information gain of the non-hotspot data set is equal to the set second information gain threshold, the features corresponding to the data in the set are used as the second feature set; the features in the first feature set that are consistent with the features in the second feature set are removed to form the hotspot data features; The determining of the information gain of the hotspot data set includes: determining the information entropy of the hotspot data set; determining the sample entropy of the hotspot data set; and taking the difference between the information entropy of the hotspot data set and the sample entropy of the hotspot data set as the information gain of the hotspot data set.
7. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the data cache optimization method according to any one of claims 1 to 5.
8. An electronic device, characterized in that: A memory and a processor; the processor is used to run a program, wherein the program executes the data caching method described in any one of claims 1 to 5 when running.
Citation Information
Patent Citations
Cache preheating method and device, computer equipment and storage medium
CN113849532A