WO2020228531A1 - Consortium blockchain governance method and apparatus, computer device and storage medium - Google Patents

Consortium blockchain governance method and apparatus, computer device and storage medium Download PDF

Info

Publication number
WO2020228531A1
WO2020228531A1 PCT/CN2020/087557 CN2020087557W WO2020228531A1 WO 2020228531 A1 WO2020228531 A1 WO 2020228531A1 CN 2020087557 W CN2020087557 W CN 2020087557W WO 2020228531 A1 WO2020228531 A1 WO 2020228531A1
Authority
WO
WIPO (PCT)
Prior art keywords
governance
smart contract
alliance
chain
target
Prior art date
Application number
PCT/CN2020/087557
Other languages
French (fr)
Chinese (zh)
Inventor
代健武
Original Assignee
深圳壹账通智能科技有限公司
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 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2020228531A1 publication Critical patent/WO2020228531A1/en

Links

Images

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
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0637Strategic management or analysis, e.g. setting a goal or target of an organisation; Planning actions based on goals; Analysis or evaluation of effectiveness of goals
    • G06Q10/06375Prediction of business process outcome or impact based on a proposed change
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • 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/02Banking, e.g. interest calculation or account maintenance
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Definitions

  • This application relates to the computer field, and in particular to a method and device for managing alliance chains, computer equipment, and storage media.
  • the consortium chain is a block chain for members of a certain group and limited third parties.
  • a number of pre-selected nodes are designated as bookkeepers, and the generation of each block is jointly determined by all pre-selected nodes.
  • the alliance chain network it is divided into alliance chains in different application scenarios: the whole network is open and the blockchain without user authorization mechanism is called the public chain; authorized nodes are allowed to join the network, which can be viewed according to permissions Information is often used in inter-organizational blockchains, called alliance chains or industry chains; all nodes in the network are in the hands of one organization, called private chains.
  • the inventor realizes that the alliance chain governance of products in the industry is mostly approved by the alliance management party or approved by each participant in turn based on the workflow.
  • the former cannot reflect the democratic co-governance spirit of the blockchain, and the latter has the disadvantages that the governance process cannot be automated (manual participation is required), the governance strategy cannot be flexibly customized, and the governance process is not easy to reach consensus. It can be seen that the alliance in related technologies The chain governance strategy is unreasonable.
  • the embodiments of the present application provide a governance method and device for a consortium chain, computer equipment, and storage medium to solve the technical problems of low efficiency or inability to reflect a consensus mechanism when governing the consortium chain in related technologies.
  • an embodiment of the present application provides a governance method for a consortium chain, the method includes: setting a plurality of smart contracts, wherein each smart contract in the plurality of smart contracts corresponds to one of the alliance members governing the alliance chain Set of decision logic; trigger a governance request for governance of the alliance chain; select a target smart contract according to the governance request, and use the target smart contract to generate governance decision results.
  • an embodiment of the present application provides a management device for a consortium chain, the device includes: a setting module for setting multiple smart contracts, wherein each smart contract in the multiple smart contracts corresponds to a member of the alliance A set of decision logic for governing the alliance chain; a trigger module for triggering a governance request for governing the alliance chain; a governance module for selecting a target smart contract according to the governance request, and using the target smart contract to generate governance Decision results.
  • the present application also provides a computer device, the computer device including a memory, a processor, and a computer program stored in the memory and running on the processor.
  • the processor implements a computer program when the program is executed.
  • a governance method for an alliance chain includes: setting a plurality of smart contracts, wherein each smart contract in the plurality of smart contracts corresponds to a set of decision logic for alliance members to govern the alliance chain; triggering is used to govern the alliance The governance request of the chain; select the target smart contract according to the governance request, and use the target smart contract to generate the governance decision result.
  • the present application also provides a computer-readable storage medium with a computer program stored on the computer-readable storage medium.
  • a method for managing a consortium chain is implemented. Including: setting multiple smart contracts, wherein each smart contract in the multiple smart contracts corresponds to a set of decision logic for alliance members to govern the alliance chain; triggering a governance request for governing the alliance chain; according to the governance request Select the target smart contract, and use the target smart contract to generate governance decision results.
  • the alliance chain governance process can be highly automated, complex governance strategies can be realized, and consensus based on governance strategies can be reached more easily. It solves the technical problems of low efficiency or inability to reflect the consensus mechanism in the governance of the alliance chain in related technologies. According to the automatic execution mechanism of the smart contract and the consensus mechanism of the alliance chain, the governance consensus of the alliance can be reached automatically, and the entire governance process does not need Manual participation by the management party of the alliance or other participants.
  • Figure 1 is a block diagram of the hardware structure of a consortium chain governance server according to an embodiment of the present application
  • Fig. 2 is a flowchart of a governance method for a consortium chain according to an embodiment of the application
  • FIG. 3 is a schematic diagram of the application of the alliance chain in an embodiment of the present application.
  • Figure 4 is a flow chart of the application of the specified smart contract to generate governance decision results
  • Fig. 5 is a structural block diagram of a management device of a consortium chain according to an embodiment of the present application.
  • FIG. 1 is a hardware structure block diagram of a server for managing a consortium chain in an embodiment of the present application.
  • the server 10 may include one or more (only one is shown in FIG. 1) processor 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) And the memory 104 for storing data.
  • the aforementioned server may also include a transmission device 106 and an input/output device 108 for communication functions.
  • FIG. 1 is only for illustration, and it does not limit the structure of the foregoing server.
  • the server 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration from that shown in FIG.
  • the memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as the computer programs corresponding to the management method of the alliance chain in the embodiment of the present application.
  • the processor 102 runs the computer programs stored in the memory 104, thereby Perform various functional applications and data processing, that is, realize the above-mentioned methods.
  • the memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the storage 104 may further include storage remotely provided with respect to the processor 102, and these remote storages may be connected to the server 10 through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
  • the transmission device 106 is used to receive or send data via a network.
  • the foregoing specific examples of the network may include a wireless network provided by the communication provider of the server 10.
  • the transmission device 106 includes a network adapter (Network Interface Controller, NIC for short), which can be connected to other network devices through a base station to communicate with the Internet.
  • the transmission device 106 may be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet in a wireless manner.
  • RF Radio Frequency
  • FIG. 2 is a flowchart of the governance method for a consortium chain according to an embodiment of the present application. As shown in FIG. 2, the process includes the following steps:
  • Step S202 setting a plurality of smart contracts, wherein each smart contract in the plurality of smart contracts corresponds to a set of decision logic for alliance members to govern the alliance chain;
  • the multiple smart contracts in this embodiment include a set of general smart contracts and at least one set of specific smart contracts.
  • each alliance member when setting up the smart contract of the alliance chain, each alliance member will be provided with a set of general smart contracts and At least one set of specific smart contracts will execute one or more sets of smart contracts in corresponding scenarios.
  • Step S204 triggering a governance request for governance of the alliance chain
  • governance requests are triggered.
  • the request object or governance object is different, the triggered governance request may also be different.
  • Step S206 Select a target smart contract according to the governance request, and use the target smart contract to generate a governance decision result.
  • the alliance chain governance process can be highly automated, complex governance strategies can be realized, and consensus based on governance strategies can be reached more easily. It solves the technical problems of low efficiency or inability to reflect the consensus mechanism in the governance of the alliance chain in related technologies. According to the automatic execution mechanism of the smart contract and the consensus mechanism of the alliance chain, the governance consensus of the alliance can be reached automatically, and the entire governance process does not need Manual participation by the management party of the alliance or other participants.
  • the groups used by the alliance blockchain include banks, insurance, securities, business associations, group companies, and upstream and downstream companies.
  • Blockchain was born in the era of mobile Internet. These companies have generally been IT-based and Internet-based. Blockchain is very helpful to further improve the efficiency of notarization, settlement and clearing business and value exchange network in the industrial chain of their circle. Trying to use existing blockchain technologies (such as the Bitcoin code family and Ethereum) found that the processing performance, privacy protection, and compliance of the existing blockchain cannot meet their business needs.
  • FIG. 3 is a schematic diagram of the application of the alliance chain of the embodiment of the present application, which is applied to securities-related institutions.
  • the setting of multiple smart contracts in this embodiment includes: setting a universal first smart contract for alliance members on the alliance chain, and setting a specific second smart contract for each alliance member on the alliance chain, where the first The smart contract corresponds to the first governance function, the second smart contract corresponds to the second governance function, and the alliance chain is composed of multiple alliance members.
  • the governance smart contract can be implemented as a system smart contract.
  • Each node in the system is installed.
  • each alliance node installs the smart contract , Realize the unified configuration of the attributes of the smart contract (such as endorsement strategy) at the system level.
  • the transaction client submits a transaction proposal to multiple endorsement nodes in the alliance network
  • the endorsement node is a type of network node used to simulate the execution of smart contracts and feed back the execution results of the smart contract to the transaction client
  • endorsement nodes Simulate the execution of the smart contract and feed back the execution result of the smart contract to the transaction client
  • the transaction client packages the transaction proposal and the execution results collected from each endorsement node into a transaction request, and sends it to the consensus node for sorting consensus
  • the consensus node is The rules pack the received transactions into blocks, and broadcast the blocks to the accounting nodes in the network; after the accounting nodes receive the blocks, they will verify the transactions in the blocks.
  • One of the steps in the verification is to verify whether the endorsement result of this transaction satisfies the endorsement strategy related to this smart contract. Only transactions that meet the endorsement strategy can be considered valid, and the corresponding state changes will be written into the ledger status database.
  • the endorsement strategy of the smart contract in this embodiment is a configurable strategy or rule.
  • the execution result of the smart contract needs to obtain the endorsement of the endorsing node to be effective, and the endorsement can be endorsed only when the endorsing node is verified.
  • the governance function can be designed as a special smart contract (which can be called a governance smart contract).
  • the smart contract includes the governance decision logic; the endorsement strategy of this smart contract is set to the alliance
  • the governance strategy agreed by the members, the governance strategy can be: the agreement of more than the majority of the members is required, or at least the agreement of some specific members is required, or the agreement of all members is required, and so on.
  • the process of alliance governance can be transformed into a transaction process of executing a smart contract, and the final result of this transaction will depend on the pre-designated endorsement strategy (that is, the governance strategy).
  • the trigger conditions of this embodiment include: alliance member admission, sub-chain member admission, and application smart contract verification admission; different types of smart contracts can be triggered according to different trigger conditions, and different types of smart contracts correspond to different governance decisions Logic, each set of governance decision logic corresponds to a governance requirement.
  • the governance request used to govern the alliance chain can be triggered but not limited to: under the trigger condition of the admission of alliance members, trigger the first one used to govern the alliance chain Governance request; Trigger a second governance request for governing the consortium chain under the triggering condition of the access of the sub-chain members, wherein the consortium chain includes one or more sub-chains, and the sub-chain members are any of the sub-chains.
  • the blockchain node on the chain triggers the third governance request for governance of the alliance chain under the triggering condition of the verification access of the application of the smart contract.
  • the governance decision logic inside the governance smart contract of this embodiment can be based on system-defined rules, that is, the decision logic of each alliance member as a verification node, such as member whitelist or blacklist, specific code verification logic, etc.; or based on current
  • the data on the chain makes certain automatic decisions.
  • the rules defined by these systems are stored on the blockchain in the form of data on the chain, and are read from the chain when the governance smart contract is executed, and then governance decisions are made based on these rules and data.
  • selecting a target smart contract according to the governance request, and using the target smart contract to generate a governance decision result includes:
  • selecting a target smart contract according to the governance request, and using the target smart contract to generate a governance decision result includes:
  • generating the governance decision result by the consensus node according to the response messages of multiple alliance members includes one of the following: when receiving response messages from more than a majority of alliance members indicating that the target member is trustworthy, generating an agreed governance decision result; when a response message indicating that the target member is credible is received from a plurality of specific alliance members, generate an agreed governance decision result; when all alliance members are received, it is used to indicate that the target member is credible In response to the message, the agreed governance decision result is generated.
  • the smart contract includes a general governance smart contract and a specific governance smart contract, both of which are essentially governance smart contracts, but are just different choices in implementation.
  • the general governance smart contract it contains all the supported governance functions and their governance decision logic, such as the admission of alliance members, the admission of sub-chain members, and the verification of application smart contracts; while for specific governance smart contracts, only certain types of Specific governance functions and their governance decision logic, such as the admission of alliance members.
  • Different governance functions have corresponding governance smart contracts. If the general governance smart contract is adopted, the implementation is relatively simple and the management is relatively convenient, but it is not as flexible as the specific governance smart contract. For example, different governance strategies cannot be set for different governance functions. In addition, if new governance functions are to be supported later, the previous general smart contract needs to be upgraded to include the new governance functions. But for a specific governance smart contract, you can create and configure a smart contract for the new governance function.
  • the respective rule data of the alliance members can also be configured (for example, each alliance member can set its own whitelist or blacklist), and these alliance members are specific
  • the rule data is also stored on the chain and corresponds to the membership ID of the alliance. Different alliances correspond to different rule data.
  • the governance smart contract is executed, the membership is first judged, and then the specific rule data corresponding to the member is read according to the membership to make governance decisions.
  • Fig. 4 is a flow chart of an embodiment of the application using a designated smart contract to generate governance decision results.
  • the target smart contract includes a first smart contract and multiple second smart contracts
  • the target smart contract is used to generate governance decision results include:
  • S402 Trigger multiple alliance members to execute corresponding second smart contracts to generate multiple first decision results
  • the first decision result generated by it may also be different.
  • the three alliance members a, b, and c generate the first decision result respectively For: access, no access, access;
  • the first decision result generated by the above three alliance members a, b, and c is input into the first smart contract for decision-making. If the first smart contract adopts the decision logic of majority consent, the final governance decision result is Access
  • governance decision logics can also be used for different alliance members to trigger the smart contract in different trigger scenarios; in another embodiment scenario, the governance decision logic It consists of two parts, one is the general governance decision logic, and the other is the independent governance decision logic of the alliance members.
  • A general governance decision logic
  • B the specific governance decision logic of the alliance member.
  • Each alliance member When conducting alliance governance , Each alliance member first executes the governance smart contract B, and stores the result of the governance decision (R1) on the chain; then uses the governance decision result R1 as an input data for the governance smart contract A, executes the governance smart contract A and gets the corresponding Results of governance decisions.
  • the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is Better implementation.
  • the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to enable a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the method described in each embodiment of the present application.
  • a consortium chain management device is also provided, which is used to implement the above-mentioned embodiments and preferred implementations, and what has been described will not be repeated.
  • the term "module” can implement a combination of software and/or hardware with predetermined functions.
  • the devices described in the following embodiments are preferably implemented by software, hardware or a combination of software and hardware is also possible and conceived.
  • Fig. 5 is a structural block diagram of a management device for a consortium chain according to an embodiment of the present application. As shown in Fig. 5, the device includes:
  • the setting module 50 is used to set multiple smart contracts, where each smart contract in the multiple smart contracts corresponds to a set of decision logic for alliance members to govern the alliance chain;
  • the triggering module 52 is used to trigger a governance request for managing the alliance chain
  • the governance module 54 is configured to select a target smart contract according to the governance request, and use the target smart contract to generate governance decision results.
  • the setting module includes: a setting unit for setting a universal first smart contract for alliance members on the alliance chain, and setting a specific second smart contract for each alliance member on the alliance chain, where: The first smart contract corresponds to a first governance function, the second smart contract corresponds to a second governance function, and the alliance chain is composed of multiple alliance members.
  • the trigger module includes one of the following: a first trigger unit, which is used to trigger a first governance request for governing the alliance chain under the triggering condition of admission of alliance members; and a second trigger unit, which is used to Under the triggering condition of the access of the sub-chain members, the second governance request for governing the consortium chain is triggered, wherein the consortium chain includes one or more sub-chains, and the sub-chain members are areas on any of the sub-chains.
  • Block chain node the third trigger unit is used to trigger the third governance request for governing the alliance chain under the triggering condition of the verification admission of the application smart contract.
  • the governance module includes: a first selection unit, configured to, when the governance request is the first governance request or the second governance request triggered by the target member to be connected to the alliance chain, according to a predetermined
  • the mapping relationship selection decision logic is a whitelist or blacklist target smart contract, where the target member includes the alliance member that triggers the first governance request or the sub-chain member that triggers the second governance request; the judgment unit uses In determining whether the target member is credible according to a whitelist entry or a blacklist entry; the first governance unit is used to determine the target when the whitelist entry includes the target member or the blacklist entry does not include the target member
  • the members are credible, and feedback a response message indicating that the target member is credible to the consensus node of the alliance chain, so that the consensus node generates governance decision results according to the response messages of multiple alliance members.
  • the governance module includes: a second selection unit, configured to select the decision logic as a specific code according to a predetermined mapping relationship when the governance request is the third governance request triggered by the verification admission of the application smart contract The verified target smart contract; the sending unit is used to send a verification message to the target member to be verified; the receiving unit is used to receive the response message fed back by the target member; the second management unit is used to parse the response message, in When the response message carries the agreed code representing the identity, a response message used to indicate the credibility of the target member is fed back to the consensus node of the alliance chain, so that the consensus node generates a response message based on multiple alliance members Results of governance decisions.
  • a second selection unit configured to select the decision logic as a specific code according to a predetermined mapping relationship when the governance request is the third governance request triggered by the verification admission of the application smart contract The verified target smart contract
  • the sending unit is used to send a verification message to the target member to be verified
  • the receiving unit is used to receive the response message fed back
  • generating the governance decision result by the consensus node according to the response messages of multiple alliance members includes one of the following: when receiving response messages from more than a majority of alliance members indicating that the target member is trustworthy, generating an agreed governance decision result; when a response message indicating that the target member is credible is received from a plurality of specific alliance members, generate an agreed governance decision result; when all alliance members are received, it is used to indicate that the target member is credible In response to the message, the agreed governance decision result is generated.
  • the governance module includes: a first generation unit for triggering multiple alliance members to execute the corresponding second smart contract , Generate multiple first decision results; a second generation unit, used to use the multiple first decision results as the input data of the first smart contract to obtain the output data of the first smart contract; third governance The unit is used to determine the output data as the governance decision result.
  • each of the above modules can be implemented by software or hardware.
  • it can be implemented in the following manner, but not limited to this: the above modules are all located in the same processor; or, the above modules are combined in any combination The forms are located in different processors.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined Or it can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • each unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be realized in the form of hardware, or in the form of hardware plus software functional unit.
  • the above-mentioned integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium.
  • the above-mentioned software functional unit is stored in a storage medium and includes several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (Processor) execute the method described in each embodiment of the present application Part of the steps.
  • the computer-readable storage medium can be non-volatile or volatile, including: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), Various media that can store program codes such as magnetic disks or optical disks.
  • the embodiment of the present application also provides a storage medium in which a computer program is stored, wherein the computer program is configured to execute the steps in any of the foregoing method embodiments when running.
  • the foregoing storage medium may be configured to store a computer program for executing the following steps:
  • S3 Select a target smart contract according to the governance request, and use the target smart contract to generate a governance decision result.
  • the foregoing storage medium may include, but is not limited to: U disk, Read-Only Memory (Read-Only Memory, ROM for short), Random Access Memory (Random Access Memory, RAM for short), Various media that can store computer programs, such as mobile hard disks, magnetic disks, or optical disks.
  • the embodiment of the present application also provides an electronic device, including a memory and a processor, the memory is stored with a computer program, and the processor is configured to run the computer program to execute the steps in any of the foregoing method embodiments.
  • the aforementioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the aforementioned processor, and the input-output device is connected to the aforementioned processor.
  • the foregoing processor may be configured to execute the following steps through a computer program:
  • S3 Select a target smart contract according to the governance request, and use the target smart contract to generate a governance decision result.

Abstract

Provided are a consortium blockchain governance method and apparatus, a computer device and a storage medium. The method comprises: providing a plurality of smart contracts, wherein each smart contract in the plurality of smart contracts corresponds to a set of decision logic for a consortium member to govern a consortium blockchain; triggering a governance request for governing the consortium blockchain; and selecting a target smart contract according to the governance request, and generating a governance decision result by using the target smart contract. According to the present application, the technical problem in the prior art of the efficiency being low or of not being able to embody a consensus mechanism when a consortium blockchain is governed is solved.

Description

联盟链的治理方法及装置、计算机设备、存储介质Alliance chain governance method and device, computer equipment, storage medium
本申请要求于2019年5月10日提交中国专利局、申请号为201910390791.6,发明名称为“联盟链的治理方法及装置、计算机设备、存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on May 10, 2019, the application number is 201910390791.6, and the invention title is "consortium chain governance method and device, computer equipment, storage medium", and the entire content of it is approved The reference is incorporated in this application.
【技术领域】【Technical Field】
本申请涉及计算机领域,尤其涉及一种联盟链的治理方法及装置、计算机设备、存储介质。This application relates to the computer field, and in particular to a method and device for managing alliance chains, computer equipment, and storage media.
【背景技术】【Background technique】
相关技术中,联盟链是针对某个特定群体的成员和有限的第三方的区块链,其内部指定多个预选节点为记账人,每个块的生成由所有的预选节点共同决定。根据联盟链网络中心化程度的不同,又分为不同应用场景下的联盟链:全网公开,无用户授权机制的区块链,称为公有链;允许授权的节点加入网络,可根据权限查看信息,往往被用于机构间的区块链,称为联盟链或行业链;所有网络中的节点都掌握在一家机构手中,称为私有链。In related technologies, the consortium chain is a block chain for members of a certain group and limited third parties. A number of pre-selected nodes are designated as bookkeepers, and the generation of each block is jointly determined by all pre-selected nodes. According to the degree of centralization of the alliance chain network, it is divided into alliance chains in different application scenarios: the whole network is open and the blockchain without user authorization mechanism is called the public chain; authorized nodes are allowed to join the network, which can be viewed according to permissions Information is often used in inter-organizational blockchains, called alliance chains or industry chains; all nodes in the network are in the hands of one organization, called private chains.
发明人意识到,业内产品的联盟链治理,多采用由联盟管理方批准或者各参与方基于工作流的方式轮流批准。前者无法体现区块链的民主共治精神,后者实现起来具有治理过程不能自动化(需人工参与),治理策略不能灵活定制,治理过程不易达到共识的缺点,由此可知,相关技术中的联盟链治理策略不合理。The inventor realizes that the alliance chain governance of products in the industry is mostly approved by the alliance management party or approved by each participant in turn based on the workflow. The former cannot reflect the democratic co-governance spirit of the blockchain, and the latter has the disadvantages that the governance process cannot be automated (manual participation is required), the governance strategy cannot be flexibly customized, and the governance process is not easy to reach consensus. It can be seen that the alliance in related technologies The chain governance strategy is unreasonable.
针对相关技术中存在的上述问题,目前尚未发现有效的解决方案。For the above-mentioned problems existing in related technologies, no effective solution has been found yet.
【发明内容】[Content of the invention]
有鉴于此,本申请实施例提供了一种联盟链的治理方法及装置、计算机设备、存储介质,以解决相关技术中治理联盟链时效率低或者不能体现共识机制的技术问题。In view of this, the embodiments of the present application provide a governance method and device for a consortium chain, computer equipment, and storage medium to solve the technical problems of low efficiency or inability to reflect a consensus mechanism when governing the consortium chain in related technologies.
第一方面,本申请实施例提供了一种联盟链的治理方法,所述方法包括:设置多个智能合约,其中,所述多个智能合约中每个智能合约对应联盟成员治理联盟链的一套决策逻辑;触发用于治理所述联盟链的治理请求;根据所述治理请求选择目标智能合约,并采用所述目标智能合约生成治理决策结果。In the first aspect, an embodiment of the present application provides a governance method for a consortium chain, the method includes: setting a plurality of smart contracts, wherein each smart contract in the plurality of smart contracts corresponds to one of the alliance members governing the alliance chain Set of decision logic; trigger a governance request for governance of the alliance chain; select a target smart contract according to the governance request, and use the target smart contract to generate governance decision results.
第二方面,本申请实施例提供了一种联盟链的治理装置,所述装置包括:设置模块,用于设置多个智能合约,其中,所述多个智能合约中每个智能合约对应联盟成员治理联盟链的一套决策逻辑;触发模块,用于触发用于治理 所述联盟链的治理请求;治理模块,用于根据所述治理请求选择目标智能合约,并采用所述目标智能合约生成治理决策结果。In the second aspect, an embodiment of the present application provides a management device for a consortium chain, the device includes: a setting module for setting multiple smart contracts, wherein each smart contract in the multiple smart contracts corresponds to a member of the alliance A set of decision logic for governing the alliance chain; a trigger module for triggering a governance request for governing the alliance chain; a governance module for selecting a target smart contract according to the governance request, and using the target smart contract to generate governance Decision results.
第三方面,本申请还提供了一种计算机设备,所述计算机设备包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现一种联盟链的治理方法,所述方法包括:设置多个智能合约,其中,所述多个智能合约中每个智能合约对应联盟成员治理联盟链的一套决策逻辑;触发用于治理所述联盟链的治理请求;根据所述治理请求选择目标智能合约,并采用所述目标智能合约生成治理决策结果。In a third aspect, the present application also provides a computer device, the computer device including a memory, a processor, and a computer program stored in the memory and running on the processor. The processor implements a computer program when the program is executed. A governance method for an alliance chain, the method includes: setting a plurality of smart contracts, wherein each smart contract in the plurality of smart contracts corresponds to a set of decision logic for alliance members to govern the alliance chain; triggering is used to govern the alliance The governance request of the chain; select the target smart contract according to the governance request, and use the target smart contract to generate the governance decision result.
第四方面,本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现一种联盟链的治理方法,所述方法包括:设置多个智能合约,其中,所述多个智能合约中每个智能合约对应联盟成员治理联盟链的一套决策逻辑;触发用于治理所述联盟链的治理请求;根据所述治理请求选择目标智能合约,并采用所述目标智能合约生成治理决策结果。In a fourth aspect, the present application also provides a computer-readable storage medium with a computer program stored on the computer-readable storage medium. When the computer program is executed by a processor, a method for managing a consortium chain is implemented. Including: setting multiple smart contracts, wherein each smart contract in the multiple smart contracts corresponds to a set of decision logic for alliance members to govern the alliance chain; triggering a governance request for governing the alliance chain; according to the governance request Select the target smart contract, and use the target smart contract to generate governance decision results.
通过本申请,通过设置用于治理用途的智能合约进行联盟链的治理,联盟链治理过程可以实现高度自动化,可以实现复杂的治理策略,更容易达成基于治理策略的共识。解决了相关技术中治理联盟链时效率低或者不能体现共识机制的技术问题,依据智能合约的自动执行机制和联盟链的共识机制,就能自动完成联盟的治理共识达成,整个治理的过程不需要联盟的管理方或其他参与方的人工参与。Through this application, by setting up smart contracts for governance purposes to govern the alliance chain, the alliance chain governance process can be highly automated, complex governance strategies can be realized, and consensus based on governance strategies can be reached more easily. It solves the technical problems of low efficiency or inability to reflect the consensus mechanism in the governance of the alliance chain in related technologies. According to the automatic execution mechanism of the smart contract and the consensus mechanism of the alliance chain, the governance consensus of the alliance can be reached automatically, and the entire governance process does not need Manual participation by the management party of the alliance or other participants.
【附图说明】【Explanation of drawings】
图1是本申请实施例的一种联盟链的治理的服务器的硬件结构框图;Figure 1 is a block diagram of the hardware structure of a consortium chain governance server according to an embodiment of the present application;
图2是根据本申请实施例的联盟链的治理方法的流程图;Fig. 2 is a flowchart of a governance method for a consortium chain according to an embodiment of the application;
图3是本申请实施例的联盟链的应用示意图;FIG. 3 is a schematic diagram of the application of the alliance chain in an embodiment of the present application;
图4是本申请实施例采用指定智能合约生成治理决策结果的流程图;Figure 4 is a flow chart of the application of the specified smart contract to generate governance decision results;
图5是根据本申请实施例的联盟链的治理装置的结构框图。Fig. 5 is a structural block diagram of a management device of a consortium chain according to an embodiment of the present application.
【具体实施方式】【Detailed ways】
实施例1Example 1
本申请实施例一所提供的方法实施例可以在服务器、计算机终端或者类似的运算装置中执行。以运行在服务器上为例,图1是本申请实施例的一种联盟链的治理的服务器的硬件结构框图。如图1所示,服务器10可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和用于存储数据的存储器104,可选地,上述服务器还可以包括用于通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意, 其并不对上述服务器的结构造成限定。例如,服务器10还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。The method embodiment provided in Embodiment 1 of the present application may be executed in a server, a computer terminal or a similar computing device. Taking running on a server as an example, FIG. 1 is a hardware structure block diagram of a server for managing a consortium chain in an embodiment of the present application. As shown in FIG. 1, the server 10 may include one or more (only one is shown in FIG. 1) processor 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) And the memory 104 for storing data. Optionally, the aforementioned server may also include a transmission device 106 and an input/output device 108 for communication functions. A person of ordinary skill in the art can understand that the structure shown in FIG. 1 is only for illustration, and it does not limit the structure of the foregoing server. For example, the server 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration from that shown in FIG.
存储器104可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本申请实施例中的联盟链的治理方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至服务器10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as the computer programs corresponding to the management method of the alliance chain in the embodiment of the present application. The processor 102 runs the computer programs stored in the memory 104, thereby Perform various functional applications and data processing, that is, realize the above-mentioned methods. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the storage 104 may further include storage remotely provided with respect to the processor 102, and these remote storages may be connected to the server 10 through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
传输装置106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括服务器10的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。The transmission device 106 is used to receive or send data via a network. The foregoing specific examples of the network may include a wireless network provided by the communication provider of the server 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC for short), which can be connected to other network devices through a base station to communicate with the Internet. In an example, the transmission device 106 may be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet in a wireless manner.
在本实施例中提供了一种联盟链的治理方法,图2是根据本申请实施例的联盟链的治理方法的流程图,如图2所示,该流程包括如下步骤:In this embodiment, a governance method for a consortium chain is provided. FIG. 2 is a flowchart of the governance method for a consortium chain according to an embodiment of the present application. As shown in FIG. 2, the process includes the following steps:
步骤S202,设置多个智能合约,其中,所述多个智能合约中每个智能合约对应联盟成员治理联盟链的一套决策逻辑;Step S202, setting a plurality of smart contracts, wherein each smart contract in the plurality of smart contracts corresponds to a set of decision logic for alliance members to govern the alliance chain;
本实施例的多个智能合约包括一套通用的智能合约和至少一套特定的智能合约,对应的,在设置联盟链的智能合约时,会给每个联盟成员设置一套通用的智能合约和至少一套特定的智能合约,在对应的场景下,执行一套或多套智能合约。The multiple smart contracts in this embodiment include a set of general smart contracts and at least one set of specific smart contracts. Correspondingly, when setting up the smart contract of the alliance chain, each alliance member will be provided with a set of general smart contracts and At least one set of specific smart contracts will execute one or more sets of smart contracts in corresponding scenarios.
步骤S204,触发用于治理所述联盟链的治理请求;Step S204, triggering a governance request for governance of the alliance chain;
在不同的触发条件下,触发不同的治理请求,在请求对象或者治理对象不同时,触发的治理请求也有可能不同。Under different trigger conditions, different governance requests are triggered. When the request object or governance object is different, the triggered governance request may also be different.
步骤S206,根据所述治理请求选择目标智能合约,并采用所述目标智能合约生成治理决策结果。Step S206: Select a target smart contract according to the governance request, and use the target smart contract to generate a governance decision result.
通过本实施例的方案,通过设置用于治理用途的智能合约进行联盟链的治理,联盟链治理过程可以实现高度自动化,可以实现复杂的治理策略,更容易达成基于治理策略的共识。解决了相关技术中治理联盟链时效率低或者不能体现共识机制的技术问题,依据智能合约的自动执行机制和联盟链的共识机制,就能自动完成联盟的治理共识达成,整个治理的过程不需要联盟的管理方或其他参与方的人工参与。Through the solution of this embodiment, by setting up smart contracts for governance purposes to govern the alliance chain, the alliance chain governance process can be highly automated, complex governance strategies can be realized, and consensus based on governance strategies can be reached more easily. It solves the technical problems of low efficiency or inability to reflect the consensus mechanism in the governance of the alliance chain in related technologies. According to the automatic execution mechanism of the smart contract and the consensus mechanism of the alliance chain, the governance consensus of the alliance can be reached automatically, and the entire governance process does not need Manual participation by the management party of the alliance or other participants.
联盟区块链的使用的群体包括银行、保险、证券、商业协会、集团企业及上下游企业。区块链诞生于移动互联网时代,这些企业普遍己经IT化和互联网化,区块链对于进一步提升他们圈子的产业链条中的公证、结算清算业 务和价值交换网络的效率很有帮助,但是在尝试使用现有区块链技术(如比特币代码家族和以太坊)发现,现有区块链的处理性能、隐私保护、合规性等都不能满足他们的业务需求。图3是本申请实施例的联盟链的应用示意图,应用在证券相关的机构。The groups used by the alliance blockchain include banks, insurance, securities, business associations, group companies, and upstream and downstream companies. Blockchain was born in the era of mobile Internet. These companies have generally been IT-based and Internet-based. Blockchain is very helpful to further improve the efficiency of notarization, settlement and clearing business and value exchange network in the industrial chain of their circle. Trying to use existing blockchain technologies (such as the Bitcoin code family and Ethereum) found that the processing performance, privacy protection, and compliance of the existing blockchain cannot meet their business needs. FIG. 3 is a schematic diagram of the application of the alliance chain of the embodiment of the present application, which is applied to securities-related institutions.
本实施例的设置多个智能合约包括:为联盟链上的联盟成员设置通用的第一智能合约,以及为联盟链上的每个联盟成员设置特定的第二智能合约,其中,所述第一智能合约对应第一治理功能,所述第二智能合约对应第二治理功能,所述联盟链由多个所述联盟成员组成。The setting of multiple smart contracts in this embodiment includes: setting a universal first smart contract for alliance members on the alliance chain, and setting a specific second smart contract for each alliance member on the alliance chain, where the first The smart contract corresponds to the first governance function, the second smart contract corresponds to the second governance function, and the alliance chain is composed of multiple alliance members.
在本实施例的一种实施方式中,可以把治理智能合约实现为一种系统的智能合约,系统中的每个节点都安装,在联盟的网络搭建过程中,每个联盟节点安装该智能合约,实现在系统级别对该智能合约的属性(比如背书策略)进行统一配置。In an implementation of this embodiment, the governance smart contract can be implemented as a system smart contract. Each node in the system is installed. During the network construction of the alliance, each alliance node installs the smart contract , Realize the unified configuration of the attributes of the smart contract (such as endorsement strategy) at the system level.
作为本实施例的一个应用场景,在联盟链技术中(比如超级账本Fabric),调用智能合约的交易流程如下:As an application scenario of this embodiment, in consortium chain technology (such as Hyperledger Fabric), the transaction process for invoking smart contracts is as follows:
交易客户端提交交易提案(transaction proposal)到联盟网络中的多个背书节点(背书节点是网络节点的一种,用于模拟执行智能合约,并向交易客户端反馈智能合约执行结果);背书节点模拟执行智能合约,并向交易客户端反馈智能合约执行结果;交易客户端将交易提案以及从各个背书节点收集到的执行结果打包成一个交易请求,发送给共识节点进行排序共识;共识节点按照一定规则对接收到的交易进行打包出块,并把区块广播给网络中的记账节点;记账节点收到区块后,会对区块中的交易进行验证。验证中的其中一步就是去验证这个交易的背书结果是否满足这个智能合约相关的背书策略,只有满足背书策略的交易才能被认为是有效的,对应的状态改变才会写入账本状态数据库。The transaction client submits a transaction proposal to multiple endorsement nodes in the alliance network (the endorsement node is a type of network node used to simulate the execution of smart contracts and feed back the execution results of the smart contract to the transaction client); endorsement nodes Simulate the execution of the smart contract and feed back the execution result of the smart contract to the transaction client; the transaction client packages the transaction proposal and the execution results collected from each endorsement node into a transaction request, and sends it to the consensus node for sorting consensus; the consensus node is The rules pack the received transactions into blocks, and broadcast the blocks to the accounting nodes in the network; after the accounting nodes receive the blocks, they will verify the transactions in the blocks. One of the steps in the verification is to verify whether the endorsement result of this transaction satisfies the endorsement strategy related to this smart contract. Only transactions that meet the endorsement strategy can be considered valid, and the corresponding state changes will be written into the ledger status database.
本实施例中的智能合约的背书策略是一种可配置的策略或规则,智能合约的执行结果需要取得背书节点的背书才能生效,在背书节点验证通过的情况下,才能为其背书。The endorsement strategy of the smart contract in this embodiment is a configurable strategy or rule. The execution result of the smart contract needs to obtain the endorsement of the endorsing node to be effective, and the endorsement can be endorsed only when the endorsing node is verified.
对于联盟链的治理来说,可以把治理的功能设计成一种特殊的智能合约(可以称之为治理智能合约),在该智能合约中,包括治理决策逻辑;这个智能合约的背书策略设置成联盟成员约定的治理策略,治理策略可以是:需要超过多数成员同意,或者至少需要某些特定成员同意,又或者需要成员全部同意,等等。这样联盟治理的过程,可以转变成执行一个智能合约的交易过程,这个交易的最终结果会依赖于预先指定的背书策略(也即治理策略)。For the governance of the alliance chain, the governance function can be designed as a special smart contract (which can be called a governance smart contract). The smart contract includes the governance decision logic; the endorsement strategy of this smart contract is set to the alliance The governance strategy agreed by the members, the governance strategy can be: the agreement of more than the majority of the members is required, or at least the agreement of some specific members is required, or the agreement of all members is required, and so on. In this way, the process of alliance governance can be transformed into a transaction process of executing a smart contract, and the final result of this transaction will depend on the pre-designated endorsement strategy (that is, the governance strategy).
本实施例的触发条件包括:联盟成员准入、子链成员准入、应用智能合约的验证准入;可以根据不同的触发条件触发不同类型的智能合约,不同类型的智能合约对应不同的治理决策逻辑,每一套治理决策逻辑对应一种治理需求,触发用于治理所述联盟链的治理请求可以但不限于为:在联盟成员准入的触发条件下,触发用于治理联盟链的第一治理请求;在子链成员准入的 触发条件下,触发用于治理联盟链的第二治理请求,其中,所述联盟链包括一个或多个子链,所述子链成员是任一所述子链上的区块链节点;在应用智能合约的验证准入的触发条件下,触发用于治理联盟链的第三治理请求。The trigger conditions of this embodiment include: alliance member admission, sub-chain member admission, and application smart contract verification admission; different types of smart contracts can be triggered according to different trigger conditions, and different types of smart contracts correspond to different governance decisions Logic, each set of governance decision logic corresponds to a governance requirement. The governance request used to govern the alliance chain can be triggered but not limited to: under the trigger condition of the admission of alliance members, trigger the first one used to govern the alliance chain Governance request; Trigger a second governance request for governing the consortium chain under the triggering condition of the access of the sub-chain members, wherein the consortium chain includes one or more sub-chains, and the sub-chain members are any of the sub-chains. The blockchain node on the chain; triggers the third governance request for governance of the alliance chain under the triggering condition of the verification access of the application of the smart contract.
本实施例的治理智能合约内部的治理决策逻辑可以基于系统自定义的规则,即每个联盟成员作为验证节点的决策逻辑,比如成员白名单或黑名单,特定代码验证逻辑等等;或者基于目前链上的数据进行某种自动决策,这些系统定义的规则以链上数据的形式存放于区块链上,在治理智能合约执行时从链上读取然后基于这些规则数据进行治理决策。The governance decision logic inside the governance smart contract of this embodiment can be based on system-defined rules, that is, the decision logic of each alliance member as a verification node, such as member whitelist or blacklist, specific code verification logic, etc.; or based on current The data on the chain makes certain automatic decisions. The rules defined by these systems are stored on the blockchain in the form of data on the chain, and are read from the chain when the governance smart contract is executed, and then governance decisions are made based on these rules and data.
在一个实施方式中,在所述指定智能合约的决策逻辑为白名单或黑名单时,根据所述治理请求选择目标智能合约,并采用所述目标智能合约生成治理决策结果包括:In one embodiment, when the decision logic of the designated smart contract is a whitelist or a blacklist, selecting a target smart contract according to the governance request, and using the target smart contract to generate a governance decision result includes:
S11,在所述治理请求为待接入所述联盟链的目标成员触发的所述第一治理请求或第二治理请求时,根据预定映射关系选择决策逻辑为白名单或者黑名单的目标智能合约,其中,所述目标成员包括触发所述第一治理请求的联盟成员或触发所述第二治理请求的子链成员;S11: When the governance request is the first governance request or the second governance request triggered by the target member to be connected to the alliance chain, select the target smart contract whose decision logic is a whitelist or a blacklist according to a predetermined mapping relationship , Wherein the target member includes an alliance member that triggered the first governance request or a sub-chain member that triggered the second governance request;
S12,根据白名单条目或黑名单条目判断所述目标成员是否可信;S12, judging whether the target member is credible according to the whitelist entry or the blacklist entry;
S13,在白名单条目包括所述目标成员或黑名单条目不包括所述目标成员时,确定所述目标成员可信,并向所述联盟链的共识节点反馈用于指示所述目标成员可信的响应消息,以使所述共识节点根据多个联盟成员的响应消息生成治理决策结果。S13: When the whitelist entry includes the target member or the blacklist entry does not include the target member, determine that the target member is credible, and feed back to the consensus node of the alliance chain to indicate that the target member is credible Response message to enable the consensus node to generate governance decision results according to the response messages of multiple alliance members.
在另一个实施方式中,在所述指定智能合约的决策逻辑为特定代码验证逻辑时,根据所述治理请求选择目标智能合约,并采用所述目标智能合约生成治理决策结果包括:In another embodiment, when the decision logic of the designated smart contract is a specific code verification logic, selecting a target smart contract according to the governance request, and using the target smart contract to generate a governance decision result includes:
S21,在所述治理请求为应用智能合约的验证准入触发的所述第三治理请求时,根据预定映射关系选择决策逻辑为特定代码验证的目标智能合约;S21, when the governance request is the third governance request triggered by the verification admission of the application smart contract, select the target smart contract whose decision logic is a specific code verification according to a predetermined mapping relationship;
S22,向待验证的目标成员发送验证消息;S22: Send a verification message to the target member to be verified;
S23,接收所述目标成员反馈的响应消息;S23: Receive a response message fed back by the target member;
S24,解析所述响应消息,在所述响应消息中携带代表身份的约定代码时,向所述联盟链的共识节点反馈用于指示所述目标成员可信的响应消息,以使所述共识节点根据多个联盟成员的响应消息生成治理决策结果。S24. Parse the response message, and when the response message carries the agreed code representing the identity, feed back to the consensus node of the alliance chain a response message indicating that the target member is credible, so that the consensus node Generate governance decision results based on response messages from multiple alliance members.
可选的,所述共识节点根据多个联盟成员的响应消息生成治理决策结果包括以下之一:在接收到超过多数联盟成员的用于指示所述目标成员可信的响应消息时,生成同意的治理决策结果;在接收到多个特定联盟成员的用于指示所述目标成员可信的响应消息时,生成同意的治理决策结果;在接收到全部联盟成员的用于指示所述目标成员可信的响应消息时,生成同意的治理决策结果。Optionally, generating the governance decision result by the consensus node according to the response messages of multiple alliance members includes one of the following: when receiving response messages from more than a majority of alliance members indicating that the target member is trustworthy, generating an agreed Governance decision result; when a response message indicating that the target member is credible is received from a plurality of specific alliance members, generate an agreed governance decision result; when all alliance members are received, it is used to indicate that the target member is credible In response to the message, the agreed governance decision result is generated.
本实施例的一个实施方式中,智能合约包括通用治理智能合约和特定治理智能合约,两者本质上都是治理智能合约,只是实现上的不同选择。对于 通用治理智能合约,在其中包含所有支持的治理功能及其治理决策逻辑,比如,联盟成员准入、子链成员准入以及应用智能合约的验证;而对于特定治理智能合约,只包含某种特定的治理功能及其治理决策逻辑,比如联盟成员准入。不同的治理功能都有对应的治理智能合约。如果采用通用治理智能合约的方式,实施上相对简单,管理相对方便,但是不如特定治理智能合约灵活,比如不能针对不同的治理功能设定不同的治理策略。另外,如果后面要支持新的治理功能的话,需要升级之前的通用智能合约以包括新的治理功能。但对于特定治理智能合约,可以创建并配置一个针对新治理功能的智能合约即可。In an implementation of this embodiment, the smart contract includes a general governance smart contract and a specific governance smart contract, both of which are essentially governance smart contracts, but are just different choices in implementation. For the general governance smart contract, it contains all the supported governance functions and their governance decision logic, such as the admission of alliance members, the admission of sub-chain members, and the verification of application smart contracts; while for specific governance smart contracts, only certain types of Specific governance functions and their governance decision logic, such as the admission of alliance members. Different governance functions have corresponding governance smart contracts. If the general governance smart contract is adopted, the implementation is relatively simple and the management is relatively convenient, but it is not as flexible as the specific governance smart contract. For example, different governance strategies cannot be set for different governance functions. In addition, if new governance functions are to be supported later, the previous general smart contract needs to be upgraded to include the new governance functions. But for a specific governance smart contract, you can create and configure a smart contract for the new governance function.
在采用智能合约进行治理决策时,除了依据系统通用的规则数据外,也可以配置联盟成员各自的规则数据(比如,每个联盟成员可以设置自己的白名单或黑名单),这些联盟成员特定的规则数据也存放于链上,并对应于联盟的成员身份ID,不同的联盟对应不同的规则数据。当执行治理智能合约时,先判断成员身份,然后根据成员身份去读取该成员对应的特定规则数据来进行治理决策。When using smart contracts to make governance decisions, in addition to the general rule data of the system, the respective rule data of the alliance members can also be configured (for example, each alliance member can set its own whitelist or blacklist), and these alliance members are specific The rule data is also stored on the chain and corresponds to the membership ID of the alliance. Different alliances correspond to different rule data. When the governance smart contract is executed, the membership is first judged, and then the specific rule data corresponding to the member is read according to the membership to make governance decisions.
图4是本申请实施例采用指定智能合约生成治理决策结果的流程图,在所述目标智能合约包括一个第一智能合约和多个第二智能合约时,采用所述目标智能合约生成治理决策结果包括:Fig. 4 is a flow chart of an embodiment of the application using a designated smart contract to generate governance decision results. When the target smart contract includes a first smart contract and multiple second smart contracts, the target smart contract is used to generate governance decision results include:
S402,触发多个联盟成员执行对应的第二智能合约,生成多个第一决策结果;S402: Trigger multiple alliance members to execute corresponding second smart contracts to generate multiple first decision results;
由于每个联盟成员对应的第二智能合约不同,因此其生成的第一决策结果也有可能不同,如在联盟成员准入的场景中,a,b,c三个联盟成员生成第一决策结果分别为:准入,不准入,准入;Since the second smart contract corresponding to each alliance member is different, the first decision result generated by it may also be different. For example, in the scenario where the alliance member enters, the three alliance members a, b, and c generate the first decision result respectively For: access, no access, access;
S404,将所述多个第一决策结果作为所述第一智能合约的输入数据,得到所述第一智能合约的输出数据;S404, using the multiple first decision results as input data of the first smart contract to obtain output data of the first smart contract;
根据上述示例,将上述a,b,c三个联盟成员生成的第一决策结果输入第一智能合约进行决策,如第一智能合约采用多数同意即通过的决策逻辑,则最终的治理决策结果为准入;According to the above example, the first decision result generated by the above three alliance members a, b, and c is input into the first smart contract for decision-making. If the first smart contract adopts the decision logic of majority consent, the final governance decision result is Access
S406,将所述输出数据确定为所述治理决策结果。S406: Determine the output data as the governance decision result.
在治理智能合约中,除了采用通用的治理决策逻辑,也可以针对不同的联盟成员采用不同的治理决策逻辑,分别在不同的触发场景下触发智能合约;在另一个实施例场景中,治理决策逻辑包含两部分,一部分是通用的治理决策逻辑,另一部分是联盟成员各自独立的治理决策逻辑,一种可能的实现是,联盟链里除了配置适用于每个联盟成员的系统级别的治理智能合约(假设为A,通用的治理决策逻辑),也可以让每个联盟成员配置自己特定的治理智能合约(假设为B),在B中包含是该联盟成员特定的治理决策逻辑,在进行联盟治理时,每个联盟成员先执行治理智能合约B,并将治理决策的结果(R1)存放于链上;然后将治理决策结果R1作为治理智能合约A的一个输入数据,执行治理 智能合约A并得到相应的治理决策结果。In the governance smart contract, in addition to the general governance decision logic, different governance decision logics can also be used for different alliance members to trigger the smart contract in different trigger scenarios; in another embodiment scenario, the governance decision logic It consists of two parts, one is the general governance decision logic, and the other is the independent governance decision logic of the alliance members. One possible realization is that in addition to configuring the system-level governance smart contract applicable to each alliance member in the alliance chain ( Assuming A, general governance decision logic), each alliance member can also configure its own specific governance smart contract (assuming B), and B contains the specific governance decision logic of the alliance member. When conducting alliance governance , Each alliance member first executes the governance smart contract B, and stores the result of the governance decision (R1) on the chain; then uses the governance decision result R1 as an input data for the governance smart contract A, executes the governance smart contract A and gets the corresponding Results of governance decisions.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is Better implementation. Based on this understanding, the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to enable a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the method described in each embodiment of the present application.
实施例2Example 2
在本实施例中还提供了一种联盟链的治理装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a consortium chain management device is also provided, which is used to implement the above-mentioned embodiments and preferred implementations, and what has been described will not be repeated. As used below, the term "module" can implement a combination of software and/or hardware with predetermined functions. Although the devices described in the following embodiments are preferably implemented by software, hardware or a combination of software and hardware is also possible and conceived.
图5是根据本申请实施例的联盟链的治理装置的结构框图,如图5所示,该装置包括:Fig. 5 is a structural block diagram of a management device for a consortium chain according to an embodiment of the present application. As shown in Fig. 5, the device includes:
设置模块50,用于设置多个智能合约,其中,所述多个智能合约中每个智能合约对应联盟成员治理联盟链的一套决策逻辑;The setting module 50 is used to set multiple smart contracts, where each smart contract in the multiple smart contracts corresponds to a set of decision logic for alliance members to govern the alliance chain;
触发模块52,用于触发用于治理所述联盟链的治理请求;The triggering module 52 is used to trigger a governance request for managing the alliance chain;
治理模块54,用于根据所述治理请求选择目标智能合约,并采用所述目标智能合约生成治理决策结果。The governance module 54 is configured to select a target smart contract according to the governance request, and use the target smart contract to generate governance decision results.
可选的,所述设置模块包括:设置单元,用于为联盟链上的联盟成员设置通用的第一智能合约,以及为联盟链上的每个联盟成员设置特定的第二智能合约,其中,所述第一智能合约对应第一治理功能,所述第二智能合约对应第二治理功能,所述联盟链由多个所述联盟成员组成。Optionally, the setting module includes: a setting unit for setting a universal first smart contract for alliance members on the alliance chain, and setting a specific second smart contract for each alliance member on the alliance chain, where: The first smart contract corresponds to a first governance function, the second smart contract corresponds to a second governance function, and the alliance chain is composed of multiple alliance members.
可选的,所述触发模块包括以下之一:第一触发单元,用于在联盟成员准入的触发条件下,触发用于治理联盟链的第一治理请求;第二触发单元,用于在子链成员准入的触发条件下,触发用于治理联盟链的第二治理请求,其中,所述联盟链包括一个或多个子链,所述子链成员是任一所述子链上的区块链节点;第三触发单元,用于在应用智能合约的验证准入的触发条件下,触发用于治理联盟链的第三治理请求。Optionally, the trigger module includes one of the following: a first trigger unit, which is used to trigger a first governance request for governing the alliance chain under the triggering condition of admission of alliance members; and a second trigger unit, which is used to Under the triggering condition of the access of the sub-chain members, the second governance request for governing the consortium chain is triggered, wherein the consortium chain includes one or more sub-chains, and the sub-chain members are areas on any of the sub-chains. Block chain node; the third trigger unit is used to trigger the third governance request for governing the alliance chain under the triggering condition of the verification admission of the application smart contract.
可选的,所述治理模块包括:第一选择单元,用于在所述治理请求为待接入所述联盟链的目标成员触发的所述第一治理请求或第二治理请求时,根据预定映射关系选择决策逻辑为白名单或者黑名单的目标智能合约,其中,所述目标成员包括触发所述第一治理请求的联盟成员或触发所述第二治理请求的子链成员;判断单元,用于根据白名单条目或黑名单条目判断所述目标成员是否可信;第一治理单元,用于在白名单条目包括所述目标成员或黑名单条目不包括所述目标成员时,确定所述目标成员可信,并向所述联盟链的 共识节点反馈用于指示所述目标成员可信的响应消息,以使所述共识节点根据多个联盟成员的响应消息生成治理决策结果。Optionally, the governance module includes: a first selection unit, configured to, when the governance request is the first governance request or the second governance request triggered by the target member to be connected to the alliance chain, according to a predetermined The mapping relationship selection decision logic is a whitelist or blacklist target smart contract, where the target member includes the alliance member that triggers the first governance request or the sub-chain member that triggers the second governance request; the judgment unit uses In determining whether the target member is credible according to a whitelist entry or a blacklist entry; the first governance unit is used to determine the target when the whitelist entry includes the target member or the blacklist entry does not include the target member The members are credible, and feedback a response message indicating that the target member is credible to the consensus node of the alliance chain, so that the consensus node generates governance decision results according to the response messages of multiple alliance members.
可选的,所述治理模块包括:第二选择单元,用于在所述治理请求为应用智能合约的验证准入触发的所述第三治理请求时,根据预定映射关系选择决策逻辑为特定代码验证的目标智能合约;发送单元,用于向待验证的目标成员发送验证消息;接收单元,用于接收所述目标成员反馈的响应消息;第二治理单元,用于解析所述响应消息,在所述响应消息中携带代表身份的约定代码时,向所述联盟链的共识节点反馈用于指示所述目标成员可信的响应消息,以使所述共识节点根据多个联盟成员的响应消息生成治理决策结果。Optionally, the governance module includes: a second selection unit, configured to select the decision logic as a specific code according to a predetermined mapping relationship when the governance request is the third governance request triggered by the verification admission of the application smart contract The verified target smart contract; the sending unit is used to send a verification message to the target member to be verified; the receiving unit is used to receive the response message fed back by the target member; the second management unit is used to parse the response message, in When the response message carries the agreed code representing the identity, a response message used to indicate the credibility of the target member is fed back to the consensus node of the alliance chain, so that the consensus node generates a response message based on multiple alliance members Results of governance decisions.
可选的,所述共识节点根据多个联盟成员的响应消息生成治理决策结果包括以下之一:在接收到超过多数联盟成员的用于指示所述目标成员可信的响应消息时,生成同意的治理决策结果;在接收到多个特定联盟成员的用于指示所述目标成员可信的响应消息时,生成同意的治理决策结果;在接收到全部联盟成员的用于指示所述目标成员可信的响应消息时,生成同意的治理决策结果。Optionally, generating the governance decision result by the consensus node according to the response messages of multiple alliance members includes one of the following: when receiving response messages from more than a majority of alliance members indicating that the target member is trustworthy, generating an agreed Governance decision result; when a response message indicating that the target member is credible is received from a plurality of specific alliance members, generate an agreed governance decision result; when all alliance members are received, it is used to indicate that the target member is credible In response to the message, the agreed governance decision result is generated.
可选的,在所述目标智能合约包括一个第一智能合约和多个第二智能合约时,所述治理模块包括:第一生成单元,用于触发多个联盟成员执行对应的第二智能合约,生成多个第一决策结果;第二生成单元,用于将所述多个第一决策结果作为所述第一智能合约的输入数据,得到所述第一智能合约的输出数据;第三治理单元,用于将所述输出数据确定为所述治理决策结果。Optionally, when the target smart contract includes a first smart contract and multiple second smart contracts, the governance module includes: a first generation unit for triggering multiple alliance members to execute the corresponding second smart contract , Generate multiple first decision results; a second generation unit, used to use the multiple first decision results as the input data of the first smart contract to obtain the output data of the first smart contract; third governance The unit is used to determine the output data as the governance decision result.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that each of the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following manner, but not limited to this: the above modules are all located in the same processor; or, the above modules are combined in any combination The forms are located in different processors.
实施例3Example 3
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined Or it can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件 功能单元的形式实现。In addition, the functional units in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be realized in the form of hardware, or in the form of hardware plus software functional unit.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机装置(可以是个人计算机,服务器,或者网络装置等)或处理器(Processor)执行本申请各个实施例所述方法的部分步骤。计算机可读存储介质可以是非易失性,也可以是易失性,包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (Processor) execute the method described in each embodiment of the present application Part of the steps. The computer-readable storage medium can be non-volatile or volatile, including: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), Various media that can store program codes such as magnetic disks or optical disks.
本申请的实施例还提供了一种存储介质,该存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。The embodiment of the present application also provides a storage medium in which a computer program is stored, wherein the computer program is configured to execute the steps in any of the foregoing method embodiments when running.
可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的计算机程序:Optionally, in this embodiment, the foregoing storage medium may be configured to store a computer program for executing the following steps:
S1,设置多个智能合约,其中,所述多个智能合约中每个智能合约对应联盟成员治理联盟链的一套决策逻辑;S1. Set up multiple smart contracts, wherein each smart contract in the multiple smart contracts corresponds to a set of decision logic for alliance members to govern the alliance chain;
S2,触发用于治理所述联盟链的治理请求;S2, trigger a governance request for governance of the alliance chain;
S3,根据所述治理请求选择目标智能合约,并采用所述目标智能合约生成治理决策结果。S3: Select a target smart contract according to the governance request, and use the target smart contract to generate a governance decision result.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。Optionally, in this embodiment, the foregoing storage medium may include, but is not limited to: U disk, Read-Only Memory (Read-Only Memory, ROM for short), Random Access Memory (Random Access Memory, RAM for short), Various media that can store computer programs, such as mobile hard disks, magnetic disks, or optical disks.
本申请的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。The embodiment of the present application also provides an electronic device, including a memory and a processor, the memory is stored with a computer program, and the processor is configured to run the computer program to execute the steps in any of the foregoing method embodiments.
可选地,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。Optionally, the aforementioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the aforementioned processor, and the input-output device is connected to the aforementioned processor.
可选地,在本实施例中,上述处理器可以被设置为通过计算机程序执行以下步骤:Optionally, in this embodiment, the foregoing processor may be configured to execute the following steps through a computer program:
S1,设置多个智能合约,其中,所述多个智能合约中每个智能合约对应联盟成员治理联盟链的一套决策逻辑;S1. Set up multiple smart contracts, wherein each smart contract in the multiple smart contracts corresponds to a set of decision logic for alliance members to govern the alliance chain;
S2,触发用于治理所述联盟链的治理请求;S2, trigger a governance request for governance of the alliance chain;
S3,根据所述治理请求选择目标智能合约,并采用所述目标智能合约生成治理决策结果。S3: Select a target smart contract according to the governance request, and use the target smart contract to generate a governance decision result.
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。The above are only the preferred embodiments of this application and are not intended to limit this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in this application Within the scope of protection.

Claims (19)

  1. 一种联盟链的治理方法,所述方法包括:A governance method of alliance chain, the method includes:
    设置多个智能合约,其中,所述多个智能合约中每个智能合约对应联盟成员治理联盟链的一套决策逻辑;Setting a plurality of smart contracts, wherein each smart contract in the plurality of smart contracts corresponds to a set of decision logic for alliance members to govern the alliance chain;
    触发用于治理所述联盟链的治理请求;Trigger a governance request for governance of the alliance chain;
    根据所述治理请求选择目标智能合约,并采用所述目标智能合约生成治理决策结果。Select a target smart contract according to the governance request, and use the target smart contract to generate governance decision results.
  2. 根据权利要求1所述的方法,设置多个智能合约包括:According to the method of claim 1, setting a plurality of smart contracts includes:
    为联盟链上的联盟成员设置通用的第一智能合约,以及为联盟链上的每个联盟成员设置特定的第二智能合约,其中,所述第一智能合约对应第一治理功能,所述第二智能合约对应第二治理功能,所述联盟链由多个所述联盟成员组成。Set a universal first smart contract for alliance members on the alliance chain, and set a specific second smart contract for each alliance member on the alliance chain, where the first smart contract corresponds to the first governance function, and the first The second smart contract corresponds to the second governance function, and the alliance chain is composed of multiple alliance members.
  3. 根据权利要求1所述的方法,触发用于治理所述联盟链的治理请求包括以下之一:According to the method of claim 1, triggering a governance request for governance of the alliance chain includes one of the following:
    在联盟成员准入的触发条件下,触发用于治理联盟链的第一治理请求;Trigger the first governance request for governance of the alliance chain under the triggering condition of the admission of the alliance members;
    在子链成员准入的触发条件下,触发用于治理联盟链的第二治理请求,其中,所述联盟链包括一个或多个子链,所述子链成员是任一所述子链上的区块链节点;Under the triggering condition of the access of the sub-chain members, trigger the second governance request for governing the consortium chain, where the consortium chain includes one or more sub-chains, and the sub-chain members are on any one of the sub-chains. Blockchain node;
    在应用智能合约的验证准入的触发条件下,触发用于治理联盟链的第三治理请求。Under the triggering condition of the verification admission of the application smart contract, the third governance request for governance of the alliance chain is triggered.
  4. 根据权利要求3所述的方法,根据所述治理请求选择目标智能合约,并采用所述目标智能合约生成治理决策结果包括:According to the method of claim 3, selecting a target smart contract according to the governance request, and using the target smart contract to generate a governance decision result includes:
    在所述治理请求为待接入所述联盟链的目标成员触发的所述第一治理请求或第二治理请求时,根据预定映射关系选择决策逻辑为白名单或者黑名单的目标智能合约,其中,所述目标成员包括触发所述第一治理请求的联盟成员或触发所述第二治理请求的子链成员;When the governance request is the first governance request or the second governance request triggered by the target member to be connected to the alliance chain, a target smart contract whose decision logic is a whitelist or a blacklist is selected according to a predetermined mapping relationship, where , The target member includes the alliance member that triggered the first governance request or the sub-chain member that triggered the second governance request;
    根据白名单条目或黑名单条目判断所述目标成员是否可信;Judging whether the target member is credible according to the whitelist entry or the blacklist entry;
    在白名单条目包括所述目标成员或黑名单条目不包括所述目标成员时,确定所述目标成员可信,并向所述联盟链的共识节点反馈用于指示所述目标成员可信的响应消息,以使所述共识节点根据多个联盟成员的响应消息生成治理决策结果。When the whitelist entry includes the target member or the blacklist entry does not include the target member, the target member is determined to be credible, and a response indicating that the target member is credible is fed back to the consensus node of the alliance chain Message so that the consensus node generates governance decision results according to the response messages of multiple alliance members.
  5. 根据权利要求3所述的方法,根据所述治理请求选择目标智能合约,并采用所述目标智能合约生成治理决策结果包括:According to the method of claim 3, selecting a target smart contract according to the governance request, and using the target smart contract to generate a governance decision result includes:
    在所述治理请求为应用智能合约的验证准入触发的所述第三治理请求时,根据预定映射关系选择决策逻辑为特定代码验证的目标智能合约;When the governance request is the third governance request triggered by the verification admission of the application smart contract, selecting the decision logic as the target smart contract for specific code verification according to a predetermined mapping relationship;
    向待验证的目标成员发送验证消息;Send a verification message to the target member to be verified;
    接收所述目标成员反馈的响应消息;Receiving a response message fed back by the target member;
    解析所述响应消息,在所述响应消息中携带代表身份的约定代码时,向所述联盟链的共识节点反馈用于指示所述目标成员验证通过的响应消息,以使所述共识节点根据多个联盟成员的响应消息生成治理决策结果。Analyze the response message, and when the response message carries the agreed code representing the identity, feed back to the consensus node of the alliance chain a response message indicating that the target member has passed the verification, so that the consensus node can be The response messages of each coalition member generate governance decision results.
  6. 根据权利要求4或5所述的方法,所述共识节点根据多个联盟成员的响应消息生成治理决策结果包括以下之一:According to the method of claim 4 or 5, the consensus node generating governance decision results according to response messages of multiple alliance members includes one of the following:
    在接收到超过多数联盟成员的用于指示所述目标成员可信的响应消息时,生成同意的治理决策结果;When a response message indicating that the target member is credible is received from more than a majority of the alliance members, generating an agreed governance decision result;
    在接收到多个特定联盟成员的用于指示所述目标成员可信的响应消息时,生成同意的治理决策结果;When a response message indicating that the target member is credible is received from multiple specific alliance members, generating an agreed governance decision result;
    在接收到全部联盟成员的用于指示所述目标成员可信的响应消息时,生成同意的治理决策结果。When a response message indicating that the target member is credible is received from all coalition members, an agreed governance decision result is generated.
  7. 根据权利要求2所述的方法,在所述目标智能合约包括一个第一智能合约和多个第二智能合约时,采用所述目标智能合约生成治理决策结果包括:The method according to claim 2, when the target smart contract includes a first smart contract and multiple second smart contracts, using the target smart contract to generate governance decision results includes:
    触发多个联盟成员执行对应的第二智能合约,生成多个第一决策结果;Trigger multiple alliance members to execute the corresponding second smart contract to generate multiple first decision results;
    将所述多个第一决策结果作为所述第一智能合约的输入数据,得到所述第一智能合约的输出数据;Using the multiple first decision results as input data of the first smart contract to obtain output data of the first smart contract;
    将所述输出数据确定为所述治理决策结果。The output data is determined as the governance decision result.
  8. 一种联盟链的治理装置,所述装置包括:A management device for alliance chain, the device includes:
    设置模块,用于设置多个智能合约,其中,所述多个智能合约中每个智能合约对应联盟成员治理联盟链的一套决策逻辑;The setting module is used to set multiple smart contracts, where each smart contract in the multiple smart contracts corresponds to a set of decision logic for alliance members to govern the alliance chain;
    触发模块,用于触发用于治理所述联盟链的治理请求;The trigger module is used to trigger the governance request for managing the alliance chain;
    治理模块,用于根据所述治理请求选择目标智能合约,并采用所述目标智能合约生成治理决策结果。9.一种计算机设备,所述计算机设备包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现一种联盟链的治理方法,所述方法包括:The governance module is used to select a target smart contract according to the governance request, and use the target smart contract to generate governance decision results. 9. A computer device, the computer device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the program, a method for managing a consortium chain is implemented, The method includes:
    设置多个智能合约,其中,所述多个智能合约中每个智能合约对应联盟成员治理联盟链的一套决策逻辑;Setting a plurality of smart contracts, wherein each smart contract in the plurality of smart contracts corresponds to a set of decision logic for alliance members to govern the alliance chain;
    触发用于治理所述联盟链的治理请求;Trigger a governance request for governance of the alliance chain;
    根据所述治理请求选择目标智能合约,并采用所述目标智能合约生成治理决策结果。Select a target smart contract according to the governance request, and use the target smart contract to generate governance decision results.
  9. 根据权利要求9所述的计算机设备,设置多个智能合约包括:According to the computer device of claim 9, setting a plurality of smart contracts includes:
    为联盟链上的联盟成员设置通用的第一智能合约,以及为联盟链上的每个联盟成员设置特定的第二智能合约,其中,所述第一智能合约对应第一治理功能,所述第二智能合约对应第二治理功能,所述联盟链由多个所述联盟成员组成。Set a universal first smart contract for alliance members on the alliance chain, and set a specific second smart contract for each alliance member on the alliance chain, where the first smart contract corresponds to the first governance function, and the first The second smart contract corresponds to the second governance function, and the alliance chain is composed of multiple alliance members.
  10. 根据权利要求9所述的计算机设备,触发用于治理所述联盟链的治理请求包括以下之一:According to the computer device of claim 9, triggering a governance request for governance of the alliance chain includes one of the following:
    在联盟成员准入的触发条件下,触发用于治理联盟链的第一治理请求;Trigger the first governance request for governance of the alliance chain under the triggering condition of the admission of the alliance members;
    在子链成员准入的触发条件下,触发用于治理联盟链的第二治理请求,其中,所述联盟链包括一个或多个子链,所述子链成员是任一所述子链上的区块链节点;Under the triggering condition of the access of the sub-chain members, trigger the second governance request for governing the consortium chain, where the consortium chain includes one or more sub-chains, and the sub-chain members are on any one of the sub-chains. Blockchain node;
    在应用智能合约的验证准入的触发条件下,触发用于治理联盟链的第三治理请求。Under the triggering condition of the verification admission of the application smart contract, the third governance request for governance of the alliance chain is triggered.
  11. 根据权利要求11所述的计算机设备,根据所述治理请求选择目标智能合约,并采用所述目标智能合约生成治理决策结果包括:The computer device according to claim 11, selecting a target smart contract according to the governance request, and using the target smart contract to generate a governance decision result comprises:
    在所述治理请求为待接入所述联盟链的目标成员触发的所述第一治理请求或第二治理请求时,根据预定映射关系选择决策逻辑为白名单或者黑名单的目标智能合约,其中,所述目标成员包括触发所述第一治理请求的联盟成员或触发所述第二治理请求的子链成员;When the governance request is the first governance request or the second governance request triggered by the target member to be connected to the alliance chain, a target smart contract whose decision logic is a whitelist or a blacklist is selected according to a predetermined mapping relationship, where , The target member includes the alliance member that triggered the first governance request or the sub-chain member that triggered the second governance request;
    根据白名单条目或黑名单条目判断所述目标成员是否可信;Judging whether the target member is credible according to the whitelist entry or the blacklist entry;
    在白名单条目包括所述目标成员或黑名单条目不包括所述目标成员时,确定所述目标成员可信,并向所述联盟链的共识节点反馈用于指示所述目标成员可信的响应消息,以使所述共识节点根据多个联盟成员的响应消息生成治理决策结果。When the whitelist entry includes the target member or the blacklist entry does not include the target member, the target member is determined to be credible, and a response indicating that the target member is credible is fed back to the consensus node of the alliance chain Message so that the consensus node generates governance decision results according to the response messages of multiple alliance members.
  12. 根据权利要求11所述的计算机设备,根据所述治理请求选择目标智能合约,并采用所述目标智能合约生成治理决策结果包括:The computer device according to claim 11, selecting a target smart contract according to the governance request, and using the target smart contract to generate a governance decision result comprises:
    在所述治理请求为应用智能合约的验证准入触发的所述第三治理请求时,根据预定映射关系选择决策逻辑为特定代码验证的目标智能合约;When the governance request is the third governance request triggered by the verification admission of the application smart contract, selecting the decision logic as the target smart contract for specific code verification according to a predetermined mapping relationship;
    向待验证的目标成员发送验证消息;Send a verification message to the target member to be verified;
    接收所述目标成员反馈的响应消息;Receiving a response message fed back by the target member;
    解析所述响应消息,在所述响应消息中携带代表身份的约定代码时,向所述联盟链的共识节点反馈用于指示所述目标成员验证通过的响应消息,以使所述共识节点根据多个联盟成员的响应消息生成治理决策结果。Analyze the response message, and when the response message carries the agreed code representing the identity, feed back to the consensus node of the alliance chain a response message indicating that the target member has passed the verification, so that the consensus node can be The response messages of each coalition member generate governance decision results.
  13. 根据权利要求12或13所述的计算机设备,所述共识节点根据多个联盟成员的响应消息生成治理决策结果包括以下之一:According to the computer device of claim 12 or 13, the consensus node generating governance decision results according to response messages of multiple alliance members includes one of the following:
    在接收到超过多数联盟成员的用于指示所述目标成员可信的响应消息时,生成同意的治理决策结果;When a response message indicating that the target member is credible is received from more than a majority of the alliance members, generating an agreed governance decision result;
    在接收到多个特定联盟成员的用于指示所述目标成员可信的响应消息时,生成同意的治理决策结果;When a response message indicating that the target member is credible is received from multiple specific alliance members, generating an agreed governance decision result;
    在接收到全部联盟成员的用于指示所述目标成员可信的响应消息时,生成同意的治理决策结果。When a response message indicating that the target member is credible is received from all coalition members, an agreed governance decision result is generated.
  14. 根据权利要求10所述的计算机设备,在所述目标智能合约包括一个第一智能合约和多个第二智能合约时,采用所述目标智能合约生成治理决策结果包括:The computer device according to claim 10, when the target smart contract includes a first smart contract and a plurality of second smart contracts, using the target smart contract to generate a governance decision result includes:
    触发多个联盟成员执行对应的第二智能合约,生成多个第一决策结果;Trigger multiple alliance members to execute the corresponding second smart contract to generate multiple first decision results;
    将所述多个第一决策结果作为所述第一智能合约的输入数据,得到所述第一智能合约的输出数据;Using the multiple first decision results as input data of the first smart contract to obtain output data of the first smart contract;
    将所述输出数据确定为所述治理决策结果。The output data is determined as the governance decision result.
  15. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现一种联盟链的治理方法,所述方法包括:A computer-readable storage medium having a computer program stored on the computer-readable storage medium, and when the computer program is executed by a processor, a method for managing a consortium chain is realized, the method comprising:
    设置多个智能合约,其中,所述多个智能合约中每个智能合约对应联盟成员治理联盟链的一套决策逻辑;Setting a plurality of smart contracts, wherein each smart contract in the plurality of smart contracts corresponds to a set of decision logic for alliance members to govern the alliance chain;
    触发用于治理所述联盟链的治理请求;Trigger a governance request for governance of the alliance chain;
    根据所述治理请求选择目标智能合约,并采用所述目标智能合约生成治理决策结果。Select a target smart contract according to the governance request, and use the target smart contract to generate governance decision results.
  16. 根据权利要求16所述的计算机可读存储介质,设置多个智能合约包括:According to the computer-readable storage medium of claim 16, setting a plurality of smart contracts comprises:
    为联盟链上的联盟成员设置通用的第一智能合约,以及为联盟链上的每个联盟成员设置特定的第二智能合约,其中,所述第一智能合约对应第一治理功能,所述第二智能合约对应第二治理功能,所述联盟链由多个所述联盟成员组成。Set a universal first smart contract for alliance members on the alliance chain, and set a specific second smart contract for each alliance member on the alliance chain, where the first smart contract corresponds to the first governance function, and the first The second smart contract corresponds to the second governance function, and the alliance chain is composed of multiple alliance members.
  17. 根据权利要求16所述的计算机可读存储介质,触发用于治理所述联盟链的治理请求包括以下之一:According to the computer-readable storage medium of claim 16, triggering a governance request for governance of the alliance chain includes one of the following:
    在联盟成员准入的触发条件下,触发用于治理联盟链的第一治理请求;Trigger the first governance request for governance of the alliance chain under the triggering condition of the admission of the alliance members;
    在子链成员准入的触发条件下,触发用于治理联盟链的第二治理请求,其中,所述联盟链包括一个或多个子链,所述子链成员是任一所述子链上的区块链节点;Under the triggering condition of the access of the sub-chain members, trigger the second governance request for governing the consortium chain, where the consortium chain includes one or more sub-chains, and the sub-chain members are on any one of the sub-chains. Blockchain node;
    在应用智能合约的验证准入的触发条件下,触发用于治理联盟链的第三治理请求。Under the triggering condition of the verification admission of the application smart contract, the third governance request for governance of the alliance chain is triggered.
  18. 根据权利要求18所述的计算机可读存储介质,根据所述治理请求选择目标智能合约,并采用所述目标智能合约生成治理决策结果包括:According to the computer-readable storage medium of claim 18, selecting a target smart contract according to the governance request, and using the target smart contract to generate a governance decision result comprises:
    在所述治理请求为待接入所述联盟链的目标成员触发的所述第一治理请求或第二治理请求时,根据预定映射关系选择决策逻辑为白名单或者黑名单的目标智能合约,其中,所述目标成员包括触发所述第一治理请求的联盟成员或触发所述第二治理请求的子链成员;When the governance request is the first governance request or the second governance request triggered by the target member to be connected to the alliance chain, a target smart contract whose decision logic is a whitelist or a blacklist is selected according to a predetermined mapping relationship, where , The target member includes the alliance member that triggered the first governance request or the sub-chain member that triggered the second governance request;
    根据白名单条目或黑名单条目判断所述目标成员是否可信;Judging whether the target member is credible according to the whitelist entry or the blacklist entry;
    在白名单条目包括所述目标成员或黑名单条目不包括所述目标成员时,确定所述目标成员可信,并向所述联盟链的共识节点反馈用于指示所述目标成员可信的响应消息,以使所述共识节点根据多个联盟成员的响应消息生成治理决策结果。When the whitelist entry includes the target member or the blacklist entry does not include the target member, the target member is determined to be credible, and a response indicating that the target member is credible is fed back to the consensus node of the alliance chain Message so that the consensus node generates governance decision results according to the response messages of multiple alliance members.
  19. 根据权利要求18所述的计算机可读存储介质,根据所述治理请求选择目标智能合约,并采用所述目标智能合约生成治理决策结果包括:According to the computer-readable storage medium of claim 18, selecting a target smart contract according to the governance request, and using the target smart contract to generate a governance decision result comprises:
    在所述治理请求为应用智能合约的验证准入触发的所述第三治理请求时,根据预定映射关系选择决策逻辑为特定代码验证的目标智能合约;When the governance request is the third governance request triggered by the verification admission of the application smart contract, selecting the decision logic as the target smart contract for specific code verification according to a predetermined mapping relationship;
    向待验证的目标成员发送验证消息;Send a verification message to the target member to be verified;
    接收所述目标成员反馈的响应消息;Receiving a response message fed back by the target member;
    解析所述响应消息,在所述响应消息中携带代表身份的约定代码时,向所述联盟链的共识节点反馈用于指示所述目标成员验证通过的响应消息,以使所述共识节点根据多个联盟成员的响应消息生成治理决策结果。Analyze the response message, and when the response message carries the agreed code representing the identity, feed back to the consensus node of the alliance chain a response message indicating that the target member has passed the verification, so that the consensus node can be The response messages of each coalition member generate governance decision results.
PCT/CN2020/087557 2019-05-10 2020-04-28 Consortium blockchain governance method and apparatus, computer device and storage medium WO2020228531A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910390791.6 2019-05-10
CN201910390791.6A CN110288179A (en) 2019-05-10 2019-05-10 Administering method and device, computer equipment, the storage medium of alliance's chain

Publications (1)

Publication Number Publication Date
WO2020228531A1 true WO2020228531A1 (en) 2020-11-19

Family

ID=68001544

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/087557 WO2020228531A1 (en) 2019-05-10 2020-04-28 Consortium blockchain governance method and apparatus, computer device and storage medium

Country Status (2)

Country Link
CN (1) CN110288179A (en)
WO (1) WO2020228531A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110288179A (en) * 2019-05-10 2019-09-27 深圳壹账通智能科技有限公司 Administering method and device, computer equipment, the storage medium of alliance's chain
CN110807672A (en) * 2019-11-12 2020-02-18 北京芯际科技有限公司 Block chain-based point cashing method
CN111767211A (en) * 2020-06-15 2020-10-13 北京同邦卓益科技有限公司 Test method and device of alliance chain, storage medium and electronic device
CN111784369A (en) * 2020-07-06 2020-10-16 广东工业大学 Competitive product detection method based on alliance block chain
CN111951074A (en) * 2020-08-05 2020-11-17 珠海格力电器股份有限公司 Sharing equipment system based on alliance chain
CN114827135A (en) * 2021-01-12 2022-07-29 腾讯科技(深圳)有限公司 Cross-chain cooperative treatment system, method, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180123779A1 (en) * 2016-11-01 2018-05-03 Jiangang Zhang Flexible Blockchain Smart-Contract Deployment
CN109087104A (en) * 2018-08-29 2018-12-25 北京京东尚科信息技术有限公司 Block chain intelligence contract administration method and system, computer readable storage medium
CA3041188A1 (en) * 2018-11-30 2019-04-18 Alibaba Group Holding Limited Blockchain smart contract updates using decentralized decision
CN109711838A (en) * 2018-12-06 2019-05-03 杭州秘猿科技有限公司 System function administering method, system and equipment in a kind of block chain
CN110288179A (en) * 2019-05-10 2019-09-27 深圳壹账通智能科技有限公司 Administering method and device, computer equipment, the storage medium of alliance's chain

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107733855B (en) * 2017-08-31 2019-11-05 中国科学院信息工程研究所 A kind of block catenary system and application method that can support publicly-owned chain, alliance's chain and privately owned chain simultaneously
CN108256864B (en) * 2018-02-13 2019-06-07 中链科技有限公司 Foundation across chain alliance and communication means, system between a kind of block chain
CN108694669A (en) * 2018-07-18 2018-10-23 矩阵元技术(深圳)有限公司 A kind of block chain intelligence contract implementation method and device
CN109272335A (en) * 2018-09-17 2019-01-25 深圳市元征科技股份有限公司 A kind of intelligence contract administration method, system, equipment and computer storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180123779A1 (en) * 2016-11-01 2018-05-03 Jiangang Zhang Flexible Blockchain Smart-Contract Deployment
CN109087104A (en) * 2018-08-29 2018-12-25 北京京东尚科信息技术有限公司 Block chain intelligence contract administration method and system, computer readable storage medium
CA3041188A1 (en) * 2018-11-30 2019-04-18 Alibaba Group Holding Limited Blockchain smart contract updates using decentralized decision
CN109711838A (en) * 2018-12-06 2019-05-03 杭州秘猿科技有限公司 System function administering method, system and equipment in a kind of block chain
CN110288179A (en) * 2019-05-10 2019-09-27 深圳壹账通智能科技有限公司 Administering method and device, computer equipment, the storage medium of alliance's chain

Also Published As

Publication number Publication date
CN110288179A (en) 2019-09-27

Similar Documents

Publication Publication Date Title
WO2020228531A1 (en) Consortium blockchain governance method and apparatus, computer device and storage medium
Rathee et al. A secure communicating things network framework for industrial IoT using blockchain technology
CN110599181B (en) Data processing method, device and equipment based on block chain and storage medium
US10452998B2 (en) Cognitive blockchain automation and management
CN111125779A (en) Block chain-based federal learning method and device
JP7228322B2 (en) Auto-commit transaction management in blockchain networks
CN102523197B (en) Enterprise's social information exchange method, server and enterprise's social networking system
US10192262B2 (en) System for periodically updating backings for resource requests
US20230177213A1 (en) Integrated personal data retrieval across multiple applications
KR20220027809A (en) Systems and Methods for Virtual Distributed Ledger Networks
WO2021036583A1 (en) Blockchain-based clearing method, apparatus and device, and computer storage medium
CN110457629A (en) Permission processing, authority control method and device
CN113239399A (en) Supply chain data supervision method based on block chain, electronic equipment and storage medium
CN111385751B (en) Information sending method, device, terminal and readable storage medium
CN112115204A (en) Multi-party security calculation implementation method based on block chain technology
CN115310920A (en) Management method, device and storage medium for cross-chain interoperation management based on governance chain
CN110784324B (en) Node admission method and device
CN115526553A (en) Block chain based distributed shared warehousing system and implementation method
Angelov et al. Dynamic and secure B2B e-contract update management
KR102197050B1 (en) Distributed application and system for managing personal financial goods based on block chain using the same
Banerjee et al. Blockchain enabled data trading with user consent
CN109859041A (en) Fund transaction real time updating method and system, electronic equipment based on block chain
TW202008202A (en) CSR data verification system with tamper-proof capability, related verification party subsystem, computer program product, and data verification method
US20230177206A1 (en) Data privacy integration services processing using multiple work packages and multiple responder groups
US20230177183A1 (en) Redistribution operations for data privacy integration services using different redistribution responder groups

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20805332

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25/02/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20805332

Country of ref document: EP

Kind code of ref document: A1