Data storage query method, device, computer system and readable storage medium
By encrypting, storing and verifying certification documents in the blockchain database, and controlling query permissions, the problem of internal tampering in the blockchain is solved, the credibility of corporate credit assessments and data security are improved, and corporate operations are made transparent and Risk reduction.
Patent Information
- Application Number
- CN201910027204.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-01-11
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2039-01-11
AI Technical Summary
Existing technology cannot effectively prevent the tampering of certification documents within the blockchain and affect the credibility of corporate credit assessment results.
The certification document is encrypted by using the encrypted storage module in the blockchain database, and is saved in the working node after verification by the verification node. Query permissions to ensure data security and transparency.
It improves the credibility of corporate credit assessment results, prevents external and internal tampering of the blockchain, reduces trust risks, protects customers' private data, and achieves transparency in corporate operations.
Smart Images

Figure CN109886026B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a data storage and query method, device, computer system and readable storage medium. Background Art
[0002] At present, the industry's corporate credit certification is mainly based on the comprehensive evaluation of various public data of the company by various evaluation companies. However, when obtaining public data and conducting comprehensive evaluations, it is easy for evaluation companies to tamper with, forge, and falsify public data due to human factors or market factors, thereby affecting the comprehensive evaluation results of the company, thereby causing the current company's comprehensive evaluation results to have a low credit rating;
[0003] Currently, the industry has established alliance chains. Blockchain, as a "trust machine", has the characteristics of traceability, consensus and decentralization, and the data on the blockchain are timestamped. Even if the data of a certain node is modified, it cannot be covered up by one hand. Therefore, blockchain can provide an absolutely trusted environment. Through the decentralized architecture of the blockchain, a global mutual trust mechanism is exerted to form a strong P2P trust relationship; the establishment of a mutual trust mechanism can effectively reduce the risk control cost on the capital side and solve the bank's concerns about information tampering; however, this method cannot solve the situation where the proof nodes within the blockchain tamper with the proof documents. Therefore, the risk of proof documents being tampered with cannot be eliminated. Summary of the invention
[0004] The purpose of the present invention is to provide a data storage query method, device, computer system and readable storage medium to solve the problems existing in the prior art.
[0005] To achieve the above object, the present invention provides a data storage query method, using a blockchain database, wherein the blockchain database has a plurality of certification nodes, comprising the following steps:
[0006] S1: After receiving and encrypting the certification document, save the certification document;
[0007] S2: receiving the query application and the client authentication information, and outputting the query authority according to the query application and the client authentication information;
[0008] S3: Receive a query instruction and output a certification document according to the query instruction.
[0009] In the above steps, S1 includes the following steps:
[0010] S1-01: receiving a certification file uploaded by a certification user terminal, and outputting the certification file to a certification node corresponding to the certification user terminal; setting the certification node receiving the certification file as a working node;
[0011] S1-02: Generate a private key and use it to obtain encrypted files, public keys and hash values;
[0012] S1-03: Set other proof nodes in the blockchain database except the working nodes as verification nodes; send the public key, encrypted file and hash value to all verification nodes in the blockchain database;
[0013] S1-04: Decrypt the encrypted file by verifying the node and using the public key to obtain a decryption summary;
[0014] S1-05: If the decrypted digests obtained by all verification nodes are consistent with the hash value, it is deemed that the work proof node has successfully encrypted the proof file and generates an encryption success signal;
[0015] If the decrypted summary obtained by at least one verification node is inconsistent with the hash value, it is determined that the work proof node has failed to encrypt the proof file and an encryption failure signal is generated;
[0016] S1-06: receiving and storing the certification file in the working node according to the encryption success signal; or
[0017] Receive and delete the received proof file in the working node based on the encryption failure signal.
[0018] In the above steps, step S1-02 includes:
[0019] S1-02-1: Control the certification client and use the random number generation module to generate a private key;
[0020] S1-02-2: Receive the private key and use the private key to encrypt the certification document to obtain an encrypted document;
[0021] S1-02-3: Calculate the private key using an elliptic curve algorithm to obtain a public key;
[0022] S1-02-4: Use a one-way hash algorithm to perform a hash operation on the certification document to obtain a hash value.
[0023] In the above steps, the certification documents in S1 include customer identity information, private data and public data;
[0024] The types of query applications in S2 include self-query applications, other-query applications and authorization applications. The query applications have target identity data, and the authorization applications have authorization identity data. The query permissions include primary permissions and secondary permissions.
[0025] In the above steps, step S2 includes:
[0026] S2-01: receiving a query application and client authentication information output by the client according to the query permission signal, and acquiring client data matching the client authentication information from a client database;
[0027] S2-02: confirm the type of the query application, compare the target identity data and the client data in the query application according to the type of the query application and generate a comparison result, or compare the authorized identity data and the target identity data in the query application and generate an authorization result;
[0028] S2-03: Output query permissions based on the type of query application, comparison results or authorization results.
[0029] In the above steps, step S2-03 includes:
[0030] When it is confirmed that the query application is a self-check application, if the target identity data is consistent with the client data, a comparison result of valid identity is generated and a first-level permission is issued to the client; if the target identity data is inconsistent with the client data, an invalid identity comparison result is generated and a second-level permission is issued to the client; or
[0031] When it is confirmed that the query application is a query application for another user, a secondary permission is issued to the client; or
[0032] When it is confirmed that the query application is an authorization application, if the authorization identity data in the authorization application is consistent with the target identity data, an authorization result with valid authorization is generated and a first-level permission is issued to the client; if the authorization identity data in the authorization application is inconsistent with the target identity data, or the authorization application does not contain authorization identity data, an authorization result with invalid authorization is generated and a second-level permission is issued to the client.
[0033] In the above steps, the query application in step S3 includes a primary instruction and a secondary instruction;
[0034] The step S3 comprises:
[0035] Receiving a first-level instruction output by a client according to the first-level authority; outputting the client identity information, private data and public data matching the target identity data to the client according to the first-level instruction; or
[0036] Receive a secondary instruction output by the client according to the secondary authority; and output the client identity information and public data matching the target identity data to the client according to the secondary instruction.
[0037] To achieve the above object, the present invention also provides a data storage query device, comprising:
[0038] An encryption and storage module, used for receiving a certification document, encrypting the certification document, and then storing the certification document;
[0039] The authority management module is used to receive the query application and the client authentication information, and output the query authority according to the query application and the client authentication information;
[0040] The query management module is used to output certification documents based on the query application.
[0041] To achieve the above objectives, the present invention also provides a computer system, which includes multiple computer devices, each of which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processors of the multiple computer devices execute the computer program, they jointly implement the steps of the above data storage query method.
[0042] To achieve the above objectives, the present invention also provides a computer-readable storage medium, which includes multiple storage media, each storage medium storing a computer program, and the computer programs stored in the multiple storage media, when executed by a processor, jointly implement the steps of the above data storage query method.
[0043] The data storage query method, device, computer system and readable storage medium provided by the present invention encrypt the certification file received by the certification node in the blockchain database through the encryption storage module, and finally the verification node verifies whether the encryption of the certification file is successful to prove that the certification file is indeed uploaded by the certification user terminal corresponding to a certain certification node in the blockchain database. Therefore, it is avoided that nodes outside the blockchain database tamper with, forge, and forge the certification file to affect the comprehensive evaluation results of the company. At the same time, it is also avoided that a certain certification node in the blockchain database tamper with the certification files responsible for other certification nodes, thereby improving the credibility of the company's comprehensive evaluation results;
[0044] Outputting query permissions according to the query application and client data through the permission management module, and enabling the client to obtain the client identity information, private data and public data, or the client identity information and public data matching the target identity data according to the query permissions through the query management module;
[0045] It enables clients with authorized identity data to obtain private and public data of certification documents, thus meeting the needs of relevant parties in the market for clients' certification documents; clients without authorized identity data or only use other companies' public data for query applications can be checked, thus ensuring the public data of the company's certification documents is open, achieving transparency in corporate operations, and reducing the risk of social trust in the company. It also effectively protects the private data of customers and eliminates the risk of leakage of customers' business secrets;
[0046] Finally, customers can also use the client to view the company's own private and public data, providing convenience for the company's operations and management. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 This is a flow chart of a first embodiment of a data storage query method of the present invention;
[0048] Figure 2 This is a flowchart of the work flow between the data storage query device and the service system in the first embodiment of the data storage query method of the present invention;
[0049] Figure 3 This is a schematic diagram of program modules of a second embodiment of a data storage and query device of the present invention;
[0050] Figure 4 Schematic diagram of the hardware structure of the computer device in the third embodiment of the computer system of the present invention.
[0051] Reference numerals:
[0052] 1. Data storage and query device 2. Blockchain database 3. Proof user end
[0053] 4. Client 5. Computer equipment 11. Encryption storage module
[0054] 12. Rights management module 13. Query management module 51. Memory 52. Processor DETAILED DESCRIPTION
[0055] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0056] The data preservation query method, device, computer system and readable storage medium provided by the present invention are applicable to the field of blockchain, and provide a data preservation query method based on an encryption preservation module, a permission management module and a query management module. The present invention encrypts the proof file received by the proof node in the blockchain database through the encryption preservation module, and finally the verification node verifies whether the encryption of the proof file is successful to prove that the proof file is indeed uploaded by the proof user terminal corresponding to a proof node in the blockchain database. Therefore, it avoids the situation where nodes outside the blockchain database tamper with, forge, and forge the proof file to affect the comprehensive evaluation results of the company. At the same time, it also avoids the situation where a proof node in the blockchain database tamper with the proof files responsible for other proof nodes, thereby improving the credibility of the company's comprehensive evaluation results;
[0057] Outputting query permissions according to the query application and client data through the permission management module, and enabling the client to obtain the client identity information, private data and public data, or the client identity information and public data matching the target identity data according to the query permissions through the query management module;
[0058] It enables clients with authorized identity data to obtain private and public data of certification documents, thus meeting the needs of relevant parties in the market for clients' certification documents; clients without authorized identity data or only use other companies' public data for query applications can be checked, thus ensuring the public data of the company's certification documents is open, achieving transparency in corporate operations, and reducing the risk of social trust in the company. It also effectively protects the private data of customers and eliminates the risk of leakage of customers' business secrets;
[0059] Finally, customers can also use the client to view the company's own private and public data, providing convenience for the company's operations and management.
[0060] Embodiment 1
[0061] See also Figure 1 and Figure 2 A data storage query method of this embodiment uses a blockchain database 2 and a data storage query device 1, and the blockchain database 2 has a plurality of certification nodes, including the following steps:
[0062] S1: After receiving and encrypting the certification document, save the certification document;
[0063] S2: Receive a query application and client authentication information, and output query authority based on the query application and the client authentication information; wherein the client authentication information is information used to prove the identity of the client, and the client authentication information may be the IP address of the client, or the unique code of the client, or a combination of the IP address and the unique code of the client.
[0064] S3: Receive a query instruction and output a certification document according to the query instruction.
[0065] Specifically, S1 includes the following steps:
[0066] S1-01: Receive the certification document uploaded by the certification user terminal 3, and output the certification document to the certification node corresponding to the certification user terminal 3; set the certification node that receives the certification document as a working node; wherein the certification user terminal serves the certification document management unit, such as tax management authorities, industrial and commercial management authorities, fire protection units, quality supervision authorities and other certification document management enterprises; each certification user terminal 3 has one and only one corresponding certification node in the blockchain database.
[0067] S1-02: Generate a private key and use it to obtain encrypted files, public keys and hash values;
[0068] S1-03: Set other proof nodes in the blockchain database except the working nodes as verification nodes; send the public key, encrypted file and hash value to all verification nodes in the blockchain database;
[0069] S1-04: Decrypt the encrypted file by verifying the node and using the public key to obtain a decryption summary;
[0070] S1-05: If the decrypted digests obtained by all verification nodes are consistent with the hash value, it is deemed that the work proof node has successfully encrypted the proof file and generates an encryption success signal;
[0071] If the decrypted summary obtained by at least one verification node is inconsistent with the hash value, it is determined that the work proof node has failed to encrypt the proof file and an encryption failure signal is generated;
[0072] S1-06: receiving and storing the certification file in the working node according to the encryption success signal; or
[0073] Receive and delete the received proof file in the working node based on the encryption failure signal.
[0074] Furthermore, the step S1-02 includes:
[0075] S1-02-1: Receive a successful reception signal output by the working node, control the certification user terminal 3 according to the successful reception signal, and use the random number generation module to generate a private key;
[0076] S1-02-2: Receive the private key and use the private key to encrypt the certification document to obtain an encrypted document;
[0077] S1-02-3: Calculate the private key using an elliptic curve algorithm to obtain a public key;
[0078] S1-02-4: Use a one-way hash algorithm to perform a hash operation on the certification document to obtain a hash value.
[0079] Specifically, the certification document in S1 includes customer identity information, private data and public data.
[0080] Preferably, the step S1 further comprises:
[0081] S1-07: receiving a save success signal output by the working node; or
[0082] Receive a deletion success signal output by the working node.
[0083] Preferably, the step S2 further comprises:
[0084] S2-00: Create a client database and output a query permission signal to the client 4 according to the successful save signal; the client database is used to store the client data of each client 4, and correspond and match the client data of each client 4 with the client authentication information of each client one by one; wherein the customer identity information of the enterprise served by the client 4 is stored in the client database as client data.
[0085] Preferably, the types of query applications in S2 include self-inquiry applications, other-inquiry applications and authorization applications, the query applications have target identity data, and the authorization applications in the query applications have authorization identity data; the query permissions include primary permissions and secondary permissions.
[0086] Furthermore, the first-level permission is used to view customer identity information, private data, and public data, and the second-level permission is used to view customer identity information and public data.
[0087] Specifically, step S2 includes:
[0088] S2-01: Receive the query application and client authentication information output by the client 4 according to the query permission signal, and obtain the client data matching the client authentication information from the client database; wherein the client serves the query unit of the certification document, such as the enterprise, the third-party service agency and other query units that need to query the certification documents of the enterprise; wherein the client data is the customer identity information of the enterprise served by the client 4, therefore, each client 4 has one and only one customer identity information, and has one and only one client authentication information; wherein the customer identity information can be the enterprise name, the unified social credit code or the organization code;
[0089] S2-02: Confirm the type of query application, compare the target identity data and client data in the query application according to the type of query application and generate a comparison result, or compare the authorized identity data and target identity data in the query application and generate an authorization result; wherein, the target identity data and the authorized identity data are both the customer identity information of the owner of the certification document to be queried by the client 4, and the customer identity information may be a company name, a unified social credit code or an organization code.
[0090] Optionally, the authorized identity data is an electronic signature.
[0091] S2-03: Output query permissions based on the type of query application, comparison results or authorization results.
[0092] Furthermore, the step S2-03 includes:
[0093] When it is confirmed that the query application is a self-check application, if the target identity data is consistent with the client data, a comparison result of valid identity is generated and a first-level permission is issued to the client 4; if the target identity data is inconsistent with the client data, an invalid identity comparison result is generated and a second-level permission is issued to the client 4; or
[0094] When it is confirmed that the query application is a query application for another user, a secondary permission is issued to the client 4; or
[0095] When it is confirmed that the query application is an authorization application, if the authorization identity data in the authorization application is consistent with the target identity data, an authorization result with valid authorization is generated and a first-level permission is issued to the client 4; if the authorization identity data in the authorization application is inconsistent with the target identity data, or the authorization application does not contain the authorization identity data, an authorization result with invalid authorization is generated and a second-level permission is issued to the client 4.
[0096] Specifically, the query instruction in step S3 includes a primary instruction and a secondary instruction;
[0097] The step S3 comprises:
[0098] Receiving a first-level instruction outputted by the client 4 according to the first-level authority; outputting the client identity information, private data and public data matching the target identity data to the client 4 according to the first-level instruction; or
[0099] Receive the secondary instruction output by the client 4 according to the secondary authority; and output the customer identity information and public data matching the target identity data to the client 4 according to the secondary instruction.
[0100] Specifically, the customer identity information may be the company name, unified social credit code or organization code;
[0101] Public data may include, but is not limited to, the following information: information such as the name of the enterprise, the company's registered address, unified social credit code, registered capital and legal representative; information such as the enterprise's mailing address, postal code, contact number, email address, etc.; information on the enterprise's opening, closing, liquidation and other existence status; information on the enterprise's investment in establishing an enterprise and purchasing equity; if the enterprise is a limited liability company or a joint-stock company, the amount of capital subscribed and paid in, the time of capital contribution, the method of capital contribution, etc. of its shareholders or promoters; information on equity changes such as equity transfers of shareholders of limited liability companies; information such as the name and URL of the enterprise's website and online stores engaged in network operations; information such as the amount of capital subscribed and paid in, the time of capital contribution, the method of capital contribution, etc. of shareholders of limited liability companies or promoters of joint-stock companies; information on equity changes such as equity transfers of shareholders of limited liability companies; information on the acquisition, change and extension of administrative licenses; information on the registration of pledges of intellectual property rights; information on administrative penalties;
[0102] Private data may include but is not limited to the following information: number of employees, total assets, total liabilities, external guarantees, total owner's equity, total operating income, main business income, total profit, net profit, and total tax information;
[0103] Therefore, the first-level instruction may be an application instruction for obtaining any of the customer identity information, public data and private data;
[0104] For example, the first-level instructions may include "total assets view application instruction", "total liabilities view application instruction", etc.
[0105] The secondary instruction may be an application instruction for obtaining customer identity information and any information in public data; for example, the secondary instruction may be an "enterprise name viewing application instruction", "enterprise communication address viewing application instruction", etc.
[0106] Embodiment 2
[0107] See also Figure 3 , a data storage query device 1 of this embodiment includes:
[0108] The encryption and storage module 11 is used to receive the certification document, encrypt the certification document, and then store the certification document;
[0109] The authority management module 12 is used to receive the query application and the client authentication information, and output the query authority according to the query application and the client authentication information;
[0110] The query management module 13 is used to output certification documents according to the query application.
[0111] The technical solution is based on blockchain, and uses the blockchain database as a block storage system. The proof file received by the proof node of the blockchain database is encrypted through the encryption storage module 11. Finally, the verification node verifies whether the encryption of the proof file is successful to prove that the proof file is indeed uploaded by the proof user terminal corresponding to a proof node in the blockchain database; the query authority is output according to the query application and the client data through the authority management module 12, and the client is enabled to obtain the customer identity information, private data and public data, or customer identity information and public data matching the target identity data according to the query authority through the query management module 13.
[0112] Embodiment three:
[0113] To achieve the above-mentioned purpose, the present invention further provides a computer system, which includes a plurality of computer devices 5. The components of the data storage query device 1 of the second embodiment can be dispersed in different computer devices. The computer devices can be smart phones, tablet computers, laptop computers, desktop computers, rack servers, blade servers, tower servers or cabinet servers (including independent servers, or server clusters composed of multiple servers) that execute programs. The computer devices of this embodiment include at least but are not limited to: a memory 51 and a processor 52 that can be interconnected through a system bus, such as Figure 4 It should be pointed out that Figure 4 Only a computer device with components is shown, but it should be understood that implementing all of the components shown is not a requirement and more or fewer components may alternatively be implemented.
[0114] In this embodiment, the memory 51 (i.e., readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 51 can be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the memory 51 can also be an external storage device of a computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 51 can also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the memory 51 is generally used to store the operating system and various application software installed on the computer device, such as the program code of the data storage query device of the first embodiment. In addition, the memory 51 can also be used to temporarily store various types of data that have been output or are to be output.
[0115] The processor 52 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 52 is generally used to control the overall operation of the computer device. In this embodiment, the processor 52 is used to run the program code stored in the memory 51 or process data, such as running the data storage query device to implement the data storage query method of the first embodiment.
[0116] Embodiment 4:
[0117] To achieve the above-mentioned purpose, the present invention also provides a computer-readable storage system, which includes multiple storage media, such as flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, server, App application store, etc., on which a computer program is stored, and the program realizes the corresponding function when executed by the processor 52. The computer-readable storage medium of this embodiment is used to store the data storage query device, and when executed by the processor 52, the data storage query method of embodiment 1 is realized.
[0118] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0119] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.
[0120] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A data storage query method, using a blockchain database, wherein the blockchain database has a plurality of certification nodes, characterized in that: The following steps are involved: S1: After receiving and encrypting the certification document, save the certification document; S2: Create a client database and output a query permission signal to the client according to the save success signal; receive a query application and client authentication information, and output a query permission according to the query application and client authentication information; wherein the client database is used to store client data of each client, and correspond and match the client data of each client with the client authentication information of each client one by one; store the customer identity information of the enterprise served by the client as client data in the client database; S3: receiving a query instruction and outputting a certification document according to the query instruction; The S1 includes the following steps: S1-01: receiving a certification file uploaded by a certification user terminal, and outputting the certification file to a certification node corresponding to the certification user terminal; setting the certification node receiving the certification file as a working node; S1-02: Generate a private key and use it to obtain encrypted files, public keys and hash values; S1-03: Set other proof nodes in the blockchain database except the working nodes as verification nodes; send the public key, encrypted file and hash value to all verification nodes in the blockchain database; S1-04: Decrypt the encrypted file by verifying the node and using the public key to obtain a decryption summary; S1-05: If the decrypted digests obtained by all verification nodes are consistent with the hash value, it is deemed that the work proof node has successfully encrypted the proof file and generates an encryption success signal; If the decrypted summary obtained by at least one verification node is inconsistent with the hash value, it is determined that the work proof node has failed to encrypt the proof file and an encryption failure signal is generated; S1-06: receiving and storing the certification file in the working node according to the encryption success signal; or Receive and delete the received certification file in the working node according to the encryption failure signal; S1-07: receiving a save success signal output by the working node; or Receiving a deletion success signal output by the working node; The S1-02 includes: S1-02-1: Control the certification client and use the random number generation module to generate a private key; S1-02-2: Receive the private key and use the private key to encrypt the certification document to obtain an encrypted document; S1-02-3: Calculate the private key using an elliptic curve algorithm to obtain a public key; S1-02-4: Perform a hash operation on the certification document using a one-way hash algorithm to obtain a hash value; The certification documents in S1 include customer identity information, private data and public data; The types of query applications in S2 include self-check applications, other-check applications and authorization applications. The query applications have target identity data, and the authorization applications have authorization identity data. The query permissions include primary permissions and secondary permissions. The primary permissions are used to view customer identity information, private data and public data, and the secondary permissions are used to view customer identity information and public data. The S2 includes: S2-01: receiving a query application and client authentication information output by the client according to the query permission signal, and acquiring client data matching the client authentication information from a client database; S2-02: confirm the type of the query application, compare the target identity data and the client data in the query application according to the type of the query application and generate a comparison result, or compare the authorized identity data and the target identity data in the query application and generate an authorization result; wherein the authorized identity data is an electronic signature; S2-03: Output query permissions based on the type of query application, comparison results or authorization results; The S2-03 includes: When it is confirmed that the query application is a self-check application, if the target identity data is consistent with the client data, a comparison result of valid identity is generated and a first-level permission is issued to the client; if the target identity data is inconsistent with the client data, an invalid identity comparison result is generated and a second-level permission is issued to the client; or When it is confirmed that the query application is a query application for another user, a secondary permission is issued to the client; or When it is confirmed that the query application is an authorization application, if the authorization identity data in the authorization application is consistent with the target identity data, an authorization result with valid authorization is generated and a first-level permission is issued to the client; if the authorization identity data in the authorization application is inconsistent with the target identity data, or the authorization application does not contain authorization identity data, an authorization result with invalid authorization is generated and a second-level permission is issued to the client.
2. The data storage query method according to claim 1, characterized in that: The query instructions in S3 include primary instructions and secondary instructions; The S3 includes: Receiving a first-level instruction output by a client according to the first-level authority; outputting the client identity information, private data and public data matching the target identity data to the client according to the first-level instruction; or Receive a secondary instruction output by the client according to the secondary authority; and output the client identity information and public data matching the target identity data to the client according to the secondary instruction.
3. A data storage query device, using a blockchain database, wherein the blockchain database has a plurality of certification nodes, characterized in that: include: An encryption and storage module, used for receiving a certification document, encrypting the certification document, and then storing the certification document; After receiving the certification file and encrypting the certification file, saving the certification file includes: receiving the certification file uploaded by the certification user end, and outputting the certification file to the certification node corresponding to the certification user end; setting the certification node that receives the certification file as a working node; generating a private key, and using the private key to obtain an encrypted file, a public key and a hash value; setting other certification nodes in the blockchain database except the working node as verification nodes; sending the public key, the encrypted file and the hash value to all verification nodes in the blockchain database; decrypting the encrypted file through the verification node and using the public key to obtain a decryption summary; if the decryption summaries obtained by all verification nodes are consistent with the hash value, it is determined that the working proof node has successfully encrypted the certification file and generates an encryption success signal; if the decryption summary obtained by at least one verification node is consistent with the hash value, then the working proof node is deemed to have successfully encrypted the certification file and an encryption success signal is generated .... If the hash values are inconsistent, it is determined that the working proof node has failed to encrypt the proof file and generates an encryption failure signal; receives and saves the proof file in the working node according to the encryption success signal; or receives and deletes the proof file received in the working node according to the encryption failure signal; receives a save success signal output by the working node; or receives a delete success signal output by the working node; generates a private key, and uses the private key to obtain an encrypted file, a public key and a hash value, including: controlling the proof user end and using a random number generation module to generate a private key; receiving the private key and using the private key to encrypt the proof file to obtain an encrypted file; using an elliptic curve algorithm to calculate the private key to obtain a public key; using a one-way hash algorithm to perform a hash operation on the proof file to obtain a hash value; the proof file includes customer identity information, private data and public data; The authority management module is used to create a client database and output a query permission signal to the client according to the save success signal; receive the query application and the client authentication information, and output the query authority according to the query application and the client authentication information; wherein the client database is used to store the client data of each client, and the client data of each client is respectively matched and matched with the client authentication information of each client; the customer identity information of the enterprise served by the client is stored in the client database as the client data; the types of the query application include self-check application, other-check application and authorization application, the query application has the target identity data, and the authorization application has the authorization identity data; the query authority includes the first-level authority and the second-level authority; wherein the first-level authority is used to view the customer identity information, private data and public data, and the second-level authority is used to view the customer identity information and public data Open data; receive the query application and client authentication information, and output the query permission according to the query application and the client authentication information, including: receiving the query application and client authentication information output by the client according to the query permission signal, and obtaining the client data matching the client authentication information from the client database; confirming the type of the query application, comparing the target identity data and the client data in the query application according to the type of the query application and generating a comparison result, or comparing the authorized identity data and the target identity data in the query application and generating an authorization result; wherein the authorized identity data is an electronic signature; outputting the query permission according to the type of the query application, and the comparison result or the authorization result; wherein, when it is confirmed that the query application is a self-check application, if the target identity data is consistent with the client data, then generating a comparison result of identity validity and issuing a first-level permission to the client; If the target identity data is inconsistent with the client data, an invalid identity comparison result is generated and a secondary permission is issued to the client; or when the query application is confirmed to be a query application, a secondary permission is issued to the client; or when the query application is confirmed to be an authorization application, if the authorization identity data in the authorization application is consistent with the target identity data, an authorization result with valid authorization is generated and a primary permission is issued to the client; if the authorization identity data in the authorization application is inconsistent with the target identity data, or the authorization application does not have the authorization identity data, an invalid authorization result is generated and a secondary permission is issued to the client; The query management module is used to output certification documents based on the query application.
4. A computer system comprising a plurality of computer devices, each of which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processors of the plurality of computer devices execute the computer program, the processors jointly implement the steps of the data storage query method according to any one of claims 1 to 2.
5. A computer-readable storage medium, comprising a plurality of storage media, each storage medium storing a computer program, characterized in that: The computer programs stored in the multiple storage media, when executed by a processor, jointly implement the steps of the data storage query method according to any one of claims 1 to 2.
