Decision-making method, device and electronic device based on blockchain
By creating decision-making smart contracts in the blockchain and calling multiple decision nodes for decision-making, the problem of lack of openness and supervision in the decision-making system in the existing technology is solved, and a credible multi-party consensus decision-making result is achieved.
Patent Information
- Application Number
- CN202110269668.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-03-26
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2039-03-26
AI Technical Summary
The existing decision-making system lacks openness and regulatory nature, resulting in unreliable decision-making results and possible errors in decision-making by a separate party.
By creating a decision-making smart contract in the blockchain, calling multiple decision nodes to make decisions on decision-making issues, and determining the final result through a consensus mechanism through a consensus mechanism, the disclosure and immutable characteristics of the blockchain are used for proofreading.
Ensure the credibility and transparency of the decision-making process, avoid decision-making errors on one party, and achieve decision-making results with consensus among multiple parties.
Smart Images

Figure CN113112358B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of blockchain technology, and in particular to a decision-making method and device based on blockchain and an electronic device. Background Art
[0002] Blockchain technology, also known as distributed ledger technology, is an emerging technology in which several computing devices jointly participate in "bookkeeping" and jointly maintain a complete distributed database. Blockchain technology is widely used in many fields because of its decentralized, open and transparent characteristics, each computing device can participate in database records, and data can be quickly synchronized between computing devices. Summary of the invention
[0003] The embodiments of this specification provide a decision-making method, device and electronic device based on blockchain:
[0004] According to a first aspect of the embodiments of this specification, a decision-making method based on blockchain is provided.
[0005] Receiving a decision-making smart contract submitted by a decision-maker; wherein the decision-making smart contract declares the problem to be decided and the decision options;
[0006] Broadcasting the decision-making smart contract to the decision-making nodes in the blockchain;
[0007] Obtaining the execution result returned by the decision node after executing the decision smart contract; wherein the execution result is the decision option confirmed by the decision node for the issue to be decided;
[0008] A decision result is determined according to the execution result.
[0009] Optionally, determining a decision result according to the execution result specifically includes:
[0010] Counting the number of identical decision options in the execution results;
[0011] If the number of any decision option reaches the threshold, the decision option is determined as the decision result.
[0012] Optionally, the threshold is determined based on the number of decision nodes.
[0013] Optionally, the method further includes:
[0014] The decision result is returned to the decision maker.
[0015] Optionally, after receiving the decision-making smart contract submitted by the decision-maker, the method further includes:
[0016] Calling the creation logic declared in the smart contract published on the blockchain, and storing the decision smart contract on the blockchain;
[0017] The contract audit logic declared in the smart contract published on the blockchain is called, and a voting event is written into the transaction log. After the audit node of the blockchain monitors the voting event, the voting transaction is submitted to the smart contract; the smart contract summarizes and organizes the voting transactions to obtain the audit result of the decision-making smart contract;
[0018] Broadcasting the decision-making smart contract to the decision-making nodes in the blockchain specifically includes:
[0019] If the audit result is passed, the decision-making smart contract is broadcast to the decision-making nodes in the blockchain.
[0020] Optionally, the decision node is a node corresponding to a decision system connected to the blockchain, and the method further includes:
[0021] Receive network access requests from decision-making systems applying to join the blockchain;
[0022] The network access audit logic declared in the smart contract published on the blockchain is called, and a voting event is written in the transaction log. After the audit node of the blockchain monitors the voting event, the voting transaction is submitted to the smart contract; the smart contract summarizes and organizes the voting transactions to obtain the network access audit result.
[0023] Optionally, the blockchain includes a consortium chain.
[0024] According to a second aspect of the embodiments of this specification, a decision-making device based on blockchain is provided.
[0025] A receiving unit receives a decision-making smart contract submitted by a decision-maker; wherein the decision-making smart contract declares the problem to be decided and the decision options;
[0026] A broadcasting unit, which broadcasts the decision-making smart contract to the decision-making nodes in the blockchain;
[0027] An acquisition unit, which acquires an execution result returned by the decision node after executing the decision smart contract; wherein the execution result is a decision option confirmed by the decision node for the problem to be decided;
[0028] A determination unit determines a decision result according to the execution result.
[0029] Optionally, the determining unit specifically includes:
[0030] A counting subunit, which counts the number of identical decision options in the execution result;
[0031] The determination subunit determines that if the number of any decision option reaches a threshold, the decision option is determined as a decision result.
[0032] Optionally, the threshold is determined based on the number of decision nodes.
[0033] Optionally, the device further comprises:
[0034] The returning unit returns the decision result to the decision maker.
[0035] Optionally, after the receiving unit, the device further includes:
[0036] A contract creation subunit, calling the creation logic declared in the smart contract published on the blockchain, and storing the decision smart contract on the blockchain;
[0037] The contract review subunit calls the contract review logic declared in the smart contract published on the blockchain, writes a voting event in the transaction log, and after the review node of the blockchain monitors the voting event, it submits the voting transaction to the smart contract; the smart contract summarizes and organizes the voting transactions to obtain the review result of the decision-making smart contract;
[0038] The broadcast unit specifically includes:
[0039] If the audit result is passed, the decision-making smart contract is broadcast to the decision-making nodes in the blockchain.
[0040] Optionally, the decision node is a node corresponding to a decision system connected to the blockchain, and the device further includes:
[0041] A receiving subunit receives a request for joining the decision-making system of the blockchain;
[0042] The network access audit subunit calls the network access audit logic declared in the smart contract published on the blockchain, writes a voting event in the transaction log, and after the audit node of the blockchain monitors the voting event, it submits the voting transaction to the smart contract; the smart contract summarizes and organizes the voting transactions to obtain the network access audit result.
[0043] Optionally, the blockchain includes a consortium chain.
[0044] According to a fifth aspect of the embodiments of this specification, an electronic device is provided, including:
[0045] processor;
[0046] a memory for storing processor-executable instructions;
[0047] Wherein, the processor is configured as any of the above-mentioned blockchain-based decision-making methods.
[0048] The embodiments of this specification provide a decision-making solution based on blockchain. When the business party needs to make a decision, a decision-making smart contract can be created on the blockchain, and the decision-making smart contract can be used to call each decision node in the blockchain to make a decision on the problem to be decided declared in the decision-making smart contract to determine the decision item. On the one hand, based on the public and tamper-proof characteristics of the blockchain, the decision-making process is stored on the chain, which can be queried at any time and can be guaranteed to be reliable. On the other hand, by introducing a multi-party decision-making system in the blockchain (each decision-making system corresponds to a decision node), each decision node first makes a decision on the decision problem separately, and then determines the final decision result through a consensus mechanism, that is, by integrating the decision options returned by multiple parties; this can avoid errors that may occur when a single party makes a decision. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a schematic diagram of the process of a node device of a business blockchain accessing a shared blockchain provided by an embodiment of this specification;
[0050] Figure 2 It is a flowchart of the decision-making smart contract review provided in an embodiment of this specification;
[0051] Figure 3 It is a flowchart of the network access review of the decision-making system provided in an embodiment of this specification;
[0052] Figure 4 This is a hardware structure diagram of a blockchain-based decision-making device provided in an embodiment of this specification;
[0053] Figure 5 This is a module diagram of a blockchain-based decision-making device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0054] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this specification. Instead, they are merely examples of devices and methods consistent with some aspects of this specification as detailed in the appended claims.
[0055] The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this specification. The singular forms "a", "the" and "the" used in this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0056] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0057] With the continuous development of artificial intelligence, the needs that originally required manual review and judgment in many business scenarios can be transferred to automatic decision-making systems. For example, in the financial services business, the need to identify whether a transaction is risky can be automatically identified by the deployed risk control system. After segmentation, it can be used to identify whether the user is a risky user (for example, low credit, criminal record, etc.) based on user information; and to identify whether there are any violations in the transaction process (for example, money laundering, fraud, etc.) based on transaction information.
[0058] Generally, the decision system can be an automatic decision-making system based on the decision model calculated based on big data. By setting a reasonable function, the existing big data processing technology can be used to find the rules from the big data. For example, machine learning methods such as logistic regression, GBDT (Gradient Boosting Decision Tree), and even deep learning can be used to model these big data, so as to obtain the coefficients of each parameter in the function, and then a unified equation or calculation formula can be obtained. According to such a decision model, after the data to be identified is input into the decision model as input data, the decision result output by the decision model after calculation can be obtained.
[0059] Today, most decision-making systems are privately owned by enterprises, usually serving only the business of the enterprise itself, or provided to a few third parties. On the one hand, the decision-making process is implemented within the enterprise; it is not open to the outside world, and there is no external supervision. The lack of openness and supervision mechanisms leads to a lack of trust in the enterprise. On the other hand, the decision results are usually based on a decision-making system. If there are problems with this decision-making system, there will also be problems with the decision results.
[0060] To this end, the embodiments of this specification provide a decision-making solution based on blockchain. When the business party needs to make a decision, a decision-making smart contract can be created on the blockchain, and the decision-making smart contract can be used to call each decision node in the blockchain to make a decision on the problem to be decided declared in the decision-making smart contract to determine the decision item. On the one hand, based on the public and tamper-proof characteristics of the blockchain, the decision-making process is stored on the chain, which can be queried at any time and can be guaranteed to be reliable. On the other hand, by introducing a multi-party decision-making system in the blockchain (each decision-making system corresponds to a decision node), each decision node first makes a decision on the decision problem separately, and then determines the final decision result through a consensus mechanism, that is, by integrating the decision options returned by multiple parties; this can avoid errors that may occur when a single party makes a decision.
[0061] The following Figure 1 As shown in the introduction, this specification proposes a flowchart of a decision-making method based on blockchain. Figure 1 As shown, the method includes:
[0062] Step 110: The method includes: receiving a decision-making smart contract submitted by a decision-maker; wherein the decision-making smart contract declares the problem to be decided and the decision options;
[0063] Step 120: broadcast the decision-making smart contract to the decision nodes in the blockchain; obtain the execution result returned by the decision node after executing the decision-making smart contract; wherein the execution result is the decision option confirmed by the decision node for the issue to be decided;
[0064] Step 130: Determine a decision result according to the execution result.
[0065] The blockchain described in this specification may specifically include private chains, public chains, and alliance chains, etc., which are not particularly limited in this specification.
[0066] For example, in one scenario, the above blockchain can be a consortium chain composed of headquarters, branches, agencies, etc. as consortium members; the operator of the consortium chain can rely on the consortium chain to deploy corresponding services; and the headquarters, branches, and agencies described above as consortium members can all serve as a business node for the above services. Each business node can publish the business-related information generated or received by itself in the consortium chain in the form of transactions, and after the transaction is processed by the consensus node in the consortium chain, it is stored in the distributed database in the consortium chain to complete the "on-chain" evidence storage of the above transaction information.
[0067] It should be noted that the transaction described in this specification refers to a piece of data created by a blockchain client and ultimately published to the distributed database of the blockchain.
[0068] Transactions in the blockchain are usually divided into narrow transactions and broad transactions. A transaction in the narrow sense refers to a value transfer published by a user to the blockchain. A transaction in the broad sense refers to a business data with business intent published by a user to the blockchain; for example, an operator can build a consortium chain based on actual business needs, and rely on the consortium chain to deploy some other types of online services that are not related to value transfer (such as evidence storage services, anti-counterfeiting verification services, etc.), and in this type of consortium chain, a transaction can be a business message or business request with business intent published by a user in the consortium chain.
[0069] The above-mentioned client may include any type of upper-layer application that uses the underlying business data stored in the blockchain as data support to implement specific business functions.
[0070] In blockchain technology, nodes in the blockchain usually need to rely on corresponding smart contracts to operate blocks. For example, operations such as storage, modification, and deletion in the blockchain all need to rely on smart contracts. The smart contract can be a computer protocol designed to be deployed on the blockchain to disseminate, verify, or execute contracts in an information-based manner. The corresponding operations can be performed by declaring business logic in the smart contract. Smart contracts allow trusted transactions without a third party. These transactions are traceable and irreversible. Smart contracts can provide security that is superior to traditional contract methods and reduce other transaction costs associated with contracts. Generally, smart contracts can be deployed locally on the blockchain node. When the node needs to perform an action, it can call the corresponding smart contract and run the smart contract to execute the business logic declared in the smart contract to obtain the execution result.
[0071] The decision-making smart contract described in this specification may refer to a smart contract used to describe a problem to be decided. Specifically, the decision-making smart contract at least declares a description of the problem to be decided and decision options. By abstracting the decision into a multiple-choice question with dynamically changing correct answers, each decision node determines the decision options separately.
[0072] In one embodiment, an influence factor may also be declared in the decision-making smart contract; the influence factor may be used to identify the dynamic change process of the correct answer.
[0073] In one embodiment, the target decision node may also be declared in the decision-making smart contract; it is used to specify the decision node for executing the decision-making smart contract.
[0074] In practical applications, general blockchains need to review the decision-making smart contracts submitted by the decision-makers to ensure that the decision-making smart contracts meet the requirements.
[0075] Specifically, after receiving the decision-making smart contract submitted by the decision-maker, the method further includes:
[0076] Calling the creation logic declared in the smart contract published on the blockchain, and storing the decision smart contract on the blockchain;
[0077] The contract audit logic declared in the smart contract published on the blockchain is called, and a voting event is written in the transaction log. After the audit node of the blockchain monitors the voting event, the voting transaction is submitted to the smart contract; the smart contract summarizes and organizes the voting transactions to obtain the audit result of the decision-making smart contract.
[0078] If the audit result is passed, the decision-making smart contract is broadcast to the decision-making nodes in the blockchain.
[0079] Among them, each audit node can audit the decision-making smart contract locally. The audit can be specified by the audit node itself, or it can be the audit logic discussed and agreed upon by the audit nodes in the blockchain. Usually, the goal of this audit logic is to ensure that the decision-making smart contract is reliable, does not violate laws and regulations, and is executable. Each audit node that joins the blockchain can obtain the audit logic, and audit the decision-making smart contract to be audited according to the audit logic, and store the audit results on the chain in the form of voting transactions.
[0080] If the number of votes that have passed the review in the aggregated voting transactions reaches a first threshold, the first threshold can be determined based on the number of review nodes. For example, it can be half of the number of review nodes, that is, the number of votes that have passed the review reaches 50%, then it can be determined that the decision-making smart contract is effective. Of course, this first threshold can be flexibly adjusted as needed.
[0081] Taking the alliance chain as an example, in the early stage of the establishment of the alliance chain, the alliance parties can discuss and write the audit logic; with the development of the subsequent business, the alliance parties can also discuss and upgrade the contract.
[0082] The following combination Figure 2 The flowchart of decision-making smart contract review is shown in the figure. Taking the alliance chain as an example:
[0083] 1.1. Alliance Party A writes a decision-making smart contract.
[0084] 1.2. Alliance Party A submits the creation transaction of the decision-making smart contract to the alliance chain.
[0085] 2.1. The node device of the alliance chain registers the decision-making smart contract.
[0086] The node device of the alliance chain will create a transaction in response to store the decision-making smart contract. Among them, the stored decision-making smart contract corresponds to a contract address of the alliance chain.
[0087] 2.2. The node device of the alliance chain returns the registration result.
[0088] The node device of the alliance chain returns the result of whether the decision-making smart contract is successfully created and the contract address to alliance party A.
[0089] 3.1. The node device of the alliance chain notifies other alliance parties for review.
[0090] The node devices of the alliance chain broadcast the decision-making smart contract to other alliance parties, and each alliance party will review the decision-making smart contract.
[0091] 3.2. Each alliance node reviews and votes, and returns the voting results to the alliance chain in the form of voting transactions.
[0092] 4. The node devices of the alliance chain summarize and organize the return results of each alliance node and determine the audit results.
[0093] 5. The node device of the alliance chain returns the audit result to alliance party A.
[0094] It should be noted that if the audit result is passed, the alliance chain can notify alliance party A that the decision-making smart contract has passed the audit; at the same time, the approved decision-making smart contract can also be publicized to recruit the decision-making system to settle in.
[0095] In one embodiment, the decision node is a node corresponding to a decision system connected to the blockchain, and the method further includes:
[0096] Receive network access requests from decision-making systems applying to join the blockchain;
[0097] The network access audit logic declared in the smart contract published on the blockchain is called, and a voting event is written in the transaction log. After the audit node of the blockchain monitors the voting event, the voting transaction is submitted to the smart contract; the smart contract summarizes and organizes the voting transactions to obtain the network access audit result.
[0098] The decision-making system for access to the network is reviewed through the node devices on the blockchain. Figure 3 The following is a flow chart of the decision-making system joining the network, also taking the alliance chain as an example:
[0099] 1. Each decision-making system submits a network access request to the alliance chain; wherein the network access request carries the application information of each decision-making system.
[0100] Generally, the application information may include the qualification information of the decision-making system (such as enterprise information, business certificates, etc.)
[0101] 2.1. Registration application information of node equipment in the alliance chain.
[0102] The node devices in the alliance chain respond to the network access request, register the application information (and return the registration result).
[0103] 2.2. The node devices in the alliance chain send the application information to each alliance party for review.
[0104] The node device in the alliance chain calls the smart contract that declares the network access review logic and sends the application information to each alliance method for review.
[0105] 3. Each alliance party conducts network access review and votes.
[0106] Each alliance party reviews the application information and returns the voting results to the alliance chain in the form of voting transactions.
[0107] 4.1. The node devices in the alliance chain count the audit results of each alliance node to determine the network access audit results.
[0108] 4.2. Return the network access review results to the decision-making system.
[0109] If the number of voting transactions agreeing to network access meets the preset conditions, the network access review result is determined to be successful network access; if the number of voting transactions agreeing to network access does not meet the preset conditions, the network access review result is determined to be failed network access.
[0110] The preset conditions may be pre-set and can be flexibly adjusted according to actual needs. For example, they may include: the number of voting transactions for agreeing to join the network is greater than a threshold; or
[0111] The number of voting transactions agreeing to join the network is greater than the preset ratio; or;
[0112] The number of voting transactions agreeing to join the network is greater than the number of voting transactions disagreeing to join the network, and so on.
[0113] 5.1. Check the number of decision-making systems connected to the network.
[0114] 5.2. If the number of decision-making systems connected to the network reaches the second threshold, the decision nodes corresponding to each decision-making system are notified to execute the decision-making smart contract to be decided.
[0115] In order to avoid possible errors caused by decision-making by a single party, this manual introduces a multi-party decision-making system in the blockchain (each decision-making system corresponds to a decision-making node), and each decision-making node makes decisions on the decision-making problem independently. The final decision result is then determined through a consensus mechanism that combines the decision options returned by multiple parties.
[0116] Among them, the execution result returned by the decision node after executing the decision smart contract; wherein, the execution result is the decision option confirmed by the decision node for the issue to be decided.
[0117] The decision node executes the decision smart contract to obtain the declared problem to be decided and the decision options; each decision node can run the problem to be decided based on the local decision system to determine the decision options; and store the determined decision options on the chain in the form of transactions. Correspondingly, the node device of the blockchain can summarize and count the decision options returned by each decision node, and determine the decision result based on the execution result.
[0118] In one embodiment, determining the decision result according to the execution result specifically includes:
[0119] Counting the number of identical decision options in the execution results;
[0120] If the number of any decision option reaches the third threshold, the decision option is determined as the decision result.
[0121] The third threshold is determined based on the number of decision nodes.
[0122] The embodiments of this specification provide a decision-making solution based on blockchain. When the business party needs to make a decision, a decision-making smart contract can be created on the blockchain, and the decision-making smart contract can be used to call each decision node in the blockchain to make a decision on the problem to be decided declared in the decision-making smart contract to determine the decision item. On the one hand, based on the public and tamper-proof characteristics of the blockchain, the decision-making process is stored on the chain, which can be queried at any time and can be guaranteed to be reliable. On the other hand, by introducing a multi-party decision-making system in the blockchain (each decision-making system corresponds to a decision node), each decision node first makes a decision on the decision problem separately, and then determines the final decision result through a consensus mechanism, that is, by integrating the decision options returned by multiple parties; this can avoid errors that may occur when a single party makes a decision.
[0123] Corresponding to the aforementioned blockchain-based decision-making method embodiment, this specification also provides an embodiment of a blockchain-based decision-making device. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of the device in which it is located reading the corresponding computer business program instructions in the non-volatile memory into the memory for execution. From the hardware level, such as Figure 4 The following is a hardware structure diagram of the device where the decision-making device of the blockchain is located in this specification, except Figure 4 In addition to the processor, network interface, memory, and non-volatile memory shown, the device in the embodiment where the apparatus is located may also include other hardware, usually based on the actual function of the blockchain-based decision-making, which will not be described in detail.
[0124] See also Figure 5 , is a module diagram of a decision-making device based on blockchain provided in an embodiment of this specification, and the device corresponds to Figure 1 In the embodiment shown, the device comprises:
[0125] The receiving unit 310 receives a decision-making smart contract submitted by a decision-maker; wherein the decision-making smart contract declares the problem to be decided and the decision options;
[0126] A broadcast unit 320, broadcasting the smart contract to decision nodes in the blockchain;
[0127] An acquisition unit 330 is configured to acquire an execution result returned by the decision node after executing the smart contract; wherein the execution result is a decision option confirmed by the decision node for the smart contract;
[0128] The determination unit 340 determines a decision result according to the execution result.
[0129] Optionally, the determining unit 340 specifically includes:
[0130] A counting subunit, which counts the number of identical decision options in the execution result;
[0131] The determination subunit determines that if the number of any decision option reaches a threshold, the decision option is determined as a decision result.
[0132] Optionally, the threshold is determined based on the number of decision nodes.
[0133] Optionally, the device further comprises:
[0134] The returning unit returns the decision result to the decision maker.
[0135] Optionally, after the receiving unit 310, the device further includes:
[0136] A contract creation subunit, calling the creation logic declared in the smart contract published on the blockchain, and storing the decision smart contract on the blockchain;
[0137] The contract review subunit calls the contract review logic declared in the smart contract published on the blockchain, writes a voting event in the transaction log, and after the review node of the blockchain monitors the voting event, it submits the voting transaction to the smart contract; the smart contract summarizes and organizes the voting transactions to obtain the review result of the decision-making smart contract;
[0138] The broadcast unit 320 specifically includes:
[0139] If the audit result is passed, the smart contract is broadcast to the decision-making nodes in the blockchain.
[0140] Optionally, the decision node is a node corresponding to a decision system connected to the blockchain, and the device further includes:
[0141] A receiving subunit receives a request for joining the decision-making system of the blockchain;
[0142] The network access audit subunit calls the network access audit logic declared in the smart contract published on the blockchain, writes a voting event in the transaction log, and after the audit node of the blockchain monitors the voting event, it submits the voting transaction to the smart contract; the smart contract summarizes and organizes the voting transactions to obtain the network access audit result.
[0143] Optionally, the blockchain includes a consortium chain.
[0144] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
[0145] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0146] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein 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 modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. Ordinary technicians in this field can understand and implement it without paying creative work.
[0147] above Figure 5 The internal functional modules and structural schematic diagram of the decision-making device based on blockchain are described. Its actual execution subject can be an electronic device, including:
[0148] processor;
[0149] a memory for storing processor-executable instructions;
[0150] Wherein, the processor is configured to:
[0151] Receiving a decision-making smart contract submitted by a decision-maker; wherein the decision-making smart contract declares the problem to be decided and the decision options;
[0152] Broadcasting the smart contract to decision nodes in the blockchain;
[0153] Obtaining an execution result returned by the decision node after executing the smart contract; wherein the execution result is a decision option confirmed by the decision node for the smart contract;
[0154] A decision result is determined according to the execution result.
[0155] Optionally, determining a decision result according to the execution result specifically includes:
[0156] Counting the number of identical decision options in the execution results;
[0157] If the number of any decision option reaches the threshold, the decision option is determined as the decision result.
[0158] Optionally, the threshold is determined based on the number of decision nodes.
[0159] Optionally, also include:
[0160] The decision result is returned to the decision maker.
[0161] Optionally, after receiving the decision-making smart contract submitted by the decision-maker, the method further includes:
[0162] Calling the creation logic declared in the smart contract published on the blockchain, and storing the decision smart contract on the blockchain;
[0163] The contract audit logic declared in the smart contract published on the blockchain is called, and a voting event is written into the transaction log. After the audit node of the blockchain monitors the voting event, the voting transaction is submitted to the smart contract; the smart contract summarizes and organizes the voting transactions to obtain the audit result of the decision-making smart contract;
[0164] Broadcasting the smart contract to the decision nodes in the blockchain specifically includes:
[0165] If the audit result is passed, the smart contract is broadcast to the decision-making nodes in the blockchain.
[0166] Optionally, the decision node is a node corresponding to a decision system connected to the blockchain, and the method further includes:
[0167] Receive network access requests from decision-making systems applying to join the blockchain;
[0168] The network access audit logic declared in the smart contract published on the blockchain is called, and a voting event is written in the transaction log. After the audit node of the blockchain monitors the voting event, the voting transaction is submitted to the smart contract; the smart contract summarizes and organizes the voting transactions to obtain the network access audit result.
[0169] Optionally, the blockchain includes a consortium chain.
[0170] In the above-mentioned embodiment of the electronic device, it should be understood that the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can be any conventional processor, etc., and the aforementioned memory can be a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk or a solid-state drive. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.
[0171] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the electronic device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0172] Those skilled in the art will readily appreciate other embodiments of the specification after considering the specification and practicing the invention disclosed herein. The specification is intended to cover any variations, uses, or adaptations of the specification that follow the general principles of the specification and include common knowledge or customary techniques in the art that are not disclosed in the specification. The specification and examples are to be considered exemplary only, and the true scope and spirit of the specification are indicated by the following claims.
[0173] It should be understood that the present description is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
Claims
1. A decision-making method based on blockchain, the method comprising: Receiving a decision-making smart contract submitted by a decision-maker; wherein the decision-making smart contract declares the problem to be decided and the decision options; Broadcasting the decision-making smart contract to multiple decision nodes in the blockchain; wherein the decision node is a node corresponding to a decision-making system connected to the blockchain, and the decision-making system is audited by an audit node in the blockchain; Obtaining the execution result returned by each decision node after executing the decision smart contract individually; wherein the execution result is the decision option determined from the declared decision options by the decision node after executing the decision smart contract to obtain the declared problem to be decided and decision options, and then running the problem to be decided based on the decision system outside the blockchain; A decision result is determined according to the execution result.
2. According to the method of claim 1, determining the decision result according to the execution result specifically comprises: Counting the number of identical decision options in the execution results; If the number of any decision option reaches the threshold, the decision option is determined as the decision result. The method according to claim 2 , wherein the threshold is determined based on the number of decision nodes.
4. The method according to claim 1, further comprising: The decision result is returned to the decision maker.
5. The method according to claim 1, after receiving the decision-making smart contract submitted by the decision-making party, the method further comprises: Calling the creation logic declared in the smart contract published on the blockchain, and storing the decision smart contract on the blockchain; The contract audit logic declared in the smart contract published on the blockchain is called, and a voting event is written into the transaction log. After the audit node of the blockchain monitors the voting event, the voting transaction is submitted to the smart contract; the smart contract summarizes and organizes the voting transactions to obtain the audit result of the decision-making smart contract; Broadcasting the decision-making smart contract to the decision-making nodes in the blockchain specifically includes: If the audit result is passed, the decision-making smart contract is broadcast to the decision-making nodes in the blockchain.
6. According to the method according to any one of claims 1 to 5, the blockchain includes a consortium chain.
7. A decision-making device based on blockchain, comprising: A receiving unit receives a decision-making smart contract submitted by a decision-maker; wherein the decision-making smart contract declares the problem to be decided and the decision options; A broadcasting unit, broadcasting the decision-making smart contract to multiple decision nodes in the blockchain; wherein the decision node is a node corresponding to a decision-making system connected to the blockchain, and the decision-making system is audited by an audit node in the blockchain; An acquisition unit, which acquires an execution result returned after each decision node executes the decision smart contract individually; wherein the execution result is a decision option determined from the declared decision options by the decision node after executing the decision smart contract to obtain the declared problem to be decided and the decision options, and then running the problem to be decided based on a decision system outside the blockchain; A determination unit determines a decision result according to the execution result.
8. The device according to claim 7, wherein the determining unit specifically comprises: A counting subunit, which counts the number of identical decision options in the execution result; The determination subunit determines that if the number of any decision option reaches a threshold, the decision option is determined as a decision result.
9. The apparatus according to claim 8, wherein the threshold is determined based on the number of decision nodes.
10. The device according to claim 7, further comprising: The returning unit returns the decision result to the decision maker.
11. The device according to claim 7, after the receiving unit, further comprising: A contract creation subunit, calling the creation logic declared in the smart contract published on the blockchain, and storing the decision smart contract on the blockchain; The contract audit subunit calls the contract audit logic declared in the smart contract published on the blockchain, writes a voting event in the transaction log, and after the audit node of the blockchain monitors the voting event, it submits the voting transaction to the smart contract; The smart contract summarizes and organizes the voting transactions to obtain the audit results of the decision-making smart contract; The broadcast unit specifically includes: If the audit result is passed, the decision-making smart contract is broadcast to the decision-making nodes in the blockchain.
12. The device according to any one of claims 7 to 11, wherein the blockchain comprises a consortium chain.
13. An electronic device, comprising: processor; a memory for storing processor-executable instructions; The processor is configured to implement the method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Program execution method and system
CN107341402A
Method for supporting artificial participation in block chain decision, electronic equipment and system
CN107846289A
Node management method and implementation system thereof
CN108737175A
Establishing overlay trust consensus for blockchain trust validation system
US20180101560A1
