Multi-scenario access control dynamic verification method and system based on permission tree

Through a multi-scenario access control method based on the permission tree, the permission tree is reconstructed using the consistent hashing algorithm and adaptive weight decay mechanism, which achieves efficient dynamic permission verification, solves the problems of complex permission management and low computational efficiency in multiple scenarios, and improves the system adaptability and security.

CN120528709BActive Publication Date: 2025-09-30BEIJING BLOCK FAST CHAIN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511020683.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-09-30
Estimated Expiration
2045-07-24

AI Technical Summary

Technical Problem

Existing access control technologies lack scenario awareness capabilities in multi-scenario environments, resulting in complex permission management and low computational efficiency. They are unable to meet the real-time response requirements in high-concurrency scenarios and lack a hierarchical verification mechanism, which affects user experience and system security.

Method used

A multi-scenario access control method based on permission tree is adopted. By receiving resource access requests from user terminals, the user permission tree is obtained and permission nodes are filtered according to scenario identifiers. The permission tree is reconstructed using consistent hashing algorithm group processing and reachability analysis. Dynamic permission verification is achieved by combining adaptive weight decay mechanism and hierarchical verification technology.

Benefits of technology

It improves the flexibility and pertinence of permission management, optimizes the computational efficiency of permission verification, forms a multi-level security protection system, and balances system security and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120528709B_ABST
    Figure CN120528709B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for dynamic verification of multi-scenario access control based on a permission tree, which relates to the field of scenario access technology. The method comprises: after receiving a user resource access request, obtaining a user permission tree; obtaining mapping rules based on a scenario identifier; screening and generating a set of pre-screened permission nodes; grouping and processing using a consistent hashing algorithm; generating a scenario-based permission tree through reachability analysis and merging and reconstruction; performing hierarchical verification of identity validity, scenario legitimacy, and resource access rights on the request; and generating an access control policy. The present invention can dynamically adapt to the permission requirements of different scenarios, improving the accuracy and flexibility of resource access control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to scene access technology, and in particular to a method and system for dynamic verification of multi-scene access control based on a permission tree. Background Art

[0002] In multi-scenario business environments, different users require access to different resources, and access control systems must dynamically determine whether to grant access based on factors such as user identity, context, and resource type. Traditional access control methods typically employ models such as role-based access control (RBAC) or attribute-based access control (ABAC), managing user access rights to resources through pre-defined permission rules.

[0003] In practical applications, as business scenarios continue to increase and change, permission management becomes increasingly complex. Systems must quickly respond to permission requests in different scenarios while ensuring the accuracy and security of permission determinations. The permission tree, as a hierarchical representation of permissions, clearly illustrates the relationship between resources and permissions, facilitating permission management and verification. However, implementing efficient dynamic permission verification based on the permission tree in a multi-scenario environment has become a major challenge facing current access control technology.

[0004] Existing access control technologies have the following deficiencies: First, traditional access control methods lack scenario-awareness capabilities and are unable to dynamically adjust permission policies based on the different scenarios in which users are located, resulting in extensive permission management. This can lead to both security risks caused by excessive authorization of permissions and problems such as insufficient permissions that affect user experience. Secondly, existing permission verification methods are computationally inefficient when dealing with large-scale users and complex permission structures, and are unable to meet the real-time response requirements in high-concurrency scenarios. Performance issues are particularly prominent when permission structures frequently change. Finally, existing technologies typically employ a unified permission verification process, lack a hierarchical verification mechanism, and are unable to adopt differentiated verification strategies based on different types of access requests, which increases the burden on the system and affects the user access experience. Summary of the Invention

[0005] The embodiments of the present invention provide a multi-scenario access control dynamic verification method and system based on a permission tree, which can solve the problems in the prior art.

[0006] A first aspect of an embodiment of the present invention provides a multi-scenario access control dynamic verification method based on a permission tree, comprising:

[0007] Receive a resource access request sent by a user terminal, the resource access request including a user identifier, a scenario identifier, and a target resource identifier; obtain a user permission tree based on the user identifier, the user permission tree including multiple permission nodes; obtain a scenario permission mapping rule from a preset scenario permission mapping library based on the scenario identifier;

[0008] Filtering the permission nodes in the user permission tree according to the scenario permission mapping rule to generate a preliminary screening permission node set; grouping the preliminary screening permission node set using a consistent hashing algorithm to generate multiple permission node subsets; performing reachability analysis on each of the permission node subsets, and merging and reconstructing the permission node subsets based on the results of the reachability analysis to generate a scenario-based permission tree;

[0009] Obtaining corresponding permission verification rules from the scenario-based permission tree according to the target resource identifier; performing hierarchical verification on the resource access request based on the permission verification rules, including: performing identity validity verification on the user identifier, performing scenario legitimacy verification on the scenario identifier, performing resource access permission verification on the target resource identifier, and generating an access control policy based on the results of the hierarchical verification;

[0010] A resource access response result is determined according to the access control policy, and the resource access response result is returned to the user terminal.

[0011] Filtering the permission nodes in the user permission tree according to the scenario permission mapping rule to generate a set of pre-screened permission nodes includes:

[0012] Obtain a set of permission nodes in the user permission tree, where each permission node in the permission node set includes a permission type parameter, a permission attribute parameter, and a node weight parameter, and construct a node feature vector based on the permission type parameter and the permission attribute parameter;

[0013] A scene association matrix is ​​constructed based on the node feature vectors, and an adaptive weight decay mechanism is used to process the association strength in the scene association matrix. The adaptive weight decay mechanism dynamically adjusts the decay coefficient according to the topological distance between nodes, and the decay result of the association strength is accumulated and propagated according to a preset transfer depth to obtain a scene transfer matrix;

[0014] Calculating explicit feature similarity based on the node feature vector, calculating implicit association similarity based on the scene transfer matrix, and dynamically adjusting the weights of the explicit feature similarity and the implicit association similarity according to the historical screening accuracy using the adaptive weight decay mechanism to obtain scene semantic similarity;

[0015] Constructing a scene association constraint according to the scene semantic similarity, fusing the scene association constraint with a preset basic mapping rule to generate a combined mapping rule, and mapping the node feature vector based on the combined mapping rule to obtain a scene context matching degree;

[0016] The adaptive weight decay mechanism is used to dynamically assign weights to the scene context matching degree and the basic matching degree to obtain a final matching degree, and the permission node set is screened based on the final matching degree to generate a pre-screened permission node set.

[0017] Using the adaptive weight decay mechanism to dynamically assign weights to the scene context matching degree and the basic matching degree to obtain a final matching degree includes:

[0018] Constructing a nonlinear attenuation function, the nonlinear attenuation function including an attenuation rate parameter and a nonlinear adjustment factor, dynamically updating the attenuation rate parameter based on a change in matching accuracy in historical matching records, and dynamically updating the nonlinear adjustment factor based on a change in weight variance in historical matching records;

[0019] The updated attenuation rate parameter and the nonlinear adjustment factor are substituted into the nonlinear attenuation function, the weight coefficient of the scene context matching degree and the basic matching degree is calculated, and the scene context matching degree and the basic matching degree are weightedly fused according to the weight coefficient to obtain the final matching degree.

[0020] The consistent hashing algorithm is used to group the initially screened permission node set to generate multiple permission node subsets; a reachability analysis is performed on each of the permission node subsets, and the permission node subsets are merged and reconstructed based on the results of the reachability analysis to generate a scenario-based permission tree, including:

[0021] Constructing a consistent hash mapping space based on the initially screened authority node set, mapping the authority nodes in the initially screened authority node set to the consistent hash mapping space; setting a plurality of virtual nodes in the consistent hash mapping space, each of the virtual nodes corresponding to a preset number of hash slots, allocating the authority nodes to different virtual nodes according to the hash slots, and dividing the authority nodes into a plurality of authority node subsets based on the distribution positions of the virtual nodes;

[0022] Establishing a node reachability graph for each of the permission node subsets, and obtaining a transfer probability based on the node reachability graph by calculating the node path depth and path weight; converting the transfer probability into a reachability strength matrix, and calculating the aggregation degree of the permission node subset based on the reachability strength matrix;

[0023] Based on the aggregation degree, the permission node subsets are merged and determined; when the aggregation degree difference between adjacent permission node subsets is less than a preset aggregation threshold, they are merged into a new permission node subset; the reachable strength matrix and the aggregation degree are recalculated for the merged permission node subset; the recalculated reachable strength matrix and the aggregation degree are organized into a tree hierarchical structure, the parent-child node relationship in the tree hierarchical structure is determined according to the reachable strength between the nodes, and a scenario-based permission tree is generated based on the parent-child node relationship.

[0024] The transfer probability is obtained by calculating the node path depth and path weight based on the node reachability graph; the transfer probability is converted into a reachability strength matrix; and the aggregation degree of the permission node subset is calculated according to the reachability strength matrix, including:

[0025] Dividing the node reachability graph into a plurality of permission levels, each permission level comprising a subset of nodes of a corresponding permission level, and calculating the path depth between pairs of nodes based on the level difference between adjacent nodes in the permission level;

[0026] Constructing a Markov chain state transfer matrix, wherein the transition probability of the Markov chain state transfer matrix is ​​dynamically adjusted by an exponential decay function, wherein the exponential decay function includes a base weight and a depth decay factor, applying the Markov chain state transfer matrix to a set of paths in the node reachability graph, and calculating a state transition sequence for each path based on the set of paths and the Markov chain state transfer matrix;

[0027] Based on the state transition sequence, the intra-layer transmission probability between nodes at the same level and the inter-layer transmission probability between nodes at different levels are calculated respectively; the intra-layer transmission probability and the inter-layer transmission probability are input into the Markov chain state transition matrix to obtain a comprehensive transmission probability, a reachable strength matrix is ​​constructed based on the comprehensive transmission probability, and the aggregation degree of the authority node subset is calculated according to the reachable strength matrix.

[0028] Performing identity validity verification on the user identifier, performing scenario legitimacy verification on the scenario identifier, and performing resource access permission verification on the target resource identifier, and generating an access control policy based on the hierarchical verification results include:

[0029] Constructing a Gaussian mixture probability model, the Gaussian mixture model including multiple Gaussian components; modeling the historical access behavior of the user identifier based on the Gaussian mixture probability model to obtain a user identity validity score;

[0030] Inputting the user identity validity score as a weight adjustment factor into the Gaussian mixture probability model, dynamically adjusting the weight coefficient of the Gaussian component based on the weight adjustment factor, jointly modeling the time features, location features, and network environment features in the scene identifier using the adjusted Gaussian mixture probability model, and obtaining the scene legitimacy score by calculating the joint probability density distribution of the scene identifier;

[0031] The weighted result of the scenario legitimacy score and the user identity validity score is used as a new weight adjustment factor, and the weight coefficient of the Gaussian component is adjusted quadratically based on the new weight adjustment factor. The access control rule of the target resource identifier is modeled using the quadratically adjusted Gaussian mixture probability model, and a resource access permission verification result is generated by calculating the conditional probability density distribution of the target resource identifier.

[0032] An access control policy is determined by combining the resource access permission verification result with the scenario legitimacy score and the user identity validity score.

[0033] Determining a resource access response result according to the access control policy, and returning the resource access response result to the user terminal includes:

[0034] Modeling the access control policy based on a Gaussian mixture probability model, and obtaining an initial response score by calculating the probability density distribution of the access control policy;

[0035] The initial response score is input into the Gaussian mixture probability model as a weight adjustment factor, the weight coefficient of the Gaussian component is dynamically adjusted based on the weight adjustment factor, and the resource access response result is calculated using the adjusted Gaussian mixture probability model; response information is generated based on the resource access response result, and the response information is returned to the user terminal.

[0036] A second aspect of an embodiment of the present invention provides a multi-scenario access control dynamic verification system based on a permission tree, including:

[0037] The first unit is configured to receive a resource access request sent by a user terminal, the resource access request including a user identifier, a scenario identifier, and a target resource identifier; obtain a user permission tree based on the user identifier, the user permission tree including a plurality of permission nodes; and obtain a scenario permission mapping rule from a preset scenario permission mapping library based on the scenario identifier;

[0038] The second unit is configured to filter the permission nodes in the user permission tree according to the scenario permission mapping rule to generate a preliminary screening permission node set; group the preliminary screening permission node set using a consistent hashing algorithm to generate multiple permission node subsets; perform reachability analysis on each of the permission node subsets, and merge and reconstruct the permission node subsets based on the results of the reachability analysis to generate a scenario-based permission tree;

[0039] The third unit is configured to obtain a corresponding permission verification rule from the scenario-based permission tree according to the target resource identifier; perform hierarchical verification on the resource access request based on the permission verification rule, including: performing identity validity verification on the user identifier, performing scenario legitimacy verification on the scenario identifier, performing resource access permission verification on the target resource identifier, and generating an access control policy based on the results of the hierarchical verification;

[0040] The fourth unit is configured to determine a resource access response result according to the access control policy, and return the resource access response result to the user terminal.

[0041] According to a third aspect of an embodiment of the present invention, an electronic device is provided, including:

[0042] processor;

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

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

[0045] According to a fourth aspect of an embodiment of the present invention, 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 method described above is implemented.

[0046] The beneficial effects of this application are as follows:

[0047] The present invention adopts a permission tree structure to organize user permissions, and dynamically filters and reconstructs permission nodes according to different scenarios, making permission management more flexible and targeted, effectively solving the problems of complex, redundant and high maintenance costs of permission management in multiple scenarios, and improving the adaptability and scalability of the system.

[0048] By grouping permission nodes through the consistent hashing algorithm and combining reachability analysis technology to reconstruct the scenario-based permission tree, the calculation process of permission verification is optimized, system resource consumption is reduced, and the processing efficiency of access control is improved, especially showing significant performance advantages in high-concurrency access scenarios.

[0049] The present invention implements a hierarchical verification mechanism, which performs refined verification from three dimensions: user identity, scenario legitimacy, and resource access rights, forming a multi-level security protection system. It not only ensures the rigor and security of access control, but also can flexibly adjust the verification strategy according to the characteristics of different scenarios, effectively balancing system security and user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 This is a flowchart of a dynamic verification method for multi-scenario access control based on a permission tree according to an embodiment of the present invention;

[0051] Figure 2 This is a bar chart comparing screening efficiency based on scenario permission mapping rules according to an embodiment of the present invention;

[0052] Figure 3 Schematic diagram of virtual node distribution and hash slot utilization according to an embodiment of the present invention;

[0053] Figure 4 A flow chart of reachability analysis and Markov state transition based on multi-level permissions according to an embodiment of the present invention;

[0054] Figure 5 This is a comparison chart of the efficiency of hierarchical verification of access control policies according to an embodiment of the present invention. DETAILED DESCRIPTION

[0055] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying 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 making creative efforts shall fall within the scope of protection of the present invention.

[0056] The technical solution of the present invention is described in detail below with reference to specific embodiments. 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.

[0057] Figure 1 This is a flow chart of a multi-scenario access control dynamic verification method based on a permission tree according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0058] Receive a resource access request sent by a user terminal, the resource access request including a user identifier, a scenario identifier, and a target resource identifier; obtain a user permission tree based on the user identifier, the user permission tree including multiple permission nodes; obtain a scenario permission mapping rule from a preset scenario permission mapping library based on the scenario identifier;

[0059] Filtering the permission nodes in the user permission tree according to the scenario permission mapping rule to generate a preliminary screening permission node set; grouping the preliminary screening permission node set using a consistent hashing algorithm to generate multiple permission node subsets; performing reachability analysis on each of the permission node subsets, and merging and reconstructing the permission node subsets based on the results of the reachability analysis to generate a scenario-based permission tree;

[0060] Obtaining corresponding permission verification rules from the scenario-based permission tree according to the target resource identifier; performing hierarchical verification on the resource access request based on the permission verification rules, including: performing identity validity verification on the user identifier, performing scenario legitimacy verification on the scenario identifier, performing resource access permission verification on the target resource identifier, and generating an access control policy based on the results of the hierarchical verification;

[0061] A resource access response result is determined according to the access control policy, and the resource access response result is returned to the user terminal.

[0062] In an optional implementation, screening the permission nodes in the user permission tree according to the scenario permission mapping rule to generate a pre-screened permission node set includes:

[0063] Obtain a set of permission nodes in the user permission tree, where each permission node in the permission node set includes a permission type parameter, a permission attribute parameter, and a node weight parameter, and construct a node feature vector based on the permission type parameter and the permission attribute parameter;

[0064] A scene association matrix is ​​constructed based on the node feature vectors, and an adaptive weight decay mechanism is used to process the association strength in the scene association matrix. The adaptive weight decay mechanism dynamically adjusts the decay coefficient according to the topological distance between nodes, and the decay result of the association strength is accumulated and propagated according to a preset transfer depth to obtain a scene transfer matrix;

[0065] Calculating explicit feature similarity based on the node feature vector, calculating implicit association similarity based on the scene transfer matrix, and dynamically adjusting the weights of the explicit feature similarity and the implicit association similarity according to the historical screening accuracy using the adaptive weight decay mechanism to obtain scene semantic similarity;

[0066] Constructing a scene association constraint according to the scene semantic similarity, fusing the scene association constraint with a preset basic mapping rule to generate a combined mapping rule, and mapping the node feature vector based on the combined mapping rule to obtain a scene context matching degree;

[0067] The adaptive weight decay mechanism is used to dynamically assign weights to the scene context matching degree and the basic matching degree to obtain a final matching degree, and the permission node set is screened based on the final matching degree to generate a pre-screened permission node set.

[0068] The starting point of the screening process is to obtain the set of permission nodes in the user permission tree. The user permission tree is usually stored in a tree structure, and each permission node contains permission type parameters, permission attribute parameters, and node weight parameters. The permission type parameter describes the basic category of permission, such as "read", "write", "execute", etc.; the permission attribute parameters describe the specific characteristics of the permission, such as "sensitivity level", "scope of application", "timeliness", etc.; the node weight parameter indicates the importance of the permission in the overall permission system, and usually has a value range of 0 to 1. For example, a user permission tree contains a "View User List" node, whose permission type is "read", and the permission attributes include a sensitivity level of "low", a scope of application of "user management", and a timeliness of "long-term", with a node weight of 0.7.

[0069] A node feature vector is constructed based on the permission type and permission attribute parameters. The construction process begins by encoding the parameters, converting categorical parameters into numeric representations. Permission type parameters are typically one-hot encoded, for example, "read" is encoded as [1, 0, 0], "write" is encoded as [0, 1, 0], and "execute" is encoded as [0, 0, 1]. Permission attribute parameters can be scalar encoded or range-mapped, for example, "low," "medium," and "high" sensitivity levels are mapped to 0.2, 0.5, and 0.8, respectively. After encoding, the encoding results of each parameter are concatenated to form the node feature vector. The dimension of a node's feature vector ranges from 15 to 30, depending on the permission type and permission attribute. For example, the feature vector for the "View User List" node described above can be represented as [1, 0, 0, 0.2, 0.6, 0.9, ...], where the first three digits indicate the permission type is "read," and the subsequent digits correspond to the encoded values ​​of each permission attribute.

[0070] The scenario association matrix is ​​constructed based on the node feature vectors. The scenario association matrix is ​​an n×n square matrix, where n is the number of permission nodes and the matrix elements represent the strength of association between nodes. The association strength calculation is based on the similarity of the node feature vectors, and the cosine similarity or the inverse of the Euclidean distance can be used. For example, cosine similarity calculates the dot product of two feature vectors divided by the product of their norms. The result ranges from -1 to 1, and the closer to 1, the more similar it is. The association strength of two completely unrelated permission nodes is close to 0, and the association strength of two highly correlated nodes is close to 1. For a scenario containing 100 permission nodes, the dimension of the constructed scenario association matrix is ​​100×100, and each element in the matrix corresponds to the strength of association between a pair of nodes.

[0071] An adaptive weight decay mechanism is used to process the association strength in the scenario association matrix. This mechanism dynamically adjusts the decay coefficient based on the topological distance between nodes. Topological distance refers to the shortest path length between two nodes in the permission tree. The greater the distance, the more significant the decay. The decay coefficient is calculated using an exponential decay method, with the base decay rate dynamically adjusted based on historical data, typically with an initial value of 0.7 to 0.8. For example, when the base decay rate is 0.75, the association strength of a node pair with a topological distance of 1 decays to 75% of its original value, and for a node pair with a topological distance of 2, it decays to 56% of its original value (0.75 squared). For scenarios with high permission sensitivity, the base decay rate can be increased to 0.85 to accelerate the decay of association strength. For scenarios with coarser permission granularity, the base decay rate can be reduced to 0.65 to slow the decay of association strength.

[0072] The decaying results of the association strength are cumulatively propagated according to a preset propagation depth to produce a scene transfer matrix. Cumulative propagation considers indirect associations between nodes. The propagation depth represents the maximum number of indirect association hops considered and is typically set between 2 and 4. The propagation process is implemented through matrix multiplication, with each multiplication corresponding to one propagation. The final result is the weighted sum of the propagation results at each layer. A descending weighting scheme can be used, such as a propagation weight of 0.5 for a depth of 1, 0.3 for a depth of 2, and 0.2 for a depth of 3. The scene transfer matrix is ​​also an n×n square matrix, but compared to the original association matrix, it better reflects the global associations between nodes. In practical applications, if the propagation depth is set to 3, indirect associations of up to three hops between two nodes are considered, and associations beyond three hops are ignored.

[0073] Explicit feature similarity is calculated based on the node feature vector. Explicit feature similarity directly compares the degree of match between the node feature vector and the scenario feature vector. It can be calculated using cosine similarity or weighted Euclidean distance. The scenario feature vector is extracted from the scenario identifier and represents the characteristic requirements of the current scenario. For example, the feature vector for the "Mobile Office" scenario emphasizes portability and security, while the feature vector for the "Data Analysis" scenario emphasizes data access permissions. For a scenario containing 100 permission nodes, 100 explicit feature similarity values ​​are calculated, each representing the degree of explicit match between the corresponding node and the current scenario. Higher explicit feature similarity values ​​indicate a stronger direct correlation between the node and the scenario.

[0074] The implicit association similarity is calculated based on the scene transfer matrix. The implicit association similarity takes into account the association relationship between nodes and discovers nodes indirectly related to the scene through association transfer. The calculation method is to multiply the scene core node set by the scene transfer matrix to obtain the implicit association score of each node. The scene core node set is a small number of nodes that are highly relevant to the scene (usually 5% to 10% of the total number of nodes), which can be determined through domain knowledge or selected based on explicit feature similarity ranking. For a scene containing 100 authority nodes, the 10 nodes with the highest explicit feature similarity are selected as core nodes, and 100 implicit association similarity values ​​are calculated. The higher the implicit association similarity value, the stronger the indirect correlation between the node and the scene through the association network.

[0075] An adaptive weight decay mechanism is used to dynamically adjust the weights of explicit feature similarity and implicit association similarity based on historical screening accuracy to obtain scene semantic similarity. Weight adjustment is based on the accuracy trend in historical screening data, increasing the influence of the current weight configuration as accuracy increases and decreasing it as accuracy decreases. Initial weights are typically set to 0.6 for explicit feature similarity and 0.4 for implicit association similarity. Scene semantic similarity is the weighted sum of explicit feature similarity and implicit association similarity, ranging from 0 to 1. Values ​​closer to 1 indicate a higher overall relevance between the node and the scene. For example, if a node has an explicit feature similarity of 0.75 and an implicit association similarity of 0.65, and the current weights are 0.6 and 0.4, the scene semantic similarity is 0.75 × 0.6 + 0.65 × 0.4 = 0.71.

[0076] Scenario association constraints are constructed based on scenario semantic similarity. Scenario association constraints define mutually exclusive or dependent relationships between nodes, ensuring consistent filtering results. Constraint types include mutual exclusion constraints (two nodes cannot be selected simultaneously), dependency constraints (selecting node A requires selecting node B), and combination constraints (a specified number of nodes in a set must be selected). Constraint generation is based on the distribution characteristics of scenario semantic similarity. For example, nodes with significant differences in similarity constitute mutual exclusion constraints, while nodes with similarity and complementary functions constitute combination constraints. In practice, for the "Financial Management" scenario, the constraint "View Financial Statements" is dependent on "Basic Financial Permissions," ensuring that users with viewing permissions must also possess basic permissions.

[0077] Combined mapping rules are generated by fusing scenario-related constraints with pre-set basic mapping rules. Basic mapping rules are general, scenario-independent rules, such as sensitivity level matching rules and user role matching rules. The fusion process assigns weights to scenario-related constraints, typically 40% to 60%, with the basic mapping rules accounting for the remaining weight. Combined mapping rules can be formally represented as a conditional decision tree or rule set, with each rule consisting of a conditional part and a result part. In the "mobile office" scenario, the combined rules include specific rules such as "If the node sensitivity level is greater than 0.7 and the user role is 'normal user', reduce the matching degree by 50%."

[0078] Node feature vectors are mapped based on combined mapping rules to obtain the scenario context match. The mapping process involves inputting the feature vector of the permission node into the combined mapping rules, evaluating and adjusting them according to the rule conditions, and outputting the scenario context match. For example, a node feature vector indicates a sensitivity level of 0.8, with an applicability range of "document management," the current scenario being "mobile office," and the user role being "normal user." After applying the relevant rules, the original scenario semantic similarity of 0.71 is adjusted to a scenario context match of 0.355. The scenario context match reflects the actual applicability of the node in the current scenario and user context, and its value range is between 0 and 1.

[0079] An adaptive weight decay mechanism is used to dynamically assign weights to the scene context match and the basic match to obtain the final match. The basic match is a basic applicability metric calculated based on the user's inherent permissions and does not consider contextual factors. Dynamic weight assignment adjusts the weight distribution based on historical matching accuracy, increasing the current weight configuration when the matching performance is good and decreasing it when the performance is poor. Weight assignment uses a soft adjustment strategy, typically limiting changes to no more than 5% to 10% at a time. The final match is calculated as the weighted sum of the scene context match and the basic match, with the result ranging from 0 to 1. For example, if a node's scene context match is 0.355, its basic match is 0.82, and its current weights are 0.65 and 0.35, the final match is 0.355 × 0.65 + 0.82 × 0.35 = 0.518.

[0080] Based on the final matching degree, the permission node set is screened to generate a preliminary screening permission node set. The screening adopts the threshold method or the proportion method. The threshold method selects nodes whose matching degree exceeds the specified threshold (such as 0.5), and the proportion method selects nodes with a matching degree ranking in the top specified proportion (such as 30%). The screening also needs to consider the constraints to ensure that the results meet all scenario-related constraints. Under the premise of meeting the constraints, nodes with high matching degrees are given priority. After the screening is completed, the selected nodes constitute the preliminary screening permission node set, which serves as the basis for subsequent permission processing. In actual applications, if the original permission node set contains 100 nodes and the final matching degree threshold is set to 0.5, the preliminary screening results contain 30 to 40 permission nodes that are highly relevant to the current scenario.

[0081] Figure 2 This is a bar chart comparing the screening efficiency of scenario-based permission mapping rules in an embodiment of the present invention. This study compared the effectiveness of three screening strategies (traditional static screening, representing a fixed screening mechanism based on preset rules; single mapping screening, representing a linear screening method based on correspondences; and adaptive weighted screening, representing an intelligent screening algorithm based on dynamic weight adjustment) in different business scenarios. The data shows that in the mobile office scenario, the efficiency of traditional static screening was 50.6%, which increased to 60.0% with single mapping screening, and the optimal efficiency of 73.2% with adaptive weighted screening. In the financial management scenario, the screening efficiencies of the three strategies were 42.5%, 63.2%, and 78.7%, respectively, with adaptive weighted screening performing the best, achieving a 36.2 percentage point improvement over traditional methods. In the data analysis scenario, the efficiencies of the three strategies were 51.3%, 60.8%, and 77.4%, respectively. The data demonstrates that the adaptive weighted screening strategy demonstrated significant advantages across all application scenarios, with an average screening efficiency improvement of over 20 percentage points. Its advantages were particularly pronounced in scenarios such as financial management, where accuracy is paramount. This result fully confirms that the adaptive screening strategy based on dynamic weight adjustment has stronger scenario adaptability and higher screening accuracy, and provides strong data support for the selection of screening strategies in different business scenarios.

[0082] In an optional embodiment, using the adaptive weight decay mechanism to dynamically assign weights to the scene context matching degree and the basic matching degree to obtain a final matching degree includes:

[0083] Constructing a nonlinear attenuation function, the nonlinear attenuation function including an attenuation rate parameter and a nonlinear adjustment factor, dynamically updating the attenuation rate parameter based on a change in matching accuracy in historical matching records, and dynamically updating the nonlinear adjustment factor based on a change in weight variance in historical matching records;

[0084] The updated attenuation rate parameter and the nonlinear adjustment factor are substituted into the nonlinear attenuation function, the weight coefficient of the scene context matching degree and the basic matching degree is calculated, and the scene context matching degree and the basic matching degree are weightedly fused according to the weight coefficient to obtain the final matching degree.

[0085] When constructing a nonlinear decay function, the function form and initial parameters must be determined. The nonlinear decay function employs a composite form combining exponential decay and power-law decay, with two key parameters: the decay rate parameter α and the nonlinear adjustment factor β. The decay rate parameter α controls how quickly the weight changes over time or under certain conditions, typically ranging from 0.01 to 0.5. The nonlinear adjustment factor β controls the shape of the decay curve, typically ranging from 0.5 to 2.0. Larger α values ​​indicate faster weight decay, while larger β values ​​indicate a more nonlinear decay curve. The function's initial parameters can be determined through historical data analysis. Typically, initial settings of α and β are 0.1 and 1.0, indicating a moderate decay rate and linear decay characteristics.

[0086] The nonlinear attenuation function is expressed in exponential form, with the input variable being the attenuation factor and the output being the corresponding weight value, ranging from approximately 0 to 1. When the input is 0, the output is 1, indicating the maximum weight; as the input increases, the output gradually decreases, approaching 0. For example, when α is 0.1, β is 1.0, and the input is 5, the calculated output is approximately 0.61, indicating that the weight has decayed to 61% of its original value; when the input is 10, the output is approximately 0.37, indicating that the weight has decayed to 37% of its original value.

[0087] The decay rate parameter α is dynamically updated based on historical matching records. Historical matching records contain multiple matching result data, each of which includes the scene context match degree, basic match degree, assigned weight, and the final matching accuracy. Matching accuracy can be obtained through user feedback or post-verification and indicates the accuracy of the matching result. The most recent 100 data points are extracted from the historical records, and the average change in matching accuracy, ΔAcc, is calculated. If ΔAcc is positive, the matching accuracy is increasing and the current decay rate is appropriate or can be appropriately reduced. If ΔAcc is negative, the matching accuracy is decreasing and the decay rate needs to be increased to adjust the weight distribution more quickly.

[0088] The update rule for the decay rate parameter α is to add the original parameter value to the product of the learning rate and the negative value of the change in accuracy. The learning rate is typically between 0.05 and 0.2. When the change in accuracy is negative and large in absolute value, the α value is increased significantly, accelerating weight adjustment. When the change in accuracy is positive and large in value, the α value is decreased, slowing down weight adjustment. For example, if the original α value is 0.1, the accuracy drops by 5%, and the learning rate is 0.1, the calculated new α value is approximately 0.105, and the decay rate increases slightly. When the accuracy increases by 8%, the calculated new α value is approximately 0.092, and the decay rate decreases slightly.

[0089] The nonlinear adjustment factor β is dynamically updated based on historical matching records. The most recent 100 data points are extracted from the historical records, and the change in weight variance, ΔVar, is calculated. Weight variance indicates the degree of dispersion between the scene context matching weight and the basic matching weight. A larger variance indicates a greater difference in weight between the two. If ΔVar is positive, it indicates that the weight distribution is becoming increasingly extreme, and the β value should be reduced to make the decay curve smoother. If ΔVar is negative, it indicates that the weight distribution is becoming more even, and the β value can be increased to make the decay curve steeper, thereby improving discrimination.

[0090] The update rule for the nonlinear adjustment factor β is to add the original parameter value to the product of the adjustment step size and the negative value of the variance change. The adjustment step size is typically between 0.05 and 0.15. When the variance change is positive and large, the β value decreases significantly, making the decay curve smoother. When the variance change is negative and large, the β value increases significantly, making the decay curve steeper. For example, when the original β value is 1.0, the variance increases by 0.03, and the adjustment step size is 0.1, the calculated new β value is approximately 0.997, indicating a slight decrease in the degree of nonlinearity. When the variance decreases by 0.05, the calculated new β value is approximately 1.005, indicating a slight increase in the degree of nonlinearity.

[0091] After the parameter update is complete, the updated decay rate parameter and nonlinear adjustment factor are substituted into the nonlinear decay function to calculate the weight coefficients for the scene context match and the basic match. The weight calculation takes into account the differences in the characteristics of the two match degrees. The scene context match focuses on relevance in the current scene and is suitable for features with short-term rapid changes. The basic match focuses on the similarity of essential attributes and is suitable for features with long-term stability.

[0092] When calculating the weight coefficient, the first step is to determine the reference values ​​for the scene context match and the basic match. The scene context reference value is usually related to the speed of scene change, with smaller values ​​(such as 2-3) for fast-changing scenes and larger values ​​(such as 8-10) for slow-changing scenes. The basic match reference value is usually related to the stability of the underlying features, with smaller values ​​(such as 1-2) for high stability and larger values ​​(such as 4-5) for low stability. For example, in a fast-changing mobile scene, the scene context reference value can be set to 2.5 and the basic match reference value to 1.5.

[0093] Substitute the baseline value into the updated nonlinear attenuation function to obtain the corresponding weight coefficient. For example, when the updated attenuation rate parameter is 0.105, the nonlinear adjustment factor is 0.997, the scene context baseline value is 2.5, and the basic matching baseline value is 1.5, the calculated scene context weight is approximately 0.77, and the basic matching weight is approximately 0.85. This means that the scene context matching degree has a weight of 0.77, and the basic matching degree has a weight of 0.85.

[0094] Normalize the weight coefficients to ensure that the sum of the weights is 1. Normalization is done by dividing the individual weights by the total weight. In the above example, the normalized weight coefficients are 0.48 for the scene context weight and 0.52 for the basic matching weight.

[0095] The scene context matching degree and the basic matching degree are weighted and fused according to the normalized weight coefficients to obtain the final matching degree. Weighted fusion uses a linear combination method, multiplying each matching degree by the corresponding normalized weight and then summing the results. For example, when the scene context matching degree is 0.72, the basic matching degree is 0.65, the normalized scene context weight is 0.48, and the basic matching weight is 0.52, the calculated final matching degree is approximately 0.68.

[0096] In actual applications, the frequency of parameter updates can be adjusted based on the characteristics of different scenarios. Scenarios with high rates of change (such as real-time recommendations) can use a higher update frequency, such as updating parameters every 10-50 matching operations; scenarios with low rates of change (such as fixed asset matching) can use a lower update frequency, such as updating parameters every 500-1000 matching operations. Fluctuation limits can also be set during parameter updates to prevent system instability caused by excessive single updates. For example, the single update amplitude of the attenuation rate parameter and the nonlinear adjustment factor can be limited to no more than ±10% of the original value.

[0097] The adaptive weight decay mechanism demonstrates good performance in a variety of matching scenarios. In e-commerce product recommendation scenarios, the mechanism can dynamically adjust the weights of short-term interests (scene context matching) and long-term preferences (basic matching) based on user behavior characteristics, improving recommendation accuracy by 12% to 18% compared to fixed-weight methods. In security personnel identification scenarios, the mechanism can balance the weights of current clothing features (scene context matching) and biometric features (basic matching), improving recognition accuracy by 8% to 15% under varying lighting conditions. In document similarity detection scenarios, the mechanism can dynamically adjust the weights of topic relevance (scene context matching) and semantic structure similarity (basic matching), improving matching accuracy by 10% to 20%.

[0098] The advantage of this adaptive weight decay mechanism is that it automatically adjusts parameters based on the quality of matching results, adapting to different scenarios and changes in data distribution without manual intervention, enabling continuous optimization and performance improvement of the matching algorithm. By dynamically adjusting the weight distribution strategy, the system can better adapt to changing scenarios and user needs, improving overall matching accuracy and user satisfaction.

[0099] In an optional embodiment, a consistent hashing algorithm is used to group the initially screened permission node set to generate multiple permission node subsets; a reachability analysis is performed on each of the permission node subsets, and the permission node subsets are merged and reconstructed based on the results of the reachability analysis to generate a scenario-based permission tree, including:

[0100] Constructing a consistent hash mapping space based on the initially screened authority node set, mapping the authority nodes in the initially screened authority node set to the consistent hash mapping space; setting a plurality of virtual nodes in the consistent hash mapping space, each of the virtual nodes corresponding to a preset number of hash slots, allocating the authority nodes to different virtual nodes according to the hash slots, and dividing the authority nodes into a plurality of authority node subsets based on the distribution positions of the virtual nodes;

[0101] Establishing a node reachability graph for each of the permission node subsets, and obtaining a transfer probability based on the node reachability graph by calculating the node path depth and path weight; converting the transfer probability into a reachability strength matrix, and calculating the aggregation degree of the permission node subset based on the reachability strength matrix;

[0102] Based on the aggregation degree, the permission node subsets are merged and determined; when the aggregation degree difference between adjacent permission node subsets is less than a preset aggregation threshold, they are merged into a new permission node subset; the reachable strength matrix and the aggregation degree are recalculated for the merged permission node subset; the recalculated reachable strength matrix and the aggregation degree are organized into a tree hierarchical structure, the parent-child node relationship in the tree hierarchical structure is determined according to the reachable strength between the nodes, and a scenario-based permission tree is generated based on the parent-child node relationship.

[0103] When building a consistent hash mapping space, first determine the range of the hash space, usually using a 32-bit integer space in the range [0,2 32 -1], treating this range as a ring structure. Select an appropriate hash function to hash each permission node in the initial set of permission nodes. Common hash functions include MD5 and SHA-1. The first 32 bits of the hash value are used as the node's position coordinates on the ring. For example, the permission node "View User Information" is hashed using MD5 to obtain the hash value "a3d7e496," which, when converted to decimal, is 2749386902, which is the node's position on the hash ring.

[0104] To improve distribution uniformity, multiple virtual nodes are set up on the hash ring. The number of virtual nodes is dynamically adjusted based on the total number of permission nodes, generally 10-20 times the number of permission nodes. For example, if the initial screening permission node set contains 50 permission nodes, 500-1000 virtual nodes can be set. Each virtual node is assigned a sequence number by appending it to the original permission node identifier and then performing a hash calculation to determine its position. The first virtual node for the permission node "View User Information" can be represented as "View User Information #1" and mapped to a new position on the hash ring after hash calculation.

[0105] Each virtual node is assigned a preset number of hash slots, which are determined by the size of the permission node set and the desired subset size. Larger permission node sets can have more hash slots to improve allocation accuracy. For example, with 800 virtual nodes, each virtual node can be assigned 32 hash slots, for a total of 25,600 hash slots. Permission nodes are assigned to specific virtual nodes based on the hash slots into which their hash values ​​fall.

[0106] Based on the distribution of virtual nodes, permission nodes are divided into multiple permission node subsets. This division method is to evenly divide the hash ring into K regions. The value of K is determined based on the total number of permission nodes and the desired subset size, usually the square root of the total number of nodes. For example, 50 permission nodes can be divided into 7 subsets. Virtual nodes and their corresponding permission nodes that fall within the same region constitute a permission node subset. In a real-world case, the initial screening permission node set included 50 permission nodes, such as "View User Information," "Edit User Profile," and "Delete User Account." After processing using the consistent hashing algorithm, 7 permission node subsets were formed, each containing 5-10 permission nodes.

[0107] A node reachability graph is constructed for each subset of permission nodes, reflecting the access relationships between nodes. The node reachability graph is a directed graph in which vertices represent permission nodes and edges represent the reachability relationships between permission nodes. Edges are constructed based on the attributes and relationships of permission nodes. For example, there is a reachability relationship from "Edit User Profile" to "View User Information," but there is no reachability relationship from "View Logs" to "Modify System Configuration." The node reachability graph is represented by an adjacency matrix, where a matrix element value of 1 indicates direct reachability and a value of 0 indicates unreachability.

[0108] The transfer probability is calculated based on the node reachability graph, and the transfer probability represents the strength of indirect reachability between two nodes. When calculating the transfer probability, two factors, node path depth and path weight, are considered. Path depth represents the length of the shortest path between two nodes, and path weight represents the importance of each edge on the path. The transfer probability decreases with increasing path depth and increases with increasing path weight. For directly connected nodes, the transfer probability can be directly set to a high value (such as 0.9); for indirectly connected nodes, the transfer probability can be set to the product of the transfer probabilities of all edges along the path multiplied by an attenuation factor. The attenuation factor is usually set to 0.7 d , where d is the path depth.

[0109] The transfer probability is converted into a reachability strength matrix. The reachability strength matrix is ​​an n×n matrix, where n is the number of nodes in the permission node subset and the matrix element a is ij Represents the reachability strength from node i to node j. Reachability strength takes into account both direct and indirect reachability relationships, calculated as the maximum value of direct reachability and the transfer probability of each indirect path. In a real-world example, the reachability strength from the permission node "Edit User Profile" to "View User Information" is 0.9, indicating a strong association; whereas the reachability strength from "View Logs" to "User Authorization" is only 0.2, indicating a weaker association.

[0110] The degree of aggregation of the permission node subset is calculated based on the reachability strength matrix. The degree of aggregation reflects the closeness of the connections between nodes in the subset and is calculated as the average of the reachability strengths of all nodes in the subset. The value of the degree of aggregation ranges from [0, 1], with larger values ​​indicating closer connections between nodes in the subset. For example, a permission node subset containing related nodes such as "View User Information," "Edit User Profile," and "Change User Password" has a calculated degree of aggregation of 0.82, indicating that the nodes in this subset are closely connected. However, another subset containing nodes with very different functions such as "System Backup," "View Logs," and "User Authorization" has a degree of aggregation of only 0.35.

[0111] The authority node subsets are merged based on the aggregation degree. When the aggregation degree difference of adjacent authority node subsets is less than the preset aggregation threshold, they are merged into a new authority node subset. The setting of the aggregation threshold is related to the permission granularity control requirements, and the value is usually between 0.2-0.3. If the threshold is set too large, it will lead to excessive merging and the authority division will be too coarse; if the threshold is set too small, it will lead to insufficient merging and the authority division will be too detailed. During the merging process, the aggregation degree difference of each pair of adjacent subsets is first calculated, and the merging starts from the pair with the smallest difference. After the merging, the reachable strength matrix and aggregation degree of the new subset are recalculated, and then the merging possibility is continued to be evaluated until there are no adjacent subset pairs that meet the merging conditions.

[0112] Recalculate the reachability strength matrix and aggregation degree for the merged permission node subsets. The recalculation takes into account the cross-subset reachability relationships between atomic sets, and the updated reachability strength matrix is ​​expanded to include the total number of nodes in the merged subsets. For example, after subsets A and B are merged, the new subset contains all nodes from both atomic sets. The reachability strength from nodes in subset A to nodes in subset B, as well as the reachability strength from nodes in subset B to nodes in subset A, must be calculated to update the reachability strength matrix. Based on the updated reachability strength matrix, recalculate the aggregation degree of the merged subsets.

[0113] The recalculated reachability strength matrix and aggregation degree are organized into a tree-like hierarchical structure. The construction of the tree-like hierarchical structure is based on the reachability strength between nodes, and pairs of nodes with high reachability strength form a parent-child relationship. The construction process starts with selecting the root node, which is usually the node with the highest out-degree or the highest total reachability strength. For example, in the user rights management scenario, the "User Management" node has the highest out-degree and can be used as the root node. Starting from the root node, the direct child nodes are determined according to the reachability strength matrix. Nodes with a reachability strength greater than a certain threshold (such as 0.7) are set as direct child nodes. For multiple parent nodes, the one with the highest reachability strength is selected as the actual parent node.

[0114] Parent-child node relationships within a tree hierarchy are determined based on the reachability between nodes. This determination takes into account the semantic relevance of nodes and the inclusion of operations. For example, a "User Management" node might contain child nodes such as "View User List," "Add User," and "Delete User," while a "System Configuration" node might contain child nodes such as "Basic Settings," "Security Settings," and "Log Settings." When determining parent-child relationships, avoid circular dependencies to ensure a directed acyclic graph (DAG) is the final structure.

[0115] Generate a scenario-based permission tree based on the parent-child node relationship. The scenario-based permission tree is a multi-level tree structure. Each node represents a permission operation, and the parent-child relationship between nodes represents the inclusion or inheritance relationship of permissions. The root node of the permission tree usually represents the top-level permission corresponding to the scenario identifier, such as "financial management" and "personnel management". The generated scenario-based permission tree will be used in the subsequent permission verification process to provide structured permission representation and fast permission query capabilities. The final generated scenario-based permission tree can be expressed in JSON or XML format for easy storage and transmission. In a certain financial management scenario, the generated permission tree contains major permission nodes such as "financial report viewing", "financial data entry", and "reimbursement approval". Each node contains multiple child permission nodes, forming a complete permission hierarchy system.

[0116] Figure 3 This is a schematic diagram of the virtual node distribution and hash slot utilization of an embodiment of the present invention. This study explores the stability performance of four different hash distribution algorithms (fixed hashing method represents the traditional distribution strategy based on fixed partitions, dynamic hashing method represents the dynamically adjustable adaptive distribution strategy, consistent hashing represents the balanced distribution strategy based on hash rings, and this technical solution represents the intelligent distribution algorithm based on weight adaptation) during the dynamic expansion of the system node scale. Experimental data shows that as the number of virtual nodes gradually increases from 5 to 50, this technical solution exhibits the best stability, with its performance index slowly decreasing from 0.88 to 0.80, a total drop of only 0.08, and maintaining a high stability of 0.86 at the critical node 20. The consistent hashing algorithm performs second, with an initial stability of 0.78, which eventually decreases to 0.66, and still maintains an acceptable level of 0.70 at the number of nodes 35. The dynamic hashing method starts at 0.72, eventually decreases to 0.55, and reaches 0.67 at the intermediate node 20. The fixed hashing method performs the worst, with a sharp drop from an initial 0.65 to 0.43, and has dropped to a low level of 0.51 at the number of nodes 35. The data shows that this technical solution, through its intelligent weight adjustment mechanism, can effectively maintain high stability during system expansion. In particular, in large-scale node scenarios (35-50 nodes), it can still maintain a stability of more than 0.80, significantly outperforming the other three algorithms, providing an effective solution for load balancing optimization in large-scale distributed systems.

[0117] In an optional embodiment, obtaining a transfer probability by calculating the node path depth and path weight based on the node reachability graph; converting the transfer probability into a reachability strength matrix; and calculating the aggregation degree of the permission node subset according to the reachability strength matrix includes:

[0118] Dividing the node reachability graph into a plurality of permission levels, each permission level comprising a subset of nodes of a corresponding permission level, and calculating the path depth between pairs of nodes based on the level difference between adjacent nodes in the permission level;

[0119] Constructing a Markov chain state transfer matrix, wherein the transition probability of the Markov chain state transfer matrix is ​​dynamically adjusted by an exponential decay function, wherein the exponential decay function includes a base weight and a depth decay factor, applying the Markov chain state transfer matrix to a set of paths in the node reachability graph, and calculating a state transition sequence for each path based on the set of paths and the Markov chain state transfer matrix;

[0120] Based on the state transition sequence, the intra-layer transmission probability between nodes at the same level and the inter-layer transmission probability between nodes at different levels are calculated respectively; the intra-layer transmission probability and the inter-layer transmission probability are input into the Markov chain state transition matrix to obtain a comprehensive transmission probability, a reachable strength matrix is ​​constructed based on the comprehensive transmission probability, and the aggregation degree of the authority node subset is calculated according to the reachable strength matrix.

[0121] like Figure 4 As shown, the method includes:

[0122] The node reachability graph is divided into multiple permission levels, each of which contains a subset of nodes with the same permission level. For example, in an enterprise permission system, nodes can be divided into an administrator level, a department head level, an ordinary employee level, and so on. The path depth between two nodes is determined by calculating the difference between their permission levels. Specifically, if node A is at level 3 and node B is at level 5, the path depth between them is |3-5|=2.

[0123] When constructing the Markov chain state transition matrix, an exponential decay function is used to dynamically adjust the transition probability. The exponential decay function includes two key parameters: the base weight and the depth decay factor. The base weight represents the baseline value of the initial transition probability, and the depth decay factor controls the rate at which the probability decays as the path depth increases. For example, if the base weight is set to 0.8 and the depth decay factor is set to 0.5, then for a node pair with a path depth of 1, the transition probability is 0.8×(0.5). 1 =0.4; for a node pair with a path depth of 2, the transition probability is 0.8×(0.5) 2 =0.2.

[0124] Apply the constructed Markov chain state transition matrix to the set of paths in the node reachability graph. Suppose there is a reachability graph containing five nodes: N1, N2, N3, N4, and N5. N1 and N2 belong to level 1, N3 and N4 belong to level 2, and N5 belongs to level 3. There are paths N1--N2--N3--N5 and N1--N4--N5. Based on the aforementioned transition matrix, the state transition sequence for each path can be calculated. For the path N1--N2--N3--N5, its state transition sequence is [0.8, 0.4, 0.2], indicating that the transition probability from N1 to N2 is 0.8 (same level), the transition probability from N2 to N3 is 0.4 (level difference is 1), and the transition probability from N3 to N5 is 0.2 (level difference is 1).

[0125] The intra-layer transfer probability between nodes at the same level and the inter-layer transfer probability between nodes at different levels are calculated separately. The calculation of the intra-layer transfer probability primarily considers the reachability between nodes within the same permission level. For example, nodes N1 and N2 belong to level 1 and are directly connected, with an intra-layer transfer probability of 0.8. The inter-layer transfer probability considers the reachability of nodes at different permission levels. For example, nodes N2 and N3 belong to level 1 and N3 belong to level 2, with a level difference of 1. The inter-layer transfer probability is 0.4.

[0126] The intra-layer and inter-layer transmission probabilities are input into the Markov chain state transition matrix to obtain the comprehensive transmission probability. For each pair of nodes, the comprehensive transmission probability takes into account the cumulative effect of all paths. For example, the comprehensive transmission probability from N1 to N5 requires considering two paths: N1--N2--N3--N5 and N1--N4--N5. The transmission probability of the first path is 0.8 × 0.4 × 0.2 = 0.064, and the transmission probability of the second path is 0.4 × 0.2 = 0.08. Taking all these into account, the comprehensive transmission probability from N1 to N5 is 0.064 + 0.08 = 0.144.

[0127] Based on the calculated comprehensive transfer probability, a reachability strength matrix is ​​constructed. This matrix is ​​an n×n square matrix, where n is the total number of nodes. Each element aij in the matrix represents the reachability strength from node i to node j. Continuing with the above example, some elements of the reachability strength matrix A are as follows: A[1,1] = 1 (self-reachability), A[1,2] = 0.8, A[1,5] = 0.144, and so on.

[0128] The degree of aggregation of the permission node subset is calculated based on the reachability matrix. The degree of aggregation reflects the tightness of the internal connection of a specific permission node subset and the degree of isolation from external nodes. The calculation method is to sum the reachability strengths between the nodes within the subset and divide it by the sum of the reachability strengths between the subset and all nodes (including internal and external). For example, to calculate the degree of aggregation of level 1 (including nodes N1 and N2), first calculate the sum of the internal reachability strengths: A[1,1]+A[1,2]+A[2,1]+A[2,2]=1+0.8+0.8+1=3.6; then calculate the sum of the reachability strengths between the subset and all nodes, assuming it is 5.2; the final degree of aggregation is 3.6 / 5.2≈0.692.

[0129] This method can be further extended to analyze more complex permission structures. For example, in a system with 100 nodes and 5 permission levels, by adjusting the base weight and the depth decay factor, the permission propagation characteristics between different levels can be precisely controlled. Practice has shown that when the base weight is set to 0.9 and the depth decay factor is set to 0.6, it can better reflect the actual permission transfer characteristics in most enterprise-level permission systems. By calculating the aggregation degree of different permission node subsets, potential risk areas in the permission structure can be identified, such as over-centralized or over-decentralized permission allocation, thus providing a quantitative basis for permission optimization.

[0130] In an optional embodiment, performing identity validation on the user identifier, performing scenario legitimacy validation on the scenario identifier, and performing resource access permission validation on the target resource identifier, and generating an access control policy based on the hierarchical validation results includes:

[0131] Constructing a Gaussian mixture probability model, the Gaussian mixture model including multiple Gaussian components; modeling the historical access behavior of the user identifier based on the Gaussian mixture probability model to obtain a user identity validity score;

[0132] Inputting the user identity validity score as a weight adjustment factor into the Gaussian mixture probability model, dynamically adjusting the weight coefficient of the Gaussian component based on the weight adjustment factor, jointly modeling the time features, location features, and network environment features in the scene identifier using the adjusted Gaussian mixture probability model, and obtaining the scene legitimacy score by calculating the joint probability density distribution of the scene identifier;

[0133] The weighted result of the scenario legitimacy score and the user identity validity score is used as a new weight adjustment factor, and the weight coefficient of the Gaussian component is adjusted quadratically based on the new weight adjustment factor. The access control rule of the target resource identifier is modeled using the quadratically adjusted Gaussian mixture probability model, and a resource access permission verification result is generated by calculating the conditional probability density distribution of the target resource identifier.

[0134] An access control policy is determined by combining the resource access permission verification result with the scenario legitimacy score and the user identity validity score.

[0135] The hierarchical verification process based on a Gaussian mixture probability model first requires building an appropriate Gaussian mixture probability model. This model requires collecting historical user access behavior data, including key information such as login time, login frequency, operation sequence, and session duration. For example, user A's access history for the past 90 days at a financial institution shows that he primarily accessed the system between 9:00 AM and 6:00 PM on weekdays, with 95% of access coming from fixed IP address segments and device fingerprints.

[0136] After collecting this data, we convert the raw data into feature vectors. For time features, we extract information such as the hour, day of the week, and whether it's a weekday. We convert IP addresses into normalized geographic coordinates, and create a device fingerprint feature vector for device information. All features are normalized to ensure values ​​fall between 0 and 1 for ease of subsequent calculations.

[0137] Determining the number of Gaussian components is a key step in model construction. Using the Bayesian Information Criterion, we calculate the BIC values ​​corresponding to different numbers of components (e.g., 2, 3, 4, and 5). The value K that minimizes the BIC is then chosen as the optimal number of components. For user A, our calculations show that his behavior is best modeled using three Gaussian components, corresponding to normal weekday working hours, weekday overtime, and occasional weekend visits.

[0138] Initialize the model parameters using the K-means clustering results as initial values. Specifically, perform K-means clustering on the feature data, use the cluster centers as the initial means of the Gaussian components, the covariance of the samples within the clusters as the initial covariance matrix, and the proportion of samples in each cluster as the initial weights. For user A, the initial weights for the three components are 0.72, 0.23, and 0.05, respectively, reflecting the frequency distribution of different access patterns.

[0139] Parameter optimization is performed iteratively using the expectation-maximization algorithm. Each iteration consists of an E-step and an M-step: the E-step calculates the posterior probability that each data point belongs to each Gaussian component; the M-step updates the weights, means, and covariances of each Gaussian component based on the posterior probabilities. The log-likelihood function is then calculated to check convergence. Iterations terminate when the change in the log-likelihood function value is less than a preset threshold (e.g., 0.000001) or when the maximum number of iterations (e.g., 100) is reached.

[0140] For user A's data, the EM algorithm converged after 47 iterations. The weights of the three Gaussian components were ultimately adjusted to 0.68, 0.26, and 0.06. The mean and covariance matrices were also optimized accordingly, more accurately capturing the user's behavior patterns. After model training, a hold-out cross-validation method was used, dividing the historical data into a training set (80%) and a validation set (20%). This ensured that the model's performance on the validation set was similar to that on the training set, avoiding overfitting.

[0141] When verifying user identity validity, a feature vector is extracted from the current access request, containing features of the same dimensions as those used when building the model. For example, if user A accesses the company network at 10:30 AM on a weekday, using their usual device, this information is converted into a feature vector and input into the model. This feature vector is then input into the trained Gaussian mixture model to calculate its log-likelihood. The calculation involves substituting the feature vector into the probability density function of the multivariate normal distribution for each Gaussian component, multiplying by the corresponding weight, summing the results, and taking the logarithm. For this visit by user A, the calculated log-likelihood is -5.2.

[0142] The log-likelihood value needs to be converted into an identity validity score, which is achieved through the sigmoid function, mapping the log-likelihood value to the range of 0 to 1. The conversion formula is S id =1 / (1+exp(-0.5·(-5.2-(-12)))), where -12 is the reference point determined based on the log-likelihood distribution of historical data, and 0.5 controls the steepness of the curve. Calculate the identity validity score S for user A. id =0.92. The identity validity threshold is set to 0.65. Since 0.92 is greater than 0.65, user A's identity is considered valid. If the score is lower than the threshold, it will be marked as suspicious, triggering stricter control measures.

[0143] The scenario legitimacy verification phase first extracts scenario features, including time, location, and network environment characteristics. User A's visit occurred on a weekday morning, from the company's registered address, and using the company's private network. This information is extracted as a scenario feature vector. Next, the Gaussian component weights are adjusted based on the user's identity validity score by multiplying the original weights by an adjustment factor. For user A, due to their high identity validity score (0.92), the weight of the normal weekday pattern increases from 0.68 to 0.73, while the weight of the abnormal pattern decreases accordingly.

[0144] The joint probability density of the scene feature vector is calculated using the adjusted Gaussian mixture model. The calculation process is to substitute the scene feature vector into the multivariate normal distribution function of each Gaussian component, multiply it by the adjusted weight, and then sum it. For user A's scene, the calculated probability density value is 0.0058. This probability density is converted into a scene legitimacy score through MinMax normalization. Assuming that the minimum value of the historical scene probability density is 0.0001 and the maximum value is 0.01, the scene legitimacy score of user A is S scene =(0.0058-0.0001) / (0.01-0.0001)=0.58. We also calculated the contribution of each scenario feature to the legitimacy score and found that time contributed 65%, location contributed 25%, and network environment contributed 10%. We set the scenario legitimacy threshold to 0.5. Since 0.58 is greater than 0.5, the scenario is considered legal.

[0145] Before resource access permission verification begins, the user identity validity score and the scenario legitimacy score need to be combined. The combination formula is S combined =0.6·0.92+0.4·0.58=0.786, where 0.6 is the weight coefficient, indicating that identity verification accounts for 60% of the overall evaluation. Based on the combined score, the Gaussian component weights are adjusted a second time by multiplying the previously adjusted weights by the new adjustment factor. For user A, the weight of the normal weekday pattern is further increased to 0.76, while the weight of the abnormal pattern is further reduced.

[0146] Resource features are extracted from the target resource identifier. For example, user A requests access to a customer analysis report with a sensitivity of 0.7, and the operation type is "read." Based on a quadratically adjusted Gaussian mixture model, the conditional probability p(resource features | user features, scenario features) is calculated. This calculation involves comparing the user's historical access patterns for this type of resource with the current user and scenario features. User A, a customer relationship manager, has a history of frequently accessing such reports, primarily from the office during work hours. The calculated conditional probability is 0.82.

[0147] The access right score is calculated as the product of the conditional probability and the combined score, i.e. S resource =0.82·0.786=0.644. The resource access permission threshold is dynamically determined based on resource sensitivity. For a resource with a sensitivity of 0.7, the threshold is set to 0.63. Because 0.644 is greater than 0.63, user A is allowed to access the customer analysis report. If the score is below the threshold, the access request is denied or the user is required to provide additional verification.

[0148] In the process of generating the final access control policy, a three-dimensional policy matrix is ​​first constructed. The dimensions correspond to the score intervals of the three dimensions of user identity validity, scenario legitimacy, and resource access rights. Each dimension is divided into five intervals: high (0.8-1.0), medium-high (0.6-0.8), medium (0.4-0.6), medium-low (0.2-0.4), and low (0-0.2), forming a 5×5×5 policy matrix. The three scores of user A are S id =0.92(high), S scene =0.58(medium), S resource =0.644 (medium-high), corresponding to the [high, medium, medium-high] cell in the strategy matrix.

[0149] The predefined policy for this cell mapping is "limited authorization," which specifically allows read operations, but masks certain sensitive fields (such as customer contact information and financial data), and the system records detailed access logs. The system generates a policy response, including specific instructions such as setting the operation permission bit, data masking rules, and logging requirements. At the same time, based on the scores of the three dimensions and the contribution of their key characteristics, a policy explanation is generated: "Because your access occurred at an unconventional work location (contribution 25%), the system has masked some sensitive information." Finally, the generated access control policy is executed, allowing User A to access the masked customer analysis report and recording key parameters of the decision-making process for subsequent audits.

[0150] The advantage of this approach is that it can dynamically adjust security policies based on multi-dimensional information, rather than adopting static binary decisions. For example, when a user logs in for the first time from a new device, even if the username and password are correct (high identity validity), because the device is unfamiliar (medium scenario legitimacy), the system requires additional verification rather than direct rejection, improving security while maintaining usability. In actual deployments, model parameters are regularly updated to adapt to changes in user behavior patterns. For example, if a user's work location changes, the model will gradually incorporate the new location into the normal mode after several successful verifications, thereby improving the legitimacy score in that scenario.

[0151] Figure 5This is a comparison chart of the efficiency of hierarchical verification access control strategies in various test scenarios. This study conducted an in-depth analysis of the effectiveness of three security verification mechanisms (user identity verification, representing a multi-factor authentication scheme based on user personal information; scenario validity verification, representing a dynamic verification mechanism based on scenario characteristics; and resource access rights verification, representing an access control strategy based on hierarchical authorization) under different test scenarios. The data shows that in standard scenarios, all three verification mechanisms demonstrated high effectiveness, with resource access rights verification achieving the highest effectiveness at 90.0%, user identity verification at 85.0%, and scenario validity verification at 74.0%. However, in abnormal time scenarios, the effectiveness of each mechanism generally declined, with user identity verification maintaining a relatively high 80.0%, resource access rights verification dropping to 70.0%, and scenario validity verification dropping to 60.0%. In unconventional network environments, the effectiveness of all three mechanisms declined significantly, with user identity verification maintaining a relative advantage at 75.0%, while scenario validity verification dropped to 50.0% and resource access rights verification to 56.0%. Research shows that the user identity verification mechanism maintains relatively stable and efficient performance in various scenarios, while the performance of the other two mechanisms in special scenarios is relatively weak. This provides important data support and reference basis for the construction and optimization of a multi-level security protection system.

[0152] In an optional implementation, determining a resource access response result according to the access control policy, and returning the resource access response result to the user terminal includes:

[0153] Modeling the access control policy based on a Gaussian mixture probability model, and obtaining an initial response score by calculating the probability density distribution of the access control policy;

[0154] The initial response score is input into the Gaussian mixture probability model as a weight adjustment factor, the weight coefficient of the Gaussian component is dynamically adjusted based on the weight adjustment factor, and the resource access response result is calculated using the adjusted Gaussian mixture probability model; response information is generated based on the resource access response result, and the response information is returned to the user terminal.

[0155] Receive the resource access request sent by the user terminal, then model the access control policy based on the Gaussian mixture probability model, obtain the initial response score by calculating the probability density distribution of the access control policy, and input the initial response score as the weight adjustment factor into the Gaussian mixture probability model, dynamically adjust the weight coefficient of the Gaussian component, and finally generate and return the resource access response result.

[0156] After receiving a resource access request from a user terminal, the system extracts information such as the user ID, resource ID, and operation type from the request. For example, if user A requests access to edit document B, the system extracts the user ID "A," the resource ID "Document B," and the operation type "Edit."

[0157] Based on the extracted information, the predefined access control policy library is queried to obtain the access control policy relevant to the current access request. Access control policies contain various rules, such as those based on user roles, resource types, and time. For example, an access control policy might stipulate that "administrators can edit all documents," "normal users can only edit documents they created," or "documents in review state cannot be edited at all."

[0158] Access control policies are modeled using a Gaussian mixture probability model. This model consists of multiple Gaussian components, each corresponding to an access control rule or rule combination. Each Gaussian component consists of a mean, a covariance, and a weight coefficient, where the weight coefficient indicates the importance of the Gaussian component in the entire model.

[0159] During the initialization phase, initial parameter values ​​are assigned to each Gaussian component based on historical access data or expert knowledge. For example, for the Gaussian component corresponding to "user role-based access control rules," the mean is set to 0.8, the covariance is set to 0.1, and the weight coefficient is set to 0.5; for the Gaussian component corresponding to "resource type-based access control rules," the mean is set to 0.6, the covariance is set to 0.15, and the weight coefficient is set to 0.3; and for the Gaussian component corresponding to "time-based access control rules," the mean is set to 0.4, the covariance is set to 0.2, and the weight coefficient is set to 0.2.

[0160] Calculate the probability density value of each Gaussian component based on the feature vector of the current access request. The feature vector contains multiple dimensions, including user attributes, resource attributes, and context attributes. For example, user A's features include "Role = General User", "Dept = R&D", and "Security Level = 3"; document B's features include "Type = Technical Document", "Creator = User A", and "Status = Under Review"; and context features include "Time = Working Hours" and "Location = Office Network".

[0161] For each Gaussian component, the system calculates the applicability of its corresponding rule under the current feature vector and converts it into a probability density value. For example, the probability density value of "user role-based access control rules" under the current request is 0.75, the probability density value of "resource type-based access control rules" is 0.62, and the probability density value of "time-based access control rules" is 0.45.

[0162] The probability density values ​​of each Gaussian component are multiplied by their weight coefficients and summed to obtain the total probability density distribution, which is the initial response score. For example, the initial response score = 0.75 × 0.5 + 0.62 × 0.3 + 0.45 × 0.2 = 0.656.

[0163] The initial response score is used as a weight adjustment factor and input into the Gaussian mixture probability model to dynamically adjust the weight coefficients of each Gaussian component. The adjustment method is to compare the initial response score with the mean of each Gaussian component. If the initial response score is close to the mean of a Gaussian component, the weight coefficient of that Gaussian component is increased; otherwise, the weight coefficient of that Gaussian component is decreased.

[0164] For example, the initial response score of 0.656 is close to the mean of 0.6 for the Gaussian component corresponding to the "resource type-based access control rule." Therefore, the system increases the weight coefficient of this Gaussian component from 0.3 to 0.4, while simultaneously reducing the weight coefficients of the other Gaussian components to ensure that the sum of all weight coefficients is 1. After the adjustment, the weight coefficient of the "user role-based access control rule" becomes 0.45, and the weight coefficient of the "time-based access control rule" becomes 0.15.

[0165] The resource access response result is recalculated using the adjusted Gaussian mixture probability model. This calculation method multiplies the probability density values ​​of each Gaussian component under the current eigenvector by the adjusted weight coefficients and sums them to obtain the final response score. For example, the final response score = 0.75 × 0.45 + 0.62 × 0.4 + 0.45 × 0.15 = 0.6485.

[0166] The final response score is compared with the preset threshold to determine whether the access request is allowed or denied. For example, if the preset threshold is 0.6, the final response score of 0.6485 is greater than the threshold, and the system allows access. If the preset threshold is 0.7, the final response score of 0.6485 is less than the threshold, and the system denies access.

[0167] A response message is generated based on the final access decision and returned to the user terminal. This response message includes the access decision result (allow or deny) and additional information, such as the scope of access rights and access time limits. For example, if the system allows user A to edit document B, the response message will be "Access authorized, editing is possible after review is completed." If the system denies access, the response message will be "Access denied, document is currently under review and cannot be edited."

[0168] Through the above method, the system can accurately model the access control policy based on the Gaussian mixture probability model and dynamically adjust the model parameters according to the initial response results to achieve more accurate and flexible resource access control, improve system security while maintaining a good user experience.

[0169] A second aspect of an embodiment of the present invention provides a multi-scenario access control dynamic verification system based on a permission tree, including:

[0170] The first unit is configured to receive a resource access request sent by a user terminal, the resource access request including a user identifier, a scenario identifier, and a target resource identifier; obtain a user permission tree based on the user identifier, the user permission tree including a plurality of permission nodes; and obtain a scenario permission mapping rule from a preset scenario permission mapping library based on the scenario identifier;

[0171] The second unit is configured to filter the permission nodes in the user permission tree according to the scenario permission mapping rule to generate a preliminary screening permission node set; group the preliminary screening permission node set using a consistent hashing algorithm to generate multiple permission node subsets; perform reachability analysis on each of the permission node subsets, and merge and reconstruct the permission node subsets based on the results of the reachability analysis to generate a scenario-based permission tree;

[0172] The third unit is configured to obtain a corresponding permission verification rule from the scenario-based permission tree according to the target resource identifier; perform hierarchical verification on the resource access request based on the permission verification rule, including: performing identity validity verification on the user identifier, performing scenario legitimacy verification on the scenario identifier, performing resource access permission verification on the target resource identifier, and generating an access control policy based on the results of the hierarchical verification;

[0173] The fourth unit is configured to determine a resource access response result according to the access control policy, and return the resource access response result to the user terminal.

[0174] According to a third aspect of an embodiment of the present invention, an electronic device is provided, including:

[0175] processor;

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

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

[0178] According to a fourth aspect of an embodiment of the present invention, 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 method described above is implemented.

[0179] 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.

[0180] 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 above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above 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 verification method for multi-scenario access control based on permission tree, characterized in that: include: Receive a resource access request sent by a user terminal, wherein the resource access request includes a user identifier, a scenario identifier, and a target resource identifier; Acquire a user authority tree based on the user identifier, wherein the user authority tree includes a plurality of authority nodes; Obtaining a scene permission mapping rule from a preset scene permission mapping library according to the scene identifier; Filter the permission nodes in the user permission tree according to the scenario permission mapping rule to generate a preliminary screening permission node set; Using a consistent hashing algorithm to group the initially screened authority node set to generate multiple authority node subsets; Performing a reachability analysis on each of the permission node subsets, and merging and reconstructing the permission node subsets based on the results of the reachability analysis to generate a scenario-based permission tree; Obtaining corresponding permission verification rules from the scenario-based permission tree according to the target resource identifier; Performing hierarchical verification on the resource access request based on the permission verification rules, including: performing identity validity verification on the user identifier, performing scene legitimacy verification on the scene identifier, performing resource access permission verification on the target resource identifier, and generating an access control policy based on the results of the hierarchical verification; A resource access response result is determined according to the access control policy, and the resource access response result is returned to the user terminal.

2. The method according to claim 1, characterized in that Filtering the permission nodes in the user permission tree according to the scenario permission mapping rule to generate a set of pre-screened permission nodes includes: Obtain a set of permission nodes in the user permission tree, where each permission node in the permission node set includes a permission type parameter, a permission attribute parameter, and a node weight parameter, and construct a node feature vector based on the permission type parameter and the permission attribute parameter; A scene association matrix is ​​constructed based on the node feature vectors, and an adaptive weight decay mechanism is used to process the association strength in the scene association matrix. The adaptive weight decay mechanism dynamically adjusts the decay coefficient according to the topological distance between nodes, and the decay result of the association strength is accumulated and propagated according to a preset transfer depth to obtain a scene transfer matrix; Calculating explicit feature similarity based on the node feature vector, calculating implicit association similarity based on the scene transfer matrix, and dynamically adjusting the weights of the explicit feature similarity and the implicit association similarity according to the historical screening accuracy using the adaptive weight decay mechanism to obtain scene semantic similarity; Constructing a scene association constraint according to the scene semantic similarity, fusing the scene association constraint with a preset basic mapping rule to generate a combined mapping rule, and mapping the node feature vector based on the combined mapping rule to obtain a scene context matching degree; The adaptive weight decay mechanism is used to dynamically assign weights to the scene context matching degree and the basic matching degree to obtain a final matching degree, and the permission node set is screened based on the final matching degree to generate a pre-screened permission node set.

3. The method according to claim 2, characterized in that Using the adaptive weight decay mechanism to dynamically assign weights to the scene context matching degree and the basic matching degree to obtain a final matching degree includes: Constructing a nonlinear attenuation function, the nonlinear attenuation function including an attenuation rate parameter and a nonlinear adjustment factor, dynamically updating the attenuation rate parameter based on a change in matching accuracy in historical matching records, and dynamically updating the nonlinear adjustment factor based on a change in weight variance in historical matching records; The updated attenuation rate parameter and the nonlinear adjustment factor are substituted into the nonlinear attenuation function, the weight coefficient of the scene context matching degree and the basic matching degree is calculated, and the scene context matching degree and the basic matching degree are weightedly fused according to the weight coefficient to obtain the final matching degree.

4. The method according to claim 1, wherein Using a consistent hashing algorithm to group the initially screened authority node set to generate multiple authority node subsets; Performing a reachability analysis on each of the permission node subsets, and merging and reconstructing the permission node subsets based on the results of the reachability analysis to generate a scenario-based permission tree includes: Constructing a consistent hash mapping space based on the initially screened authority node set, mapping the authority nodes in the initially screened authority node set to the consistent hash mapping space; setting a plurality of virtual nodes in the consistent hash mapping space, each of the virtual nodes corresponding to a preset number of hash slots, allocating the authority nodes to different virtual nodes according to the hash slots, and dividing the authority nodes into a plurality of authority node subsets based on the distribution positions of the virtual nodes; Establish a node reachability graph for each of the permission node subsets, and obtain a transfer probability based on the node reachability graph by calculating the node path depth and path weight; convert the transfer probability into a reachability strength matrix, and calculate the aggregation degree of the permission node subset based on the reachability strength matrix; Based on the aggregation degree, the permission node subsets are merged and determined; when the aggregation degree difference between adjacent permission node subsets is less than a preset aggregation threshold, they are merged into a new permission node subset; the reachable strength matrix and the aggregation degree are recalculated for the merged permission node subset; the recalculated reachable strength matrix and the aggregation degree are organized into a tree hierarchical structure, the parent-child node relationship in the tree hierarchical structure is determined according to the reachable strength between the nodes, and a scenario-based permission tree is generated based on the parent-child node relationship.

5. The method according to claim 4, characterized in that Obtaining the transmission probability by calculating the node path depth and path weight based on the node reachability graph; Converting the transfer probability into a reachability strength matrix, and calculating the aggregation degree of the authority node subset according to the reachability strength matrix includes: Dividing the node reachability graph into a plurality of permission levels, each permission level comprising a subset of nodes of a corresponding permission level, and calculating the path depth between pairs of nodes based on the level difference between adjacent nodes in the permission level; Constructing a Markov chain state transfer matrix, wherein the transition probability of the Markov chain state transfer matrix is ​​dynamically adjusted by an exponential decay function, wherein the exponential decay function includes a base weight and a depth decay factor, applying the Markov chain state transfer matrix to a set of paths in the node reachability graph, and calculating a state transition sequence for each path based on the set of paths and the Markov chain state transfer matrix; Based on the state transition sequence, the intra-layer transmission probability between nodes at the same level and the inter-layer transmission probability between nodes at different levels are calculated respectively; the intra-layer transmission probability and the inter-layer transmission probability are input into the Markov chain state transition matrix to obtain a comprehensive transmission probability, a reachable strength matrix is ​​constructed based on the comprehensive transmission probability, and the aggregation degree of the authority node subset is calculated according to the reachable strength matrix.

6. The method according to claim 1, characterized in that Performing identity validity verification on the user identifier, performing scenario legitimacy verification on the scenario identifier, and performing resource access permission verification on the target resource identifier, and generating an access control policy based on the hierarchical verification results include: Constructing a Gaussian mixture probability model, the Gaussian mixture model including multiple Gaussian components; modeling the historical access behavior of the user identifier based on the Gaussian mixture probability model to obtain a user identity validity score; Inputting the user identity validity score as a weight adjustment factor into the Gaussian mixture probability model, dynamically adjusting the weight coefficient of the Gaussian component based on the weight adjustment factor, jointly modeling the time features, location features, and network environment features in the scene identifier using the adjusted Gaussian mixture probability model, and obtaining the scene legitimacy score by calculating the joint probability density distribution of the scene identifier; The weighted result of the scenario legitimacy score and the user identity validity score is used as a new weight adjustment factor, and the weight coefficient of the Gaussian component is adjusted quadratically based on the new weight adjustment factor. The access control rule of the target resource identifier is modeled using the quadratically adjusted Gaussian mixture probability model, and a resource access permission verification result is generated by calculating the conditional probability density distribution of the target resource identifier. An access control policy is determined by combining the resource access permission verification result with the scenario legitimacy score and the user identity validity score.

7. The method according to claim 1, characterized in that Determining a resource access response result according to the access control policy, and returning the resource access response result to the user terminal includes: Modeling the access control policy based on a Gaussian mixture probability model, and obtaining an initial response score by calculating the probability density distribution of the access control policy; The initial response score is input into the Gaussian mixture probability model as a weight adjustment factor, the weight coefficient of the Gaussian component is dynamically adjusted based on the weight adjustment factor, and the resource access response result is calculated using the adjusted Gaussian mixture probability model; response information is generated based on the resource access response result, and the response information is returned to the user terminal.

8. A multi-scenario access control dynamic verification system based on a permission tree, used to implement the method according to any one of claims 1 to 7, characterized in that: include: The first unit is configured to receive a resource access request sent by a user terminal, wherein the resource access request includes a user identifier, a scenario identifier, and a target resource identifier; Acquire a user authority tree based on the user identifier, wherein the user authority tree includes a plurality of authority nodes; Obtaining a scene permission mapping rule from a preset scene permission mapping library according to the scene identifier; The second unit is configured to filter the permission nodes in the user permission tree according to the scenario permission mapping rule to generate a set of pre-screened permission nodes; Using a consistent hashing algorithm to group the initially screened authority node set to generate multiple authority node subsets; Performing a reachability analysis on each of the permission node subsets, and merging and reconstructing the permission node subsets based on the results of the reachability analysis to generate a scenario-based permission tree; A third unit is configured to obtain a corresponding permission verification rule from the scenario-based permission tree according to the target resource identifier; Performing hierarchical verification on the resource access request based on the permission verification rules, including: performing identity validity verification on the user identifier, performing scene legitimacy verification on the scene identifier, performing resource access permission verification on the target resource identifier, and generating an access control policy based on the results of the hierarchical verification; The fourth unit is configured to determine a resource access response result according to the access control policy, and return the resource access response result to the user terminal.

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 according to 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.