High-performance evidence data storage method based on trusted chain

By using shadow library and distributed storage technology in the blockchain network, the performance bottleneck problem of traditional architecture under high concurrency and large data volume is solved, and efficient, reliable and secure data storage and processing are achieved.

CN117370459BActive Publication Date: 2024-09-13广州新赫信息科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311294028.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-08
Publication Date
2024-09-13
Estimated Expiration
2043-10-08

AI Technical Summary

Technical Problem

The performance of traditional relational databases and blockchain architectures decreases when the amount of data is large or concurrent access is high, and the unstructured storage of blockchain data results in complex and inefficient queries.

Method used

Adopt a high-performance evidence-based data storage method based on the trusted chain. By defining the data table structure of the shadow library, a unique key value gene is generated and stored on the chain. It is combined with the blockchain network for data sharding and distributed storage, and uses distributed It uses traditional computing and storage technologies for parallel processing and provides a data recovery mechanism.

Benefits of technology

It improves the concurrent processing capability and throughput of data, reduces the load pressure of traditional architecture, improves data processing efficiency and response speed, and enhances scalability, performance, availability, fault tolerance and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117370459B
    Figure CN117370459B
Patent Text Reader

Abstract

The present invention discloses a high-performance evidence data storage method based on a trusted chain, the method comprising: defining data table structure field information of a shadow library, the data table structure field information comprising a unique key gene, a parent key value, a channel name, a smart contract name and a hash value of evidence content data; receiving a data content evidence request with request parameters, obtaining structured data and evidence content constituted by the request parameters; generating a unique key gene, and simultaneously uploading the unique key gene and the structured data constituted by the request parameters and the evidence content to a blockchain network channel account book; monitoring the blockchain network block height, mapping the returned unique key gene with the shadow library sub-table name, storing the unique key gene, the parent key value, the channel name, the smart contract name and the hash value of the evidence content data in the data sub-table corresponding to the shadow library; receiving a data processing request from a client to process the data content, the data processing request comprising a data retrieval request and a data recovery request.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a high-performance evidence data storage method based on a trusted chain. Background Art

[0002] In traditional relational database and blockchain architecture, data is usually stored in a single relational database table and a single blockchain channel ledger. However, when the amount of data increases or the number of concurrent accesses increases, a single relational database table and a single blockchain channel ledger may become a performance bottleneck.

[0003] As all industries attach more and more importance to the security and reliability of data, it is inevitable to store data on blockchain. More and more different business data and huge data of each type of business are stored on the chain. However, as the amount of data stored in a single-channel smart contract ledger of the blockchain network increases, the storage and query performance decreases. Blockchain data is usually stored in the blockchain network in an unstructured way, and full-link query of specific data becomes complicated and inefficient. Summary of the invention

[0004] In order to solve the above technical problems, the first aspect of the present invention discloses a high-performance evidence data storage method based on a trusted chain, the method comprising:

[0005] Define the data table structure field information of the shadow library, which includes the unique key value gene, parent key value, channel name, smart contract name and hash value of the evidence content data;

[0006] Receiving a data content evidence storage request with request parameters, and obtaining structured data and evidence storage content constituted by the request parameters;

[0007] Generate a unique key-value gene, and upload the structured data consisting of the unique key-value gene and the request parameters and the evidence content to the blockchain network channel account book at the same time;

[0008] Monitor the block height of the blockchain network, map the returned unique key value gene with the name of the shadow library sub-table, and store the unique key value gene, parent key value, channel name, smart contract name and the hash value of the evidence content data into the data sub-table corresponding to the shadow library;

[0009] Receive data from the client and process the data content. The data processing includes data retrieval request, data verification request and data recovery request.

[0010] In one embodiment, after receiving a data content evidence request with request parameters, when generating a unique key gene, the unique key gene is generated according to a combination of a hash value of the shadow library table name, a timestamp, and a UUID random number.

[0011] In one embodiment, the data request parameters include a channel type, stored content data, and a parent key value; when obtaining the structured data and stored content formed by the request parameters, it also includes:

[0012] If the evidence data is uploaded to the chain for the first time, the default vertex is set, and the parent key value is set to 0. If the evidence data belongs to the child node of the content that has been uploaded to the chain, the parent key value is the same as the unique key value gene of the parent node of the last evidence content data;

[0013] Get the channel smart contract cache through the channel type and generate the channel name and smart contract name;

[0014] A blockchain network connection instance is constructed based on the channel name and the smart contract name.

[0015] In one embodiment, when monitoring the block height of the blockchain network, it also includes:

[0016] Monitor the blockchain network channel smart contract query to obtain the total amount of ledger data. When the total amount of data is greater than the preset delimiter, split the smart contract of the current channel, install a new smart contract, and refresh the trusted chain SDK channel smart contract cache to the latest smart contract, so that the latest evidence data is uploaded to the latest installed smart contract.

[0017] In one embodiment, the data retrieval request includes: based on the unique key value gene of the data retrieval request initiated by the client, using the shardingsphere sub-table component to match the sub-table that matches the hash value of the sub-table name in the unique key value gene, executing the query SQL to complete the pre-retrieval of the structured link data;

[0018] Build a blockchain network connection instance based on the channel name and smart contract name returned by the pre-search query, and query the stored content data of the smart contract of the blockchain channel based on the unique key value gene;

[0019] Combine the shadow library table link data with the blockchain evidence content data.

[0020] In one embodiment, the data verification request includes:

[0021] The hash algorithm SHA-256 is used to calculate the hash value of the unique key gene, channel name, smart contract name, and evidence content data for the result data of the table pre-operation;

[0022] The calculated hash value is compared with the structured hash value of the corresponding data in the channel ledger to verify whether the local structured data is consistent with the blockchain ledger data. When an abnormal retrieval result of data verification is found, the corresponding abnormal msg information is returned to indicate that the data has been tampered with, and the local sub-table data status is changed to tampered.

[0023] In one embodiment, the data recovery request includes:

[0024] By configuring the monitoring mechanism, the changes of the blockchain are monitored starting from the blockchain height of 1, and the data of the shadow library sub-table is restored starting from the data of the blockchain height of 1, and the data recovery interface is called to restore the data: a / recoveryData interface is provided for manually calling the data recovery operation. When the corresponding abnormal information is returned when retrieving the data, indicating that the data has been tampered with, the single data can be restored by calling this interface. When calling the data recovery interface, the interface will retrieve the blockchain ledger data again and update the latest data to the shadow library sub-table to realize the recovery of the tampered data.

[0025] A second aspect of the present invention discloses a high-performance data evidence storage device, the device comprising:

[0026] A definition module is used to define the data table structure field information of the shadow library, which includes the unique key value gene, parent key value, channel name, smart contract name, and hash value of the evidence content data;

[0027] A receiving module, which is used to receive a data content evidence storage request with request parameters, and obtain structured data and evidence storage content constituted by the request parameters;

[0028] A generation module is used to generate a unique key-value gene, and upload the structured data consisting of the unique key-value gene and the request parameters and the evidence content to the blockchain network channel account book at the same time;

[0029] The monitoring module is used to monitor the block height of the blockchain network, map the returned unique key value gene with the shadow library sub-table name, and store the unique key value gene, parent key value, channel name, smart contract name and the hash value of the evidence content data into the data sub-table corresponding to the shadow library;

[0030] The processing module is used to receive data processing from the client and process the data content. The data processing includes data retrieval request, data verification request and data recovery request.

[0031] The third aspect of the present invention discloses a high-performance data storage terminal, the terminal comprising:

[0032] A memory storing executable program code;

[0033] a processor coupled to the memory;

[0034] The processor calls the executable program code stored in the memory to execute part or all of the steps in the high-performance evidence data storage method based on a trusted chain disclosed in the first aspect of the present invention.

[0035] The fourth aspect of the present invention discloses a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute part or all of the steps in the high-performance evidence data storage method based on a trusted chain disclosed in the first aspect of the present invention.

[0036] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0037] In an embodiment of the present invention, data is distributed in multiple shadow library tables and blockchain channel ledgers to achieve data sharding and distributed storage. This can improve the concurrent processing capability and throughput of data, while reducing the load pressure of a single shadow library table and blockchain channel ledger in the traditional architecture. At the same time, the complex library chain also adopts distributed computing and storage technology to distribute data storage and processing tasks to multiple nodes for parallel processing. This can improve data processing efficiency and response speed. In addition, the complex library chain also provides a fault recovery mechanism for configuring monitoring height recovery data and calling data recovery interface to recover data, so as to improve data availability and fault tolerance. The method based on complex library chain combined with processing massive data evidence has the advantages of better scalability, performance, availability, fault tolerance, security and resource utilization compared with the traditional architecture. It is suitable for scenarios of large-scale data storage and processing, and can provide efficient, reliable and secure shadow library services. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0039] Figure 1 It is a flowchart of a high-performance evidence data storage method based on a trusted chain disclosed in an embodiment of the present invention;

[0040] Figure 2 This is an overall architecture diagram of a high-performance evidence data storage method based on a trusted chain disclosed in an embodiment of the present invention;

[0041] Figure 3It is a flowchart of a data retrieval request of a high-performance evidence data storage method based on a trusted chain disclosed in an embodiment of the present invention;

[0042] Figure 4 It is a structural schematic diagram of a high-performance data evidence storage device disclosed in an embodiment of the present invention;

[0043] Figure 5 It is a structural schematic diagram of a high-performance data evidence storage terminal disclosed in an embodiment of the present invention;

[0044] Figure 6 It is a structural schematic diagram of a computer storage medium disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0046] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or end including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or ends.

[0047] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0048] The present invention discloses a high-performance evidence data storage method based on a trusted chain, which realizes data sharding and distributed storage by distributing data in multiple shadow library tables and blockchain channel ledgers. This can improve the concurrent processing capability and throughput of data, while reducing the load pressure of a single shadow library table and blockchain channel ledger in the traditional architecture. At the same time, the complex library chain also adopts distributed computing and storage technology to distribute data storage and processing tasks to multiple nodes for parallel processing. This can improve the processing efficiency and response speed of data. In addition, the complex library chain also provides a fault recovery mechanism for configuring monitoring height recovery data and calling data recovery interface to recover data, so as to improve the availability and fault tolerance of data. The method based on complex library chain combined with processing of massive data evidence has the advantages of better scalability, performance, availability, fault tolerance, security and resource utilization compared with the traditional architecture. It is suitable for scenarios of large-scale data storage and processing, and can provide efficient, reliable and secure shadow library services. The following are detailed descriptions.

[0049] Embodiment 1

[0050] See also Figure 1 , Figure 1 This is a flowchart of a high-performance evidence data storage method based on a trusted chain disclosed in an embodiment of the present invention. Figure 1 and Figure 2 As shown, the high-performance evidence data storage method based on the trusted chain may include the following operations:

[0051] 101 defines the data table structure field information of the shadow library, wherein the data table structure field information includes a unique key value gene CHAIN_KEY, a parent key value PARENT_KEY, a channel name CHANNEL_NAME, a smart contract name CHAIN_NAME, and a hash value VALUE_HASH of the stored content data; specifically,

[0052] 102 receiving a data content evidence storage request with request parameters, and obtaining structured data and evidence storage content constituted by the request parameters;

[0053] 103 Generate a unique key value gene CHAIN_KEY. When generating the unique key value gene CHAIN_KEY, generate the unique key value gene according to the hash value of the shadow library table name, the timestamp, and the UUID random number combination. The structured data consisting of the unique key value gene CHAIN_KEY and the request parameters and the evidence content are simultaneously uploaded to the blockchain network channel account book;

[0054] 104 monitors the block height of the blockchain network, maps the returned unique key gene CHAIN_KEY with the hash value of the shadow library sub-table name, and stores the unique key gene CHAIN_KEY, parent key PARENT_KEY, channel name CHANNEL_NAME, smart contract name CHAIN_NAME and the hash value VALUE_HASH of the evidence content data into the data sub-table corresponding to the shadow library;

[0055] 105 receives data from the client and processes the data content. The data processing includes data retrieval request, data verification request and data recovery request.

[0056] In one embodiment, the data request parameters include a channel type TYPE, a stored content data VALUE, and a parent key value PARENT_KEY; wherein the parent key value PARENT_KEY is related to the client service and is called and judged by the client. When obtaining the structured data and stored content formed by the request parameters, it also includes:

[0057] If the evidence data is uploaded to the chain for the first time, it is assumed to be a vertex by default, and the parent key value PARENT_KEY is set to 0. If the evidence data belongs to a child node of the content that has been uploaded to the chain, the parent key value PARENT_KEY is the same as the unique key value gene CHAIN_KEY of the parent node of the last evidence content data;

[0058] Get the channel smart contract cache through the channel type and generate the channel name and smart contract name;

[0059] A blockchain network connection instance is constructed based on the channel name and the smart contract name.

[0060] Specifically, the shadow library performs chain operations on the same stored content data to form complete chain structured content data. As shown in the following table:

[0061]

[0062]

[0063] In one embodiment, when monitoring the block height of the blockchain network, it also includes:

[0064] Monitor the blockchain network channel smart contract query to obtain the total amount of ledger data. When the total amount of data is greater than the preset delimiter, split the smart contract of the current channel, install a new smart contract, and refresh the trusted chain SDK channel smart contract cache to the latest smart contract, so that the latest evidence data is uploaded to the latest installed smart contract. Specifically, all sub-tables are statistically operated through scheduled tasks. According to the data volume statistics, if the single table exceeds 5 million data, the SQL for creating a new sub-table is dynamically executed, and the trusted chain SDK evidence sub-table cache (HASH) is refreshed to the latest sub-table, so that the latest evidence data obtained through the trusted chain SDK listening program is saved in the latest sub-table.

[0065] like Figure 3 As shown, in one embodiment, the data retrieval request includes: based on the unique key value gene of the data retrieval request initiated by the client, using the shardingsphere sub-table component to match the sub-table that meets the hash value of the sub-table name in the unique key value gene, executing the query SQL to complete the pre-retrieval of the structured link data;

[0066] Build a blockchain network connection instance based on the channel name CHANNEL_NAME and the smart contract name CHAIN_NAME returned by the pre-search query, and query the stored content data of the smart contract of the blockchain channel based on the unique key value gene;

[0067] Combine the shadow library table link data with the blockchain evidence content data.

[0068] In one embodiment, the data verification request includes:

[0069] Use the hash algorithm SHA-256 to calculate the hash value VALUE_HASH of the unique key value gene CHAIN_KEY, channel name CHANNEL_NAME, smart contract name CHAIN_NAME, and the evidence content data for the result data of the table pre-operation;

[0070] The calculated hash value is compared with the structured hash value of the corresponding data in the channel ledger to verify whether the local structured data is consistent with the blockchain ledger data. When an abnormal retrieval result of data verification is found, the corresponding abnormal msg information is returned to indicate that the data has been tampered with, and the local sub-table data status is changed to tampered.

[0071] In one embodiment, the data recovery request includes:

[0072] By configuring the monitoring mechanism, the changes of the blockchain are monitored starting from the blockchain height of 1, and the data of the shadow library sub-table is restored starting from the data of the blockchain height of 1, and the data recovery interface is called to restore the data: a / recoveryData interface is provided for manually calling the data recovery operation. When the corresponding abnormal information is returned when retrieving the data, indicating that the data has been tampered with, the single data can be restored by calling this interface. When calling the data recovery interface, the interface will retrieve the blockchain ledger data again and update the latest data to the shadow library sub-table to realize the recovery of the tampered data.

[0073] The embodiments of the present invention have at least the following beneficial effects:

[0074] (1) The structured data describing the relationship between the evidence content data is stored in a relational database to manage these structured data. At the same time, the evidence content data and the structured data describing the relationship between the evidence content data are uploaded to the blockchain network system for storage, forming a shadow library that maps the structured data describing the relationship between the evidence content data on the blockchain to the local database storage. The library chain processing method that combines table and chain sharding and trusted chain synchronization technology is adopted to break through the performance bottleneck of the traditional architecture.

[0075] (2) Distribute data storage in multiple shadow database tables or blockchain network channel ledgers to reduce the load pressure of a single data table or ledger. By distributing data storage, the concurrent processing and query performance of the system can be improved.

[0076] (3) Trusted chain synchronization synchronizes the structured data describing the data relationship of the evidence content in the different channel ledgers of the blockchain network with the structured data stored in the shadow library, ensuring that the structured data in the blockchain network channel ledger data is consistent with the structured data in the shadow library data table.

[0077] It can be seen that implementation Figure 1The described high-performance evidence data storage method based on trusted chain realizes data sharding and distributed storage by distributing data in multiple shadow library tables and blockchain channel ledgers. This can improve the concurrent processing capability and throughput of data, while reducing the load pressure of a single shadow library table and blockchain channel ledger in the traditional architecture. At the same time, the complex library chain also adopts distributed computing and storage technology to distribute data storage and processing tasks to multiple nodes for parallel processing. This can improve the processing efficiency and response speed of data. In addition, the complex library chain also provides a fault recovery mechanism for configuring the monitoring height to recover data and calling the data recovery interface to recover data, so as to improve the availability and fault tolerance of data. Compared with the traditional architecture, the method based on complex library chain combined with processing massive data evidence has better scalability, performance, availability, fault tolerance, security and resource utilization. It is suitable for scenarios of large-scale data storage and processing, and can provide efficient, reliable and secure shadow library services. 。

[0078] Embodiment 2

[0079] See also Figure 4 , Figure 4 Schematic diagram of a high-performance data storage device disclosed in an embodiment of the present invention. Figure 4 As shown, the high-performance data evidence storage device may include:

[0080] Definition module 201, which is used to define the data table structure field information of the shadow library, wherein the data table structure field information includes a unique key value gene, a parent key value, a channel name, a smart contract name, and a hash value of the stored content data;

[0081] A receiving module 202 is used to receive a data content evidence storage request with request parameters, and obtain structured data and evidence storage content constituted by the request parameters;

[0082] A generation module 203 is used to generate a unique key value gene, and upload the structured data consisting of the unique key value gene and the request parameters and the evidence content to the blockchain network channel account book at the same time;

[0083] The monitoring module 203 is used to monitor the block height of the blockchain network, and map the returned unique key value gene with the shadow library sub-table name, and store the unique key value gene, parent key value, channel name, smart contract name and the hash value of the evidence content data into the data sub-table corresponding to the shadow library;

[0084] The processing module 205 is used to receive data processing from the client and process the data content. The data processing includes data retrieval request, data verification request and data recovery request.

[0085] For the specific description of the above-mentioned high-performance data storage device, please refer to the specific description of the above-mentioned high-performance evidence data storage method based on the trusted chain, which will not be repeated here.

[0086] Embodiment 3

[0087] See also Figure 5 , Figure 5 Schematic diagram of a high-performance data storage terminal disclosed in an embodiment of the present invention. Figure 5 As shown, the high-performance data storage terminal may include:

[0088] A memory 301 storing executable program codes;

[0089] a processor 302 coupled to the memory 301;

[0090] The processor 302 calls the executable program code stored in the memory 301 to execute the steps in the high-performance evidence data storage method based on the trusted chain disclosed in the first embodiment of the present invention.

[0091] Embodiment 4

[0092] See also Figure 6 , Figure 6 Schematic diagram of the structure of a computer storage medium disclosed in an embodiment of the present invention. Figure 6 As shown, an embodiment of the present invention discloses a computer storage medium 401, which stores computer instructions. When the computer instructions are called, they are used to execute the steps in the high-performance evidence data storage method based on a trusted chain disclosed in Embodiment 1 of the present invention.

[0093] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related 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 method for rapid repair by mixing SDK versions as described above. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0094] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to execute all or part of the methods of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, RAM, ROM, magnetic disks or optical disks.

[0095] Corresponding to the above-mentioned computer storage medium, in one embodiment, a computer device is also provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a high-performance evidence data storage method based on a trusted chain as in the above-mentioned embodiments is implemented.

[0096] The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 6As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. 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 high-performance evidence data storage method based on a trusted chain is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0097] 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.

[0098] The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.

[0099] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, a magnetic disk storage, a magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0100] Finally, it should be noted that the high-performance evidence data storage method based on a trusted chain disclosed in the embodiment of the present invention discloses only a preferred embodiment of the present invention, which is only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A high-performance evidence data storage method based on a trusted chain, characterized in that: The method comprises: Define the data table structure field information of the shadow library, which includes the unique key value gene, parent key value, channel name, smart contract name and hash value of the evidence content data; Receiving a data content evidence storage request with request parameters, and obtaining structured data and evidence storage content constituted by the request parameters; Generate a unique key gene, and upload the structured data consisting of the unique key gene and the request parameters and the evidence content to the blockchain network channel account book at the same time; after receiving the data content evidence request with the request parameters, when generating a unique key gene, generate the unique key gene according to the hash value of the shadow library table name, the timestamp and the UUID random number combination; Monitor the block height of the blockchain network, map the returned unique key value gene with the name of the shadow library sub-table, and store the unique key value gene, parent key value, channel name, smart contract name and the hash value of the evidence content data into the data sub-table corresponding to the shadow library; Receive data from the client and process the data content. The data processing includes data retrieval request, data verification request and data recovery request.

2. The high-performance evidence data storage method based on a trusted chain according to claim 1 is characterized in that: The request parameters include channel type, evidence content data and parent key value; when obtaining the structured data and evidence content formed by the request parameters, it also includes: If the evidence data is uploaded to the chain for the first time, it is set as the vertex by default, and the parent key value is set to 0. If the evidence data belongs to the child node of the content that has been uploaded to the chain, the parent key value is the same as the unique key value gene of the parent node of the last evidence content data; Get the channel smart contract cache through the channel type and generate the channel name and smart contract name; A blockchain network connection instance is constructed based on the channel name and the smart contract name.

3. The high-performance evidence data storage method based on a trusted chain according to claim 2 is characterized in that: When monitoring the blockchain network block height, it also includes: Monitor the blockchain network channel smart contract query to obtain the total amount of ledger data. When the total amount of data is greater than the preset delimiter, split the smart contract of the current channel, install a new smart contract, and refresh the trusted chain SDK channel smart contract cache to the latest smart contract, so that the latest evidence data is uploaded to the latest installed smart contract.

4. The high-performance evidence data storage method based on a trusted chain according to claim 2 is characterized in that: The data retrieval request includes: based on the unique key value gene of the data retrieval request initiated by the client, using the shardingsphere sub-table component to match the sub-table in the hash value of the sub-table name in the unique key value gene, executing the query SQL to complete the pre-retrieval of the structured link data; Build a blockchain network connection instance based on the channel name and smart contract name returned by the pre-search query, and query the stored content data of the smart contract of the blockchain channel based on the unique key value gene; Combine the shadow library table link data with the blockchain evidence content data.

5. The high-performance evidence data storage method based on a trusted chain according to claim 2 is characterized in that: The data verification request includes: The hash algorithm SHA-256 is used to calculate the hash value of the unique key gene, channel name, smart contract name, and evidence content data for the result data of the table pre-operation; The calculated hash value is compared with the structured hash value of the corresponding data in the channel ledger to verify whether the local structured data is consistent with the blockchain ledger data. When an abnormal retrieval result of data verification is found, the corresponding abnormal msg information is returned to indicate that the data has been tampered with, and the local sub-table data status is changed to tampered.

6. The high-performance evidence data storage method based on a trusted chain according to claim 2 is characterized in that: The data recovery request includes By configuring the monitoring mechanism, the changes of the blockchain are monitored starting from the blockchain height of 1, and the data of the shadow library sub-table is restored starting from the data of the blockchain height of 1, and the data recovery interface is called to restore the data: a / recoveryData interface is provided for manually calling the data recovery operation. When the corresponding abnormal information is returned when retrieving the data, indicating that the data has been tampered with, the single data can be restored by calling this interface. When calling the data recovery interface, the interface will retrieve the blockchain ledger data again and update the latest data to the shadow library sub-table to realize the recovery of the tampered data.

7. A high-performance data evidence storage device, characterized in that: The device comprises: A definition module is used to define the data table structure field information of the shadow library, which includes the unique key value gene, parent key value, channel name, smart contract name, and hash value of the evidence content data; A receiving module, which is used to receive a data content evidence storage request with request parameters, and obtain structured data and evidence storage content constituted by the request parameters; A generation module is used to generate a unique key-value gene, and upload the structured data consisting of the unique key-value gene and the request parameters and the evidence content to the blockchain network channel account book at the same time; The monitoring module is used to monitor the block height of the blockchain network, map the returned unique key value gene with the shadow library sub-table name, and store the unique key value gene, parent key value, channel name, smart contract name and the hash value of the evidence content data into the data sub-table corresponding to the shadow library; The processing module is used to receive data processing from the client and process the data content. The data processing includes data retrieval request, data verification request and data recovery request.

8. A high-performance data storage terminal, characterized in that: The terminal comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the high-performance evidence data storage method based on a trusted chain as described in any one of claims 1-6.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, the high-performance evidence data storage method based on the trusted chain as described in any one of claims 1 to 6 is implemented.