A dynamic data isolation method and system based on multiple data sources

By building an isolation policy decision matrix and dynamically adjusting the isolation policy in a multi-data source environment, the challenge of data isolation in a multi-tenant cloud environment is solved, efficient data isolation and access control are achieved, and the security and performance of the system are improved.

CN118504009BActive Publication Date: 2024-09-13北京蜂窝科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410946517.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-09-13
Estimated Expiration
2044-07-16

AI Technical Summary

Technical Problem

In a multi-tenant cloud environment, existing data isolation methods lack globality and comprehensiveness, making it difficult to effectively isolate data from different tenants and prevent sensitive data from being illegally accessed and leaked.

Method used

By obtaining tenant attributes and data access logs from multiple data sources, using clustering algorithms to extract access pattern features, constructing an isolation policy decision matrix, and dynamically adjusting the isolation policy based on isolation strength thresholds and system operation data to achieve fine-grained processing of different tenant data Dynamic isolation.

Benefits of technology

It improves the accuracy of data isolation and system performance, enhances data security and privacy protection capabilities, realizes dynamic isolation and access control of multi-tenant data, and improves the security, adaptability and maintainability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118504009B
    Figure CN118504009B
Patent Text Reader

Abstract

This invention provides a dynamic data isolation method and system based on multiple data sources, relating to the field of data processing technology. The method includes: acquiring tenant attributes from multiple data sources; dividing tenants into different tenant groups based on the similarity of tenant attributes; extracting access pattern features; clustering the access pattern features using a clustering algorithm; constructing an isolation strategy decision matrix based on the clustering results of the access pattern features and the different tenant groups; setting an isolation strength threshold based on the isolation strength value of each matrix element in the isolation strategy decision matrix; generating an initial isolation strategy; generating a new isolation strategy according to preset adjustment rules; isolating data from different tenants; determining the current isolation strategy based on tenant attributes and access pattern features; judging the legality of data access requests based on the current isolation strategy; filtering and forwarding legal data access requests; rejecting illegal data access requests; and recording access logs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to data processing technology, and in particular to a dynamic data isolation method and system based on multiple data sources. Background Art

[0002] With the development of cloud computing, big data and other technologies, more and more enterprises and organizations are migrating their business systems and data to multi-tenant cloud environments. In a multi-tenant environment, multiple tenants share the underlying physical infrastructure and data storage resources, and data from different tenants is usually stored in the same database instance. Due to the different sensitivity and confidentiality requirements of data from different tenants, how to effectively isolate data from different tenants while ensuring efficient data sharing and prevent sensitive data from being illegally accessed and leaked has become a major challenge facing multi-tenant data management.

[0003] Most existing data isolation methods are targeted at specific application scenarios and data environments, and lack a global dynamic data isolation mechanism that comprehensively considers multiple data sources. In order to solve the above technical problems, the present invention proposes a dynamic data isolation method based on multiple data sources, which dynamically builds a data isolation strategy across data sources by integrating the data features and access patterns of different data sources, realizes fine-grained dynamic data isolation for multiple data sources, effectively improves the accuracy of isolation and system performance, and has important application value and innovative significance. Summary of the invention

[0004] The embodiments of the present invention provide a dynamic data isolation method and system based on multiple data sources, which can solve the problems in the prior art.

[0005] According to a first aspect of the embodiments of the present invention,

[0006] A dynamic data isolation method based on multiple data sources is provided, comprising:

[0007] Obtain tenant attributes from multiple data sources, divide tenants into different tenant groups according to the similarity of tenant attributes, collect tenant data access logs, extract access pattern features, cluster the access pattern features through a clustering algorithm, and construct an isolation strategy decision matrix based on the clustering results of the access pattern features and different tenant groups, where the rows of the isolation strategy decision matrix represent tenant groups and the columns represent the clustering results of the access pattern features;

[0008] Based on the isolation strength value of each matrix element in the isolation strategy decision matrix, an isolation strength threshold is set, an initial isolation strategy is generated based on the set isolation strength threshold, and the security index value and performance index value of the initial isolation strategy are calculated according to the system operation data. When the security index value is lower than the preset security threshold or the performance index value is higher than the preset performance threshold, a new isolation strategy is generated according to the preset adjustment rules;

[0009] Isolate the data of different tenants according to the new isolation strategy, obtain the tenant's data access request at the same time, parse the data access request to obtain the corresponding tenant attributes and access mode characteristics, determine the current isolation strategy based on the tenant attributes and access mode characteristics, judge the legitimacy of the data access request according to the current isolation strategy, filter and forward the legitimate data access request, reject the illegal data access request, and record the access log.

[0010] In an optional embodiment,

[0011] Collect tenant data access logs, extract access pattern features, and cluster access pattern features using clustering algorithms, including:

[0012] For the collected tenant data access logs, we use the attention-based long short-term memory network to perform end-to-end feature learning and extract access pattern features.

[0013] Based on the similarity of access pattern features, a co-occurrence graph is constructed, where nodes represent tenants and edges represent similarities between tenants;

[0014] Starting from each node, a graph embedding algorithm based on random walk is used to generate a random walk sequence according to the weight of the edge, and the graph embedding model is trained based on the random walk sequence;

[0015] The trained graph embedding model is used to generate low-dimensional embedding vectors of nodes. Cluster analysis is performed on the generated low-dimensional embedding vectors of nodes to obtain the category structure of access pattern features. The access pattern features are clustered based on the category structure of the access pattern features.

[0016] In an optional embodiment,

[0017] Training a graph embedding model involves:

[0018] Construct the objective function of the graph embedding model and train the graph embedding model by maximizing the objective function. The calculation formula of the objective function of the graph embedding model is as follows:

[0019] ;

[0020] Among them, J is the objective function of the graph embedding model, v represents the vth node, V represents the node set, ω i represents the i-th element in the random walk sequence, W v represents a random walk sequence, u represents the u-th node, and Φ(·) represents the embedding vector of the node.

[0021] In an optional embodiment,

[0022] The calculation formula for the isolation strength threshold is as follows:

[0023] ;

[0024] Among them, ISV(a, b) represents the isolation strength value of data object a to user role b, α represents the weight coefficient of data sensitivity, DS(a) represents the sensitivity of data object a, β represents the weight coefficient of access frequency, AF(a, b) represents the access frequency of user role b to data object a, UR(b) represents the risk level of user role b, and γ represents the weight coefficient of user role risk level.

[0025] In an optional embodiment,

[0026] The initial isolation strategy generated based on the set isolation strength threshold includes:

[0027] Define three optimization goals: isolation strength, performance overhead, and resource consumption. Model the isolation strategy generation problem as a multi-objective optimization problem. Take the isolation strategy decision matrix as the decision variable, build the objective function based on isolation strength, performance overhead, and resource consumption, and build a multi-objective optimization model with the isolation strength threshold, performance overhead threshold, and resource consumption threshold as constraints.

[0028] An adaptive crossover-mutation operator is introduced to dynamically adjust the crossover probability and mutation probability according to population diversity, solve the multi-objective optimization model, and obtain a set of optimal solutions;

[0029] The optimal solutions are sorted according to the decision maker's preference information to obtain a subset of optimal solutions that meet the preferences. The indicators of each optimization objective of the optimal solution subset are integrated to obtain the comprehensive evaluation value of each solution in the optimal solution subset. The solution with the largest comprehensive evaluation value is selected as the initial isolation strategy.

[0030] In an optional embodiment,

[0031] The adaptive crossover and mutation operator is introduced to dynamically adjust the crossover probability and mutation probability according to the population diversity. The solution of the multi-objective optimization model includes:

[0032] The formula for calculating population diversity is as follows:

[0033] ;

[0034] Where D represents the population diversity metric, L represents the gene length, i represents the gene index, and N i represents the number of individuals with a value of 1 at the i-th gene position, and N represents the population size;

[0035] The calculation formula of adaptive crossover probability is as follows:

[0036] ;

[0037] Where P c is the crossover probability, represents the lower bound of the crossover probability, represents the upper bound of the crossover probability, D max is the maximum value of population diversity;

[0038] The calculation formula of adaptive mutation probability is as follows:

[0039] ;

[0040] Among them, P m is the mutation probability, represents the lower bound of the mutation probability, Represents the upper bound of the mutation probability.

[0041] In an optional embodiment,

[0042] Parsing data access requests to obtain corresponding tenant attributes and access mode characteristics include:

[0043] Obtaining request text data in the data access request and preprocessing it, and using a named entity model to identify request information entities in the preprocessed request text data;

[0044] Build a domain knowledge graph, link the identified request information entities with the entities in the domain knowledge graph, establish a mapping relationship between data access requests and the domain knowledge graph, and use the ontology relationships and logical rules in the domain knowledge graph to infer the implicit relationships and attributes in the data access request, and obtain the tenant attributes and access pattern characteristics corresponding to the data access request.

[0045] According to a second aspect of the embodiments of the present invention,

[0046] A dynamic data isolation system based on multiple data sources is provided, comprising:

[0047] The first unit is used to obtain tenant attributes from multiple data sources, divide tenants into different tenant groups according to the similarity of tenant attributes, collect tenant data access logs, extract access pattern features, cluster the access pattern features through a clustering algorithm, and construct an isolation strategy decision matrix according to the clustering results of the access pattern features and different tenant groups, wherein the rows of the isolation strategy decision matrix represent tenant groups, and the columns represent the clustering results of the access pattern features;

[0048] The second unit is used to set an isolation strength threshold based on the isolation strength value of each matrix element in the isolation strategy decision matrix, generate an initial isolation strategy based on the set isolation strength threshold, calculate the security index value and performance index value of the initial isolation strategy according to the system operation data, and generate a new isolation strategy according to a preset adjustment rule when the security index value is lower than a preset security threshold or the performance index value is higher than a preset performance threshold;

[0049] The third unit isolates the data of different tenants according to the new isolation strategy, obtains the tenants' data access requests, parses the data access requests to obtain the corresponding tenant attributes and access mode characteristics, determines the current isolation strategy based on the tenant attributes and access mode characteristics, judges the legitimacy of the data access requests according to the current isolation strategy, filters and forwards the legitimate data access requests, rejects the illegal data access requests, and records the access logs.

[0050] According to a third aspect of the embodiments of the present invention,

[0051] An electronic device is provided, comprising:

[0052] processor;

[0053] a memory for storing processor-executable instructions;

[0054] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0055] A fourth aspect of the embodiments of the present invention is:

[0056] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.

[0057] In this embodiment, by constructing an isolation strategy decision matrix according to tenant attributes and access pattern characteristics, and generating an isolation strategy based on the matrix, isolation of different tenant data is achieved, thereby improving data security and privacy protection capabilities. By monitoring the security indicators and performance indicators of the isolation strategy, and dynamically generating a new isolation strategy according to preset adjustment rules, the isolation strategy can be dynamically adjusted according to the actual operation situation, thereby improving the adaptability and effectiveness of the isolation strategy. By parsing data access requests, determining the current isolation strategy, and judging the legitimacy of the access request according to the isolation strategy, control and filtering of data access is achieved, and access logs are recorded, thereby improving the security and auditability of the system. By comprehensively utilizing technologies such as multi-tenant attribute division, access pattern analysis, and dynamic adjustment of isolation strategies, dynamic isolation and access control of multi-tenant data are achieved, thereby improving the security, privacy protection capabilities, adaptability, and maintainability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 A schematic diagram of a flow chart of a dynamic data isolation method based on multiple data sources according to an embodiment of the present invention;

[0059] Figure 2 The present invention is a schematic diagram of the structure of a dynamic data isolation system based on multiple data sources according to an embodiment of the present invention. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0061] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0062] Figure 1 FIG. 1 is a flow chart of a dynamic data isolation method based on multiple data sources according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0063] S101. Obtain tenant attributes from multiple data sources, divide tenants into different tenant groups according to the similarity of tenant attributes, collect tenant data access logs, extract access pattern features, cluster the access pattern features through a clustering algorithm, and construct an isolation strategy decision matrix based on the clustering results of the access pattern features and different tenant groups, where the rows of the isolation strategy decision matrix represent tenant groups and the columns represent the clustering results of the access pattern features.

[0064] Among them, tenant attributes include industry, region, reputation, etc.

[0065] In an optional embodiment,

[0066] Collect tenant data access logs, extract access pattern features, and cluster access pattern features using clustering algorithms, including:

[0067] For the collected tenant data access logs, we use the attention-based long short-term memory network to perform end-to-end feature learning and extract access pattern features.

[0068] Based on the similarity of access pattern features, a co-occurrence graph is constructed, where nodes represent tenants and edges represent similarities between tenants;

[0069] Starting from each node, a graph embedding algorithm based on random walk is used to generate a random walk sequence according to the weight of the edge, and the graph embedding model is trained based on the random walk sequence;

[0070] The trained graph embedding model is used to generate low-dimensional embedding vectors of nodes. Cluster analysis is performed on the generated low-dimensional embedding vectors of nodes to obtain the category structure of access pattern features. The access pattern features are clustered based on the category structure of the access pattern features.

[0071] Exemplarily, the structure of the long short-term memory network model based on the attention mechanism mainly includes: an embedding layer, which is used to map various fields in the access log (such as timestamp, resource path, operation type, etc.) into dense vectors as the input of the model; an LSTM layer, which is used to encode the embedded vectors to capture the temporal characteristics and long-term dependencies of the access behavior; an attention layer, which is used to assign weights to the output of each LSTM unit and dynamically adjust the importance of different access behaviors; a pooling layer, which is used to perform pooling operations on the weighted LSTM outputs to generate access pattern features.

[0072] After extracting the access pattern features, cluster analysis is required to discover the similarities and differences between different tenants. Specifically, based on the similarity of the access pattern features, an undirected weighted graph is constructed, where nodes represent tenants and edges represent the similarities between tenants. Starting from each node, a random walk sequence is generated based on the weight of the edge, and the neighborhood structure of the node is sampled. Using the generated random walk sequence, the Skip-Gram model is trained to optimize the probability of node co-occurrence and obtain the node embedding vector. The learned node embedding vectors are clustered to discover the intrinsic structure and category of the access pattern. Through graph embedding, the topological structure of the access pattern can be mapped to a low-dimensional vector space, so that similar patterns are close in the embedding space and dissimilar patterns are far away. This structured feature representation helps to improve the accuracy and efficiency of clustering.

[0073] By combining deep learning and graph embedding, end-to-end learning of access pattern feature extraction and clustering is achieved. Specifically, Attention-LSTM is used to encode the original access logs and extract high-level features of the access pattern. Based on the extracted features, the similarity between tenants is calculated and a co-occurrence graph of the access pattern is constructed. Node2Vec is used to perform random walks on the co-occurrence graph, and the Skip-Gram model is trained to learn the embedding vectors of the tenants. The learned embedding vectors are clustered to discover the category structure of the access pattern, and then the loss functions of feature extraction and clustering are weighted combined. The two tasks are jointly optimized through the back-propagation algorithm to achieve end-to-end training.

[0074] In an optional embodiment,

[0075] Training a graph embedding model involves:

[0076] Construct the objective function of the graph embedding model and train the graph embedding model by maximizing the objective function. The calculation formula of the objective function of the graph embedding model is as follows:

[0077] ;

[0078] Among them, J is the objective function of the graph embedding model, v represents the vth node, V represents the node set, ω i represents the i-th element in the random walk sequence, W v represents a random walk sequence, u represents the u-th node, and Φ(·) represents the embedding vector of the node.

[0079] In this embodiment, by using a long short-term memory network based on an attention mechanism to perform end-to-end feature learning on the tenant data access log, access pattern features can be automatically extracted, reducing the workload of manual feature engineering and improving the accuracy and efficiency of feature extraction. By constructing a co-occurrence graph and generating a random walk sequence based on the weight of the edge, the similarity relationship between tenant access patterns can be effectively captured, laying the foundation for subsequent clustering analysis. By using a graph embedding algorithm to generate a low-dimensional embedding vector of a node, high-dimensional access pattern features can be reduced to a low-dimensional space, facilitating subsequent clustering analysis and visualization. Clustering analysis of the generated low-dimensional embedding vector can reveal the intrinsic category structure of the access pattern features, providing support for the classification and management of access patterns. The graph embedding algorithm and clustering algorithm have strong generalization capabilities and can be applied to different types of tenant data and access patterns, improving the versatility of the solution.

[0080] S102. Based on the isolation strength value of each matrix element in the isolation strategy decision matrix, an isolation strength threshold is set, an initial isolation strategy is generated based on the set isolation strength threshold, and the security index value and performance index value of the initial isolation strategy are calculated according to the system operation data. When the security index value is lower than the preset security threshold or the performance index value is higher than the preset performance threshold, a new isolation strategy is generated according to the preset adjustment rules.

[0081] Among them, security indicators include the number of illegal access attempts, the number of sensitive data leakage incidents, and the proportion of over-authority access. The number of illegal access attempts counts the number of times tenants try to access other tenants' private data within a certain period of time. The lower this indicator is, the stronger the restriction capability of the isolation policy is. The number of sensitive data leakage incidents counts the number of sensitive data leakage incidents within a certain period of time. The lower this indicator is, the stronger the protection capability of the isolation policy is. The proportion of over-authority access counts the proportion of tenants accessing data beyond their authority within a certain period of time. The lower this indicator is, the stricter the control of authority by the isolation policy is.

[0082] Performance indicators include query response time, transaction throughput, and resource utilization. Query response time counts the average response time of tenant query requests. The lower this indicator is, the less impact the isolation strategy has on query performance. Transaction throughput counts the number of transactions processed by the system per unit time. The higher this indicator is, the less impact the isolation strategy has on transaction processing efficiency. Resource utilization counts the utilization of the system's CPU, memory, I / O and other resources. The higher this indicator is, the more the isolation strategy can make full use of system resources.

[0083] In order to obtain the security and performance indicators of the isolation strategy in real time, the system needs to be continuously monitored and data collected. Specifically, monitoring agents are deployed at key nodes of the multi-tenant database system, such as database servers, application servers, etc., to collect the operation data of the nodes. According to the definition of security indicators and performance indicators, determine the monitoring indicators that need to be collected, such as access logs, query response time, CPU utilization, etc. Configure the collection strategy for each monitoring indicator, including collection frequency, data format, storage location, etc. The monitoring agent collects system operation data in real time according to the collection strategy and sends the data to the central monitoring platform. The collected raw data is preprocessed, such as data cleaning, format conversion, indicator calculation, etc., to generate standardized monitoring data.

[0084] After obtaining standardized monitoring data, it is necessary to perform indicator calculation and threshold judgment to determine whether it is necessary to trigger isolation policy adjustment. Specifically, the specific values ​​of security indicators and performance indicators can be generated by performing aggregate calculations on the monitoring data. For example, the number of illegal access attempts within a certain time window can be counted, and the average response time of query requests can be calculated. And set corresponding preset thresholds for each indicator, including the lower threshold of the security indicator and the upper threshold of the performance indicator. The thresholds corresponding to the indicators can be configured according to the security requirements and performance goals of the system.

[0085] In this embodiment, by defining multiple security indicators and performance indicators, the security and performance impact of the isolation strategy can be comprehensively evaluated from different dimensions, providing a comprehensive basis for the optimization and adjustment of the isolation strategy. By deploying a monitoring agent to collect system operation data in real time, and performing online indicator calculation and threshold judgment, the security and performance of the isolation strategy can be monitored in real time, and the adjustment of the isolation strategy can be dynamically triggered according to the judgment results, thereby improving the responsiveness and adaptability of the system. By deploying a monitoring agent at key nodes, the system can be monitored and data collected in a fine-grained manner, and more comprehensive and accurate operation data can be obtained, providing high-quality data support for indicator calculation.

[0086] In an optional embodiment,

[0087] The calculation formula for the isolation strength threshold is as follows:

[0088] ;

[0089] Among them, ISV(a, b) represents the isolation strength value of data object a to user role b, α represents the weight coefficient of data sensitivity, DS(a) represents the sensitivity of data object a, β represents the weight coefficient of access frequency, AF(a, b) represents the access frequency of user role b to data object a, UR(b) represents the risk level of user role b, and γ represents the weight coefficient of user role risk level.

[0090] Among them, data sensitivity adopts a sensitivity assessment method based on data content and metadata, comprehensively considering the confidentiality, integrity and availability of data, and quantitatively scoring the sensitivity of data objects. The value range of data sensitivity is [0, 1]. The larger the value, the higher the sensitivity of the data. The access frequency is calculated by counting the number of times a user has accessed a data object in the past period of time.

[0091] The risk level of the user role is assessed based on the scope of authority, historical behavior, organization, and other factors. The risk level can be divided into multiple levels, such as low, medium, and high, and each is assigned a different value. The risk level ranges from [0 to 1], and the larger the value, the higher the risk of the user role.

[0092] In an optional embodiment,

[0093] The initial isolation strategy generated based on the set isolation strength threshold includes:

[0094] Define three optimization goals: isolation strength, performance overhead, and resource consumption. Model the isolation strategy generation problem as a multi-objective optimization problem. Take the isolation strategy decision matrix as the decision variable, build the objective function based on isolation strength, performance overhead, and resource consumption, and build a multi-objective optimization model with the isolation strength threshold, performance overhead threshold, and resource consumption threshold as constraints.

[0095] An adaptive crossover-mutation operator is introduced to dynamically adjust the crossover probability and mutation probability according to population diversity, solve the multi-objective optimization model, and obtain a set of optimal solutions;

[0096] The optimal solutions are sorted according to the decision maker's preference information to obtain a subset of optimal solutions that meet the preferences. The indicators of each optimization objective of the optimal solution subset are integrated to obtain the comprehensive evaluation value of each solution in the optimal solution subset. The solution with the largest comprehensive evaluation value is selected as the initial isolation strategy.

[0097] For example, first define the security optimization goal, maximize the isolation strength, and improve the reliability of data isolation. Use the isolation strength quantitative index IS (Isolation Strength) to measure. IS comprehensively considers factors such as data isolation granularity and access control granularity. The value range is [0, 1]. The larger the value, the higher the isolation strength.

[0098] Define performance optimization goals, minimize performance overhead, and reduce the impact of the isolation mechanism on system performance. Use the performance overhead quantitative indicator PO (Performance Overhead) to measure. PO comprehensively considers factors such as the time overhead and space overhead introduced by the isolation mechanism. The value range is [0, 1]. The smaller the value, the lower the performance overhead.

[0099] Define resource optimization goals: minimize resource consumption and reduce resource usage of the isolation mechanism. Use the resource consumption quantitative indicator RC (Resource Consumption) to measure. RC comprehensively considers the memory, CPU and other resources occupied by the isolation mechanism. The value range is [0, 1]. The smaller the value, the lower the resource consumption.

[0100] Based on the multiple optimization objectives constructed, a multi-objective optimization model is established to define decision variables, namely the isolation strategy decision matrix, in which each element represents the isolation strength of the tenant group under the access mode. The objective function is to maximize the isolation strength. The isolation strength threshold, performance overhead threshold, and resource consumption threshold are used as constraints.

[0101] The improved NSGA-II algorithm is used to solve multi-objective optimization problems. The adaptive crossover mutation operator is introduced to dynamically adjust the crossover probability and mutation probability according to the population diversity, thereby improving the convergence speed of the algorithm and the quality of the solution. A preference-based sorting strategy is adopted to sort the Pareto optimal solutions in combination with the decision maker's preference information. In the preference-based sorting strategy, the decision maker's preference information can be obtained by setting target weights, introducing reference points, etc. According to the preference information, the Pareto optimal solutions are sorted to obtain a subset of Pareto optimal solutions that meet the preferences. Common preference sorting methods include weighted sum method, weighted vector method, etc. If the number of Pareto optimal solutions is too large, a clustering algorithm can be used to cluster the solution set to obtain representative solution clusters. Clustering algorithms can divide solutions into different clusters according to the similarity between solutions. Common clustering algorithms include K-means algorithm, DBSCAN algorithm, etc.

[0102] When implementing the isolation strategy, define a comprehensive evaluation function, perform weighted evaluation on the Pareto optimal solution's security, performance, resource consumption and other indicators, and obtain a comprehensive evaluation value for each solution. The weight of the evaluation function can be dynamically adjusted according to the actual needs of the system. Common evaluation functions include weighted sum function, weighted product function, etc. Select the solution with the best comprehensive evaluation value as the final isolation strategy. If there are multiple solutions with the same evaluation value, the solution that best suits the current system state and load can be selected according to the preference strategy. Optionally, the reselection of the isolation strategy is triggered periodically to adapt to changes in the system environment and needs. Trigger conditions may include isolation event frequency, system performance fluctuations, etc.

[0103] In an optional embodiment,

[0104] The adaptive crossover and mutation operator is introduced to dynamically adjust the crossover probability and mutation probability according to the population diversity. The solution of the multi-objective optimization model includes:

[0105] The formula for calculating population diversity is as follows:

[0106] ;

[0107] Where D represents the population diversity metric, L represents the gene length, i represents the gene index, and N i represents the number of individuals with a value of 1 at the i-th gene position, and N represents the population size;

[0108] The calculation formula of adaptive crossover probability is as follows:

[0109] ;

[0110] Where P c is the crossover probability, represents the lower bound of the crossover probability, represents the upper bound of the crossover probability, D max is the maximum value of population diversity;

[0111] The calculation formula of adaptive mutation probability is as follows:

[0112] ;

[0113] Among them, P m is the mutation probability, represents the lower bound of the mutation probability, Represents the upper bound of the mutation probability.

[0114] In this embodiment, by modeling the isolation strategy generation problem as a multi-objective optimization problem, the three objectives of isolation strength, performance overhead and resource consumption can be optimized simultaneously, and the balance and trade-off between multiple objectives can be achieved. By constructing the objective function and constraints, the optimization objectives and constraints can be flexibly adjusted according to actual needs, thereby improving the flexibility and scalability of the scheme. By introducing the adaptive crossover mutation operator, the crossover probability and mutation probability are dynamically adjusted according to the population diversity, the convergence speed and solution effect of the algorithm can be improved, and the adaptability of the algorithm is enhanced. By sorting and screening the optimal solution in combination with the decision maker's preference information, a subset of the optimal solution that meets the decision maker's preference can be generated, thereby improving the practicality and acceptability of the solution. By fusing the indicators of each optimization objective of the optimal solution subset, the comprehensive evaluation value of each solution is obtained, and the solution with the largest comprehensive evaluation value is selected as the initial isolation strategy, which can achieve the trade-off and comprehensive consideration between multiple objectives, and at the same time achieve the global optimization, multi-objective trade-off, adaptability and interpretability of the isolation strategy generation, thereby improving the comprehensive performance and practicality of the isolation strategy.

[0115] S103. Isolate the data of different tenants according to the new isolation strategy, obtain the tenants' data access requests at the same time, parse the data access requests to obtain the corresponding tenant attributes and access mode characteristics, determine the current isolation strategy based on the tenant attributes and access mode characteristics, judge the legitimacy of the data access requests according to the current isolation strategy, filter and forward the legitimate data access requests, reject the illegal data access requests, and record the access log.

[0116] Exemplarily, firstly, the data access request of the tenant is obtained from the system. This can be achieved through network requests, API interfaces, etc. The data access request is parsed to extract the tenant attributes and access mode characteristics. The tenant attributes may include information such as tenant name and ID, and the access mode characteristics may include information such as access method, access frequency, and access data volume. Based on the tenant attributes and access mode characteristics, the current isolation strategy is determined according to the predefined isolation strategy rules. The isolation strategy can set different isolation levels, permission restrictions, etc. according to different tenant attributes and access mode characteristics. According to the current isolation strategy, the legitimacy of the data access request is judged. This may include verifying the tenant identity, access rights, access frequency, etc. Legitimate requests can be further processed, and illegal requests can be rejected. Legitimate data access requests are filtered, and according to the requirements of the isolation strategy, the data to be isolated is screened out and forwarded accordingly. Forwarding can be achieved through internal service calls, message queues, etc. Illegal data access requests are rejected and relevant access logs are recorded. Rejection can be achieved by returning error prompts, intercepting requests, etc. Access logs can be used for subsequent auditing, tracking, and security analysis.

[0117] Optionally, access request verification based on a trusted execution environment can be used. Trusted Execution Environment (TEE) is a hardware security mechanism that provides isolation and protection, which can ensure the confidentiality and integrity of key code and data. Specifically, the database agent intercepts data access requests from tenants and extracts tenant identity and access mode information in the request. The agent obtains the access control policy related to the request by calling the query interface of the policy smart contract. The agent passes the request information and policy to the verification module in the TEE to judge the legitimacy of the request in a trusted environment. The verification module returns the judgment result to the agent. For legal requests, the agent filters and forwards; for illegal requests, the agent directly rejects.

[0118] In this embodiment, by executing the key request verification logic in TEE, the verification process can be prevented from being maliciously tampered with or bypassed, thereby improving the credibility of access control. At the same time, the hardware isolation mechanism of TEE also protects the confidentiality of tenant requests and prevents the leakage of sensitive information.

[0119] After the request is verified, it needs to be securely forwarded to the database service for processing. Optionally, a secure forwarding mechanism based on trusted computing and ciphertext computing is adopted. The proxy uses the key in the TEE to encrypt the verified request and generate a ciphertext request. The proxy forwards the ciphertext request to the database service, and the database service cannot directly decrypt the request content. The database service uses the ciphertext computing module in the TEE to process the ciphertext request and perform queries and calculations directly on the ciphertext domain. The ciphertext computing module returns the ciphertext result to the proxy, and the proxy uses the key in the TEE to decrypt the result and return it to the tenant.

[0120] In this embodiment, by transmitting and processing both the request and the result in ciphertext form, sensitive data can be prevented from being leaked during network transmission and storage. At the same time, TEE provides a trusted key management and ciphertext computing environment to ensure the confidentiality and integrity of the data.

[0121] In an optional embodiment,

[0122] Parsing data access requests to obtain corresponding tenant attributes and access mode characteristics include:

[0123] Obtaining request text data in the data access request and preprocessing it, and using a named entity model to identify request information entities in the preprocessed request text data;

[0124] Build a domain knowledge graph, link the identified request information entities with the entities in the domain knowledge graph, establish a mapping relationship between data access requests and the domain knowledge graph, and use the ontology relationships and logical rules in the domain knowledge graph to infer the implicit relationships and attributes in the data access request, and obtain the tenant attributes and access pattern characteristics corresponding to the data access request.

[0125] Exemplarily, first use natural language processing (NLP) technology to perform word segmentation, part-of-speech tagging, named entity recognition, etc. on the request. Remove irrelevant characters, spaces, symbols, etc. in the request to obtain the plain text content. Use word segmentation tools (such as jieba, NLTK) to segment the request text and mark the part of speech of each word (such as noun, verb, adjective, etc.). Use named entity recognition models (such as BiLSTM-CRF, BERT) to identify key entities in the request, such as tenant names, table names, field names, etc. Use semantic role labeling models (such as SRL based on dependency analysis) to label semantic roles in the request, such as operation subjects, operation objects, query conditions, etc.

[0126] Based on the database schema, business rules, security policies and other information, a domain knowledge graph covering concepts such as tenants, data tables, fields, and operations is constructed. Based on the domain data and knowledge, the schema of the knowledge graph is designed. The schema defines the entities, attributes, and relationships in the graph. Determine the entity types, attributes, and relationship types that need to be represented, and define the association rules between them. According to the designed schema, the entities and attributes in the domain data are mapped to the knowledge graph. Create a corresponding node for each entity type and a corresponding attribute value for each attribute. Based on the domain knowledge and data, determine the relationship between entities and establish corresponding edges in the graph. These relationships can be one-to-one, one-to-many, or many-to-many. Relationships can be direct associations or associations through attributes and attribute values. Store the constructed knowledge graph data in a graph database or other graph structure storage methods. The graph database provides efficient graph query and graph traversal functions to facilitate subsequent graph query and reasoning.

[0127] Link the named entities identified in the request with the entities in the knowledge graph to establish a mapping relationship between the request and the graph. Use the ontological relationships (such as "belongs to", "contains") and logical rules in the knowledge graph to infer the implicit relationships and attributes contained in the request. Based on the mapping relationship between the request and the knowledge graph, extract the attributes related to the request from the graph, such as tenant ID, access mode, target data range, etc.

[0128] Optionally, on the basis of extracting request attributes, it is necessary to further identify the intent and type of the request in order to match the corresponding access control policy. For example, the historical access request data is manually annotated, and one or more intent labels (such as "query", "update", "delete", etc.) are assigned to each request. Feature extraction is performed on the preprocessed request text, and word vectors (such as Word2Vec, GloVe), convolutional neural networks (CNN), recurrent neural networks (RNN) and other methods can be used to generate a distributed representation of the request. Build an intent classification model based on deep learning, such as BiLSTM based on the attention mechanism, BERT based on Transformer, etc. Use the annotated data to train the model and learn the mapping relationship between the request text and the intent label. This enables online prediction, that is, for new access requests, use the trained intent classification model to perform online prediction and identify the intent type of the request.

[0129] In this embodiment, by using the named entity recognition model, the request information entity can be accurately identified from the request text, and the semantic understanding and information extraction of the request text can be achieved, laying the foundation for subsequent knowledge linking and logical reasoning. By constructing a domain knowledge graph and linking the identified request information entity with the entity in the knowledge graph, a mapping relationship between data access requests and domain knowledge can be established, and the request information can be associated with structured domain knowledge. Using the ontology relationship and logical rules in the knowledge graph, the implicit relationship and attributes in the data access request can be inferred, which improves the depth and accuracy of the request understanding. By using the mapping relationship and logical reasoning of the knowledge graph, the corresponding tenant attributes and access mode features can be accurately extracted from the data access request. Integrating domain knowledge into the request understanding and feature extraction process in a structured form accurately extracts tenant attributes and access mode features, improves the intelligence level, interpretability and generalization ability of the system, and provides important support for isolation strategy generation and access control.

[0130] Figure 2 FIG. 1 is a schematic diagram of a dynamic data isolation system based on multiple data sources according to an embodiment of the present invention. Figure 2 As shown, the system comprises:

[0131] The first unit is used to obtain tenant attributes from multiple data sources, divide tenants into different tenant groups according to the similarity of tenant attributes, collect tenant data access logs, extract access pattern features, cluster the access pattern features through a clustering algorithm, and construct an isolation strategy decision matrix according to the clustering results of the access pattern features and different tenant groups, wherein the rows of the isolation strategy decision matrix represent tenant groups, and the columns represent the clustering results of the access pattern features;

[0132] The second unit is used to set an isolation strength threshold based on the isolation strength value of each matrix element in the isolation strategy decision matrix, generate an initial isolation strategy based on the set isolation strength threshold, calculate the security index value and performance index value of the initial isolation strategy according to the system operation data, and generate a new isolation strategy according to a preset adjustment rule when the security index value is lower than a preset security threshold or the performance index value is higher than a preset performance threshold;

[0133] The third unit isolates the data of different tenants according to the new isolation strategy, obtains the tenants' data access requests, parses the data access requests to obtain the corresponding tenant attributes and access mode characteristics, determines the current isolation strategy based on the tenant attributes and access mode characteristics, judges the legitimacy of the data access requests according to the current isolation strategy, filters and forwards the legitimate data access requests, rejects the illegal data access requests, and records the access logs.

[0134] According to a third aspect of the embodiments of the present invention,

[0135] An electronic device is provided, comprising:

[0136] processor;

[0137] a memory for storing processor-executable instructions;

[0138] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0139] A fourth aspect of the embodiments of the present invention is:

[0140] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.

[0141] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.

[0142] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A dynamic data isolation method based on multiple data sources, characterized in that: include: Obtain tenant attributes from multiple data sources, divide tenants into different tenant groups according to the similarity of tenant attributes, collect tenant data access logs, extract access pattern features, cluster the access pattern features through a clustering algorithm, and construct an isolation strategy decision matrix based on the clustering results of the access pattern features and different tenant groups, where the rows of the isolation strategy decision matrix represent tenant groups and the columns represent the clustering results of the access pattern features; Based on the isolation strength value of each matrix element in the isolation strategy decision matrix, an isolation strength threshold is set, an initial isolation strategy is generated based on the set isolation strength threshold, and the security index value and performance index value of the initial isolation strategy are calculated according to the system operation data. When the security index value is lower than the preset security threshold or the performance index value is higher than the preset performance threshold, a new isolation strategy is generated according to the preset adjustment rules; Isolate the data of different tenants according to the new isolation strategy, obtain the tenant's data access request at the same time, parse the data access request to obtain the corresponding tenant attributes and access mode characteristics, determine the current isolation strategy based on the tenant attributes and access mode characteristics, judge the legitimacy of the data access request according to the current isolation strategy, filter and forward the legitimate data access request, reject the illegal data access request, and record the access log.

2. The method according to claim 1, characterized in that Collect tenant data access logs, extract access pattern features, and cluster access pattern features using clustering algorithms, including: For the collected tenant data access logs, we use the attention-based long short-term memory network to perform end-to-end feature learning and extract access pattern features. Based on the similarity of access pattern features, a co-occurrence graph is constructed, where nodes represent tenants and edges represent similarities between tenants; Starting from each node, a graph embedding algorithm based on random walk is used to generate a random walk sequence according to the weight of the edge, and the graph embedding model is trained based on the random walk sequence; The trained graph embedding model is used to generate low-dimensional embedding vectors of nodes. Cluster analysis is performed on the generated low-dimensional embedding vectors of nodes to obtain the category structure of access pattern features. The access pattern features are clustered based on the category structure of the access pattern features.

3. The method according to claim 2, characterized in that Training a graph embedding model involves: Construct the objective function of the graph embedding model and train the graph embedding model by maximizing the objective function. The calculation formula of the objective function of the graph embedding model is as follows: ; Among them, J is the objective function of the graph embedding model, v represents the vth node, V represents the node set, ω i represents the i-th element in the random walk sequence, W v represents a random walk sequence, u represents the u-th node, and Φ(·) represents the embedding vector of the node.

4. The method according to claim 1, characterized in that: The calculation formula for the isolation strength threshold is as follows: ; Among them, ISV(a, b) represents the isolation strength value of data object a to user role b, α represents the weight coefficient of data sensitivity, DS(a) represents the sensitivity of data object a, β represents the weight coefficient of access frequency, AF(a, b) represents the access frequency of user role b to data object a, UR(b) represents the risk level of user role b, and γ represents the weight coefficient of user role risk level.

5. The method according to claim 1, characterized in that The initial isolation strategy generated based on the set isolation strength threshold includes: Define three optimization goals: isolation strength, performance overhead, and resource consumption. Model the isolation strategy generation problem as a multi-objective optimization problem. Take the isolation strategy decision matrix as the decision variable, build the objective function based on isolation strength, performance overhead, and resource consumption, and build a multi-objective optimization model with the isolation strength threshold, performance overhead threshold, and resource consumption threshold as constraints. An adaptive crossover-mutation operator is introduced to dynamically adjust the crossover probability and mutation probability according to population diversity, solve the multi-objective optimization model, and obtain a set of optimal solutions; The optimal solutions are sorted according to the decision maker's preference information to obtain a subset of optimal solutions that meet the preferences. The indicators of each optimization objective of the optimal solution subset are integrated to obtain the comprehensive evaluation value of each solution in the optimal solution subset. The solution with the largest comprehensive evaluation value is selected as the initial isolation strategy.

6. The method according to claim 5, characterized in that The adaptive crossover and mutation operator is introduced to dynamically adjust the crossover probability and mutation probability according to the population diversity. The solution of the multi-objective optimization model includes: The formula for calculating population diversity is as follows: ; Where D represents the population diversity metric, L represents the gene length, i represents the gene index, and N i represents the number of individuals with a value of 1 at the i-th gene position, and N represents the population size; The calculation formula of adaptive crossover probability is as follows: ; Where P c is the crossover probability, represents the lower bound of the crossover probability, represents the upper bound of the crossover probability, D max is the maximum value of population diversity; The calculation formula of adaptive mutation probability is as follows: ; Among them, P m is the mutation probability, represents the lower bound of the mutation probability, Represents the upper bound of the mutation probability.

7. The method according to claim 1, characterized in that Parsing data access requests to obtain corresponding tenant attributes and access mode characteristics include: Obtaining request text data in the data access request and preprocessing it, and using a named entity model to identify request information entities in the preprocessed request text data; Build a domain knowledge graph, link the identified request information entities with the entities in the domain knowledge graph, establish a mapping relationship between data access requests and the domain knowledge graph, and use the ontology relationships and logical rules in the domain knowledge graph to infer the implicit relationships and attributes in the data access request, and obtain the tenant attributes and access pattern characteristics corresponding to the data access request.

8. A dynamic data isolation system based on multiple data sources, used to implement the method described in any one of claims 1 to 7, characterized in that: include: The first unit is used to obtain tenant attributes from multiple data sources, divide tenants into different tenant groups according to the similarity of tenant attributes, collect tenant data access logs, extract access pattern features, cluster the access pattern features through a clustering algorithm, and construct an isolation strategy decision matrix according to the clustering results of the access pattern features and different tenant groups, wherein the rows of the isolation strategy decision matrix represent tenant groups, and the columns represent the clustering results of the access pattern features; The second unit is used to set an isolation strength threshold based on the isolation strength value of each matrix element in the isolation strategy decision matrix, generate an initial isolation strategy based on the set isolation strength threshold, calculate the security index value and performance index value of the initial isolation strategy according to the system operation data, and generate a new isolation strategy according to a preset adjustment rule when the security index value is lower than a preset security threshold or the performance index value is higher than a preset performance threshold; The third unit isolates the data of different tenants according to the new isolation strategy, obtains the tenants' data access requests, parses the data access requests to obtain the corresponding tenant attributes and access mode characteristics, determines the current isolation strategy based on the tenant attributes and access mode characteristics, judges the legitimacy of the data access requests according to the current isolation strategy, filters and forwards the legitimate data access requests, rejects the illegal data access requests, and records the access logs.

9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described in any one of claims 1 to 7.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.