Data storage method and device based on block chain, computer equipment, storage medium and computer program product

By performing tamper-proof verification and hash processing of business data on the blockchain, the problem of low credibility of business data storage in the existing technology is solved, and high accuracy and security of data are achieved.

CN118607013APending Publication Date: 2024-09-06CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202410737549.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

In the existing technology, the storage method of online business data mainly relies on backup storage, and there is a hidden danger of data tampering by a third party, resulting in low credibility of business data.

Method used

Adopting a data storage method based on the blockchain, by performing tamper-proof verification on the business data, obtaining the hash value and uploading it to the blockchain for storage, and using appropriate hash processing rules to improve the accuracy of the hash value. And only hash values ​​are stored in the blockchain to ensure data security.

Benefits of technology

It improves the credibility and accuracy of business data, ensures that the data has not been tampered with before being deposited, and makes the hash value non-tamperable through the consensus witness mechanism of the blockchain, ensuring the security of the data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118607013A
    Figure CN118607013A
Patent Text Reader

Abstract

The invention relates to a block chain-based data storage method and device, computer equipment, a storage medium and a computer program product, and relates to the technical field of block chains. The method comprises the following steps: in response to an evidence storage instruction of service data generated when a target object handles a target service, performing tamper-proof verification on the service data to obtain a tamper-proof verification result of the service data; under the condition that the tamper-proof verification result shows that the business data is not tampered, based on the business type of the business data, querying to obtain a hash processing rule matched with the business type; according to a hash processing rule, performing hash processing on the service data to obtain a first hash value of the service data; uploading the first hash value to a block chain, and receiving an evidence storage identifier returned after the block chain stores the first hash value; the evidence storage identifier is used for requesting the first hash value from the block chain when a calling instruction for the business data is received. By adopting the method, the business data credibility can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to a blockchain-based data storage method, device, computer equipment, storage medium and computer program product. Background Art

[0002] With the development of the Internet and big data, more and more companies are gradually shifting their businesses from offline to online, which not only improves the convenience of business processing, but also further optimizes business management. In order to ensure the validity of the business data generated during the online processing, companies often need to store it.

[0003] At present, most companies use backup storage to store business data. However, this method still has the risk that a third party can use certain data processing software to tamper with business data, thereby affecting the validity of business data, and thus resulting in low credibility of current business data. Summary of the invention

[0004] Based on this, it is necessary to provide a blockchain-based data storage method, device, computer equipment, computer-readable storage medium and computer program product that can improve the credibility of business data in response to the above-mentioned technical problems.

[0005] In the first aspect, the present application provides a data storage method based on blockchain. The method includes: in response to a storage instruction for business data generated by a target object when handling a target business, performing tamper-proof verification on the business data to obtain a tamper-proof verification result of the business data; when the tamper-proof verification result indicates that the business data has not been tampered with, querying and obtaining a hash processing rule that matches the business type based on the business type of the business data; performing hash processing on the business data according to the hash processing rule to obtain a first hash value of the business data; uploading the first hash value to the blockchain, and receiving a storage identifier returned by the blockchain after storing the first hash value; the storage identifier is used to request the first hash value from the blockchain when receiving a call instruction for the business data.

[0006] In one of the embodiments, the business data includes structured data and unstructured data; in response to an instruction to store the business data generated by the target object when handling the target business, the business data is tamper-proof checked to obtain an anti-tampering check result of the business data, including: in response to an instruction to store the business data generated by the target object when handling the target business, the structured data generated by the target object when handling the target business is obtained; data indexing is performed through the structured data to obtain the unstructured data generated by the target object when handling the target business; and the unstructured data is tamper-proof checked to obtain an anti-tampering check result of the unstructured data.

[0007] In one of the embodiments, the unstructured data includes first unstructured data and second unstructured data; data indexing is performed on the structured data to obtain the unstructured data generated by the target object when handling the target business, including: determining the terminal device when the target object handles the target business, and the business function component corresponding to the target business; data indexing is performed on the terminal device and the business function component respectively through the structured data to obtain the first unstructured data stored in the terminal device and the second unstructured data stored in the business function component.

[0008] In one of the embodiments, the unstructured data includes file data and video data; performing tamper-proof verification on the unstructured data to obtain an anti-tampering verification result of the unstructured data, including: obtaining a pre-stored business file of the target business, and performing consistency comparison between the file data and the pre-stored business file to obtain a file consistency comparison result; extracting multiple image frames in the video data, and reconstructing each image frame to obtain a reconstruction error corresponding to each image frame; comparing the reconstruction error with a video reconstruction threshold to obtain a video error comparison result; and using the file consistency comparison result and the video error comparison result together as the tamper-proof verification result of the unstructured data.

[0009] In one of the embodiments, when the anti-tampering check result indicates that the business data has not been tampered with, based on the business type of the business data, a hash processing rule that matches the business type is queried, including: when the file consistency comparison result indicates consistency and the reconstruction error is less than the video reconstruction threshold, based on the business type of the business data, determining the importance of the business data; and screening out a hash processing rule that matches the importance from multiple candidate processing rules.

[0010] In one of the embodiments, the method also includes: in response to a call instruction for business data initiated by the caller, re-hashing the business data to obtain a second hash value of the business data; sending a request signal carrying a proof identifier to the blockchain, and receiving a first hash value matching the proof identifier returned by the blockchain based on the request signal; and when the first hash value is consistent with the second hash value, sending the business data to the caller.

[0011] In the second aspect, the present application also provides a data evidence storage device based on blockchain. The device includes: an anti-tampering verification module, which is used to respond to the evidence storage instruction of the business data generated by the target object when handling the target business, to perform anti-tampering verification on the business data, and obtain the anti-tampering verification result of the business data; a query module, which is used to query and obtain the hash processing rules matching the business type based on the business type of the business data when the anti-tampering verification result indicates that the business data has not been tampered with; a hash processing module, which is used to perform hash processing on the business data according to the hash processing rule to obtain the first hash value of the business data; a blockchain module, which is used to upload the first hash value to the blockchain, and receive the evidence identification returned by the blockchain after the blockchain stores the first hash value; the evidence identification is used to request the first hash value from the blockchain when receiving the call instruction for the business data.

[0012] In one of the embodiments, the business data includes structured data and unstructured data; the tamper-proof verification module also includes: a data acquisition unit, which is used to respond to the evidence storage instruction for the business data generated by the target object when handling the target business, and obtain the structured data generated by the target object when handling the target business; a data indexing unit, which is used to perform data indexing through structured data to obtain the unstructured data generated by the target object when handling the target business; and an anti-tampering verification unit, which is used to perform tamper-proof verification on the unstructured data to obtain the tamper-proof verification result of the unstructured data.

[0013] In one of the embodiments, the unstructured data includes first unstructured data and second unstructured data; the data index unit is also used to: determine the terminal device when the target object handles the target business, and the business function component corresponding to the target business; through the structured data, perform data indexing in the terminal device and the business function component respectively, and obtain the first unstructured data stored in the terminal device and the second unstructured data stored in the business function component.

[0014] In one of the embodiments, the unstructured data includes file data and video data; the anti-tampering verification unit is further used to: obtain a pre-stored business file of the target business, compare the file data with the pre-stored business file for consistency, and obtain a file consistency comparison result; extract multiple image frames in the video data, reconstruct each image frame separately, and obtain a reconstruction error corresponding to each image frame; compare the reconstruction error with a video reconstruction threshold to obtain a video error comparison result; and use the file consistency comparison result and the video error comparison result together as the anti-tampering verification result of the unstructured data.

[0015] In one of the embodiments, the query module is also used to: determine the importance of the business data based on the business type of the business data when the file consistency comparison result indicates consistency and the reconstruction error is less than the video reconstruction threshold; and filter out a hash processing rule that matches the importance from multiple candidate processing rules.

[0016] In one of the embodiments, the device is also used to: in response to a call instruction for business data initiated by the caller, re-hash the business data to obtain a second hash value of the business data; send a request signal carrying a proof identifier to the blockchain, and receive a first hash value matching the proof identifier returned by the blockchain based on the request signal; and send the business data to the caller when the first hash value is consistent with the second hash value.

[0017] In the third aspect, the present application also provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program: in response to the evidence storage instruction for the business data generated by the target object when handling the target business, the business data is tamper-proof checked to obtain the tamper-proof check result of the business data; when the tamper-proof check result indicates that the business data has not been tampered with, based on the business type of the business data, a hash processing rule matching the business type is queried; according to the hash processing rule, the business data is hashed to obtain a first hash value of the business data; the first hash value is uploaded to the blockchain, and the evidence identification returned by the blockchain after the first hash value is stored; the evidence identification is used to request the first hash value from the blockchain when receiving the call instruction for the business data.

[0018] In a fourth aspect, the present application also provides a computer-readable storage medium. A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented: in response to a storage instruction for business data generated by a target object when handling a target business, the business data is tamper-proof checked to obtain a tamper-proof check result for the business data; when the tamper-proof check result indicates that the business data has not been tampered with, based on the business type of the business data, a hash processing rule matching the business type is queried; according to the hash processing rule, the business data is hashed to obtain a first hash value of the business data; the first hash value is uploaded to a blockchain, and a storage identifier returned by the blockchain after the first hash value is stored; the storage identifier is used to request the first hash value from the blockchain when a call instruction for the business data is received.

[0019] In a fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program, which implements the following steps when executed by a processor: in response to a storage instruction for business data generated by a target object when handling a target business, perform tamper-proof verification on the business data to obtain a tamper-proof verification result of the business data; when the tamper-proof verification result indicates that the business data has not been tampered with, query and obtain a hash processing rule that matches the business type based on the business type of the business data; perform hash processing on the business data according to the hash processing rule to obtain a first hash value of the business data; upload the first hash value to a blockchain, and receive a storage identifier returned by the blockchain after the blockchain stores the first hash value; the storage identifier is used to request the first hash value from the blockchain when receiving a call instruction for the business data.

[0020] The above-mentioned blockchain-based data storage method, device, computer equipment, storage medium and computer program product, in response to the storage instruction for the business data generated by the target object when handling the target business, first performs anti-tampering verification on the business data to ensure that the business data has not been tampered with before being uploaded to the blockchain for storage. In the case that the business data has not been tampered with, based on the business type of the business data, a hash processing rule matching the business type is queried, so that the business data is hashed using the hash processing rule to obtain the first hash value of the business data. By using a suitable hash processing rule to hash the business data, the accuracy of the hash value can be improved. Finally, the first hash value is uploaded to the blockchain for the blockchain to store the first hash value, and the storage identifier returned by the blockchain after the completion of the storage is received. The storage identifier can be used to request the first hash value from the blockchain when receiving a call instruction for the business data, and calculate the current second hash value of the business data. When the first hash value is consistent with the second hash value, it means that the business data has not been tampered with, and the business data is sent to the caller. In this way, on the one hand, this application uses blockchain technology to complete the storage of business data, ensuring that the hash value of the business data after being uploaded to the chain is witnessed by consensus and cannot be tampered with, ensuring the validity of the business data, and will pre-check the business data for tampering before uploading it to the chain to ensure that the business data has not been tampered with before uploading it to the chain, improving the accuracy of the business data, and using appropriate hash processing rules to hash the business data to improve the accuracy of the hash processing, thereby improving the accuracy of the entire business data storage, and then improving the credibility of the business data. On the other hand, the blockchain of this application only stores the hash value of the business data, which can ensure that the business data does not leak out and ensure the security of the business data. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is an application environment diagram of a blockchain-based data evidence storage method in one embodiment;

[0022] Figure 2 The present invention is a flowchart of a data storage method based on blockchain in one embodiment;

[0023] Figure 3 is a schematic diagram of a consensus algorithm in one embodiment;

[0024] Figure 4 The figure is a schematic diagram of the anti-tampering verification process of unstructured data in one embodiment;

[0025] Figure 5 A schematic diagram of an indexing process for unstructured data in one embodiment;

[0026] Figure 6 It is a schematic diagram of the anti-tampering verification process of unstructured data in another embodiment;

[0027] Figure 7 A schematic diagram of a matching process of a hash processing rule in an embodiment;

[0028] Figure 8 A schematic diagram of a calling process of business data in an embodiment;

[0029] Fig. 9 This is an application architecture diagram of a data storage method based on blockchain in a specific embodiment;

[0030] Fig.10 A flowchart of a data evidence storage method based on blockchain in a specific embodiment;

[0031] Fig.11 This is a structural block diagram of a data evidence storage device based on blockchain in one embodiment;

[0032] Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application 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 application and are not used to limit the present application. It should be noted that in the embodiments of the present application, certain software, groups, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0034] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations. The acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with relevant provisions of national laws and regulations.

[0035] With the development of the Internet and big data, more and more companies are gradually shifting their businesses from offline to online, which not only improves the convenience of business processing, but also further optimizes business management. For the electronic business data generated during the online processing, companies often need to store them in order to ensure the validity of these business data. At present, most companies use backup storage to store business data. However, this method still has the risk that a third party can use certain data processing software such as PS (Photoshop, image processing) software to tamper with business data, thereby affecting the validity of business data, which in turn leads to low credibility of current business data.

[0036] The blockchain-based data storage method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network, and the server 104 is connected to the blockchain 106. Specifically, the server 104 responds to the evidence storage instruction initiated by the terminal 102 for the business data generated by the target object when handling the target business, performs tamper-proof verification on the business data, and obtains the tamper-proof verification result of the business data; when the tamper-proof verification result indicates that the business data has not been tampered with, based on the business type of the business data, query and obtain the hash processing rule matching the business type; according to the hash processing rule, the business data is hashed to obtain the first hash value of the business data; the first hash value is uploaded to the blockchain 106, and the evidence storage identifier returned by the blockchain 106 after the first hash value is stored; the evidence storage identifier is used to request the first hash value from the blockchain 106 when receiving the call instruction for the business data. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and Internet of Things devices. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0037] In one embodiment, Figure 2 As shown in the figure, a data storage method based on blockchain is provided, which is applied to Figure 1 Taking the server 104 in the example as an example, the following steps are included:

[0038] Step S202, in response to the instruction to store the business data generated by the target object when handling the target business, perform anti-tampering verification on the business data to obtain an anti-tampering verification result of the business data.

[0039] Among them, the target object refers to the object that handles the target business. The target business includes but is not limited to deposits, withdrawals, resource borrowing, balance inquiries, etc. Business data refers to the relevant data generated by the target object in the process of handling the target business, and business data includes structured data and unstructured data. Structured data, also known as row data, refers to data that can be logically expressed and implemented by a two-dimensional table structure, strictly follows the data format and length specifications, and is stored and managed through a relational database. Unstructured data refers to data with irregular or incomplete data structure, no predefined data, and is not convenient to store in a two-dimensional logical table of a database. Evidence instructions refer to instructions for storing business data on the blockchain. Tamper-proof verification refers to the process of verifying whether business data has been tampered with before being stored. The tamper-proof check result is used to characterize whether the business data has been tampered with before the evidence is stored. It can be understood that blockchain evidence storage is to ensure that the data uploaded to the blockchain is not tampered with. However, in actual applications, the business data is still at risk of being tampered with during the process of being generated and uploaded to the chain. Therefore, in order to ensure that the business data uploaded to the blockchain is accurate, this embodiment chooses to perform an anti-tampering check on the business data before storing the evidence, thereby ensuring the accuracy of the evidence.

[0040] In one example, structured data includes but is not limited to tabular data in a relational database, data in a spreadsheet, and data in a fixed format such as the name, certificate, certificate type, business number, business type, and business handling timestamp of the target object. Unstructured data includes but is not limited to file data, video data, pictures, HTML (Hyper Text Markup Language) text, etc. In this application, what is uploaded to the blockchain is the hash value of the unstructured data, and the structured data can be used to query the unstructured data. Of course, in actual applications, the hash value of the structured data can also be stored in the blockchain according to demand.

[0041] Exemplarily, when the server receives the evidence storage instruction sent by the terminal, it obtains the business data generated by the target object indicated by the evidence storage instruction when handling the target business, and performs an anti-tampering check on the business data, that is, checks whether the business data has been tampered with, thereby obtaining the anti-tampering check result of the business data. The anti-tampering check result may include whether the business data has not been tampered with and whether the business data has been tampered with.

[0042] Step S204: When the anti-tampering verification result indicates that the business data has not been tampered with, based on the business type of the business data, query and obtain a hash processing rule that matches the business type.

[0043] Among them, the business type refers to the type of target business, which is used to characterize the importance of the target business, including important business and ordinary business. It can be understood that matching appropriate hash processing rules for different types of business can effectively improve the reliability of hash processing, thereby improving the reliability of the business data storage process. Hash processing rules refer to the pre-set number of hash processing times and multiple hash algorithms. The number of hash processing times refers to the number of times the business data is hashed. Hash algorithms include but are not limited to MD5 (Message-Digest Algorithm), SHA-1 (Secure Hash Algorithm 1), SHA-256 (Secure Hash Algorithm 256), SHA-512 (Secure Hash Algorithm 512), SHA-3 (Secure Hash Algorithm 3), etc. Each hash processing corresponds to a hash algorithm. For example, if the number of hash processing times is 3, then 3 different hash algorithms can be selected to hash the business data to obtain three hash values ​​of the business data. Important businesses can choose multiple hash processing times to further ensure their security, while ordinary businesses can choose fewer or one hash processing times.

[0044] Exemplarily, after the server obtains the anti-tampering check result of the business data, if the anti-tampering check result indicates that the business data has not been tampered with, it further determines whether the business data belongs to important business or ordinary business based on the business type of the business data, thereby matching the business data with an appropriate number of hash processing times and the corresponding hash algorithm for each hash processing. It should be noted that the hash algorithm used for each hash processing can be randomly assigned and non-repetitive, or a certain hash algorithm can be specified.

[0045] Step S206: Perform hash processing on the business data according to the hash processing rule to obtain a first hash value of the business data.

[0046] The first hash value refers to the value generated after hashing the business data.

[0047] Exemplarily, after the server matches the number of hash processing times and the hash algorithm used in each hash processing, it uses the hash algorithm to hash the business data to obtain the hash value of the business data. When the number of hash processing times is multiple, there are also multiple first hash values.

[0048] Step S208, upload the first hash value to the blockchain, and receive the evidence identifier returned by the blockchain after storing the first hash value; the evidence identifier is used to request the first hash value from the blockchain when a call instruction for business data is received.

[0049] Among them, blockchain is a distributed database, and its characteristic features are decentralization and immutability. Compared with conventional databases that can be modified in real time, the data in the blockchain database can only be appended but not modified, that is, blockchain is a database with immutable historical records. The call instruction refers to the request instruction initiated by the caller when it needs to call business data, in order to request the server to return business data.

[0050] Exemplarily, the server uploads the first hash value of the business data to the blockchain. After the blockchain receives the first hash value, it broadcasts the first hash value to all nodes through a consensus algorithm to ensure that the first hash value after being uploaded to the chain is witnessed by consensus and cannot be tampered with. And generate a storage identifier corresponding to the first hash value. In one example, the storage identifier can be a storage certificate or a storage number to indicate that the first hash value has been stored. The blockchain returns the storage identifier to the server. When the server subsequently receives a call instruction for business data initiated by the caller, it can send the storage identifier to the blockchain to request the first hash value from the blockchain, and at the same time calculate the current hash value of the business data. By comparing the current hash value of the business data with the first hash value stored on the blockchain, it is determined whether the business data has been tampered with in the process from uploading to calling. If they are consistent, the server sends the business data to the caller.

[0051] In practical applications, PBFT (Practical Byzantine Fault Tolerance) can be used for consensus, which operates as a state machine, including node status and message status. Key nodes lead other nodes to process messages in a unified pace. Whether the message continues to migrate to the next state depends on how many nodes reach a consensus, and finally the message reaches the state of processing completion. Figure 3The figure shows a message processing diagram. The message state migration path is: request - pre-prepare message - prepare message - consensus (commit) - response (reply). C represents the user (Client). The client sends a request to the key node. The request begins to enter the processing stage. The master node participates in assigning a unique number to the request request, and the request request and the number together form a pre-prepare message and broadcast it to all members. All members receive the pre-prepare message and rely on the signature field to check whether the message comes from the master node. After confirming that it is correct, the request number and the signature of the node are combined into a prepare message and broadcast to all other members, indicating that they recognize the request number request and are ready. If all nodes receive the prepare message, they rely on the signature to check whether it is correct. If the number of prepare messages exceeds two-thirds of the total number of nodes, it is considered that the system has reached a consensus to recognize the request request and the request number, and broadcast the consensus to all nodes, indicating that the node can perform the request request business. If all nodes receive the consensus message, they will check whether the message is correct based on the signature. If the number of consensus messages exceeds one-third of all nodes, the business required by the request will be completed, and a response message will be constructed and directly replied to the user. The user will determine whether the system has completed the request based on whether it has received correct replies from more than one-third of the nodes.

[0052] In this embodiment, in response to the evidence storage instruction for the business data generated by the target object when handling the target business, the business data is firstly checked for tampering to ensure that the business data has not been tampered with before being uploaded to the blockchain for evidence storage. In the case that the business data has not been tampered with, based on the business type of the business data, the hash processing rule matching the business type is queried, and the business data is hashed using the hash processing rule to obtain the first hash value of the business data. By using the appropriate hash processing rule to hash the business data, the accuracy of the hash value can be improved. Finally, the first hash value is uploaded to the blockchain for the blockchain to store the first hash value, and the evidence identification returned by the blockchain after the completion of the evidence storage is received. The evidence identification can be used to request the first hash value from the blockchain when receiving the call instruction for the business data, and calculate the current second hash value of the business data. When the first hash value is consistent with the second hash value, it means that the business data has not been tampered with, and the business data is sent to the caller. In this way, on the one hand, this application uses blockchain technology to complete the storage of business data, ensuring that the hash value of the business data after being uploaded to the chain is witnessed by consensus and cannot be tampered with, ensuring the validity of the business data, and will pre-check the business data for tampering before uploading it to the chain to ensure that the business data has not been tampered with before uploading it to the chain, thereby improving the accuracy of the business data, and using appropriate hash processing rules to hash the business data to improve the accuracy of the hash processing, thereby improving the accuracy of the entire business data storage, and then improving the credibility of the business data. On the other hand, the blockchain of this application only stores the hash value of the business data, not the source data of the business data, which can ensure that the business data does not leak out and ensure the security of the business data.

[0053] In one embodiment, Figure 4 As shown, in response to the evidence storage instruction for the business data generated by the target object when handling the target business, the business data is tamper-proof checked to obtain the tamper-proof check result of the business data, including:

[0054] Step S402, in response to the instruction to store the business data generated by the target object when handling the target business, obtain the structured data generated by the target object when handling the target business.

[0055] Exemplarily, when the server receives the evidence storage instruction sent by the terminal, it obtains the business identifier of the target object indicated by the evidence storage instruction when handling the target business, and then queries and obtains the structured data generated by the target object when handling the target business based on the business identifier. The business identifier can be a business number, business handling timestamp, etc.

[0056] Step S404, performing data indexing through structured data to obtain unstructured data generated by the target object when handling the target business.

[0057] Among them, data indexing refers to the query process of unstructured data. It is understandable that since unstructured data is irregular or incomplete and not predefined, it is difficult to query directly based on business identifiers. Therefore, in this embodiment, structured data is selected as an index to query unstructured data to improve query efficiency.

[0058] Exemplarily, after acquiring the structured data, the server uses the structured data as a data index, and based on the association relationship between the structured data and the unstructured data, queries to obtain the unstructured data corresponding to the structured data.

[0059] Step S406, performing tamper-proof verification on the unstructured data to obtain a tamper-proof verification result of the unstructured data.

[0060] Among them, unstructured data can be further divided into first unstructured data and second unstructured data according to the source. The first unstructured data refers to the unstructured data originating from the terminal device, and the second unstructured data refers to the unstructured data originating from the business function component corresponding to the target business.

[0061] Exemplarily, since the data uploaded to the blockchain is unstructured data, in this embodiment, the unstructured data is subjected to tamper-proof inspection. Specifically, the first unstructured data and the second unstructured data may be subjected to tamper-proof inspection respectively, so as to obtain the tamper-proof inspection results of each of the first unstructured data and the second unstructured data.

[0062] In this embodiment, structured data is used as a data index to query the unstructured data of the target business, thereby performing anti-tampering verification on the unstructured data, thereby improving the query efficiency of the unstructured data and thus improving the verification efficiency of the anti-tampering verification.

[0063] In one embodiment, Figure 5 As shown, by indexing the structured data, the unstructured data generated by the target object when handling the target business is obtained, including:

[0064] Step S502, determining the terminal device used by the target object when handling the target service, and the service function component corresponding to the target service.

[0065] Step S504: data indexing is performed in the terminal device and the business function component respectively through the structured data to obtain the first unstructured data stored in the terminal device and the second unstructured data stored in the business function component.

[0066] Among them, the terminal devices are object-side devices and business-side devices. The object-side devices refer to the terminal devices used by the target object to handle business, and the business-side devices refer to the terminal devices corresponding to the server, which are terminal devices that provide business handling for the target object. Business function components refer to the functional components deployed with the target business, and the target object can perform various business interactions in the functional components. It can be understood that both the terminal devices and the business function components will generate corresponding business data. For example, in the terminal devices, the operation logs and identity identification data of the target object can be generated, while the business function components can generate key credentials for business handling, such as electronic contracts, credentials for completion of business handling, etc.

[0067] Exemplarily, the server locates the terminal device when the target object handles the target business, and the business function component deployed with the target business, so as to query the first unstructured data stored in the terminal device from the terminal device based on the structured data, and query the second unstructured data stored in the business function component from the business function component based on the structured data.

[0068] In this embodiment, the integrity and accuracy of the unstructured data are ensured by obtaining the stored unstructured data from different data sources, namely, terminal devices and business function components, thereby ensuring the accuracy of subsequent evidence storage.

[0069] In one embodiment, Figure 6 As shown, the unstructured data is tamper-proof checked to obtain the tamper-proof check result of the unstructured data, including:

[0070] Step S602: obtaining a pre-stored service file of the target service, performing a consistency comparison between the file data and the pre-stored service file, and obtaining a file consistency comparison result.

[0071] Among them, unstructured data includes file data and video data. File data refers to the electronic files generated by the target object in the process of handling the target business, including but not limited to electronic contracts, certificates when the business is completed, the target object's electronic signature, operation logs, etc. Video data refers to the video of the target object handling the target business, which records the entire process of the target object handling the target business, especially the process of the target object performing identity authentication, such as face recognition, iris recognition or voice recognition. Pre-stored business files refer to pre-stored standard business files for the target business, such as standard contracts. The file consistency comparison results are used to characterize the consistency between file data and pre-stored business files.

[0072] Exemplarily, the server obtains the relevant standard business files of the pre-stored target business, and compares the data content in the file data with the data content in the standard business files to verify whether the two are consistent. If the data content in the file data is consistent with the data content in the standard business files, that is, the file data is consistent with the pre-stored business files, it means that the file data has not been tampered with. If the data content in the file data is inconsistent with the data content in the standard business files, that is, the file data is inconsistent with the pre-stored business files, it means that the file data has been tampered with.

[0073] Step S604: extract multiple image frames from the video data, reconstruct each image frame respectively, and obtain a reconstruction error corresponding to each image frame.

[0074] Here, an image frame refers to a single picture that constitutes the video data. Image reconstruction refers to the process of reconstructing each image frame based on its image features. Reconstruction error refers to the pixel difference between the reconstructed image frame and the original image frame in the video data.

[0075] Exemplarily, the server extracts multiple image frames from the video data, and obtains image features of each image frame, thereby reconstructing the image frame based on the image features to obtain a new image frame, and then compares the pixels of the new image frame with the pixels of the original image frame to obtain pixel differences.

[0076] Step S606, comparing the reconstruction error with the video reconstruction threshold to obtain a video error comparison result.

[0077] The video reconstruction threshold refers to the standard value of the reconstruction error. If it is lower than or equal to the threshold, it means that the image frame has not been tampered with. If it is higher than the threshold, it means that the image frame has been tampered with. The video error comparison result is used to indicate whether the image frame has been tampered with.

[0078] Exemplarily, after the server obtains the reconstruction error of each image frame, it compares the reconstruction error with the video reconstruction threshold. If the reconstruction error is lower than the video reconstruction threshold, it means that the image frame has not been tampered with. If the reconstruction errors of all image frames are lower than the video reconstruction threshold, it means that the video data has not been tampered with. If there is one or more image frames whose reconstruction error is higher than or equal to the video reconstruction threshold, it means that the video data has been tampered with.

[0079] Step S608: The file consistency comparison result and the video error comparison result are used together as the anti-tampering verification result of the unstructured data.

[0080] Exemplarily, the file consistency comparison result of the file data and the video error comparison result of the video data are used together as the anti-tampering inspection result of the non-structured data, and when the file consistency comparison result indicates consistency and the video error comparison result indicates that the reconstruction error is less than the video reconstruction threshold, the hash processing rule query is performed.

[0081] In this embodiment, whether the file data has been tampered with is determined by file consistency comparison, and whether the video data has been tampered with is determined by image reconstruction, which improves the accuracy of anti-tampering verification and thus improves the accuracy of subsequent evidence storage.

[0082] In one embodiment, Figure 7 As shown, when the anti-tampering verification result indicates that the business data has not been tampered with, based on the business type of the business data, a hash processing rule matching the business type is queried, including:

[0083] Step S702: when the file consistency comparison result indicates consistency and the reconstruction error is less than the video reconstruction threshold, the importance of the business data is determined based on the business type of the business data.

[0084] For example, when the file consistency comparison result indicates consistency, and the video error comparison result indicates that the reconstruction error is less than the video reconstruction threshold, it means that the business data has not been tampered with. Therefore, the server can obtain the business type of the business data and determine whether the business data belongs to important business or ordinary business, so as to determine the importance of the business data, and then query the hash processing rules according to the importance of the business data.

[0085] Step S704: Filter out a hash processing rule that matches the importance level from multiple candidate processing rules.

[0086] Exemplarily, the server selects a matching number of hash processing times from a plurality of pre-stored candidate hash processing times, and selects a matching hash algorithm from a plurality of pre-stored candidate hash algorithms, according to the importance of the business data.

[0087] In this embodiment, matching appropriate hash processing times and hash algorithms for different types of businesses can effectively improve the reliability of hash processing, thereby improving the reliability of the business data storage process.

[0088] In one embodiment, Figure 8 As shown, the calling process of business data includes:

[0089] Step S802, in response to a call instruction for business data initiated by the caller, the business data is hashed again to obtain a second hash value of the business data.

[0090] The second hash value refers to the current hash value of the business data, that is, the hash value obtained by hashing the business data again after the business data is stored.

[0091] For example, in actual applications, there are various callers, such as third-party organizations, who need to request business data from the server. At this time, in order to ensure that the business data has not been tampered with, the server can hash the business data again to obtain a new hash value, namely the second hash value. The second hash value is used to verify whether the business data after storage has been tampered with.

[0092] Step S804: Send a request signal carrying the evidence identifier to the blockchain, and receive a first hash value matching the evidence identifier returned by the blockchain based on the request signal.

[0093] The request signal is a signal used to request the blockchain to return the first hash value.

[0094] Exemplarily, the server sends the evidence identifier of the business data after it is stored to the blockchain. After receiving the evidence identifier, the blockchain queries for a first hash value that matches the evidence identifier and returns the first hash value to the server.

[0095] Step S806: When the first hash value is consistent with the second hash value, the business data is sent to the caller.

[0096] For example, after receiving the first hash value returned by the blockchain, the server compares the first hash value with the second hash value currently calculated by the server. If the two are consistent, it means that the business data has not been tampered with after being stored, and the business data can be sent to the caller. If the two are inconsistent, it means that the business data has been tampered with after being stored, and the business data cannot be sent to the caller.

[0097] In actual applications, if multiple hash algorithms are used to hash business data and multiple first hash values ​​are generated, the server also needs to use the multiple hash algorithms to hash the business data again during verification to obtain multiple second hash values, and perform a consistency comparison on the first hash value and the second hash value generated by each hash algorithm. If the first hash value and the second hash value generated by all hash algorithms are consistent, it means that the business data has not been tampered with after being stored.

[0098] In this embodiment, the situation that the business data is called by a third party is taken into consideration. In order to ensure that the business data sent to the third party is accurate, a new hash value is obtained by hashing again, and the hash value stored on the blockchain is compared with the new hash value. If they are consistent, it means that the business data has not been tampered with. This ensures the accuracy of the business data when it is called.

[0099] In a specific embodiment, the architecture scenario of the data storage method based on blockchain is as follows Fig. 9 As shown, it includes a channel integration layer (including the target terminal device for the target object to handle the business and the business terminal device corresponding to the server), a business service layer including a business function component and a business data call component, a business data evidence system, a blockchain and a data integration layer. Among them, the object terminal device and the business terminal device are used to store the first unstructured data generated by the target object when handling the target business, that is, the operation log and identity identification data of the target object, the business function component is used to store the second unstructured data generated by the target object when handling the target business, that is, the electronic contract and the voucher when the business handling is completed, and the business data call component is used to retrieve the evidence identification from the business data evidence system and send it to the blockchain when receiving the call instruction, and retrieve the business data from the business data evidence system and send it to the retrieval party. The business data evidence system is used to store the hash value generated by hashing the business data, and the evidence identification of the business data. The blockchain is used to store the hash value of the business data. The data integration layer is used to store unstructured data.

[0100] The process of the data storage method based on blockchain is as follows Fig.10 As shown, including the depository where the server is located, the business data depository system, the blockchain and the caller, the steps are as follows:

[0101] S1: The server of the evidence depositor responds to the evidence deposit instruction for the business data generated by the target object when handling the target business, obtains the structured data generated by the target object when handling the target business, and determines the target terminal device and the business terminal device corresponding to the server when the target object handles the target business, as well as the business function component corresponding to the target business. The structured data is indexed in the object terminal device, the business terminal device and the business function component respectively, and the unstructured data generated by the target object when handling the target business is obtained. The unstructured data includes file data and video data. The server obtains the pre-stored business file of the target business, compares the file data with the pre-stored business file for consistency, obtains the file consistency comparison result, and extracts multiple image frames from the video data, reconstructs each image frame respectively, obtains the reconstruction error corresponding to each image frame, compares the reconstruction error with the video reconstruction threshold, and obtains the video error comparison result. When the file consistency comparison result indicates consistency and the reconstruction error is less than the video reconstruction threshold, it means that the business data has not been tampered with, and the server sends the unstructured data to the business data evidence system.

[0102] S2: The business data notarization system determines the importance of the business data based on the business type of the business data, that is, whether the business data is important business data or ordinary business data, so as to screen out the hash processing rules that match the business data from multiple candidate processing rules, that is, the number of hash processing times and the corresponding hash algorithm, and then hash the business data based on the hash processing rules to obtain the first hash value of the business data.

[0103] S3: The business data evidence storage system uploads the first hash value to the blockchain and receives the evidence identification returned by the blockchain after the evidence storage is completed.

[0104] S4: When the business data notarization system receives a call instruction for business data sent by the caller, it hashes the business data again to obtain a second hash value of the business data, and sends a request signal carrying a notarization identifier to the blockchain, and receives a first hash value matching the notarization identifier returned by the blockchain based on the request signal.

[0105] S5: The business data notarization system compares the first hash value with the second hash value for consistency, and sends the business data to the caller if the two are consistent.

[0106] In this embodiment, in response to the evidence storage instruction for the business data generated by the target object when handling the target business, the business data is firstly checked for tampering to ensure that the business data has not been tampered with before being uploaded to the blockchain for evidence storage. In the case that the business data has not been tampered with, based on the business type of the business data, the hash processing rule matching the business type is queried, and the business data is hashed using the hash processing rule to obtain the first hash value of the business data. By using the appropriate hash processing rule to hash the business data, the accuracy of the hash value can be improved. Finally, the first hash value is uploaded to the blockchain for the blockchain to store the first hash value, and the evidence identification returned by the blockchain after the completion of the evidence storage is received. The evidence identification can be used to request the first hash value from the blockchain when receiving the call instruction for the business data, and calculate the current second hash value of the business data. When the first hash value is consistent with the second hash value, it means that the business data has not been tampered with, and the business data is sent to the caller. In this way, on the one hand, this application uses blockchain technology to complete the storage of business data, ensuring that the hash value of the business data after being uploaded to the chain is witnessed by consensus and cannot be tampered with, ensuring the validity of the business data, and will pre-check the business data for tampering before uploading it to the chain to ensure that the business data has not been tampered with before uploading it to the chain, improving the accuracy of the business data, and using appropriate hash processing rules to hash the business data to improve the accuracy of the hash processing, thereby improving the accuracy of the entire business data storage, and then improving the credibility of the business data. On the other hand, the blockchain of this application only stores the hash value of the business data, which can ensure that the business data does not leak out and ensure the security of the business data.

[0107] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0108] Based on the same inventive concept, the embodiment of the present application also provides a blockchain-based data storage device for implementing the blockchain-based data storage method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more blockchain-based data storage device embodiments provided below can refer to the limitations of the blockchain-based data storage method above, and will not be repeated here.

[0109] In one embodiment, Fig.11 As shown, a data evidence storage device based on blockchain is provided, including: an anti-tampering verification module 1102, which is used to respond to the evidence storage instruction of the business data generated by the target object when handling the target business, to perform anti-tampering verification on the business data, and obtain the anti-tampering verification result of the business data; a query module 1104, which is used to query and obtain a hash processing rule matching the business type based on the business type of the business data when the anti-tampering verification result indicates that the business data has not been tampered with; a hash processing module 1106, which is used to perform hash processing on the business data according to the hash processing rule, and obtain a first hash value of the business data; a blockchain module 1108, which is used to upload the first hash value to the blockchain, and receive the evidence identification returned by the blockchain after the blockchain stores the first hash value; the evidence identification is used to request the first hash value from the blockchain when a call instruction for the business data is received.

[0110] In one of the embodiments, the business data includes structured data and unstructured data; the tamper-proof verification module 1102 also includes: a data acquisition unit, which is used to respond to the evidence storage instruction for the business data generated by the target object when handling the target business, and obtain the structured data generated by the target object when handling the target business; a data indexing unit, which is used to perform data indexing through structured data to obtain the unstructured data generated by the target object when handling the target business; and an anti-tampering verification unit, which is used to perform tamper-proof verification on the unstructured data to obtain the tamper-proof verification result of the unstructured data.

[0111] In one of the embodiments, the unstructured data includes first unstructured data and second unstructured data; the data index unit is also used to: determine the terminal device when the target object handles the target business, and the business function component corresponding to the target business; through the structured data, perform data indexing in the terminal device and the business function component respectively, and obtain the first unstructured data stored in the terminal device and the second unstructured data stored in the business function component.

[0112] In one of the embodiments, the unstructured data includes file data and video data; the anti-tampering verification unit is further used to: obtain a pre-stored business file of the target business, compare the file data with the pre-stored business file for consistency, and obtain a file consistency comparison result; extract multiple image frames in the video data, reconstruct each image frame separately, and obtain a reconstruction error corresponding to each image frame; compare the reconstruction error with a video reconstruction threshold to obtain a video error comparison result; and use the file consistency comparison result and the video error comparison result together as the anti-tampering verification result of the unstructured data.

[0113] In one of the embodiments, the query module 1104 is also used to: determine the importance of the business data based on the business type of the business data when the file consistency comparison result indicates consistency and the reconstruction error is less than the video reconstruction threshold; and filter out a hash processing rule that matches the importance from multiple candidate processing rules.

[0114] In one of the embodiments, the device is also used to: in response to a call instruction for business data initiated by the caller, re-hash the business data to obtain a second hash value of the business data; send a request signal carrying a proof identifier to the blockchain, and receive a first hash value matching the proof identifier returned by the blockchain based on the request signal; and send the business data to the caller when the first hash value is consistent with the second hash value.

[0115] Each module in the above-mentioned blockchain-based data storage device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0116] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.12 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store blockchain-based data evidence data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data evidence method based on blockchain is implemented.

[0117] Those skilled in the art will understand that Fig.12The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0118] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: in response to a storage instruction for business data generated by a target object when handling a target business, performing tamper-proof verification on the business data to obtain an tamper-proof verification result for the business data; when the tamper-proof verification result indicates that the business data has not been tampered with, querying and obtaining a hash processing rule that matches the business type based on the business type of the business data; performing hash processing on the business data according to the hash processing rule to obtain a first hash value of the business data; uploading the first hash value to a blockchain, and receiving a storage identifier returned by the blockchain after storing the first hash value as a certificate; the storage identifier is used to request the first hash value from the blockchain when receiving a call instruction for the business data.

[0119] In one embodiment, when the processor executes the computer program, the following steps are also implemented: in response to an instruction to store business data generated by the target object when handling the target business, the structured data generated by the target object when handling the target business is obtained; data indexing is performed through the structured data to obtain the unstructured data generated by the target object when handling the target business; and anti-tampering verification is performed on the unstructured data to obtain the anti-tampering verification result of the unstructured data.

[0120] In one embodiment, when the processor executes the computer program, it also implements the following steps: determining the terminal device used by the target object when handling the target business, and the business function component corresponding to the target business; through structured data, performing data indexing in the terminal device and the business function component respectively, to obtain the first unstructured data stored in the terminal device, and the second unstructured data stored in the business function component.

[0121] In one embodiment, the processor also implements the following steps when executing the computer program: obtaining a pre-stored business file of the target business, performing consistency comparison between the file data and the pre-stored business file, and obtaining a file consistency comparison result; extracting multiple image frames from the video data, and reconstructing each image frame to obtain a reconstruction error corresponding to each image frame; comparing the reconstruction error with a video reconstruction threshold to obtain a video error comparison result; and using the file consistency comparison result and the video error comparison result together as an anti-tampering verification result for unstructured data.

[0122] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the file consistency comparison result indicates consistency and the reconstruction error is less than the video reconstruction threshold, the importance of the business data is determined based on the business type of the business data; and a hash processing rule that matches the importance is screened out from multiple candidate processing rules.

[0123] In one embodiment, the processor also implements the following steps when executing the computer program: in response to a call instruction for business data initiated by the caller, the business data is hashed again to obtain a second hash value of the business data; a request signal carrying a storage identifier is sent to the blockchain, and a first hash value matching the storage identifier is received and returned by the blockchain based on the request signal; and when the first hash value is consistent with the second hash value, the business data is sent to the caller.

[0124] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: in response to a storage instruction for business data generated by a target object when handling a target business, an anti-tampering check is performed on the business data to obtain an anti-tampering check result for the business data; when the anti-tampering check result indicates that the business data has not been tampered with, based on the business type of the business data, a hash processing rule matching the business type is queried; according to the hash processing rule, the business data is hashed to obtain a first hash value of the business data; the first hash value is uploaded to a blockchain, and a storage identifier returned by the blockchain after the blockchain stores the first hash value as a certificate; the storage identifier is used to request the first hash value from the blockchain when a call instruction for the business data is received.

[0125] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: in response to an instruction to store business data generated by the target object when handling the target business, the structured data generated by the target object when handling the target business is obtained; data is indexed through the structured data to obtain the unstructured data generated by the target object when handling the target business; and the unstructured data is tamper-proof checked to obtain the tamper-proof check result of the unstructured data.

[0126] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining the terminal device used by the target object when handling the target business, and the business function component corresponding to the target business; through structured data, performing data indexing in the terminal device and the business function component respectively, to obtain the first unstructured data stored in the terminal device, and the second unstructured data stored in the business function component.

[0127] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining a pre-stored business file of the target business, performing consistency comparison between the file data and the pre-stored business file, and obtaining a file consistency comparison result; extracting multiple image frames from the video data, and reconstructing each image frame respectively to obtain a reconstruction error corresponding to each image frame; comparing the reconstruction error with a video reconstruction threshold to obtain a video error comparison result; and using the file consistency comparison result and the video error comparison result together as an anti-tampering verification result for unstructured data.

[0128] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the file consistency comparison result indicates consistency and the reconstruction error is less than the video reconstruction threshold, the importance of the business data is determined based on the business type of the business data; and a hash processing rule that matches the importance is screened out from multiple candidate processing rules.

[0129] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: in response to a call instruction for business data initiated by the caller, the business data is hashed again to obtain a second hash value of the business data; a request signal carrying a storage identifier is sent to the blockchain, and a first hash value matching the storage identifier is received and returned by the blockchain based on the request signal; when the first hash value is consistent with the second hash value, the business data is sent to the caller.

[0130] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: in response to a storage instruction for business data generated by a target object when handling a target business, performing tamper-proof verification on the business data to obtain an tamper-proof verification result for the business data; when the tamper-proof verification result indicates that the business data has not been tampered with, querying and obtaining a hash processing rule that matches the business type based on the business type of the business data; performing hash processing on the business data according to the hash processing rule to obtain a first hash value of the business data; uploading the first hash value to a blockchain, and receiving a storage identifier returned by the blockchain after storing the first hash value as a certificate; the storage identifier is used to request the first hash value from the blockchain when receiving a call instruction for the business data.

[0131] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: in response to an instruction to store business data generated by the target object when handling the target business, the structured data generated by the target object when handling the target business is obtained; data is indexed through the structured data to obtain the unstructured data generated by the target object when handling the target business; and the unstructured data is tamper-proof checked to obtain the tamper-proof check result of the unstructured data.

[0132] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining the terminal device used by the target object when handling the target business, and the business function component corresponding to the target business; through structured data, performing data indexing in the terminal device and the business function component respectively, to obtain the first unstructured data stored in the terminal device, and the second unstructured data stored in the business function component.

[0133] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining a pre-stored business file of the target business, performing consistency comparison between the file data and the pre-stored business file, and obtaining a file consistency comparison result; extracting multiple image frames from the video data, and reconstructing each image frame respectively to obtain a reconstruction error corresponding to each image frame; comparing the reconstruction error with a video reconstruction threshold to obtain a video error comparison result; and using the file consistency comparison result and the video error comparison result together as an anti-tampering verification result for unstructured data.

[0134] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the file consistency comparison result indicates consistency and the reconstruction error is less than the video reconstruction threshold, the importance of the business data is determined based on the business type of the business data; and a hash processing rule that matches the importance is screened out from multiple candidate processing rules.

[0135] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: in response to a call instruction for business data initiated by the caller, the business data is hashed again to obtain a second hash value of the business data; a request signal carrying a storage identifier is sent to the blockchain, and a first hash value matching the storage identifier is received and returned by the blockchain based on the request signal; when the first hash value is consistent with the second hash value, the business data is sent to the caller.

[0136] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0137] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0138] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A data storage method based on blockchain, characterized in that: The method comprises: In response to an instruction to store business data generated by a target object when handling a target business, perform tamper-proof verification on the business data to obtain a tamper-proof verification result of the business data; When the anti-tampering verification result indicates that the business data has not been tampered with, based on the business type of the business data, query and obtain a hash processing rule that matches the business type; Performing hash processing on the business data according to the hash processing rule to obtain a first hash value of the business data; The first hash value is uploaded to the blockchain, and a storage identifier is received after the blockchain stores the first hash value; the storage identifier is used to request the first hash value from the blockchain when a call instruction for the business data is received.

2. The method according to claim 1, characterized in that The business data includes structured data and unstructured data; the response to the instruction for storing the business data generated by the target object when handling the target business, performing tamper-proof verification on the business data to obtain the tamper-proof verification result of the business data includes: In response to an instruction to store business data generated by a target object when handling a target business, obtaining structured data generated by the target object when handling the target business; Performing data indexing through the structured data to obtain unstructured data generated by the target object when handling the target business; Performing tamper-proof verification on the unstructured data to obtain an anti-tamper-proof verification result of the unstructured data.

3. The method according to claim 2, characterized in that The unstructured data includes first unstructured data and second unstructured data; the data indexing is performed through the structured data to obtain the unstructured data generated by the target object when handling the target business, including: Determine the terminal device used by the target object when handling the target service, and the service function component corresponding to the target service; Through the structured data, data indexing is performed in the terminal device and the business function component respectively to obtain the first unstructured data stored in the terminal device and the second unstructured data stored in the business function component.

4. The method according to claim 2, characterized in that: The unstructured data includes file data and video data; the tamper-proof verification of the unstructured data is performed to obtain the tamper-proof verification result of the unstructured data, including: Obtaining a pre-stored business file of the target business, performing a consistency comparison between the file data and the pre-stored business file, and obtaining a file consistency comparison result; Extracting a plurality of image frames from the video data, and reconstructing each of the image frames to obtain a reconstruction error corresponding to each of the image frames; Comparing the reconstruction error with a video reconstruction threshold to obtain a video error comparison result; The file consistency comparison result and the video error comparison result are used together as the anti-tampering verification result of the unstructured data.

5. The method according to claim 4, characterized in that When the anti-tampering check result indicates that the business data has not been tampered with, querying and obtaining a hash processing rule matching the business type based on the business type of the business data includes: When the file consistency comparison result indicates consistency and the reconstruction error is less than the video reconstruction threshold, determining the importance of the business data based on the business type of the business data; A hash processing rule matching the importance level is screened out from a plurality of candidate processing rules.

6. The method according to claim 1, characterized in that The method further comprises: In response to a call instruction initiated by a caller for the business data, performing hash processing on the business data again to obtain a second hash value of the business data; Sending a request signal carrying the evidence identification to the blockchain, and receiving a first hash value matching the evidence identification returned by the blockchain based on the request signal; When the first hash value is consistent with the second hash value, the business data is sent to the caller.

7. A data evidence storage device based on blockchain, characterized in that: The device comprises: The tamper-proof verification module is used to respond to the evidence storage instruction for the business data generated by the target object when handling the target business, perform tamper-proof verification on the business data, and obtain the tamper-proof verification result of the business data; A query module, configured to query and obtain a hash processing rule matching the business type based on the business type of the business data when the anti-tampering check result indicates that the business data has not been tampered with; A hash processing module, used to perform hash processing on the business data according to the hash processing rule to obtain a first hash value of the business data; A blockchain module is used to upload the first hash value to the blockchain and receive a storage identifier returned by the blockchain after storing the first hash value; the storage identifier is used to request the first hash value from the blockchain when a call instruction for the business data is received.

8. The device according to claim 7, characterized in that The business data includes structured data and unstructured data; the anti-tampering verification module also includes: a data acquisition unit, which is used to respond to the evidence storage instruction for the business data generated by the target object when handling the target business, and obtain the structured data generated by the target object when handling the target business; a data indexing unit, which is used to perform data indexing through the structured data to obtain the unstructured data generated by the target object when handling the target business; and an anti-tampering verification unit, which is used to perform tamper-proof verification on the unstructured data to obtain the tamper-proof verification result of the unstructured data.

9. The device according to claim 8, characterized in that The unstructured data includes first unstructured data and second unstructured data; the data index unit is also used to: determine the terminal device used by the target object when handling the target business, and the business function component corresponding to the target business; through the structured data, data indexing is performed in the terminal device and the business function component respectively to obtain the first unstructured data stored in the terminal device and the second unstructured data stored in the business function component.

10. The device according to claim 8, characterized in that The unstructured data includes file data and video data; the anti-tampering verification unit is also used to: obtain the pre-stored business file of the target business, compare the file data with the pre-stored business file for consistency, and obtain a file consistency comparison result; extract multiple image frames in the video data, reconstruct each image frame respectively, and obtain a reconstruction error corresponding to each image frame; compare the reconstruction error with a video reconstruction threshold to obtain a video error comparison result; and use the file consistency comparison result and the video error comparison result together as the anti-tampering verification result of the unstructured data.

11. The device according to claim 10, characterized in that The query module is also used to: determine the importance of the business data based on the business type of the business data when the file consistency comparison result indicates consistency and the reconstruction error is less than the video reconstruction threshold; and filter out a hash processing rule that matches the importance from multiple candidate processing rules.

12. The device according to claim 7, characterized in that The device is also used to: in response to a call instruction initiated by a caller for the business data, re-hash the business data to obtain a second hash value of the business data; send a request signal carrying the evidence identifier to the blockchain, and receive a first hash value matching the evidence identifier returned by the blockchain based on the request signal; and when the first hash value is consistent with the second hash value, send the business data to the caller.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Data processing method and device, electronic equipment and computer readable storage medium

    CN119577812A

  • Data information storage method and system based on block chain technology

    CN120578721A

  • A data information storage method and system based on blockchain technology

    CN120578721B

  • Live broadcast stream scheduling method, apparatus and device, and computer readable storage medium

    CN121397276A

  • Live streaming scheduling method, apparatus and device, and computer readable storage medium

    CN121397276B