Model-driven multi-party complex protocol on-chain mode analysis and modeling method

By analyzing the multi-party service agreement text using a model-driven approach, extracting on-chain elements, and constructing a model-driven architecture, the problem of lengthy and complex multi-party service agreement texts is solved, enabling efficient development and reliable execution of smart contracts. This approach is applicable to the Ethereum Virtual Machine platform.

CN118764541BActive Publication Date: 2026-02-17HARBIN INST OF TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410796780.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2026-02-17
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

In existing technologies, multi-party service agreement texts are lengthy and complex, involve many cross-domain collaborations, and are difficult to efficiently develop suitable terms for on-chain use into smart contracts. Furthermore, traditional centralized execution methods suffer from trust issues and privacy protection obstacles.

Method used

Employing a model-driven approach, this method analyzes multi-party service agreement texts using large-scale language models, extracts on-chain elements, and constructs computation-independent models (CIM), platform-independent models (PIM), and platform-dependent models (PSM). It also enables automatic conversion between models without semantic loss, supporting smart contract development.

Benefits of technology

It enables efficient on-chain mode analysis and modeling of multi-party service protocols, reduces communication barriers, enhances the readability and maintainability of smart contracts, and supports applications on the Ethereum Virtual Machine platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118764541B_ABST
    Figure CN118764541B_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-party complex protocol chain mode analysis and modeling method based on model driving, the method includes the following steps: step S1, collection, summary and induction protocol in the chain case of upper chain mode;Step S2, upper chain mode extraction;Step S3, build the upper chain model of multi-party service protocol in line with model driving architecture;Step S4, the realization of visual tool.The method can analyze and extract upper chain elements to the blockchain deployment requirement of complex protocol text when system runs, then model the protocol according to upper chain elements, the model meets the standard of model driving architecture, finally realizes the automatic conversion between models without semantic loss, so that the developer of smart contract can better understand business requirements and reduce communication barriers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer service technology and relates to a model-driven method for analyzing and modeling multi-party protocol on-chain patterns. Specifically, it relates to a method for analyzing and extracting blockchain on-chain terms of multi-party service protocols, as well as for model construction and model conversion. Background Technology

[0002] With economic globalization and the rapid development of information technology, various service businesses are exhibiting increasingly diverse characteristics, involving more and more multi-party participation and multi-level cooperation, and the division of rights and obligations is becoming increasingly complex. Multi-party service agreements, as binding and normative cooperation agreements, bear the important responsibility of regulating the rights and obligations of all parties and ensuring the smooth progress of cooperation. For example, a Service Level Agreement (SLA) guarantees that the service quality between the service provider and the customer reaches a certain level. Traditional centralized multi-party service agreement execution methods rely on intermediaries or third-party trusted institutions to supervise and execute the contract. In this approach, during the contract execution process, the intermediary is responsible for ensuring that the contract execution complies with the agreement and resolving problems and disputes that arise during cooperation. However, these methods cannot solve the most critical trust issue, as documents recording basic information can be maliciously tampered with. This centralized architecture relies too heavily on a central institution, and the privacy protection of the agreement also faces obstacles.

[0003] With the emergence of blockchain and smart contract technologies, new solutions have emerged to the trust issues in multi-party service agreements. Blockchain enables these agreements to be executed in a distributed manner, without requiring trust to be delegated to a centralized institution or mutual trust between the parties. A blockchain is a data structure that links together multiple data blocks containing immutable events in chronological order. The blockchain network uses a consensus mechanism to select nodes with the permission to write records to blocks, ensuring that only one node can write information to the longest valid chain at any given time. A smart contract is an automated contract based on blockchain technology. It is a piece of code written in a programmatic manner to define and execute contract terms. Smart contracts enable reliable and automated transactions and collaborations without intermediaries. However, the widespread use of smart contracts faces new challenges: multi-party service agreements are often lengthy and complex, involving cross-domain collaborations, making it challenging to develop suitable terms for on-chain use into smart contracts.

[0004] Based on the above research background, it can be found that there is a need for an efficient method to extract the necessary on-chain content from the multi-party service agreement text and to express the on-chain content in a model-driven manner, so that developers can better understand business needs and reduce communication barriers. Summary of the Invention

[0005] To address the aforementioned problems in existing technologies, this invention provides a model-driven method for analyzing and modeling the on-chain patterns of complex multi-party service protocols, specifically addressing the extraction and modeling of on-chain requirements. This method analyzes the blockchain deployment requirements of complex protocol texts and extracts on-chain elements during system runtime. Then, it models the protocol based on these on-chain elements, ensuring the model conforms to the model-driven architecture standard. Finally, it achieves automatic conversion between models without semantic loss, enabling smart contract developers to better understand business requirements and reduce communication barriers.

[0006] The objective of this invention is achieved through the following technical solution:

[0007] A model-driven method for analyzing and modeling the on-chain patterns of complex multi-party protocols includes the following steps:

[0008] Step S1: Collect, summarize, and generalize the on-chain modes of blockchain cases in the protocol:

[0009] Step S11: Obtain a text dataset of multi-party service agreements, including text contracts from multiple fields;

[0010] Step S12: Summarize the text contract, discover the components that can be expressed by smart contracts, and summarize them as the on-chain mode;

[0011] Step S13: Summarize the on-chain modes. This specifies which clauses and contents in the multi-party service agreement can be converted into smart contracts and whose costs are controllable. The on-chain modes are divided into activity modes and constraint modes. Activity mode refers to a mode with complete behavior, which can be expressed as a process. Constraint mode refers to a mode with the conditions for the execution of behavior, usually checking whether a certain condition is met.

[0012] Step S2, Extraction of on-chain mode:

[0013] Based on the on-chain pattern obtained in step S1, a large language model is used to extract the on-chain pattern and related elements of the multi-party service protocol text. The specific steps are as follows:

[0014] Step S21: Extract the rights and obligations from the agreement text based on feature words to obtain all clauses containing rights and obligations;

[0015] Step S22: Using a large language model, all clauses are segmented and categorized to obtain clauses that conform to the on-chain pattern;

[0016] Step S23: Use a large language model to perform syntactic dependency analysis on the terms that can be added to the chain, including subject-verb-object component analysis and main-subordinate clause analysis, to obtain the main components of the terms to be added to the chain.

[0017] Step S3: Construct a multi-party service protocol on-chain model that conforms to the model-driven architecture:

[0018] Step S31: Define the meta-models of the Computation Independent Model (CIM), Platform Independent Model (PIM), and Platform Dependent Model (PSM) of the Multi-Party Service Protocol, and express the meta-models using UML class diagrams;

[0019] Step S32: Based on the content of the on-chain elements obtained in step S2, construct the CIM and express the CIM using Unified Modeling Language (UML) object diagrams and Business Process Modeling Notation (BPMN) flowcharts.

[0020] Step S33: Define the model conversion rules from CIM to PIM to complete the automatic model conversion from CIM to PIM without losing the on-chain semantics;

[0021] Step S34: Define the model conversion rules from PIM to PSM. PSM is expressed using smart contract code to achieve automatic conversion from PIM to PSM.

[0022] Step S4: Implementation of the visualization tool:

[0023] Step S41: Visualize the extracted on-chain pattern of the text protocol in step S2, and display the extracted results using the front-end page;

[0024] Step S42: Visualize the process of building CIM in step S3, integrate the plantUML tool to build CIM model, and automatically visualize the converted PIM and PSM.

[0025] A model-driven on-chain pattern analysis and modeling system for complex multi-party protocols, implementing the above method, includes an on-chain pattern summarization module, an on-chain analysis module, a model building module, and an automatic model conversion module, wherein:

[0026] The on-chain mode summary module is responsible for summarizing the on-chain content in commonly used protocol texts to form a unified on-chain mode.

[0027] The on-chain analysis module is responsible for extracting on-chain elements from the on-chain terms in the protocol text summarized by the on-chain mode summary module, which is used to assist in the construction of the on-chain model of the multi-party service protocol.

[0028] The model building module is responsible for building a multi-party service protocol on-chain model based on a model-driven architecture, using the output of the on-chain analysis module as the basis.

[0029] The automatic model conversion module is responsible for the model conversion process between CIM and PIM, and between PIM and PSM, without loss of on-chain semantics.

[0030] Compared with the prior art, the present invention has the following advantages:

[0031] 1. This invention addresses the characteristics and complexities of multi-party service agreements, and summarizes an efficient on-chain model based on real-world blockchain cases. By utilizing a large language model to parse the agreement text, this invention can identify and extract terms suitable for expression as smart contracts on the blockchain.

[0032] 2. This invention constructs a model-driven architecture meta-model and modeling method for on-chain content of multi-party service protocols. The meta-model combines structural and process models, providing a more detailed and accurate framework for expressing smart contracts and multi-party service protocols, enhancing the readability and maintainability of smart contracts.

[0033] 3. This invention provides a model-driven architecture-based method for model conversion, namely, automatic conversion from computationally independent models to platform-independent models and conversion from platform-independent models to platform-related models. The conversion process does not lose any on-chain semantic elements, and the converted models can be applied to blockchain platforms that support the Ethereum Virtual Machine. Attached Figure Description

[0034] Figure 1 A flowchart illustrating a model-driven approach for analyzing and modeling on-chain patterns of complex multi-party protocols.

[0035] Figure 2 To compute the metamodel of the independent models;

[0036] Figure 3 The metamodel for platform-independent models;

[0037] Figure 4 This serves as the meta-model for platform-related models.

[0038] Figure 5 System component diagram;

[0039] Figure 6 The result extracted from the on-chain authorization terms;

[0040] Figure 7 This is a CIM structural model example for the authorization terms;

[0041] Figure 8 This is a CIM process model example for the authorization terms;

[0042] Figure 9 This is a PIM structural model example for the authorization terms;

[0043] Figure 10 This is a case study of the PIM process model for authorization terms;

[0044] Figure 11 This is a case study for the PSM (Power, Service, and Management) licensing terms. Detailed Implementation

[0045] The technical solution of the present invention will be further described below with reference to the accompanying drawings, but it is not limited thereto. Any modifications or equivalent substitutions to the technical solution of the present invention that do not depart from the spirit and scope of the technical solution of the present invention should be covered within the protection scope of the present invention.

[0046] This invention provides a model-driven method for analyzing and modeling the on-chain patterns of complex multi-party protocols. The method defines the on-chain patterns in multi-party service protocols, specifying which clauses and content can be expressed as smart contracts on the blockchain. It extracts the clauses of the textual protocol using a large language model and obtains the on-chain elements through syntactic dependency analysis. Finally, it defines a meta-model of the model-driven architecture for the multi-party service protocol, constructs a CIM based on the extracted on-chain elements, and supports model conversion to achieve the extraction and expression of on-chain content in the multi-party service protocol, thereby meeting the on-chain requirements of multi-party service protocols and subsequent smart contract development. Figure 1 As shown, the specific steps include the following:

[0047] Step S1: Collect, summarize, and generalize the on-chain modes of blockchain cases in the protocol.

[0048] This step primarily focuses on the terms in text agreements and blockchain application scenarios, summarizing common blockchain application patterns in text agreements, termed "on-chain patterns." These patterns specify which clauses and contents within multi-party service agreements can be converted into smart contracts at a controllable cost. To obtain convincing on-chain patterns, a large-scale model analysis was conducted on 200 text contracts from various fields, resulting in the following types of on-chain patterns: payment, messaging, ownership, time-related, contract attribute, traceability, access permission constraints, time constraints, contract state constraints, payment constraints, and notification constraints.

[0049] Step S2: Extraction in on-chain mode.

[0050] This step requires extracting on-chain features from the input protocol text based on specific on-chain patterns in S1, i.e., accurately identifying which key clauses conform to the on-chain pattern from the protocol text. Then, a large-scale language model is used to perform in-depth syntactic dependency analysis on these clauses to obtain the dependency relationships between sentence components. Subsequently, based on the dependency relationships between sentence components, key sentence components such as subject, object, and predicate are further extracted. Finally, the grammatical structure and semantic information of these clauses are clearly displayed for subsequent modeling processes. The on-chain pattern extraction results are as follows: Figure 6As shown, the results demonstrate the main sentence structure of the authorization terms, which can be used for subsequent CIM construction.

[0051] Step S3: Construct a multi-party service protocol on-chain model that conforms to the model-driven architecture.

[0052] This step is mainly based on the syntactic structure and semantic information of the on-chain terms obtained in step S2. According to the model-driven standard, it constructs meta-models of the Computation Independent Model (CIM), Platform Independent Model (PIM), and Platform Related Model (PSM) of the Multi-Party Service Protocol and defines the transformation methods between the models.

[0053] The Computational Independent Model (CIM) consists of a process model and a structural model; its meta-model is as follows: Figure 2 As shown. The process model describes the interaction flow between participants, expressed using a BPMN flowchart, including user tasks, contract tasks, workflows, and gateways. The structural model consists of information extracted from the service agreement, including the identities and roles of participants, agreement terms, data, and constraints. A UML object diagram is used to represent the structural model. This invention provides a more detailed definition of data elements in the computationally independent model; data is a key component in the on-chain model, quantifying the rights and obligations among multiple parties. The structural and process models of the CIM authorization terms are as follows. Figure 7 and Figure 8 As shown.

[0054] The Platform Independent Model (PIM) is defined as the design model of its corresponding on-chain smart contracts. It is independent of the implementation details of the blockchain platform, and any blockchain platform can be compatible with this model. Its metamodel is as follows: Figure 3 As shown. The platform-independent model is designed from the technical perspective of the smart contract itself. The meta-model contains the key elements required by the smart contract code, transforming business-related information into technical information, such as... Figure 9 and Figure 10 As shown. The conversion process from a computationally independent model to a platform-independent model is based on rule mapping. The structural model generates the basic smart contract structure, and the process model generates the correct calling order or execution flow of the smart contract, as well as the various functions that need to be included. The structural and process models of the authorization terms PIM are as follows. Figure 9 and Figure 10 As shown.

[0055] Platform-Specific Model (PSM) is expressed using the Solidity smart contract code of the Ethereum platform, such as... Figure 11 As shown, this decision stems from the widespread acceptance and application of the Solidity language within the Ethereum ecosystem, as well as its powerful smart contract development capabilities. Figure 4The image shows the meta-model of the platform-related model. The conversion process from the platform-independent model to the platform-related model is completed based on the reusability matching of the on-chain pattern. According to different PIM elements and the semantic information of the PIM elements, they are matched into the on-chain pattern, and then the PSM is obtained.

[0056] Step S4: Implementation of visualization tools.

[0057] This step mainly involves the implementation of system tools for steps S2 and S3, including visualization of the on-chain analysis process, model building, and visualization of the automatic conversion process.

[0058] (1) Visualization of the on-chain analysis process: After inputting a text document, the system processes the document and returns the processed on-chain clause information to the user, including the clause's split structure information and on-chain elements, and provides a highlight display for the on-chain clauses in the original text.

[0059] (2) Visualization of Model Construction and Conversion: The plantUML tool is integrated to build the CIM model, which will be presented to the user in real time. After the construction of the computationally independent model is completed, the user can choose to perform automatic conversion, and the converted platform-independent model will be returned to the user as an image.

[0060] It should be noted that the modules (or units) in this invention are logical in nature. In actual implementation, multiple modules (or units) can be combined into one module (or unit), and one module (or unit) can also be split into multiple modules (or units). The system module diagram is as follows. Figure 5 As shown, it includes a blockchain pattern summary module, a blockchain analysis module, a model building module, and a model automatic conversion module, among which:

[0061] The on-chain mode summary module is responsible for summarizing the on-chain content in commonly used protocol texts to form a unified on-chain mode.

[0062] The on-chain analysis module is responsible for extracting on-chain elements from the on-chain terms in the protocol text summarized by the on-chain mode summary module, which is used to assist in the construction of the on-chain model of the multi-party service protocol.

[0063] The model building module is responsible for building a multi-party service protocol on-chain model based on a model-driven architecture, using the output of the on-chain analysis module as the basis.

[0064] The automatic model conversion module is responsible for the model conversion process between CIM and PIM, and between PIM and PSM, without loss of on-chain semantics.

Claims

1. A model-driven multi-party complex protocol on-chain mode analysis and modeling method, characterized in that The method comprises the following steps: Step S1, collecting, summarizing and inducing the on-chain mode of the blockchain case in the agreement: Step S11, obtaining a text data set of a multi-party service agreement, including text contracts from multiple fields; Step S12, summarizing the text contract to find the component structure that can be expressed by a smart contract, and summarizing it into an on-chain mode; Step S13, inducing the on-chain mode, and dividing the on-chain mode into an activity mode and a constraint mode, wherein the activity mode refers to a mode with complete behavior, and the constraint mode refers to a mode of behavior execution condition; Step S2, on-chain mode extraction: For the on-chain mode obtained in step S1, a large language model is used to extract the on-chain mode of the multi-party service agreement text and related elements; Step S3, constructing a multi-party service agreement on-chain model conforming to a model-driven architecture: Step S31, defining the meta-model of the calculation independent model CIM, the platform independent model PIM and the platform related model PIM of the multi-party service agreement, expressing the meta-model by using a unified modeling language UML class diagram, the calculation independent model is composed of a flow model and a structure model, the flow model describes the interaction process between participants, and is expressed by using a BPMN flowchart, including user tasks, contract tasks, workflows and gateways; the structure model is composed of information extracted from the service agreement, and the information includes the identity and role of the participant, the terms of the agreement, data and constraint conditions; the platform independent model is designed from the technical point of view of the smart contract itself, and the meta-model contains key elements required by the smart contract code, and converts business-related information into technical-related information; the platform related model is expressed by using the solidity smart contract code of the Ethereum platform; Step S32, constructing the CIM according to the on-chain element content obtained in step S2, and expressing the CIM by using a UML object diagram and a business process modeling notation BPMN flowchart; Step S33, defining the model conversion rule from the CIM to the PIM, and completing the automatic conversion of the model from the CIM to the PIM without losing the on-chain semantics, the conversion process from the CIM to the PIM is based on rule mapping, the structure model generates a basic smart contract structure, and the flow model generates a correct calling sequence or execution process of the smart contract; Step S34, defining the model conversion rule from the PIM to the PSM, the PSM is expressed by using the smart contract code, and the automatic conversion from the PIM to the PSM is realized, the conversion process from the PIM to the PSM is completed based on the reusability matching of the on-chain mode, different PIM elements and semantic information of the PIM elements are matched in the on-chain mode, and then the PSM is obtained; Step S4, implementation of a visualization tool: Step S41, visualizing the on-chain mode extraction of the text agreement in step S2, and displaying the extracted result by using a front-end page; Step S42, visualizing the process of constructing the CIM in step S3, integrating a plantUML tool to construct the CIM model, and automatically visualizing and presenting the converted PIM and PSM.

2. The model-driven multi-party complex protocol on-chain pattern analysis and modeling method according to claim 1, characterized in that The upper chain mode in the step S1 includes the following types: payment type, message type, right type, time type, contract attribute type, traceability type, access permission constraint, time constraint, contract state constraint, payment constraint and notification constraint.

3. The model-driven multi-party complex protocol on-chain pattern analysis and modeling method according to claim 1, characterized in that The specific steps of the step S2 are as follows: Step S21, extracting rights and obligations based on feature words from the protocol text to obtain all clauses containing rights and obligations; Step S22, using a large language model to perform sentence segmentation and clause classification on all clauses to obtain clauses conforming to the upper chain mode; Step S23, using a large language model to perform syntax dependency analysis on the chainable clauses, including subject-predicate-object component analysis and main and subordinate clause analysis, to obtain the main components of the upper chain clauses.

4. The model-driven multi-party complex protocol on-chain pattern analysis and modeling method according to claim 1, characterized in that The specific steps of the step S41 are as follows: after inputting the text document, the system processes the document and returns the processed chainable clause information to the user, including the split structure information and the upper chain elements of the clauses, and provides high-light display in the original text for the chainable clauses.

5. The model-driven multi-party complex protocol on-chain pattern analysis and modeling method according to claim 1, characterized in that The specific steps of the step S42 are as follows: the plantUML tool is integrated to build the CIM model, the CIM model will be presented to the user in real time, after completing the construction of the calculation independent model, the user can choose to automatically convert, and the converted platform independent model will be returned to the user in the form of an image.

6. A model-driven multi-party complex protocol on-chain pattern analysis and modeling system for implementing the method of any one of claims 1-5, characterized in that The system includes an upper chain mode summary module, an upper chain analysis module, a model construction module and a model automatic conversion module, wherein: The upper chain mode summary module is responsible for summarizing the upper chain content in commonly used protocol texts to form a unified upper chain mode; The upper chain analysis module is responsible for extracting upper chain elements in the upper chain clauses from the protocol texts summarized by the upper chain mode summary module, which is used to assist in the construction of the multi-party service protocol upper chain model; The model construction module is responsible for constructing the multi-party service protocol upper chain model based on the model-driven architecture based on the output of the upper chain analysis module; The model automatic conversion module is responsible for the model conversion process between CIM and PIM, PIM and PSM without losing upper chain semantics.

Citation Information

Patent Citations

  • Multi-party complex business agreement intelligent contract generation system and generation method thereof

    CN115878112A