CN112150282B - Intelligent contract processing mechanism based on event library - Google Patents
Intelligent contract processing mechanism based on event library Download PDFInfo
- Publication number
- CN112150282B CN112150282B CN202010376790.9A CN202010376790A CN112150282B CN 112150282 B CN112150282 B CN 112150282B CN 202010376790 A CN202010376790 A CN 202010376790A CN 112150282 B CN112150282 B CN 112150282B
- Authority
- CN
- China
- Prior art keywords
- intelligent contract
- event
- library
- platform
- contract
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Finance (AREA)
- Accounting & Taxation (AREA)
- General Physics & Mathematics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- General Business, Economics & Management (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention provides an event library-based intelligent contract processing mechanism, so that an intelligent contract platform can perform universal processing on triggering and calling of an intelligent contract, and development and use costs of the intelligent contract are reduced. The process is as follows: (1) predefining events and maintaining an intelligent contract platform event library; (2) registering in the platform when an intelligent contract is newly added, and selecting an event which can influence the intelligent contract in the event library for registering; (3) when a certain event occurs outside, the event is expressed by using a formalized and standardized language; (4) inputting the event into the intelligent contract platform through an application or a prediction machine; (5) the platform analyzes whether the event is a predefined event in an event library, and if the event is the predefined event, finds the affected intelligent contract or intelligent contract set; (6) the platform triggers the affected intelligent contract to perform corresponding operation; (7) and recording and uploading audit information of the platform on the event and the triggered intelligent contract operation.
Description
Technical Field
The invention belongs to the technical field of block chain technology and intelligent contracts, and particularly relates to an event library-based intelligent contract processing design.
Background
An intelligent contract is a set of commitments defined in digital form, including agreements on which the contract participants can enforce the commitments. Alternatively, a smart contract may be said to mean that meeting certain conditions triggers the automatic execution of a program. With the advent of blockchain technology, smart contracts were gradually developed with a trusted code execution environment.
The triggered execution of the intelligent contract is generally implemented programmatically by the application. For each intelligent contract, an application needs to know the specific details of the contract, and each trigger scenario needs to correspond to a specific business scenario of the application. For example, in an intelligent contract for point management, when a scene that the point is reduced due to consumption of the point is encountered, a designated intelligent contract point reduction method needs to be called in a logic processing module for consuming the point, if a new intelligent contract is added to the system for performing calculation, the use of the new contract cannot be normally triggered by an original code, and the call of the calculation contract needs to be added in a corresponding module of the system to complete the logic of the whole system. Thus, each time a new contract is developed, the corresponding contract trigger or invocation code needs to be developed. The existing intelligent contract platform is not responsible for triggering and calling contracts, and only provides a contract execution interface for relevant applications to use.
Therefore, the invention provides an intelligent contract processing mechanism based on an event library, so that an intelligent contract platform can perform universal processing on triggering and calling of an intelligent contract, and development and use costs of the intelligent contract are reduced.
Disclosure of Invention
The invention provides an event library-based intelligent contract processing mechanism, which solves the problem that each added contract in the existing intelligent contract platform needs to be additionally developed with contract calling and triggering functions, and ensures that the contract is more flexibly used. The mechanism provided by the invention can improve the functionality and flexibility of the intelligent contract platform, reduce the labor cost for developing new intelligent contracts and application thereof, and enable the contracts to be more standardized and easy to use.
The events referred to by the invention are things that can cause the intelligent contract data to change, the state to change or trigger the intelligent contract method to execute.
The event library provided by the invention has the following characteristics:
(1) the event library comprises a plurality of predefined events which can affect the intelligent contracts;
(2) events in the event library are organized according to multiple layers of grades;
(3) the top-level hierarchy of the event library is divided into three categories of intelligent contract data change, intelligent contract state change and intelligent contract execution triggering according to different aspects of the intelligent contract;
(4) besides top-level grading, the event library can be provided with one-level or multi-level classifications below, each event can only correspond to one of the classifications in a certain level, and meanwhile, if a certain event corresponds to the classification A in the nth level, the event can only correspond to one of the n + 1-level sub-classifications which belong to the classification A in the n +1 th level;
(5) events in the event library can be increased or decreased or modified in a grading way, but the corresponding intelligent contracts are ensured to be processed properly.
The intelligent contract processing mechanism flow based on the event library provided by the invention is as follows:
(1) predefining events and maintaining an intelligent contract platform event library;
(2) registering in the platform when an intelligent contract is newly added, and selecting an event which can influence the intelligent contract in the event library for registering;
(3) when a certain event occurs outside, the event is converted into a formalized and standardized language for representation;
(4) inputting the event into the intelligent contract platform through an application or a prediction machine;
(5) the platform analyzes whether the event is a predefined event in an event library, and if the event is the predefined event, the platform acquires the affected intelligent contract or intelligent contract set through the additional attribute and the associated information registered in the event library;
(6) the platform triggers the affected intelligent contract to perform corresponding operation;
(7) and recording and uploading audit information of the platform on the event and the triggered intelligent contract operation.
Further, the intelligent contract in step (2) may be registered in association with one or more specific events, or a category in a hierarchy of the event library may be selected for registration, which indicates that each specific event under the category affects the intelligent contract.
Further, as for the step (2), in addition to indicating that the intelligent contract is affected by the event, the registration needs to register a corresponding specific operation, a parameter name of specific data in the contract code needs to be recorded, which causes the intelligent contract data to be changed, a state that the record which causes the intelligent contract state change is changed, and a specific method name in the contract code is recorded, which triggers the intelligent contract to execute.
Further, as to how to search the affected intelligent contract or set in the step (5), firstly locating some instantiated object of the affected intelligent contract or intelligent contract through the additional attribute input by the event, and if the additional attribute of the intelligent contract can not be located, obtaining the affected intelligent contract (or set) or intelligent contract instantiated object (or set) through the intelligent contract related information registered in the event library and the associated hierarchy of the event;
further, for the corresponding operation performed in the step (6), processing is performed according to the top-level hierarchy of the event, intelligent contract data updating processing is performed for causing the intelligent contract data to be changed, intelligent contract state changing processing is performed for causing the intelligent contract state to be changed, and contract execution processing for triggering the intelligent contract to execute is performed.
Further, when the event is accompanied by extra data or extra attachments, the event related to the intelligent contract is required to be processed independently as an independent event influencing the intelligent contract data, and the event unrelated to the intelligent contract is required to be stored in an additional data link and identified in the audit information of the original event.
Further, the events in the event repository form a many-to-many relationship with the intelligent contracts.
The invention provides an event library-based intelligent contract processing mechanism, so that external events are input into an open platform and then are subjected to standardized processing, the associated intelligent contracts can be automatically triggered to perform corresponding operations according to the relationship between the intelligent contracts registered in advance and the associated events, and the development cost when new contracts are generated is reduced.
Drawings
FIG. 1 is a schematic diagram of an event repository and an intelligent contract relationship proposed by the present invention;
fig. 2 is a schematic flow chart of an intelligent contract processing mechanism based on an event library according to the present invention.
Detailed description of the preferred embodiments
In the following description, numerous technical details are set forth in order to provide a better understanding of the present application, but it will be apparent to those of ordinary skill in the art that the present invention is not limited to these technical details and that various changes and modifications can be made based on the following embodiments.
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in further detail below.
A large number of events are maintained in an intelligent contract platform event library, wherein the events related to deposit and triggering contract execution comprise interest adjustment, early taking, taking after expiration and the like. The intelligent contract A realizing the periodic deposit logic is registered in the intelligent contract platform and is registered to be related to the events of interest adjustment, early taking out and the like. The intelligent contract a generates a plurality of contract objects during instantiation, which can be understood as 'intelligent deposit contract a of user a' and 'intelligent deposit contract a of user b'.
When an interest adjustment event in the global scope occurs outside, the event is input into the intelligent contract platform, the system finds the affected intelligent contract A and other related intelligent contracts according to the registered contract and event relation, and because the event is a global event and is not additionally marked, all instantiated contract objects of the intelligent contract A need to be processed, and the contract method corresponding to the interest adjustment is triggered to execute.
When an 'ahead taking out' event initiated by a user B appears outside, the additional attribute of the event needs to indicate the information of the intelligent contract A and the user B, and the intelligent contract platform can be directly positioned to the user B instance of the intelligent contract A to trigger and execute operation.
The foregoing is directed to embodiments of the present invention, and it is understood that various changes and modifications may be made by those skilled in the art without departing from the spirit and scope of the invention.
Claims (1)
1. An intelligent contract processing method based on event library is characterized in that the event library has the following characteristics:
(1) the event library comprises a plurality of predefined events which can affect the intelligent contract, and the events in the event library and the intelligent contract form a many-to-many relationship;
(2) events in the event library are organized according to multiple layers of grades;
(3) the top-level hierarchy of the event library is divided into three categories of intelligent contract data change, intelligent contract state change and intelligent contract execution triggering according to different aspects of the intelligent contract;
(4) besides top-level grading, the event library can be provided with one-level or multi-level classifications below, each event can only correspond to one of the classifications in a certain level, and meanwhile, if a certain event corresponds to the classification A in the nth level, the event can only correspond to one of the n + 1-level sub-classifications which belong to the classification A in the n +1 th level;
(5) events in the event library can be increased or decreased or modified in a grading way, but corresponding intelligent contracts are ensured to be properly processed;
the event library-based intelligent contract processing method comprises the following processing flows:
(1) predefining events and maintaining an intelligent contract platform event library;
(2) when an intelligent contract is newly added, registering is needed in a system, an event which can affect the intelligent contract is selected from an event library for registering, the intelligent contract can be registered by associating with one or more specific events, or one classification in a certain level of the event library can be selected for registering, and each specific event under the classification can affect the intelligent contract; when registering, besides indicating that the intelligent contract is influenced by the event, the corresponding specific operation needs to be registered, the parameter name of the specific data needing to be recorded in the contract code, which causes the change of the intelligent contract data, the state of the change of the intelligent contract state, and the specific method name in the contract code, which triggers the execution of the intelligent contract, are recorded;
(3) when a certain event occurs outside, the event is expressed by using a formalized and standardized language;
(4) inputting the event into the intelligent contract platform through an application or a prediction machine;
(5) the platform analyzes whether the event is a predefined event in an event library, and if the event is the predefined event, the platform acquires the affected intelligent contract or intelligent contract set through the additional attribute and the associated information registered in the event library; the acquiring of the affected intelligent contract or intelligent contract set comprises: firstly, positioning an affected intelligent contract or an instantiated object of the intelligent contract through an additional attribute input by an event, and acquiring the affected intelligent contract or an intelligent contract instantiated object or set through intelligent contract associated information and belonging classification registered in an event library by the event if the additional attribute of the intelligent contract can not be positioned;
(6) the platform triggers the affected intelligent contract to perform corresponding operation, processes according to the top-level hierarchy of the event, performs intelligent contract data updating processing on the intelligent contract data change, performs intelligent contract state change processing on the intelligent contract state change, and triggers the intelligent contract to perform contract execution processing;
(7) the platform records and chains the audit information of the event and the triggered intelligent contract operation;
when the event is attached with extra data or extra accessories, the event related to the intelligent contract is required to be independently processed as an independent event influencing the intelligent contract data, and the event not related to the intelligent contract is required to be stored as an additional data uplink and is identified in the audit information of the original event.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010376790.9A CN112150282B (en) | 2020-05-07 | 2020-05-07 | Intelligent contract processing mechanism based on event library |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010376790.9A CN112150282B (en) | 2020-05-07 | 2020-05-07 | Intelligent contract processing mechanism based on event library |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112150282A CN112150282A (en) | 2020-12-29 |
CN112150282B true CN112150282B (en) | 2021-06-04 |
Family
ID=73891337
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010376790.9A Active CN112150282B (en) | 2020-05-07 | 2020-05-07 | Intelligent contract processing mechanism based on event library |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112150282B (en) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108446992A (en) * | 2018-05-11 | 2018-08-24 | 济南浪潮高新科技投资发展有限公司 | A kind of net connection accurate Accident Handling Method of automobile based on block chain |
CN108876610A (en) * | 2018-05-31 | 2018-11-23 | 深圳市零度智控科技有限公司 | Intelligent contract implementation method, user equipment, storage medium and device |
CN109508915A (en) * | 2019-01-17 | 2019-03-22 | 苏州复谷网络科技有限公司 | A kind of intelligent contract of intelligence based on block chain |
CN110197285B (en) * | 2019-05-07 | 2021-03-23 | 清华大学 | Block chain-based safe cooperation deep learning method and device |
-
2020
- 2020-05-07 CN CN202010376790.9A patent/CN112150282B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN112150282A (en) | 2020-12-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP1982270B1 (en) | Context based code analysis | |
US8423963B2 (en) | Computer implemented API management mechanism for generating upgrade risk level handling | |
US8706771B2 (en) | Systems and methods for analyzing and transforming an application from a source installation to a target installation | |
US7640538B2 (en) | Virtual threads in business process programs | |
US20110093308A1 (en) | Process monitoring system | |
CN113298503A (en) | Government affair-oriented workflow management system and database and table dividing method thereof | |
US20080059563A1 (en) | Methods and Systems for Automated Data Processing | |
KR20150106365A (en) | Business rule management system with hierarchial rule structure and expression method threrof | |
CN111930354B (en) | Framework component system for software development and construction method thereof | |
US7739660B2 (en) | Code management in a distributed software development environment | |
US8539479B2 (en) | System and method for application function consolidation | |
US20110078710A1 (en) | Value container propagation in development tools, business process management, and business rules management solutions | |
CN112150282B (en) | Intelligent contract processing mechanism based on event library | |
CN106294185A (en) | Automated test frames based on five layers of framework and method | |
US20050015264A1 (en) | Methods, systems, and a computer-readable medium for defining and evaluating business rules during runtime of a computer software application program | |
US10657476B2 (en) | Just in time compilation (JIT) for business process execution | |
US10353381B2 (en) | Method to extend MES functionalities in a message routing system | |
CN107765655B (en) | Method, system and readable medium for extending MES function by message routing system | |
CN112882910A (en) | Interface pressure testing method and device of workflow engine | |
CN116048523B (en) | Method for configuring policy parameters by decision engine | |
CN109308256A (en) | A kind of java dynamically analyzing of program method, equipment and storage medium | |
CN117234466B (en) | Enterprise management software development method, system, equipment and storage medium | |
Rodríguez et al. | Model‐based assisted migration of oracle forms applications: The overall process in an industrial setting | |
CN112714119A (en) | Internet of things data transmission method and system | |
CN112633379A (en) | Internet of things data fusion method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |