CN109615518A - A kind of construction method and intelligence contract system of intelligence contract system - Google Patents

A kind of construction method and intelligence contract system of intelligence contract system Download PDF

Info

Publication number
CN109615518A
CN109615518A CN201811511228.1A CN201811511228A CN109615518A CN 109615518 A CN109615518 A CN 109615518A CN 201811511228 A CN201811511228 A CN 201811511228A CN 109615518 A CN109615518 A CN 109615518A
Authority
CN
China
Prior art keywords
code
intelligent contract
function
submodule
data
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.)
Pending
Application number
CN201811511228.1A
Other languages
Chinese (zh)
Inventor
杨子
杨子一
李斌
张勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Brilliant Hi Tech Development Co Ltd
Original Assignee
Beijing Brilliant Hi Tech Development Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Brilliant Hi Tech Development Co Ltd filed Critical Beijing Brilliant Hi Tech Development Co Ltd
Priority to CN201811511228.1A priority Critical patent/CN109615518A/en
Publication of CN109615518A publication Critical patent/CN109615518A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/18Legal services
    • G06Q50/188Electronic negotiation

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • General Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Economics (AREA)
  • Tourism & Hospitality (AREA)
  • Theoretical Computer Science (AREA)
  • Marketing (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • Technology Law (AREA)
  • Primary Health Care (AREA)
  • Human Resources & Organizations (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Development Economics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present invention relates to a kind of construction method of intelligent contract system and intelligent contract system, the construction method of the intelligence contract system includes: to obtain intelligent contract code;According to the function of intelligent contract code, intelligent contract code is split as to realize the code of different function, according to the multiple and different functional unit of the code construction of realization different function;By multiple and different functional unit classification storages.Intelligent contract is divided into multiple and different functional units by the solution of the present invention, simplify each function, modularization, the intelligent contract for realizing larger traffic function can be so built by the formula of playing with building blocks, can be achieved intelligence contract it is flexible call with it is nested, it is able to solve the semantic complicated and security breaches problem of intelligent contract, improves valid code reusability.

Description

A kind of construction method and intelligence contract system of intelligence contract system
Technical field
The present invention relates to the construction methods and intelligent contract system of block chain field more particularly to a kind of intelligent contract system System.
Background technique
Intelligent contract are as follows: " an intelligent contract is a set of promise defined in digital form, including partner can be upper Face executes the agreement of these promises ".First application of intelligent contract is realized on the block platform chain of ether mill.Intelligence is closed It is approximately a kind of anti-tamper digital protocol, it is desirable to found the New World more preferably simplified.In essence, intelligent contract It is a kind of computer program for directly controlling digital asset.By the way that the program of similar if-then sentence is written on block chain, so that Other clauses when the condition finished in advance is triggered, in the payment of program automatic trigger and execution contract, that is to say, that it is One section of code being stored on block chain is traded by block chain and is triggered.
Encrypting digital cash is intelligent contract main purposes at present.Token will be surmounted in the following intelligent contract, will be based on Event of setting out and input execute logic, and some form of automatic execution is generated when contract terminates, and this kind of complicated intelligence is closed New standard will about be brought for digital protocol, and eventually for handling the several hundred million ten thousand meters dollars of global industry, these industries be bank/ It is many that insurance/trade is easy power-assisted.
Intelligent contract is deployed on block chain, is the basic unit of Dapp (Distributed Application), and Dapp can regard one as The intelligent contract of group interconnection, they can facilitate the realization of Premium Features jointly.Just as a major company is by many different portions Door composition is the same, and modules generate the benefit of " whole to be greater than the sum of part " jointly.Dapp is by block link layer deployment one The intelligent contract of group, then realization is interacted with these intelligence contracts.
Restricting intelligent contract development is the public chain that it is relied on.Ether mills most using intelligent contract at present, TPS (TransactionPerSecond, issued transaction amount per second) is only 7-15, even if intelligent contract speed is fast again, can not be allowed Dapp is more smooth, EOS (Enterprise Operation System, a block chain behaviour of commercial Distributed Application design Make system) TPS can reach 4000, the interaction substantially much applied can be interacted with cochain and contract.
It however, intelligent contract is many problem of can solve, but itself is also that problem is burdened with.Current block chain ecology with The loophole where intelligent contract is constantly screened and removed to 3.0 epoch of block chain new technology identity, keeps the perfection of intelligent contract.
" code is law " is the sacred criterion of intelligent contract, intelligence and about one issued, all nodes wholes of block chain It defers to contract to cooperate, and source code can be increased income, intelligent contract is asking for overriding concern there is no bug and safety problem Topic, particularly with regard to pecuniary exchange.However, studies have shown that there are different degrees of peaces for 28% or more above intelligent contract Full loophole, there is also design defect for intelligent contract system itself.Since code can not be changed, loophole is permanent, pole Easily cause irremediable disaster.The common security breaches of intelligent contract and safety problem can substantially be summarized as following side Face:
1. intelligent contract language semantic is complicated.
2. the behavior load of intelligent contract in extreme circumstances, such as stack in virtual machine call, the exception traded in sending Processing, relationship trading execution are sequentially unpredictable etc..
3. intelligent contract lacks reasonable audit process.
4. rate of code reuse is low.
Therefore it provides construction method and the intelligent contract system of a kind of intelligence contract system.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind The construction method and intelligence contract system for stating a kind of intelligent contract system of problem, are able to solve intelligent contract semanteme challenge And lacks audit process and bring security breaches problem, and improve valid code reusability.
According to an aspect of the present invention, a kind of construction method of intelligent contract system is provided, comprising:
Obtain intelligent contract code;
According to the function of intelligent contract code, intelligent contract code is split as to realize the code of different function, according to reality The multiple and different functional unit of the code construction of existing different function;
By multiple and different functional unit classification storages.
Further, according to the function of intelligent contract code, intelligent contract code is split as to realize the generation of different function Yard, include: according to the step of code construction of realization different function multiple and different functional unit
According to the function of intelligent contract code, the code for realizing business function is extracted, forms intelligent contract code mould Block;
According to the function of intelligent contract code, the code for realizing code vulnerabilities authentication function is extracted, intelligence is formed and closes About authentication module.
Further, according to the function of intelligent contract code, intelligent contract code is split as to realize the generation of different function Code, the step of according to the code construction multiple and different functional unit for realizing different function further include:
According to the function of code in intelligent contract code module, extract for responding service request, at service request Business datum is managed, and provides the code of service interface, composition control device submodule for external equipment;
It according to the function of code in intelligent contract code module, extracts and is used for definition data structure, and stored industry is provided The code of the read-write interface for data of being engaged in, composition data submodule.
Further, according to the function of intelligent contract code, intelligent contract code is split as to realize the generation of different function Code, the step of according to the code construction multiple and different functional unit for realizing different function further include:
According to the function of code in controller submodule, extracts and stored for reading data submodule according to service request Business datum, and service controller unit is formed to the code of business datum progress logical process according to service request;
According to the function of code in controller submodule, extract for providing corresponding data submodule according to service request The code of address, composition data address control unit unit.
Further, according to the function of intelligent contract code, intelligent contract code is split as to realize the generation of different function Code, the step of according to the code construction multiple and different functional unit for realizing different function further include:
According to the function of code in data address controller unit, extracts and determine that data submodule is ordered according to service request Name, and the generation of data submodule address is provided according to the mapping relations between the name of data submodule and data submodule address Code forms NameSpace controller unit;And/or
According to the function of code in data address controller unit, extracts and class of service, and root are determined according to service request The code of data submodule address, composition business classification are provided according to the mapping relations between class of service and data submodule address Controller unit;And/or
According to the function of code in data address controller unit, extract according to service request from pre-stored sub- contract The middle code for searching corresponding data submodule address, forms factory control unit.
Further, according to the function of intelligent contract code, intelligent contract code is split as to realize the generation of different function Code, the step of according to the code construction multiple and different functional unit for realizing different function further include:
According to the function of code in the intelligent contract authentication module, extract in the intelligent contract development phase to intelligent contract Code carries out the code of Formal Verification, composition Development Finance chemical examination card submodule;And/or
According to the function of code in the intelligent contract authentication module, the intelligent contract generation for storing on block chain is extracted Code carries out the code of Formal Verification, organizes Formal Verification submodule on chaining;And/or
According to the function of code in the intelligent contract authentication module, extract in the intelligent contract development phase to intelligent contract Each module of system is tested, and verifying intelligent each module of contract system whether there is the code of loophole, composition exploitation test verifying Submodule.
According to another aspect of the present invention, a kind of intelligent contract system is provided, comprising:
Intelligent contract code module, for realizing business function;
Intelligent contract authentication module, for realizing code vulnerabilities authentication function;
Wherein, the intelligent contract code module, the intelligent contract authentication module classification storage are in different address.
Further, the intelligent contract code module includes:
Controller submodule, the controller submodule is for responding service request, according to service request processing business number According to, and service interface is provided for external equipment;
Data submodule, the data submodule is used for definition data structure, and provides the read-write of institute's storage service data Interface.
Further, the intelligent contract authentication module includes:
Development Finance chemical examination card submodule, for carrying out form chemical examination to intelligent contract code in the intelligent contract development phase Card;And/or
Formal Verification submodule on chain, for carrying out form chemical examination for the intelligent contract code stored on block chain Card;And/or
Exploitation test verifying submodule, for being surveyed in the intelligent contract development phase to intelligent each module of contract system Examination, verifying intelligent each module of contract system whether there is loophole.
Further, the intelligent contract code module further include:
Cache sub-module is used for cache business request data.
The present invention has the advantage that compared with prior art
1. intelligent contract, is divided into multiple and different functional units, made by the construction method of intelligent contract system of the invention Each function simplification, modularization, can so build the intelligent contract for realizing larger traffic function, and more by the formula of playing with building blocks A different functional unit classification storage, do not interfere with each other, it can be achieved that the flexible calling of intelligent contract with it is nested, be convenient for handling complexity Service logic scene is able to solve the semantic complicated and security breaches problem of intelligent contract, improves valid code reusability.
2. intelligent contract system of the invention and its construction method also provide cache sub-module, improves intelligent contract and handle number According to speed, to meet the following high-throughput processing requirement.
Detailed description of the invention
Below in conjunction with drawings and examples, the invention will be further described.
Fig. 1 is the construction method flow chart of intelligent contract system provided in an embodiment of the present invention;
Fig. 2 is the structural schematic diagram of intelligent contract system provided in an embodiment of the present invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in specification of the invention Diction " comprising " refer to that there are the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition Other one or more features, integer, step, operation, element, component and/or their group.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, all terms used herein (including technology art Language and scientific term), there is meaning identical with the general understanding of those of ordinary skill in fields of the present invention.Should also Understand, those terms such as defined in the general dictionary, it should be understood that have in the context of the prior art The consistent meaning of meaning, and unless otherwise will not be explained in an idealized or overly formal meaning by specific definitions.
Three primary conditions that the following intelligence contract needs to meet:
First, intelligent contract does not have security breaches, for intelligent contract author;
Second, intelligent contract is semantic concise, for intelligent Contract Theory designer;
Third, intelligent contract engine do not have security breaches, for intelligent contract Project Realization person.
The scheme of the embodiment of the present invention realizes that flexibly calling/nesting is allowed each intelligent contract by intelligent contract modularization Function simplification/modularization builds the intelligent contract for realizing larger traffic function, passes through scene and service by the formula of playing with building blocks Connection is really realized real with the name seat " trust " of " contract ".
Fig. 1 is the construction method flow chart of the intelligent contract system of the embodiment of the present invention, as shown in Figure 1, the present invention is implemented The construction method for the intelligent contract system that example provides, comprising:
S101 obtains intelligent contract code;
Intelligent contract code is split as realizing the code of different function, root by S102 according to the function of intelligent contract code Factually show the multiple and different functional unit of the code construction of different function;
S103, by multiple and different functional unit classification storages.
The construction method of the intelligent contract system of the embodiment of the present invention, by the way that intelligent contract to be split as to multiple and different function Energy unit, so that the intelligent contract code of functional unit is brief, the brief advantage of intelligent contract code is as follows: code can be improved Reusability.And can according to different function classify be multiplexed, realize code it is flexible call with it is nested.It is able to solve intelligent contract Semantic complicated and security breaches problem.In addition, reducing time and human cost since code is briefly conducive to rate of code reuse.
Wherein, it is preferred that in step s 102, according to the function of intelligent contract code, intelligent contract code is split as The code for realizing different function includes: according to the step of code construction multiple and different functional unit for realizing different function
According to the function of intelligent contract code, the code for realizing business function is extracted, forms intelligent contract code mould Block;
According to the function of intelligent contract code, the code for realizing code vulnerabilities authentication function is extracted, intelligence is formed and closes About authentication module.
Here, according to code function, intelligent contract is split into intelligent contract code module and intelligent contract authentication module, Intelligent contract code module is for realizing business function, and intelligent contract authentication module is for realizing code vulnerabilities authentication function.This When can realize that the classification of code is multiplexed according to business function and code vulnerabilities authentication function, to simplify each mould of intelligent contract The function of block solves the problems, such as the semantic complicated and security breaches of intelligent contract, improves valid code reusability.
Preferably, in step s 102, according to the function of intelligent contract code, intelligent contract code is split as realizing not The code of congenerous, the step of according to the code construction multiple and different functional unit for realizing different function further include:
According to the function of code in intelligent contract code module, extract for responding service request, at service request Business datum is managed, and provides the code of service interface, composition control device submodule for external equipment;
It according to the function of code in intelligent contract code module, extracts and is used for definition data structure, and stored industry is provided The code of the read-write interface for data of being engaged in, composition data submodule.
At this point, by the way that intelligent contract code module is further separated into controller submodule and data submodule, by business Control logic is separated with contract code layer, can realize that the classification of code is multiple according to service control function and reading service data function With solving the semantic complicated and security breaches of intelligent contract and ask to further simplify the function of each module of intelligent contract Topic, improves valid code reusability.
Optionally, the data transmission procedure between controller submodule and data submodule is as follows: controller submodule is logical It crosses access data submodule and obtains data, and logical process is done to data, be written back to data submodule.
Wherein, data submodule is absorbed in data structure definition and institute's storing data read-write interface.In order to reach data system One access management and data access authority control purpose, data submodule interface can forbid the access of other way, only to control Device submodule is open.
From the business perspective, intelligent contract generation need to satisfy two conditions:: first, how definition data structure and Read-write mode is realized by data submodule.Wherein, data structure definition is exactly to want in data field definition, such as supply chain Data are transmitted, data structure can be with is defined as: name of product, production date, production producer etc, intelligent contract are opened Head requires first definition data structure.Second, how to handle data and service interface is externally provided, it is real by controller submodule It is existing.The embodiment of the present invention passes through data submodule and controller by disassociation service control logic and contract code layer respectively Module is realized, convenient for processing complicated business logic scene, also can preferably realize module abstracts and contract structure layering.
Therefore, intelligent contract code module of the invention can make intelligent contract semantic concise, for intelligent Contract Theory Designer, allows intelligent contract function modularization succinct as far as possible, and each submodule polymerization, which is called, realizes big function, solves intelligence and closes About meaning of one's words challenge also avoids the security breaches of sophisticated functions.
Controller submodule lays particular emphasis on to the logical process of data and externally provides service.Normal controller submodule can not Any data are stored, the address for some fixed data contract that places one's entire reliance upon or NameSpace.It is different according to processing logic, it can By controller submodule further division.
Preferably, in step s 102, according to the function of intelligent contract code, intelligent contract code is split as realizing not The code of congenerous, the step of according to the code construction multiple and different functional unit for realizing different function further include:
According to the function of code in controller submodule, extracts and stored for reading data submodule according to service request Business datum, and service controller unit is formed to the code of business datum progress logical process according to service request;
According to the function of code in controller submodule, extract for providing corresponding data submodule according to service request The code of address, composition data address control unit unit.
At this point, controller submodule is further divided into service controller unit and data address control unit unit, it is real Showed function further simplify, modularization, to allow intelligent contract function modularization succinct as far as possible, each small module polymerization It calls and realizes big function, solve intelligent contract meaning of one's words challenge, also avoid the security breaches of sophisticated functions.
Wherein, service controller unit lays particular emphasis on to the logical process of data and externally provides service.Data address control Device unit lays particular emphasis on the management to data address.
Preferably, in step s 102, according to the function of intelligent contract code, intelligent contract code is split as realizing not The code of congenerous, the step of according to the code construction multiple and different functional unit for realizing different function further include:
According to the function of code in data address controller unit, extracts and determine that data submodule is ordered according to service request Name, and the generation of data submodule address is provided according to the mapping relations between the name of data submodule and data submodule address Code forms NameSpace controller unit;And/or
According to the function of code in data address controller unit, extracts and class of service, and root are determined according to service request The code of data submodule address, composition business classification are provided according to the mapping relations between class of service and data submodule address Controller unit;And/or
According to the function of code in data address controller unit, extract according to service request from pre-stored sub- contract The middle code for searching corresponding data submodule address, forms factory control unit.
At this point, according to processing logic difference data address controller unit can be divided into NameSpace controller unit, Business separation controller unit and factory control unit.Wherein NameSpace controller unit provides life towards contract on chain Name space service provides data submodule address on NameSpace to chain and maps.Such as service controller unit is to NameSpace Controller unit sends data submodule address on request chain, allows the interior visit at runtime of service controller unit Ask contract on chain.Business separation controller unit: different service controller units is provided according to business difference.Factory control Unit has sub- contract address, goes in factory control unit to find sub- contract address according to different requirements.
These control modules can be set according to specific requirements, can be adopted to help to access quickly to access data layer data.
From the point of view of above-mentioned intelligent contract system architecture, each quasi-controller first can be designed since externally providing service interface Submodule, then it is gradually transitioned into data model and storage mode required for server interface, Various types of data submodule is redesigned, it can More rapidly to design intelligent contract system architecture.
Preferably, in step s 102, according to the function of intelligent contract code, intelligent contract code is split as realizing not The code of congenerous, the step of according to the code construction multiple and different functional unit for realizing different function further include: according to intelligence The function of code, extracts the code for being used for cache business request data in energy contract code module, forms cache sub-module.Caching Submodule is directed to the following high-throughput processing speed, can significantly improve intelligent contract processing data speed.
Safety problem existing for intelligent contract itself constrains the landing of killer's level application, substantially solves safety leakage Hole problem is key, and Formal Verification will be the important technical challenge that the following intelligent contract breaks through development.It is preferred, therefore, that In step S102, according to the function of intelligent contract code, intelligent contract code is split as to realize the code of different function, according to The step of realizing the code construction multiple and different functional unit of different function further include:
According to the function of code in the intelligent contract authentication module, extract in the intelligent contract development phase to intelligent contract Code carries out the code of Formal Verification, composition Development Finance chemical examination card submodule;And/or
According to the function of code in the intelligent contract authentication module, the intelligent contract generation for storing on block chain is extracted Code carries out the code of Formal Verification, organizes Formal Verification submodule on chaining;And/or
According to the function of code in the intelligent contract authentication module, extract in the intelligent contract development phase to intelligent contract Each module of system is tested, and verifying intelligent each module of contract system whether there is the code of loophole, composition exploitation test verifying Submodule.
At this point, Formal Verification submodule is the important portion of intelligent contract exploitation on Development Finance chemical examination card submodule and chain Point, software program is verified using mathematical algorithm, as the supplement of solidity language, it, which has, strengthens block chain intelligence contract peace The potentiality of full property, can effectively prevent DAO (Data Access Object) data access object) generation of attack.
Development Finance chemical examination card submodule, mainly raising developer's Formal Verification automatization level module.
Formal Verification submodule on chain is mainly to provide formal proof module on block chain.
Formal Verification submodule is for verifying intelligent contract without safety leakage on Development Finance chemical examination card submodule and chain Hole, for intelligent contract author.
Formal Verification submodule target is exactly that the final result allowed centainly generates on Development Finance chemical examination card submodule and chain, It avoids bad as a result, and fair to all participants.And by form chemical examination on Development Finance chemical examination card submodule and chain Demonstrate,proving submodule can be with a key automatic Verification intelligence contract.And it chemically examines form on card submodule and chain by Development Finance to chemically examine Submodule is demonstrate,proved, proves that the intelligent contract of code carries out formalization safety verification to carry.
In practical applications, need to develop the verifying of a series of contract, therefore, in addition to Development Finance chemically examine card submodule, Formal Verification submodule on chain further includes exploitation test verifying submodule etc..Exploitation test verifying submodule mainly provides Intelligent contract developer is assisted to find the problem, verifying intelligent contract engine does not have security breaches, for intelligent contract Project Realization Person solves the problems, such as intelligent contract security breaches.
In the embodiment of the present invention, intelligent contract code module and intelligent contract authentication module can be also arranged according to actual needs Other submodules, it is not limited here.Such as the intelligent contract system of the embodiment of the present invention can also include supplementary module, be used for Assist the execution of intelligent contract code module or intelligent contract authentication module.
The present invention is based on intelligent contracts to construct programmable social environment, with intelligence, high efficiency, valueization, mutual Tonghua, mould Block turns to important symbol, is connected by scene and service, really realizes real with the name seat " trust " of " contract ".
In intelligent contract system, the code module criterion based on intelligent contract first develops two modules: intelligent contract Code module and intelligent contract authentication module.However, intelligent contract system of the invention be not limited to intelligent contract code module and Intelligent contract authentication module, may also include other supplementary modules.The intelligence contract system is applied to public chain or alliance's chain, simultaneously Intelligent contract can also publish, and open source is to masses.
Intelligent contract authentication module and other supplementary modules are all for intelligent contract security breaches problem service, in intelligent conjunction About Qualify Phase after code realization.
It can use the following distributed corporation intelligent contract system of the invention is illustrated.Future will be distribution Formula network world, company should not be splitted into the network for the personal composition only much gone alone, and the data just collected at present are seen, For complete distributed corporation, most reasonable solution be combine eight to ten two people team put be in the same localities into Row work.One huge global enterprises of height can be seen as one if carrying out tissue in the way of complete networking A system being made of cell, each cell are the personnel components for having a dozen left and right, including many is administered by 12 employees Mini factory, 12 people constitute general headquarters, by ten two people operate supply department.The residence of this concept of company Meaning, also can be from that close-coupled, by the body of hard constraints, a spoiled loose couplings, the ecosystem loosely constrained.
Similarly, intelligent contract system of the invention is analogous to a global enterprises, needs modularization, shares out the work and helps one another. Here intelligent contract system includes intelligent contract code module/intelligence contract authentication module and other supplementary modules.Each mould Block has smaller modular unit polymerization to realize corresponding function again.By code moduleization and intelligent contract authentication module, By the formula of playing with building blocks, the problems such as solving intelligent contract language semantic challenge and intelligent contract security breaches.
Fig. 2 is the structural schematic diagram of the intelligent contract system of the embodiment of the present invention, as shown in Fig. 2, the embodiment of the present invention mentions The intelligent contract system of confession, comprising:
Intelligent contract code module 201, for realizing business function;
Intelligent contract authentication module 202, for realizing code vulnerabilities authentication function;
Wherein, the intelligent contract code module, the intelligent contract authentication module classification storage are in different address.
Intelligent contract, is divided into multiple and different functional units, makes each function by the intelligent contract system of the embodiment of the present invention It can simplify, modularization, the intelligent contract for realizing larger traffic function so can be built, it can be achieved that intelligence by the formula of playing with building blocks The flexible calling of contract with it is nested, be able to solve the semantic complicated and security breaches problem of intelligent contract, raising valid code is multiplexed Rate.
Preferably, the intelligent contract code module includes:
Controller submodule 2011, the controller submodule handle industry for responding service request, according to service request Business data, and service interface is provided for external equipment;
Data submodule 2012, the data submodule is used for definition data structure, and provides institute's storage service data Read-write interface.
Preferably, the controller submodule includes:
Service controller unit, for reading data submodule institute storage service data according to service request, and according to industry Business request carries out logical process to business datum;
Data address controller unit, for providing corresponding data submodule address according to service request.
Preferably, the data address controller unit includes:
NameSpace controller unit for determining that data submodule is named according to service request, and provides data submodule Mapping relations between block name and data submodule address provide data submodule address;And/or
Business separation controller unit, for determining class of service according to service request, and according to class of service and data Mapping relations between submodule address provide data submodule address;And/or
Factory control unit, for searching corresponding data submodule from pre-stored sub- contract according to service request Block address.
Preferably, the intelligent contract authentication module includes:
Development Finance chemical examination card submodule 2021, for carrying out form to intelligent contract code in the intelligent contract development phase Chemical examination card;And/or
Formal Verification submodule 2022 on chain, for being formalized for the intelligent contract code stored on block chain Verifying;And/or
Exploitation test verifying submodule 2023, for being carried out in the intelligent contract development phase to each module of intelligent contract system Test, verifying intelligent each module of contract system whether there is loophole.
Preferably, the intelligent contract code module further include:
Cache sub-module 2013 is used for cache business request data.Cache sub-module is directed to the following high-throughput processing Speed can significantly improve intelligent contract processing data speed.
One embodiment of the invention additionally provides a kind of intelligent contract system building system, including processor, memory, storage On a memory and the computer program that can run on the processor, it is realized such as when which is executed by processor Lower step:
Obtain intelligent contract code;
According to the function of intelligent contract code, intelligent contract code is split as to realize the code of different function, according to reality The multiple and different functional unit of the code construction of existing different function;
By multiple and different functional unit classification storages.
Optionally, following steps are also realized when which is executed by processor:
According to the function of intelligent contract code, the code for realizing business function is extracted, forms intelligent contract code mould Block;
According to the function of intelligent contract code, the code for realizing code vulnerabilities authentication function is extracted, intelligence is formed and closes About authentication module.
Optionally, following steps are also realized when which is executed by processor:
According to the function of code in intelligent contract code module, extract for responding service request, at service request Business datum is managed, and provides the code of service interface, composition control device submodule for external equipment;
It according to the function of code in intelligent contract code module, extracts and is used for definition data structure, and stored industry is provided The code of the read-write interface for data of being engaged in, composition data submodule.
Optionally, following steps are also realized when which is executed by processor:
According to the function of code in controller submodule, extracts and stored for reading data submodule according to service request Business datum, and service controller unit is formed to the code of business datum progress logical process according to service request;
According to the function of code in controller submodule, extract for providing corresponding data submodule according to service request The code of address, composition data address control unit unit.
Optionally, following steps are also realized when which is executed by processor:
According to the function of code in data address controller unit, extracts and determine that data submodule is ordered according to service request Name, and the generation of data submodule address is provided according to the mapping relations between the name of data submodule and data submodule address Code forms NameSpace controller unit;And/or
According to the function of code in data address controller unit, extracts and class of service, and root are determined according to service request The code of data submodule address, composition business classification are provided according to the mapping relations between class of service and data submodule address Controller unit;And/or
According to the function of code in data address controller unit, extract according to service request from pre-stored sub- contract The middle code for searching corresponding data submodule address, forms factory control unit.
Optionally, following steps are also realized when which is executed by processor:
According to the function of code in the intelligent contract authentication module, extract in the intelligent contract development phase to intelligent contract Code carries out the code of Formal Verification, composition Development Finance chemical examination card submodule;And/or
According to the function of code in the intelligent contract authentication module, the intelligent contract generation for storing on block chain is extracted Code carries out the code of Formal Verification, organizes Formal Verification submodule on chaining;And/or
According to the function of code in the intelligent contract authentication module, extract in the intelligent contract development phase to intelligent contract Each module of system is tested, and verifying intelligent each module of contract system whether there is the code of loophole, composition exploitation test verifying Submodule.
One embodiment of the invention provides a kind of computer readable storage medium, is stored thereon with computer program, above-mentioned It realizes that above-mentioned intelligent contract executes each process of embodiment of the method when computer program is executed by processor, and can reach identical Technical effect, to avoid repeating, which is not described herein again.Wherein, the computer readable storage medium, such as read-only memory (Read-Only Memory, abbreviation ROM), random access memory (Random Access Memory, abbreviation RAM), magnetic disk Or CD etc..
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, reference can be made to the related descriptions of other embodiments.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to the foregoing embodiments Invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each implementation Technical solution documented by example is modified or equivalent replacement of some of the technical features;And these modification or Replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.

Claims (10)

1. a kind of construction method of intelligence contract system characterized by comprising
Obtain intelligent contract code;
According to the function of intelligent contract code, intelligent contract code is split as to realize the code of different function, not according to realization The multiple and different functional unit of the code construction of congenerous;
By multiple and different functional unit classification storages.
2. construction method according to claim 1, which is characterized in that according to the function of intelligent contract code, by intelligent conjunction About code is split as realizing the code of different function, according to the multiple and different functional unit of the code construction of realization different function Step includes:
According to the function of intelligent contract code, the code for realizing business function is extracted, forms intelligent contract code module;
According to the function of intelligent contract code, the code for realizing code vulnerabilities authentication function is extracted, intelligent contract is formed and tests Demonstrate,prove module.
3. construction method according to claim 2, which is characterized in that according to the function of intelligent contract code, by intelligent conjunction About code is split as realizing the code of different function, according to the multiple and different functional unit of the code construction of realization different function Step further include:
It according to the function of code in intelligent contract code module, extracts for responding service request, industry is handled according to service request Business data, and the code of service interface, composition control device submodule are provided for external equipment;
It according to the function of code in intelligent contract code module, extracts and is used for definition data structure, and institute's storage service number is provided According to read-write interface code, composition data submodule.
4. construction method according to claim 3, which is characterized in that according to the function of intelligent contract code, by intelligent conjunction About code is split as realizing the code of different function, according to the multiple and different functional unit of the code construction of realization different function Step further include:
According to the function of code in controller submodule, extract for reading data submodule institute storage service according to service request Data, and service controller unit is formed to the code of business datum progress logical process according to service request;
According to the function of code in controller submodule, extract for providing corresponding data submodule address according to service request Code, composition data address control unit unit.
5. construction method according to claim 4, which is characterized in that according to the function of intelligent contract code, by intelligent conjunction About code is split as realizing the code of different function, according to the multiple and different functional unit of the code construction of realization different function Step further include:
According to the function of code in data address controller unit, extracts and determine that data submodule is named according to service request, and The code of data submodule address, composition are provided according to the mapping relations between the name of data submodule and data submodule address NameSpace controller unit;And/or
It according to the function of code in data address controller unit, extracts and class of service is determined according to service request, and according to industry Mapping relations between classification of being engaged in and data submodule address provide the code of data submodule address, composition business classification control Device unit;And/or
According to the function of code in data address controller unit, extraction is looked into from pre-stored sub- contract according to service request The code of corresponding data submodule address is looked for, factory control unit is formed.
6. construction method according to claim 2, which is characterized in that according to the function of intelligent contract code, by intelligent conjunction About code is split as realizing the code of different function, according to the multiple and different functional unit of the code construction of realization different function Step further include:
According to the function of code in the intelligent contract authentication module, extract in the intelligent contract development phase to intelligent contract code Carry out the code of Formal Verification, composition Development Finance chemical examination card submodule;And/or
According to the function of code in the intelligent contract authentication module, extract intelligent contract code for being stored on block chain into The code of row Formal Verification organizes Formal Verification submodule on chaining;And/or
According to the function of code in the intelligent contract authentication module, extract in the intelligent contract development phase to intelligent contract system Each module is tested, and verifying intelligent each module of contract system whether there is the code of loophole, composition exploitation test verifying submodule Block.
7. a kind of intelligence contract system characterized by comprising
Intelligent contract code module, for realizing business function;
Intelligent contract authentication module, for realizing code vulnerabilities authentication function;
Wherein, the intelligent contract code module, the intelligent contract authentication module classification storage are in different address.
8. intelligence contract system according to claim 7, which is characterized in that the intelligence contract code module includes:
Controller submodule, the controller submodule is for responding service request, according to service request processing business data, and Service interface is provided for external equipment;
Data submodule, the data submodule is used for definition data structure, and provides the read-write interface of institute's storage service data.
9. intelligence contract system according to claim 7, which is characterized in that the intelligence contract authentication module includes:
Development Finance chemical examination card submodule, for carrying out Formal Verification to intelligent contract code in the intelligent contract development phase; And/or
Formal Verification submodule on chain, for carrying out Formal Verification for the intelligent contract code stored on block chain;With/ Or
Exploitation test verifying submodule is tested for testing in the intelligent contract development phase intelligent each module of contract system Demonstrate,proving intelligent each module of contract system whether there is loophole.
10. intelligence contract system according to claim 7, which is characterized in that the intelligence contract code module further include:
Cache sub-module is used for cache business request data.
CN201811511228.1A 2018-12-11 2018-12-11 A kind of construction method and intelligence contract system of intelligence contract system Pending CN109615518A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811511228.1A CN109615518A (en) 2018-12-11 2018-12-11 A kind of construction method and intelligence contract system of intelligence contract system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811511228.1A CN109615518A (en) 2018-12-11 2018-12-11 A kind of construction method and intelligence contract system of intelligence contract system

Publications (1)

Publication Number Publication Date
CN109615518A true CN109615518A (en) 2019-04-12

Family

ID=66008960

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811511228.1A Pending CN109615518A (en) 2018-12-11 2018-12-11 A kind of construction method and intelligence contract system of intelligence contract system

Country Status (1)

Country Link
CN (1) CN109615518A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110188097A (en) * 2019-04-19 2019-08-30 阿里巴巴集团控股有限公司 The storage of intelligent contract, execution method and device and electronic equipment in block chain
CN110532176A (en) * 2019-07-31 2019-12-03 平安科技(深圳)有限公司 A kind of formalization verification method, electronic device and the storage medium of intelligence contract
CN111475521A (en) * 2020-06-24 2020-07-31 支付宝(杭州)信息技术有限公司 Cargo management method and device based on block chain and electronic equipment
CN112286643A (en) * 2020-12-24 2021-01-29 北京百度网讯科技有限公司 Transaction processing method, device, equipment, program and medium of Etheng virtual machine
WO2021042715A1 (en) * 2019-09-04 2021-03-11 北京海益同展信息科技有限公司 System, method, and device for developing smart contract
CN112613043A (en) * 2020-12-30 2021-04-06 杭州趣链科技有限公司 Intelligent contract vulnerability detection method based on intelligent contract calling network
CN112700250A (en) * 2021-01-08 2021-04-23 北京金山云网络技术有限公司 Identity authentication method, device and system in financial scene
CN114201116A (en) * 2021-12-17 2022-03-18 深圳前海微众银行股份有限公司 Intelligent contract deployment method, device, equipment, medium and program product
CN114201116B (en) * 2021-12-17 2024-06-11 深圳前海微众银行股份有限公司 Intelligent contract deployment method, device, equipment, medium and program product

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106919419A (en) * 2017-02-03 2017-07-04 中钞信用卡产业发展有限公司北京智能卡技术研究院 The update method and device of the intelligent contract program on block chain
CN107273455A (en) * 2017-05-31 2017-10-20 深圳前海微众银行股份有限公司 Block chain data access method and device
CN108257000A (en) * 2018-02-26 2018-07-06 北京阿尔山金融科技有限公司 Intelligent contract realizes system, method and electronic equipment
CN108536445A (en) * 2018-03-28 2018-09-14 成都链安科技有限公司 Increasingly automated Formal Verification system and method towards block chain intelligence contract
CN108876619A (en) * 2018-06-26 2018-11-23 北京溯安链科技有限公司 Processing method, device, equipment and medium based on block chain intelligence contract
US20180341931A1 (en) * 2017-05-26 2018-11-29 Alchemy Tech Llc Secure Electronic System for Managing Digital Currencies

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106919419A (en) * 2017-02-03 2017-07-04 中钞信用卡产业发展有限公司北京智能卡技术研究院 The update method and device of the intelligent contract program on block chain
US20180341931A1 (en) * 2017-05-26 2018-11-29 Alchemy Tech Llc Secure Electronic System for Managing Digital Currencies
CN107273455A (en) * 2017-05-31 2017-10-20 深圳前海微众银行股份有限公司 Block chain data access method and device
CN108257000A (en) * 2018-02-26 2018-07-06 北京阿尔山金融科技有限公司 Intelligent contract realizes system, method and electronic equipment
CN108536445A (en) * 2018-03-28 2018-09-14 成都链安科技有限公司 Increasingly automated Formal Verification system and method towards block chain intelligence contract
CN108876619A (en) * 2018-06-26 2018-11-23 北京溯安链科技有限公司 Processing method, device, equipment and medium based on block chain intelligence contract

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110188097A (en) * 2019-04-19 2019-08-30 阿里巴巴集团控股有限公司 The storage of intelligent contract, execution method and device and electronic equipment in block chain
TWI719797B (en) * 2019-04-19 2021-02-21 開曼群島商創新先進技術有限公司 Storage and execution method and device of smart contract in blockchain and electronic equipment
CN110532176A (en) * 2019-07-31 2019-12-03 平安科技(深圳)有限公司 A kind of formalization verification method, electronic device and the storage medium of intelligence contract
WO2021042715A1 (en) * 2019-09-04 2021-03-11 北京海益同展信息科技有限公司 System, method, and device for developing smart contract
CN111475521A (en) * 2020-06-24 2020-07-31 支付宝(杭州)信息技术有限公司 Cargo management method and device based on block chain and electronic equipment
CN112286643A (en) * 2020-12-24 2021-01-29 北京百度网讯科技有限公司 Transaction processing method, device, equipment, program and medium of Etheng virtual machine
CN112613043A (en) * 2020-12-30 2021-04-06 杭州趣链科技有限公司 Intelligent contract vulnerability detection method based on intelligent contract calling network
CN112613043B (en) * 2020-12-30 2024-02-27 杭州趣链科技有限公司 Intelligent contract vulnerability detection method based on intelligent contract calling network
CN112700250A (en) * 2021-01-08 2021-04-23 北京金山云网络技术有限公司 Identity authentication method, device and system in financial scene
CN112700250B (en) * 2021-01-08 2024-04-23 北京金山云网络技术有限公司 Identity authentication method, device and system in financial scene
CN114201116A (en) * 2021-12-17 2022-03-18 深圳前海微众银行股份有限公司 Intelligent contract deployment method, device, equipment, medium and program product
CN114201116B (en) * 2021-12-17 2024-06-11 深圳前海微众银行股份有限公司 Intelligent contract deployment method, device, equipment, medium and program product

Similar Documents

Publication Publication Date Title
CN109615518A (en) A kind of construction method and intelligence contract system of intelligence contract system
US11727120B2 (en) Blockchain cybersecurity solutions
US20210073284A1 (en) Querying graph-based models
Bonabeau Understanding and managing complexity risk
BR112019015066A2 (en) BCHAIN UNIVERSAL CONNECTIONS SYSTEM ALL / EVERYTHING / EVERY PART
Hakak et al. Recent advances in blockchain technology: A survey on applications and challenges
Jørgen Hole Anti-fragile ICT systems
JP2019511030A (en) Computer security by artificial intelligence
Bayuk et al. An architectural systems engineering methodology for addressing cyber security
Khempetch et al. DDoS attack detection using deep learning
Huth et al. From risk management to risk engineering: Challenges in future ict systems
CN112101938A (en) Block chain-based digital seal using method and device and electronic equipment
CN112150266A (en) Design principle of intelligent contract prediction machine
Hegnauer Design and development of a blockchain interoperability api
Duan et al. Attacks against cross-chain systems and defense approaches: A contemporary survey
Yevseiev et al. Modeling of security systems for critical infrastructure facilities
CA3166439A1 (en) Blockchain cybersecurity solutions
Smithson Trusted autonomy under uncertainty
US20210241149A1 (en) System to ensure safe artificial general intelligence via distributed ledger technology
Falco Cybersecurity for urban critical infrastructure
Collins et al. A New Model for Predicting and Dismantling a Complex Terrorist Network
Jarwar et al. Industrial Internet of Things security modelling using ontological methods
Mik Smart Contracts and the'Oracle Problem'in the Context of InsurTech
Bisson et al. Cybersecurity strategic research agenda-sra
Bak et al. Application of an ontology-based model to a selected fraudulent disbursement economic crime

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190412