A blockchain PB level multi-modal data trusted query configuration method and system

By using Merkle Tree and B+ Tree to build intra-block indexes in the blockchain system, combined with incremental views and distributed index servers, the problem of index building and query efficiency in the processing of petabyte-level multimodal data in the blockchain system is solved, and efficient and reliable multimodal data query is achieved.

CN120179650BActive Publication Date: 2025-11-28JINAN SHENGAN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510310798.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-11-28
Estimated Expiration
2045-03-17

AI Technical Summary

Technical Problem

When processing petabyte-scale multimodal data, blockchain systems suffer from insufficient index building, high query complexity, and low query efficiency. In particular, they struggle to achieve efficient indexing and reliable traceability queries when processing unstructured data such as video, audio, and images.

Method used

It adopts a decentralized adaptive multi-level indexing mechanism, constructs intra-block indexes through Merkle Tree and B+ Tree, and dynamically adjusts the index table by combining incremental views and distributed index servers. It supports complex queries and traceability queries, and ensures the credibility of query results through hash verification.

Benefits of technology

It enables efficient index building and fast querying of petabyte-level multimodal data, improves query efficiency, supports query capabilities at the million-level per second, and ensures the authenticity and integrity of off-chain data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120179650B_ABST
    Figure CN120179650B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of blockchains, and discloses a method and system for trusted query of PB-level multi-modal data of a blockchain, which comprises the following steps: obtaining multi-modal on-chain data, and extracting metadata block-in-index of the multi-modal data; constructing a block index table based on a block ID, logically organizing the block index table, and adaptively and dynamically adjusting the block index table; constructing an index partition table for storing block index table identifiers and addresses; constructing a coarse-grained index model, quickly positioning the block index table in the index partition table according to a query condition, searching for an inverted index in the block index table, obtaining a block ID and a storage location, searching for block-in-index, querying specific data records, and verifying a hash path to realize trusted query of data. The application adopts a decentralized adaptive multi-level index mechanism, optimizes the decentralized query performance, supports complex query and traceability query operations such as connection and aggregation, and guarantees the effective credibility of query results through a trusted query algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of blockchains, in particular to a method and system for trusted query configuration of PB-level multi-modal data of a blockchain. BACKGROUND

[0002] The statements in this section merely provide background information related to the present application and do not necessarily constitute prior art.

[0003] A blockchain is a new computing paradigm that prevents data tampering through encryption, organizes multiple pieces of data in block granularity, stores blocks in a chain table appending mode, guarantees consistency through multiple block copies, and reaches a consensus on block integrity through transaction processing by all parties. It is mainly suitable for untrusted multi-party value exchange scenarios characterized by openness and sharing. According to the differences in the blockchain storage model, query capability, and transaction processing mechanism, it has mainly gone through three development stages of digital currency, smart contract, and smart society.

[0004] As the application focus of blockchain gradually shifts from digital currency to digital society, blockchain begins to play a positive role in the fields of digital government, healthcare, finance, and others, and will become an important enabling technology for improving the collaborative mode of the social economy in the future. However, as the basic core of a blockchain application system, blockchain storage and data management still have problems such as insufficient multi-modal data expression capability, poor storage model scalability, lack of complex query capability, and low transaction processing performance, which still have a large gap with the PB (Petabytes) level multi-modal data storage capability, million queries per second complex query and trusted traceability query, and tens of thousands of TPS (Transaction per second) transaction processing capability required by the digital society.

[0005] This means that blockchain data is no longer limited to numerical values, but theoretically supports more modalities such as text, sequence, video, etc. The introduction of multi-modal data such as video has rapidly increased the storage requirements of a single block, and the weakest storage capability of a full node is more likely to trigger a bottleneck. To address this challenge, blockchain systems mainly use an on-chain and off-chain storage architecture model to move data in the on-chain block to off-chain local storage or cloud storage, and reconstruct the on-chain index in the form of a "pointer" and synchronize it to a relational database, converting the query problem of a blockchain into the index and retrieval problem of a database, such as FabricSQL, BigChainDB, ChainSQL, TrustSQL, etc. Further, to support all parties to efficiently reach a consensus on query results, FISCO BCOS uses a deterministic transaction concurrency processing method based on DAG, and Changan Chain uses an optimistic transaction concurrency processing mechanism. However, the transaction processing capability of blockchain 2.0 is still only 20~1000TPS, and the total storage capacity rarely exceeds the PB level.

[0006] In summary, the current blockchain storage architecture model, data query mechanism and transaction processing mechanism are still in the initial stage in supporting PB-level multi-modal data storage, million queries per second of trusted query and 70,000 TPS transaction processing, and still face a large number of basic challenges. The main problems are as follows:

[0007] 1. Unable to adapt to the index construction of PB-level multi-modal data, lacking index construction methods for unstructured data such as video, audio and picture.

[0008] 2. Lack of efficient index construction method, the limited expression ability of K-V model leads to insufficient semantic description of blockchain data, making it difficult to support complex queries and unable to provide linkage query of blockchain block data and cloud storage data.

[0009] 3. Lack of fast query implementation method, unable to perform complex query, traceability query, etc. SUMMARY

[0010] In order to solve the above problems, the present application provides a trusted query configuration method and system for PB-level multi-modal data of blockchain, which adopts a decentralized adaptive multi-level index mechanism for PB-level multi-modal data, optimizes the decentralized query performance, supports complex queries such as connection and aggregation, and traceability query operations, and guarantees the effective and trusted query results through a trusted query algorithm.

[0011] In order to achieve the above purpose, the present application adopts the following technical solutions:

[0012] In a first aspect, the present application provides a trusted query configuration method for PB-level multi-modal data of blockchain, comprising the following steps:

[0013] Obtain multi-modal on-chain data and extract metadata of multi-modal data, construct intra-block index based on metadata using Merkle Tree, and optimize the constructed index using B+ tree;

[0014] Construct a block index table based on block ID, logically organize the block index table through incremental view, and adaptively dynamically adjust the block index table according to the changes of blockchain data;

[0015] Construct an index partition table according to the type of metadata, used to store block index table identifier and address;

[0016] Construct a coarse-grained index model, quickly locate the block index table to be queried in the index partition table according to the query condition, search the inverted index in the block index table according to the metadata to be queried, obtain the block ID and storage location, retrieve the intra-block index, query the specific data record, and verify the hash path to realize the trusted query of data.

[0017] As an alternative embodiment, the metadata of the multi-modal data is indexed based on the in-block index, specifically:

[0018] The metadata of the multi-modal data is indexed as a leaf node of the Merkle Tree, and the constructed index is optimized by using a B+ tree.

[0019] As an alternative embodiment, when extracting the metadata of the multi-modal data, the compressed feature code is processed by using a data truncation method.

[0020] As an alternative embodiment, a synchronous update rule is set for the in-block index, and batch processing is performed on the cached various types of basic framework data, intelligent sensing data and association relationship data in the memory, so as to avoid frequent write and update operations on the global index and the local index.

[0021] As an alternative embodiment, a Bloom filter or an encrypted multi-set accumulator is used to construct a coarse-grained index model.

[0022] As an alternative embodiment, the block index table is a reverse order index, and supports single column index, unique index, primary key index and cluster index.

[0023] In a second aspect, the present application provides a trusted query configuration system for PB-level multi-modal data of a block chain, comprising:

[0024] The in-block index construction module is configured to obtain multi-modal on-chain data, extract metadata of the multi-modal data, construct an in-block index based on the metadata by using a Merkle Tree, and optimize the constructed index by using a B+ tree.

[0025] The block index construction module is configured to construct a block index table based on a block ID, logically organize the block index table by using an incremental view, and dynamically adjust the block index table according to changes in the block chain data.

[0026] The partition index construction module is configured to construct an index partition table according to the type of the metadata, and store the block index table identifier and address.

[0027] The trusted query module is configured to construct a coarse-grained index model, quickly locate the block index table to be queried in the index partition table according to the query condition, search the inverted index in the block index table according to the metadata to be queried, obtain the block ID and storage location, retrieve the in-block index, query the specific data record, and verify the hash path to realize trusted query of the data.

[0028] In a third aspect, the present application provides an electronic device comprising a memory and a processor, and computer instructions stored in the memory and running on the processor, when the computer instructions are run by the processor, the method of the first aspect is completed.

[0029] In a fourth aspect, the present application provides a computer readable storage medium for storing computer instructions, when the computer instructions are executed by the processor, the method of the first aspect is completed.

[0030] In a fifth aspect, the present application provides a computer program product comprising a computer program, when the computer program is executed by the processor, the method of the first aspect is completed.

[0031] Compared with the prior art, the present application has the following beneficial effects:

[0032] 1、The present application provides a blockchain PB-level multi-modal data trusted query configuration method and system, innovatively proposes a multi-level index structure, and uses a verification chain to guarantee the trustworthiness of off-chain data, uses a hash self-learning algorithm to continuously optimize the index structure for multi-modal data, and provides a new idea for complex query and traceability query.

[0033] 2、The present application provides a blockchain PB-level multi-modal data trusted query configuration method and system, uses an improved Merkle Tree to provide fast query and trusted verification of in-block data, and uses a verification chain to store the hash value of off-chain data, to guarantee the authenticity and integrity of off-chain data.

[0034] The advantages of the additional aspects of the present application will be partially given in the following description, partially will become obvious from the following description, or will be known by the practice of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0035] The drawings accompanying the specification of the present application serve to provide a further understanding of the present application, the illustrative embodiments of the present application and the description thereof serve to explain the present application, and do not constitute an improper limitation of the present application.

[0036] Figure 1 An architecture diagram of a blockchain PB-level multi-modal data trusted query configuration method provided for the present application embodiment 1;

[0037] Figure 2 An adaptive index construction flowchart provided for the present application embodiment 1;

[0038] Figure 3 A multi-level index structure diagram provided for Embodiment 1 of the present application;

[0039] Figure 4 A trusted query mechanism for PB-level multi-modal data of a blockchain provided for Embodiment 1 of the present application. DETAILED DESCRIPTION

[0040] The present application will be further described below in conjunction with the accompanying drawings and embodiments.

[0041] It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the present application. Unless otherwise indicated, all technical and scientific terms used herein have the same meaning as would be commonly understood by one of ordinary skill in the art to which the present application belongs.

[0042] It should be noted that the terms used herein are only intended to describe specific embodiments and are not intended to limit exemplary embodiments according to the present application. As used herein, the singular form is intended to include the plural form unless the context clearly indicates otherwise, and it should be further understood that the terms "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device comprising a series of steps or units need not be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to such processes, methods, products, or devices.

[0043] The embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0044] Embodiment 1

[0045] As shown in Figure 1 The present embodiment provides a trusted query configuration method for PB-level multi-modal data of a blockchain, comprising the following steps:

[0046] S1, acquiring multi-modal on-chain data and extracting metadata of the multi-modal data, constructing an intra-block index based on the metadata using MerkleTree, and optimizing the constructed index using B+ tree;

[0047] S2, constructing a block index table based on a block ID, logically organizing the block index table through an incremental view, and adaptively dynamically adjusting the block index table according to changes in the blockchain data;

[0048] S3, constructing an index partition table according to the type of metadata, for storing block index table identifiers and addresses;

[0049] S4, a coarse-grained index model is constructed, the block index table to be queried is quickly located in the index partition table according to the query condition, the inverted index in the block index table is searched according to the metadata to be queried, the block ID and the storage location are obtained, the in-block index is retrieved, the specific data record is queried, and the hash path is verified, so that the trusted query of data is realized.

[0050] The application faces PB-level multi-modal data, provides an efficient index construction method and a fast query mechanism. A decentralized adaptive multi-level index construction model is proposed, including a sharding index, a block index and an in-block index, meeting the requirements of adaptive index construction and verifiable, designing metadata modeling of large-scale multi-modal data, logically organizing the index table through an incremental view, adaptively and dynamically adjusting the index table according to the change of transaction data, realizing efficient and trusted indexing of on-chain and off-chain data; a query expression based on multi-modal data is used, a trusted traceability query and optimization algorithm are designed, the query execution capability is improved, the query efficiency of millions per second is realized, and time window query, range query, keyword query and subscription query are supported.

[0051] A distributed index server is used: a multi-level verifiable index of sharding, block and in-block for on-chain blockchain data is established, and single index, multi-index and partition index in the chain are optimized, and the Bloom filter can greatly reduce the decentralized query delay; for the problem of trusted query of on-chain and off-chain data, a verification block chain storing the hash value of off-chain transaction data is established, and the authenticity and integrity of off-chain data are guaranteed through the verification of the hash value.

[0052] Supporting complex queries and trusted traceability: the multi-modal data is reduced and quantized, the data is mapped to a binary coding space through hashing, specific mode hash codes and multi-mode collaborative hash codes for different retrieval tasks are generated, and multi-keyword query, fuzzy query, Top-k query and the like are supported; the hierarchical index is verified, mainly including hash result verification, on-chain and off-chain data collaborative verification and encrypted multi-repeated accumulator.

[0053] The basic idea of the incremental index organization is: in order to more comprehensively take care of small, medium, large and extra-large operations, a plurality of organization modes can be adopted to constitute the physical structure of the file. If the size of the disk block is 1KB or 4KB, for small files, at most only 10 disk blocks will be occupied, in order to improve the access speed of a large number of small operations, it is best to put the address of each disk block of the file into the file control block FCB (or index node), so that the disk block address of the file can be obtained directly from the FCB. Generally, this addressing method is also called direct addressing. For medium files, a single-level index organization mode can be used. At this time, in order to obtain the disk block address of the file, only the index table of the file needs to be found from the FCB, and the disk block address can be obtained therefrom, which can be called once indirect addressing; for large and extra-large files, two-level and three-level index organization modes, or two-time indirect addressing and three-time indirect addressing, can be used. The so-called incremental index organization mode is based on the above basic idea, which adopts both direct addressing mode and single-level and multi-level index organization mode (indirect addressing).

[0054] According to the change of transaction data, the index table is dynamically adjusted, specifically: according to the characteristics of the data, the hash function is dynamically adjusted to reduce hash collision and improve the efficiency of the index; according to the growth and change of the data, the size of the index is dynamically adjusted to adapt to the newly added data, thereby reducing the hash conflict.

[0055] The method for constructing intra-block index based on metadata of multi-modal data:

[0056] The data storage space in the block of the blockchain is limited, and the PB-level multi-modal data needs to be processed cooperatively on and off the chain when stored, which brings great difficulty to the rapid query of the blockchain data. Adopting an index mechanism is an effective solution to improve the query performance. For multi-modal data, metadata needs to be extracted first. Metadata is used to describe contract data, transaction data, pictures, videos and other multi-modal data, which is the basis for constructing an index. By listening to the on-chain data to extract metadata, the metadata is used as a leaf node of the Merkle Tree to construct an intra-block index. By using B+, multi-ary tree and other optimization methods, a trusted data index establishment model is optimized to support and verify the multi-modal data query in the block. The specific steps are as shown in Figure 2 ,

[0057] (1) Metadata extraction, listen to multi-modal on-chain data, use hash method to map multi-modal data to binary coding space, in order to improve data processing efficiency, the compressed feature code can be truncated, such as using SM3 hash algorithm, output 16 bytes of feature code, the first 12 bytes can be used as feature code, the truncated feature code has the same effect of hash verification, while also preserving the similarity between data points, through dimension reduction and quantization expression method, use LPG (Labeled Property Graphs, labeled property graph) to abstractly express multi-modal data, mainly including four expression methods: node (data entity), relationship (connection between nodes), attribute (key value form exists between nodes and relationships), label (indicates the role and type of node) and the like.

[0058] (2) Data on-chain, metadata as Merkle Tree leaf node building block index, using B+, multi-way tree and other optimization methods, optimizing the trusted data index establishment model, realizing multi-modal data query support and trusted verification in the block.

[0059] (3) Block chain block index synchronization and update, pre-set synchronization update rules, batch process cached in memory various basic framework data, intelligent sensing data and association data, avoid frequent write and update operation of global index and local index.

[0060] (4) Combined with deep learning model, support multi-modal data query mode, convert different query tasks into specific mode hash code and multi-mode collaborative hash code, convert query conditions into metadata complex query, support multi-keyword query, fuzzy query, Top-k query and the like.

[0061] (5) For off-chain data, use verification chain to store off-chain data link address and hash value in the block chain, and store the position of the verification chain through the index table, the decentralized verification chain can guarantee the authenticity of the off-chain data hash value, and provide effective verification support for trusted query.

[0062] Multi-level index construction method:

[0063] In order to improve the retrieval performance, according to the type of block metadata, a multi-level index model is constructed, such as Figure 3The index partition table is first constructed according to the metadata type, and is used to store specific index table identifiers and addresses. A coarse-grained index model is constructed using a Bloom filter, an encrypted multi-set accumulator and other methods, and the index table that needs to be queried can be quickly located according to the query condition. Secondly, the index is dynamically constructed according to the block change, and an incremental index is used to construct a reverse sorting index. The index can be constructed based on keywords, feature codes and other metadata, and supports single-column index, unique index, primary key index and clustered index. The third-level index is the in-block index, which is optimized using a B+ tree.

[0064] A decentralized index server is used, which is independent of the blockchain. A distributed database is used to store the index table, and a multi-level verifiable index is established. The changes in the blockchain data are monitored, and the multi-level index table is dynamically updated and maintained. The query capability of the database is used to provide complex query functions based on SQL language. The specific steps are as follows:

[0065] (1) Construct a distributed index database. The index data is stored on multiple computers and processed cooperatively through the network. The parallel processing capability of multiple computers can significantly improve the efficiency of index construction and query. Select an appropriate data source and dynamically write the index into a distributed storage system such as Hadoop's HDFS (Hadoop Distributed File System).

[0066] (2) Main index construction. Create a table or view on the index data and define the index field in the distributed storage system for the main data. For example, Apache Hive can be used to create a Hive table to store data and create a main index based on a certain field (such as ID).

[0067] (3) Build an index partition table fast lookup model. A coarse-grained index model is designed using a Bloom filter. A binary vector (bit array) and a series of random mapping functions (SM3) are used to determine whether the index partition data is in a set. A Bloom filter is used to design a coarse-grained index model to provide efficient lookup and filtering functions for index partition data.

[0068] Initialization: Create a bit array and initialize all bits to 0. Select a set of independent keys K1, K2, K3 as the input of the random function for hash calculation, and select the SM3 algorithm as the hash function.

[0069] Insert partition index type: input the index type on the distributed index server, calculate its hash value using all hash functions, and set the bit in the bit array corresponding to the hash value position to 1.

[0070] Query index type: For each data type to be queried, calculate its hash value using all hash functions. Check if the bits at the corresponding hash value position in the bit array are all 1. If all bits are 1, it is considered that the element may exist (but there is a possibility of false positives); if any bit is 0, it is determined that the element does not exist. In this way, it can be quickly determined whether there is data to be retrieved on the distributed index server.

[0071] (4) Build index partition table, dynamically build according to block changes, use incremental index method, build reverse sorting index, index can be built based on keyword, feature code and other metadata, support single column index, unique index, primary key index and clustered index.

[0072] (5) Merkle Tree optimization, B+ tree is used to optimize the construction of block index within the blockchain, B+ tree is a self-balancing, ordered tree data structure, which can perform search, sequential access, insertion and deletion operations in 0 (log n) time complexity. B+ tree is widely used as an index structure in databases and file systems, which can effectively support range queries and sorting operations. The following is the construction process of B+ tree.

[0073] Select index column: select columns with high selectivity as index columns according to query requirements.

[0074] Create root node: take the first key value of the index column as the key of the root node, and create the corresponding pointer (if there is a child node).

[0075] Insert key value: for each key value to be inserted, search its insertion position from the root node. If the root node is not full, directly insert the key value. If the root node is full, split the node, assign the key value to two new nodes, and create a new parent node to store the middle key value of the split nodes.

[0076] Maintain balance: during the insertion process, if a node is split, the split result needs to be propagated upwards, which may cause the split of parent nodes. Through this split and propagation process, the B+ tree maintains its balance.

[0077] Delete key value: the deletion operation is similar to the insertion operation, but it needs to consider the merging of nodes. If the node becomes not full (below the minimum fill degree) after deletion, try to borrow values from sibling nodes or merge nodes to maintain balance.

[0078] The Merkle Tree is optimized using B+ tree to adapt to the storage and query of large-scale data, and each layer of the Merkle Tree is stored as an independent B+ tree node. For example, the hash value of each layer can be stored as a node, and these nodes can be stored in the B+ tree. In this way, the efficient query and range query capabilities of the B+ tree can be utilized. In each leaf node of the B+ tree, a pointer to the corresponding node in the Merkle Tree or a partial hash value is stored. In this way, the specific hash value can be quickly located, and the integrity of the data can be verified. The B+ tree is used to dynamically update the hash value of the Merkle Tree. When the data block changes, only the hash value of the corresponding node in the B+ tree needs to be updated, and then the hash value of the upper layer node is recalculated until the root node. In this way, unnecessary full tree reconstruction can be reduced. The specific steps are as follows:

[0079] (1) Construct the basic data structure: first, a B+ tree structure is established.

[0080] (2) Initialize the Merkle Tree: in each node of the B+ tree, the corresponding layer of the Merkle Tree is initialized.

[0081] (3) Data insertion and update: when a new data block is inserted or an existing data block is updated, the new hash value is calculated and the corresponding node in the B+ tree is updated.

[0082] (4) Query and verification: through the query function of the B+ tree, the specific Merkle Tree node is quickly located, and the integrity of the data is verified.

[0083] Use the constructed multi-level index to perform fast and reliable traceability query:

[0084] As shown in Figure 4 , use hash result verification, on-chain and off-chain data collaborative verification, and encrypted multi-set accumulator verification. First, according to the query condition, the block index table to be queried is quickly located in the index partition table; in the block index table, the inverted index is searched according to the metadata to be queried, and the block ID and storage location are located; according to the block ID and storage location, the block index is retrieved, the specific data record is queried, and the hash path is verified through the improved B+ tree to realize the reliable query of the block data; according to the off-chain data address of the block index table, the off-chain data is retrieved, and the on-chain hash value is queried and verified, and the integrity of the off-chain data is verified according to the on-chain hash value, and the on-chain and off-chain data are collaboratively and reliably queried. The specific query steps are as follows:

[0085] (1) Access the distributed index server, input keys k1, k2, k3 according to the type of the search data, distribute the hash result of SM3, and query the Bloom filter according to the hash result. If all the corresponding positions are 1, it means that the relevant index partition table is stored on the index server.

[0086] (2) Query the index partition table, quickly locate the block that meets the condition according to the query data, and verify the integrity of the on-chain data and off-chain data according to the hash value of the integrity check.

[0087] (3) Traverse the multi-modal data in the blockchain block, verify the integrity of the leaf node to the root node in the B+ tree, and return the query result.

[0088] Embodiment 2

[0089] The embodiment provides a trusted query configuration system for PB-level multi-modal data of a blockchain, comprising:

[0090] The in-block index construction module is configured to obtain multi-modal on-chain data and extract metadata of the multi-modal data, and construct an in-block index based on the metadata.

[0091] The block index construction module is configured to construct a block index table based on a block ID, logically organize the block index table in an incremental view, and dynamically adjust the block index table according to changes in the blockchain data.

[0092] The partition index construction module is configured to construct an index partition table according to the type of the metadata, and store the block index table identifier and address.

[0093] The trusted query module is configured to construct a coarse-grained index model, quickly locate the block index table to be queried in the index partition table according to the query condition, search the inverted index in the block index table according to the metadata to be queried, obtain the block ID and storage location, search the in-block index, query the specific data record, and verify the hash path to realize the trusted query of the data.

[0094] It should be noted that the above modules correspond to the steps described in Embodiment 1, and the above modules have the same examples and application scenarios as the corresponding steps, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer executable instructions.

[0095] In more embodiments, the following are also provided:

[0096] An electronic device includes a memory and a processor and computer instructions stored on the memory and running on the processor, when the computer instructions are run by the processor, the method described in embodiment 1 is completed. For the sake of brevity, it will not be repeated here.

[0097] It should be understood that in the embodiments, the processor can be a central processing unit CPU, and the processor can also be other general-purpose processors, digital signal processors DSPs, application-specific integrated circuits ASICs, ready-to-program gate arrays FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0098] The memory can include read-only memory and random access memory, and provide instructions and data to the processor, and a part of the memory can also include non-volatile random access memory. For example, the memory can also store device type information.

[0099] A computer readable storage medium for storing computer instructions, when the computer instructions are executed by the processor, the method described in embodiment 1 is completed.

[0100] The method in embodiment 1 can be directly embodied as a hardware processor to complete, or be executed by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register, etc. The storage medium is located in the memory, and the processor reads the information in the memory, and combines the hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.

[0101] A computer program product includes a computer program, which is executed by the processor to realize the method described in embodiment 1.

[0102] The present application also provides at least one computer program product tangibly stored on a non-transitory computer readable storage medium. The computer program product includes computer executable instructions, such as instructions included in program modules, which are executed in devices on real or virtual processors of targets to perform processes / methods as described above. Generally, program modules include routines, programs, libraries, objects, classes, components, data structures, etc. that perform specific tasks or implement specific abstract data types. In various embodiments, the functions of the program modules can be combined or divided as needed among the program modules. Machine executable instructions for program modules can be executed within local or distributed devices. In distributed devices, program modules can be located in local and remote storage media.

[0103] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages. The computer program code can execute entirely on a computer, a special purpose computer, or other programmable apparatus to produce the functions / acts specified in the flow diagrams and / or block diagrams. The program code can execute entirely on a computer, a special purpose computer, or other programmable apparatus, as a stand-alone software package, partly on the computer and partly on a remote computer, or entirely on the remote computer or server.

[0104] In the context of the present application, the computer program code or related data can be carried by any suitable carrier to enable the device, apparatus or processor to perform the various processes and operations described above. Examples of carriers include signals, computer readable media, and the like. Examples of signals can include electrical, optical, radio, sound or other forms of propagated signals, such as carrier waves, infrared signals, and the like.

[0105] Those skilled in the art can understand that the units and algorithm steps of the examples described in conjunction with the embodiments can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software manner depends on the specific application and design constraints of the technical solutions. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0106] The above describes the specific embodiments of the present application in conjunction with the accompanying drawings, but is not a limitation on the scope of protection of the present application. Those skilled in the art should understand that various modifications or variations made by those skilled in the art on the basis of the technical solutions of the present application without inventive labor are still within the scope of protection of the present application.

Claims

1. A method for configuring trusted queries for petabyte-scale multimodal data in blockchain, characterized in that, Includes the following steps: Acquire multimodal on-chain data and extract metadata from the multimodal data. Based on the metadata, construct an intra-block index using a Merkle Tree and optimize the constructed index using a B+ tree. Pre-set synchronous update rules for intra-block indexes to batch process various basic framework data, intelligent sensing data and relational data cached in memory, avoiding frequent write and update operations on global and local indexes; A block index table is constructed based on the block ID, and the block index table is logically organized through incremental views, and the block index table is dynamically adjusted adaptively according to changes in blockchain data. An index partition table is constructed based on the type of metadata to store the block index table identifier and address; A coarse-grained index model is constructed using a Bloom filter or a cryptographic multiset accumulator. Based on the query conditions, the required block index table is quickly located in the index partition table. Within the block index table, the inverted index is searched based on the metadata to be queried to obtain the block ID and storage location. The intra-block index is retrieved to find the specific data record and verify the hash path, thus achieving reliable data query.

2. The trusted query configuration method for blockchain petabyte-level multimodal data as described in claim 1, characterized in that, Intra-block indexes are built based on metadata, specifically as follows: Metadata from multimodal data is used as leaf nodes of a Merkle Tree to build an intra-block index, and the constructed index is optimized using a B+ tree.

3. The trusted query configuration method for blockchain petabyte-level multimodal data as described in claim 1, characterized in that, When extracting metadata from multimodal data, the compressed feature codes are processed by data truncation.

4. The trusted query configuration method for blockchain petabyte-level multimodal data as described in claim 1, characterized in that, The block index table is an inverted index that supports single-column indexes, unique indexes, primary key indexes, and clustered indexes.

5. A trusted query configuration system for blockchain petabyte-scale multimodal data, employing the trusted query configuration method for blockchain petabyte-scale multimodal data as described in any one of claims 1-4, characterized in that, include: The intra-block index building module is configured to: obtain multimodal on-chain data, extract metadata of the multimodal data, build an intra-block index based on the metadata using a Merkle Tree, and optimize the built index using a B+ tree; The block index construction module is configured to: build a block index table based on the block ID, logically organize the block index table through incremental views, and adaptively and dynamically adjust the block index table according to changes in blockchain data; The partitioned index building module is configured to: build an index partition table based on the type of metadata, which is used to store the block index table identifier and address; The trusted query module is configured to: build a coarse-grained index model, quickly locate the block index table to be queried in the index partition table according to the query conditions, search the inverted index in the block index table according to the metadata to be queried, obtain the block ID and storage location, retrieve the index within the block, query the specific data record, and verify the hash path to achieve trusted data query.

6. An electronic device, characterized in that, It includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, which, when executed by the processor, perform the method according to any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, Used to store computer instructions, which, when executed by a processor, perform the method described in any one of claims 1-4.

8. A computer program product, characterized in that, Includes a computer program, which, when executed by a processor, implements the method described in any one of claims 1-4.

Citation Information

Patent Citations

  • Multi-modal data verifiable query method and system based on block chain

    CN118245640A

  • Hybrid storage block chain query optimization method oriented to business environment evaluation

    CN118312532A