Method and system for detecting inefficient use of cache space tenants based on machine learning
By using machine learning methods and decision tree models, an offline model was built for online detection, which solved the problem of real-time accuracy of inefficient cache space tenants in the cloud environment, reduced resource consumption, and improved the applicability and accuracy of detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAZHONG UNIV OF SCI & TECH
- Filing Date
- 2023-04-03
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies struggle to accurately detect tenants inefficiently using cache space in real time within a cloud environment, especially when tenant access patterns change dynamically and the number of tenants is large. Static detection has low accuracy, while dynamic detection incurs high overhead and cannot meet real-time requirements.
Machine learning methods are employed to collect tenant cache information, which is then vectorized and normalized. A decision tree model is used for training to build an offline model that can determine online whether a tenant is inefficiently using cache space. This includes the construction of a feature attribute set, decision tree training, and pruning, thereby reducing the time overhead of online judgment.
It enables real-time and accurate detection of tenant cache usage in a cloud environment, reducing model training time and resource overhead, and improving the applicability and accuracy of detection.
Smart Images

Figure CN116382908B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of machine learning and cloud storage technology, and more specifically, relates to a method and system for detecting tenants who inefficiently use cache space based on machine learning. Background Technology
[0002] In recent years, with the development of internet technology, the amount of data in various fields has grown rapidly, and the internet industry has entered the era of big data. More and more users are accessing and using the internet in various ways, such as browsing portal websites, downloading applications, watching on-demand videos, and online live streaming, and their demands for service quality are constantly rising. On the other hand, as data types become increasingly diverse and the number of tenants grows larger, it becomes more difficult for content providers to customize caching solutions for each tenant, and the operational complexity increases dramatically. Therefore, more and more content providers are starting to use shared cache space solutions to reduce operational complexity and improve cache utilization. However, shared cache space has a fatal flaw: some tenants inefficiently use the cache space, treating it as a storage node to store large amounts of cold data. This causes other tenants to generate high back-to-origin traffic because they cannot compete for sufficient cache space, thus increasing the overall back-to-origin traffic of the platform. This has a significant negative impact on both cost and user experience. Therefore, an effective method and system for detecting tenants who inefficiently use cache space is of great practical significance.
[0003] Several heuristic methods have been developed for detecting inefficient cache usage, mainly divided into static and dynamic detection. Static detection techniques primarily use individual performance metrics to determine whether a tenant is inefficiently using cache. For example, it checks whether the ratio of a tenant's access volume to its cache usage is lower than a set threshold; if so, it considers the tenant to be inefficiently using cache. It also checks whether the proportion of cache space occupied by an object that has only been accessed once is higher than a set threshold; if so, it considers the tenant to be inefficiently using cache. Dynamic detection techniques mainly use dynamically constructed missing rate curves to determine whether a tenant is inefficiently using cache. A missing rate curve needs to be constructed for each tenant, and then the slope of the missing rate curve is used to determine whether the tenant is inefficiently using cache.
[0004] However, the above methods all have some drawbacks that cannot be ignored: static detection technology is often only accurate for a certain tenant or a certain type of tenant, but its accuracy is low when the tenant's access mode changes, and it is not suitable for dynamic and ever-changing workload modes in the cloud environment; dynamic detection technology is limited by the fact that it takes a lot of time to build the missing rate curve, and it cannot be used for real-time detection scenarios in the cloud environment. In addition, when the number of tenants is large, dynamic detection technology has a huge overhead. Summary of the Invention
[0005] To address the aforementioned deficiencies or improvement needs of existing technologies, this invention provides a method and system for detecting tenants that inefficiently use cache space based on machine learning. The aim is to solve the technical problems of existing static detection technologies, such as low accuracy after tenant access patterns change and unsuitability for dynamically changing workloads in cloud environments; existing dynamic detection technologies, such as the significant time required to construct missing rate curves, making them unsuitable for real-time detection in cloud environments; and the high overhead of dynamic detection technologies when the number of tenants is large.
[0006] To achieve the above objectives, according to one aspect of the present invention, a method for detecting tenants who inefficiently use cache space based on machine learning is provided, comprising the following steps:
[0007] (1) Collect the tenant cache information of the tenant, and perform vectorization and normalization processing on the tenant cache information of the tenant in turn to obtain multiple feature vectors corresponding to the tenant.
[0008] (2) Input the feature vector of the tenant obtained in step (1) into the pre-trained machine learning model to obtain the detection result of the tenant.
[0009] Preferably, the machine learning model is a decision tree model, which is trained through the following steps:
[0010] (2-1) Collect tenant cache information from multiple time periods as a training set. Label all tenant cache information to obtain a labeled training set.
[0011] (2-2) The labeled training set obtained in step (2-1) is sampled to obtain the final training set.
[0012] (2-3) Train the decision tree model using the training set obtained in step (2-2) to obtain a trained decision tree model;
[0013] (2-4) Extract and save the model parameters of the decision tree obtained in step (2-3).
[0014] Preferably, step (2-1) specifically involves parsing each customer's cache information to obtain the missing rate curve of the corresponding tenant, and then determining whether the slope of the missing rate curve of the tenant is greater than a preset threshold. If it is greater, it indicates that the tenant corresponding to the missing rate curve is an inefficient cache tenant under the current cache size. Otherwise, it indicates that the tenant corresponding to the missing rate curve is a non-inefficient cache tenant under the current cache size. Finally, each customer's cache information is labeled, and all the labeled customer cache information constitutes a preliminary training set.
[0015] Preferably, step (2-2) specifically involves, for the labeled training set in step (2-1), firstly counting the number of data labeled as inefficiently using cache space in each hour and selecting these data, then randomly selecting five times the number of selected data from the training set labeled as not inefficiently using cache space in that hour, and then combining these data together in the order of the training set obtained in step (2-1), and all the combined data constitute the final training set.
[0016] Preferably, step (2-3) includes the following sub-steps:
[0017] (2-3-1) Use the feature vectors in the final training set D obtained in step (2-2) to construct the feature attribute set A;
[0018] (2-3-2) Use the set of feature attributes obtained in step (2-3-1) to build the root node of the decision tree as the current node;
[0019] (2-3-3) Set the counter j = 1;
[0020] (2-3-4) Determine if counter j is greater than N. If yes, the process ends; otherwise, proceed to step (2-3-5). N is a hyperparameter used to limit the maximum depth of the decision tree.
[0021] (2-3-5) Determine whether all feature attributes of the current node have the same label in the final training set D. If yes, proceed to step (2-3-9); otherwise, create V branches for the current node, where V is determined by the number of feature attributes in the feature attribute set A, V∈[0,|A|], and then proceed to step (2-3-6), where |A| represents the number of feature attributes in the feature attribute set A.
[0022] (2-3-6) Calculate the information gain of each feature attribute in the feature attribute set A obtained in step (2-3-1), and obtain the feature attribute with the largest information gain;
[0023] (2-3-7) Determine whether the proper subset of the feature attribute set is empty. If it is, create a leaf node for the branch, take the category C with the most categories in the feature attribute set as the class label of the leaf node, and proceed to step (2-3-9); otherwise, take the feature attribute set as the current node, and remove the feature attribute a with the largest information gain from the feature attribute set A. * Then proceed to step (2-3-8);
[0024] (2-3-8) Set j = j + 1 and return to step (2-3-4);
[0025] (2-3-9) Prune the decision tree generated in step (2-3-8) to obtain the final trained decision tree model.
[0026] Preferably, in step (2-3-6), the feature attribute a with the largest information gain. * =argmax a∈A Gain(D,a); where information gain is a statistic used to describe the ability of a feature attribute to distinguish data samples, and its calculation formula is as follows:
[0027]
[0028] Where Ent(D) is the information entropy of feature attribute a in the final training set D, Ent(D) v ) is D v Information entropy, v∈[0,V],D v Let |D| represent the total number of label categories included in the v-th branch of the current node in the final training set D. v | / |D| represents the percentage of the total number of label categories in the final training set D for the v-th branch of the current node.
[0029] Preferably, the formula for calculating information entropy is as follows:
[0030]
[0031] Where, p k (k∈{1,2,…,|y|}) represents the proportion of feature vectors with label k in the final training set D, Ent(D) represents the information entropy of the final training set D, log is the logarithmic function, and |y| represents the number of feature vectors in the final training set D. The logarithm needs to be quantized, and the calculated logarithm value is limited to [0.5,1). Then, the corresponding calculation result is generated using the approximate value.
[0032] Preferably, step (2-3-9) specifically involves calculating the entropy of each leaf node in the decision tree generated in step (2-3-8), then recursively calculating the entropy of the parent node after deleting the node, and then obtaining the loss function. It is determined whether the loss function decreases after deleting the node. If it does, the node is deleted; otherwise, it is retained, until all leaf nodes have been calculated.
[0033] The loss function is:
[0034]
[0035] T represents the generated decision tree, |T| represents the total number of leaf nodes in the decision tree, t∈[1,T] represents the leaf node of the tree, and N t H represents the number of feature attributes for each leaf node. t (T) represents the entropy at leaf node t, where a≥0 is a parameter to be determined. The entropy at leaf node t is:
[0036]
[0037] N tk This represents the number of feature attributes with label k in the final training set D, where K represents the number of categories of the label in the final training set D.
[0038] According to another aspect of the present invention, a system for detecting tenants who inefficiently use cache space based on machine learning is provided, comprising:
[0039] The first module is used to collect tenant cache information and then perform vectorization and normalization processing on the tenant cache information to obtain multiple feature vectors corresponding to the tenant.
[0040] The second module is used to input the tenant's feature vector obtained from the first module into a pre-trained machine learning model to obtain the detection results for that tenant.
[0041] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects:
[0042] (1) Since the present invention uses multiple tenant cache information used in step (1), it includes all the tenant cache information involved in the current static detection technology, and also includes some additional tenant cache information, which can more comprehensively analyze the usage of tenant cache. At the same time, it uses machine learning methods to dynamically analyze these tenant cache information, thus solving the technical problem of poor applicability.
[0043] (2) Since the present invention adopts step (2), it eliminates the process of constructing a missing rate curve for each tenant, thus solving the technical problem that the more tenants there are, the greater the cost.
[0044] (3) Since the present invention adopts steps (2-3-1) to (2-4), it provides an offline training model for use by an online model, enabling the online model to make a quick and accurate judgment, thus solving the technical problem of not being able to achieve real-time detection. Attached Figure Description
[0045] Figure 1 This is a schematic diagram of the overall framework of the method for detecting inefficient use of cache space tenants based on machine learning in this invention;
[0046] Figure 2 This is a flowchart of the method for detecting tenants who inefficiently use cache space based on machine learning, as described in this invention. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0048] This invention is based on machine learning. By analyzing and learning from historical workloads, an online predictive model is implemented. Tenant cache space utilization efficiency is categorized into two types: inefficient use and non-inefficient use. A simple machine learning model can quickly classify a large number of tenants and identify those using cache space inefficiently.
[0049] like Figure 1 and Figure 2 As shown, this invention provides a method for detecting tenants who inefficiently use cache space based on machine learning, comprising the following steps:
[0050] (1) Collect the tenant cache information of the tenant, and perform vectorization and normalization processing on the tenant cache information of the tenant in turn to obtain multiple feature vectors corresponding to the tenant.
[0051] Specifically, the tenant cache information collected in this invention is as follows:
[0052] logo meaning <![CDATA[A s ]]> The total number of requests to this server <![CDATA[A t ]]> The total number of requests from this tenant <![CDATA[H s ]]> The server's hit rate <![CDATA[H t ]]> The tenant's hit rate <![CDATA[S t ]]> The size of the cache space occupied by this tenant <![CDATA[S n ]]> The tenant wrote to the cache over a period of time. <![CDATA[S9]]> The cache space occupied by 90% of the access volume of this tenant <![CDATA[O t ]]> The total number of all objects in the cache for this tenant. <![CDATA[T t ]]> All access traffic of this tenant <![CDATA[U t ]]> The number of objects that this tenant accessed only once.
[0053] Specifically, the normalization process in this step is implemented using the tanh function.
[0054] In this step, the data collection period is 1 minute each time. For example, the total number of requests to the server refers to the total number of times the server was accessed within this period. The other collected tenant cache information is similar, which is the cumulative data within this period.
[0055] The advantage of this step is that the collected tenant cache information includes all the tenant cache information currently covered by static detection technology, as well as some additional tenant cache information, thus enabling a more comprehensive analysis of tenant cache usage.
[0056] (2) Input the feature vector of the tenant obtained in step (1) into the pre-trained machine learning model to obtain the detection result of the tenant.
[0057] Specifically, the detection results will show whether the tenant is inefficiently using cache space.
[0058] Specifically, the machine learning model used in this invention is a decision tree model, which is trained through the following steps:
[0059] (2-1) Collect tenant cache information from multiple time periods as a training set. Label all tenant cache information to obtain a labeled training set.
[0060] Specifically, the tags are divided into two types: inefficient cache-using tenants and non-inefficient cache-using tenants. Therefore, the core of this invention is to accurately classify these two types. Labeling the training set is an offline operation, and the tags are assigned to the two types based on a set threshold.
[0061] Specifically, for each customer's cached information, it is parsed to obtain the missing rate curve for the corresponding tenant. Then, it is determined whether the slope of the missing rate curve for that tenant is greater than a preset threshold (this preset threshold ranges from negative infinity to zero, preferably -0.02 / C, where C represents the current cache space size). If it is greater, it indicates that the tenant corresponding to the missing rate curve is an inefficient cache user with the current cache size; otherwise, it indicates that the tenant corresponding to the missing rate curve is not an inefficient cache user with the current cache size. Finally, each customer's cached information is labeled, and all the labeled customer cached information constitutes the initial training set.
[0062] Specifically, the classification threshold in this step is set based on the slope of the missing rate curve. First, it's determined whether the total cache space is large and the number of tenants is small. If so, the threshold can be increased; otherwise, the threshold is decreased. This invention provides a simple example based on the collected test set. For instance, the threshold is set to (-0.02 / C), where C represents the cache space currently occupied by a tenant. This threshold means that, given the current cache space, a 1% reduction in the missing rate requires an increase of more than half of the currently occupied cache space.
[0063] The advantage of this step is that it allows for the construction of missing rate curves offline and the determination of whether tenants are inefficiently using cache space, thus solving the time overhead problem of constructing missing rate curves online.
[0064] (2-2) The labeled training set obtained in step (2-1) is sampled to obtain the final training set.
[0065] Specifically, the number of tenants who inefficiently use the cache space in the training set obtained in step (2-1) is far less than the number of tenants who do not inefficiently use the cache space. This will lead to an imbalance in the training set, which will eventually result in a large error in the accuracy of the trained model. Therefore, it is necessary to use sampling to make the data of each category in the training set relatively balanced.
[0066] Specifically, the sampling scheme used in this step is downsampling, which samples data from the two categories of tenants at a ratio of 5:1 every hour.
[0067] More specifically, for the labeled training set in step (2-1), firstly, count the number of data labeled as inefficiently using cache space in each hour and select these data. Then, randomly select five times the number of selected data from the training set labeled as not inefficiently using cache space in that hour. Subsequently, combine these data together in the order of the training set obtained in step (2-1). All the combined data constitute the final training set.
[0068] The advantage of this step is that it makes the proportion of data from each category in the final training set relatively balanced, thus solving the problem that the accuracy of the trained model is greatly affected by the extreme imbalance of categories.
[0069] (2-3) Train the decision tree model using the training set obtained in step (2-2) to obtain a trained decision tree model;
[0070] Specifically, the primary metric for selecting a machine learning model is recall (the probability of a sample being predicted as positive when it is actually positive). This is because the main objective of this invention is to detect all inefficiently occupying cache space, and then combine this with accuracy to select the optimal classification model. Ultimately, this invention employs a decision tree model.
[0071] This step includes the following sub-steps:
[0072] (2-3-1) Use the feature vectors in the final training set D obtained in step (2-2) to construct the feature attribute set A;
[0073] The feature attribute set A represents the set of all feature attributes. When training a decision tree, all feature attributes in the feature attribute set A are used for classification. The categories of the feature attribute set are consistent with the labels in the final training set obtained in step (2-2).
[0074] (2-3-2) Use the set of feature attributes obtained in step (2-3-1) to build the root node of the decision tree as the current node;
[0075] (2-3-3) Set the counter j = 1;
[0076] (2-3-4) Determine if counter j is greater than N. If yes, the process ends; otherwise, proceed to step (2-3-5).
[0077] Specifically, N is a hyperparameter used to limit the maximum depth of the decision tree. If N is set to 5, the maximum depth of the decision tree will not exceed 5.
[0078] (2-3-5) Determine whether all feature attributes of the current node have the same label in the final training set D. If yes, proceed to step (2-3-9). Otherwise, create V branches for the current node, where V is determined by the number of feature attributes in the feature attribute set A, V∈[0,|A|]. Then proceed to step (2-3-6), where |A| represents the number of feature attributes in the feature attribute set A.
[0079] (2-3-6) Calculate the information gain of each feature attribute in the feature attribute set A obtained in step (2-3-1), and obtain the feature attribute with the largest information gain;
[0080] Specifically, the feature attribute a with the largest information gain * =argmax a∈A Gain(D,a); where information gain is a statistic used to describe the ability of a feature attribute to distinguish data samples. Information gain can be calculated using the following formula:
[0081]
[0082] Where Ent(D) is the information entropy of feature attribute a in the final training set D, Ent(D) v ) is D v Information entropy, v∈[0,V],D v Let |D| represent the total number of label categories included in the v-th branch of the current node in the final training set D. v| / |D| represents the percentage of the total number of label categories in the final training set D for the v-th branch of the current node. It should be noted that in this embodiment of the invention, the information entropy can be calculated using a formula, which is one of the most commonly used indicators for measuring the purity of a sample set. The formula is as follows:
[0083]
[0084] Where, p k (k∈{1,2,…,|y|}) represents the proportion of feature vectors with label k in the final training set D, Ent(D) represents the information entropy of the final training set D, log is the logarithmic function, and |y| represents the number of feature vectors in the final training set D. The logarithm needs to be quantized, and the calculated logarithm value is limited to [0.5,1). Then, the corresponding calculation result is generated using the approximate value.
[0085] (2-3-7) Determine whether the proper subset of the feature attribute set is empty. If it is, create a leaf node for the branch, take the category C with the most categories in the feature attribute set as the class label of the leaf node, and proceed to step (2-3-9); otherwise, take the feature attribute set as the current node, and remove the feature attribute a with the largest information gain from the feature attribute set A. * Then proceed to step (2-3-8);
[0086] (2-3-8) Set j = j + 1 and return to step (2-3-4);
[0087] (2-3-9) Prune the decision tree generated in step (2-3-8) to obtain the final trained decision tree model.
[0088] Specifically, overfitting occurs because the tree depth is sometimes too large during training. Therefore, this invention requires reducing the "depth" of the decision tree, that is, after the tree is generated, it needs to be pruned to delete leaf nodes with overly fine classifications, causing them to degenerate back to their parent nodes.
[0089] Specifically, pruning is usually performed by minimizing a loss function, which is defined in this invention as follows:
[0090]
[0091] T represents the generated decision tree, |T| represents the total number of leaf nodes in the decision tree, t∈[1,T] represents the leaf node of the tree, and N t H represents the number of feature attributes for each leaf node. t (T) represents the entropy at leaf node t, where a≥0 is a parameter to be determined. The entropy at leaf node t is:
[0092]
[0093] N tk This represents the number of feature attributes with label k in the final training set D, where K represents the number of categories of the label in the final training set D.
[0094] Specifically, this step involves calculating the entropy of each leaf node in the decision tree generated in step (2-3-8), then recursively calculating the entropy of the parent node after deleting the node, and finally obtaining the loss function. It then determines whether the loss function decreases after deleting the node. If it does, the node is deleted; otherwise, it is retained, until all leaf nodes have been calculated.
[0095] The advantage of this step is that it prunes the decision tree, which solves the problem of overfitting caused by excessive tree depth during training, resulting in higher model accuracy.
[0096] (2-4) Extract and save the model parameters of the decision tree obtained in step (2-3).
[0097] Specifically, the model parameters of the decision tree trained in steps (2-3) are extracted and saved to a parameter file for use by the online model. Simultaneously, the accuracy of the online model's judgments needs to be collected in real time. When the accuracy falls below a specified threshold, the model needs to be retrained, and the new parameters are saved to the parameter file. The online model is then notified to update its parameters.
[0098] The advantage of steps (2-3-1) to (2-4) above is that by training the model offline and making judgments online, the time-consuming process is placed offline, and the online process is faster and simpler, enabling the online model to quickly and accurately determine whether the tenant is inefficiently using the cache space.
[0099] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for detecting tenants inefficiently using cache space based on machine learning, characterized in that, Includes the following steps: (1) Collect the tenant cache information of the tenant, and perform vectorization and normalization processing on the tenant cache information of the tenant in turn to obtain multiple feature vectors corresponding to the tenant; (2) Input the feature vector of the tenant obtained in step (1) into the pre-trained machine learning model to obtain the detection result of the tenant; the machine learning model is a decision tree model, which is trained through the following steps: (2-1) Collect tenant cache information from multiple time periods as a training set; and label all tenant cache information to obtain a labeled training set; Step (2-1) specifically involves parsing each customer cache information to obtain the missing rate curve of the corresponding tenant, and then determining whether the slope of the missing rate curve of the tenant is greater than a preset threshold. If it is greater, it means that the tenant corresponding to the missing rate curve is an inefficient cache tenant under the current cache size. Otherwise, it means that the tenant corresponding to the missing rate curve is a non-inefficient cache tenant under the current cache size. Finally, label each customer cache information, and all labeled customer cache information constitutes the initial training set. (2-2) Sample the labeled training set obtained in step (2-1) to obtain the final training set; Specifically, for the labeled training set in step (2-1), first count the number of data labeled as inefficient use of cache space in each hour and select these data, then randomly select 5 times the number of selected data from the training set labeled as non-inefficient use of cache space in this hour, and then combine these data together in the order of the training set obtained in step (2-1). All the combined data constitute the final training set. (2-3) Train the decision tree model using the training set obtained in step (2-2) to obtain a trained decision tree model; (2-4) Extract and save the model parameters of the decision tree obtained in step (2-3).
2. The method for detecting inefficiently using cache space tenants based on machine learning according to claim 1, characterized in that, Step (2-3) includes the following sub-steps: (2-3-1) Construct a feature attribute set A using the feature vectors in the final training set D obtained in step (2-2); (2-3-2) Use the set of feature attributes obtained in step (2-3-1) to build the root node of the decision tree as the current node; (2-3-3) Set the counter j=1; (2-3-4) Determine if counter j is greater than N. If yes, the process ends; otherwise, proceed to step (2-3-5). N is a hyperparameter used to limit the maximum depth of the decision tree. (2-3-5) Determine whether all feature attributes of the current node have the same label in the final training set D. If yes, proceed to step (2-3-9). Otherwise, create V branches for the current node, where V is determined by the number of feature attributes in the feature attribute set A, V∈[0,|A|], and then proceed to step (2-3-6), where |A| represents the number of feature attributes in the feature attribute set A. (2-3-6) Calculate the information gain of each feature attribute in the feature attribute set A obtained in step (2-3-1), and obtain the feature attribute with the largest information gain; (2-3-7) Determine whether the proper subset of the feature attribute set is empty. If it is, create a leaf node for the branch, take the category C with the most categories in the feature attribute set as the class label of the leaf node, and proceed to step (2-3-9); otherwise, take the feature attribute set as the current node, and remove the feature attribute a with the largest information gain from the feature attribute set A. * Then proceed to step (2-3-8); (2-3-8) Set j = j + 1 and return to step (2-3-4); (2-3-9) Prune the decision tree generated in step (2-3-8) to obtain the final trained decision tree model.
3. The method for detecting inefficiently using cache space tenants based on machine learning according to claim 2, characterized in that, In steps (2-3-6), the feature attribute a with the largest information gain is... * =arg max a∈A Gain(D,a); where information gain is a statistic used to describe the ability of a feature attribute to distinguish data samples, and its calculation formula is as follows: Gain(D,a)=Ent(D) - ; Where Ent(D) is the information entropy of feature attribute a in the final training set D, Ent( )for Information entropy, v∈[0,V], Let | represent the number of all label categories included in the v-th branch of the current node in the final training set D. | / |D| represents the percentage of the total number of label categories in the final training set D for the v-th branch of the current node.
4. The method for detecting inefficiently using cache space tenants based on machine learning according to claim 3, characterized in that, The formula for calculating information entropy is as follows: Ent(D) = ; in, (k∈{1,2,… ,|y|}) represents the proportion of feature vectors with label k in the final training set D, Ent(D) represents the information entropy of the final training set D, log is the logarithmic function, and |y| represents the number of feature vectors in the final training set D. The logarithm needs to be quantized, and the calculated logarithm value is limited to [0.5,1). Then, the corresponding calculation result is generated using the approximate value.
5. The method for detecting inefficiently using cache space tenants based on machine learning according to claim 4, characterized in that, Step (2-3-9) specifically involves calculating the entropy of each leaf node in the decision tree generated in step (2-3-8), then recursively calculating the entropy of the parent node after deleting the node, and then obtaining the loss function. It is then determined whether the loss function decreases after deleting the node. If it does, the node is deleted; otherwise, it is retained. This process continues until all leaf nodes have been calculated. The loss function is: ; T represents the generated decision tree, |T| represents the total number of leaf nodes in the decision tree, t∈[1,T] represents the leaf node of the tree, and N t H represents the number of feature attributes for each leaf node. t (T) represents the entropy at leaf node t, where a≥0 is an undetermined parameter; the entropy at leaf node t is: = ; N tk This represents the number of feature attributes with label k in the final training set D, where K represents the number of categories of the label in the final training set D.
6. A system for detecting inefficiently using cache space tenants based on machine learning, implemented based on the method for detecting inefficiently using cache space tenants as described in claim 1, characterized in that, The system includes: The first module is used to collect tenant cache information and then perform vectorization and normalization processing on the tenant cache information to obtain multiple feature vectors corresponding to the tenant. The second module is used to input the tenant's feature vector obtained from the first module into a pre-trained machine learning model to obtain the detection results for that tenant.