Data information processing method, device and equipment based on blockchain
By performing multi-layer encryption processing on blockchain data information, combined with symmetric and asymmetric encryption technologies, the problem of data leakage during blockchain data information access is solved, and data security is significantly improved.
Patent Information
- Application Number
- CN202211199405.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-29
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-09-29
AI Technical Summary
In the existing blockchain technology, there is a problem of data information leakage during data access, resulting in insufficient data security.
By performing multi-layer encryption processing on data information, using a combination of symmetric encryption and asymmetric encryption, we ensure that multi-layer passwords are needed when uploading and accessing data information, thereby improving the security of data information. The specific steps include symmetric encryption processing in the user-level account database, and asymmetric encryption processing using the public key generated by the blockchain, storing the ciphertext until the data access request is decrypted and obtained.
Multi-layer encryption of data information is realized, ensuring that multi-layer passwords are needed when accessing data information, significantly improving the security of data information and reducing the risk of leakage.
Smart Images

Figure CN115514479B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a blockchain-based data information processing method, device and equipment. Background Art
[0002] At present, the common way to access data information on the blockchain is to obtain a symmetric encryption password or an asymmetric encryption password. However, this method still leads to the problem of data leakage during the data access process.
[0003] Therefore, there is an urgent need for a data information processing method based on blockchain, which can perform multi-layer encryption on data information, thereby requiring multi-layer passwords to access data information, and ultimately achieve the purpose of improving data information security. Summary of the invention
[0004] The present application provides a data information processing method, device and equipment based on blockchain, which can perform multi-layer encryption on data information, thereby requiring multi-layer passwords to be obtained when accessing data information, ultimately achieving the purpose of improving the security of data information.
[0005] In a first aspect, the present application provides a data information processing method based on blockchain, comprising:
[0006] Receiving data information to be uploaded, and symmetrically encrypting the data information to be uploaded in a database of a user-level account to obtain a symmetric key and the symmetrically encrypted data information, and uploading the symmetrically encrypted data information to a blockchain; wherein the data information to be uploaded is sent by a first user terminal;
[0007] Asymmetric encryption is performed on the symmetric secret key according to the first public key to obtain a first ciphertext, and the first ciphertext is stored in a database of the root account; wherein the first public key is issued from the blockchain;
[0008] receiving a data access request, and obtaining the first ciphertext from a database of the root account;
[0009] According to the first ciphertext, the data information after the symmetrical encryption is obtained from the blockchain and sent to the second user terminal.
[0010] In one example, receiving a data access request and obtaining the first ciphertext from a database of the root account includes:
[0011] receiving the data access request, and determining whether the data access request has data permission to access the database of the root account;
[0012] If so, the first ciphertext is obtained from the database of the root account.
[0013] In one example, if yes, obtaining the first ciphertext from the database of the root account includes:
[0014] If yes, obtaining the database password of the root account;
[0015] According to the password, a first private key and the first ciphertext are obtained from a database of the root account; wherein the first private key and the first public key are generated and issued by the blockchain at the same time.
[0016] In one example, obtaining the symmetrically encrypted data information from the blockchain according to the first ciphertext and sending it to the second user terminal includes:
[0017] Decrypting the first ciphertext according to the first private key to obtain the symmetric key;
[0018] According to the symmetric key, the data information after the symmetric encryption is obtained from the blockchain and sent to the second user terminal.
[0019] In one example, obtaining the symmetrically encrypted data information from the blockchain according to the symmetric key and sending it to the second user terminal includes:
[0020] According to the symmetric key, obtaining the symmetric encrypted data information matching the symmetric key;
[0021] Decrypting the symmetrically encrypted data using the symmetrical key to obtain decrypted data;
[0022] The decrypted data information is sent to the second user terminal.
[0023] In one example, after performing asymmetric encryption processing on the symmetric secret key according to the first public key to obtain a first ciphertext, and storing the first ciphertext in a database of the root account, the method further includes:
[0024] receiving a request for adding a database of an administrator account, and acquiring the symmetric key from the database of the root account according to the request for adding a database of the administrator account;
[0025] The symmetric key is encrypted according to the second public key to obtain a second ciphertext, and the second ciphertext is stored in the database of the administrator account; wherein the second public key is issued from the blockchain.
[0026] In one example, obtaining the symmetric key from the database of the root account according to the request for adding the database of the administrator account includes:
[0027] Obtaining the password of the database of the root account according to the request for adding the database of the administrator account;
[0028] According to the password, obtaining a first private key and the first ciphertext from a database of the root account;
[0029] The first ciphertext is decrypted according to the first private key to obtain the symmetric key.
[0030] In one example, the method further includes:
[0031] receiving the data access request, and determining whether the data access request has data permission to access the database of the administrator account;
[0032] If so, the second ciphertext is obtained from the database of the administrator account.
[0033] In one example, the method further includes:
[0034] receiving a change request for changing a database of the administrator account, and obtaining the symmetric key from the database of the administrator account according to the change request;
[0035] The symmetric key is encrypted according to a third public key to obtain a third ciphertext, and the third ciphertext is stored in a database of the changed administrator account; wherein the third public key is issued from the blockchain.
[0036] In a second aspect, the present application provides a data information processing device based on blockchain, the device comprising:
[0037] A first encryption processing unit is used to receive data information to be uploaded, and symmetric encryption processing is performed on the data information to be uploaded in the database of the user-level account to obtain a symmetric key and the symmetric encrypted data information, and upload the symmetric encrypted data information to the blockchain; wherein the data information to be uploaded is sent by the first user terminal;
[0038] a second encryption processing unit, configured to perform asymmetric encryption processing on the symmetric secret key according to the first public key to obtain a first ciphertext, and store the first ciphertext in a database of a root account; wherein the first public key is issued from a blockchain;
[0039] A first acquisition unit, configured to receive a data access request and acquire the first ciphertext from a database of the root account;
[0040] The second acquisition unit is used to obtain the data information after the symmetrical encryption processing from the blockchain according to the first ciphertext, and send it to the second user terminal.
[0041] In one example, the first acquisition unit includes:
[0042] A receiving module, configured to receive the data access request and determine whether the data access request has data permission to access the database of the root account;
[0043] The first acquisition module is used to obtain the first ciphertext from the database of the root account if yes.
[0044] In one example, the first acquisition module includes:
[0045] A first acquisition submodule, configured to obtain the password of the database of the root account if yes;
[0046] The second acquisition submodule is used to obtain a first private key and the first ciphertext from the database of the root account according to the password; wherein the first private key and the first public key are generated and issued by the blockchain at the same time.
[0047] In one example, the second acquisition unit includes:
[0048] A first decryption module, configured to decrypt the first ciphertext according to the first private key to obtain the symmetric key;
[0049] The sending module is used to obtain the data information after the symmetrical encryption processing from the blockchain according to the symmetrical key, and send it to the second user terminal.
[0050] In one example, the sending module is used to:
[0051] According to the symmetric key, obtaining the symmetric encrypted data information matching the symmetric key;
[0052] Decrypting the symmetrically encrypted data using the symmetrical key to obtain decrypted data;
[0053] The decrypted data information is sent to the second user terminal.
[0054] In one example, the device further includes:
[0055] A third acquisition unit, configured to receive a request for adding a database of an administrator account, and acquire the symmetric key from the database of the root account according to the request for adding a database of the administrator account;
[0056] The third encryption processing unit is used to encrypt the symmetric key according to the second public key to obtain a second ciphertext, and store the second ciphertext in the database of the administrator account; wherein the second public key is issued from the blockchain.
[0057] In one example, the third acquisition unit includes:
[0058] A second acquisition module, configured to acquire the password of the database of the root account according to the request for adding the database of the administrator account;
[0059] A third acquisition module, configured to acquire a first private key and the first ciphertext from a database of the root account according to the password;
[0060] The second decryption module is used to decrypt the first ciphertext according to the first private key to obtain the symmetric key.
[0061] In one example, the apparatus further comprises:
[0062] A determination unit, configured to receive the data access request and determine whether the data access request has data permission to access the database of the administrator account;
[0063] The fourth obtaining unit is configured to obtain the second ciphertext from the database of the administrator account if yes.
[0064] In one example, the apparatus further comprises:
[0065] a fifth acquiring unit, configured to receive a change request for changing the database of the administrator account, and acquire the symmetric key from the database of the administrator account according to the change request;
[0066] The third encryption processing unit is used to encrypt the symmetric key according to the third public key to obtain a third ciphertext, and store the third ciphertext in the database of the changed administrator account; wherein the third public key is issued from the blockchain.
[0067] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0068] The memory stores computer-executable instructions;
[0069] The processor executes the computer-executable instructions stored in the memory to implement the method according to the first aspect.
[0070] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect.
[0071] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the method described in the first aspect when executed by a processor.
[0072] The present application provides a data information processing method, device and equipment based on blockchain, which receives data information to be uploaded, performs symmetric encryption processing on the data information to be uploaded in the database of the user-level account, obtains a symmetric key and the data information after symmetric encryption processing, and uploads the data information after symmetric encryption processing to the blockchain; wherein the data information to be uploaded is sent by the first user terminal; the symmetric key is asymmetrically encrypted according to the first public key to obtain a first ciphertext, and the first ciphertext is stored in the database of the root account; wherein the first public key is issued from the blockchain; a data access request is received, and the first ciphertext is obtained from the database of the root account; according to the first ciphertext, the data information after symmetric encryption processing is obtained from the blockchain, and sent to the second user terminal. By adopting this technical solution, it is possible to perform multi-layer encryption on the data information, so that it is necessary to obtain multi-layer passwords when accessing the data information, and finally achieve the purpose of improving the security of the data information. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0074] Figure 1 This is a flowchart of a data information processing method based on blockchain provided in accordance with Embodiment 1 of the present application;
[0075] Figure 2 This is a flowchart of a data information processing method based on blockchain provided in Example 2 of the present application;
[0076] Figure 3 is a schematic diagram of a data information processing interaction process provided according to Embodiment 2 of the present application;
[0077] Figure 4 This is a structural diagram of a data information processing device based on blockchain provided according to Embodiment 3 of the present application;
[0078] Figure 5 This is a structural diagram of a data information processing device based on blockchain provided according to Embodiment 4 of the present application;
[0079] Figure 6 The present invention is a block diagram of a terminal device according to an exemplary embodiment.
[0080] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0081] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0082] The blockchain-based data information processing method provided in this application is intended to solve the above technical problems of the prior art.
[0083] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0084] Figure 1 This is a flowchart of a data information processing method based on blockchain provided in Example 1 of the present application. Example 1 includes the following steps:
[0085] S101. Receive data information to be uploaded, and perform symmetric encryption processing on the data information to be uploaded in a database of a user-level account to obtain a symmetric key and the symmetric encrypted data information, and upload the symmetric encrypted data information to the blockchain; wherein the data information to be uploaded is sent by a first user terminal.
[0086] In one example, the data information to be uploaded refers to the data information to be uploaded to the blockchain, and the data information to be uploaded is sent from the first user terminal to the electronic device, and the database of the user-level account is a database that can be accessed by the second user terminal. In this embodiment, the symmetric encryption processing can use a symmetric encryption algorithm, wherein the symmetric encryption algorithm includes: DES algorithm, 3DES algorithm, TDEA algorithm, Blowfish algorithm, RC5 algorithm and IDEA algorithm.
[0087] In this embodiment, the data information after symmetrical encryption is uploaded to the blockchain and stored by the blockchain. Furthermore, it can also be stored in other storage systems, such as IPFS (InterPlanetary File System) or FTP system (File Transfer Protocol).
[0088] S102. Asymmetrically encrypt the symmetric key according to the first public key to obtain a first ciphertext, and store the first ciphertext in a database of the root account; wherein the first public key is issued from the blockchain.
[0089] In one example, a first public key and a first private key are generated according to an algorithm on the blockchain, and the symmetric key is asymmetrically encrypted to obtain a first ciphertext. The asymmetric encryption algorithm includes: RSA algorithm, Elgamal algorithm, backpack algorithm, Rabin algorithm, DH algorithm, and ECC algorithm.
[0090] In this embodiment, the first ciphertext refers to data information obtained after asymmetric encryption processing.
[0091] In this embodiment, the first ciphertext obtained after asymmetric encryption is stored in the database of the root account. The authority of the database of the root account is higher than that of the database of the user account. Furthermore, the database of the root account can further encrypt the symmetric key.
[0092] S103: Receive a data access request, and obtain a first ciphertext from a database of a root account.
[0093] In this embodiment, when the second user terminal sends a data access request, it needs to first obtain the first ciphertext from the database of the root account.
[0094] S104. According to the first ciphertext, obtain the data information after symmetrical encryption from the blockchain, and send it to the second user terminal.
[0095] In this embodiment, after the first ciphertext is obtained and processed, the data information corresponding to the first ciphertext is obtained from the blockchain, and the data information is sent to the second user terminal for the second user terminal to review.
[0096] The present application provides a data information processing method, device and equipment based on blockchain, which receives data information to be uploaded, performs symmetric encryption processing on the data information to be uploaded in the database of the user-level account, obtains a symmetric key and the data information after symmetric encryption processing, and uploads the data information after symmetric encryption processing to the blockchain; wherein the data information to be uploaded is sent by the first user terminal; the symmetric key is asymmetrically encrypted according to the first public key to obtain the first ciphertext, and the first ciphertext is stored in the database of the root account; wherein the first public key is issued from the blockchain; a data access request is received, and the first ciphertext is obtained from the database of the root account; according to the first ciphertext, the data information after symmetric encryption processing is obtained from the blockchain, and sent to the second user terminal. The technical solution can be used to perform multi-layer encryption on the data information, so that the data information needs to obtain multiple layers of passwords when accessing the data information, and finally achieve the purpose of improving the security of the data information.
[0097] Figure 2 This is a flowchart of a data information processing method based on blockchain provided in Example 2 of the present application. Example 2 includes the following steps:
[0098] S201. Receive data information to be uploaded, and symmetrically encrypt the data information to be uploaded in the database of the user-level account to obtain a symmetric key and the symmetric encrypted data information, and upload the symmetric encrypted data information to the blockchain; wherein the data information to be uploaded is sent by the first user terminal.
[0099] Exemplarily, this step may refer to the above-mentioned step S101 and will not be described in detail.
[0100] S202. Asymmetrically encrypt the symmetric key according to the first public key to obtain a first ciphertext, and store the first ciphertext in the database of the root account; wherein the first public key is issued from the blockchain.
[0101] Exemplarily, this step may refer to the above-mentioned step S102 and will not be described in detail.
[0102] S203: Receive a data access request, and determine whether the data access request has data permission to access the database of the root account.
[0103] In this embodiment, after receiving the data access request, it is determined whether the second user terminal sending the data access request has the data authority to access the database of the root account. If not, the data access request is prohibited.
[0104] S204: If yes, obtain the first ciphertext from the database of the root account.
[0105] In this embodiment, after receiving the data access request, if the second user terminal sending the data access request has data permission to access the database of the root account, then after obtaining the data access permission of the database of the root account, the first ciphertext is obtained from the database of the root account.
[0106] In one example, if yes, obtaining the first ciphertext from the database of the root account includes:
[0107] If yes, get the database password of the root account;
[0108] According to the password, a first private key and a first ciphertext are obtained from the database of the root account; wherein the first private key and the first public key are generated and issued by the blockchain at the same time.
[0109] In this embodiment, after determining that the second user terminal of the data access request has the data permission to access the database of the root account, the password of the database of the root account is obtained, and the first private key and the first ciphertext corresponding to the data information are determined in the database of the root account. The first private key and the first public key are generated by the blockchain at the same time, and the first private key and the first public key are related to each other.
[0110] S205. Decrypt the first ciphertext according to the first private key to obtain a symmetric key.
[0111] In this embodiment, after obtaining the first private key, the first ciphertext is decrypted using the first private key to obtain a symmetric key.
[0112] S206. According to the symmetric key, obtain the data information after symmetrical encryption from the blockchain and send it to the second user terminal.
[0113] In one example, according to the symmetric key, the symmetric encrypted data information matching the symmetric key is obtained;
[0114] Decrypting the symmetrically encrypted data using the symmetrical key to obtain decrypted data;
[0115] The decrypted data information is sent to the second user terminal.
[0116] In this embodiment, after obtaining the symmetric key, the data information associated with the symmetric key is determined from the blockchain, and the data information after symmetric encryption is decrypted in the blockchain using the symmetric key to obtain the decrypted data information, and the data information is sent to the second user terminal.
[0117] In one example, after asymmetric encryption is performed on the symmetric secret key according to the first public key to obtain a first ciphertext, and the first ciphertext is stored in a database of the root account, the method further includes:
[0118] Receive a request for adding a database of an administrator account, and obtain a symmetric key from a database of a root account according to the request for adding a database of an administrator account;
[0119] The symmetric secret key is encrypted according to the second public key to obtain a second ciphertext, and the second ciphertext is stored in the database of the administrator account; wherein the second public key is issued from the blockchain.
[0120] In this embodiment, the authority of the database of the administrator account is lower than that of the database of the root account, but the authority of the database of the administrator account is higher than that of the database of the user account. In the case that the database of the root account has limited data information, the data information can be asymmetrically encrypted by adding a database of an administrator account with lower authority than the database of the root account.
[0121] In this embodiment, the symmetric secret key is encrypted by the second public key to obtain the second ciphertext, wherein the second public key is in the database of the administrator account sent by the blockchain. After obtaining the second ciphertext, the second ciphertext is stored in the database of the administrator account.
[0122] In one example, obtaining a symmetric key from a database of a root account according to a request for adding a database of an administrator account includes:
[0123] Obtain the database password of the root account according to the request for adding the database of the administrator account;
[0124] According to the password, obtain the first private key and the first ciphertext from the database of the root account;
[0125] The first ciphertext is decrypted according to the first private key to obtain a symmetric key.
[0126] In this embodiment, after the database of the root account receives the request to add the database of the administrator account, the password of the database of the root account can be obtained, and the first private key and the first ciphertext stored in the database of the root account can be accessed according to the password.
[0127] In this embodiment, since the first ciphertext is encrypted by the first public key, the first ciphertext is decrypted by the first private key to obtain a symmetric key.
[0128] In one example, the method further includes:
[0129] Receive a data access request, and determine whether the data access request has data permission to access the database of the administrator account;
[0130] If yes, the second ciphertext is obtained from the database of the administrator account.
[0131] In this embodiment, after adding the database of the administrator account, it is also possible to determine whether the data access request has the authority to access the database of the administrator account. If it has the authority to access the database of the administrator account, the password of the database of the administrator account is obtained, and the second ciphertext in the database of the administrator account is obtained according to the password, and the second ciphertext is decrypted according to the second private key to obtain the symmetric key. After obtaining the symmetric key, the data information associated with the symmetric key is determined from the blockchain, and the data information after symmetric encryption is decrypted in the blockchain by the symmetric key to obtain the decrypted data information, and the data information is sent to the second user terminal.
[0132] In one example, the method further includes:
[0133] Receive a change request for changing the database of the administrator account, and obtain a symmetric key from the database of the administrator account according to the change request;
[0134] The symmetric secret key is encrypted according to the third public key to obtain a third ciphertext, and the third ciphertext is stored in the database of the changed administrator account; wherein the third public key is issued from the blockchain.
[0135] In this embodiment, the change request for changing the database of the administrator account refers to changing the database of the original administrator account to the database of the changed administrator account, then first obtain the password of the database of the original administrator account, then obtain the symmetric key of the data information according to the password, and encrypt the symmetric key according to the third public key of the database of the changed administrator account to obtain the third ciphertext, and store the third ciphertext in the database of the changed administrator account. Furthermore, a data access request can also be received to determine whether the data access request has the data permission to access the database of the changed administrator account; if so, obtain the third ciphertext from the database of the changed administrator account.
[0136] In this embodiment, for details, please refer to Figure 3 Schematic diagram of the data information processing interaction process shown in .
[0137] S301: Upload data information to be uploaded from a first user terminal.
[0138] S302: Perform symmetric encryption on the data information to be uploaded to obtain a symmetric key and the symmetric encrypted data information.
[0139] S303, upload the data information after symmetrical encryption to the blockchain.
[0140] S304: Perform asymmetric encryption on the symmetric key according to the first public key to obtain a first ciphertext.
[0141] S305: Receive a data access request sent by a second user terminal.
[0142] S306: Obtain a first ciphertext from a database of the root account.
[0143] S307. According to the first ciphertext, obtain the data information after symmetrical encryption from the blockchain
[0144] S308: Decrypt the symmetrically encrypted data information according to the symmetric key, and send the decrypted data information to the second user terminal.
[0145] The present application provides a blockchain-based data information processing method, device and equipment, which can manage symmetric keys through multiple accounts by adding a database of administrator accounts or changing the database of administrator accounts, thereby achieving the purpose of improving data information security.
[0146] Figure 4 1 is a schematic diagram of a data information processing device based on blockchain provided in accordance with Embodiment 3 of the present application. Specifically, the device 40 of Embodiment 3 includes:
[0147] The first encryption processing unit 401 is used to receive data information to be uploaded, and symmetric encryption processing is performed on the data information to be uploaded in the database of the user-level account to obtain a symmetric key and the data information after symmetric encryption processing, and upload the data information after symmetric encryption processing to the blockchain; wherein the data information to be uploaded is sent by the first user terminal.
[0148] The second encryption processing unit 402 is used to perform asymmetric encryption processing on the symmetric key according to the first public key to obtain a first ciphertext, and store the first ciphertext in the database of the root account; wherein the first public key is issued from the blockchain.
[0149] The first acquisition unit 403 is used to receive a data access request and acquire a first ciphertext from a database of a root account.
[0150] The second acquisition unit 404 is used to obtain the data information after symmetrical encryption from the blockchain according to the first ciphertext, and send it to the second user terminal.
[0151] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0152] Figure 5 1 is a schematic diagram of a data information processing device based on blockchain provided in accordance with the fourth embodiment of the present application. Specifically, the device 50 of the fourth embodiment includes:
[0153] The first encryption processing unit 501 is used to receive data information to be uploaded, and symmetric encryption processing is performed on the data information to be uploaded in the database of the user-level account to obtain a symmetric key and the data information after symmetric encryption processing, and upload the data information after symmetric encryption processing to the blockchain; wherein the data information to be uploaded is sent by the first user terminal.
[0154] The second encryption processing unit 502 is used to perform asymmetric encryption processing on the symmetric key according to the first public key to obtain a first ciphertext, and store the first ciphertext in the database of the root account; wherein the first public key is issued from the blockchain.
[0155] The first acquisition unit 503 is used to receive a data access request and acquire a first ciphertext from a database of a root account.
[0156] The second acquisition unit 504 is used to obtain the data information after symmetrical encryption from the blockchain according to the first ciphertext, and send it to the second user terminal.
[0157] In one example, the first acquisition unit 503 includes:
[0158] The receiving module 5031 is used to receive a data access request and determine whether the data access request has data permission to access the database of the root account.
[0159] The first acquisition module 5032 is configured to acquire the first ciphertext from the database of the root account if yes.
[0160] In one example, the first acquisition module 5032 includes:
[0161] The first acquisition submodule 50321 is used to obtain the password of the database of the root account.
[0162] The second acquisition submodule 50322 is used to obtain the first private key and the first ciphertext from the database of the root account according to the password; wherein the first private key and the first public key are generated and issued by the blockchain at the same time.
[0163] In one example, the second obtaining unit 504 includes:
[0164] The first decryption module 5041 is used to decrypt the first ciphertext according to the first private key to obtain a symmetric key.
[0165] The sending module 5042 is used to obtain the data information after symmetrical encryption from the blockchain according to the symmetrical key, and send it to the second user terminal.
[0166] In one example, the sending module 5042 is used to:
[0167] According to the symmetric key, obtaining the symmetric encrypted data information matching the symmetric key;
[0168] Decrypting the symmetrically encrypted data using the symmetrical key to obtain decrypted data;
[0169] The decrypted data information is sent to the second user terminal.
[0170] In one example, the apparatus further includes:
[0171] The third acquisition unit 505 is used to receive an additional request for adding a database of an administrator account, and acquire a symmetric key from the database of a root account according to the additional request for adding a database of an administrator account.
[0172] The third encryption processing unit 506 is used to encrypt the symmetric key according to the second public key to obtain a second ciphertext, and store the second ciphertext in the database of the administrator account; wherein the second public key is issued from the blockchain.
[0173] In one example, the third obtaining unit 505 includes:
[0174] The second acquisition module 5051 is used to acquire the password of the database of the root account according to the request for adding the database of the administrator account.
[0175] The third acquisition module 5052 is used to obtain the first private key and the first ciphertext from the database of the root account according to the password.
[0176] The second decryption module 5053 is used to decrypt the first ciphertext according to the first private key to obtain a symmetric key.
[0177] In one example, the apparatus further comprises:
[0178] The determination unit 507 is used to receive a data access request and determine whether the data access request has data authority to access the database of the administrator account.
[0179] The fourth obtaining unit 508 is configured to obtain the second ciphertext from the database of the administrator account if yes.
[0180] In one example, the apparatus further comprises:
[0181] The fifth obtaining unit 509 is configured to receive a change request for changing the database of the administrator account, and obtain the symmetric key from the database of the administrator account according to the change request.
[0182] The third encryption processing unit 510 is used to encrypt the symmetric key according to the third public key to obtain a third ciphertext, and store the third ciphertext in the database of the changed administrator account; wherein the third public key is issued from the blockchain.
[0183] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0184] Figure 6 It is a block diagram of a terminal device according to an exemplary embodiment. The device may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0185] The device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .
[0186] The processing component 602 generally controls the overall operation of the device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.
[0187] The memory 604 is configured to store various types of data to support operations on the device 600. Examples of such data include instructions for any application or method operating on the device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0188] The power supply component 606 provides power to the various components of the device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 600.
[0189] The multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0190] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the device 600 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.
[0191] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0192] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the device 600. For example, the sensor assembly 614 can detect the open / closed state of the device 600, the relative positioning of components, such as the display and keypad of the device 600, and the sensor assembly 614 can also detect the position change of the device 600 or a component of the device 600, the presence or absence of user contact with the device 600, the orientation or acceleration / deceleration of the device 600, and the temperature change of the device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0193] The communication component 616 is configured to facilitate wired or wireless communication between the device 600 and other devices. The device 600 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0194] In an exemplary embodiment, the apparatus 600 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0195] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of the device 600 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0196] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a terminal device, enables the terminal device to execute the blockchain-based data information processing method of the terminal device.
[0197] The present application also discloses a computer program product, including a computer program, which implements the method described in this embodiment when executed by a processor.
[0198] Various embodiments of the systems and techniques described above in the present application can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor, which can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0199] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or electronic device.
[0200] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0201] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0202] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data electronic device), or a computing system that includes middleware components (e.g., an application electronic device), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0203] The computer system may include a client and an electronic device. The client and the electronic device are generally far away from each other and usually interact through a communication network. The relationship between the client and the electronic device is generated by computer programs running on corresponding computers and having a client-electronic device relationship with each other. The electronic device may be a cloud electronic device, also known as a cloud computing electronic device or a cloud host, which is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The electronic device may also be an electronic device of a distributed system, or an electronic device combined with a blockchain. It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solution disclosed in this application can be achieved, and this document is not limited here.
[0204] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0205] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A data information processing method based on blockchain, characterized in that: The method comprises: Receiving data information to be uploaded, and symmetrically encrypting the data information to be uploaded in a database of a user-level account to obtain a symmetric key and the symmetrically encrypted data information, and uploading the symmetrically encrypted data information to a blockchain; wherein the data information to be uploaded is sent by a first user terminal; Asymmetric encryption is performed on the symmetric key according to the first public key to obtain a first ciphertext, and the first ciphertext is stored in a database of a root account; wherein the first public key is issued from a blockchain; the database of the root account has higher authority than the database of the user account, and the database of the root account can further encrypt the symmetric key; receiving a data access request, and determining whether the data access request has data permission to access the database of the root account; If yes, obtaining the database password of the root account; According to the password, obtain a first private key and the first ciphertext from a database of the root account; wherein the first private key and the first public key are generated and issued by the blockchain at the same time; Decrypting the first ciphertext according to the first private key to obtain the symmetric key; According to the symmetric key, obtaining the symmetric encrypted data information matching the symmetric key; Decrypting the symmetrically encrypted data using the symmetrical key to obtain decrypted data; The decrypted data information is sent to the second user terminal.
2. The method according to claim 1, characterized in that After performing asymmetric encryption processing on the symmetric secret key according to the first public key to obtain a first ciphertext, and storing the first ciphertext in a database of the root account, the method further includes: receiving a request for adding a database of an administrator account, and acquiring the symmetric key from the database of the root account according to the request for adding a database of the administrator account; The symmetric key is encrypted according to the second public key to obtain a second ciphertext, and the second ciphertext is stored in the database of the administrator account; wherein the second public key is issued from the blockchain.
3. The method according to claim 2, characterized in that The acquiring the symmetric key from the database of the root account according to the request for adding the database of the administrator account includes: Obtaining the password of the database of the root account according to the request for adding the database of the administrator account; According to the password, obtaining a first private key and the first ciphertext from a database of the root account; The first ciphertext is decrypted according to the first private key to obtain the symmetric key.
4. The method according to claim 2 or 3, characterized in that: The method further comprises: receiving the data access request, and determining whether the data access request has data permission to access the database of the administrator account; If so, the second ciphertext is obtained from the database of the administrator account.
5. The method according to claim 2 or 3, characterized in that: The method further comprises: receiving a change request for changing a database of the administrator account, and obtaining the symmetric key from the database of the administrator account according to the change request; The symmetric key is encrypted according to a third public key to obtain a third ciphertext, and the third ciphertext is stored in a database of the changed administrator account; wherein the third public key is issued from the blockchain.
6. A data information processing device based on blockchain, characterized in that: The device comprises: A first encryption processing unit is used to receive data information to be uploaded, and symmetric encryption processing is performed on the data information to be uploaded in the database of the user-level account to obtain a symmetric key and the symmetric encrypted data information, and upload the symmetric encrypted data information to the blockchain; wherein the data information to be uploaded is sent by the first user terminal; a second encryption processing unit, configured to perform asymmetric encryption processing on the symmetric key according to the first public key to obtain a first ciphertext, and store the first ciphertext in a database of a root account; wherein the first public key is issued from a blockchain; the authority of the database of the root account is higher than that of the database of the user account, and the database of the root account can further perform encryption processing on the symmetric key; The first acquisition unit includes: a receiving module, which is used to receive a data access request and determine whether the data access request has data permission to access the database of the root account; a first acquisition module, which is used to obtain the password of the database of the root account if yes; and a second acquisition submodule, which is used to obtain a first private key and a first ciphertext from the database of the root account according to the password; wherein the first private key and the first public key are generated and issued by the blockchain at the same time; The second acquisition unit includes: a first decryption module, used to decrypt the first ciphertext according to the first private key to obtain a symmetric key; a sending module, used to: obtain the symmetrically encrypted data information matching the symmetric key according to the symmetric key; decrypt the symmetrically encrypted data information by using the symmetric key to obtain decrypted data information; and send the decrypted data information to the second user terminal.
7. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 5 when executed by a processor.
9. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 5 when being executed by a processor.
Citation Information
Patent Citations
Blockchain smart contract-based data writing method, device and storage medium
CN110100422A
Block chain data sharing method and device
CN110224814A
Symmetric encryption and decryption method and device based on on-chain data, and medium
CN110995419A
High-performance data multi-level encryption and decryption method and system based on complete homomorphic encryption
CN113078992A
Blockchain smart contract-based data writing method, device and storage medium
WO2019127265A1
