Smart contract automatic verification system
By performing text analysis of smart contracts and determining multi-dimensional content parameters, a fast and effective verification process is achieved, solving the problems of inefficiency and insufficient accuracy in the existing technology, and ensuring the security and reliability of smart contracts.
Patent Information
- Application Number
- CN202510432214.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing smart contract verification methods are inefficient, require a lot of manual intervention, and are insufficient inaccuracy, so they cannot effectively deal with code vulnerabilities and contract execution abnormalities.
By text analysis of the smart contract, the basic content parameters of multi-dimensional content are determined, the content of the project to be verified is extracted, the verification results are recorded using a parallel verification process, and the abnormal results are marked and output to achieve comprehensive and reliable verification.
It improves the efficiency and accuracy of smart contract verification and ensures the security and reliability of contracts.
Smart Images

Figure CN120354841A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly to an intelligent contract automatic verification system. Background Art
[0002] An intelligent contract is an automatically executed contract clause deployed on a blockchain in the form of code. When the pre-set conditions are met, the contract clause will be automatically executed without the intervention of a third party. It is widely used because of its advantages such as low cost, high execution efficiency, and simplified process;
[0003] However, there are many risks in the process of writing and deploying intelligent contracts. For example, code vulnerabilities may lead to serious problems such as theft of funds and abnormal contract execution. Therefore, it is necessary to conduct a comprehensive and reliable verification of intelligent contracts;
[0004] However, the current verification methods have defects such as low efficiency, requiring a large amount of manual intervention, and insufficient accuracy, thus greatly reducing the verification effect of intelligent contracts;
[0005] Therefore, in order to overcome the above defects, the present invention provides an intelligent contract automatic verification system. Summary of the Invention
[0006] The present invention provides an intelligent contract automatic verification system, which is used to accurately and effectively determine multi-dimensional basic content parameters of an intelligent contract by parsing the text of the intelligent contract, so as to extract corresponding items to be verified from the multi-dimensional basic content parameters according to the verification project set configured in the background, and then facilitate each verification project to quickly and effectively verify the corresponding items to be verified. Secondly, verify the corresponding items to be verified according to the verification processes of each verification project at the same time, and accurately determine the verification results of different content parameters in the intelligent contract. Finally, summarize the verification results of each step node in the verification process under each verification project, and mark and output the existing abnormal verification results, so as to conduct a comprehensive and reliable verification of the intelligent contract, and at the same time improve the efficiency and accuracy of the verification of the intelligent contract.
[0007] The present invention provides an intelligent contract automatic verification system, including:
[0008] A contract decomposition module, configured to parse the text of the intelligent contract, determine the multi-dimensional basic content parameters of the intelligent contract, and extract the items to be verified from the multi-dimensional basic content parameters respectively based on the verification project set configured in the background;
[0009] The contract verification module is used to perform process verification on the corresponding items to be verified in parallel based on the verification processes of each verification item according to the execution result of the contract decomposition module, and record the verification results of each step node in the verification process in real time;
[0010] The result output module is used to summarize the verification results of each step node in the verification process under each verification item according to the execution result of the contract verification module, and mark and output the existing abnormal verification results based on the summary results.
[0011] Preferably, for an intelligent contract automatic verification system, the contract decomposition module includes:
[0012] The contract module includes: a contract receiving unit, a text parsing unit, and a content parameter determination unit. The output result of the contract receiving unit is the input parameter of the text parsing unit, and the output result of the text parsing unit is the input parameter of the content parameter determination unit. The specific steps include:
[0013] The contract receiving unit is used to read the intelligent contract based on the communication interface, traverse the content of the intelligent contract, and obtain the category composition of the contract code;
[0014] The text parsing unit is used to split the contract code of each category separately using a differential strategy based on the category composition of the contract code for lexical and syntactic structure, and determine the target semantics of each contract code based on the split lexical units and syntactic structures;
[0015] The content parameter determination unit is used for:
[0016] Determine the types of parameters represented by different contract codes based on the target semantics, track the variables of different contract codes, and determine the call relationships and data flows of different types of parameters;
[0017] Determine the business content of different types of parameters based on the call relationships and data flows, and associate the business content with the corresponding types of parameters to obtain the multi-dimensional basic content parameters of the intelligent contract.
[0018] Preferably, for an intelligent contract automatic verification system, the contract decomposition module includes:
[0019] The contract decomposition module further includes: a verification item determination unit and a content extraction unit. The output result of the verification item determination unit is the input parameter of the content extraction unit. The specific steps include:
[0020] The verification item determination unit is used to obtain the background configuration data of the management terminal, perform business feature analysis on the background configuration data, and determine the set of verification items when the intelligent contract is applied;
[0021] The content extraction unit is used for:
[0022] Extract the business review scope of each verification item in the verification item set, and convert the business review scope into a feature vector;
[0023] Based on the feature vector, determine the correlation degree between the multi-dimensional basic content parameters and the business review scope of each verification item respectively, and determine the multi-dimensional basic content parameters with a correlation degree greater than the preset threshold as strongly correlated data;
[0024] Summarize the strongly correlated data of each verification item to obtain the content of the item to be verified corresponding to each verification item.
[0025] Preferably, an intelligent contract automatic verification system, a content extraction unit, includes:
[0026] The content extraction unit includes: a result acquisition subunit and a storage subunit. Among them, the output result of the result acquisition subunit is the input parameter of the storage subunit. The specific steps include:
[0027] The result acquisition subunit is used for:
[0028] Obtain the content of the item to be verified corresponding to each verification item, determine the structural composition of each content of the item to be verified, and generate a description label for the content of the item to be verified based on the structural composition;
[0029] Construct a structural record table for the content of each item to be verified, and record the description label of the content of the item to be verified in the structural record table;
[0030] The storage subunit is used to bundle the record result and the content of the item to be verified, and store the record result and the content of the item to be verified in a preset storage space based on the bundling result.
[0031] Preferably, an intelligent contract automatic verification system, a contract verification module, includes:
[0032] The contract verification module includes: a process determination unit, a verification unit and a result recording unit. Among them, the output result of the process determination unit is the input parameter of the verification unit, and the output result of the verification unit is the input parameter of the result recording unit. The specific steps include:
[0033] The process determination unit is used for:
[0034] Obtain the verification process of each verification item, parse the verification process, and determine the step nodes included in each verification process;
[0035] Extract the corresponding verification rules from the rule library based on the business attributes of each step node, and determine the attention nodes for the content of the item to be verified in each step node based on the verification rules;
[0036] A verification unit, configured to:
[0037] Determine the topological structure among various verification items based on the management objectives of the smart contract, and determine the first coordination relationship among different verification processes and the second coordination relationship among different step nodes in different verification processes based on the topological structure;
[0038] Determine the prior conditions among the verification processes of each verification item based on the first coordination relationship, and determine the startup order of the verification processes of each verification item based on the prior conditions;
[0039] Control the step nodes in the verification processes of each verification item according to the startup order to sequentially verify the content of the item to be verified in parallel according to the focus of attention, and track the sequential verification process of each verification process;
[0040] Based on the second coordination relationship, perform conditional waiting on the step nodes without execution conditions in the verification processes of different verification items according to the tracking results, and restart the step nodes waiting for conditions when the startup conditions are met;
[0041] A result recording unit, configured to:
[0042] Determine the verification results of each step node in different verification processes for the corresponding content of the item to be verified based on the restart results and the tracking results, and generate an explanation label for the verification results based on the business attributes of the step nodes;
[0043] Associate the explanation label with the verification results and record the association results.
[0044] Preferably, a smart contract automatic verification system, the verification unit includes:
[0045] The verification unit includes: a result analysis subunit, a vulnerability analysis subunit, and a rule update subunit. Among them, the output result of the result analysis subunit is the input parameter of the vulnerability analysis subunit, and the output result of the vulnerability analysis subunit is the input parameter of the rule update subunit. The specific steps include:
[0046] The result analysis subunit is configured to obtain the verification results of each step node in different verification processes for the corresponding content of the item to be verified, and determine the verification vulnerabilities existing when verifying the corresponding content of the item to be verified in different verification processes based on the verification results;
[0047] The vulnerability analysis subunit is configured to extract the vulnerability patterns of the verification vulnerabilities and the vulnerability characteristics under the vulnerability patterns, and determine the supplementary verification rules for the verification vulnerabilities based on the vulnerability patterns and the vulnerability characteristics;
[0048] The rule update subunit is configured to:
[0049] Obtain the business supervision change characteristics of the smart contract, and determine the updated verification rules based on the business supervision change characteristics;
[0050] Update the rule library based on the supplementary verification rules and the updated verification rules.
[0051] Preferably, a smart contract automatic verification system, a result output module, includes:
[0052] The result output module includes a mechanism start unit and a result summary unit. Among them, the output result of the mechanism start unit is the input parameter of the result summary unit. The specific steps include:
[0053] The mechanism start unit is used to start the result summary mechanism for each verification item after the full process of each verification item is executed;
[0054] The result summary unit is used to summarize the corresponding verification results based on the start result according to the result summary mechanism according to the execution order in the verification process of each step node under each verification item, and perform adjacent bit association on the verification results of each step node based on the summary result;
[0055] Obtain the summary result of the verification results of each step node in the verification process under each verification item based on the adjacent bit association result.
[0056] Preferably, a smart contract automatic verification system, a result output module, includes:
[0057] The result output module further includes: an anomaly determination unit, a marking unit, and a result output unit. Among them, the output result of the anomaly determination unit is the input parameter of the marking unit, and the output result of the marking unit is the input parameter of the result output unit. The specific steps include:
[0058] The anomaly determination unit is used for:
[0059] Obtain the obtained summary result, and perform multi-dimensional analysis on each verification result based on the summary result;
[0060] Determine the verification results that do not meet the verification rules among each verification result based on the multi-dimensional analysis result, and determine the verification results that do not meet the verification rules as abnormal verification results;
[0061] The marking unit is used for:
[0062] Extract the status representation of the abnormal verification result, and determine the abnormal reason of the smart contract based on the matching relationship between the status representation and the verification rules;
[0063] Determine the marking method for different abnormal verification results based on the status representation and the abnormal reason, and perform differentiated marking on the existing abnormal verification results based on the marking method;
[0064] A result output unit for outputting both the distinguished and labeled abnormal verification results and the non-abnormal verification results to the management terminal.
[0065] Preferably, for an intelligent contract automatic verification system, the result output unit includes:
[0066] The result output unit includes: a data classification subunit and a display subunit. Among them, the output result of the data classification subunit is the input parameter of the display subunit. The specific steps include:
[0067] The data classification subunit is used to receive and output the distinguished and labeled abnormal verification results and non-abnormal verification results based on the management terminal, and distinguish the distinguished and labeled abnormal verification results and non-abnormal verification results;
[0068] The display subunit is used for:
[0069] Based on the classification result, the distinguished and labeled abnormal verification results and non-abnormal verification results are respectively visually displayed for the first time on the management terminal. At the same time, the original data of the abnormal verification results is traced in the intelligent contract, and the contract data corresponding to the abnormal verification results is circled in the intelligent contract based on the tracing result;
[0070] Based on the circled result, a second visual display of the intelligent contract is performed.
[0071] Preferably, for an intelligent contract automatic verification system, the result output module includes:
[0072] The result output module further includes: a result splitting unit and a response unit. Among them, the output result of the result splitting unit is the input parameter of the response unit. The specific steps include:
[0073] The result splitting unit is used to split the abnormal verification results into items based on the output result, and determine the abnormal characteristics under each item based on the item splitting;
[0074] The response unit is used for:
[0075] Based on the abnormal characteristics, match the corresponding available guiding measures from the preset response strategy library, and summarize the available guiding measures under each item to generate a response measure guiding table;
[0076] Based on the response measure guiding table, conduct response guidance for the management personnel.
[0077] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0078] By performing text parsing on the smart contract, accurate and effective determination of multi-dimensional basic content parameters of the smart contract is achieved, so as to extract corresponding items to be verified from the multi-dimensional basic content parameters according to the set of verification items configured in the background, and further facilitate each verification item to quickly and effectively verify the corresponding items to be verified. Secondly, according to the verification processes of each verification item, the corresponding items to be verified are verified simultaneously to accurately determine the verification results of different content parameters in the smart contract. Finally, the verification results of each step node in the verification process under each verification item are summarized, and the abnormal verification results are marked and output to achieve comprehensive and reliable verification of the smart contract. At the same time, the efficiency and accuracy of smart contract verification are improved.
[0079] Other features and advantages of the present invention will be described in the following specification, and, in part, will be obvious from the specification, or will be understood by implementing the present invention. The objectives and other advantages of the present invention can be realized and obtained by the structures specifically pointed out in this application document.
[0080] The technical solutions of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] The accompanying drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation to the present invention. In the drawings:
[0082] Figure 1 is a structural diagram of a smart contract automatic verification system in an embodiment of the present invention;
[0083] Figure 2 is a structural diagram of a contract decomposition module in a smart contract automatic verification system in Embodiment 2 of the present invention;
[0084] Figure 3 is a structural diagram of a contract verification module in a smart contract automatic verification system in Embodiment 5 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0085] The following describes the preferred embodiments of the present invention with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only for the purpose of illustrating and explaining the present invention, and are not intended to limit the present invention.
[0086] Embodiment 1:
[0087] This embodiment provides a smart contract automatic verification system, as Figure 1 shown, including:
[0088] The contract decomposition module is used to perform text parsing on the smart contract, determine the multi-dimensional basic content parameters of the smart contract, and extract the content of the items to be verified for the multi-dimensional basic content parameters respectively based on the set of verification items configured in the background;
[0089] The contract verification module is used to perform process verification on the content of the corresponding items to be verified in parallel based on the verification processes of each verification item according to the execution result of the contract decomposition module, and record the verification results of each step node in the verification process in real time;
[0090] The result output module is used to summarize the verification results of each step node in the verification process under each verification item according to the execution result of the contract verification module, and mark and output the existing abnormal verification results based on the summary results.
[0091] In this embodiment, text parsing refers to processing such as code conversion and syntax structure parsing of the smart contract, aiming to determine the basic information in the smart contract. For example, it can be to determine the definition and usage scope of variables in the smart contract, the functions of functions, etc.
[0092] In this embodiment, the multi-dimensional basic content parameters refer to the basic value-taking situations of various different types of parameters obtained after text parsing of the smart contract.
[0093] In this embodiment, the set of verification items is set in advance, including the security, compliance, and functionality of the smart contract.
[0094] In this embodiment, the extraction of the content of the items to be verified refers to splitting the multi-dimensional basic content parameters according to the set of verification items, aiming to facilitate the direct and rapid processing of the corresponding content to be verified by different verification items.
[0095] In this embodiment, the verification process is set in advance, including verifying each item to be verified through verification rules.
[0096] In this embodiment, process verification refers to performing step-by-step verification on the content of the corresponding items to be verified according to the verification process.
[0097] In this embodiment, a step node refers to multiple different processing steps included in the verification process.
[0098] In this embodiment, an abnormal verification result refers to a parameter whose verification result at a step node does not meet the requirements.
[0099] The working principle and beneficial effects of the above technical solution are as follows: By parsing the text of the smart contract, accurate and effective determination of multi-dimensional basic content parameters of the smart contract is achieved, so as to extract corresponding items to be verified from the multi-dimensional basic content parameters according to the set of verification items configured in the background, and then it is convenient for each verification item to quickly and effectively verify the corresponding items to be verified. Secondly, according to the verification processes of each verification item, the corresponding items to be verified are verified simultaneously, so as to accurately determine the verification results of different content parameters in the smart contract. Finally, the verification results of each step node in the verification process under each verification item are summarized, and the abnormal verification results are marked and output, so as to achieve comprehensive and reliable verification of the smart contract. At the same time, the efficiency and accuracy of smart contract verification are improved.
[0100] Embodiment 2:
[0101] Based on Embodiment 1, this embodiment provides an automatic smart contract verification system, as Figure 2 shown, the contract decomposition module includes:
[0102] The contract module includes: a contract receiving unit, a text parsing unit, and a content parameter determination unit. The output result of the contract receiving unit is the input parameter of the text parsing unit, and the output result of the text parsing unit is the input parameter of the content parameter determination unit. The specific steps are as follows:
[0103] The contract receiving unit is used to read the smart contract based on the communication interface and traverse the content of the smart contract to obtain the category composition of the contract code;
[0104] The text parsing unit is used to split the contract code of each category respectively by using a difference strategy based on the category composition of the contract code in terms of lexical and syntactic structures, and determine the target semantics of each contract code based on the split lexical units and syntactic structures;
[0105] The content parameter determination unit is used for:
[0106] Based on the target semantics, determine the types of parameters represented by different contract codes, track the variables of different contract codes, and determine the call relationships and data flows of different types of parameters;
[0107] Based on the call relationships and data flows, determine the business content of different types of parameters, and associate the business content with the corresponding types of parameters to obtain the multi-dimensional basic content parameters of the smart contract.
[0108] In this embodiment, the smart contract refers to the text content, image content, etc. that need to be verified.
[0109] In this embodiment, the contract code refers to the specific data content recorded in the smart contract.
[0110] In this embodiment, the difference strategy refers to using different methods or strategies to perform lexical and syntactic splitting on the contract code of the corresponding category according to the category of the contract code, so as to facilitate the determination of the multi-dimensional basic content parameters included in the smart contract.
[0111] In this embodiment, the target semantics refers to determining the actual meaning represented by the contract code based on the obtained lexical and syntax.
[0112] In this embodiment, the parameter type refers to the data value type corresponding to different contract codes.
[0113] In this embodiment, the data flow refers to the call relationship between different contract codes and the interaction relationship between contract codes.
[0114] The working principle and beneficial effects of the above technical solution are as follows: By reading and parsing the received smart contract, the accurate and effective determination of the target semantics of the contract code included in the smart contract is realized. Secondly, the parameter types and variables of the contract code are tracked according to the determined target semantics to lock the business content in the smart contract. Finally, the obtained business content and parameter types are associated to accurately and effectively determine the multi-dimensional basic content parameters of the smart contract, providing reliable data support for the effective verification of the smart contract.
[0115] Embodiment 3:
[0116] Based on Embodiment 1, this embodiment provides a smart contract automatic verification system. The contract decomposition module includes:
[0117] The contract decomposition module further includes: a verification item determination unit and a content extraction unit. Among them, the output result of the verification item determination unit is the input parameter of the content extraction unit. The specific steps include:
[0118] The verification item determination unit is used to obtain the background configuration data of the management terminal and perform business feature analysis on the background configuration data to determine the set of verification items when the smart contract is applied;
[0119] The content extraction unit is used for:
[0120] extracting the business audit scope of each verification item in the verification item set and converting the business audit scope into a feature vector;
[0121] Based on the feature vector, respectively determining the correlation degree between the multi-dimensional basic content parameters and the business audit scope of each verification item, and determining the multi-dimensional basic content parameters with a correlation degree greater than the preset threshold as strongly correlated data;
[0122] Summarize the strongly correlated data of each verification item to obtain the content of the item to be verified corresponding to each verification item.
[0123] In this embodiment, the background configuration data refers to the data information related to the verification items set in the management terminal, including the types of items and the verification rules or standards corresponding to each verification item, etc.
[0124] In this embodiment, the business feature analysis refers to the analysis of the background configuration data for different business categories, aiming to determine the verification items for the smart contract from the background configuration data.
[0125] In this embodiment, the business audit scope refers to the set of steps and the types of business data that need to be verified when each verification item verifies the smart contract.
[0126] In this embodiment, the feature vector refers to the vector form obtained after the formal conversion of the business audit scope, aiming to determine the correlation degree with the multi-dimensional basic content parameters. Among them, the correlation degree represents the degree of correlation between the multi-dimensional basic content parameters and the business audit scope of each verification item, so as to realize the division of the multi-dimensional basic content parameters according to the verification items.
[0127] In this embodiment, the preset threshold is set in advance, which is a measurement standard for whether the correlation degree meets the strong correlation and can be adjusted.
[0128] The working principle and beneficial effects of the above technical solution are as follows: By performing business feature analysis on the background configuration data of the management terminal, the set of verification items for the smart contract during application is determined. Secondly, the business audit scope of each verification item in the set of verification items is determined, so as to realize the division of the multi-dimensional basic content parameters in the smart contract according to the business audit scope, and finally accurately and effectively determine the content of the item to be verified corresponding to each verification item, which is also convenient for targeted and accurate verification operations on the smart contract.
[0129] Embodiment 4:
[0130] Based on Embodiment 3, this embodiment provides a smart contract automatic verification system, a content extraction unit, including:
[0131] The content extraction unit includes: a result acquisition subunit and a storage subunit. Among them, the output result of the result acquisition subunit is the input parameter of the storage subunit. The specific steps include:
[0132] The result acquisition subunit is used for:
[0133] Obtain the content of the item to be verified corresponding to each verification item, determine the structural composition of the content of each item to be verified, and generate a description label for the content of the item to be verified based on the structural composition;
[0134] Construct a structure record table for the content of each item to be verified, and record the description label of the content of the item to be verified in the structure record table;
[0135] A storage subunit, configured to bundle the record result and the content of the item to be verified, and divide and store the record result and the content of the item to be verified in a preset storage space based on the bundling result.
[0136] In this embodiment, the structural composition refers to the composition of the content of each item to be verified, including information such as data types and the proportions of various types.
[0137] In this embodiment, the description label refers to a symbol for annotating and explaining the content of the item to be verified. Through the description label, the structural composition of the item to be verified can be quickly understood.
[0138] In this embodiment, the preset storage space is set in advance and is used to store the content of the item to be verified and the corresponding description label.
[0139] In this embodiment, dividing and storing means distinguishing and storing different items to be verified.
[0140] The working principle and beneficial effects of the above technical solution are as follows: By determining the structural composition of the content of the item to be verified corresponding to each verification item, a description label for the content of the item to be verified is generated according to the structural composition. Secondly, the description label and the content of the item to be verified are recorded and bundled, so as to facilitate the correspondence between different contents of the item to be verified and the description label. Finally, the record result and the content of the item to be verified are divided and stored in the preset storage space, so as to facilitate the accurate and effective management of the content of the item to be verified corresponding to different verification items, providing convenience for the automatic verification of smart contracts.
[0141] Embodiment 5:
[0142] Based on Embodiment 1, this embodiment provides a smart contract automatic verification system, as Figure 3 shown, the contract verification module includes:
[0143] The contract verification module includes: a process determination unit, a verification unit, and a result recording unit. Among them, the output result of the process determination unit is the input parameter of the verification unit, and the output result of the verification unit is the input parameter of the result recording unit. The specific steps include:
[0144] The process determination unit is used for:
[0145] Obtain the verification processes for each verification item, parse the verification processes, and determine the step nodes included in each verification process;
[0146] Extract the corresponding verification rules from the rule library based on the business attributes of each step node, and determine the focus nodes for the content of the item to be verified in each step node based on the verification rules;
[0147] Verification unit, for:
[0148] Determine the topological structure among each verification item based on the management objectives of the smart contract, and determine the first coordination relationship among different verification processes and the second coordination relationship among different step nodes in different verification processes based on the topological structure;
[0149] Determine the prior conditions among the verification processes of each verification item based on the first coordination relationship, and determine the start order of the verification processes of each verification item based on the prior conditions;
[0150] Control the step nodes in the verification processes of each verification item to sequentially verify the content of the item to be verified according to the focus points in parallel based on the start order, and track the sequential verification process of each verification process;
[0151] Based on the second coordination relationship, perform conditional waiting for the step nodes without execution conditions in the verification processes of different verification items according to the tracking results, and restart the step nodes waiting for conditions when the start conditions are met;
[0152] Result recording unit, for:
[0153] Determine the verification results of each step node on the corresponding content of the item to be verified in different verification processes based on the restart results and the tracking results, and generate an explanation label for the verification results based on the business attributes of the step nodes;
[0154] Associate the explanation label with the verification results and record the associated results.
[0155] In this embodiment, the verification process refers to the verification steps that each verification item needs to execute when performing content verification and the association relationship between the steps.
[0156] In this embodiment, the step node refers to the verification link or verification process included in each verification process, etc.
[0157] In this embodiment, the business attribute refers to the business characteristics corresponding to each step node. For example, it can be the specific business type and content that need to verify the smart contract during verification.
[0158] In this embodiment, the rule library is set in advance and stores the verification strategies corresponding to each step node.
[0159] In this embodiment, the focus node refers to the content point that pays attention to the content of the item to be verified under each step node.
[0160] In this embodiment, the management objective refers to the purpose that the smart contract ultimately aims to achieve.
[0161] In this embodiment, the topological structure refers to the association relationship between each verification item.
[0162] In this embodiment, the first collaboration relationship refers to the mutual call relationship or restrictive relationship between the verification processes corresponding to different verification items when verifying the content of the smart contract.
[0163] In this embodiment, the second collaboration relationship refers to the mutual call relationship or restrictive relationship between different step nodes included in each verification process when verifying the content of the smart contract.
[0164] In this embodiment, the prior condition refers to the initial start-up condition when conducting verification operations between the verification processes of each verification item, that is, the initially corresponding verification item.
[0165] In this embodiment, the step node without execution conditions refers to the step node in the verification processes of different verification items that has not reached the start-up condition, that is, the step node that has not yet been reached.
[0166] In this embodiment, condition waiting refers to the operation of waiting for the corresponding step node when the start-up condition has not been reached.
[0167] In this embodiment, the description label is a marking symbol used to explain the verification result.
[0168] The working principle and beneficial effects of the above technical solution are as follows: By analyzing the verification processes of each verification item, the step nodes included in each verification process are effectively determined. At the same time, according to the business attributes of each step node, the corresponding verification rules are retrieved from the rule library, and then the focus nodes of each step node are determined through the verification rules. Secondly, the topological structure between each verification item is determined, and the first collaboration relationship between different verification processes and the second collaboration relationship between different step nodes in different verification processes are determined according to the topological structure, so as to determine the start-up order of the verification processes of different verification items and the different step nodes in the verification processes. Finally, the content of the item to be verified corresponding to each verification item is verified and tracked according to the determined start-up order, and the verification results are summarized, ultimately realizing a comprehensive, accurate, and reliable verification of the smart contract.
[0169] Embodiment 6:
[0170] Based on Embodiment 5, this embodiment provides a smart contract automatic verification system. The verification unit includes:
[0171] The verification unit includes: a result analysis subunit, a vulnerability analysis subunit, and a rule update subunit. Among them, the output result of the result analysis subunit is the input parameter of the vulnerability analysis subunit, and the output result of the vulnerability analysis subunit is the input parameter of the rule update subunit. The specific steps include:
[0172] The result analysis subunit is used to obtain the verification results of each step node in different verification processes for the corresponding items to be verified, and determine the verification vulnerabilities existing in different verification processes when verifying the corresponding items to be verified based on the verification results;
[0173] The vulnerability analysis subunit is used to extract the vulnerability patterns of the verification vulnerabilities and the vulnerability manifestations under the vulnerability patterns, and determine the supplementary verification rules for the verification vulnerabilities based on the vulnerability patterns and the vulnerability manifestations;
[0174] The rule update subunit is used for:
[0175] Obtain the business supervision change characteristics of the smart contract, and determine the updated verification rules based on the business supervision change characteristics;
[0176] Update the rule library based on the supplementary verification rules and the updated verification rules.
[0177] In this embodiment, the verification vulnerability refers to the defects or deficiencies existing in different verification processes when verifying the corresponding items to be verified.
[0178] In this embodiment, the vulnerability pattern refers to the type of the verification vulnerability.
[0179] In this embodiment, the vulnerability manifestation refers to the consequences caused under the vulnerability pattern.
[0180] In this embodiment, the supplementary verification rule refers to the standard or strategy for improving the verification vulnerability determined according to the vulnerability pattern and the vulnerability manifestation.
[0181] In this embodiment, the business supervision change characteristic refers to the change situation of the business content defined in the smart contract.
[0182] The working principle and beneficial effects of the above technical solution are as follows: By monitoring and analyzing the verification results of each step node in different verification processes, timely and effective determination of verification vulnerabilities is achieved. At the same time, the vulnerability patterns and manifestations of verification vulnerabilities are locked, and then the determination of supplementary verification rules is realized based on the vulnerability patterns and manifestations. Secondly, the determination of updated verification rules is realized according to the characteristics of business supervision changes in smart contracts. Finally, the rule library is updated according to the supplementary verification rules and updated verification rules, ensuring the real-time effectiveness of the verification rules for smart contracts, as well as the accuracy and reliability of smart contract verification.
[0183] Embodiment 7:
[0184] Based on Embodiment 1, this embodiment provides an automatic verification system for smart contracts, and a result output module, including:
[0185] The result output module includes a mechanism startup unit and a result summary unit. Among them, the output result of the mechanism startup unit is the input parameter of the result summary unit. The specific steps include:
[0186] The mechanism startup unit is used to start the result summary mechanism for each verification item after the full process execution of each verification item ends;
[0187] The result summary unit is used to summarize the corresponding verification results based on the startup result according to the result summary mechanism in the execution order of each step node in the verification process under each verification item, and perform adjacent-bit association on the verification results of each step node based on the summary result;
[0188] Based on the adjacent-bit association result, the summary result of the verification results of each step node in the verification process under each verification item is obtained.
[0189] In this embodiment, the result summary mechanism refers to the methods and strategies for summarizing the verification results of different step nodes in the verification process of each verification item.
[0190] In this embodiment, adjacent-bit association refers to concatenating the verification results between each step node in the verification process.
[0191] The working principle and beneficial effects of the above technical solution are as follows: By starting the result summary mechanism, adjacent-bit association of the verification results of each step node in the verification process of each verification item is realized according to the result summary mechanism, and finally the summary of the verification results is realized based on the adjacent-bit association result, which is convenient for the staff to intuitively and effectively understand the verification results of the smart contract.
[0192] Embodiment 8:
[0193] Based on Embodiment 1, this embodiment provides a smart contract automatic verification system. The result output module includes:
[0194] The result output module further includes: an exception determination unit, a marking unit, and a result output unit. Among them, the output result of the exception determination unit is the input parameter of the marking unit, and the output result of the marking unit is the input parameter of the result output unit. The specific steps include:
[0195] The exception determination unit is used to:
[0196] Obtain the aggregated result and perform multi-dimensional analysis on each verification result based on the aggregated result;
[0197] Based on the multi-dimensional analysis result, determine the verification results that do not meet the verification rules among the verification results, and determine the verification results that do not meet the verification rules as abnormal verification results;
[0198] The marking unit is used to:
[0199] Extract the status representation of the abnormal verification result, and determine the abnormal reason of the smart contract based on the matching relationship between the status representation and the verification rule;
[0200] Based on the status representation and the abnormal reason, determine the marking method for different abnormal verification results, and distinguish and mark the existing abnormal verification results based on the marking method;
[0201] The result output unit is used to output both the distinguished and marked abnormal verification results and the verification results without abnormalities to the management terminal.
[0202] In this embodiment, multi-dimensional analysis refers to analyzing the verification results from different perspectives or aspects. For example, it can be analyzed from dimensions such as eligibility and normativeness.
[0203] In this embodiment, the status representation refers to the current state and specific situation presented by the abnormal verification result.
[0204] In this embodiment, distinguishing and marking refers to using different marking symbols to mark the abnormal verification results with different abnormal reasons and different status representations, aiming to quickly distinguish different abnormal verification results.
[0205] The working principle and beneficial effects of the above technical solution are: By performing multi-dimensional analysis on the aggregated result, the abnormal verification results that do not meet the verification rules are locked, and then the status representation and abnormal reason of the abnormal verification result are determined. Finally, different abnormal verification results are distinguished and marked through the status representation and abnormal reason and transmitted to the management terminal, which is convenient for the management terminal to promptly discover the abnormal verification results, thereby facilitating timely decision-making and improving the effectiveness of smart contract verification.
[0206] Example 9:
[0207] Based on Example 8, this example provides an intelligent contract automatic verification system, a result output unit, including:
[0208] The result output unit includes: a data classification subunit and a display subunit. Among them, the output result of the data classification subunit is the input parameter of the display subunit. The specific steps include:
[0209] The data classification subunit is used to receive and output the differentiated and labeled abnormal verification results and normal verification results based on the management terminal, and distinguish the differentiated and labeled abnormal verification results and normal verification results;
[0210] The display subunit is used for:
[0211] Based on the differentiation result, the differentiated and labeled abnormal verification results and normal verification results are respectively visually displayed on the management terminal. At the same time, the original data of the abnormal verification results is traced in the intelligent contract, and the contract data corresponding to the abnormal verification results is circled in the intelligent contract based on the tracing result;
[0212] Based on the circled result, the second visual display of the intelligent contract is performed.
[0213] In this example, the first visual display refers to the visual display of the abnormal verification results and normal verification results respectively.
[0214] In this example, tracing the original data of the abnormal verification results in the intelligent contract means finding the original contract data corresponding to the abnormal verification results in the intelligent contract.
[0215] In this example, the second visual display refers to the visual display of the original contract data of the abnormal verification results in the intelligent contract.
[0216] The working principle and beneficial effects of the above technical solution are: first, the abnormal verification results and normal verification results are visually displayed for the first time through the management terminal. Secondly, the contract data corresponding to the abnormal verification results is found in the intelligent contract, and the found contract data is visually displayed for the second time, which is convenient for the management personnel to understand and view the specific situations of the verification results and contract data respectively, and ensures the reliability of the intelligent contract verification.
[0217] Example 10:
[0218] Based on Example 1, this example provides an intelligent contract automatic verification system, a result output module, including:
[0219] The result output module further includes: a result splitting unit and a response unit. Among them, the output result of the result splitting unit is the input parameter of the response unit. The specific steps include:
[0220] The result splitting unit is used to split the abnormal verification results into items based on the output results, and determine the abnormal characteristics under each item based on the item splitting;
[0221] The response unit is used for:
[0222] Match the corresponding available guiding measures from the preset response strategy library based on the abnormal characteristics, and summarize the available guiding measures under each item to generate a response measure guiding table;
[0223] Conduct response guidance for the management personnel based on the response measure guiding table.
[0224] In this embodiment, item splitting refers to splitting different types or states existing in the abnormal verification results, so as to achieve a comprehensive abnormal response to the abnormal verification results.
[0225] In this embodiment, the abnormal characteristics refer to the specific abnormal situations existing under each item, including the reasons for the abnormalities and the abnormal ranges, etc.
[0226] In this embodiment, the preset response strategy library is set in advance, and various available guiding measures corresponding to different abnormal situations are stored inside.
[0227] In this embodiment, the available guiding measures refer to the guiding opinions or solutions that can provide guidance for solving the abnormal verification results, and assist the management personnel in the emergency management of smart contracts.
[0228] The working principle and beneficial effects of the above technical solution are: by splitting the abnormal verification results into items and determining the abnormal characteristics under each split item, it is realized to match the corresponding available guiding measures from the preset response strategy library according to the abnormal characteristics, and then summarize the available guiding measures under each item to determine the response measure guiding table, so as to facilitate the effective abnormal response to the smart contract through the generated response measure guiding table, improve the practicability and accuracy of the smart contract verification, and greatly enhance the verification effect.
[0229] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention also intends to include these changes and modifications.
Claims
1. An automatic verification system for smart contracts, characterized in that, Including: A contract decomposition module, which is used to perform text parsing on a smart contract, determine multi-dimensional basic content parameters of the smart contract, and extract content of items to be verified for the multi-dimensional basic content parameters respectively based on a set of verification items configured in the background; A contract verification module, which is used to perform process verification on the content of the corresponding item to be verified in parallel based on the verification processes of each verification item according to the execution result of the contract decomposition module, and record the verification results of each step node in the verification process in real time; A result output module, which is used to summarize the verification results of each step node in the verification process under each verification item according to the execution result of the contract verification module, and mark and output the existing abnormal verification results based on the summary result.
2. The automatic verification system for smart contracts according to claim 1, wherein The contract decomposition module includes: The contract module includes: a contract receiving unit, a text parsing unit, and a content parameter determination unit. The output result of the contract receiving unit is the input parameter of the text parsing unit, and the output result of the text parsing unit is the input parameter of the content parameter determination unit. The specific steps include: The contract receiving unit is used to read the smart contract based on the communication interface and traverse the content of the smart contract to obtain the category composition of the contract code; The text parsing unit is used to split the contract code of each category respectively using a difference strategy based on the category composition of the contract code, and determine the target semantics of each contract code based on the split lexical units and syntactic structures; The content parameter determination unit is used to: Determine the types of parameters represented by different contract codes based on the target semantics, track the variables of different contract codes, and determine the call relationship and data flow direction of different parameter types; Determine the business content of different parameter types based on the call relationship and data flow direction, and associate the business content with the corresponding parameter types to obtain the multi-dimensional basic content parameters of the smart contract.
3. The automatic verification system for smart contracts according to claim 1, characterized in that, The contract decomposition module includes: The contract decomposition module further includes: a verification item determination unit and a content extraction unit. The output result of the verification item determination unit is the input parameter of the content extraction unit. The specific steps include: The verification item determination unit is used to obtain the background configuration data of the management terminal, perform business feature parsing on the background configuration data, and determine the set of verification items for the smart contract during application; The content extraction unit is used to: Extract the business review scope of each verification item in the set of verification items, and convert the business review scope into a feature vector; Determine the correlation degree between the multi-dimensional basic content parameters and the business review scope of each verification item respectively based on the feature vector, and determine the multi-dimensional basic content parameters with a correlation degree greater than the preset threshold as strongly correlated data; Summarize the strongly correlated data of each verification item to obtain the content of the item to be verified corresponding to each verification item.
4. The automatic verification system for smart contracts according to claim 3, wherein The content extraction unit includes: The content extraction unit includes: a result acquisition subunit and a storage subunit. The output result of the result acquisition subunit is the input parameter of the storage subunit. The specific steps include: The result acquisition subunit is used to: Obtain the content of the item to be verified corresponding to each verification item, determine the structural composition of the content of each item to be verified, and generate a description label for the content of the item to be verified based on the structural composition; Construct a structure record table for the content of each item to be verified, and record the description label of the content of the item to be verified in the structure record table; A storage subunit for bundling the record result and the content of the item to be verified, and storing the record result and the content of the item to be verified in a preset storage space based on the bundling result.
5. The intelligent contract automatic verification system according to claim 1, characterized in that A contract verification module, including: The contract verification module includes a process determination unit, a verification unit, and a result recording unit. Among them, the output result of the process determination unit is the input parameter of the verification unit, and the output result of the verification unit is the input parameter of the result recording unit. The specific steps include: The process determination unit is used for: Obtain the verification process of each verification item, parse the verification process, and determine the step nodes included in each verification process; Extract the corresponding verification rules from the rule library based on the business attributes of each step node, and determine the focus nodes for the content of the item to be verified in each step node based on the verification rules; The verification unit is used for: Determine the topological structure between each verification item based on the management objectives of the smart contract, and determine the first collaboration relationship between different verification processes and the second collaboration relationship between different step nodes in different verification processes based on the topological structure; Determine the prior conditions between the verification processes of each verification item based on the first collaboration relationship, and determine the startup order of the verification processes of each verification item based on the prior conditions; Control the step nodes in the verification processes of each verification item according to the startup order to sequentially verify the content of the item to be verified according to the focus points, and track the sequential verification process of each verification process; Based on the second collaboration relationship, perform conditional waiting on the step nodes without execution conditions in the verification processes of different verification items according to the tracking results, and restart the step nodes waiting for conditions when the startup conditions are met; The result recording unit is used for: Determine the verification results of each step node in different verification processes for the corresponding content of the item to be verified based on the restart results and the tracking results, and generate a description label for the verification results based on the business attributes of the step nodes; Associate the description label with the verification results, and record the association results.
6. The automatic verification system for smart contracts according to claim 5, wherein, The verification unit includes: The verification unit includes a result analysis subunit, a vulnerability analysis subunit, and a rule update subunit. Among them, the output result of the result analysis subunit is the input parameter of the vulnerability analysis subunit, and the output result of the vulnerability analysis subunit is the input parameter of the rule update subunit. The specific steps include: The result analysis subunit is used to obtain the verification results of each step node in different verification processes for the corresponding content of the item to be verified, and determine the verification vulnerabilities existing when different verification processes verify the corresponding content of the item to be verified based on the verification results; The vulnerability analysis subunit is used to extract the vulnerability patterns of the verification vulnerabilities and the vulnerability characteristics under the vulnerability patterns, and determine the supplementary verification rules for the verification vulnerabilities based on the vulnerability patterns and the vulnerability characteristics; The rule update subunit is used for: Obtain the business supervision change characteristics of the smart contract, and determine the updated verification rules based on the business supervision change characteristics; Update the rule library based on the supplementary verification rules and the updated verification rules.
7. The automatic verification system for smart contracts according to claim 1, wherein Result output module, including: The result output module includes a mechanism startup unit and a result summary unit. Among them, the output result of the mechanism startup unit is the input parameter of the result summary unit. The specific steps include: The mechanism startup unit is used to start the result summary mechanism for each verification item after the full process execution of each verification item ends; The result summary unit is used to summarize the corresponding verification results based on the startup result according to the result summary mechanism according to the execution order in the verification process of each step node under each verification item, and perform adjacent bit association on the verification results of each step node based on the summary result; Obtain the summary result of the verification results of each step node in the verification process under each verification item based on the adjacent bit association result.
8. The automatic verification system for smart contracts according to claim 1, wherein Result output module, including: The result output module further includes: an exception determination unit, a marking unit, and a result output unit. Among them, the output result of the exception determination unit is the input parameter of the marking unit, and the output result of the marking unit is the input parameter of the result output unit. The specific steps include: The exception determination unit is used for: Obtain the obtained summary result, and perform multi-dimensional analysis on each verification result based on the summary result; Determine the verification results that do not meet the verification rules among each verification result based on the multi-dimensional analysis result, and determine the verification results that do not meet the verification rules as abnormal verification results; The marking unit is used for: Extract the status representation of the abnormal verification result, and determine the abnormal reason of the smart contract based on the matching relationship between the status representation and the verification rules; Determine the marking method for different abnormal verification results based on the status representation and the abnormal reason, and perform differentiated marking on the existing abnormal verification results based on the marking method; The result output unit is used to output both the differentiated marked abnormal verification results and the non-abnormal verification results to the management terminal.
9. The automatic verification system for smart contracts according to claim 8, characterized in that Result output unit, including: The result output unit includes a data separation sub-unit and a display sub-unit. Among them, the output result of the data separation sub-unit is the input parameter of the display sub-unit. The specific steps include: The data separation sub-unit is used to receive and output the differentiated marked abnormal verification results and non-abnormal verification results based on the management terminal, and separate the differentiated marked abnormal verification results and non-abnormal verification results; The display sub-unit is used for: Based on the separation result, perform the first visual display of the differentiated marked abnormal verification results and non-abnormal verification results on the management terminal respectively. At the same time, trace the original data of the abnormal verification results in the smart contract, and circle the contract data corresponding to the abnormal verification results in the smart contract based on the tracing result; Perform the second visual display on the smart contract based on the circled result.
10. A smart contract automatic verification system according to claim 1, characterized in that, Result output module, including: The result output module further includes: a result splitting unit and a response unit. Among them, the output result of the result splitting unit is the input parameter of the response unit. The specific steps include: A result splitting unit, configured to split the abnormal verification result based on the output result, and determine the abnormal features under each entry based on the entry splitting; A response unit, configured to: Match corresponding available guiding measures from a preset response strategy library based on the abnormal features, and summarize the available guiding measures under each entry to generate a response measure guiding table; Conduct response guidance for managers based on the response measure guiding table.
Citation Information
Patent Citations
Intelligent contract security auditing system and method based on formal verification
CN118277284A
Intelligent contract audit verification method and system based on block chain, and medium
CN119377967A
Smart contract platform for generating and customizing smart contracts
US20200119905A1