A method and system for dynamic data access control in a distributed system

By constructing an access causal graph and generating dynamic contract tokens in a distributed system, the contextual dependence problem of multi-step access paths is solved, and user deviation behavior is dynamically responded to, ensuring the security and integrity of the contract.

CN123122944APending Publication Date: 2026-11-17XIAMEN LIANDENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611369584.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-04
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In existing distributed systems, the risk assessment of multi-step access paths lacks context relevance, and the contract execution phase cannot dynamically detect user deviation behavior and ensure contract integrity.

Method used

By constructing an access causal graph between data objects, candidate access paths are predicted, cumulative risk is calculated based on causal strength and frequency, and dynamic contract tokens are generated for verification. The causal graph is adjusted in real time to respond to deviation behaviors.

Benefits of technology

It implements context-dependent risk assessment for multi-step access paths, dynamically responds to user deviation behaviors, and ensures the security and integrity of contract execution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123122944A_ABST
    Figure CN123122944A_ABST
Patent Text Reader

Abstract

This invention relates to the fields of information security and distributed computing technology, specifically to a dynamic data access control method and system in a distributed system. This application employs counterfactual intervention to correct the static risk scores of each data object on a candidate access path, quantifying the risk amplification effect of preceding nodes on subsequent nodes as a correction amount and adding it to the static risk score to obtain the corrected cumulative risk. When generating a causal contract, the current causal contract content, the current data access causal graph content, and the graph hash value are concatenated and hashed to generate a contract token hash value and construct a contract chain. During contract execution, the integrity of the contract chain is first verified, and then data objects are allowed to pass through according to the permitted sequence. This invention solves the technical problems in existing technologies, such as the lack of contextual relevance in multi-step access path cumulative risk assessment and the inability to dynamically perceive user deviation behavior and ensure contract integrity during contract execution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of information security and distributed computing technology, and more specifically, to a dynamic data access control method and system in a distributed system. Background Technology

[0002] Existing distributed system data access technologies mainly suffer from the following two prominent problems:

[0003] First, there is a lack of contextual relevance, leading to cumulative risk along the path. Existing access control methods based on behavioral paths typically sum the static risk scores of each data object along the path when assessing the risk of candidate access paths. This approach assumes that the risks of each node along the path are independent and do not affect each other. However, this assumption does not hold true in real-world access scenarios. When there are strongly causally dependent pairs of preceding and following nodes along the path, the access behavior of the preceding data object can amplify the risk of subsequent data objects through the causal dependency between the data objects. That is, after the preceding node is accessed, the actual risk level of subsequent nodes is significantly higher than their independent risk level. Second, the contract execution process lacks awareness and response to deviations from access behavior. Existing authorization methods based on contracts or tokens are statically fixed after contract generation, performing a one-time evaluation only when the session is established. They do not continuously verify the consistency between the user's actual access behavior and the contract-allowed sequence during contract execution.

[0004] In summary, the existing technology has the following problems: the risk assessment of multi-step access paths lacks context relevance, and the contract execution phase cannot dynamically detect user deviation behavior and ensure contract integrity. Summary of the Invention

[0005] The purpose of this application is to provide a dynamic data access control method and system in a distributed system, which solves the technical problems in the prior art, such as the lack of context relevance in the risk assessment of multi-step access paths and the inability to dynamically perceive user deviation behavior and ensure contract integrity during the contract execution phase.

[0006] To solve the above-mentioned technical problems, the solution adopted in this application is as follows:

[0007] A dynamic data access control method in a distributed system includes:

[0008] S1. Based on the historical access logs of each data node, determine the causal dependency and causal strength of access behavior between data objects through causal inference, and construct a causal graph of data access between data objects.

[0009] S2. When the user initiates the first access request to the target data object, starting from the target data object, predict the sequence of data objects that may be accessed in the future based on the data access cause-effect graph, and form a set of candidate access paths.

[0010] S3. For each candidate access path, calculate the cumulative risk based on the causal strength and access frequency between data objects on the path, and use counterfactual intervention to correct the cumulative risk. The candidate access path whose corrected cumulative risk does not exceed the preset threshold is taken as a credible causal path.

[0011] S4. Generate an access contract based on a trusted causal path, and generate a contract token corresponding to the access contract. Then, concatenate the content of the current access contract, the content of the current data access causal graph, and the hash value of the data access causal graph in sequence and perform a hash operation to obtain the hash value of the current contract token.

[0012] S5. Within the valid time window, perform integrity verification on the contract chain to which the current contract token belongs. If the verification passes, allow access according to the allowed data object sequence. When the user's actual access deviates from the allowed data object sequence, terminate the current access contract and treat the deviated access as a new first access request, and re-execute steps S2 to S4. If a credible causal path with accumulated risk not exceeding a preset threshold is not obtained after re-execution, then the access is rejected.

[0013] S6. Compare the user's actual access behavior under the access contract with the prediction results, and update the data access causal graph and the causal strength between each data object according to the comparison results; trigger an update when there is a significant deviation, and filter out abnormal samples.

[0014] Preferably, the specific implementation method of S1 includes:

[0015] S11. Obtain the historical access logs of each data node;

[0016] S12. Extract user access behavior records for data objects from historical access logs;

[0017] Access behavior records include user identifier, accessed data object identifier, access timestamp, and operation type;

[0018] S13. Sort the access behavior records of each user according to the access timestamp to obtain the data object access sequence of that user;

[0019] S14. For any two data objects, count the frequency of a user who accesses the first data object subsequently accessing the second data object within a preset behavior time window.

[0020] S15. Calculate the causal strength of the behavior from the first data object to the second data object based on the behavior frequency;

[0021] S16. Treat each data object as a node and use the causal strength of the behavior as the weight of the directed edge to construct a data access causal graph.

[0022] Preferably, the specific implementation method of S2 includes:

[0023] S21. Receive the user's first access request to the target data object, extract the target data object identifier, and locate all directed outgoing edges starting from the target data object in the data access cause-effect graph.

[0024] S22. Set the maximum path depth constraint and maximum branch width constraint for the path expansion process;

[0025] Specifically, the maximum path depth constraint limits the number of data objects contained in a candidate access path; that is, the maximum number of nodes allowed to be extended on the path, excluding the starting node, cannot exceed [a certain limit]. ,in The preset maximum path depth is reached when the current depth of the candidate access path reaches... At that point, further expansion will cease;

[0026] S23. Starting from the target data object, extend the path along directed edges whose causal strength exceeds the preset extension threshold to generate candidate access paths.

[0027] S24. When the depth of a candidate access path reaches the termination condition, terminate the expansion of that path.

[0028] S25. Summarize all candidate access paths obtained when path expansion terminates to form a candidate access path set.

[0029] Preferably, the specific implementation method of S3 includes:

[0030] S31. For each candidate access path, calculate the static risk score of each data object on the candidate access path;

[0031] S32. For each candidate access path, check the adjacent data object pairs sequentially along the path sequence. If there is a directed edge between adjacent data objects pointing from the previous node to the subsequent node in the data access causal graph, and the causal intensity of the behavior corresponding to the directed edge is not lower than the preset expansion threshold, then calculate the risk amplification correction amount of the subsequent node due to the access of the previous node based on the causal intensity of the behavior.

[0032] S33. Superimpose the corresponding risk amplification correction amount onto the static risk score of each data object on the path to obtain the corrected risk score of each data.

[0033] S34. The corrected risk scores of all data objects on the path are summed to obtain the corrected cumulative risk of the candidate access path.

[0034] S35. Compare the corrected cumulative risk with the preset risk threshold, and mark the candidate access path whose corrected cumulative risk does not exceed the preset risk threshold as a trusted causal path.

[0035] Preferably, the specific implementation method of S4 includes:

[0036] S41. Select the credible causal path with the lowest cumulative risk as the target behavior path, and use the sequence of data objects on the target behavior path as the allowed sequence of data objects in the access contract.

[0037] S42. Read the preset valid time window parameters and contract chain identifier, and generate the current access contract based on the allowed data object sequence, valid time window parameters and contract chain identifier;

[0038] S43. Serialize the current data access causal graph and calculate the hash value of the current data access causal graph;

[0039] S44. Concatenate the content of the current access contract, the content of the current data access causal graph, and the hash value of the current data access causal graph in sequence, and perform a hash operation on the concatenated string to obtain the hash value of the current contract token.

[0040] S45. Combine the hash value of the current contract token with the contract chain identifier to generate a contract token corresponding to the current access contract, and add the contract token to the contract chain corresponding to the contract chain identifier.

[0041] Preferably, the specific implementation method of S5 includes:

[0042] S51. Read the start and end times of the valid time window from the current access contract, and determine whether the current time is within the valid time window; if it exceeds the valid time window, reject the current access request.

[0043] S52. Obtain the current contract token and its contract chain identifier. Backtrack from the current contract token forward level by level along the contract chain corresponding to the contract chain identifier. For each previous contract token, recalculate its hash value and compare it with the previous hash value recorded in the subsequent contract token to perform contract chain integrity verification. If the verification fails, terminate the current access contract; otherwise, proceed to step S53.

[0044] S53. Read the sequence of allowed data objects in the current access contract, and determine whether the data object currently requested by the user is located in the sequence of allowed data objects and whether its predecessor nodes have been accessed in order; if so, the access request is approved; otherwise, it is determined to be an access deviation and the current access contract is terminated.

[0045] S54. Take the data object that the access deviated from is the new target data object, and re-execute steps S2-S4 to generate a new access contract; if no credible causal path with accumulated risk not exceeding the preset risk threshold is obtained after re-execution, then the access deviated request is rejected.

[0046] Preferably, the specific implementation method of S6 includes:

[0047] S61. Obtain the actual access behavior sequence of the user during the execution of the access contract, compare the actual access behavior sequence with the trusted causal path determined when generating the access contract in step S4, and calculate the path deviation.

[0048] S62. Determine whether the path deviation exceeds the preset deviation threshold; if it does, mark the access behavior as an abnormal sample.

[0049] S63. For access behaviors that are not marked as abnormal samples, the causal strength of the corresponding directed edges in the data access causal graph is incrementally updated according to the actual access sequence, and the edge weights are adjusted.

[0050] Preferably, the specific implementation method of S43 includes:

[0051] Arrange all bytes in the data access cause-effect graph in lexicographical order according to the node identifier to generate a node sequence string;

[0052] Arrange all directed edges in lexicographical order by starting point identifier, then in lexicographical order by ending point identifier. Record the starting point identifier, ending point identifier, and causal strength of each edge to generate an edge sequence string.

[0053] Concatenate the node sequence string with the edge sequence string to obtain the serialized content of the current data access cause-effect graph;

[0054] The serialized content is hashed using a preset hash function to obtain the hash value of the current data access causal graph.

[0055] Preferably, the specific implementation method for calculating the path deviation in S61 includes:

[0056] Calculate the length of the longest common subsequence between the actual access behavior sequence and the predicted reliable causal path. Path deviation The calculation formula is:

[0057] ;

[0058] in, and These represent the length of the actual access behavior sequence and the predicted reliable causal path, respectively; path deviation. The range of values ​​is .

[0059] A dynamic data access control system in a distributed system, applicable to the aforementioned dynamic data access control method in a distributed system, includes:

[0060] The causal graph construction module is used to determine the causal dependency and causal strength of access behavior between data objects through causal inference based on the historical access logs of each data node, and to construct a data access causal graph with data objects as nodes.

[0061] The path prediction module is used to predict the sequence of data objects that may be accessed subsequently, starting from the target data object, based on the data access cause-effect graph, and form a set of candidate access paths when the user initiates the first access request to the target data object.

[0062] The risk assessment module is used to calculate the cumulative risk for each candidate access path based on the causal strength and access frequency between data objects on the path, and to correct the cumulative risk using counterfactual intervention. Candidate access paths whose corrected cumulative risk does not exceed a preset risk threshold are taken as credible causal paths.

[0063] The contract generation module is used to generate access contracts based on trusted causal paths and generate contract tokens corresponding to the access contracts.

[0064] The contract execution and monitoring module is used to perform integrity verification on the contract chain to which the current contract token belongs within the effective time window. If the verification is successful, the data object sequence is allowed to pass. When the user's actual access deviates from the allowed data object sequence, the current access contract is terminated, and the deviated access is treated as a new first access request, triggering the path prediction module, risk assessment module, and contract generation module again.

[0065] The feedback update module compares the user's actual access behavior under the access contract with the prediction results, updates the data access causal graph and the causal strength between each data object based on the comparison results, triggers an update when a significant deviation occurs, and filters out abnormal samples.

[0066] The technical solution of this application has at least the following advantages and beneficial effects:

[0067] This application uses counterfactual intervention to correct the static risk score of each data object on the candidate access path, quantifies the risk amplification effect of the preceding node on the subsequent node into a correction amount and adds it to the static risk score to obtain the corrected cumulative risk, thereby avoiding the problem of lack of context relevance in the assessment of cumulative risk of multi-step access paths.

[0068] However, addressing risk assessment alone is insufficient to guarantee security during contract execution. Existing contract-based authorization methods are statically fixed after contract generation, failing to dynamically detect deviations between actual user access behavior and the permitted sequence. Therefore, this application, when generating a causal contract, concatenates the current causal contract content, the current data access causal graph content, and the graph hash value, performs a hash operation to generate a contract token hash value, and constructs a contract chain. During contract execution, the contract chain is first verified for integrity, and then access is granted according to the permitted data object sequence. When a user's actual access deviates from the permitted sequence, this deviation is treated as a new initial access request, and path prediction, risk assessment, and contract generation are re-executed. If a credible causal path satisfying the corrected cumulative risk threshold cannot be obtained after reassessment, the access is rejected. Thus, this application simultaneously implements integrity verification and deviation response during contract execution, avoiding the technical problem of failing to dynamically detect user deviations and ensure contract integrity during the contract execution phase. Attached Figure Description

[0069] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0070] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0071] Example 1

[0072] Please refer to Figure 1 , Figure 1 The present invention provides a dynamic data access control method in a distributed system, comprising the following steps: (See flowchart below)

[0073] S1. Based on the historical access logs of each data node, determine the causal dependency and causal strength of access behavior between data objects through causal inference, and construct a causal graph of data access between data objects.

[0074] S2. When the user initiates the first access request to the target data object, starting from the target data object, predict the sequence of data objects that may be accessed in the future based on the data access cause-effect graph, and form a set of candidate access paths.

[0075] S3. For each candidate access path, calculate the cumulative risk based on the causal strength and access frequency between data objects on the path, and use counterfactual intervention to correct the cumulative risk. The candidate access path whose corrected cumulative risk does not exceed the preset threshold is taken as a credible causal path.

[0076] S4. Generate an access contract based on a trusted causal path, and generate a contract token corresponding to the access contract. Then, concatenate the content of the current access contract, the content of the current data access causal graph, and the hash value of the data access causal graph in sequence and perform a hash operation to obtain the hash value of the current contract token.

[0077] S5. Within the valid time window, perform integrity verification on the contract chain to which the current contract token belongs. If the verification passes, allow access according to the allowed data object sequence. When the user's actual access deviates from the allowed data object sequence, terminate the current access contract and treat the deviated access as a new first access request, and re-execute steps S2 to S4. If a credible causal path with accumulated risk not exceeding a preset threshold is not obtained after re-execution, then the access is rejected.

[0078] S6. Compare the user's actual access behavior under the access contract with the prediction results, and update the data access causal graph and the causal strength between each data object according to the comparison results; trigger an update when there is a significant deviation, and filter out abnormal samples.

[0079] In this embodiment, in S1, based on the historical access logs of each data node, the causal dependency and causal strength of access behaviors between data objects are determined through causal inference, and a causal graph of data access between data objects is constructed. The specific implementation method includes the following steps:

[0080] S11. Obtain the historical access logs of each data node;

[0081] S12. Extract user access behavior records for data objects from historical access logs;

[0082] Access behavior records include user identifier, accessed data object identifier, access timestamp, and operation type;

[0083] Specifically, user identifiers are used to distinguish different access initiators; data object identifiers are used to identify the data resources being accessed; operation types include query, read, export, write, and modify.

[0084] S13. Sort the access behavior records of each user according to the access timestamp to obtain the data object access sequence of that user;

[0085] S14. For any two data objects, count the frequency of a user who accesses the first data object subsequently accessing the second data object within a preset behavior time window.

[0086] S15. Calculate the causal strength of the behavior from the first data object to the second data object based on the behavior frequency;

[0087] Specifically, the calculation of behavioral causality strength is based on the temporal order of user access sequences. For any two data objects, let the first data object be denoted as... The second data object is If the same user accesses the first data object The subsequent preset behavior time window The second data object was accessed internally. Then record the first data object once. To the second data object The timing-following behavior;

[0088] Preset behavior time window It can be set according to the business scenario. For example, in this embodiment, it can be set to 5 minutes.

[0089] Count the number of times this time-series follow-up behavior relationship is satisfied among all users, and denote it as . and the first data object Total number of visits .

[0090] Based on this, the first data object is calculated. Point to the second data object causal strength of behavior One feasible calculation method is as follows:

[0091] ;

[0092] in, The value range is [0, 1]. The larger the value, the more likely it is accessing the first data object. Then access the second data object The higher the probability, the better.

[0093] S16. Treat each data object as a node and use the causal strength of the behavior as the weight of the directed edge to construct a data access causal graph.

[0094] When the causal intensity of a behavior exceeds a preset causal threshold, a directed edge is established between the first data object and the second data object, pointing from the first data object to the second data object.

[0095] Specifically, each data object is treated as a graph node, and the causal strength of the behavior between two data objects is considered. Exceeding the preset causal threshold Then, create a path in the graph starting from the first data object. Point to the second data object The directed edges are defined, and the causal strength value of the behavior is used as the edge weight.

[0096] Preset causal threshold It can be set according to the business security level; for example, its value can be between 0.2 and 0.5. Once all directed edges that meet the conditions have been established, a data access causal graph is formed, with data objects as nodes and behavioral causal dependencies as edges.

[0097] In this step, by extracting access sequences from historical access logs and calculating the causal strength of behaviors, a graph structure representation of the access behavior dependencies between data objects is established. Compared to existing technologies that only count simple co-occurrence frequencies or rely on manually predefined dependencies, this step calculates causal strength based on actual access time sequences, which can automatically discover hidden business access dependency paths without requiring deep analysis of data content, thus reducing computational complexity.

[0098] In this embodiment, in S2, when the user initiates the first access request to the target data object, the sequence of data objects that may be accessed subsequently is predicted based on the data access causal graph, starting from the target data object, forming a set of candidate access paths. The specific implementation method includes the following steps:

[0099] S21. Receive the user's first access request to the target data object, extract the target data object identifier, and locate all directed outgoing edges starting from the target data object in the data access cause-effect graph.

[0100] Specifically, the user's initial access request to the target data object carries the target data object identifier. The system uses this identifier to perform graph node matching in the data access causal graph to locate the graph node corresponding to the target data object. In the data access causal graph, if a graph node has no outgoing edges, or if the causal strength of all outgoing edges is below a preset expansion threshold... If the result is negative, it indicates that the target data object does not have a statistically significant tendency to be accessed later based on historical behavior data. In this case, the target data object itself is only considered as a candidate access path of length 1, and the path prediction process ends.

[0101] S22. Set the maximum path depth constraint and maximum branch width constraint for the path expansion process;

[0102] Specifically, the maximum path depth constraint limits the number of data objects contained in a candidate access path; that is, the maximum number of nodes allowed to be extended on the path, excluding the starting node, cannot exceed [a certain limit]. ,in The preset maximum path depth is reached when the current depth of the candidate access path reaches... At that point, further expansion will cease;

[0103] The maximum branch width constraint limits the upper limit of the number of subsequent nodes that can be selected when expanding a candidate access path at each step. When the number of outgoing edges of a node that meet the preset expansion threshold exceeds At that time, the behaviors were sorted from highest to lowest causal strength, and only the top ones were retained. The subsequent nodes are then expanded.

[0104] S23. Starting from the target data object, extend the path along directed edges whose causal strength exceeds the preset extension threshold to generate candidate access paths.

[0105] Each candidate access path consists of the target data object and its subsequent potentially accessed data objects arranged in the predicted access order;

[0106] With target data object As the starting point of the candidate access path, examine the target data object. All outgoing edges and the strength of causality of behavior For the causal strength of the behavior to be satisfied successor node Use it as the target data object Subsequent predicted access nodes generate candidate access paths. ;

[0107] Preset expansion threshold Directed edges used to filter out behaviors with insufficient causal strength can have their values ​​matched by the preset causal threshold in step S1. The invention does not limit the specific settings that can be the same or set individually according to actual scenarios and needs.

[0108] S24. When the depth of a candidate access path reaches the termination condition, terminate the expansion of that path.

[0109] Furthermore, the termination conditions are: the depth of the candidate access path reaches the maximum path depth constraint, or the width of the candidate access path reaches the maximum branch width constraint, or the end node of the candidate access path does not have an outgoing edge that meets the preset expansion threshold condition.

[0110] S25. Summarize all candidate access paths obtained when path expansion terminates to form a candidate access path set.

[0111] Specifically, when all scalable paths stop expanding due to meeting the termination condition, all candidate access paths generated during the expansion process are aggregated to form a candidate access path set. Candidate access path set Each candidate access path in the table represents a possible sequence of subsequent accesses starting from the target data object.

[0112] In this step, by expanding the path according to the causal strength of the behavior from the data access causal graph, a set of candidate subsequent access paths for the user starting from the target data object is obtained. Compared with the existing technology that only makes isolated judgments on the current single access request, this step uses the temporal dependencies in the graph structure established in step S1 to predict the multi-step access sequence that the user may follow. At the same time, by using the triple constraints of preset expansion threshold, maximum path depth, and maximum branch width, the scale of candidate path expansion is controlled, ensuring computational feasibility and real-time performance in a distributed high-concurrency environment.

[0113] In this embodiment, in step S3, for each candidate access path, the cumulative risk is calculated based on the causal strength and access frequency between data objects on the path, and counterfactual intervention is used to correct the cumulative risk. Candidate access paths whose corrected cumulative risk does not exceed a preset threshold are taken as credible causal paths. The specific implementation method includes the following steps:

[0114] S31. For each candidate access path, calculate the static risk score of each data object on the candidate access path;

[0115] Specifically, for the set of candidate access paths any candidate path in ,in For the target data object, calculate each node on the path sequentially. Corresponding static risk score Static risk scoring Based on the inherent sensitivity level of the data object Frequency of historical visits The weighted calculation method is as follows:

[0116] s ;

[0117] Among them, s For data objects The inherent sensitivity level is predetermined by the business classification and security policy of the data object, and its value range is [value range missing]. ; For data objects The normalized access frequency value in the historical access log is the ratio of the number of times the data object was accessed within a preset historical statistical period to the maximum number of times all data objects were accessed.

[0118] ;

[0119] in, For this data object The number of visits within a preset historical statistical period For data access, the set of all nodes in the causal graph; , For the preset weighting coefficients, and This is used to adjust for the relative contributions of inherent sensitivity and access frequency to the static risk score. Static Risk Score The range of values ​​is Furthermore, the larger the value, the higher the security risk caused by accessing the data object.

[0120] S32. For each candidate access path, check the adjacent data object pairs sequentially along the path sequence. If there is a directed edge between adjacent data objects pointing from the previous node to the subsequent node in the data access causal graph, and the causal intensity of the behavior corresponding to the directed edge is not lower than the preset expansion threshold, then calculate the risk amplification correction amount of the subsequent node due to the access of the previous node based on the causal intensity of the behavior.

[0121] Specifically, counterfactual intervention means that if a preceding node on a candidate access path has not been visited, subsequent nodes only bear their own static risk; otherwise, if a preceding node has been visited, that preceding node amplifies the risk of subsequent nodes through behavioral causal dependencies, making the actual risk of subsequent nodes higher than their static risk score. Therefore, for each adjacent node in the candidate access path... , Determine whether there exists a path from the data access cause-effect graph. point to A directed edge exists. If such a directed edge exists, and its causal strength satisfies the following relationship:

[0122] ;

[0123] Then calculate subsequent nodes Due to the preceding node Risk amplification correction due to access The calculation method is as follows:

[0124] ;

[0125] in, This is a preset risk amplification correction coefficient, used to adjust the contribution of the intensity of behavioral causality to risk amplification; This is a static risk score; if there is no directed edge between adjacent node pairs that satisfies the above conditions, then the corresponding risk amplification correction amount... .

[0126] S33. Superimpose the corresponding risk amplification correction amount onto the static risk score of each data object on the path to obtain the corrected risk score of each data.

[0127] Specifically, for the path Each node on In static risk scoring On top of that, add risk amplification correction amount The revised risk score was obtained. :

[0128] ;

[0129] Among them, the path starting point There is no predecessor node, therefore ;

[0130] S34. The corrected risk scores of all data objects on the path are summed to obtain the corrected cumulative risk of the candidate access path.

[0131] Specifically, path Accumulated risk of correction The sum of the corrected risk scores for all nodes on the path is:

[0132] ;

[0133] S35. Compare the corrected cumulative risk with the preset risk threshold, and mark the candidate access path whose corrected cumulative risk does not exceed the preset risk threshold as a trusted causal path.

[0134] Specifically, preset risk thresholds Used to distinguish whether the overall risk level of candidate access paths is acceptable, i.e.: if Then the path Marked as a reliable causal path; if If so, the path will be removed from the candidate range for subsequent contract generation.

[0135] In this step, by introducing a counterfactual intervention mechanism, the risk amplification effect of accessing preceding data objects on subsequent data objects in the candidate access path is identified. This makes the cumulative risk assessment no longer limited to the simple addition of static risks at each node, but more accurately reflects the actual role of behavioral causal dependencies in risk propagation.

[0136] In this embodiment, in step S4, an access contract is generated based on a trusted causal path, and a contract token corresponding to the access contract is generated. The content of the current access contract, the content of the current data access causal graph, and the hash value of the data access causal graph are concatenated sequentially, and a hash operation is performed to obtain the hash value of the current contract token. The specific implementation method includes the following steps:

[0137] S41. Select the credible causal path with the lowest cumulative risk as the target behavior path, and use the sequence of data objects on the target behavior path as the allowed sequence of data objects in the access contract.

[0138] Specifically, the set of credible causal paths constituted by credible causal paths is denoted as... Each of these credible causal paths All meet the requirements for correcting cumulative risk. From a set of credible causal paths The path with the lowest cumulative risk value is selected as the target behavior path. ,Right now:

[0139] ;

[0140] If multiple paths have the same cumulative risk value, the path with the highest causal probability shall be selected as the target behavior path.

[0141] The path causality probability is calculated as follows:

[0142] ;

[0143] in, Target behavior path The sequence of data objects on the access contract is the permitted sequence of data objects, denoted as . .

[0144] S42. Read the preset valid time window parameters and contract chain identifier, and generate the current access contract based on the allowed data object sequence, valid time window parameters and contract chain identifier;

[0145] Specifically, the effective time window parameter is used to limit the effective time period of the access contract, and its specific value can be preset according to the business scenario and path depth.

[0146] One feasible configuration method is as follows:

[0147] At the current contract generation time Starting from the time, The termination time is where The preset contract validity period is set to between 10 and 60 minutes, for example.

[0148] The Contract Chain Identifier (CID) is used to identify the chain structure of a series of contracts generated during the current user's continuous access process. That is, if the current access is the user's first access in this round of business operations, a new Contract Chain Identifier is generated for the user; if the current access is a contract generated after a deviation and re-evaluation, the original Contract Chain Identifier is used to measure the continuity of the contract chain.

[0149] Based on this, a current access contract is generated, which includes at least the following fields: allowed data object sequences. Effective time window start time Effective time window end time Contract Chain Identifier (CID);

[0150] S43. Serialize the current data access causal graph and calculate the hash value of the current data access causal graph;

[0151] Specifically, in order to calculate the hash value of the current contract token, the current data access causal graph needs to be serialized first. The specific serialization process is as follows:

[0152] Arrange all bytes in the data access cause-effect graph in lexicographical order according to the node identifier to generate a node sequence string;

[0153] Arrange all directed edges in lexicographical order by starting point identifier, then in lexicographical order by ending point identifier. Record the starting point identifier, ending point identifier, and causal strength of each edge to generate an edge sequence string.

[0154] Concatenate the node sequence string with the edge sequence string to obtain the serialized content of the current data access cause-effect graph;

[0155] The serialized content is hashed using a preset hash function to obtain the hash value of the current data access causal graph;

[0156] More specifically, the serialized content of the current data access causal graph is denoted as... The default hash function is denoted as The hash value of the current data access causal graph is obtained and denoted as . ;

[0157] ;

[0158] The content of the current access contract, the content of the current data access causal graph, and the hash value of the current data access causal graph are concatenated into a single string, and a hash calculation is performed on it using a preset hash function to obtain the hash value of the current contract token.

[0159] S44. Concatenate the content of the current access contract, the content of the current data access causal graph, and the hash value of the current data access causal graph in sequence, and perform a hash operation on the concatenated string to obtain the hash value of the current contract token.

[0160] Specifically, the content of the current access contract is denoted as The hash value of the current contract token is denoted as ,but:

[0161] ;

[0162] in, This represents a string concatenation operation. The preset hash function is used as an example. SHA-256 can be selected as the preset hash function.

[0163] S45. Combine the hash value of the current contract token with the contract chain identifier to generate a contract token corresponding to the current access contract, and add the contract token to the contract chain corresponding to the contract chain identifier.

[0164] Specifically, the hash value of the current contract token Combined with the contract chain identifier (CID), the contract token corresponding to the currently accessed contract is obtained. The contract token must contain at least two fields: the contract token hash value. And the contract chain identifier CID;

[0165] Add the contract token to the end of the contract chain corresponding to the contract chain identifier CID. The contract chain is a sequence of contract tokens organized in chronological order of their generation.

[0166] In this step, the optimal path is selected from the trusted causal paths as the allowed sequence and an access contract is generated. At the same time, the token hash value is calculated using the current contract content and the current data access causal graph as input and added to the contract chain, providing a tamper-proof trusted basis for integrity verification and deviation detection in the subsequent contract execution stage.

[0167] In this embodiment, in step S5, within the effective time window, the integrity of the contract chain to which the current contract token belongs is verified. If the verification passes, access is allowed according to the permitted data object sequence. When the user's actual access deviates from the permitted data object sequence, the current access contract is terminated, and the deviated access is treated as a new first access request, and steps S2 to S4 are re-executed. If, after re-execution, a credible causal path with accumulated risk not exceeding a preset threshold is not obtained, the access is rejected. The specific implementation method includes the following steps:

[0168] S51. Read the start and end times of the valid time window from the current access contract, and determine whether the current time is within the valid time window; if it exceeds the valid time window, reject the current access request.

[0169] S52. Obtain the current contract token and its contract chain identifier. Backtrack from the current contract token forward level by level along the contract chain corresponding to the contract chain identifier. For each previous contract token, recalculate its hash value and compare it with the previous hash value recorded in the subsequent contract token to perform contract chain integrity verification. If the verification fails, terminate the current access contract; otherwise, proceed to step S53.

[0170] S53. Read the sequence of allowed data objects in the current access contract, and determine whether the data object currently requested by the user is located in the sequence of allowed data objects and whether its predecessor nodes have been accessed in order; if so, the access request is approved; otherwise, it is determined to be an access deviation and the current access contract is terminated.

[0171] S54. Take the data object that the access deviated from is the new target data object, and re-execute steps S2-S4 to generate a new access contract; if no credible causal path with accumulated risk not exceeding the preset risk threshold is obtained after re-execution, then the access deviated request is rejected.

[0172] In this embodiment, in step S6, the user's actual access behavior under the access contract is compared with the prediction result, and the data access causal graph and the causal strength between each data object are updated according to the comparison result; when a significant deviation occurs, an update is triggered, and abnormal samples are filtered out. The specific implementation method includes the following steps:

[0173] S61. Obtain the actual access behavior sequence of the user during the execution of the access contract, compare the actual access behavior sequence with the trusted causal path determined when generating the access contract in step S4, and calculate the path deviation.

[0174] Specifically, during the validity period of the access contract, the data objects actually accessed by the user and their access order are continuously recorded to obtain the actual access behavior sequence, denoted as... :

[0175] ;

[0176] in, To trigger the generation of the first access target data object in the access contract, to For subsequent data objects accessed by the user in sequence during the validity period of the access contract;

[0177] The trusted causal path determined during the generation of the access contract in step S4 is obtained and denoted as... :

[0178] ;

[0179] One feasible method for calculating path deviation is to calculate the length of the longest common subsequence between the actual access behavior sequence and the predicted reliable causal path. Then the path deviation Defined as:

[0180] ;

[0181] in, and These represent the length of the actual access behavior sequence and the predicted reliable causal path, respectively; path deviation. The range of values ​​is The larger the value, the greater the degree of deviation.

[0182] S62. Determine whether the path deviation exceeds the preset deviation threshold; if it does, mark the access behavior as an abnormal sample.

[0183] Specifically, a preset deviation threshold is set. Used to distinguish between normal fluctuations and significant deviations, if path deviation is... satisfy:

[0184] ;

[0185] This indicates that the access behavior has deviated significantly and is marked as an abnormal sample.

[0186] Abnormal samples must be removed from the statistical sample used to calculate the causal strength of behavior.

[0187] As an example, a preset deviation threshold is used. The value can range from 0.5 to 0.7 and can be set according to the business security level. This invention does not limit its specific value.

[0188] S63. For access behaviors that are not marked as abnormal samples, the causal strength of the corresponding directed edges in the data access causal graph is incrementally updated according to the actual access sequence, and the edge weights are adjusted.

[0189] Specifically, for access behaviors where the path deviation does not exceed a preset significant deviation threshold, it indicates that the user's actual access is basically consistent with the predicted path, and this access behavior can truly reflect the behavioral causal dependency between data objects. At this point, based on the actual access sequence... The temporal following relationship of adjacent data object pairs is used to incrementally update the causal strength of the behavior of the corresponding directed edges in the data access causal graph;

[0190] More specifically, for each pair of adjacent nodes in the actual access sequence Increment the timing follow count defined in step S1 by 1, and simultaneously... The total number of visits increases by 1, and the causal strength of the behavior between data objects is recalculated;

[0191] In this step, by comparing the actual access behavior after the access contract is executed with the predicted path, the path deviation is calculated and normal behavior is distinguished from abnormal behavior, thus realizing the closed-loop optimization of the data access causal graph.

[0192] Another aspect of the present invention provides a dynamic data access control system in a distributed system, applicable to the aforementioned dynamic data access control method in a distributed system, comprising:

[0193] The causal graph construction module is used to determine the causal dependency and causal strength of access behavior between data objects through causal inference based on the historical access logs of each data node, and to construct a data access causal graph with data objects as nodes.

[0194] The path prediction module is used to predict the sequence of data objects that may be accessed subsequently, starting from the target data object, based on the data access cause-effect graph, and form a set of candidate access paths when the user initiates the first access request to the target data object.

[0195] The risk assessment module is used to calculate the cumulative risk for each candidate access path based on the causal strength and access frequency between data objects on the path, and to correct the cumulative risk using counterfactual intervention. Candidate access paths whose corrected cumulative risk does not exceed a preset risk threshold are taken as credible causal paths.

[0196] The contract generation module is used to generate access contracts based on trusted causal paths and generate contract tokens corresponding to the access contracts.

[0197] The contract execution and monitoring module is used to perform integrity verification on the contract chain to which the current contract token belongs within the effective time window. If the verification is successful, the data object sequence is allowed to pass. When the user's actual access deviates from the allowed data object sequence, the current access contract is terminated, and the deviated access is treated as a new first access request, triggering the path prediction module, risk assessment module, and contract generation module again.

[0198] The feedback update module compares the user's actual access behavior under the access contract with the prediction results, updates the data access causal graph and the causal strength between each data object based on the comparison results, triggers an update when a significant deviation occurs, and filters out abnormal samples.

[0199] The various embodiments of the present invention have now been described in detail. To avoid obscuring the concept of the invention, some details known in the art have not been described. Those skilled in the art will fully understand how to implement the technical solutions of this invention based on the above description, and the scope of the invention is defined by the appended claims.

Claims

1. A dynamic data access control method in a distributed system, characterized in that, include: S1. Based on the historical access logs of each data node, determine the causal dependency and causal strength of access behavior between data objects through causal inference, and construct a causal graph of data access between data objects. S2. When the user initiates the first access request to the target data object, starting from the target data object, predict the sequence of data objects that may be accessed in the future based on the data access cause-effect graph, and form a set of candidate access paths. S3. For each candidate access path, calculate the cumulative risk based on the causal strength and access frequency between data objects on the path, and use counterfactual intervention to correct the cumulative risk. The candidate access path whose corrected cumulative risk does not exceed the preset threshold is taken as a credible causal path. S4. Generate an access contract based on a trusted causal path, and generate a contract token corresponding to the access contract. Then, concatenate the content of the current access contract, the content of the current data access causal graph, and the hash value of the data access causal graph in sequence and perform a hash operation to obtain the hash value of the current contract token. S5. Within the valid time window, perform integrity verification on the contract chain to which the current contract token belongs. If the verification passes, allow access according to the allowed data object sequence. When the user's actual access deviates from the allowed data object sequence, terminate the current access contract and treat the deviated access as a new first access request, and re-execute steps S2 to S4. If a credible causal path with accumulated risk not exceeding a preset threshold is not obtained after re-execution, then the access is rejected. S6. Compare the user's actual access behavior under the access contract with the prediction results, and update the data access causal graph and the causal strength between each data object according to the comparison results; trigger an update when there is a significant deviation, and filter out abnormal samples.

2. The dynamic data access control method in a distributed system according to claim 1, characterized in that, The specific implementation method of S1 includes: S11. Obtain the historical access logs of each data node; S12. Extract user access behavior records for data objects from historical access logs; Access behavior records include user identifier, accessed data object identifier, access timestamp, and operation type; S13. Sort the access behavior records of each user according to the access timestamp to obtain the data object access sequence of that user; S14. For any two data objects, count the frequency of a user who accesses the first data object subsequently accessing the second data object within a preset behavior time window. S15. Calculate the causal strength of the behavior from the first data object to the second data object based on the behavior frequency; S16. Treat each data object as a node and use the causal strength of the behavior as the weight of the directed edge to construct a data access causal graph.

3. The dynamic data access control method in a distributed system according to claim 2, characterized in that, The specific implementation method of S2 includes: S21. Receive the user's first access request to the target data object, extract the target data object identifier, and locate all directed outgoing edges starting from the target data object in the data access cause-effect graph. S22. Set the maximum path depth constraint and maximum branch width constraint for the path expansion process; Specifically, the maximum path depth constraint limits the number of data objects contained in a candidate access path; that is, the maximum number of nodes allowed to be extended on the path, excluding the starting node, cannot exceed [a certain limit]. ,in The preset maximum path depth is reached when the current depth of the candidate access path reaches... At that point, further expansion will cease; S23. Starting from the target data object, extend the path along directed edges whose causal strength exceeds the preset extension threshold to generate candidate access paths. S24. When the depth of a candidate access path reaches the termination condition, terminate the expansion of that path. S25. Summarize all candidate access paths obtained when path expansion terminates to form a candidate access path set.

4. The dynamic data access control method in a distributed system according to claim 3, characterized in that, The specific implementation method of S3 includes: S31. For each candidate access path, calculate the static risk score of each data object on the candidate access path; S32. For each candidate access path, check the adjacent data object pairs sequentially along the path sequence. If there is a directed edge between adjacent data objects pointing from the previous node to the subsequent node in the data access causal graph, and the causal intensity of the behavior corresponding to the directed edge is not lower than the preset expansion threshold, then calculate the risk amplification correction amount of the subsequent node due to the access of the previous node based on the causal intensity of the behavior. S33. Superimpose the corresponding risk amplification correction amount onto the static risk score of each data object on the path to obtain the corrected risk score of each data. S34. The corrected risk scores of all data objects on the path are summed to obtain the corrected cumulative risk of the candidate access path. S35. Compare the corrected cumulative risk with the preset risk threshold, and mark the candidate access path whose corrected cumulative risk does not exceed the preset risk threshold as a trusted causal path.

5. The dynamic data access control method in a distributed system according to claim 4, characterized in that, The specific implementation method of S4 includes: S41. Select the credible causal path with the lowest cumulative risk as the target behavior path, and use the sequence of data objects on the target behavior path as the allowed sequence of data objects in the access contract. S42. Read the preset valid time window parameters and contract chain identifier, and generate the current access contract based on the allowed data object sequence, valid time window parameters and contract chain identifier; S43. Serialize the current data access causal graph and calculate the hash value of the current data access causal graph; S44. Concatenate the content of the current access contract, the content of the current data access causal graph, and the hash value of the current data access causal graph in sequence, and perform a hash operation on the concatenated string to obtain the hash value of the current contract token. S45. Combine the hash value of the current contract token with the contract chain identifier to generate a contract token corresponding to the current access contract, and add the contract token to the contract chain corresponding to the contract chain identifier.

6. The dynamic data access control method in a distributed system according to claim 5, characterized in that, The specific implementation method of S5 includes: S51. Read the start and end times of the valid time window from the current access contract, and determine whether the current time is within the valid time window; if it exceeds the valid time window, reject the current access request. S52. Obtain the current contract token and its contract chain identifier. Backtrack from the current contract token forward level by level along the contract chain corresponding to the contract chain identifier. For each previous contract token, recalculate its hash value and compare it with the previous hash value recorded in the subsequent contract token to perform contract chain integrity verification. If the verification fails, terminate the current access contract; otherwise, proceed to step S53. S53. Read the sequence of allowed data objects in the current access contract, and determine whether the data object currently requested by the user is located in the sequence of allowed data objects and whether its predecessor nodes have been accessed in order; if so, the access request is approved; otherwise, it is determined to be an access deviation and the current access contract is terminated. S54. Take the data object that the access deviated from is the new target data object, and re-execute steps S2-S4 to generate a new access contract; if no credible causal path with accumulated risk not exceeding the preset risk threshold is obtained after re-execution, then the access deviated request is rejected.

7. A dynamic data access control method in a distributed system according to claim 6, characterized in that, The specific implementation method of S6 includes: S61. Obtain the actual access behavior sequence of the user during the execution of the access contract, compare the actual access behavior sequence with the trusted causal path determined when generating the access contract in step S4, and calculate the path deviation. S62. Determine whether the path deviation exceeds the preset deviation threshold; if it does, mark the access behavior as an abnormal sample. S63. For access behaviors that are not marked as abnormal samples, the causal strength of the corresponding directed edges in the data access causal graph is incrementally updated according to the actual access sequence, and the edge weights are adjusted.

8. A dynamic data access control method in a distributed system according to claim 7, characterized in that, The specific implementation method of S43 includes: Arrange all bytes in the data access cause-effect graph in lexicographical order according to the node identifier to generate a node sequence string; Arrange all directed edges in lexicographical order by starting point identifier, then in lexicographical order by ending point identifier. Record the starting point identifier, ending point identifier, and causal strength of each edge to generate an edge sequence string. Concatenate the node sequence string with the edge sequence string to obtain the serialized content of the current data access cause-effect graph; The serialized content is hashed using a preset hash function to obtain the hash value of the current data access causal graph.

9. A dynamic data access control method in a distributed system according to claim 8, characterized in that, The specific implementation method for calculating path deviation in S61 includes: Calculate the length of the longest common subsequence between the actual access behavior sequence and the predicted reliable causal path. Path deviation The calculation formula is: ; in, and These represent the length of the actual access behavior sequence and the predicted reliable causal path, respectively; path deviation. The range of values ​​is .

10. A dynamic data access control system in a distributed system, applicable to the dynamic data access control method in a distributed system as described in any one of claims 1-10, characterized in that, include: The causal graph construction module is used to determine the causal dependency and causal strength of access behavior between data objects through causal inference based on the historical access logs of each data node, and to construct a data access causal graph with data objects as nodes. The path prediction module is used to predict the sequence of data objects that may be accessed subsequently, starting from the target data object, based on the data access cause-effect graph, and form a set of candidate access paths when the user initiates the first access request to the target data object. The risk assessment module is used to calculate the cumulative risk for each candidate access path based on the causal strength and access frequency between data objects on the path, and to correct the cumulative risk using counterfactual intervention. Candidate access paths whose corrected cumulative risk does not exceed a preset risk threshold are taken as credible causal paths. The contract generation module is used to generate access contracts based on trusted causal paths and generate contract tokens corresponding to the access contracts. The contract execution and monitoring module is used to perform integrity verification on the contract chain to which the current contract token belongs within the effective time window. If the verification is successful, the data object sequence is allowed to pass. When the user's actual access deviates from the allowed data object sequence, the current access contract is terminated, and the deviated access is treated as a new first access request, triggering the path prediction module, risk assessment module, and contract generation module again. The feedback update module compares the user's actual access behavior under the access contract with the prediction results, updates the data access causal graph and the causal strength between each data object based on the comparison results, triggers an update when a significant deviation occurs, and filters out abnormal samples.