Data archiving method, system, computer device and storage medium
By storing and utilizing hash value signatures and smart contracts on multiple nodes of the blockchain network, the problem of low credibility of registered data in the data filing system is solved, and the immutability and transparent query of data are realized, thereby improving the credibility of the data.
Patent Information
- Application Number
- CN202410959873.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2044-07-17
AI Technical Summary
Existing data filing systems suffer from low credibility, lack of transparency, and incompleteness due to cyberattacks and human tampering.
By storing registration data on multiple nodes of the blockchain network and using private and public keys to hash and verify the data, the integrity and authenticity of the data are ensured. Combined with smart contracts and consensus algorithms, distributed storage and retrieval of data are achieved.
This enhances the credibility and transparency of the filing data, prevents data from being tampered with during transmission, and ensures the immutability of the data and the accuracy of the query.
Smart Images

Figure CN118916924B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, in particular to a data filing method and system, computer device and storage medium. BACKGROUND
[0002] At present, a data filing system for storing data to be filed, i.e. filing data, includes a small number of databases for storing filing data. The filing data can be tampered with due to network attacks on the data filing system. In addition, personnel of the data filing system can intentionally or unintentionally modify the filing data. This results in low credibility of the filing data. How to improve the credibility of the filing data becomes a problem to be solved. SUMMARY
[0003] Therefore, the present disclosure provides a data filing method and system, computer device and storage medium.
[0004] In a first aspect, the present disclosure provides a data filing method, which comprises:
[0005] The front-end system receives a storage request sent by a terminal of a user, and sends the storage request to an API service, the storage request comprising: target filing data, and a filing data identifier of the target filing data;
[0006] The API service signs the verification hash value of the target filing data using a private key to obtain signature information of the verification hash value of the target filing data, and sends the target filing data and the signature information of the verification hash value of the target filing data to each of a plurality of blockchain nodes of a blockchain network, wherein each of the blockchain nodes is configured to use a public key and signature information of a verification hash value of received filing data to verify the received filing data, and obtain a verification result of the received filing data;
[0007] For each of the plurality of blockchain nodes, when the blockchain node receives the target filing data and the signature information of the verification hash value of the target filing data, the blockchain node uses the public key and the signature information of the verification hash value of the target filing data to verify the target filing data, and obtains a verification result indicating that the target filing data passes the verification, and executes a method for storing filing data of a smart contract on the blockchain node to generate a transaction hash value of the target filing data by using the method for storing filing data, and stores the target filing data and the transaction hash value of the target filing data in the blockchain node;
[0008] The blockchain node sends the transaction hash value of the target filing data and a storage timestamp of the target filing data to the API service;
[0009] The front-end system receives a query request for the record data sent by a terminal of a user, and sends the query request to the API service, the query request comprising: input information of the user;
[0010] The API service finds a transaction hash value corresponding to the input information;
[0011] Each of the blockchain nodes respectively executes the method for querying the record data of the smart contract on the blockchain node, so as to query the record data corresponding to the input information according to the transaction hash value corresponding to the input information by using the method for querying the record data, the record data corresponding to the input information being the record data having the transaction hash value corresponding to the input information;
[0012] The API service receives the record data corresponding to the input information sent by the blockchain nodes, and sends the record data corresponding to the input information to the terminal of the user.
[0013] In one possible implementation, the API service signs the verification hash value of the target record data by using the private key to obtain the signature information of the verification hash value of the target record data, the signature information comprising:
[0014] The API service verifies the integrity of the target record data and the format of the target record data;
[0015] When the integrity of the target record data is verified and the format of the target record data is verified, the API service signs the verification hash value of the target record data by using the private key to obtain the signature information of the verification hash value of the target record data.
[0016] In one possible implementation, the method further comprises:
[0017] The storage information of each of the plurality of record data stored in the blockchain network is recorded by using the blockchain middleware platform and the blockchain console, the storage information of the record data comprising: the record data, a storage time stamp of the record data, the storage time stamp of the record data indicating a time when the record data is stored in the blockchain network.
[0018] In one possible implementation, the method further comprises:
[0019] The plurality of query records are recorded by using a blockchain middleware platform and a blockchain console, each of the plurality of query records corresponds to the filed data, each of the plurality of query records corresponds to one query to the filed data, the filed data corresponding to the query record is the filed data queried by the one query corresponding to the query record, and the query record includes the filed data corresponding to the query record, a time of querying the filed data corresponding to the query record by the one query corresponding to the query record, and a user identifier of a user to which a terminal sending a query request for querying the filed data corresponding to the query record belongs.
[0020] In a second aspect, the embodiments of the present disclosure provide a data filing system, which comprises a front-end system, an API service, and a plurality of blockchain nodes of a blockchain network.
[0021] The front-end system is configured to receive a storage request sent by a terminal of a user and send the storage request to the API service, the storage request comprising target filed data and a filed data identifier of the target filed data.
[0022] The API service is configured to sign a verification hash value of the target filed data by using a private key to obtain signature information of the verification hash value of the target filed data, and send the target filed data and the signature information of the verification hash value of the target filed data to each of the plurality of blockchain nodes of the blockchain network, wherein each of the plurality of blockchain nodes is configured to verify the filed data received by the blockchain node by using a public key and signature information of a verification hash value of the filed data received by the blockchain node to obtain a verification result of the filed data received by the blockchain node.
[0023] The blockchain node is configured to, when the target filed data and the signature information of the verification hash value of the target filed data are received, verify the target filed data by using the public key and the signature information of the verification hash value of the target filed data to obtain a verification result indicating that the target filed data passes the verification, and execute a method for storing filed data of a smart contract on the blockchain node to generate a transaction hash value of the target filed data by using the method for storing filed data and store the target filed data and the transaction hash value of the target filed data in the blockchain node.
[0024] The blockchain node is configured to send the transaction hash value of the target filed data and a storage timestamp of the target filed data to the API service.
[0025] The front-end system is configured to receive a query request for the filed data sent by a terminal of a user and send the query request to the API service, wherein the query request comprises input information of the user.
[0026] The API service is configured to find the transaction hash corresponding to the input information.
[0027] The blockchain node is configured to execute the method for querying the record data of the smart contract on the blockchain node, so as to query the record data corresponding to the input information according to the transaction hash corresponding to the input information, and the record data corresponding to the input information is the record data having the transaction hash corresponding to the input information.
[0028] The API service is configured to receive the record data corresponding to the input information sent by the blockchain node, and send the record data corresponding to the input information to the terminal of the user.
[0029] In a possible implementation, the API service is further configured to verify the integrity of the target record data and the format of the target record data; when the integrity of the target record data is verified and the format of the target record data is verified, the signature information of the verification hash value of the target record data is obtained by signing the verification hash value of the target record data by using the private key.
[0030] In a possible implementation, the data record system further comprises:
[0031] The blockchain middleware platform and the blockchain console are configured to record storage information of each record data in the plurality of record data stored in the blockchain network, and the storage information of the record data comprises: the record data, a storage timestamp of the record data, and the storage timestamp of the record data indicating a time when the record data is stored in the blockchain network.
[0032] In a possible implementation, the blockchain middleware platform and the blockchain console are further configured to record a plurality of query records, each query record in the plurality of query records corresponding to a record data, and each query record in the plurality of query records corresponding to a query to the record data, the record data corresponding to the query record being the record data queried by the query corresponding to the query record, and the query record comprising: the record data corresponding to the query record, a time when the query corresponding to the query record is used to query the record data corresponding to the query record, and a user identifier of a user to whom a terminal sending a query request for querying the record data corresponding to the query record belongs.
[0033] In a third aspect, the embodiments of the present disclosure provide a computer device, comprising a memory and a processor, which are communicatively connected with each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the method of the first aspect or any of the corresponding embodiments thereof.
[0034] In a fourth aspect, the embodiments of the present disclosure provide a computer readable storage medium, which stores computer instructions for causing a computer to execute the method of the first aspect or any of the corresponding embodiments thereof.
[0035] In a fifth aspect, the present disclosure provides a computer program product comprising computer instructions for causing a computer to execute the method of the first aspect or any of the corresponding embodiments thereof.
[0036] The data archiving method provided by the embodiments of the present disclosure can store each archived data on multiple blockchain nodes, and each blockchain node stores the archived data. The tampering of any single blockchain node cannot change the authenticity of the archived data, and the archived data has high credibility. Users can query and verify the integrity and authenticity of the archived data, thereby improving the transparency of the archived data. For a blockchain node, the method for storing archived data of the smart contract on the blockchain node is executed only after the blockchain node obtains a check result of the check on the indication of the target archived data. Thus, the target archived data can be prevented from being tampered with during the transmission of the target archived data between the API service and the blockchain node, and the credibility of data archiving is further improved. BRIEF DESCRIPTION OF DRAWINGS
[0037] In order to more clearly illustrate the technical solutions of the specific embodiments of the present disclosure or the prior art, the drawings needed in the description of the specific embodiments or the prior art will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0038] Figure 1 is a schematic diagram of an example architecture that can be applied to the data archiving method provided by the present disclosure;
[0039] Figure 2 is a flowchart of the data archiving method provided by the embodiments of the present disclosure;
[0040] Figure 3 is a structural diagram of a computer device provided by the embodiments of the present disclosure. DETAILED DESCRIPTION
[0041] In order to make the purposes, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present disclosure.
[0042] In order to solve the problem of how to improve the credibility of the filing data, the present disclosure provides a data filing method.
[0043] In the related art, the data filing system for storing the data to be filed, i.e., the filing data, includes a single or small number of databases for storing the filing data, and the data filing system is maintained and managed by personnel of the data filing system. The filing data can be attacked or tampered with. In addition, the personnel of the data filing system can intentionally or unintentionally modify the filing data. This results in low credibility of the filing data.
[0044] The data filing method provided by the present disclosure can store each filing data on a plurality of blockchain nodes, and each blockchain node stores the filing data. Tampering with any single blockchain node cannot change the authenticity of the filing data, and the filing data has high credibility. Users can query and verify the integrity and authenticity of the filing data, thereby improving the transparency of the filing data
[0045] Reference Figure 1 which shows a schematic diagram of a data filing system that can be applied to the data filing method provided by the present disclosure.
[0046] The data archiving system comprises a front-end system, an application programming interface (API) service, and a blockchain network. The blockchain network comprises a plurality of blockchain nodes, including a blockchain node 1, a blockchain node 2, and a blockchain node N. The front-end system provides a front-end interface for users. The users submit archiving data to the front-end system through the front-end interface. The front-end system receives a storage request sent by a terminal of a user and sends the storage request to the API service. The API service sends target archiving data and signature information of a verification hash value of the target archiving data to each of the plurality of blockchain nodes of the blockchain network. A smart contract on each of the plurality of blockchain nodes of the blockchain network verifies the target archiving data. After the target archiving data passes the verification, the blockchain node stores the target archiving data in the blockchain node. When the user needs to query data, the front-end system receives a query request for the archiving data sent by the terminal of the user. The API service finds a transaction hash value corresponding to input information in the query request. Each of the plurality of blockchain nodes queries the archiving data corresponding to the input information according to the transaction hash value corresponding to the input information. The API service receives the archiving data corresponding to the input information sent by the blockchain node and sends the archiving data corresponding to the input information to the terminal of the user.
[0047] Reference Figure 2 which shows a flowchart of a data archiving method provided by an embodiment of the present disclosure.
[0048] In step S201, the front-end system receives a storage request sent by a terminal of a user and sends the storage request to the API service.
[0049] The storage request comprises target archiving data and an archiving data identifier of the target archiving data.
[0050] The target archiving data is data that needs to be archived. As an example, a user inputs archiving data through a front-end interface, clicks a submit button in the front-end interface, and the terminal of the user generates a storage request comprising the target archiving data and an archiving data identifier of the target archiving data.
[0051] As an example, the front-end system sends the storage request to the API service through an API interface.
[0052] As an example, the API service is developed based on a Spring Boot framework.
[0053] In step S202, the API service signs the check hash value of the target filing data by using the private key to obtain signature information of the check hash value of the target filing data, and sends the target filing data and the signature information of the check hash value of the target filing data to each of the plurality of blockchain nodes of the blockchain network.
[0054] In step S202, the API service can apply a hash algorithm used to obtain the check hash value of the filing data to the target filing data to obtain the check hash value of the target filing data.
[0055] For one of the plurality of blockchain nodes, the blockchain node is configured to check the filing data received by the blockchain node by using the public key and the signature information of the check hash value of the filing data received by the blockchain node to obtain a check result of the filing data received by the blockchain node.
[0056] The signature information of the check hash value of the filing data received by the blockchain node can be signature information sent to the blockchain node together with the filing data received by the blockchain node. The signature information of the check hash value of the filing data received by the blockchain node is generated by the API service.
[0057] For one of the plurality of blockchain nodes, the blockchain node is configured to check the filing data received by the blockchain node by using the public key and the signature information of the check hash value of the filing data received by the blockchain node to obtain a check result of the filing data received by the blockchain node. The blockchain node can decrypt the signature information of the check hash value of the filing data received by the blockchain node by using the public key to obtain the check hash value of the filing data received by the blockchain node, apply a hash algorithm used to obtain the check hash value of the filing data received by the blockchain node to the filing data received by the blockchain node to obtain a hash value for comparison corresponding to the filing data received by the blockchain node. If the check hash value of the filing data received by the blockchain node is the same as the hash value for comparison, it is determined that the filing data received by the blockchain node is filing data that has not been tampered with, the check is passed, and a check result indicating that the check is passed is generated for the filing data received by the blockchain node. If the check hash value of the filing data received by the blockchain node is not the same as the hash value for comparison, it is determined that the filing data received by the blockchain node is filing data obtained by tampering, the check is not passed, and a check result indicating that the check is not passed is generated for the filing data received by the blockchain node.
[0058] In the embodiments of the present disclosure, for a blockchain node, the blockchain node is configured to verify the record data received by the blockchain node by using the public key and the signature information of the verification hash value of the record data received by the blockchain node, to obtain a verification result of the record data received by the blockchain node, so that the record data transmitted between the API service and the blockchain node can be prevented from being tampered, and the credibility of data record can be further improved.
[0059] In a possible implementation, the API service signs the verification hash value of the target record data by using the private key to obtain the signature information of the verification hash value of the target record data, including: the API service verifies the integrity of the target record data and the format of the target record data; when the integrity of the target record data passes the verification and the format of the target record data passes the verification, the API service signs the verification hash value of the target record data by using the private key to obtain the signature information of the verification hash value of the target record data.
[0060] In step S203, each of the plurality of blockchain nodes respectively obtains a verification result indicating that the target record data passes the verification, and each of the plurality of blockchain nodes respectively stores the target record data and the transaction hash value of the target record data in the blockchain node.
[0061] In step S203, for each of the plurality of blockchain nodes, when the blockchain node receives the target record data and the signature information of the verification hash value of the target record data, the blockchain node verifies the target record data by using the public key and the signature information of the verification hash value of the target record data to obtain a verification result indicating that the target record data passes the verification, and executes a method for storing record data of a smart contract on the blockchain node to generate the transaction hash value of the target record data by using the method for storing record data of the smart contract on the blockchain node, and the blockchain node stores the target record data and the transaction hash value of the target record data in the blockchain node.
[0062] In step S203, for a blockchain node of the plurality of blockchain nodes, the blockchain node verifies the target record data by using the public key and the signature information of the verification hash value of the target record data to obtain a verification result indicating that the target record data passes the verification, which can include: the blockchain node decrypts the signature information of the verification hash value of the target record data by using the public key to obtain the verification hash value of the target record data, applies a hash algorithm used to obtain the verification hash value of the target record data to the target record data to obtain a hash value for comparison corresponding to the target record data. When the verification hash value of the target record data is the same as the hash value for comparison, the verification passes, and the verification result indicating that the target record data passes the verification is generated.
[0063] In the disclosed embodiment, for a blockchain node, the method for storing the record data of the smart contract on the blockchain node is executed only after the blockchain node obtains the verification result that the indication of the target record data passes the verification. Thus, the target record data can be prevented from being tampered when being transmitted between the API service and the blockchain node, further improving the credibility of data record.
[0064] In step S203, for a blockchain node, the method for storing the record data of the smart contract on the blockchain node is executed only after the blockchain node obtains the verification result that the indication of the target record data passes the verification. The method for storing the record data of the smart contract on the blockchain node can be called the set method of the smart contract on the blockchain node.
[0065] In step S203, each of the plurality of blockchain nodes stores the target record data and the transaction hash value of the target record data in the blockchain node through a consensus algorithm. The consensus algorithm ensures that all blockchain nodes reach a consensus before storing the record data, ensuring the security and consistency of the storage process of the record data, so that the data record system can still operate normally even if some of the blockchain nodes fail. Distributed storage ensures the tamper resistance of the record data, and each blockchain node independently verifies and stores the record data to prevent single point failure.
[0066] As an example, the plurality of blockchain nodes are four blockchain nodes, and the four blockchain nodes synchronously store the target record data, and each of the four blockchain nodes stores the target record data.
[0067] As an example, the consensus algorithm is PBFT (Practical Byzantine Fault Tolerance). The target record data is stored as a transaction. In the pre-preparation phase, the transaction request of the transaction is sent by the client to the primary blockchain node, and the primary blockchain node broadcasts the transaction request to all backup blockchain nodes. In the preparation phase, all blockchain nodes verify the validity of the transaction request and broadcast the preparation message. In the submission phase, the blockchain node broadcasts the submission message after receiving more than 2 / 3 of the preparation messages. In the confirmation phase, the blockchain node executes the transaction and records it on the blockchain after receiving more than 2 / 3 of the submission messages.
[0068] In step S204, the blockchain node sends the transaction hash value of the target record data and the storage timestamp of the target record data to the API service.
[0069] The storage timestamp of the target record data indicates the time when the target record data is stored in the blockchain network.
[0070] At step S204, each of the plurality of blockchain nodes can respectively send the transaction hash value of the target filing data and the storage timestamp of the target filing data to the API service.
[0071] The API service can establish a correspondence between the filing data identifier of the target filing data and the transaction hash value of the target filing data.
[0072] The API service can establish a correspondence between the transaction hash value of the target filing data and the storage timestamp of the target filing data.
[0073] At step S205, the front-end system receives a query request for filing data sent by a terminal of a user, and the front-end system sends the query request to the API service.
[0074] The query request includes input information of the user. The input information of the user is input by the user who needs to query the filing data through the front-end interface.
[0075] The input information of the user can include a filing data identifier, i.e., a filing data ID, of the filing data that needs to be queried. The user clicks a query button in the front-end interface, and the terminal of the user generates the query request.
[0076] As an example, the terminal of the user sends the query request to the API service through an API interface.
[0077] At step S206, the API service finds the transaction hash value corresponding to the input information.
[0078] The input information can include a filing data identifier of the filing data that needs to be queried. The API service can determine the transaction hash value corresponding to the filing data identifier in the input information according to the one-to-one correspondence between the plurality of filing data identifiers and the plurality of transaction hash values.
[0079] For a filing data identifier, the transaction hash value corresponding to the filing data identifier is the transaction hash value of the filing data having the filing data identifier.
[0080] It should be noted that the transaction hash value corresponding to the input information is the transaction hash value corresponding to the filing data identifier in the input information.
[0081] At step S207, each of the plurality of blockchain nodes respectively executes a method for querying filing data of the smart contract on the blockchain node to query the filing data corresponding to the input information according to the transaction hash value corresponding to the input information by using the method for querying filing data.
[0082] The filing data corresponding to the input information is the filing data having the transaction hash value corresponding to the input information.
[0083] At step S207, for a blockchain node, the blockchain node executes a method for querying the record data of the smart contract on the blockchain node to query the record data corresponding to the input information according to the transaction hash value corresponding to the input information by the method for querying the record data of the smart contract on the blockchain node. The method for querying the record data of the smart contract on the blockchain node can be called a get method for querying the record data of the smart contract on the blockchain node.
[0084] At step S208, the API service receives the record data corresponding to the input information sent by the blockchain node, and sends the record data corresponding to the input information to the terminal of the user.
[0085] Therefore, the terminal of the user can receive the record data corresponding to the input information, and display the record data corresponding to the input information on the terminal of the user.
[0086] It should be noted that the record data corresponding to the input information is the record data that the user needs to query.
[0087] In one possible implementation, the blockchain middleware platform and the blockchain console record the storage information of each of the plurality of record data stored in the blockchain network. The storage information of the record data includes: the record data, the storage timestamp of the record data, and the storage timestamp of the record data indicating the time when the record data is stored in the blockchain network.
[0088] As an example, the blockchain middleware platform is WeBASE platform. The WeBASE platform and the blockchain console provide a graphical interface. The blockchain middleware platform and the blockchain console record the storage information of each of the plurality of record data stored in the blockchain network. Therefore, the storage and modification of any record data can be recorded and traced, and relevant personnel can check any record data stored in the blockchain network and the storage time of the record data through the blockchain console to verify the authenticity and integrity of the record data, and further improve the credibility of the record data.
[0089] In one possible implementation, the blockchain middleware platform and the blockchain console record a plurality of query records, wherein each of the plurality of query records corresponds to a record data and a query to the record data.
[0090] For a query record, the record data corresponding to the query record is the record data queried through a query corresponding to the query record, and the query record includes: the record data corresponding to the query record, the time of querying the record data corresponding to the query record through a query corresponding to the query record, and the user identifier of the user to whom the terminal sending the query request for querying the record data corresponding to the query record belongs.
[0091] The plurality of query records are recorded by using the blockchain middleware platform and the blockchain console, so that relevant personnel can view any query record and verify the authenticity and integrity of the query result. The credibility of the record data is further improved.
[0092] The embodiments of the present disclosure provide a data record system. The data record system is used to implement the above-mentioned embodiments and preferred embodiments, which have been described. As used below, the term "unit" can be a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware is also possible and contemplated.
[0093] The data record system includes: a front-end system, an API service, and a plurality of blockchain nodes of a blockchain network.
[0094] The front-end system is configured to receive a storage request sent by a terminal of a user and send the storage request to the API service, the storage request including: target record data and a record data identifier of the target record data.
[0095] The API service is configured to sign a verification hash value of the target record data using a private key to obtain signature information of the verification hash value of the target record data, and send the target record data and the signature information of the verification hash value of the target record data to each of the plurality of blockchain nodes of the blockchain network, wherein each of the plurality of blockchain nodes is configured to verify the record data received by the blockchain node using a public key and signature information of a verification hash value of the record data received by the blockchain node to obtain a verification result of the record data received by the blockchain node.
[0096] The blockchain node is configured to, when the target record data and the signature information of the verification hash value of the target record data are received, verify the target record data using the public key and the signature information of the verification hash value of the target record data to obtain a verification result indicating that the target record data passes the verification, and execute a method for storing record data of a smart contract on the blockchain node to generate a transaction hash value of the target record data by using the method for storing record data, and store the target record data and the transaction hash value of the target record data in the blockchain node.
[0097] The blockchain node is configured to send, to the API service, a transaction hash value of the target filing data and a storage timestamp of the target filing data;
[0098] The front-end system is configured to receive a query request for filing data sent by a terminal of a user, and send the query request to the API service, the query request comprising input information of the user;
[0099] The API service is configured to find a transaction hash value corresponding to the input information;
[0100] The blockchain node is configured to execute a method for querying filing data of a smart contract on the blockchain node, so as to query filing data corresponding to the input information according to the transaction hash value corresponding to the input information, the filing data corresponding to the input information being filing data having the transaction hash value corresponding to the input information;
[0101] The API service is configured to receive the filing data corresponding to the input information sent by the blockchain node, and send the filing data corresponding to the input information to the terminal of the user.
[0102] In one possible implementation, the API service is further configured to verify the integrity of the target filing data and the format of the target filing data; when the integrity of the target filing data is verified and the format of the target filing data is verified, the signature information of the verification hash value of the target filing data is obtained by signing the verification hash value of the target filing data with the private key.
[0103] In one possible implementation, the data filing system further comprises:
[0104] The blockchain middleware platform and the blockchain console are configured to record storage information of each of a plurality of filing data stored in the blockchain network, the storage information of the filing data comprising the filing data and a storage timestamp of the filing data, the storage timestamp of the filing data indicating a time when the filing data is stored in the blockchain network.
[0105] In a possible implementation, the blockchain middleware platform and the blockchain console are further configured to record a plurality of query records, each of the plurality of query records corresponding to the recorded data, each of the plurality of query records corresponding to one query to the recorded data, the recorded data corresponding to the query record being the recorded data queried through the one query corresponding to the query record, the query record comprising: the recorded data corresponding to the query record, a time of querying the recorded data corresponding to the query record through the one query corresponding to the query record, and a user identifier of a user to which a terminal sending a query request for querying the recorded data corresponding to the query record belongs.
[0106] The system in the embodiment is presented in the form of functional units. Here, the units refer to ASIC circuits, processors and memories executing one or more software or fixed programs, and / or other devices that can provide the above functions.
[0107] Further function descriptions of the above units are the same as those in the above corresponding embodiments, and will not be described here again.
[0108] Reference Figure 3 It shows a structure schematic diagram of a computer device provided by the embodiment of the present disclosure, which includes one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are communicatively connected to each other by different buses, and can be installed on a common motherboard or in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or graphics information of the memory to display a GUI on an external input / output device, such as a display device coupled to the interface. In some optional embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple memories, if necessary. Similarly, multiple computer devices can be connected, each providing part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).
[0109] The processor 10 can be a central processor, a network processor, or a combination thereof. The processor 10 can further include a hardware chip. The hardware chip can be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device can be a complex programmable logic device, a field programmable logic gate array, a generic array logic, or any combination thereof.
[0110] The memory 20 stores instructions executable by the at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.
[0111] The memory 20 can include a program storage area and a data storage area. The program storage area can store an operating system, application programs required for at least one function, and the like. The data storage area can store data created according to usage of the computer device, and the like. In addition, the memory 20 can include a high-speed random access memory, and can further include a non-transitory memory such as at least one of a magnetic disk storage device, a flash memory device, or other non-transitory solid state memory device. In some alternative embodiments, the memory 20 can optionally include a memory that is remotely located with respect to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0112] The memory 20 can include a volatile memory such as a random access memory, and can further include a non-volatile memory such as a flash memory, a hard disk, or a solid state disk. The memory 20 can also include a combination of the above-mentioned types of memory.
[0113] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30, and the output device 40 can be connected through a bus or other means.
[0114] The input device 30 can receive input digital or character information, and generate key signal input with respect to user settings and function controls of the computer device. Examples of the input device 30 include, but are not limited to, a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, and the like. The output device 40 can include a display device, an auxiliary lighting device (e.g., an LED), a haptic feedback device (e.g., a vibration motor), and the like. Examples of the display device include, but are not limited to, a liquid crystal display, a light emitting diode, a display, and a plasma display. In some alternative embodiments, the display device can be a touch screen.
[0115] The embodiments of the present disclosure further provide a computer readable storage medium, and the method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or recorded in a storage medium, or be implemented as computer code originally stored in a remote storage medium or a non-transitory machine readable storage medium and downloaded through a network and stored in a local storage medium, so that the method described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor, or programmable or special hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk or a solid state disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that the computer, processor, microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, processor or hardware, the method shown in the above embodiments is implemented.
[0116] Part of the embodiments of the present disclosure can be applied as a computer program product, for example, computer program instructions, when executed by a computer, through the operation of the computer, the method and / or technical solutions according to the present disclosure can be executed or provided. Those skilled in the art should understand that the form of computer program instructions in a computer readable medium includes but is not limited to source files, executable files, installation package files, etc., and accordingly, the way of executing computer program instructions by computer includes but is not limited to: the computer directly executes the instructions, or the computer executes the corresponding compiled program after compiling the instructions, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.
[0117] Although the embodiments of the present disclosure are described in conjunction with the accompanying drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present disclosure, and such modifications and changes fall within the scope defined by the appended claims.
Claims
1. A data archiving method, characterized by, The method comprises: The front-end system receives a storage request sent by a terminal of a user, and sends the storage request to an application programming interface (API) service, the storage request comprising: target filing data, and a filing data identifier of the target filing data; The API service signs a verification hash value of the target filing data using a private key to obtain signature information of the verification hash value of the target filing data, and sends the target filing data and the signature information of the verification hash value of the target filing data to each of a plurality of blockchain nodes of a blockchain network, wherein each of the plurality of blockchain nodes is configured to verify the received filing data using a public key and signature information of a verification hash value of the received filing data to obtain a verification result of the received filing data; For each of the plurality of blockchain nodes, when the target filing data and the signature information of the verification hash value of the target filing data are received, the blockchain node verifies the target filing data using the public key and the signature information of the verification hash value of the target filing data to obtain a verification result indicating that the target filing data passes the verification, and executes a method for storing filing data of a smart contract on the blockchain node to generate a transaction hash value of the target filing data by using the method for storing filing data, and stores the target filing data and the transaction hash value of the target filing data in the blockchain node; The blockchain node sends the transaction hash value of the target filing data and a storage timestamp of the target filing data to the API service; The front-end system receives a query request for filing data sent by a terminal of a user, and sends the query request to the API service, wherein the query request comprises: input information of the user; The API service finds a transaction hash value corresponding to the input information; Each of the plurality of blockchain nodes respectively executes a method for querying filing data of a smart contract on the blockchain node to query filing data corresponding to the input information according to the transaction hash value corresponding to the input information by using the method for querying filing data, wherein the filing data corresponding to the input information is the filing data having the transaction hash value corresponding to the input information; The API service receives the filing data corresponding to the input information sent by the blockchain node, and sends the filing data corresponding to the input information to the terminal of the user.
2. The method of claim 1, wherein, The API service signs the verification hash value of the target filing data using the private key to obtain the signature information of the verification hash value of the target filing data comprises: The API service verifies the integrity of the target filing data and the format of the target filing data; When the integrity of the target filing data passes the verification and the format of the target filing data passes the verification, the API service signs the verification hash value of the target filing data using the private key to obtain the signature information of the verification hash value of the target filing data.
3. The method of claim 1, wherein, The method further comprises: The storage information of each of the plurality of record data stored in the blockchain network is recorded by using the blockchain middleware platform and the blockchain console, and the storage information of the record data includes: the record data, a storage timestamp of the record data, and the storage timestamp of the record data indicating a time when the record data is stored in the blockchain network.
4. The method of claim 3, wherein, The method further includes: The plurality of query records are recorded by using the blockchain middleware platform and the blockchain console, each of the plurality of query records corresponds to the record data and each of the plurality of query records corresponds to one query to the record data, the record data corresponding to the query record is the record data queried by the one query corresponding to the query record, and the query record includes: the record data corresponding to the query record, a time when the record data corresponding to the query record is queried by the one query corresponding to the query record, and a user identifier of a user to whom a terminal sending a query request for querying the record data corresponding to the query record belongs.
5. A data archiving system characterized by, The system includes: a front-end system, an API service, and a plurality of blockchain nodes of a blockchain network. The front-end system is configured to receive a storage request sent by a terminal of a user and send the storage request to the API service, and the storage request includes: target record data and a record data identifier of the target record data. The API service is configured to sign a verification hash value of the target record data by using a private key to obtain signature information of the verification hash value of the target record data, and send the target record data and the signature information of the verification hash value of the target record data to each of the plurality of blockchain nodes of the blockchain network, and each of the plurality of blockchain nodes is configured to verify the record data received by the blockchain node by using a public key and the signature information of the verification hash value of the record data received by the blockchain node to obtain a verification result of the record data received by the blockchain node. The blockchain node is configured to, when the target record data and the signature information of the verification hash value of the target record data are received by the blockchain node, verify the target record data by using the public key and the signature information of the verification hash value of the target record data to obtain a verification result indicating that the target record data passes the verification, and execute a method for storing record data of a smart contract on the blockchain node to generate a transaction hash value of the target record data by using the method for storing record data and store the target record data and the transaction hash value of the target record data in the blockchain node. The blockchain node is configured to send the transaction hash value of the target record data and a storage timestamp of the target record data to the API service. The front-end system is configured to receive a query request for the record data sent by the terminal of the user and send the query request to the API service, and the query request includes input information of the user. The API service is configured to find the transaction hash value corresponding to the input information. The blockchain node is configured to send the transaction hash value of the target record data and a storage timestamp of the target record data to the API service. The blockchain node is configured to execute a method for querying record data of a smart contract on the blockchain node, so as to query record data corresponding to the input information according to a transaction hash value corresponding to the input information by using the method for querying record data, the record data corresponding to the input information being record data having the transaction hash value corresponding to the input information. The API service is configured to receive the record data corresponding to the input information sent by the blockchain node, and send the record data corresponding to the input information to a terminal of a user.
6. The system of claim 5, wherein, The API service is further configured to verify integrity of the target record data and a format of the target record data, and when the integrity of the target record data is verified and the format of the target record data is verified, sign a verification hash value of the target record data by using a private key to obtain signature information of the verification hash value of the target record data.
7. The system of claim 5, wherein, The system further comprises: A blockchain middleware platform and a blockchain console are configured to record storage information of each record data in a plurality of record data stored in the blockchain network, the storage information of the record data comprising: the record data, a storage time stamp of the record data, and the storage time stamp of the record data indicating a time when the record data is stored in the blockchain network.
8. A computer device, comprising: Comprise: A memory and a processor, which are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the method in any one of claims 1 to 4.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, and the computer instructions are used to make a computer execute the method in any one of claims 1 to 4.
10. A computer program product, characterised in that, Comprise computer instructions, and the computer instructions are used to make a computer execute the method in any one of claims 1 to 4.
Citation Information
Patent Citations
Service data recording method, device and equipment, and storage medium
CN108573741A
Evidence storage method, evidence verification method and device, equipment and medium
CN110879903A