Resource transaction traceability method, device and equipment, and storage medium
Patent Information
- Application Number
- CN202410028262.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-05
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2044-01-05
AI Technical Summary
[0004]本发明的主要目的在于提供一种资源交易溯源方法、装置、设备及存储介质,旨在解决现有技术进行资源交易溯源的准确性较低的技术问题
[0015]The resource transaction tracing method proposed in this invention generates a target evidence link based on the task credentials uploaded by the task undertaker to the evidence space when the task undertaker uploads task credentials. After receiving confirmation of the target evidence link from the task undertaker via a smart contract, the method determines the evaluation ciphertext fed back by the task supervisor based on the target evidence link. A target block is generated based on the evaluation ciphertext and the target evidence link, and the target block is stored on the blockchain. Upon receiving a resource tracing request, resource transaction tracing is performed through the target block on the blockchain. By generating a target evidence link based on the uploaded task credentials, combining it with the evaluation ciphertext fed back by the task supervisor to generate a target block, and then performing resource transaction tracing through the target block on the blockchain, the method effectively improves the accuracy of resource transaction tracing and ensures the authenticity and validity of the tracing results.
Smart Images

Figure CN117896135B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to resource transaction traceability methods, apparatus, equipment and storage media. Background Technology
[0002] Blockchain features decentralized storage, independence from any organization or individual, and the ability to publicly record all information on a "public ledger" using trusted technology. Data on the chain is timestamped and immutable; once immutable information is established, it's equivalent to identifying a unique identity, which is then permanently recorded on the chain, allowing for the tracking and recording of all transactions using that identity. However, current blockchain traceability suffers from limitations in block size, preventing the storage of excessive data, especially given the massive volume of data in resource transactions. To avoid these drawbacks, conventional traceability methods record only key information in each block, such as production time and batch number. This results in insufficient evidence to generate sufficient credibility, leading to limited backtracking information and difficulties in oversight, ultimately resulting in low accuracy for resource transaction traceability using this method.
[0003] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main objective of this invention is to provide a method, apparatus, device, and storage medium for tracing resource transactions, aiming to solve the technical problem of low accuracy in tracing resource transactions in existing technologies.
[0005] To achieve the above objectives, the present invention provides a resource transaction traceability method, which includes the following steps: When it is detected that the task undertaker has uploaded task credentials to the evidence space, a target evidence link is generated based on the task credentials in the evidence space. After receiving confirmation from the task undertaker regarding the target evidence link via a smart contract, the task supervisor determines the encrypted evaluation text returned by the task supervisor based on the target evidence link. A target block is generated based on the evaluation ciphertext and the target evidence link, and the target block is stored in the blockchain; Upon receiving a resource traceability request, the resource transaction traceability is performed through the target block on the blockchain.
[0006] Optionally, the step of generating a target evidence link based on the task credentials within the evidence space when the task undertaker uploads task credentials to the evidence space includes: Upon receiving a virtual enterprise proposal submitted by the initiator, the system aggregates multiple resource trading enterprises based on the proposed virtual enterprise proposal. A unique evidence space is created for each task-bearing party in the aforementioned multi-party resource transaction enterprise; After the task undertaker completes the task, it is determined whether the task undertaker has uploaded the task credentials to the evidence space; When it is detected that the task undertaker has uploaded the task credentials to the evidence space, the task credentials are hashed and encrypted to obtain the evidence hash value; The target evidence link is generated based on the address of the evidence space and the evidence hash value.
[0007] Optionally, after generating a target evidence link based on the task credentials in the evidence space when the task undertaker uploads task credentials to the evidence space, the method further includes: The target evidence link is sent to the task provider, who then performs private key signing to confirm the target evidence link and sends the confirmation result to the smart contract. The smart contract verifies the confirmation result using the task provider's public key, and upon successful verification, sends feedback indicating that the target evidence link has been confirmed.
[0008] Optionally, after receiving confirmation from the task undertaker regarding the target evidence link via a smart contract, determining the evaluation ciphertext returned by the task supervisor based on the target evidence link includes: After receiving confirmation from the task undertaker via a smart contract that the target evidence link is correct, the evidence space is locked. The target evidence link is sent to the task supervisor designated by the task undertaker. The task supervisor determines the task credential based on the target evidence link, evaluates the task credential, signs the credential evaluation result with a private key to obtain the evaluation ciphertext, and then sends the evaluation ciphertext back.
[0009] Optionally, the step of generating a target block based on the evaluation ciphertext and the target evidence link, and storing the target block in the blockchain, includes: Generate a target block based on the evaluation ciphertext and the target evidence link, and continue to execute the above steps of uploading the task credential to the evidence space until all task undertakers have completed their respective tasks. Determine the number of tasks completed by the task-taking party; When the number of target blocks matches the number of tasks completed by the task undertaker, the transaction initiator determines the status of the multi-party resource transaction by calling the smart contract; When the multi-party resource transaction is in a successful transaction state, the target block is stored in the blockchain.
[0010] Optionally, generating the target block based on the evaluation ciphertext and the target evidence link includes: The evaluation plaintext is obtained by decrypting the ciphertext according to the target order using the public key of the task undertaker by calling the smart contract; The evaluation plaintext is compared with the task credentials in the target evidence link; After verification, the plaintext evaluation and the target evidence link are packaged into a target block.
[0011] Optionally, upon receiving a resource tracing request, tracing resource transactions through a target block on the blockchain includes: Upon receiving a resource tracing request, determine the identity information of the object that sent the resource tracing request; Resource transactions are traced through the target block on the blockchain based on the identity information.
[0012] Furthermore, to achieve the above objectives, the present invention also proposes a resource transaction traceability device, the resource transaction traceability device comprising: The detection module is used to generate a target evidence link based on the task credentials in the evidence space when it detects that the task undertaker has uploaded task credentials to the evidence space. The determination module is used to determine the evaluation ciphertext fed back by the task supervisor based on the target evidence link after receiving confirmation information from the task undertaker regarding the target evidence link through a smart contract. The generation module is used to generate a target block based on the evaluation ciphertext and the target evidence link, and store the target block in the blockchain; The traceability module is used to trace resource transactions through the target block on the blockchain when a resource traceability request is received.
[0013] Furthermore, to achieve the above objectives, the present invention also proposes a resource transaction traceability device, which includes: a memory, a processor, and a resource transaction traceability program stored in the memory and executable on the processor, wherein the resource transaction traceability program is configured to implement the resource transaction traceability method described above.
[0014] In addition, to achieve the above objectives, the present invention also proposes a storage medium storing a resource transaction traceability program, which, when executed by a processor, implements the resource transaction traceability method as described above.
[0015] The resource transaction tracing method proposed in this invention generates a target evidence link based on the task credentials uploaded by the task undertaker to the evidence space when the task undertaker uploads task credentials. After receiving confirmation of the target evidence link from the task undertaker via a smart contract, the method determines the evaluation ciphertext fed back by the task supervisor based on the target evidence link. A target block is generated based on the evaluation ciphertext and the target evidence link, and the target block is stored on the blockchain. Upon receiving a resource tracing request, resource transaction tracing is performed through the target block on the blockchain. By generating a target evidence link based on the uploaded task credentials, combining it with the evaluation ciphertext fed back by the task supervisor to generate a target block, and then performing resource transaction tracing through the target block on the blockchain, the method effectively improves the accuracy of resource transaction tracing and ensures the authenticity and validity of the tracing results. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the structure of the resource transaction traceability device in the hardware operating environment involved in the embodiments of the present invention; Figure 2 This is a flowchart illustrating the first embodiment of the resource transaction traceability method of the present invention; Figure 3 This is a schematic diagram of the overall process of an embodiment of the resource transaction traceability method of the present invention; Figure 4 This is a flowchart illustrating the second embodiment of the resource transaction traceability method of the present invention; Figure 5 This is a schematic diagram of the functional modules of the first embodiment of the resource transaction traceability device of the present invention.
[0017] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0018] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0019] Reference Figure 1 , Figure 1 This is a schematic diagram of the resource transaction traceability device structure in the hardware operating environment involved in the embodiments of the present invention.
[0020] like Figure 1As shown, the resource transaction traceability device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk storage device. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0021] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the resource transaction traceability device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0022] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a resource transaction traceability program.
[0023] exist Figure 1 In the resource transaction traceability device shown, the network interface 1004 is mainly used for data communication with the network integrated platform workstation; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the resource transaction traceability device of the present invention can be set in the resource transaction traceability device, and the resource transaction traceability device calls the resource transaction traceability program stored in the memory 1005 through the processor 1001 and executes the resource transaction traceability method provided in the embodiment of the present invention.
[0024] Based on the above hardware structure, an embodiment of the resource transaction traceability method of the present invention is proposed.
[0025] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the resource transaction traceability method of the present invention.
[0026] In the first embodiment, the resource transaction traceability method includes the following steps: Step S10: When it is detected that the task undertaker has uploaded the task credentials to the evidence space, a target evidence link is generated based on the task credentials in the evidence space.
[0027] It should be noted that the execution subject of this embodiment is a resource transaction traceability device, but it can also be other devices that can achieve the same or similar functions, such as a virtual enterprise aggregation platform. This embodiment does not limit this, and in this embodiment, a virtual enterprise aggregation platform is used as an example for explanation.
[0028] It should be understood that a virtual enterprise aggregation platform can be a concrete entity that facilitates multi-party resource transactions. On this platform, anyone can describe and upload a preliminary idea (business script) for a multi-party resource transaction using natural language. The platform then transforms this into a "transaction template" (an executable smart contract) to standardize the prototype of the multi-party resource transaction. This template outlines how different parties providing capabilities or services complete the entire process of the multi-party resource transaction through a specific workflow. Task credentials include, but are not limited to, images, videos, and documents. Target evidence links can be represented as...<address,hash_value> In this context, address represents the address of the evidence space, and hash_value represents the evidence hash value. The address of the evidence space can be a cloud storage link, and the target evidence link is unique.
[0029] It should be noted that the reference Figure 3 , Figure 3 The diagram illustrates the overall process, using a virtual enterprise as an example. It consists of initiators, raw material suppliers, manufacturers, distributors, investment institutions, supervisory departments, and a virtual enterprise aggregation platform. The platform utilizes blockchain and smart contracts. The blockchain records every transaction, while smart contracts ensure smooth transactions. Raw material suppliers, manufacturers, distributors, and investment institutions can all be task providers, with tasks including uploading raw material information and product information to the blockchain, and providing financing services. Initiators submit virtual enterprise proposals.
[0030] Furthermore, after step S10, the method further includes: sending the target evidence link to the task bearer, whereby the task bearer performs private key signing confirmation on the target evidence link and sends the confirmation result to the smart contract, whereby the smart contract verifies the confirmation result using the task bearer's public key, and after successful verification, provides feedback that the confirmation of the target evidence link is correct.
[0031] Understandably, after generating the target evidence link, the virtual enterprise aggregation platform will send it back to the task provider. The task provider will then confirm the target evidence link by signing it with their private key. Specifically, this involves comparing the hash value they use to encrypt with the hash value in the target evidence link to ensure that the task credential is not tampered with by the virtual enterprise aggregation platform. This hash value is generated before the task credential is uploaded to the evidence space. After signing, the smart contract verifies the confirmation result using the task provider's public key. This verification is further performed on the confirmation result. Once the verification is successful, the platform will send back confirmation that the target evidence link is correct and proceed to the evaluation stage.
[0032] Step S20: After receiving confirmation from the task undertaker regarding the target evidence link via the smart contract, determine the encrypted evaluation text fed back by the task supervisor based on the target evidence link.
[0033] It is understandable that the evaluation ciphertext refers to the ciphertext after the task supervisor evaluates the task credentials. This evaluation ciphertext is fed back by the task supervisor, and the recipient of the feedback can be a smart contract.
[0034] Further, step S20 includes: after receiving confirmation information from the task undertaker regarding the target evidence link via a smart contract, locking the evidence space; sending the target evidence link to the task supervisor designated by the task undertaker, whereby the task supervisor determines the task credential based on the target evidence link, evaluates the task credential, signs the credential evaluation result with a private key to obtain the evaluation ciphertext, and feeds back the evaluation ciphertext.
[0035] It should be understood that after receiving the confirmation message, it indicates that the task undertaker has confirmed that the target evidence link is correct. At this time, the evidence space of the task undertaker is locked. The task supervisor corresponds to the task undertaker, that is, the target evidence link is sent to the task supervisor for evaluation. The evaluation result includes the evaluation content and score, and the evaluation content and score are used as the checkpoints and detection values of the smart contract. After completing the private key signing, the evaluation ciphertext is fed back to the smart contract.
[0036] Step S30: Generate a target block based on the evaluation ciphertext and the target evidence link, and store the target block in the blockchain.
[0037] It should be understood that after obtaining the evaluation ciphertext, it indicates that both the task undertaker and the task supervisor have invoked the smart contract. At this point, the operation of invoking the smart contract is packaged into a block, that is, the target block is generated based on the evaluation ciphertext and the target evidence link, and the target block is stored in the blockchain.
[0038] Further, step S30 includes: generating a target block based on the evaluation ciphertext and the target evidence link; continuing to execute the above steps of uploading task credentials to the evidence space until all task bearers have completed their respective tasks; determining the number of tasks completed by the task bearers; when the number of target blocks matches the number of tasks completed by the task bearers, the transaction initiator determines the status of the multi-party resource transaction by calling a smart contract; and when the status of the multi-party resource transaction is a successful transaction, storing the target block in the blockchain.
[0039] Understandably, after the target block is generated, the smart contract will automatically execute and enter the next state. After the next task undertaker completes their task, they will upload the task certificate to the evidence space provided by the task undertaker and perform similar operations. All task undertakers complete their respective tasks, which is confirmed by comparing the number of target blocks with the number of tasks completed by the task undertakers. That is, it is determined whether the two numbers are consistent. If they are, it indicates that all tasks have been completed, and the smart contract enters the judgment state. The transaction initiator of the multi-party resource transaction calls the smart contract to determine the status of the multi-party resource transaction. When the status of the multi-party resource transaction is a successful transaction, the target block is stored, and settlement is performed by calling the smart contract.
[0040] Furthermore, the step of generating the target block based on the evaluation ciphertext and the target evidence link includes: decrypting the evaluation ciphertext according to the target order using the public key of the task undertaker by calling a smart contract to obtain the evaluation plaintext; verifying the evaluation plaintext against the task credential in the target evidence link; and packaging the evaluation plaintext and the target evidence link into a target block after the verification is successful.
[0041] It should be understood that after receiving the ciphertext of the evaluation from the task supervisor, it is necessary to confirm whether the private key signature and the target evidence link have been tampered with. Specifically, the smart contract is called to decrypt the ciphertext of the evaluation based on the public key of the task undertaker. Then, the plaintext of the evaluation is compared with the task credentials in the target evidence link. If the comparison passes, it indicates that the private key signature has been confirmed and the target evidence link has not been tampered with. At this point, the plaintext of the evaluation and the target evidence link are packaged into the target block.
[0042] Step S40: Upon receiving a resource traceability request, resource transaction traceability is performed through the target block on the blockchain.
[0043] It is understandable that a resource traceability request refers to a request initiated based on the need for traceability of resource transactions. The initiator of the resource traceability request can be any participant in the resource transaction. Upon receiving the resource traceability request, the target block on the blockchain is used to trace the resource transaction.
[0044] It should be noted that, due to the immutability of blockchain, it will provide strong protection for the traceability of multi-party resource transactions, and the evidence space of the virtual enterprise aggregation platform is not limited by storage size, so there is sufficient evidence to assist supervisory agencies in tracing the source.
[0045] Further, step S40 includes: upon receiving a resource tracing request, determining the identity information of the object that sent the resource tracing request; and tracing the resource transaction through the target block on the blockchain based on the identity information.
[0046] It should be understood that identity information refers to the information used to identify the object that sends the resource tracing request to the virtual enterprise aggregation platform. This identity information can be any participant in the resource transaction. At this time, the object can trace the task credentials of other objects and evaluate them based on sufficient evidence of completion. It can also trace the relevant transaction data of the resource transaction.
[0047] This embodiment generates a target evidence link based on the task credentials uploaded by the task undertaker to the evidence space when the task undertaker uploads task credentials. After receiving confirmation of the target evidence link from the task undertaker via a smart contract, it determines the evaluation ciphertext fed back by the task supervisor based on the target evidence link. A target block is generated based on the evaluation ciphertext and the target evidence link, and the target block is stored on the blockchain. Upon receiving a resource traceability request, resource transaction traceability is performed through the target block on the blockchain. By generating a target evidence link based on the uploaded task credentials, combining it with the evaluation ciphertext fed back by the task supervisor to generate a target block, and then performing resource transaction traceability through the target block on the blockchain, the accuracy of resource transaction traceability can be effectively improved, and the authenticity and validity of the traceability results can be ensured.
[0048] In one embodiment, such as Figure 4 The second embodiment of the resource transaction traceability method of the present invention, based on the first embodiment, includes step S10, which includes: Step S101: Upon receiving the virtual enterprise proposal submitted by the initiator, aggregate multiple resource trading enterprises according to the virtual enterprise proposal.
[0049] It should be understood that a virtual enterprise scheme refers to a scheme that aggregates multiple resource trading companies. These trading companies can be micro or small enterprises, and the virtual enterprise scheme can be initiated by the initiator to the virtual enterprise aggregation platform.
[0050] Step S102: Create a unique evidence space for each task-bearing party in the multi-party resource transaction enterprise.
[0051] Understandably, the evidence space refers to the source evidence used to store the task-taking party's completion of the task. After aggregating multiple resource trading companies, the virtual enterprise aggregation platform creates a unique evidence space for each task-taking party among the multiple resource trading companies.
[0052] Step S103: After the task undertaker completes the task, determine whether the task undertaker has uploaded the task credentials to the evidence space.
[0053] It should be understood that after the task undertaker completes the task, they will upload the task credentials to the evidence space. Therefore, after confirming the completion of the task, it is necessary to determine whether the task undertaker has uploaded the task credentials to the evidence space.
[0054] Step S104: When it is detected that the task undertaker has uploaded the task credential to the evidence space, the task credential is hashed and encrypted to obtain the evidence hash value.
[0055] It is understandable that when the task undertaker uploads task credentials to the evidence space, it indicates that task credentials are stored in the evidence space. At this time, the virtual enterprise aggregation platform performs hash encryption on the task credentials in the evidence space to obtain the evidence hash value corresponding to the task credentials. The hash encryption algorithm can be the SHA-256 encryption algorithm.
[0056] Step S105: Generate a target evidence link based on the address of the evidence space and the evidence hash value.
[0057] It should be understood that the address of the evidence space is used for inspection and supervision by other participants, and the evidence hash value is used to ensure that the uploaded task credentials are not tampered with by the virtual enterprise aggregation platform. Then, the target evidence link is generated based on the address of the evidence space and the evidence hash value.<address,hash_value> Where address represents the address of the evidence space and hash_value represents the evidence hash value.
[0058] This embodiment, upon receiving a virtual enterprise scheme submitted by the initiator, aggregates multiple resource trading enterprises according to the virtual enterprise scheme; creates a unique evidence space for each task undertaker among the multiple resource trading enterprises; after the task undertaker completes the task, it determines whether the task undertaker has uploaded task credentials to the evidence space; when the task undertaker has uploaded task credentials to the evidence space, the task credentials are hashed and encrypted to obtain an evidence hash value; a target evidence link is generated based on the address of the evidence space and the evidence hash value. Through the above method, after aggregating multiple resource trading enterprises using the virtual enterprise scheme, and generating a target evidence link based on the address of the evidence space and the evidence hash value when a task undertaker uploads task credentials to the evidence space, the accuracy of generating the target evidence link can be effectively improved.
[0059] Furthermore, this embodiment of the invention also proposes a storage medium storing a resource transaction traceability program, which, when executed by a processor, implements the steps of the resource transaction traceability method described above.
[0060] Since this storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.
[0061] In addition, refer to Figure 5 This invention also proposes a resource transaction traceability device, which includes: The detection module 10 is used to generate a target evidence link based on the task credentials in the evidence space when it detects that the task undertaker has uploaded task credentials to the evidence space.
[0062] The determination module 20 is used to determine the evaluation ciphertext fed back by the task supervisor based on the target evidence link after receiving confirmation information from the task undertaker regarding the target evidence link through a smart contract.
[0063] The generation module 30 is used to generate a target block based on the evaluation ciphertext and the target evidence link, and to store the target block in the blockchain.
[0064] The traceability module 40 is used to trace resource transactions through the target block on the blockchain when a resource traceability request is received.
[0065] This embodiment generates a target evidence link based on the task credentials uploaded by the task undertaker to the evidence space when the task undertaker uploads task credentials. After receiving confirmation of the target evidence link from the task undertaker via a smart contract, it determines the evaluation ciphertext fed back by the task supervisor based on the target evidence link. A target block is generated based on the evaluation ciphertext and the target evidence link, and the target block is stored on the blockchain. Upon receiving a resource traceability request, resource transaction traceability is performed through the target block on the blockchain. By generating a target evidence link based on the uploaded task credentials, combining it with the evaluation ciphertext fed back by the task supervisor to generate a target block, and then performing resource transaction traceability through the target block on the blockchain, the accuracy of resource transaction traceability can be effectively improved, and the authenticity and validity of the traceability results can be ensured.
[0066] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.
[0067] In addition, for technical details not described in detail in this embodiment, please refer to the resource transaction traceability method provided in any embodiment of the present invention, which will not be repeated here.
[0068] In one embodiment, the detection module 10 is further configured to, upon receiving a virtual enterprise scheme submitted by the initiator, aggregate multiple resource trading enterprises according to the virtual enterprise scheme; create a unique evidence space for each task undertaker among the multiple resource trading enterprises; after the task undertaker completes the task, determine whether the task undertaker has uploaded task credentials to the evidence space; when the task undertaker uploads task credentials to the evidence space, hash and encrypt the task credentials to obtain an evidence hash value; and generate a target evidence link based on the address of the evidence space and the evidence hash value.
[0069] In one embodiment, the detection module 10 is further configured to send the target evidence link to the task bearer, who then performs private key signature confirmation on the target evidence link and sends the confirmation result to the smart contract. The smart contract verifies the confirmation result using the task bearer's public key, and upon successful verification, provides feedback indicating that the confirmation of the target evidence link is correct.
[0070] In one embodiment, the determining module 20 is further configured to, after receiving confirmation information from the task undertaker regarding the target evidence link via a smart contract, lock the evidence space; send the target evidence link to the task supervisor designated by the task undertaker, whereby the task supervisor determines the task credential based on the target evidence link, evaluates the task credential, signs the credential evaluation result with a private key to obtain the evaluation ciphertext, and feeds back the evaluation ciphertext.
[0071] In one embodiment, the generation module 30 is further configured to generate a target block based on the evaluation ciphertext and the target evidence link, and continue to execute the above-mentioned steps of uploading task credentials to the evidence space until all task undertakers have completed their respective tasks; determine the number of tasks completed by the task undertakers; when the number of target blocks is consistent with the number of tasks completed by the task undertakers, the transaction initiator determines the status of the multi-party resource transaction by calling a smart contract; when the status of the multi-party resource transaction is a successful transaction status, the target block is stored in the blockchain.
[0072] In one embodiment, the generation module 30 is further configured to decrypt the evaluation ciphertext according to the public key of the task undertaker in the target order by calling a smart contract to obtain the evaluation plaintext; to verify the evaluation plaintext with the task credential in the target evidence link; and after the verification is successful, to package the evaluation plaintext and the target evidence link into a target block.
[0073] In one embodiment, the traceability module 40 is further configured to, upon receiving a resource traceability request, determine the identity information of the object that sent the resource traceability request; and perform resource transaction traceability through the target block on the blockchain based on the identity information.
[0074] Other embodiments or implementation methods of the resource transaction traceability device described in this invention can be referred to the above-described method embodiments, and will not be repeated here.
[0075] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0076] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0077] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, all-in-one platform workstation, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0078] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for tracing the source of resource transactions, characterized in that, The resource transaction traceability method includes the following steps: When it is detected that the task undertaker has uploaded task credentials to the evidence space, a target evidence link is generated based on the task credentials in the evidence space. After receiving confirmation from the task undertaker regarding the target evidence link via a smart contract, the task supervisor determines the encrypted evaluation text returned by the task supervisor based on the target evidence link. A target block is generated based on the evaluation ciphertext and the target evidence link, and the target block is stored in the blockchain; Upon receiving a resource traceability request, the resource transaction traceability is performed through the target block on the blockchain.
2. The resource transaction traceability method as described in claim 1, characterized in that, The step of generating a target evidence link based on the task credentials within the evidence space when the task undertaker uploads task credentials to the evidence space includes: Upon receiving a virtual enterprise proposal submitted by the initiator, the system aggregates multiple resource trading enterprises based on the proposed virtual enterprise proposal. A unique evidence space is created for each task-bearing party in the aforementioned multi-party resource transaction enterprise; After the task undertaker completes the task, it is determined whether the task undertaker has uploaded the task credentials to the evidence space; When it is detected that the task undertaker has uploaded the task credentials to the evidence space, the task credentials are hashed and encrypted to obtain the evidence hash value; The target evidence link is generated based on the address of the evidence space and the evidence hash value.
3. The resource transaction traceability method as described in claim 1, characterized in that, After generating a target evidence link based on the task credentials within the evidence space when the task undertaker uploads task credentials to the evidence space, the process further includes: The target evidence link is sent to the task provider, who then performs private key signing to confirm the target evidence link and sends the confirmation result to the smart contract. The smart contract verifies the confirmation result using the task provider's public key, and upon successful verification, sends feedback indicating that the target evidence link has been confirmed.
4. The resource transaction traceability method as described in claim 1, characterized in that, After receiving confirmation from the task undertaker regarding the target evidence link via a smart contract, the step of determining the evaluation ciphertext returned by the task supervisor based on the target evidence link includes: After receiving confirmation from the task undertaker via a smart contract that the target evidence link is correct, the evidence space is locked. The target evidence link is sent to the task supervisor designated by the task undertaker. The task supervisor determines the task credential based on the target evidence link, evaluates the task credential, signs the credential evaluation result with a private key to obtain the evaluation ciphertext, and then sends the evaluation ciphertext back.
5. The resource transaction traceability method as described in claim 1, characterized in that, The step of generating a target block based on the evaluation ciphertext and the target evidence link, and storing the target block in the blockchain, includes: Generate a target block based on the evaluation ciphertext and the target evidence link, and continue to execute the above steps of uploading the task credential to the evidence space until all task undertakers have completed their respective tasks. Determine the number of tasks completed by the task-taking party; When the number of target blocks matches the number of tasks completed by the task undertaker, the transaction initiator determines the status of the multi-party resource transaction by calling the smart contract; When the multi-party resource transaction is in a successful transaction state, the target block is stored in the blockchain.
6. The resource transaction traceability method as described in claim 5, characterized in that, The step of generating the target block based on the evaluation ciphertext and the target evidence link includes: The evaluation plaintext is obtained by decrypting the ciphertext according to the target order using the public key of the task undertaker by calling the smart contract; The evaluation plaintext is compared with the task credentials in the target evidence link; After verification, the plaintext evaluation and the target evidence link are packaged into a target block.
7. The resource transaction traceability method as described in any one of claims 1 to 6, characterized in that, Upon receiving a resource tracing request, the step of tracing resource transactions through the target block on the blockchain includes: Upon receiving a resource tracing request, determine the identity information of the object that sent the resource tracing request; Resource transactions are traced through the target block on the blockchain based on the identity information.
8. A resource transaction traceability device, characterized in that, The resource transaction traceability device includes: The detection module is used to generate a target evidence link based on the task credentials in the evidence space when it detects that the task undertaker has uploaded task credentials to the evidence space. The determination module is used to determine the evaluation ciphertext fed back by the task supervisor based on the target evidence link after receiving confirmation information from the task undertaker regarding the target evidence link through a smart contract. The generation module is used to generate a target block based on the evaluation ciphertext and the target evidence link, and store the target block in the blockchain; The traceability module is used to trace resource transactions through the target block on the blockchain when a resource traceability request is received.
9. A resource transaction traceability device, characterized in that, The resource transaction traceability device includes: a memory, a processor, and a resource transaction traceability program stored in the memory and executable on the processor, wherein the resource transaction traceability program is configured to implement the resource transaction traceability method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium stores a resource transaction traceability program, which, when executed by a processor, implements the resource transaction traceability method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Supply chain logistics traceability system based on blockchain multi-chain cooperation
CN110706006A
Decentralization multi-dimensional evaluation method and system
CN114119056A