Recordation of device usage to blockchains
A personal blockchain is generated as a cloud-based software service in a blockchain environment. The personal blockchain immutably archives usage of any device, perhaps as requested by a user. However, some of the usage may be authorized for public disclosure, while other usage may be designated as private and restricted from public disclosure. The public disclosure may permit public ledgering by still other blockchains, thus providing two-way public/private ledgering for improved record keeping. Private usage, though, may only be documented by the personal blockchain.
1. A method of a cloud-based blockchain service for blockchain recordations of device usage information in personal and in public blockchains, the method comprising:
receiving, by a server, a first service request from a device for the cloud-based blockchain service, wherein the first service request comprises a first usage information, a privacy parameter and a device identifier;
receiving, by the server, a second service request from the device for the cloud- based blockchain service, wherein the second service request comprises a second usage information and the device identifier;
determining, by the server, a chain identifier corresponding to the device identifier;
determining, by the server, whether the first service request comprises the privacy parameter;
determining, by the server, whether the second service request comprises the privacy parameter;
generating, by the server, a first hash value of the first usage information by hashing the first usage information using a hashing algorithm;
generating, by the server, a first data record associated with the device identifier, wherein the first data record comprises comprising the first hash value, and a first indication that the first usage information is private;
generating, by the server, a second hash value of the second usage information by hashing the second usage information using the hashing algorithm;
generating, by the server, a second data record associated with the device identifier, wherein the second data record comprises the second hash value, and a second indication that the second usage information is public;
recording, by the server, the first data record and the second data record to a personal blockchain associated with the device identifier;
based on determining that the second service request does not comprise the privacy parameter, generating, by the server, a third data record, wherein the third data record comprises the second usage information;
adding, by the server, the third data record to a block associated with the device identifier;
recording, by the server, the block to a public blockchain, wherein recording the block further comprises adding the block to a chain of blocks associated with the chain identifier;
in response to the first service request, sending, by the server, a first service response to the device, wherein the first service response comprises information of the recording of the first hash value of the first usage information in the personal blockchain; and
in response to the second service request, sending, by the server, a second service response to the device, wherein the second service response comprises information of the recording of the second hash value of the second usage information in the personal blockchain and the recording of the second usage information in the public blockchain.
2. The method of claim 1 , wherein the first usage information further comprises a time and a geographic location reported by the device.
3. The method of claim 1 , wherein the first usage information further comprises a message reported by the device.
4. The method of claim 1 , wherein the first usage information further comprises a social posting reported by the device.
5. A system of a cloud-based blockchain service for blockchain recordations of device usage information in personal and in public blockchains, the system comprising:
a hardware processor; and
a memory storing instructions that, when executed by the hardware processor perform operations comprising:
receiving, from a device, a first service request for the cloud-based blockchain service, wherein the first service request comprises a first usage information, a privacy parameter and a device identifier;
receiving a second service request from the device for the cloud-based blockchain service, wherein the second service request comprises a second usage information and the device identifier;
determining a chain identifier corresponding to the device identifier;
determining whether the first service request comprises the privacy parameter;
determining whether the second service request comprises the privacy parameter;
generating a first hash value of the first usage information by hashing the first usage information using a hashing algorithm;
generating a first data record associated with the device identifier, wherein the first data record comprises the first hash value, and a first indication that the first usage information is private;
generating a second hash value of the second usage information by hashing the second usage information using the hashing algorithm;
generating a second data record associated with the device identifier, wherein the second data record comprises the second hash value, and a second indication that the second usage information is public;
recording the first data record and the second data record to a personal blockchain associated with the device identifier;
based on determining that the second service request does not comprise the privacy parameter, generating a third data record, wherein the third data record comprises the second usage information;
adding the third data record to a block associated with the device identifier;
recording the block to a public blockchain, wherein recording the block further comprises adding the block to a chain of blocks associated with the chain identifier;
in response to the first service request, sending a first service response to the device, wherein the first service response comprises information of the recording of the first hash value of the first usage information in the personal blockchain; and
in response to the second service request, sending a second service response to the device, wherein the second service response comprises information of the recording of the second hash value of the second usage information in the personal blockchain and the recording of the second usage information in the public blockchain.
6. The system of claim 5 , wherein the first usage information further comprises a time and a geographic location reported by the device.
7. The system of claim 5 , wherein the first usage information further comprises a message reported by the device.
8. The system of claim 5 , wherein the privacy parameter further comprises a file extension.