Education data management system and method based on block chain
By constructing a language and intent understanding model specific to the education business domain, generating and verifying smart contract code, the challenges of smart contract development and policy compliance assessment in blockchain education applications are solved, achieving efficient and secure education data management and improving the quality of education data sharing and analysis.
Patent Information
- Application Number
- CN202511113442.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-11
- Publication Date
- 2025-11-14
AI Technical Summary
Existing blockchain education applications face challenges in educational data management, including difficulties in developing smart contracts, assessing policy compliance, and the complexity of smart contract evolution, making it difficult to adapt to the dynamic and changing needs of educational scenarios.
We construct a language specific to the education business domain, train an education business intent understanding model, convert natural language descriptions into formal specifications, apply constraint solving algorithms to generate smart contract code, and achieve adaptive evolution and smooth upgrade of contracts through multi-level formal verification and policy compliance assessment.
It has improved the development efficiency and quality of smart contracts, enhanced security, reduced compliance risks, ensured the continuity of business systems, and promoted the value mining of educational data and cross-institutional data sharing.
Smart Images

Figure CN120950079A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of blockchain technology and educational data management technology, and more specifically, to a blockchain-based educational data management system and method. Background Technology
[0002] With the deepening development of educational informatization, the scale and complexity of educational data are increasing day by day. Educational institutions need to process a large amount of student information, teaching resources, learning process, and evaluation data. Traditional educational data management systems usually adopt a centralized architecture, which not only poses data security risks and makes cross-institutional data sharing difficult, but also has rigid business rules that are difficult to adapt to frequent changes in education policies.
[0003] However, existing blockchain educational applications mainly focus on data storage and simple transaction processing, and still have significant technical limitations in the following aspects:
[0004] Educational data management involves complex business logic. Educational experts without a technical background find it difficult to accurately translate business rules described in natural language into smart contract code. Manually written smart contracts are prone to logical flaws and security vulnerabilities. Secondly, education policies and regulations are frequently updated, and existing smart contracts lack compliance checking mechanisms, making it difficult to ensure long-term compliance with the latest regulatory requirements. Different educational institutions and scenarios have different data management needs, and there is a lack of methods to understand the high-level intentions of the education field and automatically generate contracts. Smart contracts deployed on the blockchain are usually difficult to modify and cannot flexibly adapt to the dynamic changes in educational scenarios.
[0005] These technical issues severely limit the depth and breadth of blockchain technology's application in the field of education data management, necessitating a solution that can automatically transform education business rules into smart contracts, support secure contract verification, and possess policy compliance assessment and intelligent evolution capabilities. Summary of the Invention
[0006] This invention provides a blockchain-based education data management system and method, which solves the technical problems of difficulty in developing smart contracts, difficulty in assessing policy compliance, and complexity in the evolution and upgrading of smart contracts in related technologies.
[0007] This invention provides a blockchain-based method for managing educational data, comprising:
[0008] Build a language specific to the education business domain and train an education business intent understanding model to convert the natural language descriptions of education experts into formal specifications;
[0009] Based on formal specifications, constraint solving algorithms are applied to solve smart contract parameters that satisfy multiple constraints, generating smart contract code that satisfies multi-objective optimization.
[0010] Perform multi-level formal verification on the generated smart contract code to verify syntax correctness, business logic consistency, and security attribute satisfaction.
[0011] Build a knowledge base of education policies and regulations and calculate contract policy compliance scores to identify the impact of new policies on existing contracts;
[0012] Based on the contract compliance assessment results, a tiered transition strategy is implemented to achieve adaptive evolution and smooth upgrades of contracts.
[0013] In a preferred embodiment, the step of training the educational business intent understanding model includes:
[0014] An intent recognition model with a multi-layer attention mechanism, consisting of an encoder and a decoder, is constructed using the Transformer architecture.
[0015] We use word embeddings and positional encodings obtained from pre-training on educational corpora as initial representations;
[0016] Semantic features are extracted by a bidirectional encoder, and then an intent decoder is used to identify the operational intent, conditional logic, and constraint relationships in the business rules.
[0017] In a preferred embodiment, the step of applying the constraint solving algorithm to solve for smart contract parameters that satisfy multiple constraints includes:
[0018] Construct a model for satisfying educational business constraints, including functional constraints, security constraints, resource constraints, and compliance constraints;
[0019] An improved backtracking search algorithm combined with constraint propagation technique is used to solve the constraint satisfaction problem;
[0020] Based on the constraint solution results, a multi-objective optimization function is used to generate smart contract code. The multi-objective optimization function comprehensively considers functional correctness, security, execution efficiency, and compliance.
[0021] In a preferred embodiment, the step of performing multi-level formal verification on the generated smart contract code includes:
[0022] Build a static analyzer that supports the features of smart contract languages to perform syntax and type checks on contract code;
[0023] Symbolic execution techniques are applied in conjunction with an SMT solver to formally verify the key properties of the contract.
[0024] Build a resource consumption analysis model to accurately estimate the computational complexity and storage overhead during contract execution.
[0025] In a preferred embodiment, the step of calculating the contract policy compliance score includes:
[0026] Convert policy rules into inspectable contract attributes and establish a mapping relationship between policy rules and contract attributes;
[0027] The policy compliance of a contract is assessed using a weighted matching degree calculation formula, which is as follows:
[0028] ;
[0029] in, This indicates the overall policy compliance score of the contract. This indicates a contract that is to be evaluated. Represents a set of policies and rules. This represents the total number of rules in the policy rule set. This refers to a single policy rule within a set of policy rules. Indicating policy The weight, For contract Policy The degree of matching, This indicates that the summation calculation is performed on all policy rules in the policy rule set.
[0030] In a preferred embodiment, the step of implementing the tiered transition strategy includes:
[0031] Based on the assessment results of compliance risk, functional risk, and data risk, the contracts are divided into three levels of risk: high, medium, and low.
[0032] Emergency freeze and mandatory upgrades will be implemented for high-risk contracts;
[0033] A transition period is set for medium-risk contracts to enable the parallel operation and smooth migration of the old and new versions;
[0034] For low-risk contracts, a gradual update approach is adopted, and the upgrade is completed within the regular maintenance cycle.
[0035] In a preferred embodiment, the blockchain-based educational data management method further includes the following steps: implementing a transparent contract upgrade recording mechanism on the blockchain to record key information for each contract upgrade, including a unique identifier for the upgrade event, hashes of the old and new versions of the contract, IPFS hash references of the changed content, the approver and executor of the upgrade operation, upgrade timestamps, and status markers.
[0036] In a preferred embodiment, the step of constructing an education business domain-specific language includes:
[0037] Based on the standard terminology set and business rule pattern library of the education industry, a formal grammar rule set covering the core elements of teaching activities, evaluation rules, and access control is constructed.
[0038] The formal grammar rule set contains formal representations of concepts, entities, relations, and operations specific to the education field, forming the basic grammatical structure of the education business DSL.
[0039] In a preferred embodiment, the step of constructing the knowledge base of education policies and regulations includes:
[0040] Collect and organize relevant laws, policy documents, and data protection standards in the education field;
[0041] The policy content is organized using an ontological model, transforming the policy text into a machine-parseable rule representation;
[0042] Construct a knowledge base structure comprising a concept layer, a relation layer, and a rule layer, where each policy rule is represented as a triple. ,in, For applicable conditions, For the prescribed behavior, The degree of impact when a violation occurs.
[0043] In a preferred embodiment, a blockchain-based education data management system is used to execute a blockchain-based education data management method, comprising:
[0044] The formalization transformation module for education business rules is used to construct a language specific to the education business domain and train an education business intent understanding model.
[0045] The multi-constraint smart contract automatic generation module is used to generate smart contract code that satisfies multi-objective optimization by applying constraint solving algorithms;
[0046] The contract multi-level formal verification module is used to verify the generated smart contract code;
[0047] The policy compliance dynamic assessment module is used to build a knowledge base of education policies and regulations and calculate contract policy compliance scores;
[0048] The Contract Smart Evolution and Smooth Transition module is used to enable adaptive evolution and smooth upgrades of contracts.
[0049] The beneficial effects of this invention are as follows:
[0050] This invention improves the development efficiency and quality of smart contracts. By formalizing educational business rules and automatically generating multi-constraint smart contracts, it enhances smart contract development efficiency, shortens the development cycle, and reduces code defects. This allows educators without technical backgrounds to easily define complex educational data management rules, lowering the technical threshold for applying blockchain technology in the education field.
[0051] This invention effectively enhances the security and correctness of smart contracts. Through multi-level formal verification technology, it improves the detection rate of security vulnerabilities, thereby strongly protecting the security and integrity of educational data.
[0052] This invention reduces compliance risks in education data management. The dynamic assessment and adjustment function for policy compliance enables the system to respond promptly to changes in education policies, supports rapid assessment of policy impacts and generates compliance adjustment plans, improves the accuracy of compliance risk detection, and ensures the long-term legal and compliant operation of the education data management system.
[0053] This invention effectively ensures the continuity of business systems. The intelligent evolution and smooth transition mechanism of contracts enables the system to be upgraded safely and orderly when business rules change or policies are updated, reducing service interruption time during the upgrade process and avoiding service interruption and data inconsistency problems caused by contract updates.
[0054] This invention promotes the effective mining of the value of educational data. Based on the immutability of blockchain and the smart contract management capabilities of this invention, it improves the efficiency of data sharing among educational institutions, shortens the cycle of cross-institutional collaborative projects, and enhances the quality of data analysis, providing strong support for the value mining of educational data and the improvement of educational quality. Attached Figure Description
[0055] Figure 1 This is a flowchart of a blockchain-based educational data management method according to the present invention;
[0056] Figure 2 This is a detailed flowchart of the present invention for converting the natural language descriptions of education experts into formal specifications;
[0057] Figure 3 This is a detailed flowchart of the present invention for generating smart contract code that satisfies multi-objective optimization;
[0058] Figure 4 This is a detailed flowchart of the multi-level formal verification of the generated smart contract code according to the present invention;
[0059] Figure 5 This is a detailed flowchart of the present invention for identifying the impact of new policies on existing contracts;
[0060] Figure 6This is a detailed flowchart of the implementation of the hierarchical transition strategy of the present invention. Detailed Implementation
[0061] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, some features described in the examples may be combined in other examples.
[0062] At least one embodiment of the present invention discloses a blockchain-based educational data management method, such as... Figures 1 to 6 As shown, it includes the following steps:
[0063] Step 1: Construct a language specific to the education business domain and train an education business intent understanding model to convert the natural language descriptions of education experts into formal specifications;
[0064] Specifically, it includes the following sub-steps:
[0065] Step 1.1: Develop a language specific to the education business domain;
[0066] Based on the standard terminology set and business rule pattern library of the education industry, a formal grammar rule set is constructed that covers core elements such as teaching activities, evaluation rules, and access control. It includes formal representations of educational domain-specific conceptual entities (such as students, teachers, courses, grades, etc.), relationships (such as course selection, teaching, grading, etc.), and operations (such as access control, data statistics, evaluation calculation, etc.), forming the basic grammatical structure of the domain-specific language (DSL) for education business.
[0067] Step 1.2: Train the educational business intent understanding model;
[0068] A multi-layer attention mechanism intent recognition model is constructed using deep learning and natural language processing techniques. This model takes a natural language description from an education expert as input, extracts semantic features through a bidirectional encoder, and then uses an intent decoder to identify the operational intent, conditional logic, and constraint relationships within business rules.
[0069] Specifically, this intent understanding model adopts a Transformer architecture, which includes two main parts: an encoder and a decoder.
[0070] The encoder consists of 6 attention layers and feedforward neural network layers. Each layer contains a multi-head self-attention sublayer and a position feedforward network sublayer, which are connected by residual connections and layer normalization connections.
[0071] The decoder also consists of 6 layers, each containing a multi-head self-attention sublayer, an encoder-decoder attention sublayer, and a position feedforward network sublayer.
[0072] The input layer of the model uses the sum of word embeddings and positional encodings as the initial representation. The word embedding dimension is 512, which is obtained through pre-training on educational corpora.
[0073] The core calculation process of the model is as follows:
[0074] ;
[0075] ;
[0076] ;
[0077] in, Represents the sequence of natural language descriptions input; This represents the encoded hidden state. For query vector; This is an attention-weighted representation of features. The intent representation obtained from decoding Indicates encoder; This represents the attention mechanism; This indicates the decoder.
[0078] The calculation process of the multi-head attention mechanism is as follows:
[0079] ;
[0080] ;
[0081] ;
[0082] in, This describes the computational process of the multi-head attention mechanism. Indicates the first The output of each attention head; The computational process of a single attention mechanism; It queries the transformation matrix; It is the key transformation matrix; It is a value transformation matrix; It is the output transformation matrix; It is the dimension of the key vector; Indicates the first The output of each attention head; Indicates a splicing operation; This represents the softmax normalization function; Key matrix The transpose of the matrix; , , These represent the query matrix, key matrix, and value matrix, respectively.
[0083] In educational settings, the model can accurately understand rules such as "students can only take the final exam after completing coursework," identify that "completing homework" is a prerequisite for "taking the exam," and convert it into formal conditional statements.
[0084] The model was trained using a large amount of labeled educational business rule corpus (containing 5,000 educational rules and their formal representations in parallel corpus), using cross-entropy as the loss function and Adam optimizer for parameter updates. After 10 training epochs, it achieved a relatively high intent recognition accuracy on the validation set.
[0085] Step 1.3: Perform semantic parsing and formal transformation;
[0086] We use a trained intent understanding model to analyze educational business texts, extract entities, relationships, conditions, and behaviors, and map them to a formal representation defined by the DSL.
[0087] By using semantic dependency parsing technology, we can identify syntactic structures and semantic relationships to construct a semantic graph of business rules.
[0088] Then, according to predefined transformation rules, the semantic graph is converted into a formal specification that conforms to the DSL syntax, represented as a set of triples:
[0089] ;
[0090] in, Represents the main entity; Represents an object entity; Indicates the relationship or operation between entities; Indicates the index range of the entity set; This represents the final generated formal specification set.
[0091] Step 1.4: Apply semantically preserving code mapping techniques;
[0092] Based on formal specifications, a semantically preserving mapping algorithm is used to generate intermediate representation code.
[0093] This algorithm ensures that semantics are not lost during the conversion process by establishing a one-to-one correspondence between formal specifications and code templates.
[0094] For each operator or relation in the formal representation Find the corresponding code template Then the entity parameters and Fill the template to generate semantically preserved intermediate code snippets:
[0095] ;
[0096] in, Representation and relation The corresponding code template function; This represents the generated intermediate code snippet; , These represent the main entity parameters and the object entity parameters that are filled into the code template, respectively.
[0097] The output of step 1 is a structured formal specification containing a complete semantic representation of education business rules, which will serve as input for the automatic generation of subsequent smart contracts.
[0098] Step 2: Based on formal specifications, apply constraint solving algorithms to solve for smart contract parameters that satisfy multiple constraints, and generate smart contract code that satisfies multi-objective optimization.
[0099] Specifically, it includes the following sub-steps:
[0100] Step 2.1, construct the education business constraint model;
[0101] Based on formal specifications, a Constraint Satisfaction Problem (CSP) model for educational business constraints is constructed. This model defines a set of variables. This represents the state variables, function parameters, and return values in the contract, among which, Represents a set of variables. , , These represent the first in the contract. , , One variable, This indicates the total number of variables.
[0102] Define constraint set This indicates the conditions and restrictions in the business rules, where, Represents a set of constraints. , , They represent the first , , One constraint condition. This indicates the total number of constraints.
[0103] The constraint set covers four key types of constraints:
[0104] Functional constraints: Ensure that the smart contract fulfills all functional requirements defined in the education business rules;
[0105] Security constraints: to prevent common smart contract vulnerabilities, such as reentrancy attacks and integer overflows;
[0106] Resource constraints: Limit the computational complexity and storage overhead of the contract to ensure efficient execution;
[0107] Compliance constraints: Meet relevant education regulations and data protection requirements.
[0108] Step 2.2: Apply the constraint solving algorithm;
[0109] An improved backtracking search algorithm combined with constraint propagation technique is used to solve the constraint satisfaction problem.
[0110] The core process of the algorithm is as follows:
[0111] Initialize solution space ,in, Represents the set of all possible solution spaces. Represents a set of variables One possible combination of assignments;
[0112] For each constraint Applying constraint propagation reduces the solution space: ,in, Represents the set of all possible solution spaces. Represents a set of variables One possible combination of assignments, Represents a set of constraints The first in One constraint condition. This represents the intersection operation of sets, which narrows the solution space by filtering out assignment combinations that simultaneously satisfy all constraints.
[0113] Using a heuristic search strategy in the remaining solution space Finding the optimal solution ,in This represents the optimal combination of variable assignments selected based on a specific optimization objective in the solution space that satisfies all constraints.
[0114] The computational complexity of this algorithm is ,in It is the average size of the domain of the variable. This refers to the number of variables. To improve efficiency, the algorithm employs dynamic variable sorting and conflict-oriented learning techniques, reducing complexity to an acceptable level in practical applications.
[0115] Step 2.3: Generate multi-objective optimized contract code;
[0116] Based on the constraint solution results and combined with predefined blockchain platform characteristics, smart contract code that satisfies multi-objective optimization is automatically generated. The multi-objective optimization function is defined as:
[0117] ;
[0118] in, This represents the comprehensive optimization objective function of the smart contract code. Evaluate the functional correctness of the code; Assess the security of the code; Evaluate the execution efficiency of the code; Assess the compliance of the code. , , , These represent the weights for correctness, security, efficiency, and compliance, respectively. The weight parameters can be adjusted... It can generate contract code that focuses on different optimization objectives to meet the specific needs of different educational scenarios.
[0119] Step 2.4: Implement modular assembly of contract code;
[0120] The optimal solution obtained is mapped to executable smart contract code.
[0121] A modular design approach is adopted to break down the contract functionality into multiple independent modules, including data model, access control, business logic, and event notification.
[0122] Each module calls the others through a standard interface to form complete contract code. The core code generation algorithm is as follows:
[0123] Algorithm: Modular contract code generation;
[0124] Input: formal specification F, constraint set C, optimal solution s*;
[0125] Output: Smart contract code;
[0126] Initialize empty contract code;
[0127] Extract the data model definition from the optimal solution s* and generate state variable declaration code;
[0128] Analyze the access control rules in formal specification F and generate permission checking code;
[0129] For each business operation in F:
[0130] Generate the corresponding function signature;
[0131] Insert input parameter validation code;
[0132] Generate core business logic code based on operational semantics;
[0133] Add event emission code for state change notification;
[0134] Generate helper functions and decorators;
[0135] Assemble all code segments to form a complete contract;
[0136] Returns the contract code.
[0137] The output of step 2 is a set of smart contract codes that can be directly deployed. These codes implement all the functions of the education business rules while meeting various constraints.
[0138] Step 3: Perform multi-level formal verification on the generated smart contract code to verify the correctness of the syntax, the consistency of the business logic, and the satisfaction of the security attributes;
[0139] Specifically, it includes the following sub-steps:
[0140] Step 3.1: Implement static analysis of syntax and type;
[0141] Build a static analyzer that supports the features of smart contract languages to perform syntax and type checks on contract code.
[0142] This analyzer is based on Abstract Syntax Tree (AST) analysis technology. It traverses the AST structure of the contract code to detect basic issues such as syntax errors, type mismatches, and undefined variables. The analysis process can be represented as follows:
[0143] ;
[0144] in, Represents a static analysis function; This represents the input smart contract code; : , , They represent the detected first and second generations respectively. , , A specific error or warning item; This indicates the total number of specific errors or warnings.
[0145] Step 3.2: Perform symbolic execution and formal verification;
[0146] Symbolic execution techniques are applied, combined with SMT solvers such as Z3, to formally verify the key properties of the contract. This process first converts the contract code into an intermediate representation (IR), and then constructs a formal model containing state variables, functions, and assertions.
[0147] In practice, the symbolic execution system consists of the following three core components:
[0148] A semantic transformer that converts smart contract code into an intermediate representation in the form of a Control Flow Graph (CFG) and a Static Single Assignment (SSA);
[0149] The symbolic execution engine executes the program along the control flow graph path, maintaining symbolic values for each variable rather than actual values.
[0150] The state manager maintains state information during execution and handles path constraints.
[0151] For smart contracts in educational scenarios, the system pays particular attention to access control logic, such as verifying that only authorized teachers can modify student grades. Its symbolic execution process involves first replacing variables in the contract, such as "user role," with symbolic values. When the access control statement "require(user role == teacher)" is executed, a constraint is added. Go to the path constraint set and continue executing the "Modify Grade" operation. Finally, verify whether there are any non-teacher users who can modify grades in all reachable paths.
[0152] Define a set of verification assertions for security attributes. ,in, This represents the set of assertions used to verify the security properties of a smart contract; , , The first element in the set represents the... , , A specific assertion; This indicates the total number of assertions. The assertion set includes:
[0153] State consistency: Ensures that the contract state always satisfies predefined invariants on any execution path;
[0154] Access control security: Verify that only authorized roles can perform privileged operations;
[0155] Resource security: Check that the contract does not enter an infinite loop or deplete blockchain resources;
[0156] Interaction security: Verify that the interaction between the verification contract and external contracts does not introduce security vulnerabilities;
[0157] The symbolic execution process can be formally represented as the solver checking the satisfiability of the formula:
[0158] ;
[0159] in, This represents a function for checking satisfiability. Indicates a precondition; Indicates a postcondition; This indicates a logical implication relationship; Indicates logical negation;
[0160] If the formula is satisfied, a counterexample has been found, indicating a security vulnerability. This means that there exists a situation where the precondition is true but the postcondition is false, violating the security properties that a contract should have.
[0161] This system uses the Z3 solver to handle path constraints and has designed a custom verification rule base specifically for the security attributes of educational contracts. It includes 30 common contract vulnerability patterns, covering security issues ranging from basic integer overflows to complex reentrancy attacks. During verification, the system can accurately locate potential vulnerabilities and provide actionable remediation suggestions.
[0162] Step 3.3: Perform contract business logic verification;
[0163] Based on formal specifications, a contract business logic validator is constructed.
[0164] The validator compares the behavior of the contract code with the formal specifications to ensure that the code correctly implements the functions defined in the education business rules.
[0165] The verification process employs model checking technology, modeling contract behavior as a state transition system:
[0166] ;
[0167] in, Represents a state transition system. Representing the state space; Represents the initial state set; Indicates a transformation relationship; Indicates the tagging function;
[0168] Then check the model. Does it satisfy the property? , represented as ,in, This represents the business logic attributes that need to be verified.
[0169] Step 3.4: Construct a resource consumption analysis model;
[0170] Build a dedicated resource consumption analysis model to accurately estimate the computational complexity and storage overhead during contract execution.
[0171] This model is based on the theory of abstract interpretation and establishes an upper bound function for resource consumption for each function in the contract. ,in, This refers to functions within a contract; : Represents the input parameter space.
[0172] The following analysis formula is used to determine the computational complexity:
[0173] ;
[0174] in, Representation function Total gas consumption required for execution; This indicates the total number of different types of opcodes in the contract; Indicates the first The number of times a certain opcode appears during function execution; Indicates the first The standard gas consumption value for this type of opcode.
[0175] To assess storage overhead, calculate the maximum possible size of the state variables and dynamic arrays, and evaluate the storage space occupied by the contract on the blockchain.
[0176] The output of step 3 is a complete verification report, which includes the security, correctness and efficiency assessment results of the contract, as well as possible suggestions for fixing problems, providing a reliable guarantee for the next step of contract deployment and evolution.
[0177] Step 4: Build an education policy and regulation knowledge base and calculate the contract policy compliance score to identify the impact of new policies on existing contracts;
[0178] Specifically, it includes the following sub-steps:
[0179] Step 4.1: Construct a knowledge base of education policies and regulations;
[0180] This project collects and organizes relevant laws, regulations, policy documents, and data protection standards in the education field to construct a structured knowledge base for education policies and regulations. This knowledge base uses an ontology model to organize policy content, converting policy texts into machine-parseable rule representations. The core structure of the knowledge base comprises three layers:
[0181] Conceptual layer: Defines key concepts involved in education policies, such as "student privacy" and "data retention period";
[0182] Relationship layer: Defines the relationships between concepts, such as the relationship between "data access permissions" and "user roles";
[0183] Rule layer: Defines policy constraints, expressed using rule language, such as "IF data type = student sensitive information THEN must be stored encrypted";
[0184] Each policy rule Represented as a triple ,in, For applicable conditions, For the prescribed behavior, The severity rating indicates the degree of impact of the violation.
[0185] Step 4.2: Implement the mapping from policy rules to contract attributes;
[0186] Develop a rule mapping algorithm to convert policy rules into inspectable contract attributes. This algorithm establishes policy rules. With contract attributes Mapping relationship between ,in, For a set of rules, For attribute set.
[0187] The mapping process includes:
[0188] Analyze the semantics of policy rules and extract core constraints;
[0189] Convert the constraints into inspectable formal properties in the contract code;
[0190] Generate a property checker to verify whether the contract satisfies the property;
[0191] For example, the data protection policy rule "personal data can only be accessed after the user's consent" can be mapped to the access control check attribute in a contract.
[0192] Step 4.3: Calculate the contract policy compliance score;
[0193] Based on the mapped attribute set, the contract is assessed for policy compliance and a compliance score is calculated.
[0194] The weighted matching degree calculation formula was used for the assessment:
[0195] ;
[0196] in, This indicates the policy compliance score of the contract. This indicates a contract that is to be evaluated. Represents a set of policy rules. This indicates the total number of rules in the policy rule set. This refers to a single policy rule within a policy rule set. Indicating policy The weight, For contract Policy The formula calculates the weighted average compliance score of a contract against all policy rules by dividing by the total number of policy rules and then summing the weighted scores for each rule.
[0197] The matching degree calculation considers multiple factors, including implementation completeness, enforcement, and scope of impact. The specific calculation is as follows:
[0198] ;
[0199] in, For contract Policy The degree of matching, , , These represent the weighting coefficients for achieving integrity, enforcing mandatory requirements, and the scope of influence, respectively. The function evaluates the completeness of the contract's fulfillment of policy requirements; The function evaluates the enforceability of a contract to policy requirements; The scope of the impact of the function evaluation policy on contract functionality.
[0200] To improve the accuracy and interpretability of the evaluation, the system adopts a hybrid evaluation method that combines rule-based reasoning with machine learning.
[0201] For clearly defined policy rules (such as "student academic data must be kept for no less than 5 years"), use rule matching to directly assess compliance.
[0202] For vague policy requirements (such as "reasonably protecting user privacy"), a case-based reasoning approach is used to assess the degree of matching by calculating the similarity with historical compliance cases.
[0203] In its implementation, the system first trains a policy-contract relevance classifier, using bidirectional encoded features of contract codes and policy texts as input and outputting a relevance score. Then, for relevant policy-contract pairs, a fine-grained compliance assessment model is applied to calculate the matching degree. To handle new policies, the system employs transfer learning, leveraging model knowledge trained on existing policies to quickly adapt to the assessment requirements of new policies.
[0204] In educational applications, when assessing the compliance of a student data management contract with the "Minor Data Protection Policy," the system checks whether the contract has been implemented:
[0205] Data access permission control;
[0206] Data is stored in encrypted form;
[0207] Mechanism for authorizing guardians of minors;
[0208] Key elements such as data usage audit logs.
[0209] The implementation status of each element is scored, ultimately resulting in a compliance score for the contract regarding the policy. If the compliance score is found to be below a threshold (e.g., 0.7), the system will mark the contract as "requiring modification" and provide specific improvement suggestions.
[0210] Step 4.4: Construct a policy change impact analysis procedure;
[0211] A change impact analysis procedure was developed to identify the impact of new policies on existing contracts. This procedure employs a difference analysis algorithm to compare changes between the old and new policy rule sets and assess the impact of these changes on contract compliance. The main steps include:
[0212] Set of new and old policies and rules and Perform a difference analysis to obtain the new rule set:
[0213] ;
[0214] Remove rule set:
[0215] ;
[0216] Modify rule set:
[0217] ;
[0218] in, This represents the new set of policies and rules; This represents the set of old policies and rules; This indicates the addition of a new rule set; This indicates the removal of the rule set; This indicates a modification to the rule set;
[0219] For each contract Assess the impact of each rule set on its compliance:
[0220] Impact of the new rule:
[0221] ;
[0222] in, This indicates the impact of the new rules. This indicates a smart contract to be evaluated; Indicating policy rules The weights; Indicates contract Policy rules The degree of matching; This indicates the degree of mismatch between the contract and the newly added rules;
[0223] Impact of rule changes:
[0224] ;
[0225] in, Indicates the impact of the rule modification; Indicating policy rules The weights; This indicates a smart contract to be evaluated; This indicates the revised policy rules; This refers to the old policies and rules before the amendment; This represents the absolute difference in the contract's degree of matching with the rules before and after the modification, reflecting the extent to which the rule changes affect the contract.
[0226] Calculate the overall impact score:
[0227] ;
[0228] in, Indicates the impact of policy changes on contracts Overall impact score; This indicates the score representing the impact of the new rule on the contract; This represents the score indicating the impact of rule changes on the contract.
[0229] The output of step 4 is a policy compliance assessment report for the contract and targeted adjustment recommendations, including compliance score, details and severity of non-compliance items, priority remediation recommendations, etc., to provide decision support for the continued compliant operation of the contract.
[0230] Step 5: Based on the contract compliance assessment results, implement a tiered transition strategy to achieve adaptive evolution and smooth upgrades of the contract;
[0231] Specifically, it includes the following sub-steps:
[0232] Step 5.1: Construct a contract adaptive evolution system;
[0233] An adaptive evolution system is built to automatically generate contract update plans based on changes in business rules and policy compliance assessments. This system employs an incremental evolution strategy, generating update code with minimal modifications for each type of contract change required. The evolution process is as follows:
[0234] Input: Original contract code Business rule changes Impact of policy changes ;
[0235] Merge change requirements: ;
[0236] Change category: Decompose into state variable changes Function logic changes and access control changes ;
[0237] For each type of change, generate the corresponding code modifications:
[0238] State variable modification: an extension method compatible with existing data structures;
[0239] Function logic modification: retain the interface, update the internal implementation;
[0240] Access control modifications: Adjustment of permission check logic;
[0241] Synthesize update code: ;
[0242] This process employs program synthesis technology to precisely control the scope of code modifications, ensuring that only necessary parts are updated.
[0243] Step 5.2, implement the contract version management model;
[0244] Design a contract version management model to maintain the version history and evolution path of contracts. The model uses a Directed Acyclic Graph (DAG) to represent the relationships between contract versions, where nodes represent contract versions and edges represent the evolutionary relationships between versions.
[0245] For the contract Its version history is represented as follows:
[0246] ;
[0247] in, This represents a smart contract to be managed; Indicates contract Version history; Represents a set of versions; This represents the set of evolutionary relationships between versions; This represents a single version node in a version set, and each version node contains four key attributes:
[0248] Version number: A unique identifier for a version, usually in semantic version number format;
[0249] Change Summary: Records the main changes in this version compared to the previous version;
[0250] Compliance Status: Indicates whether this version complies with current policy and regulatory requirements;
[0251] Timestamp: Records the exact time this version was created or deployed.
[0252] In practice, the contract version management system employs a distributed storage architecture, storing version metadata on the blockchain while the complete version code is stored in IPFS (InterPlanetary File System), enabling efficient access through content addressing. Each version node contains the following details:
[0253] Version identifier: includes semantic version number (e.g., v1.2.3, where 1 is the major version, 2 is the minor version, and 3 is the patch version) and unique hash identifier;
[0254] Metadata includes author information, timestamp, reason for change, review status, and deployment environment;
[0255] Change summary: Record the changed functions, variables, and access control rules using a structured format;
[0256] Code differences: Precise records of differences from the previous version, using a customized contract difference comparison algorithm;
[0257] Compliance Status: Records the compliance checks passed and their scores for this version;
[0258] Related business rules and policy versions: Track the correspondence between version updates and changes in business rules / policies;
[0259] The system supports three version branching strategies:
[0260] Linear upgrade, suitable for regular updates;
[0261] Parallel branching, suitable for customized versions for different scenarios;
[0262] Merge branches to integrate improvements from multiple branches.
[0263] Taking the education certificate issuance contract as an example, when the Ministry of Education releases new electronic certificate specifications, the system creates a new version branch for the contract. The new version inherits the basic functions from the current main branch, while implementing the digital signature mechanism and verification process required by the new specifications. After passing verification in the test environment, the new version is marked as "pre-release" and is publicized to educational institutions within a specified time window. Finally, on the designated switchover date, the system smoothly migrates traffic from the old version to the new version, while retaining the verification function of certificates issued by the old version, ensuring the continuity of certificate verification services.
[0264] Step 5.3: Construct the hierarchical transition strategy execution module;
[0265] A tiered transition strategy execution module is constructed to implement different levels of upgrade strategies based on the contract's risk level and the urgency of the change. Risk assessment is based on the following factors:
[0266] Compliance risk: Based on compliance scores, the severity of non-compliance is quantified;
[0267] Functional risk: Assess the extent to which the changes will impact existing functionality;
[0268] Data risk: Assess the extent of the impact of changes on existing data;
[0269] Based on the risk assessment results, contracts are categorized into high, medium, and low risk levels, and corresponding transition strategies are applied:
[0270] High-risk contracts: Implement emergency freeze, suspend critical operations, and force upgrades;
[0271] Medium-risk contracts: A transition period is set, with the old and new versions running in parallel for a smooth migration;
[0272] Low-risk contracts: Employ incremental updates, completing upgrades within regular maintenance cycles;
[0273] Step 5.4: Achieve blockchain-level transparent upgrade records;
[0274] A transparent contract upgrade recording mechanism is implemented on the blockchain to ensure that all version changes and upgrade operations are traceable and auditable. This mechanism adopts the MetaTransaction model, recording key information for each contract upgrade on the blockchain, including:
[0275] A unique identifier for an upgrade event;
[0276] The hashes of the old and new versions of the contract;
[0277] IPFS hash reference of the changed content;
[0278] The approver and executor of the upgrade operation;
[0279] Upgrade timestamps and status markers;
[0280] By permanently recording this information as part of a blockchain transaction, the entire upgrade process is made transparent and trustworthy, allowing any interested party to verify the legality and integrity of the upgrade.
[0281] The output of step 5 is a complete solution for smart contract evolution and smooth transition, including updated contract code, version management records and upgrade execution plans, to achieve a safe and controllable transition of the contract from the current state to the target state.
[0282] Application example of this implementation method:
[0283] This implementation method has been applied in the smart contract system of a provincial-level education resource sharing platform. This platform connects over 200 schools and more than 30 educational institutions across the province, managing data on over 3 million students and 100,000 teaching resources. The platform used this implementation method to solve a series of problems related to education data management, credit verification, resource sharing, and policy compliance in cross-institutional collaboration. The following will detail specific application examples and related data of this method on this platform.
[0284] Application example of formal transformation of education business rules:
[0285] In this educational resource sharing platform, this implementation method is first applied to the formal transformation of cross-school credit recognition rules. The platform collects credit recognition rules submitted by various schools in natural language descriptions, such as: "If a student takes the Computer Network course (course code CS301) at school A and achieves a score of 80 or above, the credits can be recognized at school B as credits for Network Technology Fundamentals (course code IT202), with a recognition ratio of 1:1; if the score is between 70 and 79, the recognition ratio is 0.8:1."
[0286] Through the formalization transformation steps of the educational business rules in this implementation method, the system converts the above-mentioned natural language rules into formal representations. Table 1 shows the transformation results of some credit transfer rules:
[0287] Table 1: Examples of formal transformation of credit transfer rules;
[0288]
[0289] The overall performance of the intent understanding model in processing this batch of credit transfer rules is shown in Table 2:
[0290] Table 2: Performance of the intent understanding model in credit transfer rule processing;
[0291]
[0292] The formally transformed rules were used to construct the DSL representation of credit transfer smart contracts, providing an accurate semantic foundation for subsequent automatic contract generation. In practical applications, the model processed more than 5,000 credit transfer rules submitted by various universities, achieving standardization and automated processing of rule representations.
[0293] Automatic generation of application examples for multi-constraint smart contracts:
[0294] Based on the rule representation obtained through formal transformation, this implementation method achieves automatic generation of credit transfer contracts in an educational resource sharing platform. The core constraints that the system needs to handle include:
[0295] Fairness constraints in credit recognition;
[0296] Constraints on the balance of resource exchange between schools;
[0297] Students can avoid constraints by repeating coursework.
[0298] Education authorities are bound by policy compliance constraints.
[0299] The constraint solver analyzes these constraints and generates the optimal contract parameter configuration that satisfies the needs of all parties. Table 3 shows the constraint resolution results automatically generated for a batch of credit transfer contracts:
[0300] Table 3: Example of the solution results for the credit transfer contract constraints;
[0301]
[0302] Based on the constraint solution results, the system automatically generated a smart contract for cross-university credit transfer, including functional modules such as credit recognition, course substitution, and grade conversion. Table 4 shows the number and quality indicators of automatically generated contracts within a semester:
[0303] Table 4: Quality statistics of automatically generated credit transfer contracts;
[0304]
[0305] Compared to traditional manual coding methods, automatically generated contracts improve development efficiency and code quality. In practical applications, these contracts have processed cross-institutional course selection and credit transfer applications for over 48,000 students, effectively solving the credit recognition problem in multi-institutional collaborations.
[0306] Application examples of policy compliance assessment and contract evolution:
[0307] During its operation, the education resource sharing platform underwent several updates to education policies, including the promulgation and revision of regulations such as the "Administrative Measures for Mutual Recognition of Credits in Higher Education Institutions," the "Data Security Law of the People's Republic of China," and the "Regulations on the Protection of Minors Online." The policy compliance assessment and contract evolution functions of this implementation method played a crucial role in these policy changes.
[0308] After the new version of the "Administrative Measures for Mutual Recognition of Academic Credits in Higher Education Institutions" was issued, the system automatically analyzed the policy text, extracted the core rules, and assessed the compliance of existing contracts. Table 5 shows the contract compliance assessment results after a certain policy update:
[0309] Table 5: Contract Compliance Assessment Results After Policy Update;
[0310]
[0311] Based on the compliance assessment results, the system automatically generated contract update plans. Table 6 shows the evolution and results of contracts with different risk levels:
[0312] Table 6: Statistics on Contract Evolution Processing Results;
[0313]
[0314] In response to the new data classification and grading requirements stipulated in the "Data Security Law of the People's Republic of China," the system has implemented special handling for data sharing contracts. Table 7 shows the compliance adjustments made to data sharing contracts:
[0315] Table 7: Results of Compliance Adjustments to Data Sharing Contracts;
[0316]
[0317] Compared to traditional contract update methods, the contract evolution based on this implementation reduces compliance risks and business interruption time. During three major policy changes, the system successfully completed compliance assessments for all 832 contracts and automatically upgraded 395 of those requiring updates, reducing the average response time by 85% and improving business continuity.
[0318] Key technical effectiveness verification:
[0319] Verification of improved smart contract development efficiency:
[0320] By comparing the performance of this implementation method with the traditional manual development method in the development of different types of educational smart contracts, the improvement in development efficiency can be clearly seen. Table 8 shows detailed comparison data:
[0321] Table 8: Comparison of Smart Contract Development Efficiency;
[0322]
[0323] Real-world application data shows that, on average, this implementation method improves smart contract development efficiency by 303%, slightly lower than the expected target of 320%, but still better than traditional methods. In terms of code defect reduction, it averages 85.2%, largely consistent with the expected 85%. The advantages of this implementation method are particularly evident in complex student data management contracts, where efficiency is improved by 336% and defects are reduced by 91%.
[0324] Verification of Improved Policy Response Capability:
[0325] The policy responsiveness of this implementation method has been fully validated during three major policy updates. Table 9 shows specific data on policy response speed and system availability:
[0326] Table 9: Comparison of Policy Response Capabilities;
[0327]
[0328] Data shows that this implementation method completes policy change response within an average of 26.5 minutes, far superior to the traditional method's average response time of 52.3 hours, representing a 118-fold improvement in response speed. The system's average availability reaches 99.98%, fully consistent with the expected goals. In particular, during the implementation of the "Data Security Law of the People's Republic of China," despite the large number of sensitive data processing contracts requiring updates, the system still maintained an extremely high availability of 99.99%.
[0329] In summary, the core technical effects of this implementation method have been fully verified in practical applications. It has achieved certain technical progress in two key indicators: smart contract development efficiency and policy response capability, providing efficient, secure, and compliant technical support for education data management.
[0330] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.
Claims
1. A blockchain-based method for managing educational data, characterized in that, Includes the following steps: Build a language specific to the education business domain and train an education business intent understanding model to convert the natural language descriptions of education experts into formal specifications; Based on formal specifications, constraint solving algorithms are applied to solve smart contract parameters that satisfy multiple constraints, generating smart contract code that satisfies multi-objective optimization. Perform multi-level formal verification on the generated smart contract code to verify syntax correctness, business logic consistency, and security attribute satisfaction. Build a knowledge base of education policies and regulations and calculate contract policy compliance scores to identify the impact of new policies on existing contracts; Based on the contract compliance assessment results, a tiered transition strategy is implemented to achieve adaptive evolution and smooth upgrades of contracts.
2. The blockchain-based educational data management method according to claim 1, characterized in that, The steps of the training and education business intent understanding model include: An intent recognition model with a multi-layer attention mechanism, consisting of an encoder and a decoder, is constructed using the Transformer architecture. We use word embeddings and positional encodings obtained from pre-training on educational corpora as initial representations; Semantic features are extracted by a bidirectional encoder, and then an intent decoder is used to identify the operational intent, conditional logic, and constraint relationships in the business rules.
3. The blockchain-based educational data management method according to claim 1, characterized in that, The steps for applying the constraint solving algorithm to solve for smart contract parameters that satisfy multiple constraints include: Construct a model for satisfying educational business constraints, including functional constraints, security constraints, resource constraints, and compliance constraints; An improved backtracking search algorithm combined with constraint propagation technique is used to solve the constraint satisfaction problem; Based on the constraint solution results, a multi-objective optimization function is used to generate smart contract code. The multi-objective optimization function comprehensively considers functional correctness, security, execution efficiency, and compliance.
4. The blockchain-based educational data management method according to claim 1, characterized in that, The steps for performing multi-level formal verification on the generated smart contract code include: Build a static analyzer that supports the features of smart contract languages to perform syntax and type checks on contract code; Symbolic execution techniques are applied in conjunction with an SMT solver to formally verify the key properties of the contract. Build a resource consumption analysis model to accurately estimate the computational complexity and storage overhead during contract execution.
5. The blockchain-based educational data management method according to claim 1, characterized in that, The steps for calculating the contract policy compliance score include: Convert policy rules into inspectable contract attributes and establish a mapping relationship between policy rules and contract attributes; The policy compliance of a contract is assessed using a weighted matching degree calculation formula, which is as follows: ; in, This indicates the overall policy compliance score of the contract. This indicates a contract that is to be evaluated. Represents a set of policies and rules. This represents the total number of rules in the policy rule set. This refers to a single policy rule within a set of policy rules. Indicating policy The weight, For contract Policy The degree of matching, This indicates that the summation calculation is performed on all policy rules in the policy rule set.
6. The blockchain-based educational data management method according to claim 1, characterized in that, The steps for implementing the tiered transition strategy include: Based on the assessment results of compliance risk, functional risk, and data risk, the contracts are divided into three levels of risk: high, medium, and low. Emergency freeze and mandatory upgrades will be implemented for high-risk contracts; A transition period is set for medium-risk contracts to enable the parallel operation and smooth migration of the old and new versions; For low-risk contracts, a gradual update approach is adopted, and the upgrade is completed within the regular maintenance cycle.
7. The blockchain-based educational data management method according to claim 1, characterized in that, The blockchain-based educational data management method further includes the following steps: implementing a transparent contract upgrade recording mechanism on the blockchain to record key information for each contract upgrade, including a unique identifier for the upgrade event, the hash of the old and new versions of the contract, the IPFS hash reference of the changed content, the approver and executor of the upgrade operation, the upgrade timestamp, and the status marker.
8. The blockchain-based educational data management method according to claim 1, characterized in that, The steps for building a language specific to the education business domain include: Based on the standard terminology set and business rule pattern library of the education industry, a formal grammar rule set covering the core elements of teaching activities, evaluation rules, and access control is constructed. The formal grammar rule set contains formal representations of concepts, entities, relations, and operations specific to the education field, forming the basic grammatical structure of the education business DSL.
9. The blockchain-based educational data management method according to claim 1, characterized in that, The steps for constructing the knowledge base of education policies and regulations include: Collect and organize relevant laws, policy documents, and data protection standards in the education field; The policy content is organized using an ontological model, transforming the policy text into a machine-parseable rule representation; Construct a knowledge base structure comprising a concept layer, a relation layer, and a rule layer, where each policy rule is represented as a triple. ,in, For applicable conditions, For the prescribed behavior, The degree of impact when a violation occurs.
10. A blockchain-based education data management system, used to execute the blockchain-based education data management method according to any one of claims 1-9, characterized in that, include: The formalization transformation module for education business rules is used to construct a language specific to the education business domain and train an education business intent understanding model. The multi-constraint smart contract automatic generation module is used to generate smart contract code that satisfies multi-objective optimization by applying constraint solving algorithms; The contract multi-level formal verification module is used to verify the generated smart contract code; The policy compliance dynamic assessment module is used to build a knowledge base of education policies and regulations and calculate contract policy compliance scores; The Contract Smart Evolution and Smooth Transition module is used to enable adaptive evolution and smooth upgrades of contracts.
Citation Information
Patent Citations
High-level higher education system and method based on block chain
CN111062841A
Block chain smart contract generation method and device, and electronic equipment
CN115268847A
Kindergarten data management system based on digital twin and block chain
CN119168820A
Data processing method and device, electronic equipment and computer readable storage medium
CN119624713A
Software copyright management system based on smart contract
CN119903491A
Cited By
Digital archive management system based on multi-modal knowledge graph and block chain
CN121765141A