Task delegation method, system, device, equipment and storage medium

Through the encryption mechanism and anonymity design of the blockchain system, the problem of privacy leakage during the entrustment process is solved, the privacy protection and data security of the entrusting party and the agent are realized, and the service process is simplified.

CN112529402BActive Publication Date: 2024-10-01HANGZHOU QULIAN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011428937.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-09
Publication Date
2024-10-01
Estimated Expiration
2040-12-09

AI Technical Summary

Technical Problem

During the entrustment process, the client's personal privacy is easily leaked, especially when the client is acting on behalf of a stranger, the anonymity and data privacy of both parties are difficult to guarantee.

Method used

An anonymous delegation service platform is constructed through the blockchain system, and the public key and private key are used to encrypt the service data. Only the client and the agent interact anonymously. The client and the agent cannot directly identify each other. The data passes through the blockchain. The system performs secure storage and transmission to ensure the privacy protection of both parties.

Benefits of technology

It effectively avoids the leakage of personal privacy of the entrusting party and the agent, ensures the anonymity and data security of both parties, simplifies the entrusting agent process, and protects the privacy of both parties.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112529402B_ABST
    Figure CN112529402B_ABST
Patent Text Reader

Abstract

A task delegation method, system, device, equipment and storage medium are disclosed, belonging to the field of blockchain technology. It includes: a first device stores the delegated task and service data in a blockchain system; the blockchain system sends the delegated task to a second device, and after receiving a return task acceptance message, uses a first public key to encrypt the service data to obtain encrypted data, and sets the service agency identifier to have the right to use the service data; sends the task delegation information carrying the encrypted data to the second device; the third device obtains the task delegation information from the second device, and sends a data viewing request carrying the task delegation information and the service agency identifier to the blockchain system; if the blockchain system determines that the service agency identifier carried in the data viewing request has the right to use the service data, it uses the first private key to decrypt the encrypted data it carries, obtains the decrypted data and sends it to the third device. This application can effectively prevent the privacy of the entrusting party from being leaked.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to a task delegation method, system, device, equipment and storage medium. Background Art

[0002] At present, government affairs advocate "running once at most", which significantly simplifies the process of government or related units. In some service scenarios, relevant service agencies support entrustment. However, in the process of entrustment, people usually ask acquaintances to do the work, but the opportunities are rare. If strangers are asked to do the work, it is easy to cause the personal privacy of the client to be leaked. Summary of the invention

[0003] The embodiments of the present application provide a task delegation method, system, device, equipment and storage medium, which can effectively prevent the privacy of the client from being leaked. The technical solution is as follows:

[0004] In a first aspect, a task delegation method is provided, the method comprising:

[0005] The first device stores the delegated task and the service data in the blockchain system, wherein the delegated task includes an identification of the service agency;

[0006] The blockchain system sends the delegated task to the second device; after receiving the task acceptance message sent by the second device, encrypts the service data using the first public key to obtain encrypted data, wherein the first public key and the first private key are the public-private key pair corresponding to the first device; sets the service agency identifier to have the right to use the service data; sends the task delegation information to the second device, wherein the task delegation information includes the encrypted data;

[0007] The third device obtains the task delegation information from the second device; sends a data viewing request to the blockchain system, where the data viewing request carries the task delegation information and the office identifier;

[0008] After the blockchain system receives the data viewing request, if it is determined that the service agency identifier carried in the data viewing request has the authority to use the service data, the first private key is used to decrypt the encrypted data carried in the data viewing request to obtain decrypted data; and the decrypted data is sent to the third device.

[0009] In this application, an anonymous delegation service platform is constructed using the blockchain system. The first device can publish the delegation task, the second device can accept the published delegation task, and then the user of the second device can go to the designated service agency to complete the task. During the delegation process, the second device can only know the destination of the task, but does not know who the principal is, and cannot get the corresponding service data. Similarly, the first device does not know who the agent is, and can only see the status of the delegation task it publishes. In this way, the two parties are anonymized and the data is not shared, so that the personal privacy of the principal and the agent can be effectively protected.

[0010] Optionally, the delegated task also includes the nature of the task.

[0011] Optionally, the blockchain system sets the service agency identifier to have the right to use the service data, including:

[0012] The blockchain system uses the user identifier corresponding to the first device as the encryption party identifier, the user identifier corresponding to the second device as the agent identifier, the agency identifier as the authority identifier, and stores the encrypted data identifier of the encrypted data in correspondence with the encryption party identifier, the agent identifier, and the authority identifier;

[0013] The method further comprises:

[0014] After receiving the data viewing request, the blockchain system obtains the authorized party identifier stored corresponding to the encrypted data identifier of the encrypted data carried by the data viewing request; if the obtained authorized party identifier includes the service agency identifier carried by the data viewing request, it is determined that the service agency identifier carried by the data viewing request has the authority to use the service data.

[0015] Optionally, the method further comprises:

[0016] After the blockchain system receives the task acceptance message sent by the second device, it uses the first public key and the second public key to encrypt the first identity information and the second identity information to obtain the delegation credential, where the first identity information is the user identity information corresponding to the first device, the second identity information is the user identity information corresponding to the second device, and the second public key and the second private key are the public-private key pair corresponding to the second device.

[0017] Optionally, the task delegation information further includes the delegation credential, and the method further includes:

[0018] After the blockchain system receives the data viewing request, if it is determined that the service agency identifier carried in the data viewing request has the authority to use the service data, the first private key and the second private key are used to decrypt the delegation credentials carried in the data viewing request to obtain the first identity information and the second identity information; and the obtained first identity information and the second identity information are sent to the third device.

[0019] Optionally, before the first device stores the delegated tasks and service data in the blockchain system, it further includes:

[0020] The first device sends a first identity registration request to the blockchain system, where the first identity registration request carries first identity information;

[0021] After receiving the first identity registration request, the blockchain system performs identity registration according to the first identity information. When the identity registration is successful, the first public key, the first private key and the corresponding user identifier are allocated to the first device.

[0022] Optionally, before the first device stores the delegated tasks and service data in the blockchain system, it further includes:

[0023] The second device sends a second identity registration request to the blockchain system, where the second identity registration request carries second identity information;

[0024] After receiving the second identity registration request, the blockchain system performs identity registration according to the second identity information. When the identity registration is successful, a second public key, a second private key and a corresponding user identifier are allocated to the second device.

[0025] In a second aspect, a task delegation system is provided, the system comprising: a first device, a second device, a third device, and a blockchain system;

[0026] The first device is used to store the delegated task and service data in the blockchain system, wherein the delegated task includes an identification of the service agency;

[0027] The blockchain system is used to send the delegated task to the second device; after receiving the task acceptance message sent by the second device, encrypt the service data using the first public key to obtain encrypted data, wherein the first public key and the first private key are the public-private key pair corresponding to the first device; set the service agency identifier to have the right to use the service data; send the task delegation information to the second device, wherein the task delegation information includes the encrypted data;

[0028] The third device is used to obtain the task delegation information from the second device; send a data viewing request to the blockchain system, wherein the data viewing request carries the task delegation information and the office identifier;

[0029] The blockchain system is used to, after receiving the data viewing request, use the first private key to decrypt the encrypted data carried by the data viewing request to obtain decrypted data if it is determined that the service agency identifier carried by the data viewing request has the right to use the service data; and send the decrypted data to the third device.

[0030] Optionally, the delegated task also includes the nature of the task.

[0031] Optionally, the blockchain system is used to:

[0032] Using the user identifier corresponding to the first device as the encryption party identifier, using the user identifier corresponding to the second device as the agent identifier, using the agency identifier as the authority identifier, and storing the encrypted data identifier of the encrypted data in correspondence with the encryption party identifier, the agent identifier, and the authority identifier;

[0033] The blockchain system is also used to:

[0034] After receiving the data viewing request, the authorized party identifier stored corresponding to the encrypted data identifier of the encrypted data carried by the data viewing request is obtained; if the obtained authorized party identifier includes the service agency identifier carried by the data viewing request, it is determined that the service agency identifier carried by the data viewing request has the authority to use the service data.

[0035] Optionally, the blockchain system is also used to:

[0036] After receiving the task acceptance message sent by the second device, the first identity information and the second identity information are encrypted using the first public key and the second public key to obtain the delegation credentials, where the first identity information is the user identity information corresponding to the first device, the second identity information is the user identity information corresponding to the second device, and the second public key and the second private key are the public-private key pair corresponding to the second device.

[0037] Optionally, the task delegation information further includes the delegation credential, and the blockchain system is further used for:

[0038] After receiving the data viewing request, if it is determined that the service agency identifier carried in the data viewing request has the authority to use the service data, the first private key and the second private key are used to decrypt the delegation credentials carried in the data viewing request to obtain the first identity information and the second identity information; the obtained first identity information and the second identity information are sent to the third device.

[0039] Optionally, the first device is further used to send a first identity registration request to the blockchain system, where the first identity registration request carries first identity information;

[0040] The blockchain system is also used to perform identity registration according to the first identity information after receiving the first identity registration request, and when the identity registration is successful, allocate the first public key, the first private key and the corresponding user identifier to the first device.

[0041] Optionally, the second device is further used to send a second identity registration request to the blockchain system, where the second identity registration request carries second identity information;

[0042] The blockchain system is also used to perform identity registration according to the second identity information after receiving the second identity registration request, and when the identity registration is successful, allocate a second public key, a second private key and a corresponding user identifier to the second device.

[0043] In a third aspect, a task delegation method is provided, which is applied to a blockchain system in a task delegation system, wherein the task delegation system includes a first device, a second device, a third device, and the blockchain system, and the method includes:

[0044] Storing the delegated tasks and service data in the first device, wherein the delegated tasks include an identification of the service agency;

[0045] sending the delegated task to the second device;

[0046] After receiving the task acceptance message sent by the second device, encrypt the service data using the first public key to obtain encrypted data, wherein the first public key and the first private key are a public-private key pair corresponding to the first device; and set the service agency identifier to have the right to use the service data;

[0047] sending task delegation information to the second device, the task delegation information including the encrypted data;

[0048] receiving a data viewing request sent by the third device, wherein the data viewing request carries the task delegation information and the office identifier, and the task delegation information is obtained by the third device from the second device;

[0049] If it is determined that the service agency identifier carried in the data viewing request has the authority to use the service data, decrypt the encrypted data carried in the data viewing request using the first private key to obtain decrypted data;

[0050] The decrypted data is sent to the third device.

[0051] Optionally, the delegated task also includes the nature of the task.

[0052] Optionally, the step of setting the service agency identifier to have permission to use the service data includes:

[0053] Using the user identifier corresponding to the first device as the encryption party identifier, using the user identifier corresponding to the second device as the agent identifier, using the agency identifier as the authority identifier, and storing the encrypted data identifier of the encrypted data in correspondence with the encryption party identifier, the agent identifier, and the authority identifier;

[0054] The method further comprises:

[0055] After receiving the data viewing request, the authorized party identifier stored corresponding to the encrypted data identifier of the encrypted data carried by the data viewing request is obtained; if the obtained authorized party identifier includes the service agency identifier carried by the data viewing request, it is determined that the service agency identifier carried by the data viewing request has the authority to use the service data.

[0056] Optionally, the method further comprises:

[0057] After receiving the task acceptance message sent by the second device, the first identity information and the second identity information are encrypted using the first public key and the second public key to obtain the delegation credentials, where the first identity information is the user identity information corresponding to the first device, the second identity information is the user identity information corresponding to the second device, and the second public key and the second private key are the public-private key pair corresponding to the second device.

[0058] Optionally, the task delegation information further includes the delegation credential, and the method further includes:

[0059] After receiving the data viewing request, if it is determined that the service agency identifier carried in the data viewing request has the authority to use the service data, the first private key and the second private key are used to decrypt the delegation credentials carried in the data viewing request to obtain the first identity information and the second identity information; the obtained first identity information and the second identity information are sent to the third device.

[0060] Optionally, before storing the delegated tasks and service data in the first device, the method further includes:

[0061] receiving a first identity registration request sent by the first device, where the first identity registration request carries first identity information;

[0062] Identity registration is performed according to the first identity information, and when the identity registration is successful, the first public key, the first private key and a corresponding user identifier are allocated to the first device.

[0063] Optionally, before storing the delegated tasks and service data in the first device, the method further includes:

[0064] receiving a second identity registration request sent by the second device, where the second identity registration request carries second identity information;

[0065] Identity registration is performed according to the second identity information, and when the identity registration is successful, a second public key, a second private key and a corresponding user identifier are allocated to the second device.

[0066] In a fourth aspect, a task delegation device is provided, which is applied to a blockchain system in a task delegation system, wherein the task delegation system includes a first device, a second device, a third device, and the blockchain system, and the device includes:

[0067] A storage module, used for storing the delegated tasks and service data in the first device, wherein the delegated tasks include an identification of a service agency;

[0068] A sending module, used for sending the delegated task to the second device;

[0069] an encryption module, configured to, after receiving a task acceptance message sent by the second device, encrypt the service data using a first public key to obtain encrypted data, wherein the first public key and the first private key are a public-private key pair corresponding to the first device; and set the service agency identifier to have the right to use the service data;

[0070] The sending module is used to send task delegation information to the second device, wherein the task delegation information includes the encrypted data;

[0071] A receiving module, configured to receive a data viewing request sent by the third device, wherein the data viewing request carries the task delegation information and the agency identifier, and the task delegation information is obtained by the third device from the second device;

[0072] a decryption module, configured to decrypt the encrypted data carried in the data viewing request using the first private key to obtain decrypted data if it is determined that the service agency identifier carried in the data viewing request has the authority to use the service data;

[0073] The sending module is used to send the decrypted data to the third device.

[0074] Optionally, the delegated task also includes the nature of the task.

[0075] Optionally, the encryption module is used to:

[0076] Using the user identifier corresponding to the first device as the encryption party identifier, using the user identifier corresponding to the second device as the agent identifier, using the agency identifier as the authority identifier, and storing the encrypted data identifier of the encrypted data in correspondence with the encryption party identifier, the agent identifier, and the authority identifier;

[0077] The device further includes a determining module, wherein the determining module is configured to:

[0078] After receiving the data viewing request, the authorized party identifier stored corresponding to the encrypted data identifier of the encrypted data carried by the data viewing request is obtained; if the obtained authorized party identifier includes the service agency identifier carried by the data viewing request, it is determined that the service agency identifier carried by the data viewing request has the authority to use the service data.

[0079] Optionally, the encryption module is further used for:

[0080] After receiving the task acceptance message sent by the second device, the first identity information and the second identity information are encrypted using the first public key and the second public key to obtain the delegation credentials, where the first identity information is the user identity information corresponding to the first device, the second identity information is the user identity information corresponding to the second device, and the second public key and the second private key are the public-private key pair corresponding to the second device.

[0081] Optionally, the task delegation information also includes the delegation credential;

[0082] The decryption module is further configured to, after receiving the data viewing request, use the first private key and the second private key to decrypt the delegation credential carried in the data viewing request to obtain the first identity information and the second identity information if it is determined that the service agency identifier carried in the data viewing request has the right to use the service data;

[0083] The sending module is further configured to send the obtained first identity information and the second identity information to the third device.

[0084] Optionally, the device further comprises a distribution module;

[0085] The receiving module is further configured to receive a first identity registration request sent by the first device, where the first identity registration request carries first identity information;

[0086] The allocation module is used to perform identity registration according to the first identity information, and when the identity registration is successful, allocate the first public key, the first private key and the corresponding user identifier to the first device.

[0087] Optionally, the device further comprises a distribution module;

[0088] The receiving module is further configured to receive a second identity registration request sent by the second device, where the second identity registration request carries second identity information;

[0089] The allocation module is used to perform identity registration according to the second identity information, and when the identity registration is successful, allocate a second public key, a second private key and a corresponding user identifier to the second device.

[0090] In a fifth aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the task delegation method described in the third aspect.

[0091] In a sixth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the task delegation method described in the third aspect is implemented.

[0092] In a seventh aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the steps of the task delegation method described in the third aspect.

[0093] It can be understood that the beneficial effects of the second, third, fourth, fifth, sixth and seventh aspects mentioned above can be found in the relevant description of the first aspect mentioned above and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0094] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of 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 any creative work.

[0095] Figure 1It is a structural diagram of a blockchain system provided by an embodiment of the present application;

[0096] Figure 2 It is a schematic diagram of a blockchain provided by an embodiment of the present application;

[0097] Figure 3 is a schematic diagram of a task delegation system provided in an embodiment of the present application;

[0098] Figure 4 is a flowchart of a task delegation method provided in an embodiment of the present application;

[0099] Figure 5 is a flow chart of another task delegation method provided by an embodiment of the present application;

[0100] Figure 6 It is a structural schematic diagram of a task delegation device provided in an embodiment of the present application;

[0101] Figure 7 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0102] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0103] It should be understood that the "multiple" mentioned in this application refers to two or more. In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of this application, the words "first" and "second" are used to distinguish between the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not limit them to be different.

[0104] Before explaining the embodiments of the present application, the relevant contents of the blockchain are explained first.

[0105] Figure 1 It is a structural diagram of a blockchain system provided in an embodiment of the present application.

[0106] See also Figure 1, the blockchain system 100 refers to a system for sharing data between nodes, and the blockchain system 100 may include multiple nodes 101, and the multiple nodes 101 may refer to various clients in the blockchain system 100. Each node 101 can receive input information during normal operation, and maintain the shared data in the blockchain system 100 based on the received input information. In order to ensure the information intercommunication within the blockchain system 100, there may be an information connection between each node 101 in the blockchain system 100, and information can be transmitted between the nodes 101 through the information connection. For example, when any node 101 in the blockchain system 100 receives input information, other nodes 101 in the blockchain system 100 obtain the input information according to the consensus algorithm, and store the input information as data in the shared data, so that the data stored on all nodes 101 in the blockchain system 100 are consistent.

[0107] Each node 101 in the blockchain system 100 stores an identical blockchain. Figure 2 The blockchain consists of multiple blocks. The genesis block includes a block header and a block body. The block header stores the input information characteristic value, version number, timestamp and difficulty value, and the block body stores the input information; the next block of the genesis block takes the genesis block as the parent block, and the next block also includes a block header and a block body. The block header stores the input information characteristic value of the current block, the block header characteristic value, version number, timestamp and difficulty value of the parent block, and so on, so that the block data stored in each block in the blockchain is associated with the block data stored in the parent block, ensuring the security of the input information in the block.

[0108] The blockchain system 100 has computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. The blockchain system 100 is a distributed shared account book and database, which has the characteristics of decentralization, non-tamperability, full traceability, traceability, collective maintenance, openness and transparency. These characteristics ensure the sharing, openness, authenticity, integrity, security and reliability of the blockchain.

[0109] The system architecture involved in the embodiments of the present application is described below.

[0110] Figure 3 is a schematic diagram of a task delegation system provided in an embodiment of the present application. Figure 3 , the task delegation system includes: a first device 301, a second device 302, a third device 303, and a blockchain system 304.

[0111] The first device 301 is a device of the client, and the client is the party who needs to handle affairs on behalf of the client. The first device 301 can be a general-purpose computer device or a special-purpose computer device. In a specific implementation, the first device 301 can be a desktop computer, a portable computer, a network server, a handheld computer, a mobile phone, a tablet computer, a wireless terminal device, a communication device or an embedded device. The embodiment of the present application does not limit the type of the first device 301, as long as the first device 301 can be used by the client.

[0112] The second device 302 is a device of the agent. The agent is a party that can handle affairs on behalf of the agent. The second device 302 can be a general-purpose computer device or a special-purpose computer device. In a specific implementation, the second device 302 can be a desktop computer, a portable computer, a network server, a palm computer, a mobile phone, a tablet computer, a wireless terminal device, a communication device or an embedded device. The embodiment of the present application does not limit the type of the second device 302, as long as the second device 302 can be used by the agent.

[0113] The third device 303 is a device of an office. An office is a party that handles specific affairs. The third device 303 can be a general-purpose computer device or a dedicated computer device. In a specific implementation, the third device 303 can be a desktop computer, a portable computer, a network server, a palm computer, a mobile phone, a tablet computer, a wireless terminal device, a communication device or an embedded device. The embodiment of the present application does not limit the type of the third device 303, as long as the third device 303 can be used by the office.

[0114] The blockchain system 304 may be the above Figure 1-Figure 2 The blockchain system 100 described in the embodiment.

[0115] In one possible manner, the first device 301 is a device that can communicate directly with the blockchain system 304, such as the first device 301 can be a network server, etc. In this manner, the first device 301 can communicate with the blockchain system 304 through a wired network or a wireless network. In another possible manner, the first device 301 is a device that cannot communicate directly with the blockchain system 304, such as the first device 301 can be a terminal device, etc. In this manner, the task delegation system can also include a business system, and the first device 301 can communicate with the blockchain system 304 through the business system, that is, the business system can forward the information sent by the first device 301 to the blockchain system 304, and can also forward the information sent by the blockchain system 304 to the first device 301.

[0116] In one possible manner, the second device 302 is a device that can communicate directly with the blockchain system 304, such as the second device 302 can be a network server, etc. In this manner, the second device 302 can communicate with the blockchain system 304 through a wired network or a wireless network. In another possible manner, the second device 302 is a device that cannot communicate directly with the blockchain system 304, such as the second device 302 can be a terminal device, etc. In this manner, the task delegation system can also include a business system, and the second device 302 can communicate with the blockchain system 304 through the business system, that is, the business system can forward the information sent by the second device 302 to the blockchain system 304, and can also forward the information sent by the blockchain system 304 to the second device 302.

[0117] In one possible manner, the third device 303 is a device that can communicate directly with the blockchain system 304, such as the third device 303 can be a network server, etc. In this manner, the third device 303 can communicate with the blockchain system 304 through a wired network or a wireless network. In another possible manner, the third device 303 is a device that cannot communicate directly with the blockchain system 304, such as the third device 303 can be a terminal device, etc. In this manner, the task delegation system can also include a business system, and the third device 303 can communicate with the blockchain system 304 through the business system, that is, the business system can forward the information sent by the third device 303 to the blockchain system 304, and can also forward the information sent by the blockchain system 304 to the third device 303.

[0118] The first device 301, the second device 302, the third device 303 and the blockchain system 304 may execute the following Figure 4 The task delegation method described in the embodiment is used to implement the delegation of affairs.

[0119] In order to ensure the reliability of the device identity connected to the blockchain system, the entrusting party and the agent can first register their identities in the blockchain system. The following is an explanation of the identity registration process for the entrusting party and the agent.

[0120] The identity registration process of the client may include the following steps (1) to (3):

[0121] (1) The first device sends a first identity registration request to the blockchain system.

[0122] The first identity registration request is used to request identity registration for the user of the first device (ie, the entrusting party). The first identity registration request carries first identity information. The first identity information is the user identity information corresponding to the first device, that is, the identity information of the user of the first device.

[0123] (2) After the blockchain system receives the first identity registration request sent by the first device, it performs identity registration according to the first identity information carried in the first identity registration request. When the identity registration is successful, it allocates a first public key, a first private key and a corresponding user identifier to the first device.

[0124] The user identifier corresponding to the first device is used to identify the identity of the user of the first device. For example, the user identifier corresponding to the first device can be a first user account, a first device identifier, etc. The first user account is a user account that can be used by the user of the first device. The first device identifier is used to identify the first device, such as the first device identifier can be a UUID (Universally Unique Identifier), a MAC (Media Access Control) address, an IP (Internet Protocol) address, or a factory serial number of the first device.

[0125] The first public key and the first private key allocated to the first device are a pair of keys. The first public key and the first private key are a public-private key pair corresponding to the first device. One of the first public key and the first private key is used for encryption, and the other is used for decryption.

[0126] The blockchain system can store the first public key, the first private key, the corresponding user identifier, and the first identity information allocated to the first device in correspondence, so that the first public key, the first private key or the first identity information can be obtained later according to the user identifier corresponding to the first device.

[0127] Among them, the operation of the blockchain system performing identity registration according to the first identity information can be: the blockchain system verifies the first identity information; if the first identity information verification passes, it is determined that the identity registration is successful; if the first identity information verification fails, it is determined that the identity registration fails.

[0128] (3) The blockchain system sends the user identifier corresponding to the first device to the first device.

[0129] The blockchain system only sends the user identification corresponding to the first device to the first device. Both the first public key and the first private key are hosted in the blockchain system.

[0130] The identity registration process of the agent may include the following steps (1) to (3):

[0131] (1) The second device sends a second identity registration request to the blockchain system.

[0132] The second identity registration request is used to request the user of the second device (ie, the agent) to register an identity. The second identity registration request carries second identity information. The second identity information is the user identity information corresponding to the second device, ie, the identity information of the user of the second device.

[0133] (2) After receiving the second identity registration request sent by the second device, the blockchain system performs identity registration according to the second identity information carried in the second identity registration request. When the identity registration is successful, the second public key, the second private key and the corresponding user identifier are allocated to the second device.

[0134] The user identifier corresponding to the second device is used to identify the identity of the user of the second device. For example, the user identifier corresponding to the second device can be a second user account, a second device identifier, etc. The second user account is an account that can be used by the user of the second device. The second device identifier is used to identify the second device, such as the second device identifier can be the UUID, MAC address, IP address, or factory serial number of the second device.

[0135] The second public key and the second private key allocated to the second device are a pair of keys. The second public key and the second private key are a public-private key pair corresponding to the second device. One of the second public key and the second private key is used for encryption, and the other is used for decryption.

[0136] The blockchain system can store the second public key, the second private key, the corresponding user identifier and the second identity information allocated to the second device in correspondence, so that the second public key, the second private key or the second identity information can be obtained later according to the user identifier corresponding to the second device.

[0137] Among them, the operation of the blockchain system performing identity registration according to the second identity information can be: the blockchain system verifies the second identity information; if the second identity information verification passes, it is determined that the identity registration is successful; if the second identity information verification fails, it is determined that the identity registration fails.

[0138] (3) The blockchain system sends the user identifier corresponding to the second device to the second device.

[0139] The blockchain system only sends the user identification corresponding to the second device to the second device. Both the second public key and the second private key are hosted in the blockchain system.

[0140] The task delegation method provided in the embodiment of the present application is explained in detail below.

[0141] Figure 4 is a flowchart of a task delegation method provided by an embodiment of the present application. Figure 4 , the method comprises the following steps.

[0142] Step 401: The first device stores the delegated tasks and service data in the blockchain system.

[0143] Service data is the data needed to handle affairs, and the handling of affairs can be completed based on the service data.

[0144] The delegated task includes the task nature and the task destination. The task nature is used to indicate the nature of the matter to be handled, for example, the task nature may be to handle the resident ID card on behalf of the client. The task destination is the agency ID. The agency ID is used to identify the agency that handles the specific matter, for example, the agency ID may be the agency name of the agency.

[0145] Specifically, the first device can send a task release message to the blockchain system, and the task release message carries the delegated task and service data; after receiving the task release message, the blockchain system stores the delegated task and service data carried by the task release message.

[0146] When the blockchain system stores the delegated tasks, it can store the delegated tasks in the blockchain. Specifically, the blockchain system can put the delegated tasks on the blockchain according to the smart contract. That is, the blockchain system can call the smart contract to generate a block storing the delegated tasks, and add the block to the shared blockchain. In this way, the delegated tasks cannot be tampered with.

[0147] Among them, when the blockchain system stores service data, the service data can be stored in the blockchain; or, the hash value of the service data can be stored in the blockchain, and the service data can be stored in the database.

[0148] When the blockchain system stores service data in the blockchain, it can upload the service data to the blockchain according to the smart contract. That is, the blockchain system can call the smart contract to generate a block storing service data and add the block to the shared blockchain. In this way, the service data cannot be tampered with.

[0149] Among them, the operation of the blockchain system storing the hash value of the service data to the blockchain is similar to the operation of the above-mentioned blockchain system storing the service data to the blockchain, and the embodiment of the present application will not be repeated here.

[0150] Smart contracts are credible, immutable data based on blockchain that can automatically execute predefined rules and terms. In the blockchain architecture, smart contracts are stored in the form of on-chain code in the blockchain blocks. Specific operations can be performed by calling smart contracts.

[0151] It is worth noting that the task release message may also carry the user ID corresponding to the first device. In this case, the blockchain system may store the delegated task and the service data while also associating the user ID corresponding to the first device with the stored delegated task and the service data.

[0152] Step 402: The blockchain system sends the delegated task to the second device.

[0153] In one possible manner, after storing the delegated task and service data sent by the first device, the blockchain system can directly send the delegated task to the second device.

[0154] In another possible manner, after receiving the task query message sent by the second device, the blockchain system can obtain the delegated task and send the delegated task to the second device.

[0155] The task query message is used to query the delegated tasks published in the blockchain system. The task query message may carry a task condition, which is used to indicate that the user of the second device can perform the task that meets the task condition. The task condition may include at least one of the task nature and the task destination. Of course, the task query message may not carry the task condition.

[0156] When the task query message carries a task condition, the second device queries for the delegated tasks that meet the task condition among all the unfinished delegated tasks published to the blockchain system. In this case, after receiving the task query message sent by the second device, the blockchain system can send the delegated task to the second device if the delegated task published by the first device meets the task condition.

[0157] When the task query message does not carry the task condition, the second device queries all unfinished delegated tasks published to the blockchain system. In this case, after receiving the task query message sent by the second device, the blockchain system can directly send the delegated tasks published by the first device to the second device.

[0158] It is worth noting that if the blockchain system stores the delegated task in the blockchain, the blockchain system can first obtain the delegated task from the blockchain, and then send the delegated task to the second device.

[0159] Step 403: After receiving the delegated task sent by the blockchain system, the second device displays the delegated task.

[0160] After the second device displays the delegated task, it can be viewed by the user of the second device. After viewing the delegated task, the user of the second device can choose whether to accept the delegated task.

[0161] If the user decides to accept the delegated task, he can first input his identity information in the second device, and confirm the relevant agency agreement displayed in the second device, and then trigger the task acceptance instruction for the delegated task.

[0162] Step 404: If the second device detects a task acceptance instruction for the delegated task, it sends a task acceptance message to the blockchain system.

[0163] The task acceptance instruction is used to indicate acceptance of the delegated task. The task acceptance instruction can be triggered by the user of the second device, and the user can trigger it through operations such as clicking, sliding, voice, gesture, and somatosensory operations, which are not limited in the embodiments of the present application.

[0164] The task acceptance message is used to indicate acceptance of the delegated task. The task acceptance message may carry a user identifier corresponding to the second device.

[0165] Step 405: After receiving the task acceptance message sent by the second device, the blockchain system uses the first public key to encrypt the service data to obtain encrypted data, and sets the service agency identifier to have the right to use the service data.

[0166] After receiving the task acceptance message sent by the second device, the blockchain system can first obtain the user identifier corresponding to the first device associated with the delegated task and the service data, and then obtain the first public key, the first private key and the first identity information according to the user identifier corresponding to the first device. Afterwards, the blockchain system can use the first public key to encrypt the service data to obtain encrypted data. In this case, the blockchain system can also associate the encrypted data identifier of the encrypted data with the service data.

[0167] Among them, the operation of setting the service agency identifier with the permission to use the service data by the blockchain system can be: the blockchain system uses the user identifier corresponding to the first device as the encryption party identifier, the user identifier corresponding to the second device as the agent identifier, and the service agency identifier as the authority party identifier, and stores the encrypted data identifier of the encrypted data in correspondence with the encryption party identifier, the agent identifier and the authority party identifier.

[0168] Since the encrypted data is obtained by encrypting the service data, after the encrypted data identifier of the encrypted data is stored correspondingly with the service agency identifier, the service agency identifier has the right to use the service data.

[0169] The encrypted data identifier of the encrypted data is used to identify the encrypted data, for example, the encrypted data identifier of the encrypted data may be the name of the encrypted data, etc. The encrypted data identifier of the encrypted data may be directly obtained from the encrypted data without decrypting the encrypted data.

[0170] Furthermore, after receiving the task acceptance message sent by the second device, the blockchain system can also use the first public key and the second public key to encrypt the first identity information and the second identity information to obtain the delegation credential.

[0171] After the blockchain system receives the task acceptance message sent by the second device, it can first obtain the second public key, the second private key, and the second identity information stored corresponding to the user identifier corresponding to the second device in the task acceptance message.

[0172] Among them, the blockchain system uses the first public key and the second public key to encrypt the first identity information and the second identity information to obtain the delegation credential. The operation can be: the blockchain system first uses the first public key to encrypt the first identity information and the second identity information to obtain the first information, and then uses the second public key to encrypt the first information to obtain the delegation credential; or, the blockchain system first uses the second public key to encrypt the first identity information and the second identity information to obtain the second information, and then uses the first public key to encrypt the second information to obtain the delegation credential. Of course, the blockchain system can also use other methods to use the first public key and the second public key to encrypt the first identity information and the second identity information to obtain the delegation credential, and the embodiments of the present application are not limited to this.

[0173] Step 406: The blockchain system sends the task delegation information to the second device.

[0174] The task delegation information includes the encrypted data. Further, the task delegation information may also include the delegation credential.

[0175] After the blockchain system sends the task delegation information to the second device, it can also update the status of the delegated task, for example, it can update the status of the delegated task from published to being processed. After that, the blockchain system can send the status of the delegated task to the first device. Of course, the first device can also actively obtain the status of the delegated task from the blockchain system. In this way, the user of the first device can be informed of the processing status of the delegated task in a timely manner according to the status of the delegated task.

[0176] It is worth noting that in the embodiment of the present application, an anonymous delegation service platform is constructed using the blockchain system. The first device can publish a delegation task, the second device can accept the published delegation task, and then the user of the second device can go to the designated service agency to complete the task. During the delegation process, the second device can only know the destination of the task, but does not know who the principal is, and cannot get the corresponding service data. Similarly, the first device does not know who the agent is, and can only see the status of the delegation task it publishes. In this way, the two parties are anonymized and the data is not shared, so that the personal privacy of the principal and the agent can be effectively protected.

[0177] Step 407: The third device obtains the task delegation information from the second device.

[0178] After the user of the second device arrives at the office, the device of the office (ie, the third device) can obtain the task delegation information from the second device.

[0179] In one possible manner, the second device may send the task delegation information to the third device.

[0180] In another possible manner, the task delegation information may be included in a graphic code (including but not limited to a barcode, a QR code, etc.), and the second device may display the graphic code. The third device may scan the graphic code displayed by the second device to obtain the task delegation information included in the graphic code.

[0181] Step 408: The third device sends the data viewing request to the blockchain system.

[0182] The data viewing request carries the task entrustment information and the service agency identifier. The data viewing request is used to request to view the specific service data required for handling the service that the second device is handling.

[0183] Step 409: After the blockchain system receives the data viewing request sent by the third device, if it is determined that the service agency identifier carried in the data viewing request has the right to use the service data, the encrypted data carried in the data viewing request is decrypted using the first private key to obtain the decrypted data.

[0184] After receiving the data viewing request, the blockchain system can obtain the authorized party identifier stored corresponding to the encrypted data identifier of the encrypted data carried by the data viewing request. If the obtained authorized party identifier includes the service agency identifier carried by the data viewing request, it is determined that the service agency identifier carried by the data viewing request has the authority to use the service data.

[0185] After the blockchain system determines that the service agency identifier carried by the data viewing request has the right to use the service data, it can obtain the encryption party identifier and the agent identifier stored corresponding to the encrypted data identifier of the encrypted data carried by the data viewing request, obtain the first private key according to the obtained encryption party identifier (i.e. the user identifier corresponding to the first device), and obtain the second private key according to the obtained agent identifier (i.e. the user identifier corresponding to the second device). After that, the blockchain system can use the first private key to decrypt the encrypted data carried by the data viewing request to obtain the decrypted data.

[0186] Furthermore, if the data viewing request also carries a delegation credential, the blockchain system can use the first private key and the second private key to decrypt the delegation credential carried in the data viewing request after determining that the service agency identifier carried in the data viewing request has the authority to use the service data, so as to obtain the first identity information and the second identity information.

[0187] Step 410: The blockchain system sends the decrypted data to a third device.

[0188] Furthermore, before sending the decrypted data to the third device, the blockchain system can also detect whether the decrypted data has been tampered with. If the decrypted data has not been tampered with, the blockchain system sends the decrypted data to the third device; if the decrypted data has been tampered with, the blockchain system does not send the decrypted data to the third device, but sends a reminder message to the third device to remind the third device that there is a problem with the encrypted data it has obtained.

[0189] In one possible way, if the blockchain system previously stored the service data directly on the blockchain, the blockchain system can obtain the service data associated with the encrypted data identifier of the encrypted data from the blockchain; if the obtained service data is the same as the decrypted data, it can be determined that the decrypted data has not been tampered with and is the service data; if the obtained service data is different from the decrypted data, it can be determined that the decrypted data has been tampered with and is not the service data.

[0190] In another possible way, if the blockchain system has previously stored the hash value of the service data in the blockchain, the blockchain system can obtain the hash value of the service data associated with the encrypted data identifier of the encrypted data from the blockchain as the first hash value, and then calculate the hash value of the decrypted data as the second hash value; if the first hash value is the same as the second hash value, it can be determined that the decrypted data has not been tampered with and is the service data; if the first hash value is different from the second hash value, it can be determined that the decrypted data has been tampered with and is not the service data.

[0191] While sending the decrypted data to the third device, the blockchain system may also send the first identity information and the second identity information obtained by decrypting the delegation certificate carried in the data viewing request to the third device.

[0192] After the third device obtains the first identity information and the second identity information, it can determine that the user of the second device is qualified to handle the transaction on behalf of the user, and then the third device can handle the specific transaction according to the decrypted data.

[0193] In an embodiment of the present application, the first device can store the delegated task and service data in the blockchain system, and then the blockchain system can send the delegated task to the second device. After the second device accepts the delegated task, the blockchain system can send the encrypted data corresponding to the service data to the second device, and set the corresponding service agency's access to the service data. Afterwards, after the third device of the service agency obtains the encrypted data from the second device, it can obtain the corresponding decrypted data from the blockchain system based on the encrypted data to handle specific transactions. In this way, an anonymous delegated service platform is constructed using the blockchain system. During the delegation process, the second device can only know the destination of the task, but does not know who the principal is, and cannot get the corresponding service data. Similarly, the first device does not know who the agent is. The two parties are anonymized and the data is not shared, so that the personal privacy of the principal and the agent can be effectively protected.

[0194] Figure 5 is a flowchart of a task delegation method provided in an embodiment of the present application. The method is applied to a blockchain system, which can be the above Figure 1-Figure 2 The blockchain system 100 described in the embodiment. Figure 5 , the method may include the following steps:

[0195] Step 501: storing the delegated task and service data in the first device, wherein the delegated task includes an identification of the service agency.

[0196] The relevant contents of step 501 have been described in detail in the above step 401, and will not be repeated in this embodiment of the present application.

[0197] Step 502: Send the delegated task to the second device.

[0198] The relevant contents of step 502 have been described in detail in the above step 402, and will not be repeated in this embodiment of the present application.

[0199] Step 503: After receiving the task acceptance message sent by the second device, the service data is encrypted using the first public key to obtain encrypted data; and the service agency identifier is set to have the right to use the service data.

[0200] The relevant contents of step 503 have been described in detail in the above step 405, and will not be repeated in this embodiment of the present application.

[0201] Step 504: Send task delegation information to the second device, where the task delegation information includes the encrypted data.

[0202] The relevant contents of step 504 have been described in detail in the above step 406, and will not be repeated in this embodiment of the present application.

[0203] Step 505: receiving a data viewing request sent by a third device, where the data viewing request carries the task delegation information and the office identifier.

[0204] The task delegation information is acquired by the third device from the second device.

[0205] The relevant contents of step 505 have been described in detail in the above steps 407 and 408, and will not be repeated in this embodiment of the present application.

[0206] Step 506: If it is determined that the service agency identifier carried in the data viewing request has the authority to use the service data, the encrypted data carried in the data viewing request is decrypted using the first private key to obtain decrypted data.

[0207] The relevant contents of step 506 have been described in detail in the above step 409, and will not be repeated in this embodiment of the present application.

[0208] Step 507: Send the decrypted data to a third device.

[0209] The relevant contents of step 507 have been described in detail in the above step 410, and will not be repeated in this embodiment of the present application.

[0210] In an embodiment of the present application, the first device can store the delegated task and service data in the blockchain system, and then the blockchain system can send the delegated task to the second device. After the second device accepts the delegated task, the blockchain system can send the encrypted data corresponding to the service data to the second device, and set the corresponding service agency's access to the service data. Afterwards, after the third device of the service agency obtains the encrypted data from the second device, it can obtain the corresponding decrypted data from the blockchain system based on the encrypted data to handle specific transactions. In this way, an anonymous delegated service platform is constructed using the blockchain system. During the delegation process, the second device can only know the destination of the task, but does not know who the principal is, and cannot get the corresponding service data. Similarly, the first device does not know who the agent is. The two parties are anonymized and the data is not shared, so that the personal privacy of the principal and the agent can be effectively protected.

[0211] Figure 6 is a schematic diagram of a task delegation device provided in an embodiment of the present application. The device can be applied to a blockchain system. The blockchain system can be Figure 1-Figure 2 Blockchain system 100 of the embodiment. Figure 6 The device includes: a storage module 601, a sending module 602, an encryption module 603, a receiving module 604, and a decryption module 605.

[0212] The storage module 601 is used to store the delegated tasks and service data in the first device, where the delegated tasks include the service agency identifier;

[0213] A sending module 602, configured to send the delegated task to the second device;

[0214] The encryption module 603 is used to encrypt the service data using the first public key to obtain encrypted data after receiving the task acceptance message sent by the second device, wherein the first public key and the first private key are the public-private key pair corresponding to the first device; and set the service agency identifier to have the right to use the service data;

[0215] A sending module 602, configured to send task delegation information to a second device, wherein the task delegation information includes encrypted data;

[0216] The receiving module 604 is used to receive a data viewing request sent by a third device, the data viewing request carries task delegation information and an agency identifier, and the task delegation information is obtained by the third device from the second device;

[0217] The decryption module 605 is used to decrypt the encrypted data carried in the data viewing request using the first private key to obtain decrypted data if it is determined that the service agency identifier carried in the data viewing request has the authority to use the service data;

[0218] The sending module 602 is used to send the decrypted data to a third device.

[0219] Optionally, the delegated task also includes the nature of the task.

[0220] Optionally, the encryption module 603 is used to:

[0221] Using the user identifier corresponding to the first device as the encryption party identifier, using the user identifier corresponding to the second device as the agent identifier, using the agency identifier as the authority identifier, and storing the encrypted data identifier of the encrypted data in correspondence with the encryption party identifier, the agent identifier, and the authority identifier;

[0222] The device also includes a determination module, which is used to:

[0223] After receiving a data viewing request, the authorized party identifier stored corresponding to the encrypted data identifier of the encrypted data carried in the data viewing request is obtained; if the obtained authorized party identifier includes the service agency identifier carried in the data viewing request, it is determined that the service agency identifier carried in the data viewing request has the authority to use the service data.

[0224] Optionally, the encryption module 603 is further used for:

[0225] After receiving the task acceptance message sent by the second device, the first identity information and the second identity information are encrypted using the first public key and the second public key to obtain the delegation credential, the first identity information is the user identity information corresponding to the first device, the second identity information is the user identity information corresponding to the second device, the second public key and the second private key are the public-private key pair corresponding to the second device.

[0226] Optionally, the task delegation information also includes delegation credentials;

[0227] The decryption module 605 is further configured to, upon receiving the data viewing request, decrypt the delegation credential carried in the data viewing request using the first private key and the second private key to obtain the first identity information and the second identity information if it is determined that the service agency identifier carried in the data viewing request has the right to use the service data;

[0228] The sending module 602 is further configured to send the obtained first identity information and second identity information to a third device.

[0229] Optionally, the device further comprises a distribution module;

[0230] The receiving module 604 is further configured to receive a first identity registration request sent by the first device, where the first identity registration request carries the first identity information;

[0231] The allocation module is used to perform identity registration according to the first identity information, and when the identity registration is successful, allocate a first public key, a first private key and a corresponding user identifier to the first device.

[0232] Optionally, the device further comprises a distribution module;

[0233] The receiving module 604 is further configured to receive a second identity registration request sent by the second device, where the second identity registration request carries the second identity information;

[0234] The allocation module is used to perform identity registration according to the second identity information, and when the identity registration is successful, allocate a second public key, a second private key and a corresponding user identifier to the second device.

[0235] In an embodiment of the present application, the first device can store the delegated task and service data in the blockchain system, and then the blockchain system can send the delegated task to the second device. After the second device accepts the delegated task, the blockchain system can send the encrypted data corresponding to the service data to the second device, and set the corresponding service agency's access to the service data. Afterwards, after the third device of the service agency obtains the encrypted data from the second device, it can obtain the corresponding decrypted data from the blockchain system based on the encrypted data to handle specific transactions. In this way, an anonymous delegated service platform is constructed using the blockchain system. During the delegation process, the second device can only know the destination of the task, but does not know who the principal is, and cannot get the corresponding service data. Similarly, the first device does not know who the agent is. The two parties are anonymized and the data is not shared, so that the personal privacy of the principal and the agent can be effectively protected.

[0236] It should be noted that the task delegation device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example when delegating tasks. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0237] The functional units and modules in the above embodiments may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit, and the above integrated units may be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present application.

[0238] The task delegation device and the task delegation method embodiments provided in the above embodiments belong to the same concept. The specific working process of the units and modules in the above embodiments and the technical effects brought about can be found in the method embodiment part and will not be repeated here.

[0239] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 7 As shown, the computer device 7 includes: a processor 70, a memory 71, and a computer program 72 stored in the memory 71 and executable on the processor 70. When the processor 70 executes the computer program 72, the above Figure 5 Steps in the task delegation method in an embodiment.

[0240] The computer device 7 may be a general-purpose computer device or a special-purpose computer device. In a specific implementation, the computer device 7 may be a server cluster composed of multiple servers. Those skilled in the art will appreciate that Figure 7 It is only an example of the computer device 7 and does not constitute a limitation on the computer device 7. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, such as input and output devices, network access devices, etc.

[0241] The processor 70 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0242] In some embodiments, the memory 71 may be an internal storage unit of the computer device 7, such as a hard disk or memory of the computer device 7. In other embodiments, the memory 71 may also be an external storage device of the computer device 7, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 7. Further, the memory 71 may also include both an internal storage unit and an external storage device of the computer device 7. The memory 71 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as program codes of computer programs. The memory 71 may also be used to temporarily store data that has been output or is to be output.

[0243] An embodiment of the present application also provides a computer device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, and when the processor executes the computer program, the steps in any of the above-mentioned method embodiments are implemented.

[0244] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0245] An embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the steps in the above-mentioned method embodiments.

[0246] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above method embodiments, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of each of the above method embodiments can be implemented. Among them, the computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, ROM (Read-Only Memory), RAM (Random Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk and optical data storage device. The computer-readable storage medium mentioned in the present application can be a non-volatile storage medium, in other words, it can be a non-transient storage medium.

[0247] It should be understood that all or part of the steps to implement the above embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The computer instructions can be stored in the above-mentioned computer readable storage medium.

[0248] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0249] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0250] In the embodiments provided in the present application, it should be understood that the disclosed devices / computer equipment and methods can be implemented in other ways. For example, the device / computer equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0251] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0252] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A task delegation method, characterized in that: The method comprises: The first device stores the delegated task and the service data in the blockchain system, wherein the delegated task includes an identification of the service agency; The blockchain system sends the delegated task to the second device; after receiving the task acceptance message sent by the second device, encrypts the service data using the first public key to obtain encrypted data, wherein the first public key and the first private key are the public-private key pair corresponding to the first device; sets the service agency identifier to have the right to use the service data; sends the task delegation information to the second device, wherein the task delegation information includes the encrypted data; The third device obtains the task delegation information from the second device; sends a data viewing request to the blockchain system, where the data viewing request carries the task delegation information and the office identifier; After the blockchain system receives the data viewing request, if it is determined that the service agency identifier carried in the data viewing request has the authority to use the service data, the first private key is used to decrypt the encrypted data carried in the data viewing request to obtain decrypted data; and the decrypted data is sent to the third device.

2. The method according to claim 1, characterized in that The delegated task also includes the nature of the task.

3. The method according to claim 1, characterized in that The blockchain system sets the service agency identifier to have the right to use the service data, including: The blockchain system uses the user identifier corresponding to the first device as the encryption party identifier, the user identifier corresponding to the second device as the agent identifier, the agency identifier as the authority identifier, and stores the encrypted data identifier of the encrypted data in correspondence with the encryption party identifier, the agent identifier, and the authority identifier; The method further comprises: After receiving the data viewing request, the blockchain system obtains the authorized party identifier stored corresponding to the encrypted data identifier of the encrypted data carried by the data viewing request; if the obtained authorized party identifier includes the service agency identifier carried by the data viewing request, it is determined that the service agency identifier carried by the data viewing request has the authority to use the service data.

4. The method according to claim 1, characterized in that The method further comprises: After the blockchain system receives the task acceptance message sent by the second device, it uses the first public key and the second public key to encrypt the first identity information and the second identity information to obtain the delegation credential, where the first identity information is the user identity information corresponding to the first device, the second identity information is the user identity information corresponding to the second device, and the second public key and the second private key are the public-private key pair corresponding to the second device.

5. The method according to claim 4, characterized in that The task delegation information also includes the delegation credential, and the method further includes: After the blockchain system receives the data viewing request, if it is determined that the service agency identifier carried in the data viewing request has the authority to use the service data, the first private key and the second private key are used to decrypt the delegation credentials carried in the data viewing request to obtain the first identity information and the second identity information; and the obtained first identity information and the second identity information are sent to the third device.

6. The method according to any one of claims 1 to 5, characterized in that: Before the first device stores the delegated tasks and service data in the blockchain system, it also includes: The first device sends a first identity registration request to the blockchain system, where the first identity registration request carries first identity information; After receiving the first identity registration request, the blockchain system performs identity registration according to the first identity information. When the identity registration is successful, the first public key, the first private key and the corresponding user identifier are allocated to the first device.

7. The method according to any one of claims 1 to 5, characterized in that: Before the first device stores the delegated tasks and service data in the blockchain system, it also includes: The second device sends a second identity registration request to the blockchain system, where the second identity registration request carries second identity information; After receiving the second identity registration request, the blockchain system performs identity registration according to the second identity information. When the identity registration is successful, a second public key, a second private key and a corresponding user identifier are allocated to the second device.

8. A task delegation system, characterized in that: The system includes: a first device, a second device, a third device and a blockchain system; The first device is used to store the delegated task and service data in the blockchain system, wherein the delegated task includes an identification of the service agency; The blockchain system is used to send the delegated task to the second device; after receiving the task acceptance message sent by the second device, encrypt the service data using the first public key to obtain encrypted data, wherein the first public key and the first private key are the public-private key pair corresponding to the first device; set the service agency identifier to have the right to use the service data; send the task delegation information to the second device, wherein the task delegation information includes the encrypted data; The third device is used to obtain the task delegation information from the second device; send a data viewing request to the blockchain system, wherein the data viewing request carries the task delegation information and the office identifier; The blockchain system is used to, after receiving the data viewing request, use the first private key to decrypt the encrypted data carried by the data viewing request to obtain decrypted data if it is determined that the service agency identifier carried by the data viewing request has the right to use the service data; and send the decrypted data to the third device.

9. A task delegation method, characterized in that: A blockchain system applied to a task delegation system, the task delegation system comprising a first device, a second device, a third device and the blockchain system, the method comprising: Storing the delegated tasks and service data in the first device, wherein the delegated tasks include an identification of the service agency; sending the delegated task to the second device; After receiving the task acceptance message sent by the second device, encrypt the service data using the first public key to obtain encrypted data, wherein the first public key and the first private key are a public-private key pair corresponding to the first device; and set the service agency identifier to have the right to use the service data; sending task delegation information to the second device, the task delegation information including the encrypted data; receiving a data viewing request sent by the third device, wherein the data viewing request carries the task delegation information and the office identifier, and the task delegation information is obtained by the third device from the second device; If it is determined that the service agency identifier carried in the data viewing request has the authority to use the service data, decrypting the encrypted data carried in the data viewing request using the first private key to obtain decrypted data; The decrypted data is sent to the third device.

10. A task delegation device, characterized in that: A blockchain system applied to a task delegation system, the task delegation system comprising a first device, a second device, a third device and the blockchain system, the device comprising: A storage module, used for storing the delegated tasks and service data in the first device, wherein the delegated tasks include an identification of a service agency; A sending module, used for sending the delegated task to the second device; an encryption module, configured to, after receiving a task acceptance message sent by the second device, encrypt the service data using a first public key to obtain encrypted data, wherein the first public key and the first private key are a public-private key pair corresponding to the first device; and set the service agency identifier to have the right to use the service data; The sending module is used to send task delegation information to the second device, wherein the task delegation information includes the encrypted data; A receiving module, configured to receive a data viewing request sent by the third device, wherein the data viewing request carries the task delegation information and the agency identifier, and the task delegation information is obtained by the third device from the second device; a decryption module, configured to decrypt the encrypted data carried in the data viewing request using the first private key to obtain decrypted data if it is determined that the service agency identifier carried in the data viewing request has the right to use the service data; The sending module is used to send the decrypted data to the third device.

11. A computer device, characterized in that: The computer device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the method according to claim 9 when executed by the processor.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to claim 9 is implemented.