Multi-level cache adaptive system and strategy based on machine learning

By using multi-level cache adaptive systems and strategies based on machine learning in the hybrid cloud environment, real-time monitoring and optimization of the cache area structure solves the problem of insufficient adaptability of the cache strategy in the hybrid cloud environment and improves task execution efficiency and data Hit rate, reducing network bandwidth pressure.

WO2024207834A1PCT designated stage expired Publication Date: 2024-10-10CHINA TELECOM CLOUD TECH CO LTD

Patent Information

Application Number
PCT/CN2023/142728
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-12
Filing Date
2023-12-28
Publication Date
2024-10-10

AI Technical Summary

Technical Problem

In a hybrid cloud environment, when agile services on the public cloud process multiple concurrent requests, intensive read and write tasks are initiated on the database in the private cloud, resulting in limited network bandwidth, congestion, and impact on overall business efficiency. The existing caching strategy is not suitable. Due to frequent execution of new tasks and fixed cache level division, the adaptability is not high.

Method used

Adopt a multi-level cache adaptive system and strategy based on machine learning, mount the cache area on the public cloud, store private cloud data as the initial cache, use the prediction model in the decision maker to monitor access conditions in real time, and adjust the priority of the cache area Hierarchical structure and update strategy, including cache prediction model, task prediction model and data prediction model, optimizing cache hierarchy and data storage rules.

Benefits of technology

By flexibly selecting cached data and establishing a flexible hierarchical structure, the data hit rate is improved, space resources are saved, data center bandwidth is reduced, and task execution efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023142728_10102024_PF_FP_ABST
    Figure CN2023142728_10102024_PF_FP_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of data caching, and in particular to a multi-level cache adaptive system and strategy based on machine learning. The system comprises: a public cloud, a private cloud, a cache area and a decision maker, wherein the private cloud is used for the storage of all data and execution work of some low-latency tasks; the cache area is mounted on the public cloud, part or all of the data in the private cloud is stored in the cache area to serve as initial cache data, and stored data is regularly updated according to a caching policy; the public cloud is used for determining, according to a task to be executed, data to be queried, and acquiring target data to execute the task to be executed; and three prediction models are stored in the decision maker and are pre-trained, and the decision maker is used for outputting the caching policy of the cache area. In the present invention, when data in a cache area is selected, cache data can be flexibly selected according to various conditions such as a list of tasks to be executed and the capability of a server, and an elastic hierarchical structure of the cache area is established, such that a high straight-directing rate of the data is ensured, space resources are reduced, the bandwidth of a data center is effectively reduced, and the task execution efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Multi-level cache adaptive system and strategy based on machine learning Technical Field

[0001] The present invention relates to the field of data caching technology, and in particular to a multi-level cache adaptive system and strategy based on machine learning. Background Art

[0002] With the rapid development of cloud computing, enterprises are demanding higher standards for cloud stability, security, and agility. Hybrid cloud, by integrating and interconnecting private and public clouds, provides a more flexible deployment model. Users can deploy services requiring high reliability and low latency, such as databases, on private clouds, while deploying frequently accessed, rapidly iterating services, or business expansion beyond the capabilities of private clouds, on public clouds. This inter-cloud connectivity significantly improves business availability.

[0003] However, in the widespread application of hybrid clouds, when agile businesses on the public cloud process multiple concurrent requests, they will initiate intensive read and write tasks on the database in the private cloud. Due to the influence of network bandwidth, the processing speed in the private cloud cannot keep up, which will cause certain congestion and affect overall business efficiency.

[0004] Existing caching strategies have the following two main defects: they are not suitable for frequently executing new tasks; the cache level division is fixed and has low adaptability.

[0005] Therefore, how to adjust the cache strategy to save cache space resources and improve task execution efficiency has become a new trend in technological development.

[0006] Summary of the Invention

[0007] In view of this, the present invention proposes a multi-level cache adaptive system and strategy based on machine learning, mainly to solve the problem of how to save cache space resources while improving task execution efficiency by adjusting the cache strategy.

[0008] In one aspect, the present invention provides a multi-level cache adaptive system based on machine learning, the system comprising:

[0009] Public cloud, private cloud, cache, and decision maker;

[0010] The cache area is mounted on the public cloud, and stores part or all of the data in the private cloud as initial cache data, and regularly updates the stored data according to the cache policy;

[0011] The public cloud is used to determine the data to be queried according to the task to be executed, and send a query request to the cache area to obtain target data based on the data to be queried to execute the task to be executed;

[0012] The decision maker stores three prediction models and performs pre-training. When the public cloud sends a query request to the cache area based on the data to be queried to obtain target data to execute the task to be executed, the decision maker is also used to monitor the public cloud's access to the cache area in real time. When the public cloud accesses the cache area, the access data is obtained and input into the prediction model, and the priority hierarchy and update strategy of the cache area are updated according to the output of the prediction model.

[0013] The prediction models include: a cache prediction model, a task prediction model and a data prediction model.

[0014] In some embodiments of the present application, before the public cloud is used to determine the data to be queried according to the task to be executed, and sends a query request to the cache area to obtain target data based on the data to be queried to execute the task to be executed, the process includes:

[0015] The decision maker obtains the initial cache data and inputs it into the cache prediction model, and the cache prediction model outputs an initial cache strategy based on the initial cache data, and the initial cache strategy is used for initialization of the cache area;

[0016] The initial cache strategy includes: the initial cache layer number, the initial tiering strategy and the initial update strategy.

[0017] In some embodiments of the present application, when the public cloud accesses the cache area, the decision maker obtains the access data and inputs it into the prediction model, and updates the hierarchical cache structure of the cache area according to the output result of the prediction model, including:

[0018] The decision maker obtains access data and inputs the access data into the task prediction training model, and the task prediction training model outputs a list of related tasks and the corresponding number of occurrences of each related task based on the access data;

[0019] The access data includes: access user feature data, access server data and access execution tasks.

[0020] In some embodiments of the present application, after the task prediction training model outputs a list of related tasks and a corresponding number of occurrences of each related task based on the access data, the following steps are included:

[0021] The decision maker inputs the relevant task list into the data prediction training model. The data prediction training model outputs the corresponding data identifier of each relevant task and the number of occurrences of each corresponding data identifier based on the relevant task list, and calculates the occurrence probability of each corresponding data identifier based on the corresponding data identifier of each relevant task and each corresponding data identifier, sorts the occurrence probability of each data identifier in descending order, and matches the corresponding data identifier of each relevant task with each initial cache layer according to the initial cache strategy, records the matching results in a data table, and the decision maker sends the data table to the cache area for data caching.

[0022] In some embodiments of the present application, when the decision maker sends the data table to the cache area for data caching, the process includes:

[0023] Read data from the memory according to the data identifier and store the data in different cache layers according to the storage path in the data table.

[0024] In some embodiments of the present application, when the public cloud is used to determine the data to be queried based on the task to be executed, and to send a query request to the cache area to obtain target data based on the data to be queried to execute the task to be executed, the process includes:

[0025] The decision maker updates the data table according to the update strategy of the cache area, and the cache area adjusts the data in the cache area according to the latest data table. When the data in the data table does not exist in the cache area, the data is accessed and obtained from the private cloud. When the data in the cache area does not exist in the data table, the data is deleted from the cache area.

[0026] In some embodiments of the present application, when the decision maker pre-trains three prediction models, it includes:

[0027] The cache prediction model adopts a reinforcement learning model, takes the initial cache resources of the cache area as input to obtain input feedback, and the cache model makes action decisions based on the input feedback;

[0028] The input feedback includes penalty feedback and reward feedback. The penalty feedback is the amount of resources and time saved by cache hits, and the reward feedback is the amount of space, resource usage, and memory access.

[0029] The action decisions include: hierarchical strategy and update strategy;

[0030] The tiering strategy includes: the number of cache layers in the cache area and the data proportion corresponding to each cache layer;

[0031] The update strategy includes: a data update time period threshold Ttask and a data update ratio threshold αnew.

[0032] In some embodiments of the present application, the tiering strategy specifically includes:

[0033] A cache prediction update period Tcache is pre-set, and an average reward and penalty value Feedback is obtained and calculated within the cache prediction update period Tcache based on the time and resources saved due to data cache hits and the resource consumption of adjusting the data cache storage address due to data probability updates;

[0034] The calculation formula of cache prediction update period Tcache is as follows: T cache =max(24h, 10T task );

[0035] Where T is the time since the last stratification strategy prediction;

[0036] The calculation formula for the average reward and punishment value Feedback is as follows:

[0037] When T is within the cache prediction update period Tcache, the inferred tiering strategy and cache strategy are saved in the decision maker to obtain the corresponding average reward and penalty values ​​without adjusting the structure of the cache area. When T is not within the cache prediction update period Tcache, the reward time average Feedback / T obtained by the updated strategy executed in the previous round is obtained, where T is the time since the last tiering strategy prediction;

[0038] When the average reward and punishment value Feedback is less than the previous round of hierarchical monitoring threshold σ cache When the update strategy is updated in the next round, the hierarchical strategy is updated;

[0039] In some embodiments of the present application, the update strategy specifically includes:

[0040] At the time threshold T task After that, the latest execution task is used as the latest input to obtain the latest data identification and data probability. The latest data identification and data probability are compared with the information in the previous data table. The calculation formula of the probability value of the updated data is as follows: P update =α new ×P new +(1-α new )×P old ;

[0041] Among them, P new and P oldare the latest probability and the probability of the previous round of the data identification, respectively, and α new is the determining factor of the new probability for the probability to be updated, which is determined by the update strategy of the cache prediction model;

[0042] The new data identifier and data probability are updated in the data table, and then sent to the cache to execute the data change.

[0043] In some embodiments of the present application, when the decision maker pre-trains the three prediction models, it further includes:

[0044] The task prediction model uses the data update time period threshold Ttask as a variable period, inputs a list of other related tasks within the current task output data update time period threshold Ttask, compares the task list predicted by the comparison model with the actual task list, and corrects the model by returning the error value.

[0045] In some embodiments of the present application, when the decision maker pre-trains the three prediction models, it further includes:

[0046] The data prediction model is synchronously updated and trained once each time the task prediction model is updated. Within the data update time period threshold Ttask, the data prediction model takes each execution task as input and predicts the most frequently occurring data and the number of times the execution task occurs.

[0047] In another aspect, the present invention proposes a multi-level cache adaptation strategy based on machine learning, which includes:

[0048] Part or all of the data in the private cloud stored in the cache area is used as initial cache data;

[0049] The public cloud determines the data to be queried according to the task to be executed, and sends a query request to the cache area to obtain target data based on the data to be queried to execute the task to be executed;

[0050] By storing three prediction models in the decision maker and pre-training them, when the public cloud sends a query request to the cache area based on the data to be queried to obtain target data to execute the task to be executed, the decision maker is also used to monitor the public cloud's access to the cache area in real time. When the public cloud accesses the cache area, it obtains the access data and inputs it into the prediction model, and updates the hierarchical cache structure of the cache area according to the output result of the prediction model;

[0051] The prediction models include: a cache prediction model, a task prediction model and a data prediction model.

[0052] Compared with the existing technology, the present invention has the following beneficial effects: when selecting data in the cache area, the present invention can flexibly select cached data based on various conditions such as the task to be executed and the user's behavioral habits, and establish a flexible hierarchical structure to ensure a high hit rate of data, save space resources, effectively reduce data center bandwidth, and improve task execution efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Various other advantages and benefits will become apparent to those skilled in the art by reading the detailed description of the preferred embodiment below. The accompanying drawings are only for the purpose of illustrating the preferred embodiment and are not to be considered as limiting the present invention. In the accompanying drawings:

[0054] FIG1 is a functional block diagram of a multi-level cache adaptive system based on machine learning provided by an embodiment of the present invention;

[0055] FIG2 is a flow chart of a multi-level cache adaptation strategy based on machine learning provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art. It should be noted that, unless there is a conflict, the embodiments of the present disclosure and the features described in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0057] Referring to FIG1 , this embodiment provides a multi-level cache adaptive system based on machine learning, including:

[0058] Public cloud, private cloud, cache, and decision maker;

[0059] The cache area is mounted on the public cloud, and stores part or all of the data in the private cloud as initial cache data, and regularly updates the stored data according to the cache policy;

[0060] The public cloud is used to determine the data to be queried according to the task to be executed, and send a query request to the cache area to obtain target data based on the data to be queried to execute the task to be executed;

[0061] The decision maker stores three prediction models and performs pre-training. When the public cloud sends a query request to the cache area based on the data to be queried to obtain target data to execute the task to be executed, the decision maker is also used to monitor the public cloud's access to the cache area in real time. When the public cloud accesses the cache area, the access data is obtained and input into the prediction model, and the hierarchical cache structure of the cache area is updated according to the output result of the prediction model.

[0062] The prediction models include: a cache prediction model, a task prediction model and a data prediction model.

[0063] It can be understood that in this embodiment, by mounting the cache area on the public cloud, initial caching of part or all of the data in the private cloud can be achieved, thereby improving the efficiency and speed of data query. The public cloud can determine the data to be queried based on the task to be executed, and send a query request to obtain the target data to execute the task to be executed, making data processing more accurate and efficient. Three prediction models are stored in the decision maker and pre-trained. It can monitor the public cloud's access to the cache area in real time, obtain access data and input it into the prediction model, and update the priority hierarchical cache structure of the cache area according to the output results of the prediction model, thereby further optimizing the query and processing efficiency of the data. The prediction model includes a cache prediction model, a task prediction model and a data prediction model, which can more comprehensively consider various factors affecting data query and processing, thereby more accurately predicting and optimizing data query and processing.

[0064] Furthermore, in this embodiment, by using the cache layer to pre-extract data, high-frequency access to the data center is reduced to alleviate network bandwidth pressure; using machine learning training, the data storage rules in the cache area are clarified, and combined with the server characteristics and user usage habits, the most frequently used data list is inferred according to business logic and saved in the cache area, and the data content is updated in real time according to the progress of the task, which greatly improves the data hit rate in the cache area and can extract the target data more efficiently and accurately; using machine learning training, according to the server resource scheduling situation, the cache layer distribution strategy that achieves the optimal balance between resource cost and cache effect is inferred, which can maximize the utilization of the server's resource space in a targeted manner to achieve the optimal cache effect.

[0065] In some embodiments of the present application, before the public cloud is used to determine the data to be queried according to the task to be executed, and sends a query request to the cache area to obtain target data based on the data to be queried to execute the task to be executed, the process includes:

[0066] The decision maker obtains the initial cache data and inputs it into the cache prediction model, and the cache prediction model outputs an initial cache strategy based on the initial cache data, and the initial cache strategy is used for initialization of the cache area;

[0067] The initial cache strategy includes: the initial cache layer number, the initial tiering strategy and the initial update strategy.

[0068] In some embodiments of the present application, when the public cloud accesses the cache area, the decision maker obtains the access data and inputs it into the prediction model, and updates the hierarchical cache structure of the cache area according to the output result of the prediction model, including:

[0069] The decision maker obtains access data and inputs the access data into the task prediction training model, and the task prediction training model outputs a list of related tasks and the corresponding number of occurrences of each related task based on the access data;

[0070] The access data includes: access user feature data, access server data and access execution tasks.

[0071] In some embodiments of the present application, after the task prediction training model outputs a list of related tasks and a corresponding number of occurrences of each related task based on the access data, the following steps are included:

[0072] The decision maker inputs the relevant task list into the data prediction training model. The data prediction training model outputs the corresponding data identifier of each relevant task and the number of occurrences of each corresponding data identifier based on the relevant task list, and calculates the occurrence probability of each corresponding data identifier based on the corresponding data identifier of each relevant task and each corresponding data identifier, sorts the occurrence probability of each data identifier in descending order, and matches the corresponding data identifier of each relevant task with each initial cache layer according to the initial cache strategy, records the matching results in a data table, and the decision maker sends the data table to the cache area for data caching.

[0073] In some embodiments of the present application, when the decision maker sends the data table to the cache area for data caching, the process includes:

[0074] Read data from the memory according to the data identifier and store the data in different cache layers according to the storage path in the data table.

[0075] In some embodiments of the present application, when the public cloud is used to determine the data to be queried based on the task to be executed, and to send a query request to the cache area to obtain target data based on the data to be queried to execute the task to be executed, the process includes:

[0076] The decision maker updates the data table according to the update strategy of the cache area, and the cache area adjusts the data in the cache area according to the latest data table. When the data in the data table does not exist in the cache area, the data is accessed and obtained from the private cloud. When the data in the cache area does not exist in the data table, the data is deleted from the cache area.

[0077] It can be understood that this embodiment, by combining the cache prediction model with the task prediction training model and the data prediction training model, achieves automated cache construction and updating, improving cache data hit rates, reducing data access latency, and enhancing public cloud performance. Furthermore, by acquiring access data, task data, and other data and utilizing relevant model prediction analysis to provide corresponding data identifiers and storage paths for each task, the public cloud can quickly determine the data to be queried based on the task to be executed and obtain the target data to execute the task, thereby improving the execution efficiency of the public cloud.

[0078] In some embodiments of the present application, when the decision maker pre-trains three prediction models, it includes:

[0079] The cache prediction model adopts a reinforcement learning model, takes the initial cache resources of the cache area as input to obtain input feedback, and the cache model makes action decisions based on the input feedback;

[0080] The input feedback includes penalty feedback and reward feedback. The penalty feedback is the amount of resources and time saved by cache hits, and the reward feedback is the amount of space, resource usage, and memory access.

[0081] The action decisions include: hierarchical strategy and update strategy;

[0082] The tiering strategy includes: the number of cache layers in the cache area and the data proportion corresponding to each cache layer;

[0083] The update strategy includes: a data update time period threshold Ttask and a data update ratio threshold αnew.

[0084] In some embodiments of the present application, the tiering strategy specifically includes:

[0085] A cache prediction update period Tcache is pre-set, and an average reward and penalty value Feedback is obtained and calculated within the cache prediction update period Tcache based on the time and resources saved due to data cache hits and the resource consumption of adjusting the data cache storage address due to data probability updates;

[0086] The calculation formula of cache prediction update period Tcache is as follows: T cache =max(24h, 10Ttask );

[0087] Where T is the time since the last stratification strategy prediction;

[0088] The calculation formula for the average reward and punishment value Feedback is as follows:

[0089] When T is within the cache prediction update period Tcache, the inferred tiering strategy and cache strategy are saved in the decision maker to obtain the corresponding average reward and penalty values ​​without adjusting the structure of the cache area. When T is not within the cache prediction update period Tcache, the reward time average Feedback / T obtained by the updated strategy executed in the previous round is obtained, where T is the time since the last tiering strategy prediction;

[0090] When the average reward and punishment value Feedback is less than the previous round of hierarchical monitoring threshold σ cache When the update strategy is updated in the next round, the hierarchical strategy is updated;

[0091] In some embodiments of the present application, the update strategy specifically includes:

[0092] At the time threshold T task After that, the latest execution task is used as the latest input to obtain the latest data identification and data probability. The latest data identification and data probability are compared with the information in the previous data table. The calculation formula of the probability value of the updated data is as follows: P update =α new ×P new +(1-α new )×P old ;

[0093] Among them, P new and P old are the latest probability and the probability of the previous round of the data identification, respectively, and α new is the determining factor of the new probability for the probability to be updated, which is determined by the update strategy of the cache prediction model;

[0094] The new data identifier and data probability are updated in the data table, and then sent to the cache to execute the data change.

[0095] It can be understood that this embodiment uses a reinforcement learning model for cache prediction, and can make action decisions based on input feedback, thereby effectively improving the cache hit rate and resource utilization. By using penalty feedback and reward feedback as input feedback, it can more comprehensively consider factors such as the amount of resources saved by cache hits, time, space, resource occupation, and memory access, thereby more accurately guiding the action decisions of the cache model. By combining the hierarchical strategy and the update strategy, it can better handle the update and maintenance of cache data while ensuring the cache hit rate, thereby improving the reliability and stability of the cache. By setting the cache prediction update cycle and calculating the average reward and punishment value, the cache strategy can be adjusted more flexibly to better adapt to different application scenarios and needs. By updating the probability value of the data and updating it to the data table, it can more accurately reflect the changes in the latest data identification and data probability, thereby improving the accuracy and reliability of the cache prediction.

[0096] In some embodiments of the present application, when the decision maker pre-trains the three prediction models, it further includes:

[0097] The task prediction model uses the data update time period threshold Ttask as a variable period, inputs a list of other related tasks within the current task output data update time period threshold Ttask, compares the task list predicted by the comparison model with the actual task list, and corrects the model by returning the error value.

[0098] In some embodiments of the present application, when the decision maker pre-trains the three prediction models, it further includes:

[0099] The data prediction model is synchronously updated and trained once each time the task prediction model is updated. Within the data update time period threshold Ttask, the data prediction model takes each execution task as input and predicts the most frequently occurring data and the number of times the execution task occurs.

[0100] It can be understood that in this embodiment, by comparing the task prediction model with the actual task list and using the returned error value to correct the model, the accuracy of the task prediction can be greatly improved. Since the data update time period threshold Ttask is variable, the model can adapt to different time scales and different task types, so that the model can better adapt to dynamically changing environments and improve the accuracy of predictions.

[0101] Specifically, the data prediction model is updated and trained each time the task prediction model is updated. This helps ensure model freshness and accuracy. By predicting each executed task within the data update time period threshold Ttask, the latest changes in the task can be better captured. The decision maker can pre-train multiple prediction models, which improves the comprehensiveness and accuracy of predictions. By integrating different prediction models, more comprehensive and accurate prediction results can be obtained.

[0102] Furthermore, by comparing the model's predictions with the actual task list, we can obtain real-time feedback on prediction errors, which helps to promptly correct model errors and improve model accuracy. This real-time feedback mechanism can continuously optimize the model's performance and make it better suited to real-world application scenarios.

[0103] Referring to FIG. 2 , in another aspect, the present invention proposes a multi-level cache adaptation strategy based on machine learning, which includes:

[0104] S101: Using part or all of the data in the private cloud stored in the cache area as initial cache data;

[0105] S102: The public cloud determines the data to be queried according to the task to be executed, sends a query request to the cache area based on the data to be queried to obtain target data to execute the task to be executed, and regularly updates the stored data according to the cache strategy;

[0106] S103: By storing three prediction models in the decision maker and pre-training them, when the public cloud sends a query request to the cache area based on the data to be queried to obtain target data to execute the task to be executed, the decision maker is further configured to monitor the public cloud's access to the cache area in real time. When the public cloud accesses the cache area, the access data is obtained and input into the prediction model, and the priority hierarchy and update strategy of the cache area are updated according to the output of the prediction model.

[0107] The prediction models include: a cache prediction model, a task prediction model and a data prediction model.

[0108] It is understandable that in this embodiment, by storing part or all of the data in the private cloud in the cache area as initial cache data, an initial data source can be provided, so that when the public cloud needs to query data, it can get an immediate response. The public cloud determines the data to be queried based on the task to be executed, and sends a query request to the cache area to obtain the target data to execute the task to be executed, making task execution more efficient, because the public cloud can directly query the data in the cache area according to actual needs. By storing three prediction models in the decision maker and pre-training them, the public cloud's access to the cache area can be monitored in real time. When the public cloud accesses the cache area, the access data is obtained and input into the prediction model, and the hierarchical cache structure of the cache area is updated according to the output of the prediction model. This design can effectively predict and adjust the public cloud's access to the cache area, optimizing the efficiency of data query and task execution.

[0109] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0110] The present application is described with reference to the flow chart and / or block diagram of the method, device (system), and computer program product according to the embodiment of the present application. It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processing machine or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for realizing the function specified in one flow chart flow or multiple flows and / or one box or multiple boxes of the block diagram.

[0111] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0112] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.

Claims

1. A multi-level cache adaptive system based on machine learning, characterized in that: include: Public cloud, private cloud, cache and decider; The private cloud is used for storing all data and executing some low-latency tasks; The cache area is mounted on the public cloud, and the cache area stores part or all of the data in the private cloud as initial cache data, and regularly updates the stored data according to the cache strategy; The public cloud is used to determine the data to be queried according to the task to be executed, and send a query request to the cache area to obtain target data to execute the task to be executed according to the data to be queried; The decision maker stores three prediction models and performs pre-training. When the public cloud sends a query request to the cache area to obtain target data to execute the task to be executed according to the data to be queried, the decision maker is also used to monitor the access of the public cloud to the cache area in real time. When the public cloud accesses the cache area, the access data is obtained and input into the prediction model, and the priority hierarchy and update strategy of the cache area are updated according to the output result of the prediction model. The prediction models include: a cache prediction model, a task prediction model and a data prediction model.

2. The multi-level cache adaptive system based on machine learning according to claim 1, characterized in that: Before the public cloud is used to determine the data to be queried according to the task to be executed, and sends a query request to the cache area according to the data to be queried to obtain target data to execute the task to be executed, the method includes: The decision maker obtains the initial cache data and inputs it into the cache prediction model, and the cache prediction model outputs an initial cache strategy based on the initial cache data, and the initial cache strategy is used for initialization of the cache area; The initial cache strategy includes: a cache tiering strategy of the number of initial cache layers and the proportion of data in each layer, and a cache update strategy of the initial data update time and the proportion of new and old data; When the public cloud accesses the cache area, the access data is obtained and input into the prediction model, and the priority hierarchy structure and update strategy of the cache area are updated according to the output result of the prediction model, including: The decision maker obtains access data and inputs it into the task prediction training model. The test training model outputs a list of related tasks and the corresponding number of occurrences of each related task based on the access data; The access data includes: access user characteristic data, access server capabilities and access execution tasks.

3. The multi-level cache adaptive system based on machine learning according to claim 2, characterized in that: After the task prediction training model outputs a list of related tasks and the number of occurrences of each related task based on the access data, the method includes: The decision maker inputs the related task list into the data prediction training model, and the data prediction training model outputs the corresponding data identifier of each related task and the number of occurrences of each corresponding data identifier based on the task prediction model, and calculates the occurrence probability of each corresponding data identifier according to the corresponding data identifier of each related task and each corresponding data identifier, sorts the occurrence probability of each data identifier in descending order, and matches the corresponding data identifier of each related task with each initial cache layer according to the initial cache strategy, and records the matching results in a data table, and the decision maker sends the data table to the cache area for data cache update, reads data from the memory according to the data identifier, and stores the data in different cache layers according to the storage path matched in the data table.

4. The multi-level cache adaptive system based on machine learning according to claim 3, characterized in that: The public cloud is used to determine the data to be queried according to the task to be executed, and send a query request to the cache area to obtain target data to execute the task to be executed according to the data to be queried, including: The decision maker updates the data table according to the update strategy of the cache area, and the cache area adjusts the data in the cache area according to the latest data table. When the data in the data table does not exist in the cache area, the private cloud is accessed for acquisition. When the data in the cache area does not exist in the data table, the data is deleted from the cache area.

5. The multi-level cache adaptive system based on machine learning according to claim 4, characterized in that: When the decision maker pre-trains three prediction models, it includes: The cache prediction model adopts a reinforcement learning model, takes the initial cache resources of the cache area as input to obtain input feedback, and the cache model makes action decisions based on the input environmental feedback; The input feedback includes: penalty feedback and reward feedback, wherein the penalty feedback is the amount of resources and time saved by cache hits, and the reward feedback is the space, resource occupancy and memory access; The action decisions include: hierarchical strategy and update strategy; The tiering strategy includes: the number of cache layers in the cache area and the proportion of data corresponding to each cache layer; The update strategy includes: a data update time period threshold Ttask and a data update ratio threshold αnew.

6. The multi-level cache adaptive system based on machine learning according to claim 5, characterized in that: The tiered strategy specifically includes: A cache prediction update period Tcache is pre-set, and an average reward and penalty value Feedback is obtained and calculated according to the time and resources saved due to data cache hits and the resource consumption of adjusting the storage address of the data cache area due to data probability update within the cache prediction update period Tcache; The calculation formula of cache prediction update period Tcache is as follows: T cache =max(24h,10T task ); Where T is the time since the last stratification strategy prediction; The calculation formula for the average reward and punishment value Feedback is as follows: When T is within the cache prediction update cycle Tcache, the inferred tiering strategy and cache strategy are saved in the decision maker to obtain the corresponding average reward and penalty value without adjusting the structure of the cache area. When T is not within the cache prediction update cycle Tcache, the reward time average Feedback / T obtained by the last round of execution of the update strategy is obtained, where T is the time from the last tiering strategy prediction; When the average reward and punishment value Feedback is less than the previous round of hierarchical monitoring threshold σ cache When the update strategy is updated in the next round, the hierarchical strategy is updated; 7. The multi-level cache adaptive system based on machine learning according to claim 6, characterized in that: The update strategy specifically includes: At the time threshold T task After that, the latest execution task is used as the latest input to obtain the latest data identification and data probability. The latest data identification and data probability are compared with the information in the previous data table. The calculation formula for the probability value of the updated data is as follows: P update =a new ×P new +(1-a new )×P old : Among them, P new and P old are the latest probability and the probability of the previous round of the data identification, respectively, and α new is the determining factor of the new probability for the probability to be updated, which is determined by the update strategy of the cache prediction model; Update the new data identifier and data probability into the data table, and then send it to the cache to execute the data change.

8. The multi-level cache adaptive system based on machine learning according to claim 7, characterized in that: When the decision maker pre-trains the three prediction models, it also includes: The task prediction model uses the data update time period threshold Ttask as a variable period, inputs the current task output data update time period threshold Ttask time period and other related task lists, compares the task list predicted by the comparison model with the actual task list, and returns the error value to correct the model; The data prediction model is synchronously updated and trained once each time the task prediction model is updated. Within the data update time period threshold Ttask, the data prediction model takes each execution task as input to predict the most frequently occurring data and the number of occurrences of the execution task.

10. A multi-level cache adaptive strategy based on machine learning, characterized in that: Applied in the multi-level cache adaptive system based on machine learning as claimed in any one of claims 1 to 9, comprising: Using part or all of the data in the private cloud stored in the cache area as initial cache data; The public cloud determines the data to be queried according to the task to be executed, and sends a query request to the cache area to obtain the target data to execute the task to be executed according to the data to be queried; By storing three prediction models in the decision maker and pre-training them, when the public cloud sends a query request to the cache area to obtain target data to execute the task to be executed according to the data to be queried, the decision maker is also used to monitor the access of the public cloud to the cache area in real time. When the public cloud accesses the cache area, the access data is obtained and input into the prediction model, and the priority hierarchy and update strategy of the cache area are updated according to the output result of the prediction model; The prediction models include: a cache prediction model, a task prediction model and a data prediction model.

Citation Information

Patent Citations

  • Method and device for realizing cache data scheduling

    CN110334036A

  • Method and system for caching data on risk control cloud

    CN110674173A

  • Hybrid cloud system, data processing method and device thereof and storage medium

    CN112565317A

  • Dynamic caching method and device based on deep learning, equipment and medium

    CN116684491A

  • Solid-state disk cache management method and system, electronic equipment and storage medium

    CN116931838A

Cited By

  • Method and device for adjusting query system, electronic equipment, medium and product

    CN120296036A

  • Intelligent cache replacement method and system based on application awareness

    CN120429248A

  • Data storage optimization method and system based on real-time operating system

    CN120508408A

  • Multi-level cache optimization method and system based on data popularity adaptive adjustment

    CN120872240A

  • Storage system optimization method and device, electronic equipment, medium and product

    CN120909532A