WO2020010763A1 - Blockchain spatio-temporal data querying method and system, and electronic apparatus - Google Patents

Blockchain spatio-temporal data querying method and system, and electronic apparatus Download PDF

Info

Publication number
WO2020010763A1
WO2020010763A1 PCT/CN2018/114374 CN2018114374W WO2020010763A1 WO 2020010763 A1 WO2020010763 A1 WO 2020010763A1 CN 2018114374 W CN2018114374 W CN 2018114374W WO 2020010763 A1 WO2020010763 A1 WO 2020010763A1
Authority
WO
WIPO (PCT)
Prior art keywords
tree
block
data
time
blockchain
Prior art date
Application number
PCT/CN2018/114374
Other languages
French (fr)
Chinese (zh)
Inventor
曲强
Original Assignee
中国科学院深圳先进技术研究院
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中国科学院深圳先进技术研究院 filed Critical 中国科学院深圳先进技术研究院
Publication of WO2020010763A1 publication Critical patent/WO2020010763A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor

Definitions

  • Step a Insert the spatio-temporal data in the blockchain system into a tree-shaped index structure based on a combination of Merkle tree and kd tree, and store it in a blockchain module; for each block in the blockchain module , Introduce time meta information in the block header;
  • Step b Given the time range and space range corresponding to the time-space data, use the time meta-information in the block header of each block in the blockchain module to search the topology G of the directed acyclic graph for the time Range of blocks
  • FIG. 6 is a schematic structural diagram of a blockchain spatio-temporal data query system according to an embodiment of the present application.
  • FIG. 1 is a flowchart of a method for querying time and space data of a blockchain according to an embodiment of the present application.
  • the method for querying the spatiotemporal data of the blockchain in the embodiment of the present application includes the following steps:
  • the block nodes newly added to the topology G have no subsequent nodes to verify them, so they are the source nodes s to be verified.
  • the source node s it is possible to trace its previously verified nodes, and it is convenient to traverse the topology G of the entire directed acyclic graph.
  • Blockchain module used to store block data
  • Spatial range search module Connected with the time range search module, it is used to read the root node information of the tree index structure based on the combination of Merkle tree and kd tree in the block header of each time range block, and then from top to bottom Access the entire Merkle tree and kd tree tree index structure, search for key data that fits within the spatial range, and then obtain the corresponding original spatio-temporal data based on the key data through the Merkle Patricia-trie technology; this application proposes a high-efficiency zone for spatio-temporal data The block chain query response method enables it to support queries such as "all data in the l area in the s time period".
  • the processor, the memory, the input system, and the output system may be connected through a bus or other methods.
  • the connection through the bus is taken as an example.
  • Step a Insert the spatio-temporal data in the blockchain system into a tree-shaped index structure based on a combination of Merkle tree and kd tree, and store it in a blockchain module; for each block in the blockchain module , Introduce time meta information in the block header;
  • Step b Given the time range and space range corresponding to the time-space data, use the time meta-information in the block header of each block in the blockchain module to search the topology G of the directed acyclic graph for the time Range of blocks
  • Step c Read the root node information based on the tree index structure combining the Merkle tree and the kd tree in the block header of the time range, and search for key data that matches the spatial range, and then according to the Said key data obtains the corresponding spatiotemporal data.
  • the method, system, and electronic device for querying the spatiotemporal data of the blockchain in the embodiments of the present application form a new tree index by combining the Merkle tree and the kd tree to store the spatiotemporal data in the blockchain system on a directed acyclic graph structure. Based on this, the blocks that match the time range are screened in the directed acyclic graph, and the data that matches the spatial range is queried in the filtered blocks.
  • the advantages of the embodiments of the present application are:

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present application relates to a blockchain spatio-temporal data querying method and system, and an electronic apparatus. The method comprises: Step a: inserting spatio-temporal data of a blockchain system into a tree index structure which is based on a combination of a Merkle tree and a k-d tree, and storing the same in a blockchain module; and for each block in the blockchain module, introducing time meta-information into a block header; Step b: configuring a time range and a space range corresponding to the spatio-temporal data, and using the time meta-information in the block header of each block in the blockchain module to search a topology G of a directed acyclic graph for a block matching the time range; and Step c: reading root node information of the tree index structure based on the combination of the Merkle tree and the k-d tree in the block header of the blocks matching the time range, searching for key data matching the space range, and acquiring corresponding spatio-temporal data according to the key data. The present application is highly efficient, and can rapidly provide, in an "online" manner, a result matching a specific requirement.

Description

一种区块链时空数据查询方法、系统及电子设备Method, system and electronic equipment for querying space-time data of blockchain 技术领域Technical field
本申请属于互联网数据库技术领域,特别涉及一种区块链时空数据查询方法、系统及电子设备。The present application belongs to the technical field of Internet databases, and particularly relates to a method and system for querying space-time data of a blockchain and an electronic device.
背景技术Background technique
区块链技术,也被称作分布式账本技术,是一种互联网数据库技术,是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链是随着比特币等数字加密货币的日益普及而逐渐兴起的一种全新的去中心化基础架构与分布式计算范式。由于区块链具有去中心化、时序数据、集体维护、安全可信等优点,近年,它已经被广泛地应用在金融、医疗、教育等行业中,工业界与学术界也在探索区块链更多的应用场景。随着区块链技术的兴起激发了包括时空数据管理在内的各种领域的大量新应用的产生,例如,考虑在运输过程中跟踪物品的供应链场景。运输过程中要求不仅需要不断更新时空信息,还应支持时空数据的快速查询,如列出在t时间位于l处的所有数据,或者从t1到t2时间段内位于l处的所有数据。但是,当前的区块链技术并不能高效响应时空数据的查询,而针对时空数据的高效查询研究在数据库中一直备受瞩目,若能在区块链上进行高效时空数据查询,将具有广泛的应用前景。Blockchain technology, also known as distributed ledger technology, is an Internet database technology. It is a new application model of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanisms, and encryption algorithms. Blockchain is a new type of decentralized infrastructure and distributed computing paradigm that gradually rises with the increasing popularity of digital cryptocurrencies such as Bitcoin. Because blockchain has the advantages of decentralization, time series data, collective maintenance, security and credibility, in recent years, it has been widely used in finance, medical, education and other industries. Industry and academia are also exploring blockchain More application scenarios. With the rise of blockchain technology, a large number of new applications have been generated in various fields, including spatio-temporal data management. For example, consider the supply chain scenario of tracking items during transportation. During transportation, it is required not only to continuously update the spatiotemporal information, but also to support fast query of spatiotemporal data, such as listing all the data at time t at t, or all data at time l from t1 to t2. However, the current blockchain technology cannot efficiently respond to the query of spatio-temporal data, and the research on efficient query of spatio-temporal data has been attracting attention in the database. If efficient spatio-temporal data query can be performed on the blockchain, it will have a wide range of Application prospects.
区块链利用Merkle树对区块中的事务数据进行哈希,其中每个区块包含块头和块身,块头的作用是链接到前面的块为区块链提供完整性,块身则包含验证过的块创建过程中的数据记录。当需要查询区块链中的数据时,通过块身可以查询到当前区块的事务数据,通过块头可以找到区块链中当前区块的前一个 区块。目前,对区块链中某种数据模式下数据的查询,需要从区块链上最新加入的区块开始,先查询该块块身中的事务数据,再通过块头回溯到前一个区块中查询,以此类推,遍历整条区块链的事务数据。The blockchain uses the Merkle tree to hash transaction data in the block. Each block contains a block header and a block body. The function of the block header is to link to the previous block to provide integrity for the blockchain. The block body contains verification. Data records during block creation. When you need to query the data in the blockchain, you can query the transaction data of the current block through the block body, and you can find the previous block of the current block in the blockchain through the block header. At present, the query of data in a data mode in the blockchain needs to start from the newly added block on the blockchain, first query the transaction data in the block body, and then trace back to the previous block through the block header. Queries, and so on, traverse the transaction data of the entire blockchain.
综上所述,现有区块链技术存在的缺点在于:1)、不支持对时空数据进行高效的管理,包括对时空数据有效的存储和对时空数据的高效查询;2)、当前区块链对数据的查询,需要从区块链上最新加入的区块开始,通过其块头追溯到前一个区块。这样一个区块一个区块的进行查询,最坏情况下,查询完需要便利整条区块链的数据,显然,这样的查询十分低效与耗时,并不适合快速查询;3)、当前区块链数据查询响应方法并不适合频繁变动的时空数据的查询;4)、对于空间坐标数据也没有一些索引以加速整个过程;5)、在区块链系统中针对时空数据这些多维数据建立索引往往需要超过一个复杂索引,这样不仅十分繁琐而且开销会较大。In summary, the disadvantages of the existing blockchain technology are: 1), does not support efficient management of spatio-temporal data, including efficient storage of spatio-temporal data and efficient query of spatio-temporal data; 2), the current block Querying data by the chain needs to start from the newly added block on the blockchain and trace back to the previous block through its block header. Such a query is performed on a block-by-block basis. In the worst case, it is necessary to facilitate the data of the entire blockchain after the query. Obviously, such a query is very inefficient and time-consuming, and is not suitable for quick querying. 3). The blockchain data query response method is not suitable for frequently changing spatio-temporal data queries; 4), there is no index for spatial coordinate data to speed up the entire process; 5), multi-dimensional data is established in the blockchain system for spatio-temporal data Indexes often require more than one complex index, which is cumbersome and expensive.
发明内容Summary of the invention
本申请提供了一种区块链时空数据查询方法、系统及电子设备,旨在至少在一定程度上解决现有技术中的上述技术问题之一。This application provides a method, system, and electronic device for querying space-time data of a blockchain, which aims to solve at least one of the above-mentioned technical problems in the prior art.
为了解决上述问题,本申请提供了如下技术方案:In order to solve the above problems, this application provides the following technical solutions:
一种区块链时空数据查询方法,包括以下步骤:A method for querying space-time data of a blockchain includes the following steps:
步骤a:将区块链系统中的时空数据插入基于Merkle树与kd树相结合的树形索引结构中,并存储在区块链模块中;对于所述区块链模块中的每个区块,在块头中引入时间元信息;Step a: Insert the spatio-temporal data in the blockchain system into a tree-shaped index structure based on a combination of Merkle tree and kd tree, and store it in a blockchain module; for each block in the blockchain module , Introduce time meta information in the block header;
步骤b:给定时空数据对应的时间范围和空间范围,利用所述区块链模块中每个区块块头中的时间元信息在有向无环图的拓扑结构G中搜索出符合所述时间范围的区块;Step b: Given the time range and space range corresponding to the time-space data, use the time meta-information in the block header of each block in the blockchain module to search the topology G of the directed acyclic graph for the time Range of blocks
步骤c:读取所述符合时间范围的区块块头中的基于所述Merkle树与kd 树相结合的树型索引结构的根节点信息,搜索出符合所述空间范围的键数据,再根据所述键数据得到对应的时空数据;Step c: Read the root node information based on the tree-type index structure of the Merkle tree and the kd tree in the block header of the time range, and search for key data that conforms to the spatial range. Said key data to obtain corresponding spatiotemporal data;
其中,所述拓扑结构G的节点集为V,所述拓扑结构G的边集为E。The node set of the topology G is V, and the edge set of the topology G is E.
本申请实施例采取的技术方案还包括:在所述步骤b中,所述利用区块链模块中每个区块块头中的时间元信息在有向无环图的拓扑结构G中搜索出符合时间范围的区块具体为:对所述有向无环图的区块按所述时间范围搜索以宽度优先算法实现,所述拓扑结构G对于每个v∈V具有多个源节点s,由所述源节点s开始查询,对之后的查询均考虑追溯当前点的最近前面节点。The technical solution adopted in the embodiment of the present application further includes: In the step b, the search uses the time meta-information in the header of each block in the blockchain module to find a match in the topology G of the directed acyclic graph. The blocks in the time range are specifically: searching for the blocks of the directed acyclic graph according to the time range is implemented with a width-first algorithm, and the topology G has multiple source nodes s for each v ∈ V. The source node s starts to query, and all subsequent queries are considered to trace back to the nearest previous node at the current point.
本申请实施例采取的技术方案还包括:在所述步骤b中,所述利用区块链模块中每个区块块头中的时间元信息在有向无环图的拓扑结构G中搜索出符合所述时间范围的区块具体包括:The technical solution adopted in the embodiment of the present application further includes: In the step b, the search uses the time meta-information in the header of each block in the blockchain module to find a match in the topology G of the directed acyclic graph. The time range blocks specifically include:
步骤b1:给定时间范围β,利用GetRobustAccepted函数返回的当前最新的验证区块,开始运行宽度优先算法;Step b1: Given the time range β, use the current latest verification block returned by the GetRobustAccepted function to start running the width-first algorithm;
步骤b2:在所述宽度优先算法的运行过程中,如果区块块头中的时间元信息在所述时间范围β内,则将该区块放入结果集中;Step b2: In the running process of the width-first algorithm, if the time meta-information in the block header is within the time range β, the block is placed in a result set;
步骤b3:当搜索到区块在所述时间范围β外或者所有下一个区块块头中的时间元信息的结束时间均小于所述时间范围β的开始时间,则终止运行宽度优先算法。Step b3: When the search finds that the block is outside the time range β or the end time of the time meta-information in the block header of all the next blocks is less than the start time of the time range β, the running width-first algorithm is terminated.
本申请实施例采取的技术方案还包括:在所述步骤c中,所述读取符合时间范围的区块块头中的基于所述Merkle树与kd树相结合的树型索引结构的根节点信息,搜索出符合空间范围的键数据具体包括:从所述符合时间范围的区块块头中得到基于所述Merkle树与kd树相结合的树型索引结构的根节点,从所述根节点开始往下沿着一条简单路径一直将所述空间范围与树节点进行 比较;如果所述空间范围比树节点大,则所述路径进入树的右子树,如果所述空间范围比树节点小,则所述路径进入树的左子树,直到访问到一个符合所述空间范围的超矩形,并将所述超矩形中的哈希值数据返回。The technical solution adopted in the embodiment of the present application further includes: in the step c, the reading the root node information of the tree-type index structure based on the Merkle tree and the kd tree in the header of the block that meets the time range. Searching for key data that conforms to the spatial range specifically includes: obtaining the root node of the tree-type index structure based on the Merkle tree and the kd tree from the block header of the time range, and starting from the root node to Next, the spatial range is compared with the tree node along a simple path; if the spatial range is larger than the tree node, the path enters the right subtree of the tree, and if the spatial range is smaller than the tree node, then The path enters the left sub-tree of the tree until a super rectangle that meets the spatial range is accessed, and the hash value data in the super rectangle is returned.
本申请实施例采取的技术方案还包括:在所述步骤c中,所述根据键数据得到对应的时空数据具体为:在所述符合时间范围的区块块头中找到基于Merkle Patricia-trie技术的键值对索引的根节点,并根据基于所述Merkle Patricia-trie技术的键值对索引,将所述哈希值数据转换为原始时空数据,并返回原始时空数据。The technical solution adopted in the embodiment of the present application further includes: In the step c, the obtaining the corresponding spatio-temporal data according to the key data is specifically: finding a Merkle Patricia-trie technology-based The root node of the key-value pair index, and according to the key-value pair index based on the Merkle Patricia-trie technology, convert the hash value data into the original spatio-temporal data, and return the original spatio-temporal data.
本申请实施例采取的另一技术方案为:一种区块链时空数据查询系统,包括:Another technical solution adopted in the embodiments of the present application is: a blockchain spatio-temporal data query system, including:
区块链模块:用于存储区块数据;Blockchain module: used to store block data;
数据插入模块:与所述区块链模块连接,用于将区块链系统中的时空数据插入基于Merkle树与kd树相结合的树形索引结构中,并存储在所述区块链模块中;对于所述区块链模块中的每个区块,在块头中引入时间元信息;Data insertion module: Connected to the blockchain module, used to insert spatio-temporal data in the blockchain system into a tree-shaped index structure based on a combination of Merkle tree and kd tree, and stored in the blockchain module ; For each block in the blockchain module, introducing temporal meta information in the block header;
时间范围搜索模块:与所述区块链模块连接,用于给定时空数据对应的时间范围和空间范围,利用所述区块链模块中每个区块块头中的时间元信息在有向无环图的拓扑结构G中搜索出符合所述时间范围的区块;Time range search module: It is connected with the blockchain module and is used to give the time range and space range corresponding to the time and space data. The time meta information in the block header of each block in the blockchain module is The topological structure G of the ring graph searches for blocks that match the time range;
空间范围搜索模块:与所述时间范围搜索模块连接,用于读取所述符合时间范围的区块块头中的基于所述Merkle树与kd树相结合的树型索引结构的根节点信息,搜索出符合所述空间范围内的键数据,再根据所述键数据得到对应的时空数据;Spatial range search module: connected to the time range search module, for reading the root node information of the tree index structure based on the combination of the Merkle tree and the kd tree in the block header of the time range, and searching Output key data that conforms to the spatial range, and then obtain corresponding space-time data according to the key data;
其中,所述拓扑结构G的节点集为V,所述拓扑结构G的边集为E。The node set of the topology G is V, and the edge set of the topology G is E.
本申请实施例采取的技术方案还包括:所述时间范围搜索模块利用区块链 模块中每个区块块头中的时间元信息在有向无环图的拓扑结构G中搜索出符合时间范围的区块具体为:对所述有向无环图的区块按所述时间范围搜索以宽度优先算法实现,所述拓扑结构G对于每个v∈V具有多个源节点s,由所述源节点s开始查询,对之后的查询均考虑追溯当前节点的最近前面节点。The technical solution adopted in the embodiment of the present application further includes: the time range search module uses the time meta information in the block header of each block in the blockchain module to search the topology G of the directed acyclic graph for a time range that matches the time range. The block is specifically: searching for the blocks of the directed acyclic graph according to the time range is implemented by a width-first algorithm, and the topology G has multiple source nodes s for each v ∈ V, and the source Node s starts querying, and all subsequent queries are considered to trace back to the nearest previous node of the current node.
本申请实施例采取的技术方案还包括:所述时间范围搜索模块利用区块链模块中每个区块块头中的时间元信息在有向无环图的拓扑结构G(V,E)中搜索出符合时间范围的区块具体包括:给定时间范围β,利用GetRobustAccepted函数返回的当前最新的验证区块,开始运行宽度优先算法;在所述宽度优先算法的运行过程中,如果区块块头中的时间元信息在所述时间范围β内,则将该区块放入结果集中;当搜索到区块在所述时间范围β外或者所有下一个区块块头中的时间元信息的结束时间均小于所述时间范围β的开始时间,则终止运行宽度优先算法。The technical solution adopted in the embodiment of the present application further includes: the time range search module searches the topology structure G (V, E) of the directed acyclic graph by using the time meta information in the block header of each block in the blockchain module. The generation of blocks that meet the time range specifically includes: given a time range β, using the current latest verification block returned by the GetRobustAccepted function to start running the width-first algorithm; during the execution of the width-first algorithm, if the block header If the time meta-information is within the time range β, then the block is put into the result set; when the search finds that the block is outside the time range β or the end time of the time meta-information in the block header of all the next blocks are If it is less than the start time of the time range β, the running width-first algorithm is terminated.
本申请实施例采取的技术方案还包括:所述空间范围搜索模块读取符合时间范围的区块块头中的基于Merkle树与kd树相结合的树型索引结构的根节点信息,搜索出符合空间范围内的键数据具体包括:从所述符合时间范围的区块块头中得到基于所述Merkle树与kd树相结合的树型索引结构的根节点,从所述根节点开始往下沿着一条简单路径一直将所述空间范围与树节点进行比较;如果所述空间范围比树节点大,则所述路径进入树的右子树,如果所述空间范围比树节点小,则所述路径进入树的左子树,直到访问到一个符合所述空间范围的超矩形,并将所述超矩形中的哈希值数据返回。The technical solution adopted in the embodiment of the present application further includes: the spatial range search module reads the root node information of the tree-type index structure based on the combination of the Merkle tree and the kd tree in the block block header that matches the time range, and searches for a matching space The key data in the range specifically includes: obtaining the root node of the tree-type index structure based on the combination of the Merkle tree and the kd tree from the block header that conforms to the time range, starting from the root node and moving down a row A simple path always compares the spatial range with a tree node; if the spatial range is larger than the tree node, the path enters the right subtree of the tree, and if the spatial range is smaller than the tree node, the path enters The left sub-tree of the tree until a super rectangle that meets the spatial range is accessed, and the hash value data in the super rectangle is returned.
本申请实施例采取的技术方案还包括:所述空间范围搜索模块根据键数据得到对应的时空数据具体为:在所述符合时间范围的区块块头中找到基于Merkle Patricia-trie技术的键值对索引的根节点,并根据基于所述Merkle  Patricia-trie技术的键值对索引,将所述哈希值数据转换为原始时空数据,并返回原始时空数据。The technical solution adopted in the embodiment of the present application further includes: obtaining the corresponding spatio-temporal data by the spatial range search module according to the key data is specifically: finding a key-value pair based on the Merkle Patricia-trie technology in the block header that conforms to the time range The root node of the index, and according to the key-value pair index based on the Merkle Patricia-trie technology, the hash value data is converted into the original spatio-temporal data, and the original spatio-temporal data is returned.
本申请实施例采取的又一技术方案为:一种电子设备,包括:Another technical solution adopted in the embodiments of the present application is: an electronic device, including:
至少一个处理器;以及At least one processor; and
与所述至少一个处理器通信连接的存储器;其中,A memory connected in communication with the at least one processor; wherein,
所述存储器存储有可被所述一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述的区块链时空数据查询方法的以下操作:The memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor, so that the at least one processor can perform the following operations of the above-mentioned method of querying the space-time data of the blockchain. :
步骤a:将区块链系统中的时空数据插入基于Merkle树与kd树相结合的树形索引结构中,并存储在区块链模块中;对于所述区块链模块中的每个区块,在块头中引入时间元信息;Step a: Insert the spatio-temporal data in the blockchain system into a tree-shaped index structure based on a combination of Merkle tree and kd tree, and store it in a blockchain module; for each block in the blockchain module , Introduce time meta information in the block header;
步骤b:给定时空数据对应的时间范围和空间范围,利用所述区块链模块中每个区块块头中的时间元信息在有向无环图的拓扑结构G中搜索出符合所述时间范围的区块;Step b: Given the time range and space range corresponding to the time-space data, use the time meta-information in the block header of each block in the blockchain module to search the topology G of the directed acyclic graph for the time Range of blocks
步骤c:读取所述符合时间范围的区块块头中的基于所述Merkle树与kd树相结合的树型索引结构的根节点信息,搜索出符合所述空间范围的键数据,再根据所述键数据得到对应的时空数据。Step c: Read the root node information based on the tree index structure combining the Merkle tree and the kd tree in the block header of the time range, and search for key data that matches the spatial range, and then according to the Said key data obtains the corresponding spatiotemporal data.
相对于现有技术,本申请实施例产生的有益效果在于:本申请实施例的区块链时空数据查询方法、系统及电子设备通过将Merkle树与kd树相结合形成新树形索引以在有向无环图结构上存储区块链系统中的时空数据,基于此,在有向无环图中筛选符合时间范围的区块,并在筛选后的区块中查询符合空间范围的数据。相对于现有技术,本申请实施例的优势在于:Compared with the prior art, the embodiment of the present application has the beneficial effect that the method, system and electronic device for querying the spatiotemporal data of the blockchain in the embodiment of the present application form a new tree index by combining the Merkle tree and the kd tree. Spatio-temporal data in the blockchain system is stored on the acyclic graph structure. Based on this, the blocks that match the time range are screened in the directed acyclic graph, and the data that matches the spatial range is queried in the filtered blocks. Compared with the prior art, the advantages of the embodiments of the present application are:
1、本申请从区块链的存储结构的调整到区块链系统对数据的查询,都是 针对时空数据设计的,能够符合区块链在时空数据管理上的应用场景;1. This application, from the adjustment of the storage structure of the blockchain to the query of data by the blockchain system, is designed for spatiotemporal data, which can meet the application scenarios of the blockchain in spatiotemporal data management;
2、本申请的时空数据查询方法非常高效,能够做到“在线式”的迅速返回符合给定要求的结果,并且,本申请的区块产生到验证的速度有很大的提升,其中设计的高效索引均是轻量级的,占用空间小,符合时空区块链的要求;2. The spatio-temporal data query method of this application is very efficient, and it can achieve "online" to quickly return results that meet the given requirements, and the speed of block generation to verification of this application has been greatly improved. Efficient indexes are lightweight, occupy a small space, and meet the requirements of the space-time blockchain;
3、查询响应过程简洁且便于实现,能适用于像knn、范围查询等多种主流的时空数据查询;3. The query response process is simple and easy to implement, and can be applied to a variety of mainstream spatio-temporal data queries such as knn and range queries;
4、本申请通过在每个区块头中加入特定时间元信息,用于记录该区块中时空数据的时间区间,当查询时可以通过给定的时间限制快速找到符合该限制的区块,根据Merkle树与kd树相结合的索引,可以定位到区块中相应的数据,改进现有技术中每次查询响应都需要遍历各区块,并读取每个区块中的数据十分低效的不足;4. This application uses specific time meta-information in the header of each block to record the time interval of the spatiotemporal data in the block. When querying, you can quickly find the block that meets the limit through the given time limit. The index combining the Merkle tree and the kd tree can locate the corresponding data in the block, improving each query response in the prior art requires traversing each block and reading the data in each block is very inefficient ;
5、改进在区块链系统对多维数据难以建立非复杂索引结构的不足,针对空间数据建立Merkle树与kd树相结合的树型索引,并且对于每个时空数据,利用Merkle Patricia-trie做成键值对,便于通过树型索引得到的键值迅速定位到原始数据;5. Improve the lack of non-complicated index structure for multi-dimensional data in the blockchain system. For Merger Tree and KD Tree, a tree-based index for spatial data is created. For each spatio-temporal data, use Merkle Patricia-trie to make Key-value pairs, so that the key-values obtained through the tree index can be quickly located to the original data;
6、针对时空数据多应用于频繁更新的场景,本申请区块链采用验证时间更快的有向无环图结构(DAG),该结构的验证时间优于链式结构。6. For the scenario where spatio-temporal data is mostly used in frequent updates, the blockchain used in this application uses a directed acyclic graph structure (DAG) with faster verification time, which has a better verification time than a chain structure.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本申请实施例的区块链时空数据查询方法的流程图;FIG. 1 is a flowchart of a method for querying time and space data of a blockchain according to an embodiment of the present application; FIG.
图2为本申请实施例的有向无环图;2 is a directed acyclic graph according to an embodiment of the present application;
图3是本申请实施例的时间范围搜索的流程图;3 is a flowchart of a time range search according to an embodiment of the present application;
图4是本申请实施例的空间范围搜索的流程图;4 is a flowchart of a spatial range search according to an embodiment of the present application;
图5为在有向无环图上进行时空范围查询的响应示例图;FIG. 5 is an example response diagram of spatiotemporal range query on a directed acyclic graph;
图6是本申请实施例的区块链时空数据查询系统的结构示意图;6 is a schematic structural diagram of a blockchain spatio-temporal data query system according to an embodiment of the present application;
图7是本申请实施例提供的区块链时空数据查询方法的硬件设备结构示意图。FIG. 7 is a schematic structural diagram of a hardware device of a method for querying time and space data of a blockchain according to an embodiment of the present application.
具体实施方式detailed description
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution, and advantages of the present application clearer, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application, and are not used to limit the application.
请参阅图1,是本申请实施例的区块链时空数据查询方法的流程图。本申请实施例的区块链时空数据查询方法包括以下步骤:Please refer to FIG. 1, which is a flowchart of a method for querying time and space data of a blockchain according to an embodiment of the present application. The method for querying the spatiotemporal data of the blockchain in the embodiment of the present application includes the following steps:
步骤100:在区块链区块更新过程中,将区块链系统中的时空数据插入基于Merkle树与kd树相结合的树形索引结构中,并存储在区块链模块中;同时,对于区块链模块中的每个区块,在块头中引入时间元信息;Step 100: During the block update process of the blockchain, the spatio-temporal data in the blockchain system is inserted into a tree-shaped index structure based on the combination of the Merkle tree and the kd tree, and stored in the blockchain module; at the same time, for Each block in the blockchain module introduces time meta information into the block header;
步骤100中,时空数据在区块链中的结构上,本申请采用了基于Merkle树与kd树相结合的树型索引结构。其中,Merkle树是用于存储哈希值的树结构,其叶子是数据的哈希值,而非叶子节点是其对应子节点串联字符串的哈希值。而kd树是一种对于多维欧式空间分割构造的二叉树,其也代表了对k维数据集合构成的k维空间的一个划分,即树中每个节点对应一个k维的超矩形。结合两者即kd树节点中的数据按照Merkle树规则进行哈希处理。Merkle Patricia-trie则用于存储时空数据的键值对,便于通过树型索引结构得到的键值迅速定位到原始数据。对于每个区块头中加入的时间元信息,用于记录该 区块中时空数据的时间区间,当查询时可以通过给定的时间范围快速找到符合该时间范围的区块,根据Merkle树与kd树相结合的树型索引结构,可以定位到区块中相应的数据。In step 100, the structure of the spatio-temporal data in the blockchain is based on a tree-type index structure based on a combination of a Merkle tree and a kd tree. Among them, the Merkle tree is a tree structure for storing hash values, and its leaves are the hash values of the data, and non-leaf nodes are the hash values of its corresponding child node concatenated strings. The kd tree is a binary tree constructed by multi-dimensional Euclidean space segmentation, which also represents a division of the k-dimensional space formed by the k-dimensional data set, that is, each node in the tree corresponds to a k-dimensional super rectangle. Combining the two, that is, the data in the kd tree nodes, performs hash processing according to the Merkle tree rules. Merkle Patricia-trie is used to store the key-value pairs of spatio-temporal data, so that the key-values obtained through the tree index structure can be quickly located to the original data. For the time meta information added in the header of each block, it is used to record the time interval of the spatiotemporal data in the block. When querying, you can quickly find the block that matches the time range through the given time range. According to the Merkle tree and kd The tree-type index structure combined with trees can locate the corresponding data in the block.
步骤200:在时空数据查询过程中,给定时空数据对应的时间范围和空间范围,利用区块链模块中每个区块块头中的时间元信息在有向无环图(DAG)的拓扑结构G(V,E)中搜索出符合时间范围的区块;其中,拓扑结构G的节点集为V,拓扑结构G的边集为E。Step 200: During the spatio-temporal data query process, given the time range and space range corresponding to the time-space data, the time meta-information in the block header of each block in the blockchain module is used in the directed acyclic graph (DAG) topology. G (V, E) searches for blocks that match the time range; among them, the node set of the topology G is V, and the edge set of the topology G is E.
步骤200中,在区块链技术上,本申请选用需要验证时间更短的有向无环图(DAG),它能提高区块链的效率,使得网络中能够并行出块,并且验证所需时间较小。在DAG网络中,每笔交易被确认,需要链接到已经在网络中存在的并且比较新的交易做链接确认,这样网络的宽度保持在一定的范围中,能让新的交易有较快的确认时间。有向无环图如图2所示。In step 200, in terms of blockchain technology, this application selects a directed acyclic graph (DAG) that requires a shorter verification time, which can improve the efficiency of the blockchain, enable the parallel production of blocks in the network, and verify the required Less time. In the DAG network, each transaction is confirmed, and it is necessary to link to a newer transaction that already exists in the network for link confirmation. In this way, the width of the network is maintained within a certain range, and new transactions can be confirmed more quickly. time. The directed acyclic graph is shown in Figure 2.
为了在DAG上实现快速时间搜索,本申请引入了包含在每个块头中的时间元信息。给定时间范围β,首先在DAG拓扑结构G(V,E)上根据β搜索出满足条件的区块。如图2所示,拓扑结构G对于每个v∈V(属于节点集V的节点v)具有多个源节点s。源节点s是在有向无环图中入度为0的节点。对于在拓扑结构G中的每个节点v,它们均被后续的节点验证,而后续的节点又被更后续的节点进行验证。以此类推,可知最新加入拓扑结构G的区块节点是没有后续节点对它们进行验证的,所以它们是待验证的源节点s。利用源节点s,能够追溯其前面已验证过的节点,能够方便对整个有向无环图的拓扑结构G进行遍历。In order to implement fast time search on DAG, this application introduces time meta-information contained in each block header. Given a time range β, first, a block that satisfies the conditions is searched on the DAG topology G (V, E) according to β. As shown in FIG. 2, the topology G has a plurality of source nodes s for each v∈V (the node v belonging to the node set V). The source node s is a node with a degree of zero in the directed acyclic graph. For each node v in the topology G, they are verified by subsequent nodes, and subsequent nodes are verified by more subsequent nodes. By analogy, it can be known that the block nodes newly added to the topology G have no subsequent nodes to verify them, so they are the source nodes s to be verified. Using the source node s, it is possible to trace its previously verified nodes, and it is convenient to traverse the topology G of the entire directed acyclic graph.
由源节点s开始查询,对之后的查询均考虑追溯当前节点的最近前面节点。对各有向无环图的区块按时间范围搜索以宽度优先算法(BFS)实现。具 体请参阅图3,是本申请实施例的时间范围搜索的流程图。时间范围搜索的步骤包括:The source node s starts the query, and for the subsequent queries, the closest previous node of the current node is considered. The time-range search for the blocks of each directed acyclic graph is implemented with the width-first algorithm (BFS). Specifically, please refer to FIG. 3, which is a flowchart of a time range search according to an embodiment of the present application. The steps for time range search include:
步骤201:给定时间范围β=(开始时间,结束时间),利用GetRobustAccepted(G)函数返回的当前最新的验证区块,由此开始运行BFS;Step 201: Given the time range β = (start time, end time), use the current latest verification block returned by the GetRobustAccepted (G) function to start running BFS;
步骤202:在BFS的执行过程中,如果区块块头中的时间元信息在给定的时间范围β内,即,
Figure PCTCN2018114374-appb-000001
Figure PCTCN2018114374-appb-000002
则将该区块放入结果集中;
Step 202: During the execution of the BFS, if the time meta-information in the block header is within a given time range β, that is,
Figure PCTCN2018114374-appb-000001
Figure PCTCN2018114374-appb-000002
Then put the block into the result set;
步骤203:当搜索到区块在时间范围β外或者所有下一个区块块头中的时间元信息的结束时间均小于β的开始时间,则终止运行BFS。Step 203: When the search finds that the block is outside the time range β or the end time of the time meta-information in the block header of all the next blocks is less than the start time of β, the BFS operation is terminated.
步骤300:对于每个符合时间范围的区块,读取每个区块块头中的基于Merkle树与kd树相结合的树型索引结构的根节点信息,然后从上往下访问整个Merkle树与kd树相结合的树型索引结构,搜索出符合空间范围内的键数据,再根据键数据通过Merkle Patricia-trie技术得到对应的原始时空数据;Step 300: For each block that meets the time range, read the root node information of the tree index structure based on the combination of Merkle tree and kd tree in the block header of each block, and then access the entire Merkle tree and kd tree combined tree-type index structure, searches for key data that fits within the spatial range, and then obtains the corresponding original spatiotemporal data according to the key data through the Merkle Patricia-trie technology;
步骤300中,本申请针对时空数据提出高效区块链查询响应方法,使之能支持如“s时间段内l区域的所有数据”等查询。空间范围搜索的主要过程为树的遍历过程,具体请参阅图4,是本申请实施例的空间范围搜索的流程图。空间范围搜索的步骤包括:In step 300, the present application proposes an efficient blockchain query response method for spatiotemporal data, so that it can support queries such as "all data in one area in the s time period". The main process of the spatial range search is a tree traversal process. For details, please refer to FIG. 4, which is a flowchart of the spatial range search in the embodiment of the present application. The steps of a spatial search include:
步骤301:从符合时间范围的区块的块头中得到基于Merkle树与kd树相结合的树型索引结构的根节点,从根节点开始往下沿着一条简单路径一直将给定空间范围与树节点进行比较;Step 301: Obtain the root node of the tree-type index structure based on the combination of the Merkle tree and the kd tree from the block header of the block that conforms to the time range. Starting from the root node and following a simple path, the given space range and tree are always Nodes for comparison;
步骤302:如果给定空间范围比树节点大,则路径进入树的右子树,如果给定空间范围比树节点小,则路径进入树的左子树,直到访问到一个符合空间范围的超矩形,并将超矩形中的数据返回;Step 302: If the given spatial range is larger than the tree node, the path enters the right subtree of the tree. If the given spatial range is smaller than the tree node, the path enters the left subtree of the tree until a super-space that matches the spatial range is accessed. Rectangle, and return the data in the super rectangle;
步骤303:对于返回的数据,因为均是哈希值,需要在块头中找到基于Merkle Patricia-trie技术的键值对索引的根节点;Step 303: For the returned data, because they are all hash values, the root node of the key-value pair index based on the Merkle Patricia-trie technology needs to be found in the block header;
步骤304:根据基于Merkle Patricia-trie技术的键值对索引,将哈希值数据转换为原始时空数据,并返回原始时空数据。Step 304: According to the key-value pair index based on the Merkle Patricia-trie technology, convert the hash value data into the original spatiotemporal data, and return the original spatiotemporal data.
注意,空间范围搜索过程会对所有符合给定时间范围的区块都处理一次,得到的返回数据就是符合时空查询要求的时空数据。图5为在有向无环图上进行时空范围查询的响应示例图。首先,根据给定时间范围得到在该时间范围内的区块,然后,根据给定的空间范围,在每个区块内找寻符合的超矩形,并返回超矩形中的数据结果。Note that the spatial range search process will process all the blocks that meet the given time range once, and the returned data is the spatiotemporal data that meets the requirements of the spatiotemporal query. Fig. 5 is an example response diagram of spatiotemporal range query on a directed acyclic graph. First, according to the given time range, the blocks within the time range are obtained. Then, according to the given space range, the matching super rectangle is found in each block, and the data result in the super rectangle is returned.
请参阅图6,是本申请实施例的区块链时空数据查询系统的流程图。本申请实施例的区块链时空数据查询系统包括区块链模块、数据插入模块、时间范围搜索模块和空间范围搜索模块。Please refer to FIG. 6, which is a flowchart of a blockchain spatio-temporal data query system according to an embodiment of the present application. The blockchain time-space data query system in the embodiment of the present application includes a blockchain module, a data insertion module, a time range search module, and a space range search module.
区块链模块:用于存储区块数据;Blockchain module: used to store block data;
数据插入模块:与区块链模块连接,用于在区块链区块更新过程中,将区块链系统中的时空数据插入基于Merkle树与kd树相结合的树形索引结构中,并存储在区块链模块中;同时,对于区块链模块中的每个区块,在块头中引入时间元信息;本申请实施例中,时空数据在区块链中的结构上采用了基于Merkle树与kd树相结合的树型索引结构。其中,Merkle树是用于存储哈希值的树结构,其叶子是数据的哈希值,而非叶子节点是其对应子节点串联字符串的哈希值。而kd树是一种对于多维欧式空间分割构造的二叉树,其也代表了对k维数据集合构成的k维空间的一个划分,即树中每个节点对应一个k维的超矩形。结合两者即kd树节点中的数据按照Merkle树规则进行哈希处理。Merkle Patricia-trie则用于存储时空数据的键值对,便于通过树型索引结 构得到的键值迅速定位到原始数据。对于每个区块头中加入的时间元信息,用于记录该区块中时空数据的时间区间,当查询时可以通过给定的时间范围快速找到符合该时间范围的区块,根据Merkle树与kd树相结合的树型索引结构,可以定位到区块中相应的数据。Data insertion module: Connected with the blockchain module, used to insert the spatiotemporal data in the blockchain system into the tree-based index structure based on the combination of the Merkle tree and the kd tree during the blockchain block update process, and store it In the blockchain module; at the same time, for each block in the blockchain module, time meta information is introduced in the block header; in the embodiment of this application, the structure of the spatiotemporal data in the blockchain is based on the Merkle tree A tree-type index structure combined with a kd tree. Among them, the Merkle tree is a tree structure for storing hash values, and its leaves are the hash values of the data, and non-leaf nodes are the hash values of its corresponding child node concatenated strings. The kd tree is a binary tree constructed by multi-dimensional Euclidean space segmentation, which also represents a division of the k-dimensional space formed by the k-dimensional data set, that is, each node in the tree corresponds to a k-dimensional super rectangle. Combining the two, that is, the data in the kd tree nodes, performs hash processing according to the Merkle tree rules. Merkle Patricia-trie is used to store key-value pairs of spatio-temporal data, so that the key-values obtained through the tree index structure can be quickly located to the original data. For the time meta information added in the header of each block, it is used to record the time interval of the spatiotemporal data in the block. When querying, you can quickly find the block that matches the time range through the given time range. According to the Merkle tree and kd The tree-type index structure combined with trees can locate the corresponding data in the block.
时间范围搜索模块:与区块链模块连接,用于在时空数据查询过程中,给定时空数据对应的时间范围和空间范围,利用区块链模块中每个区块块头中的时间元信息在有向无环图(DAG)的拓扑结构G(V,E)中搜索出符合时间范围的区块;本申请实施例中,在区块链技术上,选用需要验证时间更短的有向无环图(DAG),它能提高区块链的效率,使得网络中能够并行出块,并且验证所需时间较小。在DAG网络中,每笔交易被确认,需要链接到已经在网络中存在的并且比较新的交易做链接确认,这样网络的宽度保持在一定的范围中,能让新的交易有较快的确认时间。Time range search module: It is connected with the blockchain module. It is used to give the time range and space range corresponding to the time and space data during the query of the spatiotemporal data. The time meta information in the block header of each block in the blockchain module is used to The topological structure G (V, E) of the directed acyclic graph (DAG) searches for blocks that meet the time range. In the embodiment of the present application, in the blockchain technology, a directed non-directed graph that requires a shorter verification time is selected. Ring Graph (DAG), which can improve the efficiency of the blockchain, make it possible to produce blocks in parallel in the network, and the time required for verification is small. In the DAG network, each transaction is confirmed, and it is necessary to link to a newer transaction that already exists in the network for link confirmation. In this way, the width of the network is maintained within a certain range, and new transactions can be confirmed faster time.
为了在DAG上实现快速时间搜索,本申请引入了包含在每个块头中的时间元信息。给定时间范围β,首先在DAG拓扑结构G(V,E)上根据β搜索出满足条件的区块。拓扑结构G对于每个v∈V具有多个源节点s(即新加入有向无环图中的待验证节点),由源节点开始查询,对之后的查询均考虑追溯当前点的最近前面节点。对各有向无环图的区块按时间范围搜索以宽度优先算法(BFS)实现。具体的,时间范围搜索模块的时间范围搜索方式为:给定时间范围β=(开始时间,结束时间),利用GetRobustAccepted(G)函数返回的当前最新的验证区块,由此开始运行BFS;在BFS的执行过程中,如果区块块头中的时间元信息在给定的时间范围β内,即,
Figure PCTCN2018114374-appb-000003
Figure PCTCN2018114374-appb-000004
则将该区块放入结果集中;当搜索到区块在时间范围β外或者所有下一个区块块头中的时间元信息 的结束时间均小于β的开始时间,则终止运行BFS。
In order to implement fast time search on DAG, this application introduces time meta-information contained in each block header. Given a time range β, first, a block that satisfies the conditions is searched on the DAG topology G (V, E) according to β. The topology G has multiple source nodes s for each v ∈ V (that is, newly added nodes to be verified in the directed acyclic graph), and the source node starts the query. For subsequent queries, the closest previous node that traces the current point is considered. . The time-range search for the blocks of each directed acyclic graph is implemented with the width-first algorithm (BFS). Specifically, the time range search method of the time range search module is: given a time range β = (start time, end time), use the current latest verification block returned by the GetRobustAccepted (G) function to start running BFS; in During the execution of BFS, if the temporal meta information in the block header is within a given time range β, that is,
Figure PCTCN2018114374-appb-000003
Figure PCTCN2018114374-appb-000004
Then the block is put into the result set; when the search finds that the block is outside the time range β or the end time of the time meta-information in the block header of all the next blocks is less than the start time of β, the BFS operation is terminated.
空间范围搜索模块:与时间范围搜索模块连接,用于读取每个符合时间范围的区块块头中的基于Merkle树与kd树相结合的树型索引结构的根节点信息,然后从上往下访问整个Merkle树与kd树相结合的树型索引结构,搜索出符合空间范围内的键数据,再根据键数据通过Merkle Patricia-trie技术得到对应的原始时空数据;本申请针对时空数据提出高效区块链查询响应方法,使之能支持如“s时间段内l区域的所有数据”等查询。Spatial range search module: Connected with the time range search module, it is used to read the root node information of the tree index structure based on the combination of Merkle tree and kd tree in the block header of each time range block, and then from top to bottom Access the entire Merkle tree and kd tree tree index structure, search for key data that fits within the spatial range, and then obtain the corresponding original spatio-temporal data based on the key data through the Merkle Patricia-trie technology; this application proposes a high-efficiency zone for spatio-temporal data The block chain query response method enables it to support queries such as "all data in the l area in the s time period".
具体的,空间范围搜索模块的空间范围搜索方式为:从区块的块头中得到基于Merkle树与kd树相结合的树型索引结构的根节点,从根节点开始往下沿着一条简单路径一直将给定空间范围与树节点进行比较;如果给定空间范围比树节点大,则路径进入树的右子树,如果给定空间范围比树节点小,则路径进入树的左子树,直到访问到一个符合空间范围的超矩形,并将超矩形中的数据返回;对于返回的数据,因为均是哈希值,需要在块头中找到基于Merkle Patricia-trie技术的键值对索引的根节点;根据基于Merkle Patricia-trie技术的键值对索引,将哈希值数据转换为原始时空数据,并返回原始时空数据。Specifically, the spatial range search method of the spatial range search module is: from the block header of the block, the root node of the tree-type index structure based on the combination of the Merkle tree and the kd tree is obtained, starting from the root node and following a simple path all the way Compare the given spatial range with the tree node; if the given spatial range is larger than the tree node, the path enters the right subtree of the tree, and if the given spatial range is smaller than the tree node, the path enters the left subtree of the tree until Access a super rectangle that meets the spatial range, and return the data in the super rectangle; for the returned data, because they are all hash values, you need to find the root node of the key-value pair index based on the Merkle Patricia-trie technology in the block header. ; According to the key-value pair index based on Merkle Patricia-trie technology, the hash value data is converted into the original spatiotemporal data, and the original spatiotemporal data is returned.
本申请实验在iota的tangle(基于有向无环图)上建立了一个专用的测试网络,并利用Pokemon Go上的时空数据进行测试,可以发现,在测试网络中,用户利用本申请提出的方法,能够“在线式”的查询到符合条件的时空数据,其查询响应时间很快。对于查询方式,实验采用了多种主流查询方式:knn查询、ball-point查询、range查询和bounded knn查询,得到的结果均是响应速度满足“在线式”查询。The experiment of this application establishes a dedicated test network on the tangle (based on directed acyclic graph) of iota, and uses the spatiotemporal data on Pokemon Go to test. It can be found that in the test network, the user uses the method proposed in this application , "Online" query can meet the qualified spatiotemporal data, and its query response time is fast. For the query method, the experiment uses a variety of mainstream query methods: knn query, ball-point query, range query and bounded knn query. The results obtained are that the response speed meets the "online" query.
图7是本申请实施例提供的区块链时空数据查询方法的硬件设备结构示意图。如图7所示,该设备包括一个或多个处理器以及存储器。以一个处理器为 例,该设备还可以包括:输入系统和输出系统。FIG. 7 is a schematic structural diagram of a hardware device of a method for querying time and space data of a blockchain according to an embodiment of the present application. As shown in Figure 7, the device includes one or more processors and memory. Taking a processor as an example, the device may further include an input system and an output system.
处理器、存储器、输入系统和输出系统可以通过总线或者其他方式连接,图7中以通过总线连接为例。The processor, the memory, the input system, and the output system may be connected through a bus or other methods. In FIG. 7, the connection through the bus is taken as an example.
存储器作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序、非暂态计算机可执行程序以及模块。处理器通过运行存储在存储器中的非暂态软件程序、指令以及模块,从而执行电子设备的各种功能应用以及数据处理,即实现上述方法实施例的处理方法。As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer executable programs, and modules. The processor executes various functional applications and data processing of the electronic device by running non-transitory software programs, instructions, and modules stored in the memory, that is, the processing method of the foregoing method embodiment is implemented.
存储器可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储数据等。此外,存储器可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施例中,存储器可选包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至处理系统。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory may include a storage program area and a storage data area, where the storage program area may store an operating system and application programs required for at least one function; the storage data area may store data and the like. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include memory remotely set relative to the processor, and these remote memories may be connected to the processing system via a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
输入系统可接收输入的数字或字符信息,以及产生信号输入。输出系统可包括显示屏等显示设备。The input system can receive inputted numeric or character information and generate a signal input. The output system may include a display device such as a display screen.
所述一个或者多个模块存储在所述存储器中,当被所述一个或者多个处理器执行时,执行上述任一方法实施例的以下操作:The one or more modules are stored in the memory, and when executed by the one or more processors, perform the following operations of any of the foregoing method embodiments:
步骤a:将区块链系统中的时空数据插入基于Merkle树与kd树相结合的树形索引结构中,并存储在区块链模块中;对于所述区块链模块中的每个区块,在块头中引入时间元信息;Step a: Insert the spatio-temporal data in the blockchain system into a tree-shaped index structure based on a combination of Merkle tree and kd tree, and store it in a blockchain module; for each block in the blockchain module , Introduce time meta information in the block header;
步骤b:给定时空数据对应的时间范围和空间范围,利用所述区块链模块中每个区块块头中的时间元信息在有向无环图的拓扑结构G中搜索出符合所述时间范围的区块;Step b: Given the time range and space range corresponding to the time-space data, use the time meta-information in the block header of each block in the blockchain module to search the topology G of the directed acyclic graph for the time Range of blocks
步骤c:读取所述符合时间范围的区块块头中的基于所述Merkle树与kd 树相结合的树型索引结构的根节点信息,搜索出符合所述空间范围的键数据,再根据所述键数据得到对应的时空数据。Step c: Read the root node information based on the tree-type index structure of the Merkle tree and the kd tree in the block header of the time range, and search for key data that conforms to the spatial range. Said key data obtains the corresponding spatiotemporal data.
上述产品可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请实施例提供的方法。The above product can execute the method provided in the embodiment of the present application, and has corresponding function modules and beneficial effects of executing the method. For technical details not described in detail in this embodiment, reference may be made to the method provided in the embodiment of the present application.
本申请实施例提供了一种非暂态(非易失性)计算机存储介质,所述计算机存储介质存储有计算机可执行指令,该计算机可执行指令可执行以下操作:An embodiment of the present application provides a non-transitory (non-volatile) computer storage medium. The computer storage medium stores computer-executable instructions, and the computer-executable instructions can perform the following operations:
步骤a:将区块链系统中的时空数据插入基于Merkle树与kd树相结合的树形索引结构中,并存储在区块链模块中;对于所述区块链模块中的每个区块,在块头中引入时间元信息;Step a: Insert the spatio-temporal data in the blockchain system into a tree-shaped index structure based on a combination of Merkle tree and kd tree, and store it in a blockchain module; for each block in the blockchain module , Introduce time meta information in the block header;
步骤b:给定时空数据对应的时间范围和空间范围,利用所述区块链模块中每个区块块头中的时间元信息在有向无环图的拓扑结构G中搜索出符合所述时间范围的区块;Step b: Given the time range and space range corresponding to the time-space data, use the time meta-information in the block header of each block in the blockchain module to search the topology G of the directed acyclic graph for the time Range of blocks
步骤c:读取所述符合时间范围的区块块头中的基于所述Merkle树与kd树相结合的树型索引结构的根节点信息,搜索出符合所述空间范围的键数据,再根据所述键数据得到对应的时空数据。Step c: Read the root node information based on the tree index structure combining the Merkle tree and the kd tree in the block header of the time range, and search for key data that matches the spatial range, and then according to the Said key data obtains the corresponding spatiotemporal data.
本申请实施例提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行以下操作:An embodiment of the present application provides a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, To cause the computer to:
步骤a:将区块链系统中的时空数据插入基于Merkle树与kd树相结合的树形索引结构中,并存储在区块链模块中;对于所述区块链模块中的每个区块,在块头中引入时间元信息;Step a: Insert the spatio-temporal data in the blockchain system into a tree-shaped index structure based on a combination of Merkle tree and kd tree, and store it in a blockchain module; for each block in the blockchain module , Introduce time meta information in the block header;
步骤b:给定时空数据对应的时间范围和空间范围,利用所述区块链模块中每个区块块头中的时间元信息在有向无环图的拓扑结构G中搜索出符合所 述时间范围的区块;Step b: Given the time range and space range corresponding to the time-space data, use the time meta-information in the block header of each block in the blockchain module to search the topology G of the directed acyclic graph for the time Range of blocks
步骤c:读取所述符合时间范围的区块块头中的基于所述Merkle树与kd树相结合的树型索引结构的根节点信息,搜索出符合所述空间范围的键数据,再根据所述键数据得到对应的时空数据。Step c: Read the root node information based on the tree index structure combining the Merkle tree and the kd tree in the block header of the time range, and search for key data that matches the spatial range, and then according to the Said key data obtains the corresponding spatiotemporal data.
本申请实施例的区块链时空数据查询方法、系统及电子设备通过将Merkle树与kd树相结合形成新树形索引以在有向无环图结构上存储区块链系统中的时空数据,基于此,在有向无环图中筛选符合时间范围的区块,并在筛选后的区块中查询符合空间范围的数据。相对于现有技术,本申请实施例的优势在于:The method, system, and electronic device for querying the spatiotemporal data of the blockchain in the embodiments of the present application form a new tree index by combining the Merkle tree and the kd tree to store the spatiotemporal data in the blockchain system on a directed acyclic graph structure. Based on this, the blocks that match the time range are screened in the directed acyclic graph, and the data that matches the spatial range is queried in the filtered blocks. Compared with the prior art, the advantages of the embodiments of the present application are:
1、本申请从区块链的存储结构的调整到区块链系统对数据的查询,都是针对时空数据设计的,能够符合区块链在时空数据管理上的应用场景。1. This application, from the adjustment of the storage structure of the blockchain to the query of data by the blockchain system, is designed for spatiotemporal data, which can meet the application scenarios of the blockchain in spatiotemporal data management.
2、本申请的时空数据查询方法非常高效,能够做到“在线式”的迅速返回符合给定要求的结果,并且,本申请的区块产生到验证的速度有很大的提升,其中设计的高效索引均是轻量级的,占用空间小,符合时空区块链的要求。2. The spatio-temporal data query method of this application is very efficient, and it can achieve "online" to quickly return results that meet the given requirements, and the speed of block generation to verification of this application has been greatly improved. Efficient indexes are lightweight and occupy a small space, which meets the requirements of the space-time blockchain.
3、查询响应过程简洁且便于实现,能适用于像knn、范围查询等多种主流的时空数据查询。3. The query response process is simple and easy to implement, and can be applied to a variety of mainstream spatiotemporal data queries such as knn and range queries.
4、本申请通过在每个区块头中加入特定时间元信息,用于记录该区块中时空数据的时间区间,当查询时可以通过给定的时间限制快速找到符合该限制的区块,根据Merkle树与kd树相结合的索引,可以定位到区块中相应的数据,改进现有技术中每次查询响应都需要遍历各区块,并读取每个区块中的数据十分低效的不足。4. This application uses specific time meta-information in the header of each block to record the time interval of the spatiotemporal data in the block. When querying, you can quickly find the block that meets the limit through the given time limit. The index combining the Merkle tree and the kd tree can locate the corresponding data in the block, improving each query response in the prior art requires traversing each block and reading the data in each block is very inefficient .
5、改进在区块链系统对多维数据难以建立非复杂索引结构的不足,针对空间数据建立Merkle树与kd树相结合的树型索引,并且对于每个时空数据, 利用Merkle Patricia-trie做成键值对,便于通过树型索引得到的键值迅速定位到原始数据。5.Improve the lack of non-complex index structure for multi-dimensional data in the blockchain system. For the spatial data, establish a tree index combining the Merkle tree and the kd tree. For each spatio-temporal data, use Merkle Patricia-trie Key-value pairs are used to quickly locate the key-values obtained through the tree index to the original data.
6、针对时空数据多应用于频繁更新的场景,本申请区块链采用验证时间更快的有向无环图结构(DAG),该结构的验证时间优于链式结构。6. For the scenario where spatio-temporal data is mostly used in frequent updates, the blockchain used in this application uses a directed acyclic graph structure (DAG) with faster verification time, which has a better verification time than a chain structure.
虽然本发明参照当前的较佳实施方式进行了描述,但本领域的技术人员应能理解,上述较佳实施方式仅用来说明本发明,并非用来限定本发明的保护范围,任何在本发明的精神和原则范围之内,所做的任何修饰、等效替换、改进等,均应包含在本发明的权利保护范围之内。Although the present invention has been described with reference to the current preferred embodiments, those skilled in the art should understand that the above preferred embodiments are only used to illustrate the present invention and are not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made within the scope of the spirit and principle of the invention shall be included in the scope of protection of the rights of the present invention.

Claims (11)

  1. 一种区块链时空数据查询方法,其特征在于,包括以下步骤:A method for querying the spatiotemporal data of a blockchain is characterized in that it includes the following steps:
    步骤a:将区块链系统中的时空数据插入基于Merkle树与kd树相结合的树形索引结构中,并存储在区块链模块中;对于所述区块链模块中的每个区块,在块头中引入时间元信息;Step a: Insert the spatio-temporal data in the blockchain system into a tree-shaped index structure based on a combination of Merkle tree and kd tree, and store it in a blockchain module; for each block in the blockchain module , Introduce time meta information in the block header;
    步骤b:给定时空数据对应的时间范围和空间范围,利用所述区块链模块中每个区块块头中的时间元信息在有向无环图的拓扑结构G中搜索出符合所述时间范围的区块;Step b: Given the time range and space range corresponding to the time-space data, use the time meta-information in the block header of each block in the blockchain module to search the topology G of the directed acyclic graph for the time Range of blocks
    步骤c:读取所述符合时间范围的区块块头中的基于所述Merkle树与kd树相结合的树型索引结构的根节点信息,搜索出符合所述空间范围的键数据,再根据所述键数据得到对应的时空数据;Step c: Read the root node information based on the tree index structure combining the Merkle tree and the kd tree in the block header of the time range, and search for key data that matches the spatial range, and then according to the Said key data to obtain corresponding spatiotemporal data;
    其中,所述拓扑结构G的节点集为V,所述拓扑结构G的边集为E。The node set of the topology G is V, and the edge set of the topology G is E.
  2. 根据权利要求1所述的区块链时空数据查询方法,其特征在于,在所述步骤b中,所述利用区块链模块中每个区块块头中的时间元信息在有向无环图的拓扑结构G中搜索出符合时间范围的区块具体为:对所述有向无环图的区块按所述时间范围搜索以宽度优先算法实现,所述拓扑结构G对于每个v∈V具有多个源节点s,由所述源节点s开始查询,对之后的查询均考虑追溯当前节点的最近前面节点。The method for querying space-time data of a blockchain according to claim 1, characterized in that in said step b, said utilizing the time meta-information in a block header of each block in a blockchain module in a directed acyclic graph The search for a block that fits the time range in the topology G of is specifically: searching for the block of the directed acyclic graph according to the time range is implemented by a width-first algorithm, and the topology G for each v ∈ V There are multiple source nodes s, and the source node s starts to query, and all subsequent queries are considered to trace the closest previous node of the current node.
  3. 根据权利要求2所述的区块链时空数据查询方法,其特征在于,在所述步骤b中,所述利用区块链模块中每个区块块头中的时间元信息在有向无环图的拓扑结构G中搜索出符合所述时间范围的区块具体包括:The method for querying the spatio-temporal data of a blockchain according to claim 2, characterized in that in said step b, said utilizing the time meta-information in a block header of each block in a blockchain module in a directed acyclic graph The blocks in the topology G that are found to meet the time range specifically include:
    步骤b1:给定时间范围β,利用GetRobustAccepted函数返回的当前最新 的验证区块,开始运行宽度优先算法;Step b1: Given the time range β, use the current latest verification block returned by the GetRobustAccepted function to start running the width-first algorithm;
    步骤b2:在所述宽度优先算法的运行过程中,如果区块块头中的时间元信息在所述时间范围β内,则将该区块放入结果集中;Step b2: In the running process of the width-first algorithm, if the time meta-information in the block header is within the time range β, the block is placed in a result set;
    步骤b3:当搜索到区块在所述时间范围β外或者所有下一个区块块头中的时间元信息的结束时间均小于所述时间范围β的开始时间,则终止运行宽度优先算法。Step b3: When the search finds that the block is outside the time range β or the end time of the time meta-information in the block header of all the next blocks is less than the start time of the time range β, the running width-first algorithm is terminated.
  4. 根据权利要求3所述的区块链时空数据查询方法,其特征在于,在所述步骤c中,所述读取符合时间范围的区块块头中的基于所述Merkle树与kd树相结合的树型索引结构的根节点信息,搜索出符合空间范围的键数据具体包括:从所述符合时间范围的区块块头中得到基于所述Merkle树与kd树相结合的树型索引结构的根节点,从所述根节点开始往下沿着一条简单路径一直将所述空间范围与树节点进行比较;如果所述空间范围比树节点大,则所述路径进入树的右子树,如果所述空间范围比树节点小,则所述路径进入树的左子树,直到访问到一个符合所述空间范围的超矩形,并将所述超矩形中的哈希值数据返回。The method for querying the spatiotemporal data of a blockchain according to claim 3, characterized in that in said step c, said reading the block header of a block that conforms to the time range is based on the combination of the Merkle tree and the kd tree. The root node information of the tree-type index structure, and searching for key data that conforms to the spatial range specifically includes: obtaining the root node of the tree-type index structure based on the combination of the Merkle tree and the kd tree from the block header that conforms to the time range. Starting from the root node and comparing the spatial range with the tree node along a simple path; if the spatial range is larger than the tree node, the path enters the right subtree of the tree, and if the The space range is smaller than the tree node, then the path enters the left subtree of the tree until a super rectangle that meets the space range is accessed, and the hash value data in the super rectangle is returned.
  5. 根据权利要求4所述的区块链时空数据查询方法,其特征在于,在所述步骤c中,所述根据键数据得到对应的时空数据具体为:在所述符合时间范围的区块块头中找到基于Merkle Patricia-trie技术的键值对索引的根节点,并根据基于所述Merkle Patricia-trie技术的键值对索引,将所述哈希值数据转换为原始时空数据,并返回原始时空数据。The method for querying the spatio-temporal data of a blockchain according to claim 4, characterized in that, in the step c, the obtaining the corresponding spatio-temporal data according to the key data is specifically: in the block header of the block that conforms to the time range Find the root node of the key-value pair index based on the Merkle Patricia-trie technology, and convert the hash value data into the original spatio-temporal data according to the key-value pair index based on the Merkle Patricia-trie technology, and return the original spatio-temporal data .
  6. 一种区块链时空数据查询系统,其特征在于,包括:A blockchain time-space data query system, which is characterized by:
    区块链模块:用于存储区块数据;Blockchain module: used to store block data;
    数据插入模块:与所述区块链模块连接,用于将区块链系统中的时空数据插入基于Merkle树与kd树相结合的树形索引结构中,并存储在所述区块链模块 中;对于所述区块链模块中的每个区块,在块头中引入时间元信息;Data insertion module: Connected to the blockchain module, used to insert spatio-temporal data in the blockchain system into a tree-shaped index structure based on a combination of Merkle tree and kd tree, and stored in the blockchain module ; For each block in the blockchain module, introducing temporal meta information in the block header;
    时间范围搜索模块:与所述区块链模块连接,用于给定时空数据对应的时间范围和空间范围,利用所述区块链模块中每个区块块头中的时间元信息在有向无环图的拓扑结构G中搜索出符合所述时间范围的区块;Time range search module: It is connected with the blockchain module and is used to give the time range and space range corresponding to the time and space data. The time meta information in the block header of each block in the blockchain module is The topological structure G of the ring graph searches for blocks that match the time range;
    空间范围搜索模块:与所述时间范围搜索模块连接,用于读取所述符合时间范围的区块块头中的基于所述Merkle树与kd树相结合的树型索引结构的根节点信息,搜索出符合所述空间范围内的键数据,再根据所述键数据得到对应的时空数据;Spatial range search module: connected to the time range search module, for reading the root node information of the tree index structure based on the combination of the Merkle tree and the kd tree in the block header of the time range, and searching Output key data that conforms to the spatial range, and then obtain corresponding space-time data according to the key data;
    其中,所述拓扑结构G的节点集为V,所述拓扑结构G的边集为E。The node set of the topology G is V, and the edge set of the topology G is E.
  7. 根据权利要求6所述的区块链时空数据查询系统,其特征在于,所述时间范围搜索模块利用区块链模块中每个区块块头中的时间元信息在有向无环图的拓扑结构G中搜索出符合时间范围的区块具体为:对所述有向无环图的区块按所述时间范围搜索以宽度优先算法实现,所述拓扑结构G对于每个v∈V具有多个源节点s,由所述源节点s开始查询,对之后的查询均考虑追溯当前点的最近前面节点。The query system of spatio-temporal data of a blockchain according to claim 6, wherein the time range search module utilizes the topology of the time meta-information in the block header of each block in the blockchain module in a directed acyclic graph Searching for a block that meets the time range in G is specifically: searching for the block of the directed acyclic graph according to the time range is implemented by a width-first algorithm, and the topology G has multiple for each v ∈ V The source node s starts querying from the source node s, and for the subsequent queries, the closest previous node that traces the current point is considered.
  8. 根据权利要求7所述的区块链时空数据查询系统,其特征在于,所述时间范围搜索模块利用区块链模块中每个区块块头中的时间元信息在有向无环图的拓扑结构G中搜索出符合时间范围的区块具体包括:给定时间范围β,利用GetRobustAccepted函数返回的当前最新的验证区块,开始运行宽度优先算法;在所述宽度优先算法的运行过程中,如果区块块头中的时间元信息在所述时间范围β内,则将该区块放入结果集中;当搜索到区块在所述时间范围β外或者所有下一个区块块头中的时间元信息的结束时间均小于所述时间范围β的开始时间,则终止运行宽度优先算法。The query system of spatio-temporal data for a blockchain according to claim 7, characterized in that the time range search module utilizes the topological structure of the time meta-information in the block header of each block in the blockchain module in a directed acyclic graph The blocks searched in G that meet the time range specifically include: given a time range β, using the current latest verification block returned by the GetRobustAccepted function to start running the width-first algorithm; during the execution of the width-first algorithm, if the area When the time meta-information in the block header is within the time range β, the block is placed in the result set; when the search finds that the block is outside the time range β or in all the time meta-information in the block header of the next block If the end time is less than the start time of the time range β, the running width-first algorithm is terminated.
  9. 根据权利要求8所述的区块链时空数据查询系统,其特征在于,所述空间范围搜索模块读取符合时间范围的区块块头中的基于所述Merkle树与kd树相结合的树型索引结构的根节点信息,搜索出符合空间范围内的键数据具体包括:从所述符合时间范围的区块块头中得到基于所述Merkle树与kd树相结合的树型索引结构的根节点,从所述根节点开始往下沿着一条简单路径一直将所述空间范围与树节点进行比较;如果所述空间范围比树节点大,则所述路径进入树的右子树,如果所述空间范围比树节点小,则所述路径进入树的左子树,直到访问到一个符合所述空间范围的超矩形,并将所述超矩形中的哈希值数据返回。The query system of spatio-temporal data for a blockchain according to claim 8, wherein the spatial range search module reads a tree-type index based on a combination of the Merkle tree and a kd tree in a block block header that conforms to a time range The root node information of the structure, and searching for key data in a consistent spatial range specifically includes: obtaining the root node of the tree-type index structure based on the Merkle tree and the kd tree from the block header of the time range. The root node starts to compare the spatial range with the tree node along a simple path; if the spatial range is larger than the tree node, the path enters the right subtree of the tree, and if the spatial range is Smaller than the tree node, the path enters the left sub-tree of the tree until a super rectangle that meets the spatial range is accessed, and the hash value data in the super rectangle is returned.
  10. 根据权利要求9所述的区块链时空数据查询系统,其特征在于,所述空间范围搜索模块根据键数据得到对应的时空数据具体为:在所述符合时间范围的区块块头中找到基于Merkle Patricia-trie技术的键值对索引的根节点,并根据基于所述Merkle Patricia-trie技术的键值对索引,将所述哈希值数据转换为原始时空数据,并返回原始时空数据。The query system of spatio-temporal data for a blockchain according to claim 9, wherein the spatial range search module obtains corresponding spatio-temporal data according to key data is specifically: finding a Merkle-based The root node of the key-value pair index of the Patricia-trie technology, and according to the key-value pair index based on the Merkle Patricia-trie technology, the hash value data is converted into the original spatio-temporal data, and the original spatio-temporal data is returned.
  11. 一种电子设备,包括:An electronic device includes:
    至少一个处理器;以及At least one processor; and
    与所述至少一个处理器通信连接的存储器;其中,A memory connected in communication with the at least one processor; wherein,
    所述存储器存储有可被所述一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述1至5任一项所述的区块链时空数据查询方法的以下操作:The memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the block according to any one of the above 1 to 5 The following operations of the chain spatio-temporal data query method:
    步骤a:将区块链系统中的时空数据插入基于Merkle树与kd树相结合的树形索引结构中,并存储在区块链模块中;对于所述区块链模块中的每个区块,在块头中引入时间元信息;Step a: Insert the spatio-temporal data in the blockchain system into a tree-shaped index structure based on a combination of Merkle tree and kd tree, and store it in a blockchain module; for each block in the blockchain module , Introduce time meta information in the block header;
    步骤b:给定时空数据对应的时间范围和空间范围,利用所述区块链模块中 每个区块块头中的时间元信息在有向无环图的拓扑结构G中搜索出符合所述时间范围的区块;Step b: Given the time range and space range corresponding to the time-space data, use the time meta-information in the block header of each block in the blockchain module to search the topology G of the directed acyclic graph for the time Range of blocks
    步骤c:读取所述符合时间范围的区块块头中的基于所述Merkle树与kd树相结合的树型索引结构的根节点信息,搜索出符合所述空间范围的键数据,再根据所述键数据得到对应的时空数据。Step c: Read the root node information based on the tree index structure combining the Merkle tree and the kd tree in the block header of the time range, and search for key data that matches the spatial range, and then according to the Said key data obtains the corresponding spatiotemporal data.
PCT/CN2018/114374 2018-07-12 2018-11-07 Blockchain spatio-temporal data querying method and system, and electronic apparatus WO2020010763A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810765882.9A CN108595720B (en) 2018-07-12 2018-07-12 Block chain space-time data query method, system and electronic equipment
CN201810765882.9 2018-07-12

Publications (1)

Publication Number Publication Date
WO2020010763A1 true WO2020010763A1 (en) 2020-01-16

Family

ID=63618197

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/114374 WO2020010763A1 (en) 2018-07-12 2018-11-07 Blockchain spatio-temporal data querying method and system, and electronic apparatus

Country Status (2)

Country Link
CN (1) CN108595720B (en)
WO (1) WO2020010763A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111832059A (en) * 2020-09-16 2020-10-27 北京长隆讯飞科技有限公司 Space big data management method and system based on cloud service
CN117453982A (en) * 2023-09-12 2024-01-26 武汉世纪科怡科技发展有限公司 File management file classification system

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108595720B (en) * 2018-07-12 2020-05-19 中国科学院深圳先进技术研究院 Block chain space-time data query method, system and electronic equipment
CN109460406B (en) * 2018-10-15 2021-03-23 咪咕文化科技有限公司 Data processing method and device
CN109614823B (en) * 2018-10-26 2022-05-13 蚂蚁双链科技(上海)有限公司 Data processing method, device and equipment
CN109697249A (en) * 2018-12-07 2019-04-30 深圳市云歌人工智能技术有限公司 Search for method, system and the storage medium of target object and issue object
CN109885615B (en) * 2019-01-24 2020-09-22 华东师范大学 Index-based block chain light client-oriented range query verifiable query method
CN110008249B (en) * 2019-01-31 2023-08-08 创新先进技术有限公司 Time-based data query method, device and equipment
CN110008720B (en) * 2019-03-19 2020-10-30 周口师范学院 Dynamic data tracing method and device for Internet of things based on alliance chain
CN110163007B (en) * 2019-04-23 2021-05-04 西安邮电大学 Block chain-based data integrity verification method, equipment and storage medium
CN111861459A (en) * 2019-04-28 2020-10-30 常州一仙智能科技有限公司 Iota account book optimization system and method based on DPoS consensus algorithm
US10853341B2 (en) 2019-06-28 2020-12-01 Advanced New Technologies Co., Ltd. Blockchain based hierarchical data storage
CN110347684B (en) * 2019-06-28 2020-09-01 阿里巴巴集团控股有限公司 Block chain based hierarchical storage method and device and electronic equipment
CN110569246B (en) * 2019-07-23 2022-03-11 腾讯科技(深圳)有限公司 Block chain node information synchronization method and device, computer equipment and storage medium
CN112307010B (en) * 2019-07-29 2024-04-16 创新先进技术有限公司 Data storage method, device and equipment
CN110602148B (en) * 2019-10-10 2021-07-06 深圳前海微众银行股份有限公司 Method and device for generating state tree of block and verifying data on chain
CN111080288B (en) * 2019-10-18 2023-08-18 湖南天河国云科技有限公司 Block chain consensus achieving method and device based on directed acyclic graph
US11269863B2 (en) 2020-01-23 2022-03-08 International Business Machines Corporation Index structure for blockchain ledger
CN111614721B (en) * 2020-04-14 2022-11-22 梁伟 Multi-dimensional block chain network, and method and device for generating multi-dimensional block chain network
CN112951357B (en) * 2021-03-23 2023-05-09 电子科技大学 Virtual medical resource lateral expansion method based on blockchain
CN113901142B (en) * 2021-10-13 2024-05-07 辽宁大学 Space-time data-oriented block chain architecture and range query processing method
CN114756603B (en) * 2022-05-23 2023-04-07 天津大学 High-efficiency verifiable query method for lightweight block chain

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2016101183A4 (en) * 2016-07-20 2016-09-22 Platform Secured Pty Ltd Network System Innovation Method using blockchain identity based single and multi facial, voice and other bio recognition encryption protocols from existing binary packets to blockchain blocks where the actual member/ user in the blockchain becomes the fully encrypted and shielded block
CN106295406A (en) * 2016-08-13 2017-01-04 深圳市樊溪电子有限公司 A kind of block chain that is used for is from safe storage system and method thereof
CN107807951A (en) * 2017-09-18 2018-03-16 联动优势科技有限公司 A kind of block chain generation method, data verification method, node and system
CN108595720A (en) * 2018-07-12 2018-09-28 中国科学院深圳先进技术研究院 A kind of block chain spatiotemporal data warehouse method, system and electronic equipment

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104750708B (en) * 2013-12-27 2018-09-28 华为技术有限公司 A kind of index establishing method of space-time data, querying method, device and equipment
CN106095952A (en) * 2016-06-15 2016-11-09 公安部第三研究所 In space-time unique based on key assignments cloud storage, magnanimity crosses car record method for quickly querying
US10055446B2 (en) * 2016-06-16 2018-08-21 The Bank Of New York Mellon Ensuring data integrity of executed transactions
CN106227833A (en) * 2016-07-26 2016-12-14 宁圣金融信息服务(上海)有限公司 Block chaining search engine method, system and device
CN106682825A (en) * 2016-12-22 2017-05-17 南京邮电大学 System and method for evaluating credit of Social Internet of Things based on block chain
CN107247773B (en) * 2017-06-07 2018-05-15 北京邮电大学 A kind of method that inquiry is traded in distributed data base based on block chain
CN107423368B (en) * 2017-06-29 2020-07-17 中国测绘科学研究院 Spatio-temporal data indexing method in non-relational database
CN107729371B (en) * 2017-09-12 2020-04-21 深圳先进技术研究院 Data indexing and querying method, device, equipment and storage medium of block chain
CN107730176A (en) * 2017-10-18 2018-02-23 上海唯链信息科技有限公司 A kind of goods logistic information inquiry system and method based on block chain

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2016101183A4 (en) * 2016-07-20 2016-09-22 Platform Secured Pty Ltd Network System Innovation Method using blockchain identity based single and multi facial, voice and other bio recognition encryption protocols from existing binary packets to blockchain blocks where the actual member/ user in the blockchain becomes the fully encrypted and shielded block
CN106295406A (en) * 2016-08-13 2017-01-04 深圳市樊溪电子有限公司 A kind of block chain that is used for is from safe storage system and method thereof
CN107807951A (en) * 2017-09-18 2018-03-16 联动优势科技有限公司 A kind of block chain generation method, data verification method, node and system
CN108595720A (en) * 2018-07-12 2018-09-28 中国科学院深圳先进技术研究院 A kind of block chain spatiotemporal data warehouse method, system and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111832059A (en) * 2020-09-16 2020-10-27 北京长隆讯飞科技有限公司 Space big data management method and system based on cloud service
CN117453982A (en) * 2023-09-12 2024-01-26 武汉世纪科怡科技发展有限公司 File management file classification system

Also Published As

Publication number Publication date
CN108595720B (en) 2020-05-19
CN108595720A (en) 2018-09-28

Similar Documents

Publication Publication Date Title
WO2020010763A1 (en) Blockchain spatio-temporal data querying method and system, and electronic apparatus
US11762876B2 (en) Data normalization using data edge platform
Lu et al. Efficiently Supporting Edit Distance Based String Similarity Search Using B $^+ $-Trees
CN106874425B (en) Storm-based real-time keyword approximate search algorithm
Xu et al. Efficient and effective similarity search over probabilistic data based on earth mover’s distance
O’Hare et al. A review of unsupervised and semi-supervised blocking methods for record linkage
Li et al. Bounded approximate query processing
Zhao et al. Large-scale visual search with binary distributed graph at alibaba
CN113704248B (en) Block chain query optimization method based on external index
Kaur et al. Visualizing class diagram using orientDB NOSQL data–store
US11163801B2 (en) Execution of queries in relational databases
CN208781225U (en) A kind of block chain spatiotemporal data warehouse system and electronic equipment
Ding et al. Efficient probabilistic skyline query processing in mapreduce
Zhu et al. Cohesive subgraph search using keywords in large networks
Lian et al. Quality-aware subgraph matching over inconsistent probabilistic graph databases
WO2013097065A1 (en) Index data processing method and device
Ma et al. Parallel NoSQL entity resolution approach with MapReduce
US20170031909A1 (en) Locality-sensitive hashing for algebraic expressions
Yingfan et al. Revisiting $ k $-Nearest Neighbor Graph Construction on High-Dimensional Data: Experiments and Analyses
Čerešňák et al. Improvement of Data Searching in MongoDB with the Use of Oracle Database
Das et al. Challenges and approaches for large graph analysis using map/reduce paradigm
Gupta et al. CAPS: A Practical Partition Index for Filtered Similarity Search
US11797485B2 (en) Frameworks for data source representation and compression
Kaoudi et al. Cloud-Based RDF Data Management
Trucksäß Evaluation of Distributed Semantic Databases

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18926238

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205AXXXX DATED 05/03/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18926238

Country of ref document: EP

Kind code of ref document: A1