CN106843774B - A kind of mass-rent construction method of the intelligent contract based on block chain - Google Patents
A kind of mass-rent construction method of the intelligent contract based on block chain Download PDFInfo
- Publication number
- CN106843774B CN106843774B CN201710104393.4A CN201710104393A CN106843774B CN 106843774 B CN106843774 B CN 106843774B CN 201710104393 A CN201710104393 A CN 201710104393A CN 106843774 B CN106843774 B CN 106843774B
- Authority
- CN
- China
- Prior art keywords
- smart contract
- contract
- user
- block
- party
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/062—Securing storage systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/10—Office automation; Time management
- G06Q10/103—Workflow collaboration or project management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/12—Applying verification of the received information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/50—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2209/00—Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
- H04L2209/56—Financial cryptography, e.g. electronic payment or e-cash
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Human Resources & Organizations (AREA)
- Strategic Management (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Entrepreneurship & Innovation (AREA)
- General Business, Economics & Management (AREA)
- Tourism & Hospitality (AREA)
- Quality & Reliability (AREA)
- Operations Research (AREA)
- Marketing (AREA)
- Economics (AREA)
- Data Mining & Analysis (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本发明公开了一种基于区块链的智能合约的众包构建方法,包括:1、合约甲方对包含任务和规则的智能合约进行签名并发布到区块链的主链上;2、合约乙方根据合约甲方发布的合约任务认领若干所述合约子任务并将认领信息添加在支链上;3、系统检查甲方合约的所有子任务是否都能被乙方完成;4、甲方和乙方联合签名发布智能合约到区块链主链上,合约自动执行。本发明公开透明的监控合约的构建过程,自动监控合约的执行过程;从而能降低众包合约构建及执行过程中存在的风险。
The invention discloses a crowdsourcing construction method of a block chain-based smart contract, including: 1. Party A of the contract signs the smart contract containing tasks and rules and publishes it to the main chain of the block chain; 2. the contract Party B claims several subtasks of the contract according to the contract tasks issued by Party A of the contract and adds the claim information to the branch chain; 3. The system checks whether all subtasks of Party A's contract can be completed by Party B; 4. Party A and Party B The joint signature publishes the smart contract to the blockchain main chain, and the contract is automatically executed. The invention can openly and transparently monitor the construction process of the contract, and automatically monitor the execution process of the contract; thus, the risk existing in the construction and execution process of the crowdsourcing contract can be reduced.
Description
技术领域technical field
本发明属于区块链技术领域,具体的说是一种基于区块链的智能合约的众包构建方法。The invention belongs to the technical field of block chains, and specifically relates to a crowdsourcing construction method of smart contracts based on block chains.
背景技术Background technique
在社会生产中,不管是公司、机构还是个人都会遇到一些自身难以解决的问题。这时,公司或机构可能会选择将这样的问题外包给别的公司或机构去完成。随着互联网的发展,人们提出了一种新的解决办法,将企业自身不能解决的问题以自由自愿的形式外包给非特定的大众的方法。这种外包的任务通常由个人来承担,但如果涉及到需要多人协作完成的任务,也有可能以依靠开源的个体生产的形式出现。In social production, no matter whether it is a company, an institution or an individual, they will encounter some problems that are difficult to solve by themselves. At this time, the company or institution may choose to outsource such problems to other companies or institutions to complete. With the development of the Internet, people have proposed a new solution, which is to outsource the problems that the enterprise itself cannot solve to the non-specific public in a free and voluntary manner. This kind of outsourcing task is usually undertaken by individuals, but if it involves tasks that require the cooperation of multiple people, it may also appear in the form of individual production relying on open source.
传统意义上的外包更多是交给专业性的组织或团队,这种关系是有针对性和契约性的;而互联网上的外包范围则更加宽泛,参与者可以是该领域的专业人士,也可以是非专业人士。人们将这种一对多的外包形式称为众包,众包充分利用了互联网用户多元化的背景。在某种程度上说,众包提供了一种组织劳动力的全新方式。互联网用户复杂、多元化的文化、教育、地域背景则进一步吸引了众多企业转向利用互联网众包获取解决方案。Outsourcing in the traditional sense is more handed over to professional organizations or teams, and this relationship is targeted and contractual; while the scope of outsourcing on the Internet is broader, and participants can be professionals in the field, or Can be non-professional. People call this one-to-many form of outsourcing crowdsourcing, and crowdsourcing makes full use of the diverse backgrounds of Internet users. In a way, crowdsourcing offers a whole new way of organizing the workforce. The complex and diverse cultural, educational, and geographical backgrounds of Internet users have further attracted many companies to use Internet crowdsourcing to obtain solutions.
然而目前的众包协议的签订必须依赖于第三方平台,需求任务的信息来源的真实性完全取决于第三方的可信度得不到实质性的保障,且需要耗费较多的管理成本。对于需求任务的解决方,由于没有有效的解决方案监控措施,导致目前众包的解决方案良莠不齐,甚至于存在很多抄袭、虚假的现象,任务提出者并不能得到满意的解决方案且耗费时间和成本;另一方面解决方案提出者的知识产权也因为对合约执行过程缺乏监控,而得不到有效的保护。However, the signing of the current crowdsourcing agreement must rely on the third-party platform. The authenticity of the information source of the required task depends entirely on the credibility of the third party, which cannot be substantially guaranteed, and requires a lot of management costs. For the solver of the required task, due to the lack of effective solution monitoring measures, the current crowdsourcing solutions are uneven, and there are even many plagiarism and false phenomena. The task proposer cannot get a satisfactory solution and it is time-consuming and costly. ; On the other hand, the intellectual property rights of the solution provider are not effectively protected because of the lack of monitoring of the contract execution process.
发明内容Contents of the invention
本发明是为了解决上述现有技术存在的不足之处,提出一种基于区块链的智能合约的众包构建方法,以期能通过去中心化的分布式数据存储方法解决中心化的数据存储存在的信息易篡改、不可靠问题,通过智能合约程序自动执行的方式解决对合约执行状态的监控问题,从而降低众包合约构建及执行过程中存在的风险。In order to solve the shortcomings of the above-mentioned existing technologies, the present invention proposes a crowdsourcing construction method based on blockchain-based smart contracts, hoping to solve the problems of centralized data storage through a decentralized distributed data storage method. The information is easy to tamper and unreliable, and the monitoring problem of the contract execution status is solved through the automatic execution of the smart contract program, thereby reducing the risks in the process of crowdsourcing contract construction and execution.
本发明为解决技术问题采用如下技术方案:The present invention adopts following technical scheme for solving technical problems:
本发明一种基于区块链的智能合约的众包构建方法的特点是按如下步骤执行:A feature of the crowdsourcing construction method based on blockchain-based smart contracts of the present invention is to perform the following steps:
步骤一、定义所述智能合约的用户集合为U={Vα,V},Vα为所述智能合约的甲方,V为所述智能合约的乙方集合,并有:V={V1,V2,...,Vi,...,Vm},Vi为所述乙方集合中第i个用户,1≤i≤m;Step 1. Define the set of users of the smart contract as U={V α ,V}, where V α is Party A of the smart contract, V is the set of Party B of the smart contract, and: V={V 1 ,V 2 ,...,V i ,...,V m }, V i is the i-th user in the set of Party B, 1≤i≤m;
步骤二、智能合约任务和规则的发布:Step 2. Release of smart contract tasks and rules:
所述甲方Vα用自身私钥对包含任务和规则的智能合约进行签名,并由矿工将签名过的智能合约作为区块TR添加到区块链的主链上;所述智能合约的任务记为T={t1,t2,...,tp,...,tn},tp为第p个子任务;1≤p≤n;The party A V α signs the smart contract containing tasks and rules with its own private key, and the miners add the signed smart contract as a block TR to the main chain of the block chain; the task of the smart contract Recorded as T={t 1 ,t 2 ,...,t p ,...,t n }, t p is the pth subtask; 1≤p≤n;
步骤三、合约任务的认领:Step 3. Claiming of contract tasks:
步骤3.1、定义以所述区块TR为起点的支链上的区块数量为ρ,并初始化ρ=0;Step 3.1. Define the number of blocks on the branch chain starting from the block TR as ρ, and initialize ρ=0;
步骤3.2、假设第i个用户Vi期望认领所述任务中的若干个子任务,则第i个用户Vi查询所述区块TR为起点的支链上是否存在终止区块;若存在,则表示所述智能合约已经签订完成,若不存在,则执行步骤3.3;Step 3.2, assuming that the i-th user V i expects to claim several sub-tasks in the task, then the i-th user V i inquires whether there is a termination block on the branch chain starting from the block TR; if it exists, then Indicates that the smart contract has been signed, if it does not exist, go to step 3.3;
步骤3.3、初始化p=1;Step 3.3, initializing p=1;
步骤3.4、由所述第i个用户Vi标记所述任务中第p个子任务tp的认领意愿状态当代表第i个用户Vi期望认领第p个子任务tp;当代表第i个用户Vi不认领第p个子任务tp;Step 3.4: The i-th user V i marks the state of the willingness to claim the p-th sub-task t p in the task when represents that the i-th user V i expects to claim the p-th subtask t p ; when Indicates that the i-th user V i does not claim the p-th subtask t p ;
步骤3.5、将p+1赋值给p后,返回步骤3.4,直到p=n为止,从而得到所述第i个用户Vi对所有子任务的认领意愿状态;Step 3.5: After assigning p+1 to p, return to step 3.4 until p=n, so as to obtain the status of the i-th user V i 's willingness to claim all subtasks;
步骤3.6、判断是否成立,若成立,则表示第i个用户Vi期望认领所有子任务并能独立完成,从而根据所述智能合约的规则签订所述智能合约后,执行步骤3.7;否则,执行步骤3.8;Step 3.6, Judgment Whether it is established, if it is established, it means that the i-th user V i expects to claim all subtasks and can complete them independently, so after signing the smart contract according to the rules of the smart contract, execute step 3.7; otherwise, execute step 3.8;
步骤3.7、所述甲方Vα和第i个用户Vi分别对所签订的智能合约进行联合签名,并由矿工将联合签名过的智能合约作为区块添加到区块链的主链上后,矿工在以所述区块TR为起点的支链上的添加终止区块;Step 3.7, the party A V α and the i-th user V i jointly sign the signed smart contract respectively, and the miners add the jointly signed smart contract as a block to the main chain of the block chain , the miner adds a termination block on the branch chain starting from the block TR;
步骤3.8、第i个用户Vi对所述任务中的每个子任务的认领意愿状态进行签名,并由矿工将签名过的所有认领意愿状态添加到区块链的支链上,同时将ρ+1赋值给ρ;Step 3.8. The i-th user V i signs the state of claim willingness of each subtask in the task, and the miner adds all signed state of claim willingness to the branch chain of the blockchain, and at the same time ρ+ 1 is assigned to ρ;
步骤四、检查区块链的支链,判断支链上参与智能合约的所有用户是否能众包完成所述智能合约的所有子任务:Step 4. Check the branch chain of the blockchain to determine whether all users participating in the smart contract on the branch chain can crowdsource and complete all the subtasks of the smart contract:
步骤4.1、定义所述区块链的支链上的所有用户为{V1′,V2′,...,Vk′,...,Vρ′};Vk′表示所述支链上的第k个用户,1≤k≤ρ;定义第q个子任务tq所分配给的用户记为Vq″;1≤q≤n;初始化Vq″=NULL;Step 4.1. Define all users on the branch chain of the blockchain as {V 1 ′, V 2 ′,...,V k ′,...,V ρ ′}; V k ′ represents the The kth user on the chain, 1≤k≤ρ; define the user assigned to the qth subtask t q as V q ″; 1≤q≤n; initialize V q ″=NULL;
步骤4.2、初始化q=1;Step 4.2, initialize q=1;
步骤4.3、初始化k=1;Step 4.3, initialization k=1;
步骤4.4、判断是否成立,若成立,则将Vk′赋值给Vq″,并将q+1赋值给q,返回步骤4.3,直到q=n为止;否则,将k+1赋值给k,返回步骤4.4,直到k=ρ为止;Step 4.4, Judgment Whether it is true, if true, then assign V k ′ to V q ″, and assign q+1 to q, and return to step 4.3 until q=n; otherwise, assign k+1 to k, and return to step 4.4, until k=rho;
步骤4.5、初始化q=1;Step 4.5, initialize q=1;
步骤4.6、判断Vq″=NULL是否成立,若成立,表示存在未认领的子任务,则等待其他用户认领并返回步骤3.2;若不成立,则将q+1赋值给q,返回步骤4.6,直到q=n为止;Step 4.6. Determine whether V q ″=NULL is true. If true, it means that there are unclaimed subtasks, then wait for other users to claim and return to step 3.2; if not, assign q+1 to q, and return to step 4.6 until until q=n;
步骤4.7、所有子任务均被认领和分配完成,从而根据所述智能合约的规则签订所述智能合约;Step 4.7, all subtasks are claimed and assigned, and the smart contract is signed according to the rules of the smart contract;
步骤4.8、所述甲方Vα和所有分配子任务的用户分别对所签订的智能合约进行联合签名,并由矿工将联合签名过的智能合约作为区块添加到区块链的主链上后,矿工在以所述区块TR为起点的支链上的添加终止区块。Step 4.8, the party A V α and all users assigned sub-tasks jointly sign the signed smart contract respectively, and the miners add the jointly signed smart contract as a block to the main chain of the blockchain , the miner adds a termination block on the branch chain starting from the block TR.
与现有技术相比,本发明的有益效果在于:Compared with prior art, the beneficial effect of the present invention is:
1、本发明利用基于区块链的分布式数据存储技术使得构建的众包智能合约在没有第三方的情况下可靠且不可篡改,且众包智能合约以程序的方式执行保障了合约执行结果的可预知性。1. The present invention utilizes blockchain-based distributed data storage technology to make the constructed crowdsourcing smart contract reliable and tamper-proof without a third party, and the crowdsourcing smart contract is executed in a procedural manner to ensure the integrity of the contract execution results. predictability.
2、本发明通过将合约任务以区块的形式分布式发布在区块链主链上,从而省去了第三方的中间环节,使得任务发布方和问题解决者可以直接取得联系;将合约任务发布在区块链主链上也使得任务的来源公开透明、需求的内容和规则不可篡改,从而保证了合约任务发布的可靠性。2. The present invention distributes the contract tasks in the form of blocks on the blockchain main chain, thereby eliminating the need for third-party intermediate links, so that the task issuer and the problem solver can directly get in touch; the contract task Publishing on the blockchain main chain also makes the source of the task open and transparent, and the required content and rules cannot be tampered with, thus ensuring the reliability of the contract task release.
3、本发明通过将用户对合约任务的完成意愿记录在以该合约任务区块为首的支链上,从而记录了合约任务认领的整个过程,保证了合约签订过程的公开透明,也保证了签订的合约的可靠性。3. The present invention records the user's willingness to complete the contract task on the branch chain headed by the contract task block, thereby recording the entire process of claiming the contract task, ensuring the openness and transparency of the contract signing process, and also ensuring the contract signing process. reliability of the contract.
4、本发明签订的众包合约是通过双方联合签名的、以可执行程序的形式发布在区块链主链的智能合约,具有自动执行的特点,从而保障了合约执行结果的可预知性,从而避免了合约双方在合约执行过程中可能因结果不满发生纠纷的问题。4. The crowdsourcing contract signed by the present invention is a smart contract that is jointly signed by both parties and published on the blockchain main chain in the form of an executable program. It has the characteristics of automatic execution, thereby ensuring the predictability of the contract execution results. In this way, the problem of possible disputes between the two parties due to dissatisfaction with the results during the execution of the contract is avoided.
附图说明Description of drawings
图1本发明流程图;Fig. 1 flow chart of the present invention;
图2本发明区块链示意图。Fig. 2 is a schematic diagram of the block chain of the present invention.
具体实施方式detailed description
如图1所示,本实施例中,一种基于区块链的智能合约的众包构建方法是应用于区块链用户之间建立众包的智能合约的,具体的说是按如下步骤执行:As shown in Figure 1, in this embodiment, a blockchain-based crowdsourcing construction method for smart contracts is applied to blockchain users to establish crowdsourcing smart contracts, specifically, it is executed according to the following steps :
步骤一、定义区块链用户中参与构建众包智能合约的用户集合为U={Vα,V},Vα为众包智能合约构建的甲方,V为众包智能合约构建的乙方集合,并有:V={V1,V2,...,Vi,...,Vm},Vi为乙方集合中的第i个用户,且有1≤i≤m;Step 1. Define the set of blockchain users who participate in the construction of crowdsourcing smart contracts as U={V α ,V}, where V α is Party A constructed by crowdsourcing smart contracts, and V is the set of Party B constructed by crowdsourcing smart contracts , and have: V={V 1 ,V 2 ,...,V i ,...,V m }, V i is the i-th user in the set of Party B, and 1≤i≤m;
本实施例中,分布式的区块链数据存储方式对应的是一个P2P网络,所有使用该区块链存储信息的用户都处于一个对等网络中,无中心节点;区块链的一个区块可以是一段时间内用户之间发生交易的总和,也可以是一个智能合约任务和规则或由合约双方签订并联合签名的自动执行的智能合约,每个区块由区块头和区块主体两部分组成;区块头包含区块主体的哈希值、时间戳和用于链接区块的上一区块哈希值等,区块主体包含实际有效的信息。In this embodiment, the distributed blockchain data storage method corresponds to a P2P network, and all users who use the blockchain to store information are in a peer-to-peer network without a central node; a block of the blockchain It can be the sum of transactions between users over a period of time, or it can be a smart contract task and rule or an automatically executed smart contract signed and jointly signed by both parties of the contract. Each block consists of two parts: block header and block body Composition; the block header contains the hash value of the block body, the timestamp and the hash value of the previous block used to link the block, etc., and the block body contains actual and valid information.
步骤二、智能合约任务和规则的发布:Step 2. Release of smart contract tasks and rules:
甲方Vα用自身私钥对包含任务和规则的智能合约进行签名,然后由矿工通过共识算法验证签名信息,并将签名过的智能合约作为区块TR添加到区块链的主链上;智能合约的任务记为T={t1,t2,...,tp,...,tn},tp为第p个子任务;1≤p≤n;区块链的其他用户可通过查询主链上的数据或者建立区块链合约任务查询网站获取区块链需求任务信息。因为需求任务通过了全网的共识且通过密码学方法链接在区块链上,所以保证了需求任务的真实和不可篡改。Party A V α signs the smart contract containing tasks and rules with its own private key, and then the miners verify the signature information through the consensus algorithm, and add the signed smart contract as a block TR to the main chain of the blockchain; The task of the smart contract is recorded as T={t 1 ,t 2 ,...,t p ,...,t n }, t p is the pth subtask; 1≤p≤n; other users of the blockchain The blockchain demand task information can be obtained by querying the data on the main chain or establishing a blockchain contract task query website. Because the required tasks have passed the consensus of the entire network and are linked to the blockchain through cryptographic methods, the authenticity and immutability of the required tasks are guaranteed.
步骤三、合约任务的认领:Step 3. Claiming of contract tasks:
步骤3.1、定义以区块TR为起点的支链上的区块数量为ρ,并初始化ρ=0;Step 3.1. Define the number of blocks on the branch chain starting from the block TR as ρ, and initialize ρ=0;
本实施例中,支链是指记录其他用户对该合约任务认领信息的链,所以以合约任务和规则发布在主链上的区块TR为支链起点,如图2所示。将用户认领需求任务的信息记录在区块链上使得该信息公开透明,且通过密码学方法链接使得认领信息不可篡改,防止虚假认领。In this embodiment, a branch chain refers to a chain that records information about other users claiming the contract task, so the branch chain starts from the block TR published on the main chain by contract tasks and rules, as shown in Figure 2. Recording the information of the user's claiming required tasks on the blockchain makes the information open and transparent, and linking through cryptographic methods makes the claiming information non-tamperable and prevents false claims.
步骤3.2、假设第i个用户Vi期望认领合约任务中的若干个子任务,则第i个用户Vi查询区块TR为起点的支链上是否存在终止区块;若存在,则表示智能合约已经签订完成,该合约不会再接受其他用户提出完成合约任务的申请;若不存在,则执行步骤3.3;Step 3.2. Assuming that the i-th user V i expects to claim several sub-tasks in the contract task, then the i-th user V i inquires whether there is a termination block on the branch chain starting from the block TR; if it exists, it means that the smart contract Once the contract has been signed, the contract will no longer accept applications from other users to complete the contract task; if it does not exist, go to step 3.3;
步骤3.3、初始化p=1;Step 3.3, initialize p=1;
步骤3.4、由第i个用户Vi标记任务中第p个子任务tp的认领意愿状态当代表第i个用户Vi期望认领第p个子任务tp;当代表第i个用户Vi不认领第p个子任务tp;Step 3.4: The i-th user V i marks the status of the willingness to claim the p-th sub-task t p in the task when represents that the i-th user V i expects to claim the p-th subtask t p ; when Indicates that the i-th user V i does not claim the p-th subtask t p ;
步骤3.5、将p+1赋值给p后,返回步骤3.4,直到p=n为止,完成通过从1到n的一次循环完成用户Vi对任务中愿意完成子任务的标记,从而得到第i个用户Vi对所有子任务的认领意愿状态;Step 3.5. After assigning p+1 to p, return to step 3.4 until p=n, and complete the user V i 's marking of the subtasks willing to complete the task through a cycle from 1 to n, so as to obtain the i-th User V i 's willingness to claim all subtasks;
步骤3.6、判断是否成立,若成立,则表示第i个用户Vi能够独立完成所有合约子任务,这时合约任务发布的甲方用户和认领合约任务的乙方用户根据智能合约的规则签订所述智能合约,执行步骤3.7;若不成立,则表示第i个用户Vi只能完成合约的部分子任务,执行步骤3.8,将用户Vi的认领意愿记录在支链上;Step 3.6, Judgment Whether it is established, if it is established, it means that the i-th user V i can independently complete all contract sub-tasks. At this time, the user of Party A who issued the contract task and the user of Party B who claimed the contract task signed the smart contract according to the rules of the smart contract, and executed Step 3.7; if it is not established, it means that the i-th user V i can only complete part of the sub-tasks of the contract, perform step 3.8, and record the claim intention of user V i on the branch chain;
本实施例中,若有用户能独立完成甲方发布的所有合约子任务,则甲方优先与该乙方签订智能合约而不再考虑其他用户对该合约子任务的认领,且能独立完成合约所有子任务的乙方不必将自己对合约任务的认领记录在支链上。In this embodiment, if a user can independently complete all contract sub-tasks released by Party A, Party A will first sign a smart contract with Party B without considering other users’ claims for the contract sub-tasks, and can independently complete all contract sub-tasks. Party B of the subtask does not need to record his claim of the contract task on the branch chain.
步骤3.7、甲方Vα和第i个用户Vi分别对所签订的智能合约进行联合签名,并由矿工将联合签名过的智能合约作为区块添加到区块链的主链上,然后由矿工在以区块TR为起点的支链上的添加终止区块;防止其他用户再对该合约任务的认领。Step 3.7, Party A V α and i-th user V i jointly sign the signed smart contract respectively, and the miner adds the jointly signed smart contract as a block to the main chain of the blockchain, and then The miner adds a termination block on the branch chain starting from the block TR; prevents other users from claiming the contract task.
步骤3.8、第i个用户Vi对任务中的n个子任务的认领意愿状态进行签名,然后由矿工通过共识算法验证,并将签名过的认领意愿状态添加到区块链的支链上,同时将ρ+1赋值给ρ;Step 3.8. The i-th user V i signs the status of claim willingness of the n subtasks in the task, and then the miners verify it through the consensus algorithm, and add the signed claim willing status to the branch chain of the blockchain. At the same time Assign ρ+1 to ρ;
步骤四、检查区块链的支链,判断支链上参与智能合约的所有用户是否能众包完成智能合约的所有子任务:Step 4. Check the branch chain of the blockchain to determine whether all users participating in the smart contract on the branch chain can crowdsource and complete all subtasks of the smart contract:
步骤4.1、定义区块链的支链上的所有用户为{V1′,V2′,...,Vk′,...,Vρ′};Vk′表示支链上的第k个用户,1≤k≤ρ;定义第q个子任务tq所分配给的用户记为Vq″;1≤q≤n;初始化所有的Vq″=NULL;Step 4.1, define all users on the branch chain of the blockchain as {V 1 ′, V 2 ′,...,V k ′,...,V ρ ′}; V k ′ represents the first user on the branch chain k users, 1≤k≤ρ; define the user assigned to the qth subtask t q as V q ″; 1≤q≤n; initialize all V q ″=NULL;
步骤4.2、初始化q=1;Step 4.2, initialize q=1;
步骤4.3、初始化k=1;Step 4.3, initialization k=1;
步骤4.4、判断是否成立,若成立,则表示支链上的第k个用户能完成第q个合约子任务,将第q个子任务tq拟分配给用户Vk′执行Vq″=Vk′、q=q+1,返回步骤4.3,直到q=n为止;否则,将k+1赋值给k,返回步骤4.4,直到k=ρ为止;Step 4.4, Judgment Whether it is true, if true, it means that the kth user on the branch chain can complete the qth subtask of the contract, and the qth subtask t q will be assigned to the user V k ′ to execute V q ″=V k ′, q= q+1, return to step 4.3 until q=n; otherwise, assign k+1 to k, return to step 4.4 until k=ρ;
本实施例中,上述双层循环是对支链上用户认领合约子任务的状态进行检查;一次内层循环检查一个子任务是否有用户认领,外层循环q从1到n表示依次对n个子任务进行检查。In this embodiment, the above-mentioned two-layer loop is to check the status of the sub-task claimed by the user on the branch chain; once the inner loop checks whether a sub-task has been claimed by the user, and the outer loop q from 1 to n indicates that n sub-tasks are processed sequentially. task to check.
步骤4.5、初始化q=1;Step 4.5, initialize q=1;
步骤4.6、判断Vq″=NULL是否成立,若成立,表示存在未认领的子任务,则等待其他用户认领并返回步骤3.2;若不成立,则将q+1赋值给q,返回步骤4.6,直到q=n为止;用一次循环查找是否还有未被领取的子任务。若不存在Vq″=NULL则表示所有子任务均可被完成,执行步骤4.7。Step 4.6. Determine whether V q ″=NULL is true. If true, it means that there are unclaimed subtasks, then wait for other users to claim and return to step 3.2; if not, assign q+1 to q, and return to step 4.6 until Until q=n; use a loop to find out whether there are subtasks that have not been received. If there is no V q ″=NULL, it means that all subtasks can be completed, go to step 4.7.
步骤4.7、所有子任务均被认领和分配完成,从而根据智能合约的规则签订智能合约;Step 4.7. All sub-tasks are claimed and assigned, and a smart contract is signed according to the rules of the smart contract;
步骤4.8、甲方Vα和所有分配子任务的用户对所签订的智能合约进行联合签名,并由矿工将联合签名过的智能合约作为区块添加到区块链的主链上后,矿工在以区块TR为起点的支链上的添加终止区块。Step 4.8, Party A V α and all users assigned subtasks jointly sign the signed smart contract, and after the miner adds the jointly signed smart contract as a block to the main chain of the blockchain, the miner The addition terminates the block on the branch chain starting from the block TR.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710104393.4A CN106843774B (en) | 2017-02-24 | 2017-02-24 | A kind of mass-rent construction method of the intelligent contract based on block chain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710104393.4A CN106843774B (en) | 2017-02-24 | 2017-02-24 | A kind of mass-rent construction method of the intelligent contract based on block chain |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106843774A CN106843774A (en) | 2017-06-13 |
CN106843774B true CN106843774B (en) | 2017-12-26 |
Family
ID=59133597
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710104393.4A Active CN106843774B (en) | 2017-02-24 | 2017-02-24 | A kind of mass-rent construction method of the intelligent contract based on block chain |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106843774B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11570169B2 (en) | 2019-09-25 | 2023-01-31 | International Business Machines Corporation | Multi-factor authentication via multiple devices |
US11687904B2 (en) | 2019-11-04 | 2023-06-27 | International Business Machines Corporation | Downstream tracking of content consumption |
Families Citing this family (27)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107342858B (en) * | 2017-07-05 | 2019-09-10 | 武汉凤链科技有限公司 | A kind of intelligent contract guard method and system based on trusted context |
US10230530B2 (en) | 2017-08-05 | 2019-03-12 | Proclus Technologies Limited | Method and system for securing a blockchain with proof-of-transactions |
US10594488B2 (en) | 2017-08-05 | 2020-03-17 | Proclus Technologies Limited | Method and system for implementing automatic transaction rebroadcasting for transient blockchains |
CN107743064A (en) * | 2017-09-28 | 2018-02-27 | 深圳市易成自动驾驶技术有限公司 | The common recognition method and system of block chain |
US11574268B2 (en) * | 2017-10-20 | 2023-02-07 | International Business Machines Corporation | Blockchain enabled crowdsourcing |
CN108009823A (en) * | 2017-11-03 | 2018-05-08 | 厦门快商通信息技术有限公司 | The distributed call method and system for calculating power resource based on block chain intelligence contract |
CN108055119B (en) * | 2017-12-11 | 2021-07-20 | 北方工业大学 | A blockchain-based security incentive method and system for crowd-sensing applications |
CN108171606A (en) * | 2018-01-11 | 2018-06-15 | 北京欧链科技有限公司 | The distribution method and device of block chain assets |
CN108335107B (en) * | 2018-01-26 | 2022-02-22 | 广东工业大学 | Collaborative manufacturing information interaction method based on block chain |
CN108306873A (en) * | 2018-01-26 | 2018-07-20 | 广东工业大学 | A kind of intelligent contract data interactive system based on manufacture block chain |
CN108846653A (en) * | 2018-06-15 | 2018-11-20 | 上海交通大学 | Big data secure sharing method and system based on block chain |
CN108769256A (en) * | 2018-06-26 | 2018-11-06 | 深圳市亿道数码技术有限公司 | A kind of method for allocating tasks and system based on block chain |
CN108876489A (en) * | 2018-08-30 | 2018-11-23 | 北京百度网讯科技有限公司 | Intelligent finance collection method, system, computer equipment and storage medium |
CN109492986A (en) * | 2018-09-30 | 2019-03-19 | 深圳市元征科技股份有限公司 | A kind of service cooperation match method and device based on block chain |
CN109636384A (en) * | 2018-10-26 | 2019-04-16 | 阿里巴巴集团控股有限公司 | A kind of parallelization executes the method, apparatus and system of block chain transaction |
CN109598507A (en) * | 2018-11-02 | 2019-04-09 | 北京维泽瑞科技有限公司 | A kind of Internet Engineering Task dissemination method and system based on digital asset |
CN109445948A (en) * | 2018-11-15 | 2019-03-08 | 济南浪潮高新科技投资发展有限公司 | A kind of data mark crowdsourcing plateform system and crowdsourcing data mask method based on intelligent contract |
CN109740622A (en) * | 2018-11-20 | 2019-05-10 | 众安信息技术服务有限公司 | Image labeling task crowdsourcing method and system based on the logical card award method of block chain |
CN109587253B (en) * | 2018-12-11 | 2021-06-29 | 浙江大学 | A method for distributed storage of files based on blockchain |
CN109658064A (en) * | 2018-12-18 | 2019-04-19 | 撷华(上海)信息技术有限公司 | A kind of task cooperative method based on intelligent contract |
WO2020229884A1 (en) * | 2019-05-10 | 2020-11-19 | Proclus Technologies Limited | Method and system for implementing automatic transaction rebroadcasting for transient blockchains |
CN110232507B (en) * | 2019-05-28 | 2021-07-27 | 中国人民解放军国防科技大学 | The whole process supervision method and system of crowdsourcing activities based on smart contract |
CN112184447A (en) * | 2020-09-30 | 2021-01-05 | 上海旺链信息科技有限公司 | Task processing method and system based on block chain |
CN112396489B (en) * | 2020-10-27 | 2024-02-02 | 宁波指量科技有限公司 | Personal financial bad asset package transaction information pushing system |
CN113595979B (en) * | 2021-06-25 | 2022-12-27 | 福建师范大学 | Crowdsourcing data privacy protection method based on cross-chain |
CN114819959A (en) * | 2022-04-12 | 2022-07-29 | 云南天上人间茶业有限公司 | A method of constructing smart contracts in blockchain |
CN115174589B (en) * | 2022-05-20 | 2023-11-03 | 网易(杭州)网络有限公司 | Selection method and device of blockchain virtual machine, electronic equipment and storage medium |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8195498B2 (en) * | 2009-05-18 | 2012-06-05 | Microsoft Corporation | Modeling a plurality of contests at a crowdsourcing node |
CN104794644B (en) * | 2015-04-16 | 2018-07-17 | 西安交通大学 | A kind of task crowdsourcing method of Intelligent Service Oriented business engine |
CN105893042A (en) * | 2016-03-31 | 2016-08-24 | 北京航空航天大学 | Intelligent contract implementation method based on block chain |
CN105913219A (en) * | 2016-04-05 | 2016-08-31 | 周宇航 | Method and system used for monitoring and managing whole actuating process of electronic contract |
CN105956880A (en) * | 2016-04-27 | 2016-09-21 | 天津三千里云信息技术有限公司 | Sales promotion system |
-
2017
- 2017-02-24 CN CN201710104393.4A patent/CN106843774B/en active Active
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11570169B2 (en) | 2019-09-25 | 2023-01-31 | International Business Machines Corporation | Multi-factor authentication via multiple devices |
US11687904B2 (en) | 2019-11-04 | 2023-06-27 | International Business Machines Corporation | Downstream tracking of content consumption |
Also Published As
Publication number | Publication date |
---|---|
CN106843774A (en) | 2017-06-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106843774B (en) | A kind of mass-rent construction method of the intelligent contract based on block chain | |
Wan et al. | Blockchain application and collaborative innovation in the manufacturing industry: Based on the perspective of social trust | |
Lu et al. | Blockchain technology for governmental supervision of construction work: Learning from digital currency electronic payment systems | |
TWI712982B (en) | Blockchain-based map application crowd outsourcing, computer realization method, computer readable storage medium and system | |
Alam | Blockchain and internet of things in higher education | |
Han et al. | A novel blockchain-based education records verification solution | |
CN106485167B (en) | Credit recording system and method based on block chain | |
CN109445948A (en) | A kind of data mark crowdsourcing plateform system and crowdsourcing data mask method based on intelligent contract | |
CN105893042A (en) | Intelligent contract implementation method based on block chain | |
CN110084070A (en) | A kind of identity of the cross-domain isomeric data of manufacturing industry based on block chain constructs and source tracing method | |
CN110232507A (en) | Intelligent contract-based crowdsourcing activity overall process supervision method and system | |
CN111899023B (en) | Block chain-based crowd-sourced method and system for crowd-sourced machine learning security through crowd sensing | |
CN112862303A (en) | Crowdsourcing quality evaluation system and method based on block chain | |
CN114091953A (en) | A Trusted Evaluation Method and System Based on Heterogeneous Blockchain | |
Xue et al. | Exploring the innovative blockchain-based application of online learning system in university | |
CN110727735B (en) | Method, device and equipment for cooperatively completing task event based on block chain technology | |
Alkhudary et al. | Utilizing blockchain to enhance project management information systems: insights into project portfolio success, knowledge management and learning capabilities | |
CN115496601A (en) | Loan system and method for recording carbon-neutral carbon emission based on block chain | |
Rachad et al. | A smart contract architecture framework for insurance industry using blockchain and business process management technology | |
CN109886678A (en) | A kind of art work traceability system based on block chain | |
CN115269864B (en) | A method and system for constructing agricultural crowdsourcing knowledge graph based on blockchain | |
WO2018235028A1 (en) | A holistic human capital management digital platform | |
TWM597930U (en) | Intelligent system of implementing loan collateral | |
Sharma et al. | A blockchain based approach for improving transparency and traceability in silk production and marketing | |
Li et al. | Blockchain-based Crowdsourcing Task Management and Solution Verification Method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |