Data control method and system, electronic equipment and storage medium

By compiling and deploying smart contracts for data control strategies on the blockchain, a decentralized strategy decision point is constructed, which solves the problem of strategy dynamism and consistency in the trusted data space, realizes fine-grained data control and full-process monitoring, and improves the efficiency and security of data control.

CN121396484APending Publication Date: 2026-01-23TONGFANG KNOWLEDGE DIGITAL PUBLISHING TECH CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202511480671.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-16
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

Existing technologies face challenges in policy dynamism and consistency within trusted data spaces, lack sufficient control granularity, lack effective constraints on data usage, and suffer from a lack of audit credibility, making it difficult to meet complex and ever-changing data control needs.

Method used

A data control method based on the five-tuple framework is adopted. By compiling the data control strategy into smart contracts and deploying them on the blockchain, a decentralized policy decision point is built to realize dynamic access and usage control. Combined with smart contracts, authentication, context verification and historical record query are performed to ensure that the data runs in an environment that conforms to the policy and to monitor the computing process.

Benefits of technology

It enables dynamic and adaptive execution of data control, improves the fineness and full-process coverage of control, ensures the consistency and reliability of policy execution, reduces operation and maintenance costs and the risk of human error, and provides end-to-end security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121396484A_ABST
    Figure CN121396484A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a data control method and system, electronic equipment and a storage medium, and the method comprises the steps: receiving a data control strategy defined by a data owner, and the data control strategy is constructed based on a quintuple framework and comprises a subject, an object, an environment condition, an operation behavior and an effect; compiling the data control strategy into an intelligent contract code, and generating a source code based on an intelligent contract template; deploying the smart contract code to a block chain network to form a decentralized strategy decision point; intercepting the data access request, triggering the smart contract to verify the access request, and generating an access credential when the verification is passed; and allowing data access based on the access credential, and monitoring a data use behavior to ensure consistency with the data control strategy. According to the method, the fine granularity and the whole-process coverage of data control can be improved, the auditing credibility can be improved, the automation level and the efficiency of a control system can be improved, and the end-to-end safety guarantee capability is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of computers, and in particular to a data control method and system, electronic equipment and storage medium. BACKGROUND

[0002] At present, in the digital economy era, data has become a key production factor. Promoting the safe, reliable circulation and sharing of data elements is of great significance to releasing data value and promoting industrial upgrading. In this context, the concept of "trusted data space" has emerged as the times require. Its core vision is to promote the collaborative use of data among different participants while protecting data sovereignty. Data sovereignty means that the data owner always has control over the data, including knowing who, when, for what purpose, and in what way the data is used.

[0003] Data control technology is a key technical guarantee for realizing data sovereignty. Its goal is to still be able to implement fine and continuous constraints and management on the access and use of data after the data leaves the data owner's domain. At present, the main technical solutions for realizing data control under the trusted data space in the industry include the following categories:

[0004] The first category is a static policy-based access control scheme. This type of scheme usually uses a policy-based access control or attribute-based access control model. The data owner predefines a set of static access rules, and the policy execution point releases or blocks access requests according to these rules. However, this type of scheme has obvious defects: first, the policy is rigid and lacks dynamicity. Once the authorization is completed, the data user can use the data unlimited times within the effective period, and cannot be dynamically adjusted or revoked immediately according to the real-time context. Second, the control granularity is insufficient. Traditional schemes focus on "whether to allow access", but lack effective in-process and post-process control means for "how to use data", resulting in a high risk of data misuse.

[0005] The second category is a blockchain-based evidence and audit scheme. This type of scheme uses the immutability of the blockchain to record the key operation logs in the form of hash during the data access and use process on the chain, forming a trusted audit clue for post-tracing and accountability. However, it is essentially a passive and post-remedial control. Although it can record violations, it cannot actively intervene and block before or when the violation occurs. Once the data is obtained by violation, the loss and impact caused by it are difficult to recover.

[0006] The third type is a scheme based on a centralized policy server. This scheme relies on a trusted central policy decision point to uniformly manage and execute all data control policies, and all access requests need to be sent to the center for adjudication. This method has the risk of single point of failure and performance bottleneck. Once the centralized server is down or attacked, the entire sharing ecosystem will be paralyzed. At the same time, in the cross-organizational and cross-domain data exchange scene, all participants are required to trust the same centralized institution, which is contrary to the core concept of "decentralized trust" in the trusted data space.

[0007] In summary, the existing technology mainly has the following core problems in dealing with the complex and variable data control requirements in the trusted data space: the dynamic and consistency problems of the policy, the delay of policy update, distribution and execution in the traditional centralized policy model, which is difficult to cope with the frequent changes of data use scenarios and context environment; the lack of control granularity, which lacks effective constraints on data use control; the lack of audit credibility, the policy execution records are stored in the respective centralized system, which is difficult to prove innocence. Although the introduction of blockchain technology can improve the audit credibility, if the blockchain is only used as a storage tool, and the policy management and execution still rely on the old architecture, the problem of dynamic policy execution and consistent trust cannot be fundamentally solved.

[0008] Therefore, the present application provides a data control method to solve the above technical problems. SUMMARY

[0009] The purpose of the present application is to provide a data control method, system, electronic device and storage medium to solve the technical problems of inability to meet the dynamic and consistency of the policy and lack of audit credibility in the prior art.

[0010] In order to solve the above technical problems, the present application provides a data control method, comprising:

[0011] Receiving a data control policy defined by a data owner, the data control policy being constructed based on a five-tuple framework, including a subject, an object, an environmental condition, an operation behavior and an effect, wherein the effect includes an allow, a prohibit and an obligation type, and the obligation type is used to define additional conditions that must be met before and after executing the allow operation;

[0012] Compiling the data control policy into smart contract code, wherein the compiling includes parsing the policy to generate a policy object model, generating an intermediate representation logic, and generating source code based on a smart contract template;

[0013] Deploying the smart contract code to a blockchain network to form a decentralized policy decision point for executing policy verification and recording audit logs;

[0014] intercepting a data access request, triggering a smart contract to verify the access request, and generating an access credential upon verification, wherein the verification includes identity credential verification, context information check, and history usage record query;

[0015] allowing data access based on the access credential, and monitoring data usage behavior to ensure compliance with the data control policy, wherein the monitoring includes ensuring data runs in a policy-compliant environment, monitoring computing processes, and verifying output results for compliance.

[0016] In some embodiments, a data control policy defined by a data owner is received, the data control policy is built based on a five-tuple framework including a subject, an object, an environmental condition, an operation behavior, and an effect, wherein the effect includes an allow, a prohibit, and an obligation type, the obligation type is used to define additional conditions that must be met before and after performing an allowed operation, further including:

[0017] receiving policy elements input by the data owner through a policy definition interface, the policy elements include a subject, an object, an environmental condition, an operation behavior, and an effect;

[0018] parsing the policy elements to build a standardized policy object model;

[0019] detecting conflicts in the policy object model to ensure consistency and completeness of the policy definition.

[0020] In some embodiments, the data control policy is compiled into a smart contract code, wherein the compilation includes parsing the policy to generate a policy object model, generating an intermediate representation logic, and generating a source code based on a smart contract template, further including:

[0021] parsing the data control policy into a standardized policy object model;

[0022] converting the policy object model into an intermediate representation logic that is independent of a blockchain platform;

[0023] filling the intermediate representation logic into corresponding placeholders of a pre-configured smart contract template;

[0024] generating a smart contract source code for a target blockchain platform to convert the policy into executable code.

[0025] In some embodiments, the smart contract code is deployed to a blockchain network to form a decentralized policy decision point for performing policy verification and recording audit logs, further including:

[0026] calling a blockchain network interface to submit the smart contract code for deployment;

[0027] Confirm the smart contract deployment success and get the contract address and interface definition;

[0028] Store the smart contract access information;

[0029] Verify the availability and responsiveness of the smart contract on the blockchain network.

[0030] In some embodiments, intercept data access requests and trigger the smart contract to verify the access requests, and generate access credentials when the verification is passed, wherein the verification includes identity credential verification, context information checking, and historical usage record query, further comprising:

[0031] Intercept data access requests initiated by data users, and obtain key information in the requests;

[0032] Extract the digital identity credentials of the data users and the current access context information from the data access requests;

[0033] Trigger the verification function of the smart contract to submit the identity credentials and context information for policy condition matching;

[0034] Receive the verification result returned by the smart contract, and if the verification is passed, obtain short-term valid access credentials, otherwise, reject the access.

[0035] In some embodiments, the method further comprises:

[0036] Collect dynamic context information required for policy execution, including time information, environmental proof, identity information, and system state;

[0037] Verify the authenticity and validity of the dynamic context information to ensure compliance with policy execution requirements;

[0038] Provide the dynamic context information to the smart contract for real-time policy decision and condition checking;

[0039] Update the dynamic context information according to the policy execution requirements.

[0040] In some embodiments, allow data access based on the access credentials and monitor data usage behavior to ensure compliance with the data control policy, wherein the monitoring includes ensuring that the data runs in a policy-compliant environment, monitoring the computing process, and verifying the compliance of the output results, further comprising:

[0041] Ensure that the data is loaded into a secure environment that meets the policy requirements, including a trusted execution environment or other controlled environment;

[0042] Monitoring system behavior during data computation, including system calls, network access, and file operations;

[0043] Conducting compliance verification on data computation output results to check if data processing specifications are met;

[0044] Processing output results according to policy requirements, including data desensitization, precision limitation, or anonymization, to ensure output compliance.

[0045] Based on the same concept, the present application also provides a data control system, comprising:

[0046] A data control policy receiving module configured to receive data owner-defined data control policies, which are constructed based on a five-tuple framework including subject, object, environmental condition, operation behavior, and effect, wherein the effect includes permission, prohibition, and obligation types, and the obligation type is used to define additional conditions that must be met before and after executing a permitted operation;

[0047] An intelligent contract code compiling module configured to compile the data control policies into intelligent contract code, wherein the compilation includes parsing policies to generate a policy object model, generating intermediate representation logic, and generating source code based on an intelligent contract template;

[0048] A blockchain network deployment module configured to deploy the intelligent contract code to a blockchain network to form a decentralized policy decision point for executing policy verification and recording audit logs;

[0049] An access credential generation module configured to intercept data access requests and trigger intelligent contract verification of the access requests, and generate access credentials when verification is passed, wherein verification includes identity credential verification, context information checking, and historical usage record querying;

[0050] A compliance verification module configured to allow data access based on the access credentials and monitor data usage behavior to ensure consistency with the data control policies, wherein monitoring includes ensuring that data runs in a policy-compliant environment, monitoring computation processes, and conducting compliance verification on output results.

[0051] Based on the same concept, the present application also provides an electronic device, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of a data control method.

[0052] Based on the same concept, the application also provides a computer readable storage medium storing a computer program executable by an electronic device, which, when running on the electronic device, causes the electronic device to perform the steps of the data control method.

[0053] Compared with the prior art, the application has the beneficial effects that:

[0054] The application discloses a data control method and system, an electronic device and a storage medium, which realize dynamic and adaptive execution of data control, construct a decentralized policy decision point by compiling a policy into a smart contract and deploying it on a blockchain, and enable the data control policy to be dynamically adjusted and automatically executed according to real-time context information (such as time, environmental state, use frequency, etc.), thereby overcoming the problem of rigidity of traditional static policies and realizing dynamic access control and use control.

[0055] The application improves the granularity and whole-process coverage of data control, realizes fine-grained control of the whole chain from data access to use based on a five-tuple policy framework, especially by introducing an "obligation" effect type, not only controls "whether data can be accessed", but also continuously restricts "how data is used", including data computing environment requirements, operation behavior monitoring and output result processing, and improves the integrity and accuracy of data control.

[0056] The application establishes a decentralized trusted execution mechanism, realizes decentralization of policy decision through a blockchain smart contract, eliminates single-point failure and trust bottlenecks, and ensures the consistency and trustworthiness of policy execution in a cross-organizational and cross-domain environment. All policy execution records are stored in a blockchain in a non-tamperable manner, forming a complete trusted audit clue and improving audit credibility.

[0057] The application improves the automation level and efficiency of the control system, automatically executes policy verification and decision through a smart contract, replaces traditional manual approval or centralized decision-making processes, improves policy execution efficiency, realizes real-time and automatic data control, and reduces operation and maintenance costs and human error risks.

[0058] The application maintains good compatibility with existing architectures: through standardized interfaces and integration with trusted data space components (such as connectors and information services), the system can be seamlessly embedded as a security enhancement module in existing trusted data space architectures without damaging the integrity of existing systems, and has practical value.

[0059] The application strengthens end-to-end security capabilities: by deploying policy execution points at both data providers and users, and combining with trusted execution environment technology, the application realizes whole-chain security control from data access, transmission, computation and output, effectively preventing data leakage and misuse risks during circulation and use. BRIEF DESCRIPTION OF DRAWINGS

[0060] Other features, objects, and advantages of the application will become more apparent from the following detailed description when read in connection with the following accompanying drawings:

[0061] Figure 1 is a flowchart of a data control method according to an embodiment of the present application;

[0062] Figure 2 is a flowchart of a data control method according to another embodiment of the present application;

[0063] Figure 3 is a flowchart of a data control method according to another embodiment of the present application;

[0064] Figure 4 is a flowchart of a data control method according to another embodiment of the present application;

[0065] Figure 5 is a structural diagram of a data control system according to an embodiment of the present application;

[0066] Figure 6 is a structural diagram of an electronic device according to an embodiment of the present application;

[0067] In the figure, 710 is a processor; 720 is a memory; 730 is an input device; and 740 is an output device. DETAILED DESCRIPTION

[0068] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.

[0069] The terms used in the embodiments of the present application are only for the purpose of describing particular embodiments and are not intended to limit the present application. The singular forms "a," "an," and "the" used in the embodiments of the present application and the appended claims are intended to include the plural forms as well, unless the context clearly indicates otherwise. "Plural" generally includes at least two.

[0070] It should be understood that the term "and / or" used herein only describes an association relationship of associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " herein generally represents an "or" relationship between the front and rear associated objects.

[0071] It should be understood that, although the terms first, second, third, etc. can be used herein to describe various elements, components, regions and / or sections, these

[0072] The word "if" can be interpreted to mean "when" or "upon" or "in response to determining," or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [a stated condition or event] is detected" can be interpreted to mean "upon determining" or "in response to determining" or "upon detecting [the stated condition or event]" or "in response to detecting [the stated condition or event]," depending on the context.

[0073] It is also to be noted that the terms "comprising", "including", and / or "containing" or any other variation thereof, are intended to cover a non-exclusive inclusion. For example, a process, product, article, composition, method, or apparatus that comprises a list of elements is not necessarily limited to only those elements but can include other elements not expressly listed or inherent to such process, product, article, composition, method, or apparatus. In other words, unless otherwise specified, the use of the term "comprising" or "including" or "containing" does not exclude the presence of elements other than those listed in the description, reference to which is made.

[0074] It is particularly noted that symbols and / or numbers present in the description, if not marked in the description of the figures, are not figure references.

[0075] With reference to Figure 1 A data control method comprises:

[0076] S101, receiving a data control policy defined by a data owner, the data control policy is constructed based on a five-tuple framework, including a subject, an object, an environmental condition, an operation behavior and an effect, wherein the effect includes an allow, a prohibit and an obligation type, the obligation type is used to define an additional condition that must be met before and after performing an allowed operation;

[0077] S102, compiling the data control policy into a smart contract code, wherein the compiling includes parsing the policy to generate a policy object model, generating an intermediate representation logic, and generating a source code based on a smart contract template;

[0078] S103, deploying the smart contract code to a blockchain network to form a decentralized policy decision point for performing policy verification and recording audit logs;

[0079] S104, intercepting the data access request and triggering the smart contract to verify the access request, and generating an access credential if the verification is passed, wherein the verification includes identity credential verification, context information checking, and history usage record query;

[0080] S105, allowing data access based on the access credential, and monitoring data usage behavior to ensure compliance with the data control policy, wherein the monitoring includes ensuring that the data runs in a policy-compliant environment, monitoring the computing process, and verifying the output results for compliance.

[0081] Specifically, in the embodiments of the present application, the data control policy defined by the data owner is received by the dynamic policy engine, which is strictly based on the framework containing five types of elements, including subject, object, environmental condition, operation behavior and effect. The subject specifies the entity authorized to access the data, the object indicates the target data resource to be controlled, the environmental condition defines the system or context state required for the policy to take effect, the operation behavior lists the actions allowed or prohibited on the data, and the effect is specifically divided into three types of allow, prohibit and obligation. The core role of the obligation type here is to define a series of additional constraint conditions that the data user must meet or perform before and after allowing a certain operation behavior to occur. After the policy definition is completed, it enters the compilation stage. The dynamic policy engine first parses the high-level policy description, extracts the logical rules and constraint relationships therein, and converts them into a standardized policy object model. This model serves as an intermediate abstraction layer to shield the differences of the underlying blockchain platform. The engine further translates the policy object model into an intermediate representation logic independent of the specific blockchain platform according to the predefined conversion rules. The engine calls the preinstalled smart contract code template, accurately fills the generated intermediate representation logic into the pre-set logic placeholders in the template, and thus generates a standard smart contract source code that can be compiled and run on a specific target blockchain platform. The generated smart contract source code is deployed on the distributed ledger by calling the management interface of the blockchain node, forming a decentralized policy decision point guaranteed by the consensus mechanism. This decision point is responsible for executing the core policy verification logic and synchronously persisting the key operations as immutable audit logs. In the policy execution stage, the interception component deployed at the network boundary of the data provider detects and intercepts all external data access requests in real time, and then triggers the on-chain smart contract to automatically verify the request. The verification process comprehensively covers the verification of the authenticity of the data user's digital identity certificate, the check of whether the current access context information matches the policy pre-set environmental condition, and the query of whether the same user's historical data usage record exceeds the policy specified limit. Only when all the verification conditions are met, the smart contract generates a digital access credential with a short-term validity period. The data user obtains access to the target data by means of this access credential. At the same time, the monitoring agent deployed in the data user's computing environment is activated. The agent first ensures that the data is loaded into a secure environment that meets the policy requirements, then continuously monitors the system behavior of the data during the entire computing life cycle, and finally applies compliance verification to the output results at the end of the data processing flow to ensure that they meet all the regulations on data output in the policy, thereby forming a full-process closed-loop control from access authorization to use termination.

[0082] For example, a data owner defines a data control policy for a specific dataset owned by him, which specifies that the subject is an authenticated research institution B, the object is a medical dataset with identifier dataset_123, the environmental condition requires that the current system time must be between 2024-01-01T00:00:00Z and 2024-12-31T23:59:59Z and the data must run in a trusted execution environment that has passed remote attestation, the operation behavior allows model training, and the effect is to allow but with an additional output obligation that anonymization processing with a k-anonymity level of 5 must be met; the policy engine parses this policy into a policy object model, then generates intermediate representation logic, and finally generates source code that can run on the Ethereum virtual machine using the Solidity smart contract template, which contains state variables such as maximum usage times 5 and expiration timestamp 1735689599, and encapsulates the verification logic function; this contract is deployed to a consortium chain with an address of 0x742...dC81 and becomes the policy decision point for this dataset; when a user of research institution B initiates an access request for dataset_123 from his terminal at 10:00 on June 1, 2024, the request is intercepted by the data provider gateway, which extracts the user's digital certificate and the current timestamp 2024-06-01T10:00:00Z as well as the TEE attestation report, and calls the verification function of the contract; the contract first verifies the validity of the certificate signature, then checks whether the current timestamp 1622544000 is within the valid time interval, and queries that the user's address has a history of 2 times less than the maximum limit of 5 times, and confirms that the TEE proof is valid, all conditions are passed, the contract generates an access token 0x89a2...1f4e with a validity period of 30 minutes and records the authorization event; the user successfully obtains the data with this token, loads the data into the configured TEE environment for model training, and the monitoring agent ensures that there is no unauthorized network connection or file output behavior during the training process, and when the training is completed and the prediction model is ready to be output, the model parameters are subjected to k-anonymity processing to ensure that they meet the requirement of k=5 before allowing output, thus fully realizing the intent of the policy.

[0083] In some applications, a data control policy defined by a data owner is received, the data control policy is constructed based on a five-tuple framework, including subject, object, environmental condition, operation behavior, and effect, wherein the effect includes allow, prohibit, and obligation types, the obligation type is used to define additional conditions that must be met before and after executing the allowed operation, including policy elements input by the data owner through a policy definition interface, the policy elements including subject, object, environmental condition, operation behavior, and effect; the policy elements are parsed to construct a standardized policy object model; conflict detection is performed on the policy object model to ensure the consistency and integrity of the policy definition.

[0084] It can be understood that the data owner defines the data control policy through the provided policy definition interface, which is strictly based on the framework containing five core elements of subject, object, environmental condition, operation behavior and effect; the policy definition interface supports both visual configuration through graphical user interface and text definition through structured policy specific language, and the data owner inputs complete policy elements through this interface, wherein the subject element is used to specify one or more entity identifiers authorized to access data, the object element is used to explicitly specify the unique identifier of the target data resource controlled by the policy, the environmental condition element is used to define the system state or context constraint that must be met for the policy to take effect, the operation behavior element is used to enumerate the specific action types allowed or prohibited to the target data, and the effect element is used to declare the final decision result of the policy, which is explicitly divided into three types of allow, prohibit and obligation, and the obligation type is used to define a series of additional mandatory conditions that the data user must meet or perform before and after allowing a certain operation behavior; after the input of policy elements is completed, the policy parsing process is started, the syntax and semantics of all received policy elements are analyzed, the logical association between elements is recognized, and the discrete element information is integrated and constructed into a standardized policy object model with unified structure and machine readability according to the pre-defined object model specification; the policy object model completely encapsulates all the logical information of the policy, providing a standard data source for subsequent processing; after the construction of the policy object model is completed, the policy conflict detector is called to perform consistency check, and the detection process based on the pre-set conflict detection rule set systematically scans and identifies the possible logical contradictions, condition overlaps or permission conflicts in the policy, ensuring the logical consistency and structural integrity of the policy definition, thereby avoiding unexpected behaviors caused by policy definition defects in the subsequent compilation and execution stage.

[0085] For example, the data owner defines a policy for its data set through the policy definition interface. In the graphical interface, the subject is selected or input as "Institution B", the object is input as data set identifier "dataset_123", the environmental condition is checked as "time range" and the start time is set as "2024-01-01T00:00:00Z" and the end time is set as "2024-12-31T23:59:59Z", the security environment requirement is checked and TEE authentication is selected, the operation behavior is checked as "model training", the effect is selected as "allow" and the additional obligation is checked as "output anonymization" with level set as "k=5"; after receiving these elements, the parsing engine constructs a standardized policy object model, which is represented in memory as a field containing:

[0086] a structured object of the structure target: "dataset_123", consumer: "org_B", purpose: "model_training", conditions: [{type: "timestamp", operator: "within", value: "2024-01-01T00:00:00Z / 2024-12-31T23:59:59Z"}, {type: "environment", requirement: "tee_attestation_passed"}], obligations: [{type: "output_anonymization", level: "k-anonymity=5"}];

[0087] The conflict detector detects this model, for example, checks whether there is another policy that also authorizes "model training" for the same object "dataset_123" and the same subject "organization B", but the environmental condition time range is set to "2024-06-01 to 2024-12-31" and there is no output obligation. The detector identifies that the time range overlaps and the obligation requirements are inconsistent, and according to the rules, it is determined as a potential conflict, and prompts the data owner "Detect that policy S002 and the current policy have overlap and inconsistency in time range and output obligation, please confirm or modify". After the data owner adjusts the policy time range or unifies the obligation requirement according to the prompt, the conflict is resolved, and the policy object model is marked as having passed the integrity check and can be used for subsequent compilation steps.

[0088] In some applications, the data control policy is compiled into smart contract code, wherein the compilation includes parsing the policy to generate a policy object model, generating intermediate representation logic, and generating source code based on a smart contract template, including parsing the data control policy into a standardized policy object model; converting the policy object model into intermediate representation logic independent of the blockchain platform; based on the pre-set smart contract template, filling the intermediate representation logic into the corresponding placeholders of the template; generating the smart contract source code of the target blockchain platform to convert the policy into executable code.

[0089] It can be understood that the semantic analysis of the policy object model extracts the subject authorization relationship, object identification information, environmental constraint condition, operation behavior enumeration and effect decision logic contained therein, to ensure that the complete semantics of the policy is accurately understood; entering the intermediate representation generation stage, the compilation engine converts the business logic expressed in the policy object model into an intermediate representation logic irrelevant to the underlying platform of the blockchain according to the predefined conversion rules, the intermediate representation logic uses an abstract and standardized syntax structure to describe the condition judgment, state transition and effect execution process of the policy, thereby realizing the decoupling between the high-level policy logic and the specific blockchain smart contract language; after obtaining the intermediate representation logic, the compilation engine calls the pre-installed smart contract template library, and selects the matching code template according to the type and complexity of the policy, the template defines the standard structure framework of the smart contract, including the state variable declaration area, the function definition area and the event log area, and reserves the placeholders of the key logic; the compilation engine accurately maps the judgment conditions, state update operations and obligation execution logic described in the intermediate representation logic to the corresponding logic placeholders in the template through the template filling mechanism, to complete the conversion from abstract logic to specific code structure; based on the smart contract language specification of the selected target blockchain platform, the compilation engine renders the filled template to generate the smart contract source code that meets the syntax requirements of the platform and can be directly compiled and deployed, thereby completing the automatic conversion from the declarative policy to the executable code, and laying a technical foundation for realizing the decentralized policy execution.

[0090] For example, assume the policy object model contains the elements: subject is "Institution B", object is "dataset_123", environmental conditions include time range "2024-01-01 to 2024-12-31" and maximum number of uses "5 times", operation behavior includes "query", effect is "allow"; the compilation engine parses this model, extracts the core logic "only when Institution B is currently within the valid time range and its historical number of uses is not over the limit, allow it to perform the query operation on dataset_123"; converts this logic into intermediate representation logic, which is abstractly represented as: when an access request is received, verify the requester's identity is Institution B, verify the current timestamp is within the valid time range, query the number of times this requester has used and verify if it is less than the maximum allowed number of times, if all verifications pass, return an allow decision and update the number of uses; then select a basic access control smart contract template, which contains state variables mapping usageCount, uint256 maxUsage, and uint256 expiryTime, and a function requestAccess; the compilation engine fills the intermediate representation logic into the placeholders of the template function: inserts require(msg.sender == authorizedConsumer) in the identity verification part, inserts require(block.timestamp <= expiryTime) in the time verification part, inserts require(usageCount[msg.sender] < maxUsage) in the number of uses verification part, and inserts usageCount[msg.sender] += 1 in the state update part; the final generated target Solidity source code contains state variable definitions mapping(address => uint256) public usageCount, uint256 public maxUsage = 5, uint256 public expiryTime = 1735689599, and the complete requestAccess function, which contains all the verification logic and state update statements described above, thus forming a complete policy contract that can be deployed to a consortium chain.

[0091] In some applications, the smart contract code is deployed to a blockchain network, forming a decentralized policy decision point for performing policy verification and recording audit logs, including calling a blockchain network interface to submit the smart contract code for deployment; confirming successful smart contract deployment and obtaining the contract address and interface definition; storing smart contract access information; verifying the availability and responsiveness of the smart contract on the blockchain network.

[0092] It can be understood that by calling the standard application programming interface provided by the target blockchain network to submit the compiled smart contract code byte stream and the necessary deployment parameters, the process triggers the contract creation transaction of the blockchain node and broadcasts the transaction to the entire network for consensus confirmation; continuously listen to the event stream of the blockchain network and parse the transaction receipt, confirm whether the smart contract has been successfully created and persisted on the blockchain by checking the state field and contract address field in the receipt, and at the same time, completely obtain the contract address representing the unique location of the contract on the chain and the application binary interface definition conforming to the standard specification; associate the obtained contract address and application binary interface definition and other key access information with the corresponding policy metadata, and persistently store them in the local policy management database, establish the mapping relationship between the policy identifier and the on-chain contract instance, and ensure that the subsequent execution process can accurately locate and call the corresponding on-chain policy decision point; by constructing a test transaction to call the query interface of the deployed smart contract and setting a response timeout threshold, it is verified whether the contract can normally process the request and return the expected data result, so as to confirm that the availability and responsiveness of the policy decision point on the blockchain network meet the design requirements, and complete the entire deployment verification process.

[0093] For example, the deployment engine sends a transaction through the JSON-RPC interface of the alliance chain, the transaction contains the compiled smart contract bytecode 0x608...005, and the transaction hash is 0x79a3f...c2d1; query the transaction receipt through the eth_getTransactionReceipt interface, confirm that the state field is 0x1 (success) and the contract address field is 0x742d...dc81; establish a mapping relationship between this contract address 0x742d...dc81 and the policy ID "POL-2024-DS123", and store it in the deployed_contracts table of the database; the deployment engine calls the getMaxUsage() query function of the contract, sends a transaction, and the contract returns the value 5 within 2000 milliseconds, and confirms that the response indeed comes from the address 0x742d...dc81 through the verification signature, thereby proving that the policy decision point has been successfully deployed and is functioning normally.

[0094] In some applications, intercept data access requests and trigger smart contracts to verify the access requests, and generate access credentials when the verification is passed, wherein the verification includes identity credential verification, context information checking and historical usage record query, including intercepting data access requests initiated by data users, obtaining key information in the request; extracting the digital identity credentials and current access context information of the data user from the data access request; triggering the verification function of the smart contract, submitting the identity credentials and context information for policy condition matching; receiving the verification result returned by the smart contract, if the verification is passed, obtaining short-term valid access credentials, otherwise rejecting access.

[0095] It can be understood that the policy enforcement point deployed at the network boundary of the data provider continuously monitors all incoming data access requests, and immediately intercepts when detecting access requests initiated by data users, extracts key information from the request message including request target data identifier, operation type and access timestamp; The policy enforcement point then parses the digital identity credentials of the data user from the intercepted request, including the complete content of the digital certificate and its digital signature, and extracts the current access context information including client IP address, user agent information and security environment proof; After completing information extraction, the policy enforcement point constructs a block chain transaction to call the function responsible for policy verification in the deployed smart contract, encodes the extracted digital identity credentials as the main parameter and submits them, and passes the current access context information as auxiliary verification basis to the on-chain contract; The smart contract executes the verification logic in the blockchain node, and the policy enforcement point synchronously listens to the contract execution result, receives the verification result data packet returned by the smart contract, which explicitly contains a Boolean flag indicating whether the verification is passed, and when the verification is passed, the data packet also contains an encrypted access credential generated by the smart contract with a clear validity period, and if the verification is not passed, it only contains an access rejection error code; The policy enforcement point makes corresponding processing according to the verification result, and when the verification is passed, associates the obtained access credential with the original request and allows the request to continue processing, and when the verification fails, immediately terminates the request process and returns the access rejection response information to the data user.

[0096] For example, a user of research institution B sends an HTTPS request to the data provider through an API client to obtain dataset_dataset_123 at 10:00 on June 1, 2024, the request is intercepted by the policy enforcement point deployed at the data API gateway, the data identifier "dataset_123", the operation type "GET" and the timestamp "2024-06-01T10:00:00Z" are extracted; the policy enforcement point extracts the X.509 digital certificate content "MIID...==" and the Base64 encoded signature "MEUCI...==" from the request header, while collecting the client IP "192.168.1.100" and the TEE remote attestation report "0xa3f2...c4d1"; the policy enforcement point constructs the verifyAccess function of the smart contract with the transaction call address 0x742d...dc81, submits the parameters {consumerCert: "MIID...==", contextProof: "0xa3f2...c4d1"}; the contract performs verification on the chain, checks the validity of the certificate signature, confirms that the current timestamp 1622544000 is within the valid period, queries that the user has used 2 times less than the maximum limit of 5 times, and generates an access token "0x89a2...1f4e" with a valid period of 1800 seconds after all verifications are passed and returns; the policy enforcement point receives the return result {status: true, token: "0x89a2...1f4e", expiry: 1622545800}, attaches this token to the original request header and releases the request, and the data user finally obtains the required data access permission within 1500 milliseconds after the request is sent.

[0097] In some applications, the method further comprises collecting dynamic context information required for policy enforcement, including time information, environmental proof, identity information and system state; verifying the authenticity and validity of the dynamic context information to ensure compliance with policy enforcement requirements; providing the dynamic context information to the smart contract for real-time policy decision and condition checking; updating the dynamic context information according to the policy enforcement requirements.

[0098] It can be understood that the dynamic context information required for policy execution is collected through the distributed deployment of policy information points, which comprehensively covers accurate time information, security proof of computing environment, identity attribute information of participants, and real-time running state of the system; the collected dynamic context information needs to be strictly verified at multiple levels to ensure its authenticity and effectiveness, among which the time information is verified for its accuracy by synchronizing and comparing with a trusted time source, the environment proof is confirmed for the trusted state of the computing environment by verifying its digital signature and matching with the expected security benchmark, the identity information is ensured for its authenticity and timeliness by interactive verification with the identity management service in the trusted data space, and the system state information is guaranteed for its effectiveness by checking the legitimacy of its data source and the standardization of its data format; all the verified dynamic context information is encapsulated in a standardized data format and transmitted to the blockchain network through a secure channel to provide the smart contract as the real-time input parameter for policy decision, for performing accurate policy condition checking and dynamic access control decision; at the same time, according to the continuous needs of policy execution, a regular updating mechanism of dynamic context information is established, through the periodic re-collection and re-verification process, to ensure that the context information provided to the smart contract always reflects the current latest system state and environmental conditions, thereby supporting the continuous and effective execution and adaptive adjustment of the policy.

[0099] For example, the policy information point collects the following dynamic context information: timestamp is 2024-06-01 14:30:15, TEE environment attestation is a remote attestation reporting its hash value as 0xa3f2...c4d1, user identity attribute is {organization: "OrgB", role: "Researcher"}, system status is {CPU utilization: 45%, memory utilization: 60%}; during verification, the time stamp is accepted within 500 milliseconds of the NTP server time, the TEE report signature is verified using the preset public key and the measurement value matches the baseline value in the whitelist, the identity attribute is confirmed by interacting with the identity provider that the certificate is not revoked and the role is valid, and the system status data source is confirmed to be a trusted monitoring agent and the value is within the normal range; these verified context information is encapsulated in JSON format {timestamp: 1622543415, environment:{tee_attestation: "0xa3f2...c4d1"}, identity: {org: "OrgB", role: "Researcher"}, system: {cpu: 45, memory: 60}} as parameters passed to the verification function of the smart contract; the contract uses this information to perform policy condition judgment, such as confirming that the current time is within the valid period, the environment security requirements have been met, and the user role is authorized; at the same time, the policy information point re-collects the system status every 30 seconds, when the CPU utilization rises from 45% to 80%, the updated context information will trigger the smart contract to re-evaluate the current data access session, if the policy stipulates that the CPU utilization exceeds 75% when new data calculation operations are prohibited, the contract will immediately revoke the issued access credentials.

[0100] In some applications, data access is allowed based on the access credentials, and data usage behavior is monitored to ensure compliance with the data control policy, wherein the monitoring includes ensuring that the data runs in a policy-compliant environment, monitoring the computing process, and verifying the output results for compliance, including ensuring that the data is loaded into a secure environment that meets policy requirements, including a trusted execution environment or other controlled environment; monitoring system behavior during data computation, including system calls, network access, and file operations; verifying the compliance of data computation output results to check whether the data processing specifications are met; processing the output results according to the policy requirements, including data desensitization, precision limitation, or anonymization, to ensure that the output is compliant.

[0101] It can be understood that after the data access is allowed based on the access credential, the whole-process monitoring of the data use behavior is started to ensure strict compliance with the data control policy. The monitoring process first ensures that the target data is loaded into a secure environment that meets the policy requirements, and confirms that the security attributes of the computing environment meet the security level specified in the policy by verifying the remote attestation report of the trusted execution environment or confirming the isolation and integrity protection mechanism of the controlled environment. In the data computing phase, the monitoring agent continuously tracks the system behavior, detects unauthorized operation modes by intercepting and analyzing the system call sequence, monitors network communication traffic to identify abnormal data transmission behavior, and audits file operation records to prevent sensitive data from being illegally persisted. When the data processing flow enters the output phase, strict compliance verification is performed on the data computing output result, and the characteristics of the output data are compared with the data processing specifications specified in the policy to check whether all requirements for data format, content range and sensitivity level are met. For the output result that passes the verification, according to the data processing obligations specified in the policy, necessary post-processing operations are automatically applied, including but not limited to performing data desensitization processing on direct identifiers, applying precision limits to numerical data to reduce re-identification risk, or performing k-anonymization processing on data sets to ensure that the preset privacy protection level is met, so as to ensure that the final form of all output data completely meets the compliance standards specified in the policy.

[0102] For example, after the data user obtains the access credential, it is verified that the data is loaded into the Haiguang trusted execution environment, and by verifying that the virtual machine digest value 0x87a6...e3c1 in the remote attestation report completely matches the reference value in the policy whitelist, it is confirmed that the environment meets the requirements. During data computation, the monitoring agent detects a system call that attempts to connect to the external IP address 202.120.36.15 port 8080, which conflicts with the policy requirement of "only allow access to internal model library servers". The monitoring agent immediately blocks the connection and generates a security event log. When the trained machine learning model is ready to be output, the compliance verification module checks that the model parameter size is 150MB, which does not exceed the 200MB upper limit specified in the policy, but finds that the parameters contain 3 identifiers directly associated with original data samples. According to the policy requirement of "output must meet k-anonymity = 5", anonymization processing is performed on the model parameters, and 5 similar samples are aggregated into a group through generalization processing to ensure that each group contains at least 5 indistinguishable records. The output conforms to the k=5 requirement of the anonymized model, and the compliance guarantee of the entire data use process is completed.

[0103] The following will be described in combination with Figures 2-4 Another embodiment of the data control method of the present application is described below:

[0104] As Figure 2 , Figure 3 andFigure 4 As shown, this embodiment receives and parses the fine-grained data control policy defined by the data owner through a dynamic policy engine; compiles the policy into smart contract code and deploys it to the blockchain network to form a decentralized policy decision point; intercepts data access requests through the policy execution point deployed at the data provider and triggers the smart contract for automated verification; if the verification is passed, a short-term valid access credential is generated by the smart contract and recorded on the chain; the data user obtains the data with the credential, and the second policy execution point deployed at the data user monitors the data usage behavior to ensure consistency with the policy.

[0105] The implementation of the policy compilation into smart contract code includes: parsing the policy into a standardized policy object model; generating an intermediate representation logic independent of the blockchain platform; based on the pre-set smart contract template, filling the intermediate representation logic into the corresponding placeholders of the template to generate the smart contract source code of the target blockchain platform.

[0106] The automated verification by the smart contract includes: verifying the digital identity credential of the data user; checking whether the current access context information matches the policy conditions; querying whether the historical data usage times of the user exceed the policy limit.

[0107] The validity of the access credential depends on the system state at the time of issuance, and the smart contract re-verifies whether the dependent state is continuously valid at each use of the credential to realize the automatic invalidation of the credential.

[0108] The policy execution point deployed at the data user has the function of: enforcing the usage control policy in the data computing environment, monitoring the data computing process, and ensuring that the output result meets the data processing specification required by the policy.

[0109] In summary, this embodiment includes:

[0110] On-chain policy control layer (blockchain network):

[0111] Policy library: stores policy rules in the form of smart contracts compiled and deployed by the dynamic policy engine. Each policy contract follows a standard interface for easy management. Policy execution engine: the policy decision point smart contract. It receives requests submitted by the execution point, queries the rules in the policy library, performs logical judgment, and returns control instructions. The engine is a decentralized, consensus-secured authoritative decision center. Policy execution trusted record: as an immutable log of the blockchain, it records all policy execution requests, decision results, and key state change events to form a trusted audit trail.

[0112] Off-chain policy and execution layer:

[0113] Dynamic policy engine: As the policy management point, it provides a graphical interface to guide users to define policies according to the national standard framework, and is responsible for compiling, optimizing and deploying policy contracts to the on-chain policy library. Policy information point: Distributed in the environment-aware components of data providers and consumers, it provides the dynamic context information required for decision-making (such as current time, system load, environmental security status, etc.) for the on-chain policy execution engine. Policy execution point: It is divided into data access control execution point (deployed in data provider gateway) and data use control execution point (deployed in data consumer computing environment). They are responsible for intercepting requests / behaviors, interacting with on-chain engines, and outputting control instructions returned by their execution (such as "allow access", "reject and record", "limit output precision").

[0114] The following describes this embodiment in detail:

[0115] This embodiment runs in a distributed network composed of multiple participants (at least including one data provider and one data user). The basic environment requirements are as follows:

[0116] Blockchain network: A blockchain platform that can run smart contracts as the underlying trust infrastructure. Data provider and user servers: Participants have their own servers or cloud computing resources for deploying local policy execution points, data storage systems, and business applications. Trusted execution environment: If high-level data use security is required, the data user's computing server should support hardware-level TEE technology. Network communication: Network connectivity between parties is required to enable secure communication through HTTPS, gRPC, etc.

[0117] The implementation includes:

[0118] Dynamic policy engine module: This module is the core of defining and controlling policies by data owners, usually deployed in the form of independent services or web applications. Policy definition interface: Provide graphical and policy-specific language for users to define policies. Graphical interface: Through forms, drag-and-drop components, etc., users can intuitively set policy elements, such as selecting data use purposes ("model training", "statistical analysis", "model fine-tuning") from a drop-down menu, checking allowed operations ("query", "aggregation calculation"), and setting conditions (such as "maximum number of uses", "validity period"). Policy-specific language: Provide a structured text language to express complex logic. For example:

[0119] { "target": "dataset_123",

[0120] "consumer": "org_B",

[0121] "purpose": "model_training",

[0122] "conditions": [ {"type": "timestamp", "operator": "within", "value":"2024-01-01T00:00:00Z / 2024-12-31T23:59:59Z"}, {"type": "max_usage", "value":5}, {"type": "environment", "requirement": "tee_attestation_passed"} ],

[0123] "obligations": [ {"type": "output_anonymization", "level": "k-anonymity=5"} ]}

[0124] Policy Compiler: The key module that converts a policy into a smart contract code. Its workflow is as follows:

[0125] Parsing: Parse the policy into a standard policy object model. Intermediate representation generation: Convert the policy object model into an intermediate logical representation. Code generation: The system predefines a smart contract template. The compiler fills the logic into the placeholders of the corresponding template to generate the final deployable smart contract. Deployment: Deploy the contract on-chain by calling the API of the blockchain node.

[0126] Blockchain Smart Contract Module: The smart contract deployed on the blockchain is a decentralized policy decision point, and its internal logic is compiled by the policy engine. A typical contract contains the following parts:

[0127] State variables: Data stored on the chain that reflects the current state of the policy. address owner: The address of the contract owner (i.e., the data owner). mapping(address => uint256) usageCount: Records the number of times each data user address has used data. uint256 maxUsage: The maximum number of times the policy allows to be used. uint256 expiryTime: The policy expiration timestamp. Functions: Provide interfaces for external calls.

[0128] function requestAccess(bytes contextProof) public returns (bytes32 token): Is the core function.

[0129] Internal logic:

[0130] Verify the caller signature, confirm identity. Parse contextProof, verify its authenticity and validity. Check policy conditions: whether the caller is authorized, whether the current time is within the valid period, whether the usage count is exceeded. If all conditions are met, update the state variable, generate access credentials token, and trigger the AccessGranted event. Event: used for logging, for external applications to listen. For example: AccessGranted(address consumer, bytes32 token, uint256 newUsageCount).

[0131] Policy Enforcement Point Module:

[0132] This module serves as the execution anchor of the policy, and is deployed at both ends of the data flow. First Policy Enforcement Point (deployed at the data provider): Implementation form: usually in the form of reverse proxy, API gateway plug-in to implement the workflow:

[0133] Intercept: intercept all requests arriving at the data API or data endpoint. Extract and construct: extract the digital certificate and context information of the data user from the request. Call contract: construct a transaction to call the smart contract of the corresponding data set on the blockchain. Decision and response: listen to blockchain events and allow or block requests according to the decision result.

[0134] Second Policy Enforcement Point (deployed at the data user): Implementation form: in the form of kernel module, container security agent or SDK deeply integrated with the application.

[0135] Workflow: Environment preparation: ensure that the data is loaded into an environment (such as TEE) that meets the policy. Behavior monitoring: monitor system calls, network access and file operations during data computation. Output compliance check: intervene in the output of the computation result to ensure compliance with the policy requirements.

[0136] Policy Information Point Module:

[0137] The policy information point is the environment-aware component of the system, responsible for collecting and providing the context information required for policy enforcement:

[0138] Time information: provides the current precise timestamp. Environment proof: provides a TEE remote attestation report to prove the security of the computing environment. Identity information: interacts with the identity management service of the trusted data space to verify user identity attributes. System state: monitor system load, network status and other running parameters.

[0139] The complete workflow of this embodiment is as follows:

[0140] Phase 1: Policy definition and deployment (preset control rules):

[0141] Step A: The process begins with the data owner defining his data control policy through a dynamic policy engine. Policy elements include target data, authorized subjects, allowed operations, effective conditions, and purpose of use, etc.

[0142] Step B: The dynamic policy engine compiles the high-level policy into a blockchain smart contract code.

[0143] Step C: The compiled smart contract is deployed to the blockchain network, completing the setup of the decentralized policy decision point. This stage is the foundation of all subsequent automation controls.

[0144] Phase Two: Data Access Request and Authorization:

[0145] Step D: The data consumer initiates a data access request.

[0146] Step E: The Policy Enforcement Point (PEP) deployed at the data provider intercepts the request. This step ensures that all access behaviors are controlled.

[0147] Step F: The PEP sends the request information (such as consumer identity, access purpose) to the smart contract on the blockchain for verification.

[0148] Phase Three: Policy Verification and Decision:

[0149] Steps G1&G2: The smart contract, as a decentralized decision point, queries the policy information point, automatically executes policy rules, and verifies the legitimacy of the request. Verification content includes identity authenticity, context compliance, historical usage times, etc.

[0150] Decision Branch One (Verification Failed): If any condition is not met, the contract directly returns a rejection decision (Step I), and the process terminates.

[0151] Decision Branch Two (Verification Successful): If all conditions are met, execute Step H to update relevant state variables (such as incrementing the user's usage count by 1). This atomic operation is crucial for implementing dynamic policies such as "usage control."

[0152] Phase Four: Data Acquisition and Use:

[0153] Step J: The smart contract generates a short-term valid access token (Token) and returns it to the provider PEP.

[0154] Step K: The provider PEP obtains data from the internal data storage based on the token and returns it to the data consumer.

[0155] Step L: The data consumer uses the data in their computing environment, and this process is monitored throughout by a second PEP deployed at the consumer's end. This step extends control from "access" to "use."

[0156] Phase 5: Usage Control and Completion:

[0157] Step M: Usage PEP continuously compares the actual usage behavior (e.g. computation operation, output format) with the policy regulation.

[0158] Branch 1 (compliant behavior): allow the computation result to be normally outputted (Step N).

[0159] Branch 2 (non-compliant behavior): immediately block the non-compliant operation and issue an alarm (Step O) to prevent data misuse.

[0160] Step P: critical usage completion events can be recorded to the blockchain for updating the state and providing audit clues.

[0161] For the method steps disclosed in the above embodiments, the method steps are described as a combination of a series of actions for the purpose of simple description, but those skilled in the art should know that the embodiments of the present application are not limited by the order of the described actions, because according to the embodiments of the present application, certain steps can be performed in other order or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential for the embodiments of the present application.

[0162] As shown in Figure 5 , the present application also provides a data control system, comprising:

[0163] a data control policy receiving module 201 configured to receive a data control policy defined by a data owner, the data control policy being constructed based on a five-tuple framework, including a subject, an object, an environmental condition, an operation behavior and an effect, wherein the effect includes an allow, a prohibit and an obligation type, and the obligation type is used to define additional conditions that must be met before and after performing an allowed operation;

[0164] a smart contract code compiling module 202 configured to compile the data control policy into a smart contract code, wherein the compilation includes parsing the policy to generate a policy object model, generating an intermediate representation logic, and generating a source code based on a smart contract template;

[0165] a blockchain network deployment module 203 configured to deploy the smart contract code to a blockchain network to form a decentralized policy decision point for performing policy verification and recording audit logs;

[0166] an access credential generating module 204 configured to intercept a data access request and trigger the smart contract to verify the access request, and generate an access credential when the verification is passed, wherein the verification includes identity credential verification, context information checking and historical usage record query;

[0167] The compliance verification module 205 is configured to allow data access based on the access credential and monitor data usage behavior to ensure compliance with the data control policy, wherein the monitoring includes ensuring that data is run in a policy-compliant environment, monitoring computing processes, and performing compliance verification on output results.

[0168] It is worth noting that, although only some basic functional modules are disclosed in the embodiments of the present application, it does not mean that the composition of the system is limited to the above-mentioned basic functional modules. On the contrary, the meaning expressed by the embodiments is that one or more functional modules can be added by those skilled in the art on the basis of the above-mentioned basic functional modules in combination with existing technologies to form infinite embodiments or technical solutions. That is to say, the system is open rather than closed, and the protection scope of the claims of the present application cannot be limited to the disclosed basic functional modules only. At the same time, for the convenience of description, the above-described device is described as various units and modules in terms of functions. Of course, the functions of the units and modules can be realized in the same software and / or hardware in the implementation of the present application.

[0169] As shown in Figure 6 The present application also provides an electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus; the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of a data control method.

[0170] Figure 6 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. As shown in the structure Figure 6 The electronic device provided in the embodiment of the present application includes one or more processors 710 and a memory 720; the processor 710 in the electronic device can be one or more, Figure 6 In the embodiment, the processor 710 is taken as an example; the memory 720 is used for storing one or more programs; the one or more programs are executed by the one or more processors 710, so that the one or more processors 710 implement a data control method according to any one of the embodiments of the present application.

[0171] The electronic device can also include an input device 730 and an output device 740.

[0172] The processor 710, the memory 720, the input device 730 and the output device 740 in the electronic device can be connected through a bus or other means, Figure 6 In the embodiment, the connection through the bus is taken as an example.

[0173] The memory 720 in the electronic device serves as a computer readable storage medium, and can be used to store one or more programs, which can be software programs, computer executable programs and modules, such as program instructions / modules of the data control method provided in the embodiments of the present application. The processor 710 performs various function applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory 720, that is, implements the data control method in the above method embodiments.

[0174] The memory 720 can include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required by a function; the data storage area can store data created according to the use of the electronic device, etc. In addition, the memory 720 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state memory device. In some examples, the memory 720 can further include a memory remotely arranged with respect to the processor 710, which can be connected to the device through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0175] The input device 730 can be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the electronic device. The output device 740 can include a display device such as a display screen.

[0176] The present application also provides a computer readable storage medium storing a computer program executable by an electronic device, which causes the electronic device to perform the steps of a data control method when the computer program is run on the electronic device.

[0177] In particular, a computer storage medium of embodiments of the present application can employ any combination of one or more computer readable medium or media. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this embodiment, the computer readable storage medium can be any tangible medium that contains or stores a program used by an instruction execution system, apparatus, or device to function or to be combined with the instruction execution system, apparatus, or device.

[0178] Finally, it should be noted that the above embodiments are merely used to illustrate the technical solutions of the present application, rather than limit the present application; even though the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions recorded in the above embodiments can be modified, or some or all of the technical features can be replaced equivalently; and these modifications or replacements do not cause the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A data control method characterized by, Comprise: Receiving data owner defined data control policy, which is built based on a five-tuple framework, including subject, object, environmental condition, operation behavior and effect, wherein the effect includes allow, prohibit and obligation type, the obligation type is used to define additional conditions that must be met before and after the execution of the allowed operation; Compiling the data control policy into smart contract code, wherein the compiling includes parsing the policy to generate a policy object model, generating intermediate representation logic, and generating source code based on a smart contract template; Deploying the smart contract code to a blockchain network to form a decentralized policy decision point for performing policy verification and recording audit logs; Intercepting data access requests and triggering smart contract verification of the access request, generating access credentials when the verification is passed, wherein the verification includes identity credential verification, context information checking and historical usage record query; Allowing data access based on the access credentials and monitoring data usage behavior to ensure compliance with the data control policy, wherein the monitoring includes ensuring that data runs in a policy-compliant environment, monitoring computing processes, and verifying the compliance of output results.

2. The data control method of claim 1, wherein, Receiving data owner defined data control policy, which is built based on a five-tuple framework, including subject, object, environmental condition, operation behavior and effect, wherein the effect includes allow, prohibit and obligation type, the obligation type is used to define additional conditions that must be met before and after the execution of the allowed operation, further comprising: Receiving policy elements input by the data owner through a policy definition interface, including subject, object, environmental condition, operation behavior and effect; Parsing the policy elements to build a standardized policy object model; Performing conflict detection on the policy object model to ensure consistency and completeness of policy definition.

3. The data control method of claim 1, wherein, Compiling the data control policy into smart contract code, wherein the compiling includes parsing the policy to generate a policy object model, generating intermediate representation logic, and generating source code based on a smart contract template, further comprising: Parsing the data control policy into a standardized policy object model; Converting the policy object model into intermediate representation logic that is independent of the blockchain platform; Based on the pre-set smart contract template, filling the intermediate representation logic into the corresponding placeholders of the template; Generating smart contract source code for the target blockchain platform to convert the policy into executable code.

4. The data control method of claim 1, wherein, Deploying the smart contract code to a blockchain network to form a decentralized policy decision point for performing policy verification and recording audit logs, further comprising: Calling the blockchain network interface to submit the smart contract code for deployment; Confirming successful deployment of the smart contract and obtaining the contract address and interface definition; Storing smart contract access information; Verifying the availability and responsiveness of the smart contract on the blockchain network.

5. The data control method of claim 1, wherein, Intercepting data access requests and triggering smart contract verification of the access request, generating access credentials when the verification is passed, wherein the verification includes identity credential verification, context information checking and historical usage record query, further comprising: intercepting a data access request initiated by a data user, obtaining key information in the request; extracting a digital identity credential of the data user and current access context information from the data access request; triggering a verification function of the smart contract to submit the identity credential and context information for policy condition matching; receiving a verification result returned by the smart contract, and if the verification is passed, obtaining a short-term valid access credential, otherwise rejecting the access.

6. The data control method of claim 5, wherein, The method further comprises: collecting dynamic context information required for policy execution, including time information, environmental proof, identity information and system state; verifying the authenticity and validity of the dynamic context information to ensure compliance with policy execution requirements; providing the dynamic context information to the smart contract for real-time policy decision and condition checking; updating the dynamic context information according to the policy execution requirements.

7. The data control method of claim 1, wherein, allowing data access based on the access credential, and monitoring data usage behavior to ensure compliance with the data control policy, wherein the monitoring includes ensuring that the data runs in a policy-compliant environment, monitoring the computing process, and verifying the compliance of the output result, further comprising: ensuring that the data is loaded into a secure environment that meets the policy requirements, including a trusted execution environment or other controlled environment; monitoring system behavior during data computation, including system calls, network access and file operations; verifying the compliance of the data computation output result to check whether the data processing specification is met; processing the output result according to the policy requirements, including data desensitization, precision limitation or anonymization, to ensure the compliance of the output.

8. A data control system characterized by, comprises: a data control policy receiving module configured to receive a data control policy defined by a data owner, the data control policy being constructed based on a five-tuple framework, including a principal, an object, an environmental condition, an operation behavior and an effect, wherein the effect includes allow, prohibit and obligation types, and the obligation type is used to define additional conditions that must be met before and after executing the allow operation; a smart contract code compiling module configured to compile the data control policy into smart contract code, wherein the compilation includes parsing the policy to generate a policy object model, generating intermediate representation logic, and generating source code based on a smart contract template; a blockchain network deployment module configured to deploy the smart contract code to a blockchain network to form a decentralized policy decision point for executing policy verification and recording audit logs; an access credential generation module configured to intercept a data access request and trigger the smart contract to verify the access request, and generate an access credential if the verification is passed, wherein the verification includes identity credential verification, context information checking and historical usage record query; a compliance verification module configured to allow data access based on the access credential, and monitor data usage behavior to ensure compliance with the data control policy, wherein the monitoring includes ensuring that the data runs in a policy-compliant environment, monitoring the computing process, and verifying the compliance of the output result.

9. An electronic device, comprising: comprises: A processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus; the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores a computer program executable by an electronic device, and when the computer program runs on the electronic device, the electronic device executes the steps of the method in any one of claims 1 to 7.

Citation Information

Cited By

  • Trusted data space data supervision and auditing method and system for data circulation

    CN121615131A

  • Data flow-oriented trusted data space data supervision and auditing method and system

    CN121615131B

  • Method, device and system for realizing data access control based on digital contract

    CN122001681A

  • Intelligent contract implementation method and system based on trusted data space

    CN122204564A