A data processing method and related device based on blockchain
Using blockchain technology to freeze and pay task-related resources in project management solves the problem of project parties being unwilling to pay in time, improves transaction fairness and fund security, and ensures that the interests of the undertaking party are not damaged.
Patent Information
- Application Number
- CN201911166818.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-25
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2039-11-25
AI Technical Summary
In project management, the project party may be unwilling to pay the undertaking party in a timely manner, resulting in greater losses for the undertaking party and insufficient transaction fairness and financial security.
Through blockchain technology, task data and related electronic resources are uploaded to the blockchain network, the resources are frozen, and the fairness and security of payment are ensured through smart contracts. The client can accept the task through the blockchain network after completing the task. and fund withdrawals.
It ensures that the project party promptly accepts and pays the money after the undertaking completes the task, reduces the undertaking's losses, and improves the fairness of the transaction and the security of funds.
Smart Images

Figure CN110866830B
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and specifically to a blockchain-based data processing method and related devices. Background Art
[0002] Project management is a planning management method developed in the late 1950s. It refers to the effective combination of various systems, resources and personnel, the use of standardized management processes, and the completion of projects within the specified time, budget and quality goals. Project management has gradually developed into an independent discipline system in developed countries and is widely used in many industries such as construction, engineering, electronics, finance, and investment.
[0003] With the rapid development of the industry, many problems have gradually emerged. At present, in a large project, the project party usually needs to divide the project into multiple tasks and contract the multiple tasks to the contractor. After the contractor completes the task, the project party may be unwilling to pay the contractor after the contractor completes the task, resulting in a large loss to the contractor. Summary of the invention
[0004] The embodiments of the present application provide a data processing method and related devices based on blockchain, which can ensure that the first client promptly accepts the first task and makes payment after the second client completes the first task, thereby reducing the loss of the second client and improving the fairness of the transaction and the security of funds.
[0005] In a first aspect, an embodiment of the present application provides a data processing method based on blockchain, and the data processing method based on blockchain is applied to a first client, and the method includes:
[0006] Uploading first task data corresponding to the first task and a first electronic resource associated with the first task to the blockchain network, so that the blockchain network publishes the first task data and freezes the first electronic resource;
[0007] Viewing user information of a second client that claims the first task through the blockchain network;
[0008] If a settlement request from the second client is detected, a transaction request is sent to the blockchain network, wherein the transaction request includes first acceptance data for the first task and a first value of the electronic resources to be withdrawn, so that the second client can withdraw the electronic resources of the first value from the first electronic resources according to the first acceptance data.
[0009] In a second aspect, an embodiment of the present application provides a data processing method based on blockchain, and the data processing method based on blockchain is applied to a second client, and the method includes:
[0010] Viewing, in the blockchain network, first task data corresponding to the first task uploaded by the first client and a first electronic resource associated with the first task, wherein the first electronic resource is frozen in the blockchain network;
[0011] Sending a claim request for claiming the first task to the blockchain network, the claim request including user information of the second client, so that the first client can view the user information of the second client who claims the first task through the blockchain network;
[0012] Acquire first acceptance data for the first task and a first value of the electronic resource to be withdrawn from the blockchain network, and send a withdrawal request to the blockchain network based on the first acceptance data, so that the blockchain network withdraws the electronic resource of the first value from the first electronic resource to the second client based on the withdrawal request.
[0013] In conjunction with the second aspect, in a possible implementation manner, the method further includes:
[0014] A task completion instruction is received from the blockchain network, and a claim request for requesting claiming the second task is sent to the blockchain network. The task completion instruction is triggered after the blockchain network successfully verifies the first signature information and the second signature information, and withdraws the electronic resource of the first value from the first electronic resource to the second client. The first signature information is obtained by signing the first acceptance data and the first value with the private key of the first client.
[0015] In a third aspect, an embodiment of the present application provides a blockchain-based data processing device, wherein the blockchain-based data processing device runs in a first client, and the device includes:
[0016] A first uploading unit, configured to upload first task data corresponding to the first task and a first electronic resource associated with the first task to the blockchain network, so that the blockchain network publishes the first task data and freezes the first electronic resource;
[0017] A first viewing unit, used to view user information of a second client that claims the first task through the blockchain network;
[0018] The first sending unit is used to send a transaction request to the blockchain network if a settlement request from the second client is detected. The transaction request includes first acceptance data for the first task and a first value of the electronic resources to be withdrawn, so that the second client can withdraw the electronic resources of the first value from the first electronic resources according to the first acceptance data.
[0019] In conjunction with the third aspect, in a possible implementation manner, the first sending unit is specifically configured to:
[0020] Sign the first acceptance data and the first numerical value of the electronic resource to be withdrawn by using the private key of the first client to obtain first signature information;
[0021] Based on the first signature information, a transaction request is generated, and the transaction request is sent to the blockchain network, so that the blockchain network uses the public key of the first client to verify the first signature information.
[0022] In combination with the third aspect, in a possible implementation manner, the above device further includes:
[0023] A creation unit, configured to call a first function in a smart contract to create a first project, wherein the first project includes at least one task, and the at least one task includes the first task;
[0024] The adding unit is used to call the second function in the smart contract to add the first task data to the first task.
[0025] In combination with the third aspect, in a possible implementation manner, the above device further includes:
[0026] A first transceiver unit is used to receive a task completion instruction from the blockchain network; the first transceiver unit is also used to send evaluation information for the first task to the blockchain network, so that the blockchain network updates the user information of the second client according to the evaluation information;
[0027] Among them, the task completion instruction is triggered after the blockchain network successfully verifies the first signature information and the second signature information, and withdraws the electronic resource of the first value from the first electronic resource to the second client. The second signature information is obtained by signing the first acceptance data and the first value with the private key of the second client.
[0028] In a fourth aspect, an embodiment of the present application provides a blockchain-based data processing device, wherein the blockchain-based data processing device runs in a second client, and the device includes:
[0029] A second viewing unit is used to view the first task data corresponding to the first task uploaded by the first client and the first electronic resource associated with the first task in the blockchain network, wherein the first electronic resource is frozen in the blockchain network;
[0030] A second sending unit is used to send a claim request for claiming the first task to the blockchain network, where the claim request includes user information of the second client, so that the first client can view user information of the second client who claims the first task through the blockchain network;
[0031] An acquisition unit is used to obtain first acceptance data for the first task and a first value of the electronic resource to be withdrawn from the blockchain network, and send a withdrawal request to the blockchain network based on the first acceptance data, so that the blockchain network withdraws the electronic resource of the first value from the first electronic resource to the second client according to the withdrawal request.
[0032] In conjunction with the fourth aspect, in a possible implementation manner, the device further includes:
[0033] The second uploading unit is used to upload the second electronic resource to the blockchain network so that the blockchain network freezes the second electronic resource. The second electronic resource is used to withdraw the electronic resource of the second value from the second electronic resource to the first client if the first acceptance data includes the first indication information. The first indication information is used to indicate the withdrawal of the electronic resource of the second value from the first client.
[0034] In conjunction with the fourth aspect, in a possible implementation manner, the acquisition unit is specifically configured to:
[0035] Sign the first acceptance data and the first numerical value of the electronic resource to be withdrawn by using the private key of the second client to obtain second signature information;
[0036] Based on the second signature information, a withdrawal request is generated, and the withdrawal request is sent to the blockchain network so that the blockchain network uses the public key of the second client to verify the second signature information.
[0037] In conjunction with the fourth aspect, in a possible implementation manner, the device further includes:
[0038] The second transceiver unit is used to receive a task completion instruction from the blockchain network; the second transceiver unit is also used to send a claim request to the blockchain network for requesting to claim the second task, and the task completion instruction is triggered after the blockchain network successfully verifies the first signature information and the second signature information, and withdraws the electronic resource of the first value from the first electronic resource to the second client, and the first signature information is obtained by signing the first acceptance data and the first value with the private key of the first client.
[0039] In a fifth aspect, an embodiment of the present application provides a blockchain-based data processing device, comprising a processor, a memory, and an input / output interface, wherein the processor, the memory, and the input / output interface are interconnected, wherein the input / output interface is used to input or output data, the memory is used to store program code, and the processor is used to call the program code to execute the blockchain-based data processing method of the first or second aspect above.
[0040] In the sixth aspect, an embodiment of the present application provides a computer-readable storage medium, characterized in that the computer storage medium stores a computer program, and the computer program includes program instructions, which, when executed by a processor, enable the processor to execute the blockchain-based data processing method of the first aspect or the second aspect mentioned above.
[0041] In a seventh aspect, an embodiment of the present application provides a blockchain-based data processing system, wherein the blockchain-based data processing system includes a blockchain node system for running a blockchain network, a first client, and a second client; wherein,
[0042] The first client uploads first task data corresponding to the first task and a first electronic resource associated with the first task to the blockchain network, so that the blockchain network publishes the first task data and freezes the first electronic resource;
[0043] The second client checks the first task data corresponding to the first task uploaded by the first client and the first electronic resource associated with the first task in the blockchain network, wherein the first electronic resource is frozen in the blockchain network;
[0044] The second client sends a claim request to the blockchain network for claiming the first task, where the claim request includes user information of the second client, so that the first client can view user information of the second client claiming the first task through the blockchain network;
[0045] The first client checks user information of the second client who claims the first task through the blockchain network;
[0046] The second client obtains first acceptance data for the first task and a first value of the electronic resource to be withdrawn from the blockchain network, and sends a withdrawal request to the blockchain network according to the first acceptance data, so that the blockchain network withdraws the electronic resource of the first value from the first electronic resource to the second client according to the withdrawal request;
[0047] If the first client detects the settlement request of the second client, it sends a transaction request to the blockchain network, where the transaction request includes first acceptance data for the first task and a first value of the electronic resources to be withdrawn, so that the second client can withdraw the electronic resources of the first value from the first electronic resources according to the first acceptance data.
[0048] In an embodiment of the present application, the first client can upload the first task data corresponding to the first task and the first electronic resource associated with the first task to the blockchain network, so that the blockchain network can publish the first task data and freeze the first electronic resource, and view the user information of the second client who claims the first task through the blockchain network. If a settlement request from the second client is detected, a transaction request is sent to the blockchain network, and the transaction request includes the first acceptance data for the first task and the first value of the electronic resource to be withdrawn, so that the second client can withdraw the electronic resource of the first value from the first electronic resource according to the first acceptance data. By adopting the embodiment of the present application, it can be ensured that the first client accepts the first task and makes payment in time after the second client completes the first task, which reduces the loss of the second client and improves the fairness of the transaction and the security of funds. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0050] Figure 1 This is an architecture diagram of a blockchain-based data processing system provided in an embodiment of the present application;
[0051] Figure 2 It is a flowchart of a data processing method based on blockchain provided in an embodiment of the present application;
[0052] Figure 3 It is a flowchart of another data processing method based on blockchain provided in an embodiment of the present application;
[0053] Figure 4 It is a structural schematic diagram of a blockchain-based data processing device provided in an embodiment of the present application;
[0054] Figure 5 It is a structural schematic diagram of another blockchain-based data processing device provided in an embodiment of the present application;
[0055] Figure 6It is a structural diagram of a blockchain-based data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0057] See also Figure 1 , Figure 1 This is an architecture diagram of a blockchain-based data processing system provided by an embodiment of the present application. Figure 1As shown, the blockchain-based data processing system may include a blockchain node system for running a blockchain network, a first client and a second client. The first client and the second client may register their identities in the blockchain network, and after the first client and the second client complete their identity registration in the blockchain network, they are qualified to conduct electronic resource transactions and view information in the blockchain network. Optionally, the first client refers to the client used by the project party, and the second client refers to the client used by the contractor; the first client and the second client may be any of the following: a terminal, an independent application, an application programming interface (API) or a software development kit (SDK). Optionally, the first client (i.e., the project party) can transfer the first electronic resource to the first contract account for the first task, and the second client (i.e., the contractor) can transfer the second electronic resource to the second contract account for the first task, and the first contract account can keep the first electronic resource on behalf of the second client, and the contract code corresponding to the first contract account can be called to withdraw the electronic resource of the first value from the first contract account to the second client that performs the first task, and the defaulting party can be guaranteed to be economically punished by calling the contract code (such as the contract code corresponding to the first contract account or the contract code corresponding to the second contract account) to withdraw the corresponding liquidated damages from the contract account (such as the first contract account or the second contract account), wherein the defaulting party can be the first client or the second client. Optionally, the first contract account and the second contract account are contract accounts on the token management platform. Optionally, the first client and the second client can interact with the blockchain network through DApp (decentralized application). Optionally, the blockchain node system may include a consortium chain node, and the consortium chain node is provided by an arbitration agency, and the labor dispute between the first client and the second client may be handled through the consortium chain node, wherein the arbitration agency may include a human resources bureau, a trade union, and a judicial department.
[0058] In the embodiment of the present application, the blockchain network can be used to ensure that the second client executing the first task can obtain the corresponding electronic resources in a timely manner and that the defaulting party is subject to economic penalties, thereby ensuring that the interests of both the first client and the second client are not harmed.
[0059] See also Figure 2 , Figure 2 Schematic diagram of a data processing method based on blockchain provided in an embodiment of the present application. Figure 2 As shown, the data processing method based on blockchain can be Figure 1 The first client and the second client in the method are executed together, and the method may include but is not limited to the following steps S201-S206:
[0060] S201, the first client uploads the first task data corresponding to the first task and the first electronic resource associated with the first task to the blockchain network, so that the blockchain network publishes the first task data and freezes the first electronic resource.
[0061] In a possible implementation, a user may register an identity on the blockchain network, and the registration information may include the user's basic information, user contact information, and qualification authentication information. Optionally, the blockchain network may include a project outsourcing phase management platform, which may be run by a smart contract, and the user may register an identity and create multiple projects on the project outsourcing phase management platform. Optionally, the user may be a first user or a second user. Optionally, the first user corresponds to the first client, and the second user corresponds to the second client. Optionally, after the first client completes identity registration in the blockchain network, it is qualified to conduct electronic resource transactions and view information in the blockchain network.
[0062] Optionally, before the first client uploads the first task data corresponding to the first task and the first electronic resource associated with the first task to the blockchain network, the first client may call the first function (such as method a) in the above-mentioned smart contract to create a first project, and the first project may include at least one task, and the at least one task includes the above-mentioned first task; the first client may call the second function (such as method b) in the above-mentioned smart contract to add the first task data to the above-mentioned first task. Optionally, the first task data may include task content information, acceptance terms corresponding to the first task, task deadline corresponding to the first task, human support information provided by the first client for the first task, and material list information.
[0063] Further, the first client can upload the first task data corresponding to the first task and the first electronic resource associated with the first task to the above-mentioned blockchain network, so that the above-mentioned blockchain network publishes the first task data and freezes the first electronic resource. Optionally, the first electronic resource can be the first deposit paid by the first user for the first task, and the first electronic resource is greater than the cost of executing the first task, wherein the project party pays the deposit mainly to protect the rights and interests of the contractor. For example, if the project party breaches the contract, the contractor can withdraw the liquidated damages from the first electronic resource, thereby minimizing the loss of the contractor. Optionally, the first client can upload the first electronic resource associated with the first task to the token hosting platform on the above-mentioned project outsourcing phase management platform, and the token hosting platform will manage the first electronic resource. Optionally, after the blockchain network publishes the first task data and freezes the first electronic resource, the first client does not have the qualification to use the first electronic resource. Optionally, for each task in the above-mentioned first project, the first client needs to pay the corresponding electronic resource for each task, and one task corresponds to one electronic resource, for example, the first client pays the first electronic resource for the first task.
[0064] S202, the second client checks the first task data corresponding to the first task uploaded by the first client and the first electronic resource associated with the first task in the blockchain network.
[0065] In a possible implementation, the second client can register its identity in the blockchain network. After completing the identity registration on the blockchain network, the second client is qualified to conduct electronic resource transactions and view information in the blockchain network. Furthermore, after the second client views the first task data corresponding to the first task uploaded by the first client and the first electronic resource associated with the first task in the above blockchain network, it can apply to claim the first task, wherein the first electronic resource is frozen in the above blockchain network and the second client cannot withdraw the first electronic resource.
[0066] S203: The second client sends a claim request to the blockchain network to request to claim the first task.
[0067] In a possible implementation, the claim request may include the user information of the second client, so that the first client can view the user information of the second client who claims the first task through the blockchain network. Optionally, the user information of the second client may include the basic user information, user contact information and qualification authentication information of the second user, and the second user corresponds to the second client.
[0068] Furthermore, the second client can upload the second electronic resource to the blockchain network so that the blockchain network freezes the second electronic resource. Optionally, the second electronic resource is the second deposit paid by the second client for the first task, wherein the contractor pays the deposit mainly to protect the rights and interests of the project party. For example, if the contractor breaches the contract, the project party can withdraw the liquidated damages from the second electronic resource, thereby minimizing the loss of the project party.
[0069] S204, the first client checks the user information of the second client who claims the first task through the blockchain network.
[0070] In a possible implementation, the first client can view the user information of the second client who claims the first task through the blockchain network. If the user information of the second client meets the requirements of the first client for executing the first task, the first client can call the third function in the smart contract to
[0071] number (such as method c), sign a project contract with the second client so that the second client performs the first task. The first client and the second client can directly sign the project contract through a smart contract, reducing the communication cost and economic cost between the first client and the second client.
[0072] S205, the second client obtains the first acceptance data for the first task and the first value of the electronic resources to be withdrawn from the blockchain network, and sends a withdrawal request to the blockchain network according to the first acceptance data, so that the blockchain network withdraws the electronic resources of the first value from the first electronic resources to the second client according to the withdrawal request.
[0073] In one possible implementation, after the second client completes the first task, it can obtain the first acceptance data for the first task and the first value of the electronic resource to be withdrawn from the blockchain network, and can sign the first acceptance data and the first value of the electronic resource to be withdrawn by using the private key of the second client to obtain second signature information, and generate a withdrawal request based on the second signature information, and send the withdrawal request to the blockchain network, so that the blockchain network verifies the second signature information using the public key of the second client. If the blockchain network successfully verifies the second signature information, the blockchain network can withdraw the electronic resource of the first value from the first electronic resource to the second client according to the withdrawal request. Optionally, the first acceptance data may be input by the first client after accepting the first task performed by the second client according to the acceptance terms and task deadline in the above-mentioned first task data; for example, if the second client fails to complete the first task within the task deadline of the first task, the first client determines that 90% of the standards are met; if there are 5 acceptance terms in the first task data, and the first client determines that the second client meets 4 of the 5 terms, then the first client determines that 4 / 5=80% meets the standards, then 90%*80%=72%, and the first client needs to withdraw 72% of the first electronic resources from the first electronic resources to the second client, wherein the 72% of the first electronic resources are the electronic resources of the above-mentioned first numerical value.
[0074] S206: If the first client detects the settlement request of the second client, it sends a transaction request to the blockchain network.
[0075] In one possible implementation, if the first client detects a settlement request from the second client (the settlement request may be the second client calling a smart contract method to request the blockchain network to settle the first task, and the blockchain network sends the settlement request to the first client), the first client can use the private key of the first client to sign the first acceptance data and the first numerical signature of the electronic resource to be withdrawn, obtain the first signature information, and generate a transaction request based on the first signature information, and send the transaction request to the blockchain network, so that the blockchain network uses the public key of the first client to verify the first signature information. Optionally, the transaction request may include the first acceptance data for the first task and the first value of the electronic resource to be withdrawn, and the second client withdraws the electronic resource of the first value from the first electronic resource according to the first acceptance data; wherein the first acceptance data may be input by the first client after accepting the first task performed by the second client according to the acceptance terms and task deadline in the above-mentioned first task data, and the first acceptance data may include the deadline for the second client to complete the first task and the various data obtained when the first client accepts the first task according to the above-mentioned acceptance terms; the first client calculates the electronic resource of the first value according to the deadline for the second client to complete the first task and the above-mentioned various data. Optionally, when the blockchain network successfully verifies the above-mentioned first signature information and the second signature information, the electronic resource of the first value can be withdrawn from the first electronic resource to the second client according to the above-mentioned withdrawal request. Optionally, the transaction request may include the first signature information and the transaction information, and the first signature information may be attached to the transaction information, wherein the transaction information may include the first acceptance data and the first value of the electronic resource to be withdrawn.
[0076] Optionally, the first client can receive a task completion instruction from the blockchain network by calling the fourth function (such as method d) in the smart contract, and send evaluation information for the first task to the blockchain network, so that the blockchain network updates the user information of the second client according to the evaluation information. Optionally, the user information of the second client can include rating information.
[0077] In an embodiment of the present application, the first client can upload the first task data corresponding to the first task and the first electronic resource associated with the first task to the blockchain network, so that the blockchain network can publish the first task data and freeze the first electronic resource, and view the user information of the second client who claims the first task through the blockchain network. If a settlement request from the second client is detected, a transaction request is sent to the blockchain network, and the transaction request includes the first acceptance data for the first task and the first value of the electronic resource to be withdrawn, so that the second client can withdraw the electronic resource of the first value from the first electronic resource according to the first acceptance data. By adopting the embodiment of the present application, it can be ensured that the first client accepts the first task and makes payment in time after the second client completes the first task, which reduces the loss of the second client and improves the fairness of the transaction and the security of funds.
[0078] See also Figure 3 , Figure 3 is a flow chart of another data processing method based on blockchain provided in an embodiment of the present application. Figure 3 As shown, the data processing method based on blockchain can be Figure 1 The first client and the second client in the method are executed together, and the method may include but is not limited to the following steps S301-S314:
[0079] S301, the first client calls the first function in the smart contract to create a first project.
[0080] In a possible implementation, a smart contract may include multiple functions, and the multiple functions may correspond to multiple different functions. Optionally, the first project may include at least one task, and the at least one task includes the first task. Optionally, the relationship between the above tasks is a serial execution relationship. Optionally, the above tasks may include at least one subtask, and if there is a dependency relationship between the subtasks, the relationship between the subtasks is a serial execution relationship; if there is no dependency relationship between the subtasks, the relationship between the subtasks is a parallel execution relationship, wherein the dependency relationship may be the execution order of at least one subtask.
[0081] S302, the first client calls the second function in the smart contract to add first task data to the first task.
[0082] In a possible implementation, the first task data may include task content information, acceptance terms corresponding to the first task, manpower support information provided by the first client for the first task, and material inventory information, wherein the acceptance terms may include multiple terms.
[0083] S303, the first client uploads the first task data corresponding to the first task and the first electronic resource associated with the first task to the blockchain network, so that the blockchain network publishes the first task data and freezes the first electronic resource.
[0084] In a possible implementation manner, step S303 of the present application embodiment can refer to Figure 2 Step S201 of the illustrated embodiment will not be described in detail here.
[0085] S304: The second client checks the first task data corresponding to the first task uploaded by the first client and the first electronic resource associated with the first task in the blockchain network.
[0086] In a possible implementation manner, step S304 of the present application embodiment can refer to Figure 2 Step S202 of the illustrated embodiment will not be described in detail here.
[0087] S305, the second client sends a claim request to the blockchain network to request claiming the first task.
[0088] In a possible implementation manner, step S305 of the present application embodiment can refer to Figure 2 Step S203 of the illustrated embodiment will not be described in detail here.
[0089] S306: The second client uploads the second electronic resource to the blockchain network so that the blockchain network freezes the second electronic resource.
[0090] In a possible implementation, the second electronic resource is used to withdraw the electronic resource of the second value from the second electronic resource to the first client if the first acceptance data includes the first indication information, and the first indication information is used to indicate the withdrawal of the electronic resource of the second value from the first client. Optionally, the first acceptance data may include material loss data, which is input by the first client for the material loss that occurs in the process of the second client performing the first task. The electronic resource of the second value can be calculated based on the material loss data, so that the blockchain network can withdraw the electronic resource of the second value from the second electronic resource to the first client.
[0091] S307, the first client checks the user information of the second client who claims the first task through the blockchain network.
[0092] In a possible implementation manner, step S307 of the present application embodiment can refer to Figure 2 Step S204 of the illustrated embodiment will not be described in detail here.
[0093] S308, the second client obtains first acceptance data for the first task and a first value of the electronic resources to be withdrawn from the blockchain network.
[0094] In a possible implementation, the first acceptance data of the first task and the first value of the electronic resources to be withdrawn may be uploaded to the blockchain network by the first client. Optionally, the first acceptance data may be input by the first client after accepting the first task performed by the second client according to the acceptance terms and task deadline in the first task data. The first acceptance data may include the deadline for the second client to complete the first task and various data obtained when the first client accepts the first task according to the acceptance terms; the first client may calculate the first value of the electronic resources according to the deadline for the second client to complete the first task and the above data, and upload the first acceptance data for the first task and the first value of the electronic resources to be withdrawn to the blockchain network.
[0095] S309, the second client signs the first acceptance data and the first numerical value of the electronic resource to be withdrawn through the private key of the second client to obtain second signature information.
[0096] In a possible implementation, the second client can generate a corresponding private key and public key of the second client, and the second client can perform a hash operation on the first acceptance data and the first value of the electronic resource to be withdrawn to obtain a first hash value, and based on a digital signature algorithm, use the private key of the second client to sign the first hash value to obtain second signature information. Optionally, the digital signature algorithm may include but is not limited to: RSA (a signature algorithm), DSA (a signature algorithm), ECDSA (a signature algorithm), and the like.
[0097] S310, the second client generates a withdrawal request based on the second signature information, and sends the withdrawal request to the blockchain network, so that the blockchain network uses the public key of the second client to verify the second signature information.
[0098] In one possible implementation, the second client generates a withdrawal request based on the second signature information, and sends the withdrawal request to the blockchain network, so that the blockchain network uses the public key of the second client to decrypt the second signature information to obtain a second hash value. If the second hash value is the same as the first hash value, the signature verification is successful, and it is determined that the withdrawal request is generated by the second client. The blockchain network can then withdraw electronic resources of the first value from the first electronic resource to the second client according to the withdrawal request.
[0099] S311, the first client signs the first acceptance data and the first numerical value of the electronic resource to be withdrawn through the private key of the first client to obtain the first signature information.
[0100] In a possible implementation, the first client can generate a corresponding private key and public key of the first client, and then the first client can perform a hash operation on the first acceptance data and the first value of the electronic resource to be withdrawn to obtain a third hash value, and based on a digital signature algorithm, use the private key of the first client to sign the third hash value to obtain first signature information. Optionally, the digital signature algorithm may include but is not limited to: RSA (a signature algorithm), DSA (a signature algorithm), ECDSA (a signature algorithm), and the like.
[0101] S312, the first client generates a transaction request based on the first signature information, and sends the transaction request to the blockchain network, so that the blockchain network uses the public key of the first client to verify the first signature information.
[0102] In a possible implementation, the transaction request may include the first acceptance data for the first task and the first value of the electronic resource to be withdrawn, so that the second client can withdraw the electronic resource of the first value from the first electronic resource according to the first acceptance data. Optionally, the first client generates a transaction request based on the first signature information, and sends the transaction request to the blockchain network, so that the blockchain network uses the public key of the first client to decrypt the first signature information and obtain a fourth hash value. If the fourth hash value is the same as the third hash value, the signature verification is successful, and it is determined that the transaction request is generated by the first client, so that the second client can withdraw the electronic resource of the first value from the first electronic resource according to the first acceptance data. Optionally, the transaction request may include the first signature information and the transaction information, and the first signature information may be attached to the transaction information, wherein the transaction information may include the first acceptance data and the first value of the electronic resource to be withdrawn.
[0103] S313, the first client receives a task completion instruction from the blockchain network, and sends evaluation information for the first task to the blockchain network, so that the blockchain network updates the user information of the second client according to the evaluation information.
[0104] In one possible implementation, the task completion instruction is triggered after the blockchain network withdraws the electronic resource of the first value from the first electronic resource to the second client after successfully verifying the first signature information and the second signature information, and the second signature information is obtained by signing the first acceptance data and the first value with the private key of the second client. Optionally, if the blockchain network successfully verifies the first signature information, it means that the transaction request is generated by the first client; if the blockchain network successfully verifies the second signature information, it is determined that the withdrawal request is generated by the second client; if the blockchain network successfully verifies the first signature information and the second signature information, the first client can withdraw the electronic resource of the first value from the first electronic resource to the second client, and the task is completed. Among them, the private key (such as the first private key or the second private key) signing method is adopted to make the first client and the second client unable to deny their own behavior, enhance the role of goodwill, and increase the cost of doing evil, thereby protecting the interests of both the first client and the second client. For example, if either the first client or the second client breaches the contract, it is necessary to pay the corresponding liquidated damages from the electronic resources (such as the first electronic resources or the second electronic resources).
[0105] Further, the first client can call the fourth function (such as method d) in the smart contract, receive a task completion instruction from the blockchain network, and send evaluation information for the first task to the blockchain network, so that the blockchain network updates the user information of the second client according to the evaluation information. Optionally, the evaluation information may include rating information. Optionally, the first client can preset multiple rating ranges and the values of multiple electronic resources corresponding to the multiple rating ranges; score the second client to obtain a target score; determine that the target score belongs to the target rating range in the multiple rating ranges; determine the third value of the target electronic resource corresponding to the target rating range, and the first client can withdraw the electronic resource of the third value from the first electronic resource to the second client.
[0106] S314, the second client receives a task completion instruction from the blockchain network, and sends a claim request to the blockchain network for claiming the second task.
[0107] In a possible implementation, the task completion instruction is triggered after the blockchain network successfully verifies the first signature information and the second signature information, and then withdraws the electronic resource of the first value from the first electronic resource to the second client. The first signature information is obtained by signing the first acceptance data and the first value with the private key of the first client. Optionally, the second client receives the task completion instruction from the blockchain network and can send a claim request to the blockchain network for claiming the second task. The second task can be one of the at least one tasks included in the above-mentioned first project. Optionally, the second client can evaluate the first client.
[0108] Optionally, the arbitration institution can be registered on the blockchain network. After the arbitration institution is successfully registered, it is qualified to handle the labor dispute between the first client and the second client, and can call the dispute arbitration contract to handle the above-mentioned first electronic resources and second electronic resources; wherein, the first user corresponding to the first client can be the project party, and the second user corresponding to the second client can be the contractor. The arbitration institution may include but is not limited to the Human Resources Bureau, the trade union and the judicial department.
[0109] In an embodiment of the present application, the first client can upload the first task data corresponding to the first task and the first electronic resource associated with the first task to the blockchain network, so that the blockchain network can publish the first task data and freeze the first electronic resource, and view the user information of the second client who claims the first task through the blockchain network. If a settlement request from the second client is detected, a transaction request is sent to the blockchain network, and the transaction request includes the first acceptance data for the first task and the first value of the electronic resource to be withdrawn, so that the second client can withdraw the electronic resource of the first value from the first electronic resource according to the first acceptance data. By adopting the embodiment of the present application, it can be ensured that the first client accepts the first task and makes payment in time after the second client completes the first task, which reduces the loss of the second client and improves the fairness of the transaction and the security of funds.
[0110] See also Figure 4 , Figure 4 Schematic diagram of a data processing device based on blockchain provided in an embodiment of the present application. Figure 4 As shown, the blockchain-based data processing device 40 can be run in the first client, and the blockchain-based data processing device 40 may include:
[0111] A first uploading unit 403 is used to upload first task data corresponding to the first task and a first electronic resource associated with the first task to the blockchain network, so that the blockchain network publishes the first task data and freezes the first electronic resource;
[0112] A first viewing unit 404 is used to view user information of a second client that claims the first task through the blockchain network;
[0113] The first sending unit 405 is used to send a transaction request to the blockchain network if a settlement request from the second client is detected. The transaction request includes first acceptance data for the first task and a first value of the electronic resources to be withdrawn, so that the second client can withdraw the electronic resources of the first value from the first electronic resources according to the first acceptance data.
[0114] In a possible implementation manner, the first sending unit 405 is further configured to:
[0115] Sign the first acceptance data and the first numerical value of the electronic resource to be withdrawn by using the private key of the first client to obtain first signature information;
[0116] Based on the first signature information, a transaction request is generated, and the transaction request is sent to the blockchain network, so that the blockchain network uses the public key of the first client to verify the first signature information.
[0117] In a possible implementation, the blockchain-based data processing device 40 further includes:
[0118] A creation unit 401 is used to call a first function in a smart contract to create a first project, where the first project includes at least one task, and the at least one task includes the first task;
[0119] The adding unit 402 is used to call the second function in the smart contract to add the first task data to the first task.
[0120] In a possible implementation, the blockchain-based data processing device 40 further includes:
[0121] The first transceiver unit 406 is used to receive a task completion instruction from the blockchain network; the first transceiver unit 406 is also used to send evaluation information for the first task to the blockchain network, so that the blockchain network updates the user information of the second client according to the evaluation information;
[0122] Among them, the task completion instruction is triggered after the blockchain network successfully verifies the first signature information and the second signature information, and withdraws the electronic resource of the first value from the first electronic resource to the second client. The second signature information is obtained by signing the first acceptance data and the first value with the private key of the second client.
[0123] In an embodiment of the present application, the first client can upload the first task data corresponding to the first task and the first electronic resource associated with the first task to the blockchain network, so that the blockchain network can publish the first task data and freeze the first electronic resource, and view the user information of the second client who claims the first task through the blockchain network. If a settlement request from the second client is detected, a transaction request is sent to the blockchain network, and the transaction request includes the first acceptance data for the first task and the first value of the electronic resource to be withdrawn, so that the second client can withdraw the electronic resource of the first value from the first electronic resource according to the first acceptance data. By adopting the embodiment of the present application, it can be ensured that the first client accepts the first task and makes payment in time after the second client completes the first task, which reduces the loss of the second client and improves the fairness of the transaction and the security of funds.
[0124] See also Figure 5 , Figure 5 Schematic diagram of another data processing device based on blockchain provided in an embodiment of the present application. Figure 5 As shown, the blockchain-based data processing device 50 can be run in the second client, and the blockchain-based data processing device 50 may include:
[0125] A second viewing unit 501 is used to view first task data corresponding to a first task uploaded by a first client and a first electronic resource associated with the first task in the blockchain network, wherein the first electronic resource is frozen in the blockchain network;
[0126] The second sending unit 502 is used to send a claim request for claiming the first task to the blockchain network, where the claim request includes user information of the second client, so that the first client can view user information of the second client who claims the first task through the blockchain network;
[0127] The acquisition unit 504 is used to obtain the first acceptance data for the first task and the first value of the electronic resources to be withdrawn from the blockchain network, and send a withdrawal request to the blockchain network according to the first acceptance data, so that the blockchain network withdraws the electronic resources of the first value from the first electronic resources to the second client according to the withdrawal request.
[0128] In a possible implementation, the blockchain-based data processing device 50 further includes:
[0129] The second uploading unit 503 is used to upload the second electronic resource to the blockchain network so that the blockchain network freezes the second electronic resource. The second electronic resource is used to withdraw the electronic resource of the second value from the second electronic resource to the first client if the first acceptance data includes the first indication information. The first indication information is used to indicate the withdrawal of the electronic resource of the second value from the first client.
[0130] In a possible implementation manner, the acquisition unit 504 is further configured to:
[0131] Sign the first acceptance data and the first numerical value of the electronic resource to be withdrawn by using the private key of the second client to obtain second signature information;
[0132] Based on the second signature information, a withdrawal request is generated, and the withdrawal request is sent to the blockchain network so that the blockchain network uses the public key of the second client to verify the second signature information.
[0133] In a possible implementation, the blockchain-based data processing device 50 further includes:
[0134] The second transceiver unit 505 is used to receive a task completion instruction from the blockchain network; the second transceiver unit 505 is also used to send a claim request to the blockchain network for requesting to claim the second task. The task completion instruction is triggered after the blockchain network successfully verifies the first signature information and the second signature information, and withdraws the electronic resource of the first value from the first electronic resource to the second client. The first signature information is obtained by signing the first acceptance data and the first value with the private key of the first client.
[0135] In an embodiment of the present application, the second client can view the first task data corresponding to the first task uploaded by the first client and the first electronic resource associated with the first task in the blockchain network, and send a claim request to the blockchain network for claiming the first task, and then obtain the first acceptance data for the first task and the first value of the electronic resource to be withdrawn from the blockchain network, and send a withdrawal request to the blockchain network based on the first acceptance data, so that the blockchain network withdraws the electronic resource of the first value from the first electronic resource to the second client according to the withdrawal request. By adopting the embodiment of the present application, it can be ensured that the first client promptly accepts the first task and makes payment after the second client completes the first task, reducing the loss of the second client and improving the fairness of the transaction and the security of funds.
[0136] See also Figure 6 , Figure 660 is a schematic diagram of the composition structure of a blockchain-based data processing device provided in an embodiment of the present application. The blockchain-based data processing device 60 includes a processor 601, a memory 602, an input / output interface 603, and a communication bus 604. The processor 601 is connected to the memory 602 and the input / output interface 603. For example, the processor 601 can be connected to the memory 602 and the input / output interface 603 through a communication bus 604.
[0137] The processor 601 is configured to support the blockchain-based data processing device to execute Figure 2-Figure 3 The corresponding functions in the blockchain-based data processing method. The processor 601 can be a central processing unit (CPU), a network processor (NP), a hardware chip or any combination thereof. The above-mentioned hardware chip can be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD can be a complex programmable logic device (CPLD), a field programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
[0138] The memory 602 is used to store program codes, etc. The memory 602 may include a volatile memory (VM), such as a random access memory (RAM); the memory 602 may also include a non-volatile memory (NVM), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); the memory 602 may also include a combination of the above-mentioned types of memory.
[0139] The input / output interface 603 is used to input or output data.
[0140] The processor 601 may call the program code to perform the following operations:
[0141] The first client uploads first task data corresponding to the first task and a first electronic resource associated with the first task to the blockchain network, so that the blockchain network publishes the first task data and freezes the first electronic resource;
[0142] The first client checks user information of the second client who claims the first task through the blockchain network;
[0143] If the first client detects the settlement request of the second client, it sends a transaction request to the blockchain network, where the transaction request includes first acceptance data for the first task and a first value of the electronic resources to be withdrawn, so that the second client can withdraw the electronic resources of the first value from the first electronic resources according to the first acceptance data.
[0144] The processor 601 may also call the program code to perform the following operations:
[0145] The second client checks the first task data corresponding to the first task uploaded by the first client and the first electronic resource associated with the first task in the blockchain network, wherein the first electronic resource is frozen in the blockchain network;
[0146] The second client sends a claim request to the blockchain network for claiming the first task, where the claim request includes user information of the second client, so that the first client can view user information of the second client claiming the first task through the blockchain network;
[0147] The second client obtains the first acceptance data for the first task and the first value of the electronic resources to be withdrawn from the blockchain network, and sends a withdrawal request to the blockchain network based on the first acceptance data, so that the blockchain network withdraws the electronic resources of the first value from the first electronic resources to the second client based on the withdrawal request.
[0148] It should be noted that the implementation of each operation can also refer to Figure 2-Figure 3 The corresponding description of the method embodiment shown; the processor 601 can also cooperate with the input and output interface 603 to perform other operations in the above method embodiment.
[0149] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, which includes program instructions, and when the program instructions are executed by a computer, the computer executes the method of the aforementioned embodiment, and the computer may be a part of the account information management device mentioned above, for example, the processor 601 mentioned above.
[0150] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0151] In the present application, "A and / or B" refers to one of the following: A, B, A and B. "At least one of..." refers to any combination of the listed items or any number of the listed items. For example, "at least one of A, B and C" refers to one of the following: A, B, C, A and B, B and C, A and C, A, B and C.
[0152] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the above-mentioned program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The above-mentioned storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0153] The method and related apparatus provided by the embodiment of the present application are described with reference to the method flow chart and / or structural diagram provided by the embodiment of the present application. Specifically, each process and / or box in the method flow chart and / or structural diagram, as well as the combination of the processes and / or boxes in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the process. Figure 1 A process or multiple processes and / or structures Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or structures Figure 1These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A flow or multiple flows and / or structures illustrate the steps of the functions specified in one block or multiple blocks.
[0154] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A data processing method based on blockchain, characterized in that: Applied to the first client, including: Uploading first task data corresponding to the first task and a first electronic resource associated with the first task to a blockchain network, so that the blockchain network publishes the first task data and freezes the first electronic resource; Viewing user information of the second client that claims the first task through the blockchain network; wherein, after completing identity registration in the blockchain network, the first client and the second client are qualified to conduct electronic resource transactions and view information in the blockchain network, and the first client and the second client interact with the blockchain network through a decentralized application; If a settlement request from the second client is detected, a transaction request is sent to the blockchain network, wherein the transaction request includes first acceptance data for the first task and a first value of the electronic resource to be withdrawn, so that the second client withdraws the electronic resource of the first value from the first electronic resource according to the first acceptance data; The sending of a transaction request to the blockchain network includes: using a private key of a first client to perform a first numerical signature on first acceptance data and the electronic resources to be withdrawn to obtain first signature information; generating a transaction request based on the first signature information, and sending the transaction request to the blockchain network, so that the blockchain network uses the public key of the first client to verify the first signature information.
2. The method according to claim 1, characterized in that Before uploading the first task data corresponding to the first task and the first electronic resource associated with the first task to the blockchain network, the method further includes: Calling a first function in a smart contract to create a first project, wherein the first project includes at least one task, and the at least one task includes the first task; A second function in the smart contract is called to add first task data to the first task.
3. The method according to claim 1, characterized in that: The method further comprises: receiving a task completion instruction from the blockchain network, and sending evaluation information for the first task to the blockchain network, so that the blockchain network updates the user information of the second client according to the evaluation information; Among them, the task completion instruction is triggered after the blockchain network successfully verifies the first signature information and the second signature information, and withdraws the electronic resource of the first value from the first electronic resource to the second client, and the second signature information is obtained by signing the first acceptance data and the first value with the private key of the second client.
4. A data processing method based on blockchain, characterized in that: Applied to the second client, including: Viewing first task data corresponding to a first task uploaded by a first client and a first electronic resource associated with the first task in a blockchain network, wherein the first electronic resource is frozen in the blockchain network; wherein after completing identity registration in the blockchain network, the first client and the second client are qualified to conduct electronic resource transactions and view information in the blockchain network, and the first client and the second client interact with the blockchain network through a decentralized application; Sending a claim request for claiming the first task to the blockchain network, wherein the claim request includes user information of the second client, so that the first client can view user information of the second client who claims the first task through the blockchain network; Acquire first acceptance data for the first task and a first value of the electronic resource to be withdrawn from the blockchain network, and send a withdrawal request to the blockchain network according to the first acceptance data, so that the blockchain network withdraws the electronic resource of the first value from the first electronic resource to the second client according to the withdrawal request; After sending the claim request to the blockchain network for requesting to claim the first task, it also includes: uploading a second electronic resource to the blockchain network so that the blockchain network freezes the second electronic resource, and the second electronic resource is used to withdraw an electronic resource of a second value from the second electronic resource to the first client if the first acceptance data includes first indication information.
5. The method according to claim 4, characterized in that The sending a withdrawal request to the blockchain network according to the first acceptance data comprises: Sign the first acceptance data and the first numerical value of the electronic resource to be withdrawn by using the private key of the second client to obtain second signature information; Based on the second signature information, a withdrawal request is generated, and the withdrawal request is sent to the blockchain network, so that the blockchain network uses the public key of the second client to verify the second signature information.
6. A data processing device based on blockchain, characterized in that: Applied to the first client, including: A first uploading unit, configured to upload first task data corresponding to a first task and a first electronic resource associated with the first task to a blockchain network, so that the blockchain network publishes the first task data and freezes the first electronic resource; A first viewing unit is used to view user information of a second client that claims the first task through the blockchain network; wherein, after the first client and the second client complete identity registration in the blockchain network, they are qualified to conduct electronic resource transactions and view information in the blockchain network, and the first client and the second client interact with the blockchain network through a decentralized application; A first sending unit is configured to send a transaction request to the blockchain network if a settlement request from the second client is detected, wherein the transaction request includes first acceptance data for the first task and a first value of the electronic resource to be withdrawn, so that the second client withdraws the electronic resource of the first value from the first electronic resource according to the first acceptance data; The first sending unit is also used to obtain a first signature information by using the private key of the first client to sign the first acceptance data and the first numerical signature of the electronic resources to be withdrawn; a transaction request is generated based on the first signature information, and the transaction request is sent to the blockchain network, so that the blockchain network uses the public key of the first client to verify the first signature information.
7. A data processing device based on blockchain, comprising a processor, a memory, and an input / output interface, wherein the processor, the memory, and the input / output interface are interconnected, wherein: The input / output interface is used to input or output data, the memory is used to store program code, and the processor is used to call the program code to execute the blockchain-based data processing method as described in any one of claims 1 to 3; or, the processor is also used to call the program code to execute the blockchain-based data processing method as described in claim 4 or 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which includes program instructions, and when the program instructions are executed by the processor, the processor executes the blockchain-based data processing method as described in any one of claims 1 to 3; or, the computer-readable storage medium stores a computer program, which includes program instructions, and when the program instructions are executed by the processor, the processor executes the blockchain-based data processing method as described in claim 4 or 5.
