Methods and systems for dynamic encryption of privacy data

By constructing an encryption policy intervention graph and using causal forest learning, the encryption policy is split into components and a split-mode partial optimal transmission matching is performed. This solves the problem of inaccurate matching between encryption policies and risks in dynamic encryption of privacy data, and achieves higher matching accuracy and stability.

CN123122880APending Publication Date: 2026-11-17JIANGXI SHUAN DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611186506.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-06
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In existing technologies, dynamic encryption methods for privacy data are difficult to accurately match access scenarios and risk states, resulting in poor accuracy and stability in matching encryption strategies with actual risks.

Method used

By constructing an encryption strategy intervention graph, the system performs split-stream partial optimal transmission matching and causal forest learning on historical access-related samples. The encryption strategy is decomposed into algorithm, key type, and encryption granularity components, forming a strategy comparison relationship. This reduces uneven sample quantity and forced matching bias, thereby improving matching accuracy.

Benefits of technology

It improves the accuracy and stability of matching dynamic encryption strategies with actual access risks, and avoids risk model deviations caused by intervention of historical encryption strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123122880A_ABST
    Figure CN123122880A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for dynamic encryption of privacy data, belonging to the field of dynamic data encryption technology. The method specifically includes: acquiring a historical access baseline dataset; performing access stage association and target access mapping based on the historical access baseline dataset to obtain a historical access association sample set and a target access dataset; constructing an encryption strategy intervention graph based on the historical access association sample set and performing split-stream partial optimal transmission matching to obtain a basic risk integration model and a candidate strategy response integration model; inputting the target access dataset into the basic risk integration model and the candidate strategy response integration model to determine the target dynamic encryption strategy and obtain the dynamic encryption result of the privacy data. This application improves the accuracy and stability of dynamic encryption strategy matching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of dynamic data encryption, specifically relating to methods and systems for dynamic encryption of privacy data. Background Technology

[0002] During the process of accessing private data, dynamic encryption requires combining information such as the access subject, device status, network environment, access time and operation type to determine the corresponding encryption algorithm, key type and encryption granularity. However, private data is usually distributed in different carriers such as enterprise databases, interface services and terminal devices, and the access scenarios and risk status are constantly changing, making it difficult to accurately match encryption strategies.

[0003] In existing technologies, dynamic encryption methods for privacy data typically train risk identification models based on historical access behaviors and risk events, and select encryption algorithms, key types, and encryption granularity according to risk levels. However, historical access behaviors and risk events have already been affected by implemented encryption policies, making it difficult for risk models to distinguish between the underlying risks of the access behavior itself and the intervention effects of the encryption policies. This can easily lead to a shift in the risk level corresponding to the same access scenario, resulting in poor accuracy and stability in matching dynamic encryption policies with actual access risks. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for dynamic encryption of privacy data. By constructing an encryption strategy intervention graph, and performing split-stream partial optimal transmission matching and causal forest learning on historical access-related samples, the accuracy and stability of dynamic encryption strategy matching are improved.

[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0006] On the one hand, the present invention provides a method for dynamically encrypting privacy data, including:

[0007] Obtain a historical access baseline dataset, which includes a privacy data sensitivity label set, target access requests, and a candidate encryption policy set;

[0008] Based on the historical access dataset, access phase association and target access mapping are performed to obtain the historical access association sample set and the target access dataset.

[0009] Based on the historical access association sample set, an encryption policy intervention graph is constructed, and a split-type partial optimal transmission matching is performed to obtain a basic risk integration model and a candidate policy response integration model.

[0010] By inputting the target access dataset into the basic risk ensemble model and the candidate policy response ensemble model, the target dynamic encryption policy is determined, and the result of dynamic encryption of privacy data is obtained.

[0011] Specifically, based on the historical access dataset, access phase association and target access mapping are performed to obtain the historical access association sample set and the target access dataset, including:

[0012] The historical access dataset is correlated and divided into access stages to form a historical access time-series record set.

[0013] The historical access time sequence records are used to determine the access context before policy execution, the actual encryption policy, and the risk evidence after policy execution, and the corresponding privacy data sensitivity is marked to form a historical access associated sample set.

[0014] Based on the target access request and the privacy data sensitivity tag set, the target access context, target privacy data, and target privacy data sensitivity are determined to form the target access dataset.

[0015] Specifically, based on a historical access-related sample set, an encryption policy intervention graph is constructed, and a split-mode partial optimal transmission matching is performed to obtain a basic risk integration model and a candidate policy response integration model, including:

[0016] The actual encryption strategy is broken down into its components, and the strategies are combined and aggregated for each historical access-related sample to construct an encryption strategy intervention graph.

[0017] By using the encryption strategy intervention graph, the historical access-related samples are matched in a split-flow partial optimal transmission to form a strategy comparison transmission result set. The strategy comparison transmission result set includes a set of strategy comparison sample pairs, comparison sample transmission weights, and a set of node residual shares.

[0018] Based on the policy-comparison transmission result set, a transmission pair differential sample set is constructed, and causal forest ensemble learning is performed to generate a policy component intervention effect set;

[0019] Based on the policy component intervention effect set, the risk evidence after policy implementation is corrected to obtain the basic risk sample set and the candidate policy response sample set;

[0020] The basic risk sample set and the candidate strategy response sample set are integrated for learning to obtain the basic risk ensemble model and the candidate strategy response ensemble model.

[0021] Specifically, the actual encryption strategy is broken down into its components, and the strategies of each historical access-related sample are combined and aggregated to construct an encryption strategy intervention graph, including:

[0022] Each actual encryption strategy is broken down into encryption algorithm strategy components, key type strategy components, and encryption granularity strategy components, forming a strategy component combination set;

[0023] Based on the strategy component combination set, historical access association samples with the same strategy components are grouped into corresponding strategy combination nodes, thus obtaining the strategy combination node set of related historical access association samples.

[0024] Identify a pair of strategy combination nodes with only one different strategy component, establish strategy component intervention edges between each pair of strategy combination nodes, and mark the changing strategy component and the direction of change to form a set of strategy component intervention edges;

[0025] Based on the set of policy combination nodes and the set of policy component intervention edges, a graph structure is organized to construct an encrypted policy intervention graph.

[0026] Specifically, through the encryption policy intervention graph, a split-stream partial optimal transmission matching is performed on historical access-related samples to form a policy-matched transmission result set, including:

[0027] Based on the encryption strategy intervention diagram, determine the initial transmission share corresponding to each historical access associated sample;

[0028] Extract historical access association samples associated with the strategy combination nodes at both ends of each intervention edge from the set of strategy component intervention edges, calculate the access context distance, and determine the range of matching distances;

[0029] Based on the initial transmission share, access context distance, and matchable distance range, partial optimal transmission matching is performed between the policy combination nodes at both ends of the policy component intervention edge to obtain the matching result of this round.

[0030] Based on the matching results of this round, the transmission shares that did not form a match are returned to the corresponding strategy combination node and redistributed. The matching results of each round are summarized to obtain the strategy comparison transmission result set.

[0031] Specifically, based on the initial transmission share, access context distance, and matchable distance range, partial optimal transmission matching is performed between the policy combination nodes at both ends of the policy component intervention edge to obtain the matching results for this round, including:

[0032] Based on the access context distance and the matchable distance range, determine the matchable relationship between the historical access association samples corresponding to the policy combination nodes at both ends of the intervention edge of each policy component;

[0033] The initial transmission share of each historical access associated sample is assigned to the intervention edge of the policy component with a matching relationship to form the transmission share to be matched.

[0034] Partial optimal transmission matching is performed by using the unmatched transmission share and the access context distance to form the matching sample pairs and the matching transmission weights for this round.

[0035] The matching sample pairs and the transmission weights of this round are summarized to form the matching results of this round corresponding to the intervention edges of each strategy component.

[0036] Specifically, a differential sample set of transport pairs is constructed based on the policy-controlled transport result set, and causal forest ensemble learning is performed to generate a set of policy component intervention effects, including:

[0037] The common access features, changed policy components, and differences in risk evidence after policy execution of each policy control sample pair are extracted from the policy control sample pair set to form the initial transport pair differential sample set.

[0038] Based on the initial transport pair differential sample set, the control sample transport weights, and the node residual share set, the matching coverage degree and learning weights of each initial transport pair differential sample are calculated to obtain the transport pair differential sample set.

[0039] By transmitting the differential sample set, a residual corrected split loss is constructed, and the tree nodes are recursively divided to form a residual corrected causal tree set and a leaf node estimation sample set;

[0040] Based on the residual corrected causal tree set and the leaf node estimated sample set, leaf node effect correction and multi-tree ensemble are performed to obtain the policy component intervention effect set.

[0041] Specifically, a residual corrected split loss is constructed by transmitting the differential sample set, and tree nodes are recursively partitioned to form a residual corrected causal tree set and a leaf node estimation sample set, including:

[0042] The transmission differential sample set is sampled with replacement, and the sampling results are divided into a tree-structured sample subset and a leaf node estimated sample set.

[0043] Based on a subset of tree-structured samples, feature partitioning is performed on the access context before policy execution to obtain a candidate split set;

[0044] Each candidate split is applied to a subset of tree-structured samples to form corresponding split result nodes, and the degree of dispersion of risk evidence difference between the transmission pairs of the differential samples corresponding to each split result node is calculated.

[0045] Based on the degree of dispersion of risk evidence differences, learning weights, and matching coverage, a residual corrected split loss is constructed for each candidate split.

[0046] The candidate split with the largest decrease in residual corrected split loss is selected as the target split, and the node corresponding to the target split is selected as the node to be split in the next round, thus recursively forming a set of residual corrected causal trees.

[0047] Specifically, the target access dataset is input into the basic risk ensemble model and the candidate policy response ensemble model to determine the target dynamic encryption policy and obtain the dynamic encryption result of privacy data, including:

[0048] Input the target access dataset into the basic risk ensemble model to generate the target basic risk;

[0049] The target access dataset and the target basic risk are input into the candidate policy response ensemble model to predict the policy response corresponding to each candidate encryption policy in the candidate encryption policy set, thus forming a candidate policy response result set.

[0050] Based on the candidate policy response result set, the target dynamic encryption policy is determined, the target privacy data is encrypted, and the privacy data dynamic encryption result is obtained.

[0051] On the other hand, the present invention provides a dynamic encryption system for privacy data, comprising:

[0052] The data acquisition module is used to acquire the basic dataset of historical accesses;

[0053] The access mapping module performs access phase association and target access mapping based on the historical access base dataset, and obtains the historical access association sample set and the target access dataset.

[0054] The optimal transmission module constructs an encryption strategy intervention graph based on a historical access association sample set and performs split-type partial optimal transmission matching to obtain a basic risk integration model and a candidate strategy response integration model.

[0055] The privacy encryption module is used to input the target access dataset into the basic risk ensemble model and the candidate policy response ensemble model, determine the target dynamic encryption policy, and obtain the privacy data dynamic encryption result.

[0056] Compared with existing technologies, the beneficial effects of this invention include: decomposing the actual encryption strategy into encryption algorithm strategy components, key type strategy components, and encryption granularity strategy components; constructing an encryption strategy intervention graph; and performing split-mode partial optimal transmission matching between strategy combination nodes with only one different strategy component. This allows historical access-related samples with similar access contexts but a single difference in encryption strategy to form a strategy comparison relationship. Simultaneously, unmatched transmission shares are returned and redistributed, reducing the bias in strategy intervention caused by uneven sample numbers and forced matching, thus improving the accuracy of distinguishing between the basic risk of access behavior and the intervention effect of encryption strategy. Furthermore, common access features, changing strategy components, and risk evidence differences are extracted from the strategy comparison sample pairs. A residual corrected split loss is constructed based on the matching coverage and learning weights, followed by leaf node effect correction and multi-tree ensemble. This avoids the risk model shift caused by historically executed encryption strategies, improving the accuracy and stability of matching dynamic encryption strategies with actual access risks. Attached Figure Description

[0057] Figure 1 Flowchart of the privacy data dynamic encryption method provided by the present invention;

[0058] Figure 2 The flowchart for generating the matching results of this round provided by the present invention;

[0059] Figure 3 The diagram shows the structure of the privacy data dynamic encryption system provided by this invention. Detailed Implementation

[0060] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solution of the present invention, rather than limitations thereof. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.

[0061] Example 1:

[0062] See Figures 1-2 This embodiment provides a method for dynamically encrypting privacy data, including the following specific steps:

[0063] Step S1: Obtain the historical access basic dataset, which includes a privacy data sensitivity label set, target access requests, and candidate encryption policy set.

[0064] In this embodiment, historical access records, encryption execution records, access response records, and risk event records are collected through terminal agents, access gateways, and database audit interfaces. Historical access records include user roles and permissions, access source location, device security status, network environment, access time, operation type, target data identifier, and access data volume. Encryption execution records include encryption algorithms, key types, encryption granularity, and policy effective time. Access response records include response duration, access success status, and number of requests. Risk event records include abnormal access types, risk occurrence time, and risk severity.

[0065] Each collected record undergoes integrity verification and duplicate record removal. Integrity verification is based on the minimum fields required for association in subsequent access stages. Specifically, it checks whether each record includes at least the access request identifier or user identifier, access time, target data identifier, and operation type. Records with all these fields present are considered valid. Duplicate record identification rules are set based on the uniqueness of the record source and access process. Specifically, records with identical access request identifiers, record types, target data identifiers, and record times are identified as duplicates, and the record with the earliest collection time is retained. Historical access record sets are formed by associating the same access process with historical access records, encryption execution records, access response records, and risk event records based on the access request identifier.

[0066] The system reads data identifiers, sensitivity levels, and tag validity periods stored in the data classification and grading system to form a privacy data sensitivity tag set. It then receives the current access request and extracts user roles and permissions, access source location, device security status, network environment, access time, operation type, target data identifier, and access data volume to form the target access request.

[0067] The system reads the enabled encryption policy configuration and extracts the encryption algorithm, key type, and encryption granularity. The executability of candidate encryption policies is determined based on the target data carrier's algorithm interface, key service interface, and encryption granularity interface. Specifically, the encryption algorithm identifier, key type identifier, and encryption granularity identifier in each policy combination are compared with the target data carrier's registered list of supported algorithms, key acquisition lists, and data processing granularity lists. Only policy combinations where all three identifiers match are retained as candidate encryption policies. The system aggregates the historical access record set, privacy data sensitivity tag set, target access requests, and candidate encryption policy set to obtain the historical access base dataset.

[0068] For example, historical records are collected according to the effective time range of the current encryption policy configuration version. This configuration version has been continuously effective for 60 days before the current access request, resulting in 7200 access records. After integrity verification and duplicate record removal, 7064 valid records are retained. The privacy data sensitivity label set includes three types of labels: public, internal, and secret. The target access request is for the first access subject to query 80 target data records during working hours through a secure terminal and the enterprise intranet. The encryption policy configuration includes 3 encryption algorithms, 4 key types, and 2 encryption granularities. Multiplying 3 by 4 gives 12, and then multiplying 12 by 2 gives 24 policy combinations. Based on the algorithm interface, key service interface, and encryption granularity interface of the target database, 21 unexecutable policy combinations are removed. Subtracting 21 from 24 leaves 3 candidate encryption policies, resulting in the basic dataset of historical access.

[0069] Step S2: Based on the historical access base dataset, perform access stage association and target access mapping to obtain the historical access association sample set and the target access dataset.

[0070] The specific steps of step S2 are as follows:

[0071] Step S201: Perform access association and access stage division on the historical access basic dataset to form a historical access time series record set.

[0072] In this embodiment, historical access records, encryption execution records, access response records, and risk event records are read from the historical access dataset. Based on the access request identifier, historical access records, encryption execution records, access response records, and risk event records belonging to the same access process are associated. For records with missing access request identifiers, the user identifier, target data identifier, operation type, and record time are compared sequentially. Records with the same user identifier, target data identifier, and operation type, and whose record time difference is no greater than the association tolerance duration, are grouped into the same access process.

[0073] The associated tolerance duration is set based on historical access records with complete access request identifiers. Specifically, the setting method is as follows: Count the time intervals between adjacent records within the same access process, arrange these time intervals in ascending order, and select the time interval corresponding to the point where the cumulative coverage ratio reaches the preset coverage ratio as the associated tolerance duration. The preset coverage ratio is not based on a fixed empirical value, but is determined based on historical access records with complete access request identifiers. Specifically, each different time interval after sorting is used as a candidate associated tolerance duration, and the number of time intervals not exceeding that candidate associated tolerance duration is calculated. This number is divided by the total number of time intervals to obtain the corresponding candidate coverage ratio.

[0074] For each candidate association tolerance duration, the access request identifier in the complete record is temporarily hidden, and access association is re-performed according to user identifier, target data identifier, operation type, and candidate association tolerance duration. The number of records associated with erroneous access requests is divided by the total number of all associated records to obtain the false association rate. The number of records that should belong to the same access request but were not associated is divided by the total number of records that should be associated to obtain the false association rate. The false association rate and the false association rate are added together to obtain the association error severity of the corresponding candidate association tolerance duration. The candidate association tolerance duration with the lowest association error severity is selected as the target association tolerance duration, and its corresponding candidate coverage ratio is determined as the preset coverage ratio. When multiple candidate association tolerance durations have the same association error severity, the candidate association tolerance duration with the smaller value is selected to reduce the possibility of different access processes being incorrectly merged.

[0075] Based on the access request reception time, encryption policy effective time, encryption processing completion time, and access response end time, the access process is divided into access phases. The period from access request reception time to encryption policy effective time is designated as the pre-policy execution phase; the period from encryption policy effective time to encryption processing completion time is designated as the policy execution phase; and the period from encryption processing completion time to access response end time is designated as the post-policy execution phase. Based on the access process association results and the access phase division results, the records in each access process are arranged in chronological order to form a historical access time-series record set.

[0076] Step S202: Determine the access context before policy execution, the actual encryption policy, and the risk evidence after policy execution from the historical access time sequence record set, and mark the corresponding privacy data sensitivity to form a historical access associated sample set.

[0077] In this embodiment, each historical access time sequence record in the historical access time sequence record set is read sequentially. User roles and permissions, access source location, device security status, network environment, access time, operation type, and access data volume are extracted from the pre-policy execution stage to form the pre-policy execution access context. User roles and permissions are determined by the role identifier and permission scope returned by the identity and permission system. The access source location is determined based on the domestic or overseas attribution information corresponding to the access source network address. The device security status is determined based on the unauthorized access status, malicious program detection status, and security configuration status returned by the terminal agent. The network environment is determined based on the enterprise intranet, domestic public network, or overseas public network identified by the access gateway.

[0078] The actual encryption algorithm, key type, and encryption granularity are extracted from the strategy execution phase to form the actual encryption strategy. Key types include monthly rotating working keys, daily rotating working keys, hourly rotating working keys, and session temporary derived keys. Encryption granularity includes field-level encryption, record-level encryption, and data block-level encryption.

[0079] After the policy execution phase, data such as access response time, access success status, number of retries, number of failures, risk event type, risk level, and affected data volume are extracted to form post-policy execution risk evidence. For access processes where no risk event occurred, the risk event type is marked as an unconfirmed risk event, and the risk level is marked as a risk-free state.

[0080] Based on the target data identifier and access time in the historical access time sequence records, sensitivity tags valid at that access time are selected from the privacy data sensitivity tag set. For cases where the same access involves multiple target fields, the highest sensitivity level among the sensitivity levels corresponding to each target field is determined as the privacy data sensitivity of that access process. The access context before policy execution, the actual encryption policy, the risk evidence after policy execution, and the privacy data sensitivity are associated with the same access sample identifier to form a historical access associated sample set.

[0081] Step S203: Based on the target access request and the privacy data sensitivity tag set, determine the target access context, target privacy data, and target privacy data sensitivity to form a target access dataset.

[0082] In this embodiment, user roles and permissions, access source location, device security status, network environment, access time, operation type, and access data volume are extracted from the target access request to form the target access context.

[0083] Based on the target data identifier and target field range in the target access request, the data record and target fields corresponding to this request are located from the target data carrier to form the target privacy data. If the target access request only contains an interface identifier, the field mapping relationship corresponding to that interface is read, and the fields returned by the interface are mapped to the fields in the target data carrier to determine the target field range.

[0084] Based on the target data identifier, target field range, and access time, extract valid sensitivity tags from the privacy data sensitivity tag set. If the target privacy data contains multiple sensitivity levels, determine the highest sensitivity level as the target privacy data sensitivity. Associate the target access context, target privacy data, and target privacy data sensitivity with the target request identifier to form the target access dataset.

[0085] Step S3: Based on the historical access associated sample set, construct the encryption policy intervention graph and perform split-type partial optimal transmission matching to obtain the basic risk integration model and the candidate policy response integration model.

[0086] The specific steps of step S3 are as follows:

[0087] Step S301: Decompose the actual encryption strategy into various strategy components, and combine and aggregate the strategies of each historical access-related sample to construct an encryption strategy intervention graph.

[0088] The specific steps of step S301 are as follows:

[0089] Step S3011: Decompose each actual encryption strategy into encryption algorithm strategy components, key type strategy components, and encryption granularity strategy components to form a strategy component combination set.

[0090] In this embodiment, the actual encryption strategies in each historical access association sample are read. The algorithm identifier in the actual encryption strategy is determined as the encryption algorithm strategy component, the working key rotation method or session key derivation method is determined as the key type strategy component, and the field-level, record-level, or data block-level processing method is determined as the encryption granularity strategy component. The encryption algorithm strategy components, key type strategy components, and encryption granularity strategy components belonging to the same actual encryption strategy are associated with the corresponding historical access association samples to form a strategy component combination set.

[0091] Step S3012: Based on the strategy component combination set, the historical access association samples with the same strategy components are grouped into the corresponding strategy combination nodes to obtain the strategy combination node set of the historical access association samples.

[0092] In this embodiment, the encryption algorithm policy component, key type policy component, and encryption granularity policy component of each policy component combination in the policy component combination set are compared sequentially. Policy component combinations with the same three policy components are determined to be of the same policy combination type, and a corresponding policy combination node is established for each policy combination type.

[0093] Historical access associated samples using the corresponding strategy combination type are aggregated into the same strategy combination node. The node identifier, encryption algorithm strategy component, key type strategy component, encryption granularity strategy component, and associated sample identifier are recorded in the strategy combination node to obtain the strategy combination node set associated with historical access associated samples.

[0094] Step S3013: Determine the strategy combination node pairs with only one different strategy component, establish strategy component intervention edges between each strategy combination node pair, and mark the changing strategy component and the direction of change to form a set of strategy component intervention edges.

[0095] In this embodiment, the policy combination nodes in the policy combination node set are compared pairwise to determine whether the encryption algorithm policy component, key type policy component, and encryption granularity policy component are the same.

[0096] When two policy combination nodes differ in only one policy component, the two policy combination nodes are defined as a policy combination node pair, and two policy component intervention edges with opposite directions are established between the two policy combination nodes. The first policy component intervention edge starts from the first policy combination node and ends at the second policy combination node, indicating that the corresponding policy component changes from a first value to a second value. The second policy component intervention edge starts from the second policy combination node and ends at the first policy combination node, indicating that the corresponding policy component changes from a second value to a first value.

[0097] In each policy component intervention edge, the starting policy combination node, the ending policy combination node, the changed policy component, the value before the change, and the value after the change are recorded to form a policy component intervention edge set. By establishing policy component intervention edges with opposite directions, subsequent intervention paths can invoke the corresponding policy component intervention effect according to the actual policy change direction, avoiding unclear intervention effect direction due to the lack of definite rules for the starting and ending points.

[0098] Step S3014: Based on the policy combination node set and the policy component intervention edge set, organize the graph structure and construct the encryption policy intervention graph.

[0099] In this embodiment, the set of strategy combination nodes is defined as a graph node set, and the set of strategy component intervention edges is defined as a graph edge set. Directed connections are established between strategy combination nodes based on the starting and ending strategy combination nodes recorded in each strategy component intervention edge.

[0100] Each strategy combination node retains the sample index of the corresponding historical access associated sample, and each strategy component intervention edge retains the changed strategy component and change direction. Based on the graph node set, graph edge set, sample index, and strategy component change information, an encryption strategy intervention graph is constructed.

[0101] Step S302: Through the encryption policy intervention graph, perform split-type partial optimal transmission matching on historical access related samples to form a policy comparison transmission result set. The policy comparison transmission result set includes a policy comparison sample pair set, comparison sample transmission weights, and node residual share set.

[0102] The specific steps of step S302 are as follows:

[0103] Step S3021: Determine the initial transmission share corresponding to each historical access associated sample based on the encryption strategy intervention diagram.

[0104] In this embodiment, the number of historical access associated samples associated with each strategy combination node in the encryption strategy intervention graph is read. The total transmission share of the nodes is set according to the requirement that different strategy combination nodes need to participate in matching under the same normalization scale. Specifically, the total transmission share of each strategy combination node is uniformly normalized to 1.

[0105] For any policy combination node, divide the node's total transmission share (1) by the number of historical access association samples associated with that policy combination node to obtain the initial transmission share corresponding to a single historical access association sample within that node. Process all policy combination nodes in the same way to form the initial transmission share corresponding to each historical access association sample.

[0106] By using the same total transmission share for nodes, strategic combinations of nodes with different sample numbers have the same total number of nodes during the transmission matching process, reducing the impact of differences in the number of node samples on the matching results.

[0107] Existing technologies, when performing optimal transmission matching between two sets of samples, typically normalize all samples and assign the same transmission share to each sample. In the encryption strategy comparison scenario of this embodiment, the number of historical access associated samples associated with nodes of different strategy combinations may differ significantly. If the same transmission share is directly assigned to all samples, the strategy combination node with a larger number of samples will have a larger total node transmission share, and its matching result may have an excessive impact on the strategy component intervention effect.

[0108] This application first sets the total transmission share of each strategy combination node to the same share, and then evenly distributes the total transmission share of the node according to the number of historical access associated samples within the node, so that each strategy combination node has the same transmission scale at the start of matching. For any strategy combination node, the total transmission share of the node is divided by the number of historical access associated samples associated with that strategy combination node to obtain the initial transmission share of each historical access associated sample within the node. The total transmission share of the node represents the total amount of data that the corresponding strategy combination node participates in the match, the number of historical access associated samples represents the number of samples that can participate in the match within that node, and the initial transmission share represents the transmission amount that a single historical access associated sample can be allocated at the start of matching, thereby reducing the impact of uneven node sample numbers on subsequent matching results.

[0109] Step S3022: Extract historical access association samples associated with the policy combination nodes at both ends of each intervention edge from the policy component intervention edge set, calculate the access context distance, and determine the matching distance range.

[0110] In this embodiment, intervention edges for each policy component are selected sequentially, and historical access association samples associated with the policy combination nodes at both ends of the intervention edge are extracted. User roles and permissions, access source location, device security status, network environment, access time, operation type, and access data volume are converted into access context features.

[0111] For user roles and permissions, access source location, device security status, network environment, and operation type, when the corresponding features of two historical access related samples are the same, the corresponding feature difference value is set to 0; when the corresponding features of two historical access related samples are different, the corresponding feature difference value is set to 1.

[0112] For both access time and access data volume, first subtract the smaller corresponding feature value from the larger corresponding feature value in two historical access-related samples to obtain the feature difference. Then, subtract the minimum value from the maximum value of this feature in the historical access-related sample set to obtain the feature value range. Divide the feature difference by the feature value range to obtain the normalized difference value of the corresponding feature. When the maximum and minimum values ​​of the feature are the same, the corresponding normalized difference value is set to 0 to avoid division by zero.

[0113] The distance weights of each access context feature are set according to the degree of influence of each feature on historical risk states. Specifically, a temporary risk identification random forest is built based on historical access-related samples. This temporary risk identification random forest includes a context feature input module, a classification tree set, and a risk state voting output module. The context feature input module receives user roles and permissions, access source location, device security status, network environment, access time, operation type, and access data volume. Each classification tree in the classification tree set uses sampling with replacement to form training samples, and selects node splitting features and splitting positions based on the degree of Gini impurity reduction. The risk state voting output module statistically analyzes the risk states output by each classification tree, and the risk state with the most votes is used as the confirmed risk state prediction result. The number of classification trees, the maximum tree depth, and the minimum number of samples per leaf node are determined based on the out-of-bag sample identification error rate. Specifically, the temporary risk identification random forest is trained for each parameter combination that meets deployment resource constraints. The number of incorrectly predicted samples in the out-of-bag samples is divided by the total number of out-of-bag samples to obtain the out-of-bag sample identification error rate for the corresponding parameter combination, and the parameter combination with the smallest out-of-bag sample identification error rate is selected.

[0114] For any access context feature, first count the number of original erroneous samples in the out-of-bag samples of the temporary risk identification random forest, and divide the number of original erroneous samples by the total number of out-of-bag samples to obtain the risk identification error rate before permutation. Then, randomly adjust the value of that access context feature in the out-of-bag samples, keeping other access context features unchanged, and count the number of erroneous samples again, dividing this number by the total number of out-of-bag samples to obtain the risk identification error rate after permutation. Subtract the risk identification error rate before permutation from the risk identification error rate after permutation to obtain the risk identification error increment of that access context feature. Adjust risk identification error increments less than 0 to 0, and then sum the risk identification error increments of all access context features to obtain the total error increment. Divide the risk identification error increment of any access context feature by the total error increment to obtain the corresponding distance weight. When all risk identification error increments are 0, distribute the same distance weight evenly among all access context features.

[0115] Multiply the difference value of each access context feature by the corresponding distance weight to obtain the weighted difference value of each access context feature. Then sum all the weighted difference values ​​to obtain the access context distance between two historical access related samples.

[0116] The matching distance range is set based on the distribution of access context distances of historical access-related samples at both ends of the intervention edge of each strategy component. Specifically, the access context distances of all historical access-related sample pairs at both ends of the corresponding strategy component intervention edge are arranged in ascending order. When the number of access context distances is odd, the access context distance at the middle position is taken as the median access context distance. When the number of access context distances is even, the access context distances at the two middle positions are added together and then divided by 2 to obtain the median access context distance.

[0117] Subtract the median of each access context distance from the median access context distance for each access context distance, and take the absolute value of the difference. Sort the absolute values ​​of the differences in ascending order, and obtain the median of the absolute values ​​of the differences using the same median determination method. Add the median access context distance and the median of the absolute values ​​of the differences to obtain the upper limit of the matching distance, and define the distance interval from 0 to the upper limit of the matching distance as the matching distance range. When the median of the absolute values ​​of the differences is 0, the median access context distance is directly used as the upper limit of the matching distance.

[0118] Existing technologies typically employ Euclidean distance with equal weights for each feature or a fixed distance threshold when constructing similar sample pairs. While Euclidean distance is suitable for continuous numerical features, the access context in this embodiment includes both discrete features such as user roles and permissions, access source location, device security status, network environment, and operation type, and continuous features such as access time and access data volume. If these features are directly weighted for distance calculation, the difference in dimensions between discrete and continuous features will affect the distance result. Furthermore, different access context features have varying degrees of influence on risk status; equal weighting can easily cause features with weaker risk impact to mask features with stronger risk impact.

[0119] The standard weighted distance calculation process is as follows: multiply each feature difference by its corresponding feature weight, and then sum all the products. Feature differences represent the degree of difference between two historically associated samples in the corresponding access context dimension, feature weights represent the degree of influence of that access context dimension on the historical risk status, and the weighted sum represents the overall access context distance between the two historically associated samples.

[0120] This application retains the aforementioned weighted distance structure, but converts discrete access context features to 0 or 1, converts continuous access context features to normalized difference values, and uses the risk identification error increment after random permutation to determine the distance weights. Through the above processing, the difference values ​​of each feature are unified to the same range, and the distance weights can reflect the actual impact of each access context feature on the risk state, making the access context distance more suitable for characterizing the comparability of samples at both ends of the encryption strategy intervention edge.

[0121] When using a fixed distance threshold in existing technologies, the same threshold is typically applied to all samples or all policy combinations. However, the sample distribution at both ends of the intervention edge differs depending on the policy component. For example, two policy combination nodes whose encryption algorithm changes and two policy combination nodes whose key type changes may have different access subject composition, operation type distribution, and access data volume distribution. A uniform threshold can easily lead to too many low-quality matches being introduced into intervention edges with closely distributed samples, and can also prevent intervention edges with dispersed sample distribution from forming sufficient policy comparison samples.

[0122] This application calculates the upper limit of the matchable distance for each policy component intervention edge, and determines the distance range using the median of the access context distance and the median of the absolute values ​​of the differences. The median of the access context distance is used to characterize the center position of the sample distances at both ends of the corresponding policy component intervention edge, and the median of the absolute values ​​of the differences is used to characterize the dispersion of the sample distances relative to the center position. This setting method is not significantly affected by a small number of maximum distance values ​​and can adaptively form the matchable distance range according to the sample distribution of different policy component intervention edges.

[0123] For example, the distance weights for user role and permissions, access source location, device security status, network environment, access time, operation type, and access data volume are 0.32, 0.20, 0.15, 0.10, 0.08, 0.10, and 0.05, respectively. These distance weights are summed sequentially to obtain a total distance weight of 1. The feature difference values ​​between the first historical access associated sample and the second historical access associated sample are 0, 0, 0, 0, 0.25, 0, and 0.20, respectively. Multiplying 0 by 0.32 gives 0, multiplying 0 by 0.20 gives 0, multiplying 0 by 0.15 gives 0, multiplying 0 by 0.10 gives 0, multiplying 0.25 by 0.08 gives 0.02, multiplying 0 by 0.10 gives 0, and multiplying 0.20 by 0.05 gives 0.01. Summing these weighted difference values ​​yields an access context distance of 0.03. The median access context distance of the corresponding policy component intervention edge is 0.18, and the median absolute value of the difference is 0.07. Adding 0.18 and 0.07 together, we get the upper limit of the matching distance of 0.25.

[0124] Step S30232: Assign the initial transmission share of each historical access associated sample to the intervention edge of the policy component with a matching relationship to form the transmission share to be matched.

[0125] In this embodiment, for each historical access associated sample, the policy component intervention edge connected to the policy combination node where the historical access associated sample is located is determined, and it is determined whether there is a matching sample for the historical access associated sample on each policy component intervention edge.

[0126] For a policy component intervention edge with matching samples, compare the access context distances between the historical access-related sample and each matching sample at the other end of the corresponding policy component intervention edge, and determine the minimum access context distance of the policy component intervention edge as the minimum access context distance of the policy component intervention edge. Subtract the minimum access context distance from 1 to determine the allocation tendency value of the corresponding policy component intervention edge.

[0127] The allocation tendency values ​​of each strategy component intervention edge are summed to obtain the total allocation tendency value. Each allocation tendency value is divided by the total allocation tendency value to obtain the share allocation ratio of the corresponding strategy component intervention edge. The initial transmission share of the historical access associated samples is multiplied by each share allocation ratio to obtain the unmatched transmission share allocated to the corresponding strategy component intervention edge.

[0128] When the minimum access context distances corresponding to the intervention edges of each policy component are the same, the initial transmission share is evenly distributed among the intervention edges of the policy components with matching samples. When the sum of the allocation preference values ​​is 0, the initial transmission share is evenly distributed among the intervention edges of the policy components with matching samples. When there are no matching samples for the historical access associated sample on any of the policy component intervention edges, the initial transmission share is not allocated and is retained as an unmatched transmission share.

[0129] Existing technologies, when constructing comparative samples based on graph structures, typically assign a sample to the nearest single neighboring node or distribute sample shares equally among all neighboring nodes. The single neighboring node allocation method can only retain one direction of policy change, easily losing the comparative value of samples associated with the same historical access across different policy component changes (such as encryption algorithm, key type, and encryption granularity). The average allocation method does not consider the similarity of samples on intervention edges with different policy components, easily assigning a large share of transmission to intervention edges with significantly different access contexts.

[0130] This application determines the assignment bias value based on the minimum access context distance on the intervention edge of each policy component. Since the access context feature difference value is in the range of 0 to 1, and the sum of the distance weights is 1, the access context distance is also in the range of 0 to 1. After subtracting the minimum access context distance, the smaller the access context distance, the larger the corresponding assignment bias value.

[0131] The calculation process for the transmission share to be matched is as follows: divide the allocation tendency value of the corresponding policy component intervention edge by the sum of the allocation tendency values ​​of all available policy component intervention edges to obtain the share allocation ratio, and then multiply the initial transmission share by the share allocation ratio. The allocation tendency value is used to characterize the degree to which historical access-related samples tend to form high-quality control samples on the corresponding policy component intervention edge, the share allocation ratio is used to characterize the allocation ratio of the initial transmission share among different policy change directions, and the transmission share to be matched is used to limit the amount of transmission that the historical access-related sample can participate in matching on the corresponding policy component intervention edge.

[0132] Through the above-mentioned diversion method, the same historical access associated sample can participate in the comparison matching of multiple policy component change directions at the same time, and the policy component intervention edge with a closer access context can obtain a larger share of the transmission to be matched, thereby preserving the comparison information of different policy components and reducing the impact of low similarity intervention edge on the matching result.

[0133] For example, the initial transmission share of the first historical access associated sample is 0.20, and the minimum access context distances of this sample on the first policy component intervention edge and the second policy component intervention edge are 0.10 and 0.30, respectively. Subtracting 0.10 from 1 yields a first allocation tendency value of 0.90. Subtracting 0.30 from 1 yields a second allocation tendency value of 0.70. Adding 0.90 and 0.70 gives 1.60. Dividing 0.90 by 1.60 gives a first share allocation ratio of 0.5625, and dividing 0.70 by 1.60 gives a second share allocation ratio of 0.4375. Multiplying 0.20 by the two share allocation ratios respectively yields a first unmatched transmission share of 0.1125 and a second unmatched transmission share of 0.0875. Adding 0.1125 and 0.0875 gives 0.20, which is the same as the initial transmission share of the first historical access associated sample.

[0134] Step S3023: Based on the initial transmission share, access context distance, and matchable distance range, perform partial optimal transmission matching between the policy combination nodes at both ends of the policy component intervention edge to obtain the matching result for this round.

[0135] The specific steps of step S3023 are as follows:

[0136] Step S30231: Based on the access context distance and the matchable distance range, determine the matchable relationship between the historical access association samples corresponding to the policy combination nodes at both ends of the intervention edge of each policy component.

[0137] In this embodiment, historical access association sample pairs are selected sequentially at both ends of the intervention edge of each policy component, and the privacy data sensitivity of the two historical access association samples is compared. When the privacy data sensitivity is different, the historical access association sample pair is determined to be an unmatched sample pair.

[0138] When privacy data sensitivity is the same, the access context distance and the upper limit of the matchable distance of the corresponding policy component intervention edge are compared. If the access context distance is not greater than the upper limit of the matchable distance, the historical access-related sample pair is determined as a matchable sample pair. If the access context distance is greater than the upper limit of the matchable distance, the historical access-related sample pair is determined as an unmatchable sample pair.

[0139] The sample identifier, access context distance, and corresponding policy component intervention edge of each matchable sample pair are associated to form a matchable relationship between historical access associated samples.

[0140] Privacy data sensitivity is used to ensure that two historical access-related samples have the same data protection basis. If samples with different privacy data sensitivities are directly used as policy comparison samples, the differences in risk evidence after policy implementation may stem from both differences in privacy data sensitivity and differences in encryption policies, making it impossible to attribute changes in risk evidence to a single policy component change. By first constraining privacy data sensitivity to be the same, and then filtering sample pairs based on the matching distance range, the main differences between each matching sample pair are concentrated on the changed policy component marked by the policy component intervention edge.

[0141] Step S30232: Assign the initial transmission share of each historical access associated sample to the intervention edge of the policy component with a matching relationship to form the transmission share to be matched.

[0142] In this embodiment, for each historical access associated sample, the policy component intervention edge connected to the policy combination node where the historical access associated sample is located is determined, and it is determined whether there is a matching sample for the historical access associated sample on each policy component intervention edge.

[0143] For a policy component intervention edge with a matching sample, select the minimum access context distance of the historical access-related sample on that policy component intervention edge. Subtract the minimum access context distance from the result and determine the allocation tendency value of the corresponding policy component intervention edge.

[0144] The allocation tendency values ​​of each strategy component intervention edge are summed, and each allocation tendency value is divided by the sum of the allocation tendency values ​​to obtain the share allocation ratio of the corresponding strategy component intervention edge. The initial transmission share of the historical access associated samples is multiplied by the share allocation ratio of each edge to obtain the transmission share to be matched allocated to the corresponding strategy component intervention edge.

[0145] When the minimum access context distances corresponding to the intervention edges of each policy component are the same, the initial transmission share is evenly distributed to the intervention edges of the policy components with matching samples.

[0146] Existing technologies, when constructing comparative samples based on graph structures, typically assign a sample to the nearest single neighboring node or distribute sample shares equally among all neighboring nodes. The single neighboring node allocation method can only retain one direction of policy change, easily losing the comparative value of samples associated with the same historical access across different policy component changes (such as encryption algorithm, key type, and encryption granularity). The average allocation method does not consider the similarity of samples on intervention edges with different policy components, easily assigning a large share of transmission to intervention edges with significantly different access contexts.

[0147] This application determines the assignment bias value based on the minimum access context distance on the intervention edge of each policy component. Since the access context feature difference value is in the range of 0 to 1, and the sum of the distance weights is 1, the access context distance is also in the range of 0 to 1. After subtracting the minimum access context distance, the smaller the access context distance, the larger the corresponding assignment bias value.

[0148] The calculation process for the transmission share to be matched is as follows: divide the allocation tendency value of the corresponding policy component intervention edge by the sum of the allocation tendency values ​​of all available policy component intervention edges to obtain the share allocation ratio, and then multiply the initial transmission share by the share allocation ratio. The allocation tendency value is used to characterize the degree to which historical access-related samples tend to form high-quality control samples on the corresponding policy component intervention edge, the share allocation ratio is used to characterize the allocation ratio of the initial transmission share among different policy change directions, and the transmission share to be matched is used to limit the amount of transmission that the historical access-related sample can participate in matching on the corresponding policy component intervention edge.

[0149] Through the above-mentioned diversion method, the same historical access associated sample can participate in the comparison matching of multiple policy component change directions at the same time, and the policy component intervention edge with a closer access context can obtain a larger share of the transmission to be matched, thereby preserving the comparison information of different policy components and reducing the impact of low similarity intervention edge on the matching result.

[0150] For example, the initial transmission share of the first historical access associated sample is 0.20, and the minimum access context distances of this sample on the first policy component intervention edge and the second policy component intervention edge are 0.10 and 0.30, respectively. Subtracting 0.10 yields a first allocation tendency value of 0.90, and subtracting 0.30 yields a second allocation tendency value of 0.70. Adding 0.90 and 0.70 yields 1.60. Dividing 0.90 by 1.60 yields a first share allocation ratio of 0.5625, and dividing 0.70 by 1.60 yields a second share allocation ratio of 0.4375. Multiplying 0.20 by the two share allocation ratios yields a first unmatched transmission share of 0.1125 and a second unmatched transmission share of 0.0875.

[0151] Step S30233: Perform partial optimal transmission matching by using the transmission share to be matched and the access context distance to form the matching sample pairs and the transmission weights for this round.

[0152] In this embodiment, for each policy component intervention edge, the historical access association sample associated with the policy combination node at the starting point of the intervention edge is determined as the transmission starting point sample, and the historical access association sample associated with the policy combination node at the ending point of the intervention edge is determined as the transmission ending point sample.

[0153] A transmission connection is established based on the matching relationship between the transmission start sample and the transmission end sample. The access context distance is determined as the transmission cost of the corresponding transmission connection. The unmatched transmission share of the transmission start sample is determined as the output share, and the unmatched transmission share of the transmission end sample is determined as the receive share.

[0154] The minimum cost maximum flow method is used to allocate transmission weights. The specific allocation process is as follows: establish transmission source points and transmission sink points; connect the transmission source points to each transmission starting point sample, and set the available capacity of the corresponding connection as the output share of the transmission starting point sample; connect each transmission ending point sample to the transmission sink point, and set the available capacity of the corresponding connection as the receive share of the transmission ending point sample; establish transmission connections only between transmission starting point samples and transmission ending point samples with matching relationships, and set the corresponding access context distance as the transmission cost.

[0155] Given the current remaining capacity, find the augmentable path with the minimum total transmission cost from the source to the sink. Compare the remaining capacity of each connection on this augmentable path and determine the minimum remaining capacity as the amount of transmission to be increased this time. Subtract the increased transmission amount from the remaining capacity of each connection on the augmentable path and add it to the transmission weight between the corresponding origin and destination samples. Repeat the search for augmentable paths and the allocation of transmission amounts until there are no more augmentable paths with remaining capacity between the source and sink. Sum the transmission weights on all transmission connections to obtain the maximum total transmission amount for this round.

[0156] While keeping the maximum total transmission volume constant, the transmission weight of each matching sample pair is multiplied by its corresponding access context distance to obtain the transmission cost of each matching sample pair. These transmission costs are then summed to obtain the total transmission cost for this round. The transmission weight allocation result with the minimum total transmission cost for this round is selected as the partially optimal transmission result for this round. By maximizing the total transmission volume first and then minimizing the total transmission cost, the goal of minimizing the total transmission cost is avoided, preventing the result where all transmission weights are 0.

[0157] Unmatched transmission shares are allowed to be retained for both the starting and ending transmission samples, and no forced matching is performed on historical access-related samples that exceed the matchable distance range. Matchable sample pairs with transmission weights greater than zero are determined as the matching sample pairs for this round, and their corresponding transmission weights are determined as the matching transmission weights for this round.

[0158] Existing optimal transmission techniques typically require that all output shares of each starting sample and all receive shares of each ending sample be allocated. The total transmission cost is the sum of the products of the transmission weights and the corresponding sample distances for each sample. The transmission weight represents the amount of transmission allocated from the starting sample to the ending sample, the sample distance represents the degree of difference between two samples, and the total transmission cost represents the overall matching cost required to complete the transmission of all shares.

[0159] In the policy comparison scenario of this embodiment, the number of samples and the distribution of access contexts at both ends of the policy component intervention edge may differ. Some transmission starting point samples may not have transmission ending point samples that meet the sensitivity conditions and the matching distance range. If it is still required that all transmission shares be matched, then this part of the share must be allocated to samples with large access context distances, forming forced matching sample pairs that are not comparable. The difference in risk evidence after policy execution of this forced matching sample pair may mainly come from the difference in access context, rather than the change in policy components, thus causing a shift in the intervention effect of the policy components.

[0160] This application changes fully optimal transmission to partially optimal transmission. The improved constraint does not require all unmatched transmission shares of each transmission start sample and each transmission end sample to be allocated, but allows unmatched transmission shares to be retained. When performing partially optimal transmission matching, the maximum total transmission volume that can form a match in this round is first determined based on the matchable relationships and the unmatched transmission shares. The process of determining the maximum total transmission volume is as follows: under the condition that it does not exceed the output share of each transmission start sample and the receive share of each transmission end sample, the transmission volume is allocated to the corresponding transmission connection along the matchable samples, and the sum of the transmission volumes on all transmission connections is maximized.

[0161] After determining the maximum total transmission volume, this maximum total transmission volume is used as the constraint for the total matching volume in this round. While keeping the total matching volume in this round unchanged, the transmission weights of each matchable sample pair are adjusted to minimize the sum of the products of each transmission weight and the corresponding access context distance. By first determining the maximum total transmission volume and then minimizing the total transmission cost under this volume, we can avoid the situation where all transmission weights are zero when only minimizing the total transmission cost is the objective.

[0162] The improved partial optimal transport preserves low-cost matching between samples with similar access contexts, while retaining transport shares that cannot form reliable controls as unmatched transport shares. This avoids introducing low-quality sample pairs to satisfy the conservation of all shares and improves the accuracy of the policy control sample pairs in representing changes in a single policy component.

[0163] For example, the upper limit of the matchable distance for the first strategy component intervention edge is 0.20. The unmatched transmission shares of the first transmission start sample and the second transmission start sample are 0.20 and 0.15, respectively, and the receivable shares of the first transmission end sample and the second transmission end sample are 0.18 and 0.17, respectively. The access context distance from the first transmission start sample to the first transmission end sample is 0.10, which is not greater than the upper limit of the matchable distance, so a corresponding transmission connection is established. The access context distance from the first transmission start sample to the second transmission end sample is 0.22, which is greater than the upper limit of the matchable distance, so no corresponding transmission connection is established. The access context distance from the second transmission start sample to the first transmission end sample is 0.16, which is not greater than the upper limit of the matchable distance, so a corresponding transmission connection is established. The access context distance from the second transmission start sample to the second transmission end sample is 0.12, which is not greater than the upper limit of the matchable distance, so a corresponding transmission connection is established.

[0164] After allocating a transmission weight of 0.18 between the first transmission start sample and the first transmission end sample, the remaining output share of the first transmission start sample is 0.02, and the remaining receive share of the first transmission end sample is 0. After allocating a transmission weight of 0.15 between the second transmission start sample and the second transmission end sample, the remaining output share of the second transmission start sample is 0, and the remaining receive share of the second transmission end sample is 0.02. Since there is no matching relationship between the first transmission start sample and the second transmission end sample, the remaining 0.02 output share cannot be further allocated.

[0165] Adding 0.18 and 0.15 yields the maximum total transmission cost of 0.33 for this round. Multiplying 0.18 by 0.10 gives the transmission cost of 0.018 for the first matching sample pair. Multiplying 0.15 by 0.12 gives the transmission cost of 0.018 for the second matching sample pair. Adding the two transmission costs gives the total transmission cost of 0.036 for this round. The starting sample of the first transmission retains an unmatched transmission share of 0.02.

[0166] Step S30234: Summarize the matching sample pairs and the matching transmission weights of this round to form the matching results of this round corresponding to the intervention edge of each strategy component.

[0167] In this embodiment, the matching sample pairs and the transmission weights of the current round are classified and summarized according to the intervention edge identifiers of the policy components. For each policy component intervention edge, the following are recorded: the historical access associated sample identifier of the starting point, the historical access associated sample identifier of the ending point, the access context distance, the transmission weight of the current round of matching, and the changed policy component.

[0168] For any transmission starting point sample, sum all the current round matching transmission weights of that starting point sample on the current policy component intervention edge to obtain the output transmission share. Subtract the output transmission share from the unmatched transmission share of that starting point sample to obtain the corresponding unmatched output share. For any transmission ending point sample, sum all the current round matching transmission weights of that ending point sample on the current policy component intervention edge to obtain the received transmission share. Subtract the received transmission share from the unmatched transmission share of that ending point sample to obtain the corresponding unmatched received share.

[0169] When the unmatched output share or unmatched receive share is less than 0, it indicates that the transmission weight exceeds the corresponding unmatched transmission share. The current round's matching result is marked as abnormal, and partial optimal transmission matching is re-executed. The current round's matching sample pairs, current round's matching transmission weights, unmatched output shares, and unmatched receive shares corresponding to each strategy component intervention edge are associated to form the current round's matching result corresponding to each strategy component intervention edge.

[0170] Step S3024: Based on the matching results of this round, the transmission shares that have not formed a match are returned to the corresponding strategy combination node and redistributed. The matching results of each round are summarized to obtain the strategy comparison transmission result set.

[0171] In this embodiment, the unmatched transmission shares of each historical access associated sample are extracted from the matching results of this round, and the unmatched transmission shares are flowback to the corresponding policy combination node according to the policy combination node to which the historical access associated sample belongs. During the flowback process, the unmatched transmission shares continue to be associated with the original historical access associated sample identifier and are not transferred between different historical access associated samples within the same policy combination node.

[0172] For each historical access associated sample after the return, read the historical access associated samples that still have a remaining output share or a remaining receive share at the other end of each adjacent strategy component intervention edge, remove the strategy component intervention edge that has no remaining matching sample, and determine the remaining strategy component intervention edge as the intervention edge that can be reallocated in this round.

[0173] For each intervention edge that can be reallocated in this round, select the minimum access context distance between the backflow historical access-related sample and the remaining matchable sample on the other end. Subtract this minimum access context distance from 1 to obtain the reallocation tendency value. Add all the reallocation tendency values ​​to obtain the total reallocation tendency value. Divide any reallocation tendency value by the total reallocation tendency value to obtain the corresponding reallocation ratio. Multiply the backflow unmatched transmission share by each reallocation ratio to obtain the unmatched transmission share of the corresponding strategy component intervention edge in the next round. When the total reallocation tendency value is 0, the unmatched transmission share is evenly distributed to each intervention edge that can be reallocated in this round. When there is no intervention edge that can be reallocated in this round, the corresponding unmatched transmission share is retained and no further reallocation is performed.

[0174] The process iteratively handles transmission share return, reallocation, and partial optimal transmission matching. After completing one round of reallocation and partial optimal transmission matching, the weights of all newly added matching transmissions in that round are summed to obtain the newly added matching transmission weight for that round. When the newly added matching transmission weight for that round is 0, it indicates that the remaining transmission shares cannot form new effective transmissions, and the iteration stops. When the newly added matching transmission weight for that round is greater than 0, the next round of iteration continues.

[0175] Summarize the matching sample pairs and matching transmission weights of each round. For repeated matching sample pairs where the historical access association samples at the starting point and the historical access association samples at the ending point are the same on the intervention edge of the same strategy component, add the corresponding matching transmission weights of each round to obtain the control sample transmission weight of the control sample pair of the strategy, thus forming the set of control sample pairs and the control sample transmission weight.

[0176] After stopping the iteration, the final unmatched transmission shares of each historical access associated sample within any strategy combination node are summed to obtain the node residual share of the corresponding strategy combination node, forming a node residual share set. Based on the strategy comparison sample pair set, the comparison sample transmission weight, and the node residual share set, the strategy comparison transmission result set is obtained.

[0177] Existing technologies typically discard unmatched samples or discard unmatched shares as invalid data after completing an optimal transmission match. In this embodiment, the initial transmission shares of the same historical access associated sample are allocated to multiple policy component intervention edges. The failure of a policy component intervention edge to form a match does not mean that the historical access associated sample cannot form a valid comparison on other policy component intervention edges. If unmatched transmission shares are discarded directly, the comparison information of the historical access associated sample in other policy change directions will be lost.

[0178] This application redirects unmatched transmission shares back to the policy combination node to which the historically accessed associated sample belongs, and recalculates the allocation tendency value based on the minimum access context distance on the intervention edges of the remaining policy components. Transmission weights that have already formed a match are deducted from the available transmission shares of the corresponding historically accessed associated sample, and the already formed match results are retained and not re-allocated in subsequent rounds. Unmatched transmission shares are only redistributed among policy component intervention edges where there are still matching samples.

[0179] As the matching rounds increase, the share of matched transmissions continues to accumulate, while the share of unmatched transmissions remains unchanged. Furthermore, policy component intervention edges that have no matching samples in the current round are removed. Therefore, the number of transmission shares and policy component intervention edges available for reallocation gradually decreases. When the weight of newly matched transmissions in the current round is 0, further iteration cannot increase the number of effective matching results, so iteration stops.

[0180] The residual share of nodes retained after iteration stops is not invalid data, but rather represents the proportion of samples in the corresponding policy combination node that failed to form a reliable policy comparison under the existing historical access context distribution. A larger residual share indicates a more significant difference in sample coverage between the policy combination node and its neighboring policy combination nodes. Subsequent causal forest ensemble learning adjusts the learning weights of the differential samples based on the residual share, thereby reducing the impact of insufficient sample coverage on the learning results of the policy component intervention effect.

[0181] For example, after the first round of matching, the first strategy combination node returns 0.12 units of unmatched transmission share. After redistribution, two new matching sample pairs are added in the second round. The matching transmission weight of the first new matching sample pair is 0.05, and the matching transmission weight of the second new matching sample pair is 0.03. Adding 0.05 and 0.03, we get the new matching transmission weight of 0.08 in the second round. Subtracting 0.08 from 0.12, we get the remaining unmatched transmission share of 0.04 after the second round. No new valid transmissions are formed in the third round, the new matching transmission weight of the third round is 0, the iteration stops, and 0.04 is recorded in the residual share of the node corresponding to the first strategy combination node.

[0182] Step S303: Construct a differential sample set of transmission pairs based on the policy control transmission result set, and perform causal forest ensemble learning to generate a policy component intervention effect set.

[0183] The specific steps of step S303 are as follows:

[0184] Step S3031: Extract the common access features, changed policy components and risk evidence differences after policy execution from the policy control sample pair set to form the initial transfer pair differential sample set.

[0185] In this embodiment, two historical access association samples of each policy comparison sample pair in the policy comparison sample pair set are read sequentially. For user role and permissions, access source location, device security status, network environment, and operation type, feature values ​​with the same value in the two historical access association samples are identified as common discrete access features. For discrete access features with different values, the corresponding feature difference status is recorded.

[0186] For access time and access data volume, the normalized feature values ​​corresponding to two historical access-related samples are added together and then divided by 2 to obtain the common continuous access feature.

[0187] Based on the strategy comparison sample, the changed strategy component, the value before the change, and the value after the change of the corresponding strategy component intervention edge are determined to determine the changed strategy component and the direction of change.

[0188] Normalize the access response time, access failure status, number of retries, risk level, and amount of affected data in the risk evidence after policy execution. For access response time, number of retries, and amount of affected data, subtract the minimum value of the corresponding dimension in the historical access-related sample set from the current value of the corresponding dimension to obtain the feature offset. Then, subtract the minimum value from the maximum value of the corresponding dimension to obtain the feature value span. Divide the feature offset by the feature value span to obtain the normalization result. When the maximum and minimum values ​​are the same, the corresponding normalization result is set to 0. For access failure status, set access success to 0 and access failure to 1. For risk level, number them in the order of severity: no risk, low risk, medium risk, and high risk. Subtract the lowest risk level number from the current risk level number, and then divide by the difference between the highest and lowest risk level numbers to obtain the risk level normalization result.

[0189] The weights of each risk evidence dimension are set based on their correlation with the confirmed risk levels. The specific method is as follows: For any risk evidence dimension, first calculate the average of all normalized results for that risk evidence dimension, then calculate the average of all normalized results for the confirmed risk levels. Subtract the corresponding average from the normalized result of each sample's risk evidence dimension to obtain the first bias; subtract the corresponding average from the normalized result of each sample's confirmed risk level to obtain the second bias. Multiply the first and second biases for the same sample and sum all products to obtain the sum of concordant biases. Multiply each first bias by itself and sum them to obtain the sum of the first squared biases; multiply each second bias by itself and sum them to obtain the sum of the second squared biases. Multiply the sum of the first and second squared biases and take the square root to obtain the correlation normalization term. Divide the sum of concordant biases by the correlation normalization term to obtain the correlation coefficient. When the correlation normalization term is 0, the correlation coefficient is set to 0.

[0190] Take the absolute value of each correlation coefficient, and sum them to obtain the total absolute value of the correlation coefficients. Divide the absolute value of the correlation coefficient for any risk evidence dimension by the total absolute value of the correlation coefficients to obtain the weight of the corresponding risk evidence dimension. When the total absolute value of the correlation coefficients is 0, distribute the same weight equally among the risk evidence dimensions.

[0191] Each normalized risk evidence value is multiplied by its corresponding weight to obtain a weighted risk value for each risk evidence dimension. All weighted risk values ​​are then summed to obtain the risk evidence value for each historical access-related sample. The risk evidence value of the endpoint sample of the policy component intervention edge is subtracted from the risk evidence value of the starting sample to obtain the risk evidence difference after policy execution.

[0192] By associating common access characteristics, change strategy components, change direction, and differences in risk evidence after strategy execution with corresponding strategy control sample pairs, an initial transmission pair differential sample set is formed.

[0193] Step S3032: Based on the initial transmission pair differential sample set, the control sample transmission weight, and the node residual share set, calculate the matching coverage degree and learning weight of each initial transmission pair differential sample to obtain the transmission pair differential sample set.

[0194] In this embodiment, for each initial transmission pair of differential samples, the transmission weight of the control sample, the initial transmission share of the starting sample, and the initial transmission share of the ending sample of the corresponding strategy control sample pair are read.

[0195] The smaller value between the initial transmission share of the starting sample and the initial transmission share of the ending sample is selected, and the transmission weight of the control sample is divided by this smaller value to obtain the matching coverage of the initial transmission to the differential sample.

[0196] Calculate the node residual ratios for the starting and ending strategy combination nodes separately. The specific calculation process is as follows: Divide the node residual share by the total transmission share of the corresponding strategy combination node to obtain the node residual ratio. Add the two node residual ratios together and then divide by 2 to obtain the average node residual ratio.

[0197] The residual correction ratio is determined by subtracting the average node residual ratio from the result. The learning weights of the initial transport pair differential samples are obtained by sequentially multiplying the control sample transport weights, the matching coverage, and the residual correction ratio. The matching coverage and the learning weights are then added to the corresponding initial transport pair differential samples to obtain the transport pair differential sample set.

[0198] For example, the control sample transmission weight of the first strategy control sample pair is 0.15, the initial transmission share of the starting sample is 0.20, and the initial transmission share of the ending sample is 0.25. Selecting the smaller value of 0.20, dividing 0.15 by 0.20 yields a matching coverage of 0.75. The residual proportion of the starting node is 0.10, and the residual proportion of the ending node is 0.06. Adding 0.10 and 0.06 and dividing by 2 yields an average node residual proportion of 0.08. Subtracting 0.08 yields a residual correction proportion of 0.92. Multiplying 0.15 by 0.75 and then by 0.92 yields a learning weight of 0.1035.

[0199] Step S3033: Construct a residual corrected split loss by transmitting the differential sample set, and recursively divide the tree nodes to form a residual corrected causal tree set and a leaf node estimation sample set.

[0200] The specific steps of step S3033 are as follows:

[0201] Step S30331: Perform sampling with replacement on the differential sample set of the transmission pair, and divide the sampling results into a tree structure sample subset and a leaf node estimated sample set.

[0202] In this embodiment, the number of samples in the differential sample set of the transport pair is determined as the sampling number of a single residual corrected causal tree, and random sampling with replacement is used to make the sampling size of each tree consistent with the size of the original differential sample set of the transport pair, while retaining the out-of-bag samples that are not selected.

[0203] The sampling results are randomly sorted, and a portion of the samples are divided into a tree-structured sample subset, while the remaining samples are divided into a leaf node estimation sample set. The sample division ratio is set based on the prediction error of the policy component intervention effect on the out-of-bag samples. Specifically, the method is as follows: the number of samples in the tree-structured sample subset is changed sequentially, and only the sample division results that allow both the tree-structured sample subset and the leaf node estimation sample set to contain all changed policy components and changes in direction are retained, forming a candidate division ratio.

[0204] For any candidate split ratio, a tree structure is constructed using a subset of tree-structured samples, and the leaf node intervention effect is determined by estimating the sample set. Out-of-bag samples are input into the corresponding residual modified causal tree to obtain the predicted intervention effect. The prediction bias is obtained by subtracting the risk evidence difference of the out-of-bag sample from the predicted intervention effect. The prediction bias is multiplied by itself and then by the learned weights of the out-of-bag samples to obtain the weighted squared bias. All weighted squared biases are summed and divided by the sum of the learned weights of all out-of-bag samples to obtain the prediction error of the corresponding candidate split ratio. The candidate split ratio with the smallest prediction error is selected as the target split ratio.

[0205] Step S30332: Based on the tree structure sample subset, perform feature partitioning on the access context before policy execution to obtain a candidate split set.

[0206] In this embodiment, common access features and learning weights are read from a subset of tree-structured samples. For consecutive access features, the feature values ​​are sorted from smallest to largest, adjacent and distinct feature values ​​are selected, and the sum of the two feature values ​​is divided by 2 to obtain candidate split values.

[0207] For discrete access features, for any discrete value, the risk evidence difference of each transport pair differential sample with that discrete value is multiplied by its corresponding learning weight, and the results are summed. The sum is then divided by the sum of the learning weights of the corresponding transport pair differential samples to obtain the weighted average of the risk evidence difference corresponding to that discrete value. The discrete values ​​are then sorted according to their weighted average risk evidence difference. Adjacent positions in the sorted results are selected sequentially, with the discrete values ​​before the sorted position assigned to the first split side, and the remaining discrete values ​​assigned to the second split side, forming candidate discrete splits.

[0208] The candidate splits are validated for validity. After applying the candidate split to a subset of tree-structured samples, the sum of the learned weights of the two resulting nodes is calculated. If the sum of the learned weights of both resulting nodes is not less than the learned weight of the smallest node, the candidate split is added to the candidate split set.

[0209] The minimum node learning weight is set based on the total learning weight of the tree structure sample subset and the validation error. Specifically, the sum of the smaller learning weights of the two splitting nodes formed by each candidate split is used as the candidate minimum node learning weight. For any candidate minimum node learning weight, a residual modified causal tree is constructed according to that candidate value, and the weighted squared prediction error is calculated using out-of-bag samples. The candidate value with the smallest weighted squared prediction error, and which does not form a leaf node containing only one transport pair difference sample, is selected as the minimum node learning weight.

[0210] Step S30333: Apply each candidate split to the subset of tree structure samples to form corresponding split result nodes, and calculate the degree of dispersion of risk evidence difference between the transmission pairs of the differential samples corresponding to each split result node.

[0211] In this embodiment, each candidate split is applied sequentially to the transmission pair differential sample in the current node to be split. Based on the access characteristics and split values ​​corresponding to the candidate splits, the transmission pair differential sample is divided into the first split result node and the second split result node.

[0212] For each partitioning node, the risk evidence difference of each transmission pair of differential samples within the node is multiplied by its corresponding learning weight, and the results are summed. The sum is then divided by the sum of all learning weights within the node to obtain the weighted mean risk evidence difference for that partitioning node.

[0213] Calculate the difference between the risk evidence difference and the weighted average risk evidence difference for each transmission pair within a node. Multiply each difference by itself and then by the corresponding learning weight. Sum the results and divide by the sum of all learning weights within the node to obtain the dispersion of the risk evidence difference for the transmission pairs corresponding to the node in the partitioning result.

[0214] Step S30334: Based on the degree of dispersion of risk evidence differences, learning weights, and matching coverage, construct the residual modified split loss corresponding to each candidate split.

[0215] In this embodiment, the basic discrete loss of the first splitting result node and the second splitting result node are calculated respectively. The specific calculation process is as follows: The degree of dispersion of risk evidence differences is read for each splitting result node. The learning weights of all transmissions for the differential samples within each splitting result node are read and summed to obtain the sum of the learning weights for the corresponding node. The degree of dispersion of risk evidence differences is multiplied by the sum of the learning weights for the corresponding node to obtain the node's basic discrete loss. The node's basic discrete loss for the first splitting result node and the node's basic discrete loss for the second splitting result node are added together to obtain the candidate split's basic discrete loss.

[0216] Calculate the weighted average matching coverage for each of the two partitioned nodes. For any partitioned node, read the matching coverage and learning weights of each transmission pair's differential samples within the node. Multiply each matching coverage by its corresponding learning weight to obtain the weighted matching coverage value for each transmission pair's differential samples. Sum these weighted matching coverage values ​​to obtain the weighted sum of matching coverage values. Sum the learning weights of each transmission pair's differential samples within the node to obtain the sum of the node's learning weights. Divide the weighted sum of matching coverage values ​​by the sum of the node's learning weights to obtain the weighted average matching coverage for that node. Subtract the weighted average matching coverage from 1 to obtain the node's coverage deficiency. Multiply the coverage deficiency by the sum of the node's learning weights to obtain the node's coverage deficiency weighted value. Sum the coverage deficiency weighted values ​​of the two partitioned nodes to obtain the coverage correction loss.

[0217] Read the node residual proportions of the starting and ending policy combination nodes for each transport pair differential sample from the node residual share set. For any transport pair differential sample, add the node residual proportions of the starting and ending policy combination nodes. Divide the sum by 2 to obtain the sample residual proportion of that transport pair differential sample. For any partitioned node, read the sample residual proportions and learning weights of each transport pair differential sample within the node. Multiply each sample residual proportion by its corresponding learning weight to obtain the weighted residual value of each transport pair differential sample. Sum the weighted residual values ​​to obtain the weighted sum of residual proportions. Divide the weighted sum of residual proportions by the sum of the node learning weights to obtain the weighted average node residual proportion of that node. Multiply the weighted average node residual proportion by the sum of the node learning weights to obtain the weighted residual share value of that node. Sum the weighted residual share values ​​of the two partitioned nodes to obtain the residual share correction loss.

[0218] The residual corrected splitting loss is determined jointly by the basic discrete loss, the coverage correction loss, the residual share correction loss, and the corresponding loss coefficients. The specific calculation process is as follows: The basic discrete loss is used as the main loss term. The coverage correction loss is multiplied by the coverage correction loss coefficient to obtain the coverage correction weighted loss. The residual share correction loss is multiplied by the residual share correction loss coefficient to obtain the residual share correction weighted loss. The main loss term, the coverage correction weighted loss, and the residual share correction weighted loss are added together to obtain the residual corrected splitting loss for the corresponding candidate split.

[0219] The basic discrete loss characterizes the concentration of risk evidence differences within each split node after a candidate split. The coverage correction loss characterizes the impact of insufficient sample matching coverage on the splitting results. The residual share correction loss characterizes the impact of the residual share of nodes on the splitting results. The coverage correction loss coefficient adjusts the influence of the coverage correction loss on the residual correction splitting loss. The residual share correction loss coefficient adjusts the influence of the residual share correction loss on the residual correction splitting loss. Through this unified calculation process, the evaluation of candidate splits simultaneously considers the dispersion of risk evidence differences, the degree of matching coverage, and the residual share of nodes, avoiding the problem of selecting splitting nodes solely based on the dispersion of risk evidence differences while ignoring insufficient sample coverage.

[0220] Each loss coefficient is set based on the validation error outside the training samples. Specifically, the setting method is as follows: The base discrete loss coefficient is kept at 1. For candidate splits where the coverage correction loss is not zero, the base discrete loss of the candidate split is divided by the coverage correction loss to obtain the candidate coverage coefficient value. For candidate splits where the residual share correction loss is not zero, the base discrete loss of the candidate split is divided by the residual share correction loss to obtain the candidate residual coefficient value. The candidate coverage coefficient values ​​and candidate residual coefficient values ​​generated from different candidate splits are then deduplicated to form a combination of candidate coefficients.

[0221] For any candidate coefficient combination, a residual corrected causal tree is constructed. Out-of-bag samples are input into this residual corrected causal tree to obtain the predicted intervention effect. The prediction bias is obtained by subtracting the corresponding risk evidence difference from the predicted intervention effect of the out-of-bag samples. The prediction bias is multiplied by itself to obtain the squared bias. The squared bias is multiplied by the corresponding learning weight to obtain the weighted squared bias. All weighted squared biases are summed to obtain the total weighted squared bias. The learning weights of all out-of-bag samples are summed to obtain the sum of the out-of-bag sample learning weights. The total weighted squared bias is divided by the sum of the out-of-bag sample learning weights to obtain the prediction error of the policy component intervention effect. The candidate coefficient combination with the smallest prediction error of the policy component intervention effect is selected as the target loss coefficient. When the coverage correction loss or residual share correction loss is 0 in all candidate splits, the corresponding loss coefficient is set to 0.

[0222] For example, in this embodiment of the application, the coverage correction loss coefficient is preferably 0.10 to 0.50, and the residual share correction loss coefficient is preferably 0.10 to 0.40. The basic discrete loss of the first candidate split is 0.18, the coverage correction loss is 0.12, and the residual share correction loss is 0.08. The coverage correction loss coefficient is 0.30, and the residual share correction loss coefficient is 0.20. Multiplying 0.12 by 0.30 yields a coverage correction weighted loss of 0.036. Multiplying 0.08 by 0.20 yields a residual share correction weighted loss of 0.016. Adding 0.18, 0.036, and 0.016 yields a residual correction split loss of 0.232.

[0223] Step S30335: Select the candidate split with the largest decrease in residual corrected split loss as the target split, and take the partition result node corresponding to the target split as the node to be partitioned in the next round, and recursively form the residual corrected causal tree set.

[0224] In this embodiment, the residual corrected node loss is calculated when the current node to be partitioned has not been split. The specific calculation process is as follows: The risk evidence difference of each transmission pair differential sample within the current node to be partitioned is multiplied by its corresponding learning weight, and the results are summed. The sum is divided by the sum of the learning weights of the current node to be partitioned to obtain the weighted mean risk evidence difference of the current node. The difference between each risk evidence difference and the weighted mean risk evidence difference is calculated, and each difference is multiplied by itself and then by its corresponding learning weight. The results are summed to obtain the basic discrete loss of the current node. Following the calculation methods for coverage correction loss and residual share correction loss in step S30334, the coverage correction loss and residual share correction loss of the current node are obtained, and a weighted sum is performed based on the target loss coefficient to obtain the residual corrected node loss when the current node to be partitioned has not been split.

[0225] Subtracting the residual correction node loss from the residual correction split loss corresponding to each candidate split yields the degree of loss reduction for each candidate split.

[0226] The candidate split with the largest decrease in loss is selected as the target split, and the two split result nodes corresponding to the target split are determined as the nodes to be split in the next round.

[0227] For the next round of nodes to be partitioned, candidate splits are generated, residual corrected split losses are calculated, and target splits are selected until there are no candidate splits for nodes whose loss decrease is greater than 0 and which meet the minimum node learning weight. Then the iteration stops and a single residual corrected causal tree is formed.

[0228] The number of residual corrected causal trees and the maximum tree depth are set based on the validation error. Specifically, the integers from layer 1 to the maximum number of splittable layers that can be formed under the minimum node learning weight constraint are sequentially used as candidate maximum tree depths. For any candidate maximum tree depth, starting with one residual corrected causal tree, the depth is increased sequentially, and the weighted squared prediction error of out-of-bag samples is calculated after each increase. When the number of consecutive times the weighted squared prediction error of the current out-of-bag samples is not lower than the previous minimum error reaches the number of accessed context features after adding a new residual corrected causal tree, the addition of residual corrected causal trees stops. The number of trees formed before stopping is taken as the number of candidate trees.

[0229] Residual modified causal tree sets corresponding to the maximum tree depth and number of candidate trees are constructed respectively. The candidate combination with the smallest out-of-bag sample weighted squared prediction error is selected as the target parameter. When multiple candidate combinations have the same out-of-bag sample weighted squared prediction error, the candidate combination with fewer trees and smaller maximum tree depth is selected.

[0230] For example, according to the above setting method, the number of residual corrected causal trees in this embodiment is preferably 100 to 500, and the maximum tree depth is preferably 4 to 12 layers. The residual corrected node loss of the current node to be split is 0.36, and the residual corrected split losses of the first candidate split and the second candidate split are 0.23 and 0.27, respectively. Subtracting 0.23 from 0.36 yields a first loss reduction of 0.13. Subtracting 0.27 from 0.36 yields a second loss reduction of 0.09. The first candidate split is selected as the target split.

[0231] Step S3034: Based on the residual corrected causal tree set and the leaf node estimated sample set, perform leaf node effect correction and multi-tree integration to obtain the policy component intervention effect set.

[0232] In this embodiment, the estimated sample set of leaf nodes corresponding to each residual modified causal tree is input into the corresponding residual modified causal tree. Based on the target split recorded by the tree node, the estimated sample of each leaf node is mapped to the corresponding leaf node layer by layer.

[0233] For each leaf node, the risk evidence difference of the estimated samples at each leaf node is multiplied by the corresponding learning weight, and the results are summed. The sum is then divided by the sum of all learning weights within the leaf node to obtain the initial intervention effect of the leaf node.

[0234] The sum of all learned weights within a leaf node is determined as the effective learned weight of the leaf node. The effective learned weight of the leaf node is divided by the sum of the effective learned weight of the leaf node and the effect shrinkage parameter to obtain the leaf node retention ratio. The initial intervention effect of the leaf node is multiplied by the leaf node retention ratio, and the parent node intervention effect is multiplied by 1 and subtracted from the leaf node retention ratio. The two products are then added together to obtain the corrected leaf node intervention effect.

[0235] The effect shrinkage parameter is set based on the validation error of the leaf node estimation sample set. The specific setting method is as follows: The effective learning weights of the leaf nodes in each residual modified causal tree are summarized, and the effective learning weights of leaf nodes that are 0 or different are used as candidate effect shrinkage parameters. For any candidate effect shrinkage parameter, effect correction is applied to each leaf node, and out-of-bag samples are input into the corresponding residual modified causal tree to obtain the predicted intervention effect value for the out-of-bag samples. The prediction bias is obtained by subtracting the corresponding risk evidence difference from the predicted intervention effect value. The prediction bias is multiplied by itself and then multiplied by the corresponding learning weight. The results are summed and divided by the sum of the learning weights of all out-of-bag samples to obtain the validation error corresponding to the candidate effect shrinkage parameter. The candidate value with the smallest validation error is selected as the target effect shrinkage parameter.

[0236] The tree ensemble weights are determined based on the prediction errors of each residual modified causal tree on samples not trained by the corresponding tree. For any residual modified causal tree, the prediction bias is obtained by subtracting the corresponding risk evidence difference from the predicted intervention effect of out-of-bag samples. The prediction bias is then multiplied by itself, and then by the corresponding learning weight. The sum of the results is divided by the sum of the learning weights of all out-of-bag samples to obtain the prediction error of that residual modified causal tree.

[0237] When the prediction errors of all residual corrected causal trees are greater than 0, the reciprocal of each prediction error is calculated, and the reciprocals of all prediction errors are summed to obtain a total sum. Then, the reciprocal of any prediction error is divided by the total sum to obtain the corresponding tree integration weight. When there are residual corrected causal trees with a prediction error of 0, only these residual corrected causal trees with a prediction error of 0 are retained, and the tree integration weights are evenly distributed among these residual corrected causal trees. The intervention effect of the corrected leaf node output of each residual corrected causal tree is multiplied by the corresponding tree integration weight, and the results are summed to obtain the intervention effect of each common access feature and change strategy component, forming the policy component intervention effect set.

[0238] For example, the effect shrinkage parameter is determined according to the above setting method. In this embodiment, the effect shrinkage parameter is preferably 5 to 30. The initial intervention effect of the first leaf node is -0.24, the effective learning weight of the leaf node is 18, and the effect shrinkage parameter is 12. Dividing 18 by the sum of 18 and 12 yields a leaf node retention ratio of 0.60. The intervention effect of the parent node is -0.10. Multiplying -0.24 by 0.60 yields -0.144. Multiplying -0.10 by 0.40 yields -0.040. Adding -0.144 and -0.040 yields the corrected leaf node intervention effect of -0.184.

[0239] Step S304: Based on the policy component intervention effect set, correct the risk evidence after policy implementation to obtain the basic risk sample set and the candidate policy response sample set.

[0240] In this embodiment, policy combination nodes are grouped according to the sensitivity of privacy data. Within each sensitivity group, the protection strength of each policy combination node is determined based on the encryption algorithm protection level, key rotation frequency, and encryption granularity.

[0241] The encryption algorithm protection level is set according to the effective security strength of the algorithm registered in the encryption policy configuration. The specific setting method is as follows: read the effective key security number of bits and the algorithm compliance level of each encryption algorithm, sort them first according to the effective key security number of bits from small to large, and when the effective key security number of bits is the same, sort them according to the algorithm compliance level from low to high, and number them sequentially starting from 0 to obtain the encryption algorithm protection level.

[0242] The key type protection level is set based on the actual validity period of the key. The specific method is as follows: read the rotation cycle of each working key and the session validity period of each session's temporary derived key, sort them according to their actual validity period from longest to shortest, and number them sequentially starting from 0. The shorter the actual validity period of the key, the higher the key type protection level.

[0243] The encryption granularity protection level is set based on the sensitive field encryption coverage and the amount exposed in a single decryption operation. The specific setting method is as follows: Divide the number of encrypted sensitive fields at the corresponding encryption granularity by the total number of sensitive fields in the target data to obtain the sensitive field encryption coverage. First, sort the sensitive field encryption coverage from low to high. When the sensitive field encryption coverage is the same, sort them again from highest to lowest based on the number of sensitive fields that enter plaintext state after one decryption operation, and number them sequentially starting from 0 to obtain the encryption granularity protection level.

[0244] The encryption algorithm protection level, key type protection level, and encryption granularity protection level are sequentially numbered, and then the three sequential numbers are added together to obtain the protection strength order value of the strategy combination node. The three protection levels are added with equal weight because this protection strength order value is only used to select the benchmark node for intervention effect correction and is not directly used as a risk prediction value. Using equal weights avoids artificially amplifying any strategy component when additional verification evidence is lacking. The strategy combination node with the smallest protection strength order value and the largest number of associated historical access samples is selected as the benchmark strategy combination node for the corresponding sensitivity group.

[0245] For each historical access-related sample, the shortest intervention path from the baseline policy combination node to the policy combination node of the historical access-related sample is determined from the encryption policy intervention graph. The path length of each policy component intervention edge is set to 1, and a breadth-first search is used to determine the path with the fewest number of policy component intervention edges, which is taken as the shortest intervention path. The policy component intervention effects corresponding to each policy component intervention edge on the shortest intervention path are accumulated according to the path direction to obtain the cumulative intervention effect of the actual encryption policy.

[0246] When multiple shortest intervention paths of equal length exist, for any shortest intervention path, the learning weights of the corresponding policy control samples along each policy component intervention edge of that path are summed to obtain the effective path weight. The effective path weights of all shortest intervention paths are summed to obtain the total effective path weight. The effective path weight of any given path is divided by the total effective path weight to obtain the corresponding path weight. The cumulative intervention effect of each path is multiplied by its corresponding path weight, and the results are summed to obtain the weighted cumulative intervention effect. When the total effective path weight is 0, the path weights are evenly distributed among the shortest intervention paths.

[0247] The basic risk value of the corresponding historical access-related sample is obtained by subtracting the cumulative intervention effect of the actual encryption policy from the risk evidence value after policy execution of the historical access-related sample. The access context before policy execution, the sensitivity of privacy data, and the basic risk value are then correlated to form a basic risk sample set.

[0248] For each candidate encryption strategy in the candidate encryption strategy set, candidate intervention paths are determined from the baseline strategy combination node to the corresponding strategy combination node of the candidate encryption strategy. The cumulative intervention effect of the candidate strategies is calculated based on the intervention effects of the strategy components along the candidate intervention paths. The specific calculation process is the same as that for calculating the cumulative intervention effect of actual encryption strategies. The basic risk value and the cumulative intervention effect of the candidate strategies are added together to obtain the risk response value corresponding to the candidate encryption strategy.

[0249] The access context, privacy data sensitivity, basic risk value, candidate encryption policy and risk response value are correlated before policy execution to form a candidate policy response sample set.

[0250] For example, the risk evidence value after policy execution for the first historical access associated sample is 0.46, and the cumulative intervention effect of the actual encryption policy relative to the baseline policy combination node is -0.18. Subtracting -0.18 from 0.46 yields a base risk value of 0.64. The cumulative intervention effect of the first candidate encryption policy is -0.25. Adding 0.64 and -0.25 yields a risk response value of 0.39 corresponding to the first candidate encryption policy.

[0251] Step S305: Perform ensemble learning on the basic risk sample set and the candidate strategy response sample set respectively to obtain the basic risk ensemble model and the candidate strategy response ensemble model.

[0252] In this embodiment, the basic risk integration model includes a basic risk feature encoding module, a basic risk tree set construction module, and a basic risk output module. The basic risk feature encoding module converts user roles and permissions, access source location, device security status, network environment, access time, operation type, access data volume, and privacy data sensitivity into basic risk input features. For discrete input features, binary feature bits are established for each discrete value. When the current sample has a corresponding discrete value, the corresponding feature bit is set to 1; otherwise, it is set to 0. For continuous input features, the current feature value is subtracted from the minimum value in the training samples, and then divided by the difference between the maximum and minimum values ​​in the training samples to obtain a normalized feature value. When the maximum and minimum values ​​are the same, the normalized feature value is set to 0.

[0253] The basic risk tree set construction module is used to train multiple regression trees based on basic risk input features and basic risk values. For each basic risk regression tree, sampling with replacement is performed from the basic risk training samples, with the number of samples being the same as the number of basic risk training samples. For any node to be split, a corresponding number of candidate features are selected from all basic risk input features, and for each candidate split, the sum of the squared deviations of the basic risk values ​​within the two child nodes relative to the average basic risk values ​​of the corresponding child nodes is calculated. The candidate split with the smallest sum of squared deviations is selected as the target split. Leaf nodes that cannot be split further output the average basic risk value within the leaf node. The basic risk output module is used to calculate the average of the output results of each regression tree to generate the basic risk prediction value.

[0254] The candidate policy response ensemble model comprises a policy response feature encoding module, a policy response tree set construction module, and a policy response output module. The policy response feature encoding module converts the pre-policy execution access context, privacy data sensitivity, basic risk value, encryption algorithm policy component, key type policy component, and encryption granularity policy component into policy response input features. The policy response input features employ the same discrete feature encoding method and continuous feature normalization method as the basic risk input features.

[0255] The policy response tree set construction module is used to train multiple regression trees based on the policy response input features and the risk response values ​​corresponding to candidate encryption policies. The policy response regression trees employ the same methods as the basic risk regression trees, including sampling with replacement, candidate feature selection, node splitting, and leaf node output, and use the risk response value as the regression target. The policy response output module is used to calculate the average of the output results of each regression tree to generate predicted values ​​for candidate policy responses.

[0256] The basic risk sample set and the candidate policy response sample set are divided into training samples and validation samples, respectively. The sample division ratio is set according to the validation error. The specific setting method is as follows: the number of training samples is changed sequentially, and only the basic risk sample division result that can include all privacy data sensitivity in both training samples and validation samples, and the candidate policy response sample division result that can include all privacy data sensitivity and candidate encryption policy combinations are retained, forming the candidate training sample ratio.

[0257] For any given proportion of candidate training samples, train both the basic risk ensemble model and the candidate policy response ensemble model. Subtract the corresponding true value from the model's predicted value for each validation sample to obtain the prediction bias. Multiply the prediction bias by itself, sum all squared biases, and divide by the number of validation samples to obtain the validation error. Select the proportion of candidate training samples with the smallest validation error as the target split proportion.

[0258] The number of regression trees, maximum tree depth, minimum number of samples per node, and number of candidate features per split are determined through cross-validation. Specifically, the training samples are stratified according to privacy sensitivity and candidate encryption strategy combinations, and divided into multiple non-overlapping subsets. The number of subsets is determined based on the sample size, specifically by selecting the maximum subset size that ensures each subset contains samples from all strata types. One subset is then used as the validation subset, and the remaining subsets are used as the training subset.

[0259] The candidate values ​​for the maximum tree depth are integers ranging from 1 to the maximum number of splittable layers that can be formed under the constraint of the minimum number of samples per node. The candidate values ​​for the minimum number of samples per node are feasible integers that ensure that each child node retains at least one sample after each split. The candidate values ​​for the number of features per split are integers ranging from 1 to the total number of input features. The number of regression trees is increased incrementally starting from one, and the validation error is calculated after each increase. The addition of regression trees stops when the number of consecutive times the validation error after adding a new regression tree is not lower than the previous minimum validation error reaches the number of input features.

[0260] For each parameter combination, the validation error for each validation subset is calculated. These validation errors are then summed and divided by the number of validation subsets to obtain the average validation error. The parameter combination with the smallest average validation error is selected as the target model parameter. When multiple parameter combinations have the same average validation error, the parameter combination with fewer regression trees, a smaller maximum tree depth, and a larger minimum number of samples per node is selected.

[0261] For example, according to the above setting method, the training sample ratio in this embodiment is preferably 0.70 to 0.85, the number of regression trees is preferably 200 to 600, the maximum tree depth is preferably 6 to 16 layers, and the minimum number of samples per node is preferably 5 to 30. 300 basic risk regression trees are trained using 4800 basic risk samples. The candidate encryption strategy set includes 3 candidate encryption strategies. The 4800 basic risk samples are combined with the 3 candidate encryption strategies respectively, and 4800 are multiplied by 3 to obtain 14400 candidate strategy response samples. 400 strategy response regression trees are trained using these 14400 candidate strategy response samples to obtain the basic risk ensemble model and the candidate strategy response ensemble model.

[0262] Step S4: Input the target access dataset into the basic risk ensemble model and the candidate policy response ensemble model to determine the target dynamic encryption policy and obtain the privacy data dynamic encryption result.

[0263] The specific steps of step S4 are as follows:

[0264] Step S401: Input the target access dataset into the basic risk integration model to generate the target basic risk.

[0265] In this embodiment, the target access context and target privacy data sensitivity are extracted from the target access dataset, and feature transformation is performed using the feature encoding rules and normalization parameters saved during the training of the basic risk ensemble model to form the target basic risk input features.

[0266] The target basic risk input features are input into each basic risk regression tree in the basic risk ensemble model. Each basic risk regression tree maps the target basic risk input features to the corresponding leaf nodes according to the tree node splitting conditions, and outputs the corresponding basic risk prediction value.

[0267] The target basic risk is obtained by summing the basic risk predictions output by each basic risk regression tree and then dividing by the number of basic risk regression trees.

[0268] Step S402: Input the target access dataset and target basic risk into the candidate policy response integration model, predict the policy response corresponding to each candidate encryption policy in the candidate encryption policy set, and form a candidate policy response result set.

[0269] In this embodiment, each candidate encryption strategy in the candidate encryption strategy set is read sequentially, and each candidate encryption strategy is split into encryption algorithm strategy component, key type strategy component, and encryption granularity strategy component.

[0270] The target access context, target privacy data sensitivity, target basic risk, and the three policy components corresponding to each candidate encryption policy are transformed according to the feature encoding rules saved during the training of the candidate policy response ensemble model to form the policy response input features corresponding to each candidate encryption policy.

[0271] The input features of each policy response are input into the candidate policy response ensemble model. The policy response prediction value of the corresponding candidate encryption policy is output by the regression tree of each policy response. The output values ​​of all policy response regression trees are added together and then divided by the number of policy response regression trees to obtain the policy response corresponding to the candidate encryption policy.

[0272] The candidate encryption policy identifier, policy response prediction value, encryption algorithm policy component, key type policy component, and encryption granularity policy component are correlated to form a candidate policy response result set.

[0273] For example, the target base risk is 0.76, and the candidate encryption strategy set includes a first candidate encryption strategy, a second candidate encryption strategy, and a third candidate encryption strategy. The predicted policy responses output by the candidate policy response ensemble model are 0.42, 0.31, and 0.24, respectively. These three predicted policy responses are then associated with their corresponding candidate encryption strategies to form the candidate policy response result set.

[0274] Step S403: Based on the candidate policy response result set, determine the target dynamic encryption policy, encrypt the target privacy data, and obtain the privacy data dynamic encryption result.

[0275] In this embodiment, a risk tolerance limit is determined based on the sensitivity of the target privacy data. The risk tolerance limit is set based on the risk evidence value in historical access-related samples and the confirmed risk handling results. The rules for classifying acceptable and unacceptable risk samples are set based on whether additional security measures were required during the historical access process. Specifically, historical access-related samples that did not trigger access blocking, forced re-encryption, or manual review after the access process were completed are identified as acceptable risk samples; historical access-related samples that triggered any of these measures are identified as unacceptable risk samples.

[0276] For each level of privacy data sensitivity, corresponding historical access-related samples are selected, and the different risk evidence values ​​are arranged from smallest to largest. Two adjacent risk evidence values ​​are selected sequentially, added together, and then divided by 2 to obtain the candidate risk tolerance upper limit. For any candidate risk tolerance upper limit, samples with risk evidence values ​​not greater than the upper limit are classified as acceptable risk samples, and samples with risk evidence values ​​greater than the upper limit are classified as unacceptable risk samples. The number of unacceptable risk samples incorrectly classified as acceptable risk samples is counted to obtain the number of incorrect acceptances; the number of acceptable risk samples incorrectly classified as unacceptable risk samples is counted to obtain the number of incorrect rejections. The number of incorrect acceptances and incorrect rejections are added together to obtain the number of classification errors.

[0277] The candidate risk tolerance limit with the fewest classification errors is selected as the risk tolerance limit for the corresponding sensitivity. When multiple candidate risk tolerance limits correspond to the same number of classification errors, the candidate risk tolerance limit with fewer accepted errors is selected first; when the number of accepted errors is still the same, the candidate risk tolerance limit with the smaller value is selected.

[0278] Candidate encryption strategies with predicted response values ​​no greater than the risk tolerance limit are selected from the candidate strategy response result set to form an optional strategy set. For each candidate encryption strategy in the optional strategy set, the corresponding average encryption processing time is calculated based on historical encryption execution records. The specific calculation process is as follows: the historical encryption processing times of the corresponding candidate encryption strategy are added together, and then divided by the number of historical encryption executions to obtain the average encryption processing time. The candidate encryption strategy with the shortest average encryption processing time is selected as the target dynamic encryption strategy. When multiple candidate encryption strategies have the same average encryption processing time, the candidate encryption strategy with the smaller predicted response value is selected. When there is no candidate encryption strategy with a predicted response value no greater than the risk tolerance limit, the candidate encryption strategy with the smallest predicted response value is selected as the target dynamic encryption strategy.

[0279] The algorithm, key type, and encryption granularity of the target dynamic encryption policy are read. When the key type is a working key, the working key for the corresponding rotation cycle is read from the hardware security module. When the key type is a session temporary derived key, the master key is used as the input key material, and the target request identifier and target access time are concatenated into a derived context according to a fixed field order. A random salt value is then generated by the hardware security module. The HKDF key derivation function is used to first generate a pseudo-random key based on the input key material and the random salt value, and then a session temporary derived key is generated based on the pseudo-random key, the derived context, and the key length required by the target encryption algorithm. The field to be encrypted or the record to be encrypted in the target privacy data is determined according to the encryption granularity, and the encryption algorithm interface corresponding to the target dynamic encryption policy is called to perform encryption, obtaining the dynamic encryption result of the privacy data.

[0280] Example 2:

[0281] See Figure 3 This embodiment provides a dynamic encryption system for privacy data, including: a data acquisition module, an access mapping module, an optimal transmission module, and a privacy encryption module.

[0282] The data acquisition module is used to acquire the historical access basic dataset.

[0283] The access mapping module performs access phase association and target access mapping based on the historical access base dataset to obtain the historical access association sample set and the target access dataset.

[0284] The optimal transmission module constructs an encryption strategy intervention graph based on a historical access association sample set and performs split-type partial optimal transmission matching to obtain a basic risk integration model and a candidate strategy response integration model.

[0285] The privacy encryption module is used to input the target access dataset into the basic risk integration model and the candidate policy response integration model, determine the target dynamic encryption policy, and obtain the privacy data dynamic encryption result.

[0286] The specific functions of each module described above are explained in the relevant content of the method in Embodiment 1, and will not be repeated here.

[0287] In addition, the parts of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of the corresponding technical solutions in the prior art have not been described in detail, so as to avoid excessive elaboration.

[0288] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for dynamic encryption of privacy data, characterized in that, include: Obtain a historical access baseline dataset, which includes a privacy data sensitivity label set, target access requests, and a candidate encryption policy set; Based on the historical access dataset, access phase association and target access mapping are performed to obtain the historical access association sample set and the target access dataset. Based on the historical access association sample set, an encryption policy intervention graph is constructed, and a split-type partial optimal transmission matching is performed to obtain a basic risk integration model and a candidate policy response integration model. By inputting the target access dataset into the basic risk ensemble model and the candidate policy response ensemble model, the target dynamic encryption policy is determined, and the result of dynamic encryption of privacy data is obtained.

2. The dynamic encryption method of privacy data according to claim 1, wherein, The process of associating access stages and mapping target accesses based on the historical access dataset to obtain a historical access association sample set and a target access dataset includes: The historical access dataset is correlated and divided into access stages to form a historical access time-series record set. The historical access time sequence records are used to determine the access context before policy execution, the actual encryption policy, and the risk evidence after policy execution, and the corresponding privacy data sensitivity is marked to form a historical access associated sample set. Based on the target access request and the privacy data sensitivity tag set, the target access context, target privacy data, and target privacy data sensitivity are determined to form the target access dataset.

3. The dynamic encryption method of privacy data according to claim 2, wherein, The process involves constructing an encryption policy intervention graph based on a historical access association sample set, and performing split-stream partial optimal transmission matching to obtain a basic risk integration model and a candidate policy response integration model, including: The actual encryption strategy is broken down into its components, and the strategies are combined and aggregated for each historical access-related sample to construct an encryption strategy intervention graph. By using the encryption strategy intervention graph, the historical access-related samples are matched in a split-flow partial optimal transmission to form a strategy comparison transmission result set. The strategy comparison transmission result set includes a set of strategy comparison sample pairs, comparison sample transmission weights, and a set of node residual shares. Based on the policy-comparison transmission result set, a transmission pair differential sample set is constructed, and causal forest ensemble learning is performed to generate a policy component intervention effect set; Based on the policy component intervention effect set, the risk evidence after policy implementation is corrected to obtain the basic risk sample set and the candidate policy response sample set; The basic risk sample set and the candidate strategy response sample set are integrated for learning to obtain the basic risk ensemble model and the candidate strategy response ensemble model.

4. The dynamic encryption method of privacy data according to claim 3, wherein, The process of breaking down the actual encryption strategy into its components and combining and aggregating strategies from historical access-related samples to construct an encryption strategy intervention graph includes: Each actual encryption strategy is broken down into encryption algorithm strategy components, key type strategy components, and encryption granularity strategy components, forming a strategy component combination set; Based on the strategy component combination set, historical access association samples with the same strategy components are grouped into corresponding strategy combination nodes, thus obtaining the strategy combination node set of related historical access association samples. Identify a pair of strategy combination nodes with only one different strategy component, establish strategy component intervention edges between each pair of strategy combination nodes, and mark the changing strategy component and the direction of change to form a set of strategy component intervention edges; Based on the set of policy combination nodes and the set of policy component intervention edges, a graph structure is organized to construct an encrypted policy intervention graph.

5. The dynamic encryption method of privacy data according to claim 4, wherein, The process involves using an encryption strategy intervention graph to perform split-stream partial optimal transmission matching on historical access-related samples, forming a strategy-matched transmission result set, including: Based on the encryption strategy intervention diagram, determine the initial transmission share corresponding to each historical access associated sample; Extract historical access association samples associated with the strategy combination nodes at both ends of each intervention edge from the set of strategy component intervention edges, calculate the access context distance, and determine the range of matching distances; Based on the initial transmission share, access context distance, and matchable distance range, partial optimal transmission matching is performed between the policy combination nodes at both ends of the policy component intervention edge to obtain the matching result of this round. Based on the matching results of this round, the transmission shares that did not form a match are returned to the corresponding strategy combination node and redistributed. The matching results of each round are summarized to obtain the strategy comparison transmission result set.

6. The dynamic encryption method of privacy data according to claim 5, wherein, The process involves performing partially optimal transmission matching between the policy combination nodes at both ends of the policy component intervention edge, based on the initial transmission share, access context distance, and matchable distance range, to obtain the matching results for this round, including: Based on the access context distance and the matchable distance range, determine the matchable relationship between the historical access association samples corresponding to the policy combination nodes at both ends of the intervention edge of each policy component; The initial transmission share of each historical access associated sample is assigned to the intervention edge of the policy component with a matching relationship to form the transmission share to be matched. Partial optimal transmission matching is performed by using the unmatched transmission share and the access context distance to form the matching sample pairs and the matching transmission weights for this round. The matching sample pairs and the transmission weights of this round are summarized to form the matching results of this round corresponding to the intervention edges of each strategy component.

7. The dynamic encryption method of privacy data according to claim 3, wherein, The step of constructing a differential sample set of transport pairs based on the policy-comparison transport result set and performing causal forest ensemble learning to generate a set of policy component intervention effects includes: The common access features, changed policy components, and differences in risk evidence after policy execution of each policy control sample pair are extracted from the policy control sample pair set to form the initial transport pair differential sample set. Based on the initial transport pair differential sample set, the control sample transport weights, and the node residual share set, the matching coverage degree and learning weights of each initial transport pair differential sample are calculated to obtain the transport pair differential sample set. By transmitting the differential sample set, a residual corrected split loss is constructed, and the tree nodes are recursively divided to form a residual corrected causal tree set and a leaf node estimation sample set; Based on the residual corrected causal tree set and the leaf node estimated sample set, leaf node effect correction and multi-tree ensemble are performed to obtain the policy component intervention effect set.

8. The dynamic encryption method of privacy data according to claim 7, wherein, The process of constructing a residual corrected split loss by transmitting the differential sample set and recursively partitioning the tree nodes to form a residual corrected causal tree set and a leaf node estimation sample set includes: The transmission differential sample set is sampled with replacement, and the sampling results are divided into a tree-structured sample subset and a leaf node estimated sample set. Based on a subset of tree-structured samples, feature partitioning is performed on the access context before policy execution to obtain a candidate split set; Each candidate split is applied to a subset of tree-structured samples to form corresponding split result nodes, and the degree of dispersion of risk evidence difference between the transmission pairs of the differential samples corresponding to each split result node is calculated. Based on the degree of dispersion of risk evidence differences, learning weights, and matching coverage, a residual corrected split loss is constructed for each candidate split. The candidate split with the largest decrease in residual corrected split loss is selected as the target split, and the node corresponding to the target split is selected as the node to be split in the next round, thus recursively forming a set of residual corrected causal trees.

9. The dynamic encryption method of privacy data according to claim 3, wherein, The step of inputting the target access dataset into the basic risk ensemble model and the candidate policy response ensemble model to determine the target dynamic encryption policy and obtain the privacy data dynamic encryption result includes: Input the target access dataset into the basic risk ensemble model to generate the target basic risk; The target access dataset and the target basic risk are input into the candidate policy response ensemble model to predict the policy response corresponding to each candidate encryption policy in the candidate encryption policy set, thus forming a candidate policy response result set. Based on the candidate policy response result set, the target dynamic encryption policy is determined, the target privacy data is encrypted, and the privacy data dynamic encryption result is obtained.

10. A privacy data dynamic encryption system for implementing the privacy data dynamic encryption method according to any one of claims 1 to 9, characterized in that, include: The data acquisition module is used to acquire the basic dataset of historical accesses; The access mapping module performs access phase association and target access mapping based on the historical access base dataset, and obtains the historical access association sample set and the target access dataset. The optimal transmission module constructs an encryption strategy intervention graph based on a historical access association sample set and performs split-type partial optimal transmission matching to obtain a basic risk integration model and a candidate strategy response integration model. The privacy encryption module is used to input the target access dataset into the basic risk ensemble model and the candidate policy response ensemble model, determine the target dynamic encryption policy, and obtain the privacy data dynamic encryption result.