Supply chain intelligent contract fulfillment method and device based on block chain
By adopting a blockchain-based smart contract performance method in the supply chain, the performance results of electronic contracts are automatically verified, and the problem of low performance verification efficiency in the existing technology is solved, and efficient and effective verification of performance results is achieved.
Patent Information
- Application Number
- CN202311528393.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-16
- Publication Date
- 2025-05-16
AI Technical Summary
In the prior art, the performance execution results of electronic contracts are difficult to be effectively verified, and the verification efficiency is low.
The blockchain-based supply chain smart contract performance method is adopted, and the performance results are automatically verified by obtaining electronic contract data and pre-set data verification methods.
Ensure the effectiveness of the performance implementation results, improve the efficiency of verification of the performance results, and solve the problem of electronic contract performance verification.
Smart Images

Figure CN120013710A_ABST
Abstract
Description
[0001] The present invention relates to the field of supply chain technology, and in particular to a supply chain smart contract fulfillment method and device based on blockchain. Background Art
[0002] Supply chain refers to the network structure formed by upstream and downstream enterprises involved in the production and distribution process that provide products or services to end users, that is, the entire chain from merchants to consumers.
[0003] At present, when signing contracts in supply chain business, more and more electronic contracts are used to sign contracts to replace the traditional offline manual business methods. However, in the process of executing electronic contracts, manual inspection is usually used, and the performance and execution results of electronic contracts are difficult to be effectively verified, and the verification efficiency is low. Summary of the invention
[0004] In view of this, the embodiments of the present invention provide a supply chain smart contract performance method and device based on blockchain, so as to solve the problem that the performance execution results of electronic contracts in the prior art are difficult to be effectively verified and the verification efficiency is low.
[0005] The technical solution adopted by the present invention is: In one aspect, the present invention provides a supply chain smart contract performance method based on blockchain, comprising: Acquire electronic contract data in the supply chain and a pre-set data verification method, wherein the electronic contract data includes the electronic contract to be performed, the contract ID, and the first contract hash value; Extracting clause data from the electronic contract data, and generating tasks to be performed according to the clause data and the contract ID; Generate a smart contract for the task to be performed in the blockchain network according to the task to be performed and the data verification method; Obtain the fulfillment confirmation message, execute the pending tasks through the pending tasks smart contract, and output the fulfillment results.
[0006] Furthermore, the acquisition of electronic contract data in the supply chain and the pre-set data verification method include: The business party and the fulfillment party of the supply chain sign the electronic contract to be fulfilled in accordance with the preset fixed format and determine the contract ID of the electronic contract to be fulfilled; The business party calculates the first contract hash value of the contract to be performed using a preset hash algorithm, and uploads the first contract hash value and the contract ID to the blockchain network for storage; The business party sets the data verification method for successful performance of the electronic contract to be performed according to business needs.
[0007] Furthermore, the data verification method includes full match verification, partial match verification and conditional match verification.
[0008] Furthermore, the method also includes: the business party encrypts the contract to be performed and the contract ID by a preset encryption and decryption method to obtain encrypted contract data, and transmits the encrypted contract data to the performing party.
[0009] Furthermore, extracting clause data from the electronic contract data and generating tasks to be performed according to the clause data includes: The clause data is extracted from the electronic contract to be performed according to preset data extraction rules, and the tasks to be performed are generated according to the performance method, performance time and performance conditions in the clause data.
[0010] Furthermore, the obtaining of the fulfillment confirmation message, executing the pending fulfillment task through the pending fulfillment task smart contract, and outputting the fulfillment result include: Obtaining the performance confirmation message uploaded by the performing party, and determining the corresponding task to be performed according to the performance confirmation message; the performance confirmation message includes performance data, contract ID and second contract hash value; the performance data is the data obtained by the performing party performing the contract according to the performance method, performance time and performance conditions in the electronic contract to be performed; The smart contract for the task to be fulfilled performs data matching verification on the fulfillment confirmation message according to the data verification method based on the content of the task to be fulfilled; If the data matching verification passes, it is determined that the party that performs the contract has successfully performed the contract. If the data matching verification fails, it is determined that the party that performs the contract has failed to perform the contract.
[0011] Furthermore, obtaining the performance confirmation message uploaded by the performing party includes: The performing party uses the preset encryption and decryption method to encrypt the encrypted contract data sent by the business party and obtains the electronic contract to be performed and the contract ID; The performing party calculates the second hash value of the electronic contract to be performed according to a preset hash algorithm, and uploads the performance data, contract ID and the second hash value of the electronic contract to be performed to the blockchain network as a performance confirmation message.
[0012] Furthermore, the smart contract of the task to be fulfilled performs data matching verification on the fulfillment confirmation message according to the data verification method based on the content of the task to be fulfilled, including: The smart contract to be performed obtains the first contract hash value of the electronic contract to be performed from the blockchain network according to the contract ID; According to the data verification method, the content of the task to be fulfilled, the hash value of the first contract, the fulfillment data, and the hash value of the second contract are matched and verified, and the data matching verification results are output in chronological order.
[0013] Furthermore, the method also includes: after the execution of the task to be fulfilled is completed, generating a corresponding performance record, and storing the performance record in the blockchain network.
[0014] On the other hand, the present invention also provides a supply chain smart contract fulfillment device based on blockchain, comprising: A first data acquisition module, used to acquire electronic contract data in the supply chain and a pre-set data verification method, wherein the electronic contract data includes the electronic contract to be performed, the contract ID and the first contract hash value; A task generation module, used to extract clause data from the electronic contract data, and generate a task to be performed according to the clause data and the contract ID; A contract creation module, used to generate a smart contract for the task to be fulfilled in the blockchain network according to the task to be fulfilled and the data verification method; The fulfillment confirmation module is used to obtain the fulfillment confirmation message, execute the pending tasks through the pending tasks smart contract, and output the fulfillment results.
[0015] In summary, the beneficial effects of the present invention are as follows: The blockchain-based supply chain smart contract fulfillment method provided by the present invention constructs tasks to be fulfilled by extracting clause data from electronic contract data in the supply chain, and generates corresponding smart contracts for tasks to be fulfilled in the blockchain network by combining the tasks to be fulfilled with a pre-set data verification method. When a fulfillment confirmation message is obtained, the tasks to be fulfilled are executed through the smart contracts for tasks to be fulfilled, and the fulfillment of the electronic contracts in the supply chain is automatically verified, and the corresponding fulfillment results are output, thereby ensuring the validity of the fulfillment execution results and improving the verification efficiency of the fulfillment results. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the drawings required for use in the embodiment of the present invention will be briefly introduced below. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work, and these are all within the protection scope of the present invention.
[0017] Figure 1 This is a flowchart of a supply chain smart contract fulfillment method based on blockchain in Example 1 of the present invention; Figure 2 This is a schematic diagram of the structure of the blockchain-based supply chain smart contract fulfillment device in Example 2 of the present invention. Implementation
[0018] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described in conjunction with the drawings in the embodiment of the present invention. It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. In the description of the present invention, it should be understood that the orientation or position relationship indicated by the terms "center", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such a process, method, article or device. In the absence of further restrictions, the elements defined by the phrase "comprising..." do not exclude the existence of other identical elements in the process, method, article or device comprising the elements. If there is no conflict, the various features of the present invention and the embodiments can be combined with each other, all within the protection scope of the present invention. Example 1
[0019] See also Figure 1 , Figure 1 The blockchain-based supply chain smart contract performance method provided in Embodiment 1 of the present invention includes: S1: Obtain the electronic contract data in the supply chain and the pre-set data verification method, wherein the electronic contract data includes the electronic contract to be performed, the contract ID and the hash value of the first contract.
[0020] S2: Extract clause data from the electronic contract data, and generate tasks to be performed based on the clause data and the contract ID.
[0021] S3: Generate a smart contract for the task to be fulfilled in the blockchain network according to the task to be fulfilled and the data verification method; S4: Obtain fulfillment confirmation message, execute the pending tasks through the pending tasks smart contract, and output the fulfillment results.
[0022] Furthermore, in one embodiment, obtaining the electronic contract data in the supply chain and the pre-set data verification method in step S1 includes the following sub-steps: S101: The business party and the performing party of the supply chain sign the electronic contract to be performed in accordance with a preset fixed format and determine the contract ID of the electronic contract to be performed.
[0023] As an optional implementation method of the embodiment of the present invention, signing an electronic contract to be performed in a preset fixed format includes but is not limited to: the business party and the performing party of the supply chain set the terms of the electronic contract in a contract template with a fixed format, and the terms may include the performance method, performance time, and performance conditions, and after the terms are set, the effective signatures of both parties are signed. Among them, the performance time can be the effective time of the contract, the effective time of the contract, the deadline of the contract, and other data.
[0024] S102: The business party calculates the first contract hash value of the contract to be performed using a preset hash algorithm, and uploads the first contract hash value and the contract ID to the blockchain network for storage.
[0025] S103: The business party sets a data verification method for successful performance of the electronic contract to be performed according to business needs.
[0026] Among them, data verification methods include full match verification, partial match verification and conditional match verification.
[0027] In a specific practice, the data verification method for successful performance of the electronic contract to be performed can be set according to the business needs of the business party, or can be set by the business party and the performance party through negotiation. For example, when verifying performance data, it is allowed to pass in the original performance data (group) and set matching conditions for the original performance data. For example, Bank A passes in the hash value of supply chain data A and the corresponding contract ID, and sets the verification condition to full match.
[0028] The format of input performance data is set to: [{value},…, {value}], each value is limited to 4096, and each group of data is limited to 1000 values. The matching conditions can be All or Partial. When the matching condition is set to All, it will succeed only when all values in the array entered by the performing party match; when the matching condition is set to Partial, the match is successful when there is a value in the same position in the array entered by the performing party. When the performing party enters the performance data, it must also enter the hash value of the contract for comparison. The format of the data group can be agreed upon by both parties in advance or synchronized through other means such as interface specifications.
[0029] Furthermore, in one embodiment, the method of the embodiment of the present invention further includes: the business party encrypts the contract to be performed and the contract ID by a preset encryption and decryption method to obtain encrypted contract data, and transmits the encrypted contract data to the performing party. The preset encryption and decryption method can be implemented using an asymmetric encryption algorithm.
[0030] Furthermore, in one embodiment, in step S2 of the embodiment of the present invention, extracting clause data from the electronic contract data and generating tasks to be performed according to the clause data specifically include: The clause data is extracted from the electronic contract to be performed according to the preset data extraction rules, and the tasks to be performed are generated according to the performance method, performance time and performance conditions in the clause data.
[0031] Among them, the preset data extraction rules refer to the rules used for logical judgment in programming in electronic contracts with a fixed format. A set of rules is written for a contract template, and the logic at the code level can be formed based on these rules during programming.
[0032] Furthermore, in one embodiment, obtaining the fulfillment confirmation message in step S4, executing the pending fulfillment task through the pending fulfillment task smart contract, and outputting the fulfillment result includes the following sub-steps: S401: Obtain the performance confirmation message uploaded by the performing party, and determine the corresponding task to be performed according to the performance confirmation message. The performance confirmation message includes performance data, contract ID and the hash value of the second contract; the performance data is the data obtained by the performing party in accordance with the performance method, performance time and performance conditions in the electronic contract to be performed.
[0033] S402: The smart contract for the task to be fulfilled performs data matching verification on the fulfillment confirmation message based on the content of the task to be fulfilled and in accordance with the data verification method.
[0034] S403: If the data matching verification passes, it is determined that the performing party has successfully performed the contract; if the data matching verification fails, it is determined that the performing party has failed to perform the contract.
[0035] The embodiment of the present invention performs data matching through smart contracts. After matching, there are two states: successful matching and failed matching. The matching state is used as the performance basis of the performance party, which can realize effective verification of the performance result.
[0036] Specifically, step S401 obtains the performance confirmation message uploaded by the performing party, including the following process: (1) The performing party uses the preset encryption and decryption method to encrypt the contract data sent by the business party and obtains the electronic contract to be performed and the contract ID.
[0037] (2) The performing party calculates the second hash value of the electronic contract to be performed according to the preset hash algorithm, and uploads the performance data, contract ID and the second hash value of the electronic contract to be performed to the blockchain network as a performance confirmation message.
[0038] Specifically, in one embodiment, the smart contract of the task to be fulfilled in step S402 performs data matching verification on the fulfillment confirmation message based on the content of the task to be fulfilled in accordance with the data verification method, including the following process: (1) The smart contract to be performed obtains the first contract hash value of the electronic contract to be performed from the blockchain network based on the contract ID.
[0039] (2) According to the data verification method, the content of the task to be fulfilled, the hash value of the first contract, the fulfillment data, and the hash value of the second contract are matched and verified, and the data matching verification results are output in chronological order.
[0040] Specifically, under the method content described in the above embodiment, the embodiment of the present invention provides a specific method usage scenario to illustrate the principle of the method. In the method usage scenario, Bank A and Trust Institution B conduct monthly reconciliation in accordance with the contract and other agreements. All original data hash values are set and stored in the smart contract. After Trust Institution B obtains the reconciliation file, it uses the same algorithm to calculate the hash value and matches the data (hash value) through the smart contract to verify the performance. Trust Institution B can verify the number of valid times and other contents through the contract check reconciliation file every month or quarter as the basis for performance. In addition, if the Internet Court has a legal litigation demand, after receiving the original data of Xinwang Bank, the court can match the hash value of the original data through the smart contract to verify the validity of the data. At the same time, it can also query and understand the actual use of the data.
[0041] Furthermore, in one embodiment, the method further includes: after the execution of the to-be-performed task is completed, generating a corresponding performance record, and storing the performance record in the blockchain network. By storing the performance record in the blockchain, the performance of the electronic contract can be tracked, which is convenient for institutions to retrieve and verify.
[0042] The present invention constructs tasks to be performed by extracting clause data from electronic contract data in the supply chain, and generates corresponding smart contracts for tasks to be performed in the blockchain network by combining the tasks to be performed with pre-set data verification methods. When a performance confirmation message is obtained, the tasks to be performed are executed through the smart contracts for tasks to be performed, and the performance of electronic contracts in the supply chain is automatically verified. The corresponding performance results are output, thereby ensuring the validity of the performance execution results and improving the verification efficiency of the performance results. Example 2
[0043] See also Figure 2 The present invention further provides a supply chain smart contract performance device based on blockchain based on the blockchain-based supply chain smart contract performance method of Example 1, including: A first data acquisition module is used to acquire electronic contract data in the supply chain and a pre-set data verification method, where the electronic contract data includes the electronic contract to be performed, the contract ID and the first contract hash value; A task generation module is used to extract clause data from the electronic contract data and generate tasks to be performed based on the clause data and the contract ID; The contract creation module is used to generate a smart contract for tasks to be fulfilled in the blockchain network according to the tasks to be fulfilled and the data verification method; The fulfillment confirmation module is used to obtain the fulfillment confirmation message, execute the pending tasks through the pending tasks smart contract, and output the fulfillment results.
[0044] The blockchain-based supply chain smart contract performance device provided by the embodiment of the present invention extracts the clause data in the electronic contract data in the supply chain through the task generation module, constructs the task to be performed, and uses the contract creation module to generate the corresponding smart contract for the task to be performed in the blockchain network according to the task to be performed and the pre-set data verification method. When the performance confirmation message is obtained, the performance confirmation module executes the task to be performed through the smart contract for the task to be performed, automatically verifies the performance of the electronic contract in the supply chain, and outputs the corresponding performance results, ensuring the validity of the performance execution results, improving the verification efficiency of the performance results, and solving the problem that the performance execution results of electronic contracts in the prior art are difficult to be effectively verified and the verification efficiency is low.
[0045] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0046] The functional blocks shown in the structural block diagram described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0047] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A supply chain smart contract fulfillment method based on blockchain, characterized in that: include: Acquire electronic contract data in the supply chain and a pre-set data verification method, wherein the electronic contract data includes the electronic contract to be performed, the contract ID, and the first contract hash value; Extracting clause data from the electronic contract data, and generating tasks to be performed according to the clause data and the contract ID; Generate a smart contract for the task to be performed in the blockchain network according to the task to be performed and the data verification method; Obtain the fulfillment confirmation message, execute the pending tasks through the pending tasks smart contract, and output the fulfillment results.
2. The blockchain-based supply chain smart contract fulfillment method according to claim 1 is characterized in that: The acquisition of electronic contract data in the supply chain and the pre-set data verification method include: The business party and the fulfillment party of the supply chain sign the electronic contract to be fulfilled in accordance with the preset fixed format and determine the contract ID of the electronic contract to be fulfilled; The business party calculates the first contract hash value of the contract to be performed using a preset hash algorithm, and uploads the first contract hash value and the contract ID to the blockchain network for storage; The business party sets the data verification method for successful performance of the electronic contract to be performed according to business needs.
3. The blockchain-based supply chain smart contract fulfillment method according to claim 2 is characterized in that: The data verification methods include full match verification, partial match verification and conditional match verification.
4. The blockchain-based supply chain smart contract fulfillment method according to claim 2 is characterized in that: Also includes: The business party encrypts the contract to be performed and the contract ID using a preset encryption and decryption method to obtain the encrypted contract data, and transmits the encrypted contract data to the performing party.
5. The blockchain-based supply chain smart contract fulfillment method according to claim 1 is characterized in that: The step of extracting clause data from the electronic contract data and generating tasks to be performed according to the clause data includes: The clause data is extracted from the electronic contract to be performed according to preset data extraction rules, and the tasks to be performed are generated according to the performance method, performance time and performance conditions in the clause data.
6. The blockchain-based supply chain smart contract fulfillment method according to claim 1 is characterized in that: The obtaining of the fulfillment confirmation message, executing the pending fulfillment task through the pending fulfillment task smart contract, and outputting the fulfillment result include: Obtaining the performance confirmation message uploaded by the performing party, and determining the corresponding task to be performed according to the performance confirmation message; the performance confirmation message includes performance data, contract ID and second contract hash value; the performance data is the data obtained by the performing party performing the contract according to the performance method, performance time and performance conditions in the electronic contract to be performed; The smart contract for the task to be fulfilled performs data matching verification on the fulfillment confirmation message according to the data verification method based on the content of the task to be fulfilled; If the data matching verification passes, it is determined that the party that performs the contract has successfully performed the contract. If the data matching verification fails, it is determined that the party that performs the contract has failed to perform the contract.
7. The blockchain-based supply chain smart contract fulfillment method according to claim 6 is characterized in that: The obtaining of the performance confirmation message uploaded by the performing party includes: The performing party uses the preset encryption and decryption method to encrypt the encrypted contract data sent by the business party and obtains the electronic contract to be performed and the contract ID; The performing party calculates the second hash value of the electronic contract to be performed according to a preset hash algorithm, and uploads the performance data, contract ID and the second hash value of the electronic contract to be performed to the blockchain network as a performance confirmation message.
8. The blockchain-based supply chain smart contract fulfillment method according to claim 6 is characterized in that: The smart contract for the task to be fulfilled performs data matching verification on the fulfillment confirmation message according to the data verification method based on the content of the task to be fulfilled, including: The smart contract to be performed obtains the first contract hash value of the electronic contract to be performed from the blockchain network according to the contract ID; According to the data verification method, the content of the task to be fulfilled, the hash value of the first contract, the fulfillment data, and the hash value of the second contract are matched and verified, and the data matching verification results are output in chronological order.
9. The blockchain-based supply chain smart contract fulfillment method according to claim 6 is characterized in that: Also includes: After the execution of the task to be fulfilled is completed, the corresponding fulfillment record is generated and stored in the blockchain network.
10. A supply chain smart contract fulfillment device based on blockchain, characterized in that: include: A first data acquisition module, used to acquire electronic contract data in the supply chain and a pre-set data verification method, wherein the electronic contract data includes the electronic contract to be performed, the contract ID and the first contract hash value; A task generation module, used to extract clause data from the electronic contract data, and generate a task to be performed according to the clause data and the contract ID; A contract creation module, used to generate a smart contract for the task to be fulfilled in the blockchain network according to the task to be fulfilled and the data verification method; The fulfillment confirmation module is used to obtain the fulfillment confirmation message, execute the pending tasks through the pending tasks smart contract, and output the fulfillment results.
Citation Information
Cited By
Method and device for verifying performance of educational contract text and electronic equipment
CN121809490A