User data management method and related device
The technology of this application relates to a user data management method and a related device, to improve user information security. The method in embodiments of this application includes a data request device sends a first request to a blockchain platform, where the first request indicates that the data request device needs to access a data storage device. The data request device receives first permission information sent by the blockchain platform, where the first permission information indicates whether the data request device has permission to access the data storage device. If the first permission information indicates that the data request device has the permission to access the data storage device, the data request device sends a second request to the data storage device, where the second request includes an access address.
1 . A user data management method, comprising:
sending, by a data request device, a first request to a blockchain platform, wherein
the first request indicates that the data request device needs to access a data storage device, and
the first request includes signature information of the data request device and an access type;
receiving, by the data request device, first permission information sent by the blockchain platform, wherein
the first permission information indicates whether the data request device has permission to access the data storage device, and
the permission is related to the signature information of the data request device and the access type;
based on the first permission information indicating that the data request device has the permission to access the data storage device, sending, by the data request device, a second request to the data storage device, wherein the second request includes an access address; and
receiving, by the data request device, confirmation information sent by the data storage device, wherein
the confirmation information indicates that the data storage device has executed a task corresponding to the second request,
information associated with the indication that the data storage device has executed the task corresponding to the second request is broadcast to a plurality of nodes of the blockchain platform, and
the task corresponding to the second request and executed by the data storage device is recorded in a distributed ledger.
2 . The method according to claim 1 , wherein
the access type includes data writing and data reading; and
based on the access type including the data writing, the first request further includes the access address; or
based on the access type including the data reading, the first permission information includes the access address.
3 . The method according to claim 1 , wherein before sending, by the data request device, the first request to the blockchain platform, the method further comprises:
receiving, by the data request device, a third request sent by user equipment, wherein the third request indicates the data request device to send the first request to the blockchain platform.
4 . The method according to claim 3 , wherein the signature information of the data request device includes signature information of the user equipment.
5 . The method according to claim 1 , wherein the task is performed by the data storage device in association with the access address provided with the second request.
6 . The method according to claim 1 , wherein the access address is a data pointer.
7 . The method according to claim 1 , wherein the user data management method is implemented in a fifth generation (5G) communication system.
8 . The method according to claim 1 , wherein the task corresponding to the second request and executed by the data storage device is recorded in the distributed ledger after the plurality of the nodes reach a consensus.
9 . A user data management method, comprising:
receiving, by a data storage device, a second request of a data request device, wherein the second request includes an access address;
sending, by the data storage device, an access verification request to a blockchain platform, wherein the access verification request indicates that the data request device sends the second request to the data storage device;
receiving, by the data storage device, second permission information sent by the blockchain platform, wherein the second permission information indicates whether the data storage device is configured for executing a task corresponding to the second request; and
based on the second permission information indicating that the data storage device is configured for executing the task corresponding to the second request, executing, by the data storage device, the corresponding task based on the second request; and
sending, by the data storage device, response information to the blockchain platform, wherein
the response information indicates that the data storage device has executed the task corresponding to the second request,
information associated with the response information is broadcast to a plurality of nodes of the blockchain platform, and
the task corresponding to the second request and executed by the data storage device is recorded in a distributed ledger.
10 . The method according to claim 9 , wherein after executing, by the data storage device, the corresponding task based on the second request, the method further comprises:
sending, by the data storage device, confirmation information to the data request device, wherein the confirmation information indicates that the data storage device has executed the task corresponding to the second request.
11 . The method according to claim 9 , wherein the task corresponding to the second request and executed by the data storage device is recorded in the distributed ledger after the plurality of the nodes reach a consensus.
12 . The method according to claim 9 , wherein the task is performed by the data storage device in association with the access address provided with the second request.
13 . A user data management method, comprising:
receiving, by a blockchain platform, a first request sent by a data request device, wherein
the first request indicates that the data request device needs to access a data storage device, and
the first request includes signature information of the data request device and an access type;
determining, by the blockchain platform based on the signature information of the data request device and the access type, whether the data request device is configured for accessing the data storage device;
sending, by the blockchain platform, first permission information to the data request device, wherein the first permission information indicates whether the data request device is configured for accessing the data storage device;
receiving, by the blockchain platform, an access verification request sent by the data storage device, wherein the access verification request indicates that the data request device sends a second request to the data storage device;
based on the blockchain platform determining that the data request device is configured for accessing the data storage device, sending, by the blockchain platform, second permission information to the data storage device, wherein the second permission information indicates that the data storage device is configured for executing a task corresponding to the second request;
receiving, by the blockchain platform, response information sent by the data storage device, wherein the response information indicates that the data storage device has executed the task corresponding to the second request;
after receiving the response information sent by the data storage device, broadcasting information associated with the response information to a plurality of nodes of the blockchain platform; and
recording the task corresponding to the second request and executed by the data storage device in the distributed ledger.
14 . The method according to claim 13 , wherein based on the access type including data reading, the first permission information includes an access address.
15 . The method according to claim 13 , further wherein
the task corresponding to the second request and executed by the data storage device is recorded in the distributed ledger after the plurality of the nodes reach a consensus.
16 . The method according to claim 13 , wherein the task is performed by the data storage device in association with the access address provided with the second request.
17 . A data request device, comprising:
a processor; and
a memory configured to store computer readable instructions that, when executed by the processor, cause the data request device to:
send a first request to a blockchain platform, wherein
the first request indicates that the data request device needs to access a data storage device, and
the first request includes signature information of the data request device and an access type;
receive first permission information sent by the blockchain platform, wherein
the first permission information indicates whether the data request device has permission to access the data storage device, and
the permission is related to the signature information of the data request device and the access type;
based on the first permission information indicating that the data request device has the permission to access the data storage device, send a second request to the data storage device, wherein the second request includes an access address; and
receive confirmation information sent by the data storage device, wherein
the confirmation information indicates that the data storage device has executed a task corresponding to the second request,
information associated with the indication that the data storage device has executed the task corresponding to the second request is broadcast to a plurality of nodes of the blockchain platform, and
the task corresponding to the second request and executed by the data storage device is recorded in a distributed ledger.
18 . The data request device according to claim 17 , wherein
the access type includes data writing and data reading; and
based on the access type including the data writing, the first request further includes the access address; or
based on the access type including the data reading, the first permission information includes the access address.
19 . The data request device according to claim 17 , wherein the data request device is further caused to:
receive a third request sent by user equipment, wherein the third request indicates the data request device to send the first request to the blockchain platform.
20 . The data request device according to claim 17 , wherein the task corresponding to the second request and executed by the data storage device is recorded in the distributed ledger after the plurality of the nodes reach a consensus.