A multi-tenant data management method
By optimizing the classification of tenant attribute information and the resource investment ratio in a multi-tenant cloud environment, combined with the whale optimization algorithm and the greedy algorithm, the problem of resource fragmentation in the multi-tenant environment is solved, performance and efficiency are improved, and operating costs are reduced.
Patent Information
- Application Number
- CN202410917410.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-07-10
AI Technical Summary
In a multi-tenant cloud environment, due to the diversity of application requirements of different tenants, resources are fragmented, increasing the data processing burden, affecting node performance and overall system resource utilization, resulting in prolonged response times and increased operating costs.
By collecting tenant attribute information for grade classification, combined with the relationship between service cost and service quality, the optimal resource input and output ratio is determined, using the whale optimization algorithm and greedy algorithm to minimize resource idle costs, and monitoring and adaptability of container placement nodes. Evaluate and generate signals for tenant data control management.
It improves the overall performance and resource management efficiency of the cloud platform, enhances its adaptability to the complex requirements of multi-tenant environments, optimizes container placement strategies, and reduces idle resource costs.
Smart Images

Figure CN118467180B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of tenant data management, and in particular to a multi-tenant data management method. Background Art
[0002] Multi-tenancy technology is a software architecture method that allows multiple users (tenants) to share the same application or database instance, but the data of each tenant is isolated to ensure the privacy and security of the data. In a multi-tenant architecture, a single software instance serves multiple customer organizations instead of deploying a separate software instance for each customer.
[0003] This architecture is particularly common in cloud computing and service providers because it enables efficient use of resources and reduces maintenance costs. For example, in cloud infrastructure, SaaS (Software as a Service) applications, or database services, multi-tenancy technology allows different companies to use the same system while keeping their respective data independent and secure.
[0004] The prior art has the following deficiencies:
[0005] In a multi-tenant environment based on cloud services, there are deficiencies in resource management and allocation, especially when dealing with performance differences and unequal resource demands among tenants. Since different tenants' applications involve diverse business logic and processing requirements, such as real-time data processing, batch data analysis, or front-end services, each application has different requirements for resources. This diversity of requirements leads to resource fragmentation, increases the burden of data processing and tenant adaptation, and thus affects node performance and overall system resource utilization, resulting in longer response times and higher operating costs.
[0006] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention
[0007] The purpose of the present invention is to provide a multi-tenant data management method, which collects tenant attribute information for relative level classification, and then combines the relationship between service cost and service quality to determine the optimal resource input and service output ratio, and generates a tenant cost-effective container placement strategy, and then combines the whale optimization algorithm with the greedy algorithm to minimize the resource idle cost of the node; finally, by monitoring the adjusted tenant container placement nodes, the adaptation stability of each tenant container and the placement node is evaluated to generate different signals for control and management of tenant data, so as to solve the shortcomings of the background technology.
[0008] In order to achieve the above object, the present invention provides the following technical solution: a multi-tenant data management method, comprising the following steps:
[0009] Analyze multiple tenants, collect tenant attribute information, and classify tenants according to the business time importance and cost sensitivity in the tenant attribute information;
[0010] According to the relationship between service cost and service quality, determine the optimal resource input and service output ratio, and generate a cost-effective container placement strategy for tenants;
[0011] Combine the whale optimization algorithm and the greedy algorithm to minimize the idle resource cost of the node and adjust the container placement node strategy;
[0012] Monitor the adjusted container placement nodes of each tenant, and obtain management analysis and evaluation information generated during the node monitoring process;
[0013] Analyze the management analysis and evaluation information to determine the compatibility and stability of each tenant container and placement node, and generate different signals to control and manage tenant data.
[0014] Preferably, multiple tenants are analyzed, tenant attribute information is collected, and tenants are classified into relative levels according to the business time importance and cost sensitivity in the tenant attribute information, including:
[0015] The business time importance is calculated based on the running time and transmission time of a tenant's single task completion time;
[0016] Cost sensitivity is calculated based on the tenant's CPU, memory, and bandwidth costs;
[0017] Calculate and analyze the time importance and cost sensitivity of the business to determine the cost-benefit ratio;
[0018] The relative level of each tenant is determined based on the cost-effectiveness ratio. The tenant level ranges from 0 to 1, and the sum of all tenant levels on the cloud platform is 1.
[0019] Preferably, according to the relationship between the cost and service quality of the service, the optimal resource input and service output ratio is determined, and a container placement strategy with cost-effectiveness for tenants is generated. The specific steps include:
[0020] Determine the tenant QoS model based on business time importance, cost sensitivity, and cost-effectiveness ratio;
[0021] Define cost indicators, including hardware cost, software cost, operation and maintenance cost, and power consumption. The service quality indicators are obtained based on the tenant QoS model.
[0022] Collect historical or forecast data of cost indicators and service quality indicators to determine the cost model;
[0023] Determine the cost function based on the cost model and the service quality function based on the tenant QoS model;
[0024] Calculate the relationship between the cost of the service and the quality of service achieved, determine the ratio of resource input to service output, and generate and adjust container resource configuration.
[0025] Preferably, the whale optimization algorithm and the greedy algorithm are combined to minimize the idle resource cost of the node and adjust the container placement node strategy. The specific steps are as follows:
[0026] Initialize the parameters of the whale optimization algorithm, set the population size, maximum number of iterations, and convergence accuracy;
[0027] Initialize container and node information, and establish container sets and node sets;
[0028] Generate the initial whale population, determine the initial position of the whales, and calculate the fitness value;
[0029] Determine the whale position with the best fitness value. In each iteration, update the whale position and obtain a new fitness value. If there is a larger fitness value, update the best position and record the current local optimal solution.
[0030] Use the greedy algorithm for local optimization and set the initial solution to the global optimal solution obtained by the whale optimization algorithm;
[0031] Perform greedy selection, for the current node and container, calculate the idle cost of the new resource to place the container on the node;
[0032] Repeat the greedy selection until the preset maximum number of local iterations is reached;
[0033] The global optimal solution obtained by the whale optimization algorithm is combined with the maximum number of local iterations of the greedy algorithm to determine the final container placement plan.
[0034] Preferably, the adjusted tenant container placement nodes are monitored to obtain management analysis and evaluation information generated during the node monitoring process. The specific steps are as follows:
[0035] Obtaining management analysis and evaluation information generated during node monitoring, the management analysis and evaluation information including node load information and resource migration adaptation information;
[0036] The node load information includes the node overload risk index, and the resource migration adaptation information includes the node resource balancing fitness index.
[0037] Preferably, the logic for obtaining the node overload risk index is as follows:
[0038] Set the unit time length T and divide it into n time points, obtain the currently used resource amount ZY of the node at each time point, obtain the total resource amount ZL, and calculate the resource utilization rate of the node at the time point: , get the resource usage of the node at time point t , get the average resource usage of the node at each time point , calculate the current resource usage: ;
[0039] Get the maximum value SF of resource utilization rate per unit time, and record the duration FT of the maximum value of resource utilization rate, and calculate the resource demand peak value. The calculation expression is: ;
[0040] Obtain the node resource usage data SJL at each time point, calculate the average data usage avg and the standard deviation of the data usage pcz, and calculate the data skewness fluctuation value PD based on the average data usage and the standard deviation of the data usage. The calculation expression is: , calculate the node overload risk index, the calculation expression is: .
[0041] Preferably, the logic for obtaining the node resource balance fitness index is as follows:
[0042] Get the available amount of each resource on the node , get the container's demand for each resource , calculate the resource adequacy value RSI, the calculation expression is: , j represents the number of resources;
[0043] Get the average value of all resource utilization of a node within a certain period of time. The calculation expression is: , where is the resource utilization at the ith observation time, m is the total number of observations, and the standard deviation of all resource utilizations of the node within a certain period of time is obtained. The calculation expression is: , calculate the load balancing value: ;
[0044] Get the actual amount of resources used on each node The total available amount of each resource on the node , calculate the resource waste value: , the node resource balance fitness index is calculated, and the calculation expression is: .
[0045] Preferably, the management analysis and evaluation information is analyzed to determine the adaptability and stability of each tenant container and the placement node, and different signals are generated to control and manage tenant data. The specific steps include:
[0046] Set a node resource balancing threshold and a node overload risk threshold, compare the node resource balancing fitness index with the set node resource balancing threshold, compare the node overload risk index with the node overload risk threshold, and conduct a joint analysis of the comparison results;
[0047] If the node overload risk index is greater than or equal to the node overload risk threshold, and the node resource balancing fitness index is greater than or equal to the node resource balancing threshold, a tenant data management signal is generated, and the load of some tenant container placement nodes is migrated to nodes with unsaturated resources;
[0048] If the node overload risk index is greater than or equal to the node overload risk threshold, and the node resource balance fitness index is less than the node resource balance threshold, a tenant data warning signal is generated to notify personnel to perform multi-tenant data maintenance;
[0049] If the node overload risk index is less than the node overload risk threshold, a tenant data stability signal is generated without additional management.
[0050] In the above technical solution, the technical effects and advantages provided by the present invention are:
[0051] The present invention analyzes multiple tenants, collects tenant attribute information and classifies them into relative levels according to business time importance and cost sensitivity. It can accurately match tenant needs with resource allocation, and determine the optimal resource input and service output ratio in combination with the relationship between service cost and service quality. It generates a cost-effective container placement strategy for tenants, combines the whale optimization algorithm with the greedy algorithm to minimize the resource idle cost of the node, thereby optimizing the container placement strategy. By monitoring the adjusted container placement nodes of each tenant, obtaining and analyzing the node management information, it can evaluate and ensure the adaptation stability of each tenant container and the placement node, and generate different signals for the control and management of tenant data, thereby improving the overall performance and resource management efficiency of the cloud platform, and significantly enhancing the adaptability to complex demands in a multi-tenant environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0053] Figure 1The present invention is a flowchart of a multi-tenant data management method. DETAILED DESCRIPTION
[0054] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present disclosure will be more comprehensive and complete, and the concept of the example embodiments will be fully conveyed to those skilled in the art.
[0055] Embodiment 1: The present invention provides Figure 1 A multi-tenant data management method is shown, the method comprising the following steps:
[0056] Analyze multiple tenants, collect tenant attribute information, and classify tenants according to the business time importance and cost sensitivity in the tenant attribute information;
[0057] According to the relationship between service cost and service quality, determine the optimal resource input and service output ratio, and generate a cost-effective container placement strategy for tenants;
[0058] Combine the whale optimization algorithm and the greedy algorithm to minimize the idle resource cost of the node and adjust the container placement node strategy;
[0059] Monitor the adjusted container placement nodes of each tenant, and obtain management analysis and evaluation information generated during the node monitoring process;
[0060] Analyze the management analysis and evaluation information to determine the compatibility and stability of each tenant container and placement node, and generate different signals to control and manage tenant data.
[0061] Data isolation in a multi-tenant environment means isolating the data of multiple tenants and implementing isolated storage and access control policies, as follows:
[0062] Physical isolation means storing data for each tenant on different physical devices. Although this method is more expensive, it provides the highest level of security and isolation;
[0063] Logical isolation stores all tenants' data on the same physical device, but ensures data isolation through database design or application logic. This includes the following techniques:
[0064] Tenant ID addition: Add a tenant ID field to the data table to ensure that queries and operations are limited to data with the corresponding tenant ID;
[0065] Multi-schema isolation: Create an independent schema in the database for each tenant. Each schema contains a complete set of tables, and the data is completely isolated from each other.
[0066] Use virtualization technology to create logically separated database instances, with each tenant accessing their own database instance;
[0067] Role-based access control (RBAC): Define different roles and assign different permissions to each role. These roles are configured according to the needs of tenants to ensure that users can only access authorized data;
[0068] Attribute-based access control (ABAC): In the ABAC model, access control decisions are made based on attributes (such as user attributes, resource attributes, and environmental conditions), providing more fine-grained access control;
[0069] Multi-factor authentication: adds layers of security by requiring users to provide multiple authentication methods (password, biometrics, mobile phone verification, etc.) to access data;
[0070] Use protocols such as SSL / TLS to encrypt the data transmission process to prevent data from being stolen or tampered with during transmission. Encrypt stored data to ensure that even if the data is illegally accessed, it cannot be interpreted, using symmetric encryption or asymmetric encryption technology.
[0071] In a multi-tenant container cloud environment, tenants are responsible for publishing tasks to the container cloud platform, which is responsible for loading the received cloud tasks into appropriate containers and then deploying the containers to their nodes for operation.
[0072] Mapping between tasks and containers. This mapping level involves correctly assigning cloud tasks submitted by tenants to containers. Each task is loaded into the most suitable container based on its requirements (such as CPU, memory, storage, and network bandwidth requirements) and characteristics (such as execution time and priority). The purpose of this mapping is to ensure that tasks can run efficiently in containers without affecting performance due to insufficient or overloaded resources. Task dependencies must also be considered to ensure that related tasks can run within the scope of mutual communication or in the same container environment.
[0073] Mapping between containers and nodes. After completing the mapping of tasks to containers, the next step is to deploy these containers to physical or virtual nodes. This mapping level needs to consider factors such as the node's resource configuration (CPU, memory, storage space, and network bandwidth), current load, and geographical location. The goal is to optimize resource utilization, reduce latency, improve reliability, and ensure load balancing. For example, all containers with high resource requirements should not be deployed to the same node to avoid overload and performance bottlenecks.
[0074] Analyze multiple tenants and collect tenant attribute information, including tenant information, task information, container resource information, node resource information, etc. Task information is obtained from databases such as cloud platforms, and container resource information and node resource information can be collected by deploying Agent collectors on each node.
[0075] Tenant information includes its task set, expected task cost, expected task completion time, etc. Task information includes the task length, task size, tenant, etc. of each task. Container resource information includes the computing power, memory size, network bandwidth, etc. of the container. Node resource information includes the computing power, memory size, network bandwidth, and allocated container set of the node.
[0076] Tenants are classified into relative levels according to their business time importance and cost sensitivity. Tenants of different levels can enjoy different levels of resource allocation and service priority. The specific steps are as follows:
[0077] The completion time of a single task of a tenant consists of two parts: running time and transmission time. The importance of business time can be calculated using the following formula: , where is the task completion time of tenant i, is the running time of the task, which is related to the complexity of the task and the allocated computing resources. is the transmission time of the task, which is related to the data transmission volume and network bandwidth;
[0078] The tenant's cost sensitivity includes the cost of CPU, memory, and bandwidth. The cost sensitivity calculation can be expressed as: ,in, is the task execution cost of tenant i, It is the CPU usage cost, which is calculated based on the CPU usage time and unit price. is the memory usage cost, based on the size of the allocated memory and the time it is used, is the cost of bandwidth usage, which is determined by the amount of data transferred and the bandwidth rate;
[0079] Since the scales of different indicators may be different, data standardization is performed to eliminate the scale effect. ,in, is the standardized score, is the original data, and They are the minimum and maximum values of the indicator data respectively;
[0080] Analyze the time importance and cost sensitivity of the business to determine the cost-benefit ratio: ,in, is the cost-effectiveness ratio of tenant i, reflecting the cost that the tenant is willing to pay to reduce consumption per unit time;
[0081] The relative level of each tenant is determined based on the cost-effectiveness ratio. The tenant level is between 0 and 1, and the sum of all tenant levels of the cloud platform is 1.
[0082] The tenant QoS model is determined based on the business time importance, cost sensitivity, and cost-effectiveness ratio. The tenant QoS model is defined as: , where w is the tenant's preference. The larger its value is, the more the tenant cares about the completion time of the task, and vice versa.
[0083] Analyze and calculate the relationship between the cost of providing services and the quality of service achieved to determine the optimal ratio of resource input to service output, taking cost and quality of service (QoS) as the two main considerations. The specific steps are as follows:
[0084] The cost indicators include hardware cost, software cost, operation and maintenance cost, power consumption, etc. The service quality indicators are obtained based on the tenant QoS model. Collect the historical records or forecast data of cost indicators and service quality indicators to determine the cost model: , where a represents fixed costs (fixed costs of hardware costs, software costs, operation and maintenance costs, and power consumption), b represents variable costs per unit of resource usage, and x represents the amount of resource usage;
[0085] The cost function CB(x) is determined according to the cost model: it represents the total cost that increases with the increase of resource input x. The service quality function Q(x) is determined according to the tenant QoS model, which represents the service quality index that increases with the increase of resource input x.
[0086] Find a resource input amount that maximizes the cost-effectiveness ratio, that is, obtain: , run simulations using selected resource inputs and observe actual costs and service quality.
[0087] Analyze and calculate the relationship between the cost of providing services and the service quality achieved to determine the optimal ratio of resource input to service output;
[0088] By understanding the relationship between service quality and cost, the cloud platform generates and adjusts container resource configuration according to the budget to ensure that the service quality is maximized without overspending. Reasonable resource configuration can ensure that the container has sufficient processing power and storage resources, thereby providing faster response time and higher processing efficiency.
[0089] On the container cloud platform, tenants submit their own cloud tasks. The cloud platform is responsible for loading each task into each container, realizing containerization, and finally scheduling the container to the node of each service for execution.
[0090] It should be noted that in a cloud environment, the relationship between containers and nodes is basically that nodes contain containers. Nodes usually refer to actual physical servers or virtual machines, while containers are lightweight, encapsulated application execution environments running on these nodes.
[0091] The Whale Optimization Algorithm (WOA) and the Greedy Algorithm are used together to optimize the strategy of placing containers on nodes and minimize the idle resource cost of nodes. The specific steps are as follows:
[0092] Initialize the parameters of the whale optimization algorithm, set the population size N, and the maximum number of iterations , convergence accuracy And other parameters;
[0093] Initialize container and node information, container collection , each container has a demand (such as CPU, memory), node set , each node has available resources (such as CPU, memory);
[0094] Generate an initial whale population, ,in, is the initial position of the ith whale, and are the minimum and maximum values of the search space respectively;
[0095] Calculate the fitness value, find the whale position with the best fitness value, and define the fitness function f(X), which is the resource idle cost function. ,in, is the total amount of resources of node j, is the resource requirement of container i;
[0096] In each iteration, the whale position is updated according to the update formula of the WOA algorithm: , where α is the scaling factor, t is the current iteration number, and r is a random number;
[0097] In each iteration, check the fitness value of the updated whale position. If there is a larger fitness value, update the best position and record the current local optimal solution: ,in, Indicates that finding The minimum value of the variable i;
[0098] When the maximum number of iterations is reached or other termination conditions are met, the algorithm terminates and the optimal position is output. and its corresponding fitness value, which is the global optimal solution found by the global search of the WOA algorithm;
[0099] Use the greedy algorithm for local optimization and set the initial solution to the global optimal solution obtained by the WOA algorithm;
[0100] Make a greedy choice for the current node and container , calculate the container Place on Node Idle cost of new resources: , the container Place it on the node that minimizes the idle cost of resources ;
[0101] Iterative optimization, repeatedly performing greedy selection until there is no more room for improvement or the preset maximum number of local iterations is reached;
[0102] The global optimal solution obtained by the WOA algorithm is combined with the local optimization result (maximum number of local iterations) of the greedy algorithm to form the final container placement plan.
[0103] Through this process, the WOA algorithm provides a good global search foundation, while the greedy algorithm performs detailed local optimization on this basis. Combining the advantages of both, it can effectively solve the container placement problem, achieve optimal resource allocation and minimize costs, and have higher isolation when managing multi-tenant data. In addition, through detailed container placement decisions, data isolation between tenants is further strengthened, ensuring that each tenant's operations do not interfere with each other and data security;
[0104] During container placement, the algorithm can select appropriate physical nodes for containers of different tenants based on the security and isolation requirements of the tenants. Such a strategy effectively prevents cross-tenant data leakage and interference, and allows the cloud platform to respond quickly and re-optimize resource allocation when tenant requirements change or resource status changes. This dynamicity is a very important feature in cloud computing environments and helps maintain system stability and efficiency.
[0105] Implement the finalized container placement plan and continuously monitor it during operation so as to make adjustments based on the actual situation. After selecting containers for tenant data, during the operation of the cloud platform that manages the containers, the actual container usage requirements and resource scheduling are dynamically changed according to the subsequent execution operations of the tenant data. Depending on the changes caused by different execution operations, node load imbalance problems may occur, such as node load being too high or too low.
[0106] Since the actual usage requirements of each tenant's container may change dynamically over time and with the execution of application operations, this may cause some nodes to be overloaded (resource usage exceeds their capacity), while other nodes may have underutilized resources. This is the so-called node load imbalance problem, which is particularly common in multi-tenant environments because applications of different tenants may have different resource requirements and usage patterns;
[0107] The cloud platform usually needs to monitor the nodes where each tenant's container is placed, and perform predictive analysis based on the monitoring results. According to the predictive analysis results, dynamic resource scheduling and load balancing strategies are implemented, and management analysis and evaluation information generated during the node monitoring process is obtained. The management analysis and evaluation information is analyzed to determine the adaptability and stability of each tenant's container and the placement node. The management analysis and evaluation information includes node load information and resource migration adaptation information.
[0108] The node load information includes the node overload risk index, and the resource migration adaptation information includes the node resource balance fitness index. After collection, the node overload risk index and the node resource balance fitness index are calibrated as NOLRI and NREAI respectively.
[0109] The Node Overload Risk Index (NOLRI) is mainly used for resource management and monitoring of cloud server nodes in cloud computing environments. This index is designed to measure the overload risk that each node may face in the future, helping system administrators or automated management systems to identify possible performance bottlenecks and service interruption risks in advance. Through this prediction and evaluation, more effective resource allocation and load balancing can be achieved to ensure stable operation and efficient performance of the system. Specifically, the Node Overload Risk Index measures:
[0110] Resource usage and limits: NOLRI evaluates the current resource usage of each node, including CPU, memory, storage, and network resources, as well as historical peak resource usage, which helps understand the performance of each node under normal operation and high load conditions;
[0111] Resource demand growth trend: By analyzing past data, NOLRI can predict whether the node's resource demand has an increasing trend, which is critical for long-term resource planning and expansion;
[0112] Load volatility: This metric reflects how the node's load fluctuates over time. High volatility may mean that the workload carried by the node is unstable and may be overloaded due to sudden high loads.
[0113] Taking all the above factors into consideration, NOLRI gives a risk rating for nodes that may enter an overload state, which helps the cloud platform's operation and maintenance team or automated tools make more reasonable decisions when allocating resources and scheduling loads. It can be used to dynamically manage cloud resources, optimize resource allocation, and prevent node overload, thereby improving the responsiveness and reliability of the entire system. Through real-time monitoring and analysis of NOLRI, resources can be adjusted in a timely manner to avoid service interruptions and ensure that cloud services provide continuous, stable, and efficient services.
[0114] The logic for obtaining the node overload risk index is as follows:
[0115] Set the unit time length T and divide it into n time points, obtain the currently used resource amount ZY of the node at each time point, obtain the total resource amount ZL, and calculate the resource utilization rate of the node at the time point: , get the resource usage of the node at time point t , get the average resource usage of the node at each time point , calculate the current resource usage: ;
[0116] Get the maximum value SF of resource utilization rate per unit time, and record the duration FT of the maximum value of resource utilization rate, and calculate the resource demand peak value. The calculation expression is: ;
[0117] Obtain the node resource usage data SJL at each time point, calculate the average data usage avg and the standard deviation of the data usage pcz, and calculate the data skewness fluctuation value PD based on the average data usage and the standard deviation of the data usage. The calculation expression is: , calculate the node overload risk index, the calculation expression is: .
[0118] It should be noted that the size of the unit time is divided according to the actual situation. Similarly, the size of the time period is also determined according to the actual usage scenario. Usually, the average data of the last 5 minutes or 10 minutes is used to ensure the timeliness and accuracy of the data. Use a real-time monitoring system (such as Prometheus or Zabbix) to collect relevant resource data of the node. The monitoring system will automatically record the real-time usage of the CPU, memory, disk, and network bandwidth of each node, and calculate the usage rate of each resource from these data. After the calculation, it is summarized as the amount of resources used.
[0119] The node resource balance fitness index measures the adaptability and balance of resource configuration of a computing node after accepting new or additional container loads. The node resource balance fitness index reflects the extent to which a node can use its resources effectively and evenly while avoiding excessive load or resource waste. The following are the main contents measured and represented by the node resource balance fitness index:
[0120] Resource adequacy: The node resource balance fitness index first ensures that the evaluated node has sufficient resources to meet the needs of the newly added containers, including resources such as CPU, memory, storage, and network bandwidth;
[0121] Load balancing: The node resource balancing fitness index evaluates the balance of resource allocation after adding new containers to the node, examining the average level and deviation of resource usage to determine whether all resource types are used evenly, thereby avoiding overloading some resources while leaving others idle;
[0122] Minimize resource waste: Monitor resource utilization after a node accepts new loads to ensure that all available resources are used most effectively, reduce idle or inefficiently used resources, and thus improve overall resource utilization efficiency.
[0123] The logic for obtaining the node resource balance fitness index is as follows:
[0124] Get the available amount of each resource on the node , get the container's demand for each resource , calculate the resource adequacy value RSI, the calculation expression is: , j represents the number of resources;
[0125] Get the average value of all resource utilization of a node within a certain period of time. The calculation expression is: , where is the resource utilization at the ith observation time, m is the total number of observations, and the standard deviation of all resource utilizations of the node within a certain period of time is obtained. The calculation expression is: , calculate the load balancing value: ;
[0126] Get the actual amount of resources used on each node The total available amount of each resource on the node , calculate the resource waste value: , the node resource balance fitness index is calculated, and the calculation expression is: .
[0127] It should be noted that the value of RSI is between 0 and 1. A value close to 1 indicates sufficient resources, and a value close to 0 indicates insufficient resources. The minimum ratio is chosen because a shortage of any resource may hinder the normal operation of the container. The higher the LBI value, the more balanced the resource utilization. The smaller the standard deviation, the closer the utilization of each resource is to the average level and the more balanced the resource usage. The resource waste value measures the proportion of underutilized resources on the node. The goal is to minimize resource waste. The lower the RWI value, the less resource waste on the node and the higher the resource utilization. A high RWI value may indicate that the resource allocation strategy needs to be adjusted to improve the overall resource utilization efficiency.
[0128] The Node Overload Risk Index (NOLRI) and the Node Resource Balance Fitness Index (NREAI) are two important indicators used to monitor and manage multi-tenant container nodes in cloud computing environments. The high and low values of these two indices can provide key information about the node status, thereby supporting more reasonable resource management and migration decisions;
[0129] Node overload risk index, a high value indicates that the node may be facing or will soon face overload. This index takes into account resource utilization, peak resource usage, growth trend of resource demand, and volatility of resource load. A high node overload risk index means that the node's resources are highly utilized and there may be a risk that demand exceeds the existing resource supply;
[0130] When the node overload risk index shows that a node has a higher risk, the management system or administrator should consider taking actions to prevent potential problems, such as implementing load balancing measures or migrating part of the workload to other nodes with lower risks in advance.
[0131] A high node resource balancing fitness index indicates that the node can maintain efficient and balanced use of resources when receiving new or additional workloads. This index measures resource adequacy, load balancing, and minimization of resource waste. When the node resource balancing fitness index is high, it means that the node has good resource management and allocation capabilities and can accommodate more workloads without affecting performance. On the contrary, if the node resource balancing fitness index is low, it indicates that the node may not be suitable for receiving more loads, and it is necessary to consider migrating some loads from these nodes to avoid performance degradation.
[0132] When monitoring and managing multi-tenant containers, you can combine these two indexes to optimize resource allocation and container migration strategies. The specific steps are as follows:
[0133] Set the node resource balancing threshold and the node overload risk threshold, compare the node resource balancing fitness index with the set node resource balancing threshold, compare the node overload risk index with the node overload risk threshold, conduct a joint analysis of the comparison results, and make corresponding decisions. The specific comparison process is as follows:
[0134] If the node overload risk index is greater than or equal to the node overload risk threshold, and the node resource balancing fitness index is greater than or equal to the node resource balancing threshold, a tenant data management signal is generated, indicating that the tenant container placement node may be facing or approaching an overload state and requires immediate intervention, while the remaining nodes have good resource allocation and utilization capabilities and can bear more load requirements, then the load of some tenant container placement nodes is migrated to the remaining nodes with lower risks and unsaturated resources to optimize resources and improve the balance of resource usage;
[0135] If the node overload risk index is greater than or equal to the node overload risk threshold, and the node resource balancing fitness index is less than the node resource balancing threshold, a tenant data warning signal is generated, indicating that the node where the tenant container is placed is overloaded, and the remaining nodes are also not suitable for load distribution, then personnel are notified to maintain multi-tenant data;
[0136] If the node overload risk index is less than the node overload risk threshold, a tenant data stability signal is generated, indicating that the tenant container placement node is in a safe state, resource usage is within an acceptable range, and no additional container migration is required;
[0137] When a tenant data warning signal is generated, indicating an urgent resource and load management issue, which requires immediate action to prevent service interruption or performance degradation, the following are the specific subsequent processing steps:
[0138] Notify key personnel. The automated system should immediately send warning signals to system administrators or operation and maintenance teams to ensure that the current risk status is quickly understood.
[0139] Diagnose the cause of the problem and analyze the specific reasons that lead to the current node overload and resource imbalance, including checking the application logs, resource usage history, and recent change records running on the node; at the same time, immediately check and optimize the configuration and performance of key applications running on the node, reduce resource requirements, and suspend the deployment of new workloads or containers to the node to prevent further aggravation of the overload;
[0140] If there are underutilized resources in the system, consider temporarily migrating part of the load to these nodes. If internal resources are insufficient, consider using the resources of the cloud service provider for expansion, such as temporarily renting additional cloud servers.
[0141] For persistent resource shortages, consider increasing physical resources, such as purchasing more servers or upgrading existing hardware;
[0142] Update the configuration of the monitoring system based on recent events, including setting more sensitive trigger thresholds and adding monitoring points. Increase the monitoring frequency of the system, especially checking key resources and performance indicators, so as to be able to respond quickly to any anomalies in the future. Once the problem is temporarily resolved, conduct an in-depth root cause analysis to prevent the problem from happening again. Based on the results of the root cause analysis, develop and implement a comprehensive improvement plan, including technology updates, capacity planning, and process optimization.
[0143] It should be noted that the relevant threshold information in this embodiment is pre-set by professionals and will not be explained in detail here.
[0144] The present invention analyzes multiple tenants, collects tenant attribute information and classifies them into relative levels according to business time importance and cost sensitivity. It can accurately match tenant needs with resource allocation, determine the optimal resource input and service output ratio based on the relationship between service cost and service quality, generate a cost-effective container placement strategy for tenants, combine the whale optimization algorithm with the greedy algorithm, minimize the resource idle cost of the node, and thus optimize the container placement strategy. By monitoring the adjusted container placement nodes of each tenant, evaluating and ensuring the adaptation stability of each tenant container and the placement node, different signals are generated for the control and management of tenant data, thereby improving the overall performance and resource management efficiency of the cloud platform and significantly enhancing the adaptability to complex demands in a multi-tenant environment.
[0145] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0146] The above description is only by way of illustration of certain exemplary embodiments of the present invention. It is undoubted that those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the above drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
[0147] It should be noted that, in this article, if there are relational terms such as first and second, etc., they are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0148] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A multi-tenant data management method, characterized in that: The steps include: Analyze multiple tenants, collect tenant attribute information, and classify tenants according to the business time importance and cost sensitivity in the tenant attribute information; According to the relationship between service cost and service quality, determine the optimal resource input and service output ratio, and generate a cost-effective container placement strategy for tenants; Combine the whale optimization algorithm and the greedy algorithm to minimize the idle resource cost of the node and adjust the container placement node strategy; Monitor the adjusted container placement nodes of each tenant, and obtain management analysis and evaluation information generated during the node monitoring process; Analyze the management analysis and evaluation information to determine the compatibility and stability of each tenant container and placement node, and generate different signals to control and manage tenant data; Collect tenant attribute information and classify tenants according to the business time importance and cost sensitivity in the tenant attribute information, including: The business time importance is calculated based on the running time and transmission time of a tenant's single task completion time; Cost sensitivity is calculated based on the tenant's CPU, memory, and bandwidth costs; Calculate and analyze the time importance and cost sensitivity of the business to determine the cost-benefit ratio; The relative level of each tenant is determined based on the cost-effectiveness ratio. The tenant level is between 0 and 1, and the sum of all tenant levels of the cloud platform is 1. Monitor the adjusted tenant container placement nodes and obtain management analysis and evaluation information generated during the node monitoring process. The specific steps are as follows: Obtaining management analysis and evaluation information generated during node monitoring, the management analysis and evaluation information including node load information and resource migration adaptation information; The node load information includes the node overload risk index, and the resource migration adaptation information includes the node resource balancing fitness index; The logic for obtaining the node overload risk index is as follows: Set the unit time length T and divide it into n time points, obtain the currently used resource amount ZY of the node at each time point, obtain the total resource amount ZL, and calculate the resource utilization rate of the node at the time point: , get the resource usage of the node at time point t , get the average resource usage of the node at each time point , calculate the current resource usage: ; Get the maximum value SF of resource utilization rate per unit time, and record the duration FT of the maximum value of resource utilization rate, and calculate the resource demand peak value. The calculation expression is: ; Obtain the node resource usage data SJL at each time point, calculate the average data usage avg and the standard deviation of the data usage pcz, and calculate the data volume skewness fluctuation value PD based on the average data usage and the standard deviation of the data usage. The calculation expression is: , calculate the node overload risk index, the calculation expression is: ; The logic for obtaining the node resource balance fitness index is as follows: Get the available amount of each resource on the node , get the container's demand for each resource , calculate the resource adequacy value RSI, the calculation expression is: , j represents the number of resources; Get the average value of all resource utilization of a node within a certain period of time. The calculation expression is: , where is the resource utilization at the ith observation time, m is the total number of observations, and the standard deviation of all resource utilizations of the node within a certain period of time is obtained. The calculation expression is: , calculate the load balancing value: ; Get the actual amount of resources used on each node The total available amount of each resource on the node , calculate the resource waste value: , the node resource balance fitness index is calculated, and the calculation expression is: .
2. A multi-tenant data management method according to claim 1, characterized in that: Based on the relationship between service cost and service quality, determine the optimal resource input and service output ratio and generate a container placement strategy that is cost-effective for tenants. The specific steps include: Determine the tenant QoS model based on business time importance, cost sensitivity, and cost-effectiveness ratio; Define cost indicators, including hardware cost, software cost, operation and maintenance cost, and power consumption. The service quality indicators are obtained based on the tenant QoS model. Collect historical or forecast data of cost indicators and service quality indicators to determine the cost model; Determine the cost function based on the cost model and the service quality function based on the tenant QoS model; Calculate the relationship between the cost of the service and the quality of service achieved, determine the ratio of resource input to service output, and generate and adjust container resource configuration.
3. A multi-tenant data management method according to claim 2, characterized in that: Combine the whale optimization algorithm with the greedy algorithm to minimize the idle resource cost of the node and adjust the container placement node strategy. The specific steps are as follows: Initialize the parameters of the whale optimization algorithm, set the population size, maximum number of iterations, and convergence accuracy; Initialize container and node information, and establish container sets and node sets; Generate the initial whale population, determine the initial position of the whales, and calculate the fitness value; Determine the whale position with the best fitness value. In each iteration, update the whale position and obtain a new fitness value. If there is a larger fitness value, update the best position and record the current local optimal solution. Use the greedy algorithm for local optimization and set the initial solution to the global optimal solution obtained by the whale optimization algorithm; Perform greedy selection, for the current node and container, calculate the idle cost of the new resource to place the container on the node; Repeat the greedy selection until the preset maximum number of local iterations is reached; The global optimal solution obtained by the whale optimization algorithm is combined with the maximum number of local iterations of the greedy algorithm to determine the final container placement plan.
4. A multi-tenant data management method according to claim 3, characterized in that: Analyze the management analysis and evaluation information to determine the compatibility and stability of each tenant container and placement node, and generate different signals to control and manage tenant data. The specific steps include: Set a node resource balancing threshold and a node overload risk threshold, compare the node resource balancing fitness index with the set node resource balancing threshold, compare the node overload risk index with the node overload risk threshold, and conduct a joint analysis of the comparison results; If the node overload risk index is greater than or equal to the node overload risk threshold, and the node resource balancing fitness index is greater than or equal to the node resource balancing threshold, a tenant data management signal is generated, and the load of some tenant container placement nodes is migrated to nodes with unsaturated resources; If the node overload risk index is greater than or equal to the node overload risk threshold, and the node resource balance fitness index is less than the node resource balance threshold, a tenant data warning signal is generated to notify personnel to perform multi-tenant data maintenance; If the node overload risk index is less than the node overload risk threshold, a tenant data stability signal is generated without additional management.
