A data sharing method based on blockchain

By building a data smooth platform on the blockchain, using complete chains and divided chain groups to optimize data management, the problems of low throughput and high latency in traditional blockchain data circulation are solved, and efficient, reliable data circulation and search are achieved. .

CN113268519BActive Publication Date: 2024-11-29LINGSHU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011575401.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-28
Publication Date
2024-11-29
Estimated Expiration
2040-12-28

AI Technical Summary

Technical Problem

Traditional blockchain data circulation methods cannot guarantee the authenticity and reliability of the data due to the excessive concentration of third-party permissions, and the blockchain's own data management functions are simple, resulting in the system's low throughput and high latency.

Method used

Build a data smooth platform, including data label production module, data partitioning module, statistical auxiliary module and buffer building module, use complete chains and divided chain groups for data management, set up user nodes, maintenance nodes and management nodes, and use data measurement and blocks Technical means such as address and hash pointers optimize data storage and extraction to achieve efficient data circulation.

Benefits of technology

Through localized and access repetitive buffer construction, the search range is narrowed, the data authenticity and reliability are ensured, and multiple translation addresses and data elimination are performed during the flow, improving the efficiency of data search and storage.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The present invention relates to a data sharing method based on blockchain, which includes building a data flow platform; the data flow platform includes a data label making module, a data partitioning module, a statistical auxiliary module, and a buffer construction module, and the data flow platform is equipped with a complete chain and a divided chain group; the present invention utilizes the locality of data and the repeatability of access to build a data buffer, narrowing the scope of search, and can not only find data but also find the original data when it is stored; thereby seeing more information according to the stored context, utilizing the conversion technology of multiple conversion addresses and continuously eliminating the extracted data in the buffer in this circulation process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data storage and shared circulation, and relates to a data sharing method based on blockchain. Background Art

[0002] Traditional data circulation methods cannot guarantee the authenticity and reliability of data due to the excessive concentration of third-party authority.

[0003] Blockchain evidence storage and data retrieval rely on chained data structures and distributed consensus mechanisms to achieve decentralized and trusted evidence storage. However, blockchain itself provides simple data management functions and consumes significant transaction computing power, resulting in low system throughput and high latency. Therefore, how to leverage blockchain's data management capabilities to provide a rich set of data processing, storage, and retrieval functions has become a hot topic in blockchain research, development, and application. Summary of the Invention

[0004] In view of this, the present invention provides a blockchain-based data sharing method that solves or partially solves the above problems.

[0005] In order to achieve the effect of the above technical solution, the technical solution of the present invention is: the data sharing method includes constructing a data flow platform; the data flow platform includes a data label production module, a data partitioning module, a statistical auxiliary module, and a buffer construction module, and the data flow platform is equipped with a complete chain and a partitioned chain group; the complete chain stores the required data of all data circulation processes, and the partitioned chain places all data currently available for user nodes to extract; more than one user node and more than one maintenance node and one management node are set on the data flow platform, and the user node can extract the required data on the data flow platform, the maintenance node is responsible for maintaining the data on the data flow platform, and the management node is responsible for the management of the data flow platform; the data label production module is used to assist the complete chain in working, the data partitioning module is responsible for dividing the complete chain into blocks, the statistical auxiliary module is responsible for assisting calculation processing on the data flow platform, and the buffer construction module is responsible for establishing connections between the complete chain and the partitioned chain group;

[0006] A complete chain contains more than one complete block chain. A complete block is a block on a complete chain. A complete block is divided into equal-sized capacities by a data partitioning module. The size of a divided capacity is used as a data measurement. The data measurement is the minimum capacity unit on the data flow platform. The capacity of the data measurement is 2 SBytes, S is a positive integer greater than 2; the unit divided by the data partition module on the complete block according to the capacity of a data measurement is named block unit, and each block unit has a block address by default. The block address is used to indicate the position of the block unit on the complete chain, and is composed of the high bit of the block address and the low bit of the block address; the high bit of the block address is the height of the block where the block unit is located, and the number of bits of the block height is limited by the management node, that is, the number of blocks in the complete chain is limited, and it will no longer increase after reaching the block height limited by the management node. The low bit of the block address is the offset address of the data measurement on the complete block where it is located; the size of the complete block is M, and the unit of M is selected by the management node as one of KB, MB, GB, and TB; after the data is authorized by the data holder, it is packaged into data measurements by the data label production module according to the capacity, and the data is stored in the same The data owned by each data holder is packaged into a data metric. If the packaged data metric is not enough for one data metric, the signature information of the data holder is placed in the remaining part. If the packaged data metric is not enough for one data metric, the signature information of the data holder is placed in the remaining part. If the packaged data metric is not enough for one data metric, a data metric is added to store the signature information of the data holder. Then it is placed in the complete chain and assigned a block address. The block address is issued to a block unit as a fixed address label. The partition chain group contains more than one chain. The first block of all chains in the partition chain group is the same. No data is placed in the first block. Only the chain number and the keyword of the corresponding type of data are recorded. Each chain is numbered starting from 1 and contains one type of data. The blocks in the partition chain group are named partition blocks. Before the data is placed in the partition block, it is packaged into 2 N The size of the capacity of a complete block of one-tenth of the total capacity is used as a block edge. N is a positive integer and the value of N is greater than the value of S. The values ​​of S and N are determined by the management node and are placed into the partition block in the partition chain group in units of block edges.

[0007] The maintenance node is responsible for packaging the block edges. The packaging is carried out in the order in which the data metrics are created. The maintenance node puts the block edges into the partition blocks in turn. The part of the partition block that is not large enough to fit a block edge is put into the link information of the block edge in the construction block. The statistical auxiliary module counts the data metric extraction status of each block edge every T time, where T is the data extraction cycle. The data extraction cycle is used to update the partition chain group every T time, and R is the time for the last data sorting in the data extraction cycle. If R is less than one-quarter of the value of T, data extraction is not allowed within the last time R of the data extraction cycle. The time units and values ​​of T and R are determined by the management node. The statistical auxiliary module is in the partition chain group. A change bit is set for each data measurement, and the change bit is set to two states, a sealed state and an activated state, which are used to limit the actions that can modify the value of the change bit, that is, the change bit cannot change the value of the change bit in the sealed state, and the change bit can change the value of the change bit in the activated state; the change bit is used to count the number of times the data measurement is extracted within the first (TR) time of each data extraction cycle, but an upper limit of the change bit is set, and the upper limit of the change bit is P, which is the maximum value of the change bit and a positive integer greater than 1. When the value of the change bit exceeds the upper limit of the change bit, the change bit will no longer increase. The value of P is determined in advance by the management node before each data extraction cycle; at the beginning of the first (TR) time of each data extraction cycle, the state of the change bit becomes activated. The state is set to 0. Each time a data metric is extracted, the change bit increases by one. When the value of the change bit exceeds P, the change bit becomes sealed and the value of the change bit becomes 1. When the front (TR) time of each data extraction cycle ends, when the value of the change bit does not exceed P and is in the active state, the change bit becomes sealed and the value of the change bit becomes 0. When the state of the change bit is sealed and the change bit is 1, the change bit no longer changes its value. In the front (TR) time of each data extraction cycle, the statistical auxiliary module no longer counts the number of extractions of the data metric corresponding to the change bit. In the last R time of each data extraction cycle, all data metrics corresponding to the change bit being 1 and the change bit being in the sealed state are configured with a hash pointer. The hash pointer Pointing to the data metric with a higher offset address value in the adjacent zone edge within the same block edge, and the data metric pointed to by the hash pointer has the change bit set to 1 and the change bit set to the sealed state, the hash pointer points to the data metric and then merges it, and then puts it into the original chain of the partition chain group data metric, and eliminates the data metric with the change bit set to 1 and the change bit set to the sealed state from the partition chain group. After the merger, if there is still space in the block of the partition chain group after removing the link information, the maintenance node will be given priority to temporarily retrieve it, allowing the maintenance node to retrieve the data metric from the complete chain and add it to the partition chain group. Finally, the extraction is completed within the last R time of each data extraction cycle, and then the data metric in the partition chain group is divided into block edges according to the capacity of the block edge;

[0008] The buffer construction module constructs a private address for each data metric. The private address is used to indicate the position of the data metric in the partitioned chain group. A single data metric can be selected to directly use the private address as the key address of each data metric. The key address is used to give the user node, and the user node provides the key address to extract the required data. In the second or more cycles of extracting data, the buffer construction module can construct a public key address for more than one data metric. The construction can be constructed in the current cycle of extracting data. There are two construction modes. The construction mode is used to illustrate the construction process of the public key address: In the first construction mode, the data metric to be merged into the same block edge in the next cycle of extracting data selects a public key address. Key address, first, the buffer construction module checks all the changed bits to 1, which are in the sealed state as the data measurement for the next round of data extraction cycle to be merged and selected, and the public key address extracts the private addresses of all data measurements selected by the buffer construction module and within the same block edge, extracts all extracted private addresses, extracts the bits with the same numerical value in the middle of the extracted private addresses, and replaces the positions of the remaining numerical values ​​with replacement variables. The replacement variables are 26 lowercase letters, which are used to replace the bits other than the same numerical value in the middle of the extracted private addresses, and the management node limits the number of replacement variables in the middle of each public private address; and the maintenance node can set the width of the data measurement selected for the public key address, and stipulate that the width is less than or equal to 2 K , K is a positive integer greater than or equal to 0, and the value of K is determined by the management node, 2 K The capacity of a data metric multiplied by the data metric is less than or equal to the capacity of the block edge; the width of the data metric of the public key address is the value that the maximum difference of the private addresses of the data metric using the same public key address cannot exceed; the second construction mode, after merging the data metric within the last R time of the current data extraction cycle, the buffer construction module selects the data metric to be added to the same block edge, and the selected data metric constructs the same public key address, and stipulates that the width of the public key address of the second mode is less than or equal to 2 K / 2 , the value of K is greater than or equal to 0; all data metrics in the block edge except the data metrics of the changed bits that are 1 and in the sealed state are named as eliminated metrics;

[0009] The statistical auxiliary module is responsible for constructing the private address. During the construction process, the private address is split. The private address consists of three parts. From high to low, they are the chain number of the partition chain group where the data measurement is located, the block edge number, and the block edge offset address. The block edge number is the position where the chain of the partition chain group where the data measurement is located is stored in the current data extraction cycle. The block edge offset address is the offset address of the data measurement in the block edge, that is, the absolute value difference between the start of the data measurement at the block edge and the position of the data measurement at the block edge. The first construction Mode: If the data metric is already in the partition chain group in the last data extraction cycle, the private address is the chain number of the partition chain group and the block edge number - C from high to low, where C is the number of block edges that the data metric moves forward when combined with the position of the data metric in the last data extraction cycle. Then, the private address is processed into a public key address according to the first construction mode; in the second construction mode, the private address of the data metric added to the block edge is the chain number of the partition chain group and the block edge number in the high order; the low order is the block edge offset address;

[0010] The zone edge offset address is calculated as follows: in the first data extraction cycle, the zone edge offset address is equal to the remainder obtained by multiplying the sequence number of the data metric in the block where it is located by the size of the data metric, divided by the size of the block edge capacity; in cycles other than the first data extraction cycle, the zone edge offset address is equal to the remainder obtained by subtracting the block offset address of the data metric in the previous data extraction cycle from the capacity occupied by all eliminated metrics between the beginning of the chain of the partition chain group where the data metric is located and the position of the data metric, divided by the size of the block edge capacity;

[0011] The link information places information about the relationship between a private address and a fixed address label within a partitioned block; the buffer construction module splits the link information into two levels, the first level is a link directory, the number of rows in the link directory is equal to the number of chains in the partitioned chain group, and a pointer pointing to the address of a secondary table is placed in each row of the link directory. The secondary table is an area range reduction table, and the area range reduction table is a table for placing specific information of the link information, dividing the block grids, each block grid corresponds to a block edge, and the block grid is used to place the mapping information between the fixed address label of a block edge and the private addresses of all data measurements. The information is stored in a disordered order in the table, and the number of the corresponding block edge is written into a block grid. The elements contained in a pointer array of the block edge are placed in the block grid, and a pointer array of the block edge is used to indicate the fixed address label of the data measurement in the block edge. The subscript of the element of the pointer array placed in the block grid is equal to the block offset address of the data measurement. , the elements of the pointer array are set to multi-pointer variables, which are used to indicate the relationship between the private address and the fixed address label of the data measurement in the block edge. The value of the multi-pointer variable includes two levels of assignment. The first level of assignment is that the multi-pointer variable can be assigned a binary integer value, the number of bits of which does not exceed the size of the capacity of the complete block. The capacity of the complete block is expressed in bytes. The second level of assignment is that the multi-pointer variable points to a range of private addresses or a block height in the complete chain. When pointing to a block height value, the second level of assignment of the multi-pointer variable points to a range from the start to the end of the block corresponding to the block height. By default, the first level of assignment of the elements of the pointer array is the low bit of the block address of the data measurement, and the second level of assignment of the elements of the pointer array is the number of the complete block where the block address of the data measurement is located, so that the pointing range of the pointer array starts at the beginning of a corresponding block height and ends at the end of the block height.

[0012] By default, the capacity of the partitioned block is greater than the capacity of the complete block, and less than or equal to the sum of the capacity of the complete block plus the capacity of one block edge; in the first cycle of extracting data, the data partition module divides the complete block into M / 2 equal parts. N+S groups, where the unit of M is converted to bytes. Each group selects at most one data metric to be placed in the partition chain group, and the data metrics selected from the same complete block are not placed in the same block edge. Data metrics in a group whose change bits are not 1 and are in a closed state will no longer be arranged into the partition chain group;

[0013] In the data circulation method, the user node provides a key address. If it is the key address of a single data measurement, the fixed address tag information is directly searched in the link information within the partitioned block where the data measurement is located; the public key address is set to have one and only one public key address on a block edge within a data extraction cycle, and the private addresses of all selected data measurements corresponding to the public key address are stored. The buffer construction module searches for the fixed address tag information in the link information within the partitioned block according to the private address selected corresponding to the public key address.

[0014] The beneficial results of the present invention are: the present invention proposes a data sharing method based on blockchain, which utilizes the locality of data and the repetitiveness of access to construct a data buffer, narrowing the scope of search, and can not only find the data, but also find the original data when it is stored; thereby seeing more information based on the storage context, and utilizing the conversion technology of multiple conversion addresses and continuously eliminating the extracted data in the buffer in this circulation process. DETAILED DESCRIPTION

[0015] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is described in detail below with reference to the accompanying drawings and embodiments. It should be noted that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Products that can achieve the same functions are equivalent replacements and improvements and are all included in the scope of protection of the present invention.

[0016] Example 1: A partition block contains 2 N block edges, the size of a block edge is M / 2 N , the capacity of a complete block is M, including M / 2 s Data metrics, where the unit of M is converted into bytes. It is hoped that the data metrics in a complete block will be divided into different block edges in the partition chain group, and each complete block will be evenly divided into M / 2 N+S There are groups, each group selects at most one data metric to enter the partition chain group, and the data metrics selected from the same complete block are not placed in the same block edge, and the change bit of the data metric in each group is not 1 and is in a closed state, then a group is eliminated and no longer arranged to enter the partition chain group;

[0017] Create a mapping pair by matching the block offset address with the block edge number. The elements of the pointer array directly correspond to the block compilation address, and the corresponding block can be found by pointing to the pointer array.

[0018] Description of the data circulation method based on blockchain:

[0019] 1. Data authorization process:

[0020] 1) The data demander retrieves the required data tags in the data retrieval system;

[0021] 2) The data demander initiates an authorization request for the original data of the data tag and writes it into the blockchain;

[0022] 3) After receiving the authorization request, the data holder confirms the authorization result;

[0023] 4) The smart contract writes the user's authorization result into the blockchain;

[0024] 2. Data extraction process:

[0025] 1) After obtaining data authorization, the data demander will request the original data from the data holder. The data request information includes the signature information of the requester;

[0026] 2) The data holder obtains authorization from the blockchain and confirms that the requested data has been authorized;

[0027] 3) The data holder extracts the original data value from the database and packages it in a certain data format and sends it to the data requester. The information sent includes the signature information of the data holder;

[0028] 4) After the data demander obtains the data, they will confirm the authenticity of the data through the blockchain data storage contract;

[0029] (1) Query and evidence collection based on contract methods

[0030] By calling the evidence function declared in the smart contract, the input value of the evidence function is returned. This process does not involve changes to the contract state value. Therefore, this type of smart contract calling the corresponding query function does not belong to a transaction and does not consume Gas. Calling the evidence function on the Ethereum platform can obtain the data of the latest block stored. However, this method cannot obtain data in other blocks and does not support search functions. Therefore, this module proposes a second evidence collection method.

[0031] (2) Restoration and evidence collection based on block coding rules

[0032] The second forensic method is based on Ethereum's internal storage encoding rules. Block information is extracted and the transaction length field is used to determine whether the block contains transaction information. If it is not 0, the block contains a transaction. The transaction hash value in the block information is then used as an index to retrieve the transaction sequence within the block body. The transaction information in the block body contains the contract's function selector and parameter encoding. By decoding the parameter encoding, the contract information stored in the transaction information can be obtained, which is the evidence data.

[0033] Example 2: Consensus is a crucial issue in distributed computing. Consensus algorithms that can be completed synchronously cannot be completed asynchronously, resulting in what is known as the Byzantine Generals' Problem. With the development of consensus algorithms, Paxos and PBFT emerged, effectively coordinating the collaborative computation of a small number of asynchronous nodes. However, traditional consensus algorithms cannot meet the requirement for large-scale nodes to participate equally in consensus. Therefore, the first proposed PoW consensus algorithm provides a solid foundation for large-scale node consensus. PoW relies on each node independently solving a difficult problem to determine whose result is considered the final result. Incentive mechanisms ensure that other nodes continue to operate after this result, ultimately achieving the goal of "more work, more pay." However, PoW suffers from resource waste and centralization issues—those with more computing power are more likely to determine the result. This poses limitations for some practical applications. Therefore, the PoS mechanism was proposed, essentially a method of using bills to constrain PoW. However, because it still falls back to PoW and fails to truly break free from its limitations, subsequent solutions include PoS algorithms such as Casper, which achieve consensus through multiple rounds of bill staking. However, due to its limited speed and the existence of attack methods such as long-distance attacks, Casper is still in the experimental stage. DPoS mainly serves consortium chains and requires each consensus node to have a strong driving force to maintain blocks. The idea is to reduce the consensus group so that nodes can reach consensus quickly, which is more suitable for the actual needs of high-throughput applications.

[0034] Cryptographic sorting is a technology that uses decentralized cryptography to implement trusted and verifiable lottery selections in a distributed network. It applies cryptographic sorting to blockchain. The system's design requires the creation and updating of a parameter called a "seed node," which cannot be predicted or controlled by an attacker.

[0035] In each round of consensus, this project publishes a verifiable random function (VRF) based on the seed. Each user uses his or her own public key pair to execute the verifiable random function to obtain the corresponding certificate. Users who meet certain conditions will be identified as "validators" for this round of consensus. Each validator completes a bootstrap and publishes it with its own credentials. In this round, the validator with the smallest credential lexicographic order is identified as the "leader". The application of cryptographic sortition (CS) in blockchain has the following advantages: (1) The randomness of the verifiable random function determines the election process of "validators" and "leaders"

[0036] Difficult to predict and manipulate.

[0037] (2) The verification of the election process is always confidential, and its authentication can only be proven when a user publishes its credentials. Its bootstrap message has been published, but although an attacker can immediately compromise the authenticator, the published bootstrap message cannot be extracted anymore.

[0038] (3) The leader is generated by comparing all validators after they publish their certificates, which can be regarded as a public election.

[0039] The blockchain's data circulation method uses smart contracts to achieve data authorization and trusted extraction of original data. Original data does not pass through any third-party systems, thus avoiding the risk of data leakage. The blockchain's data circulation method consists of two parts: first, data authorization on the blockchain, which is achieved through smart contracts on the blockchain to authorize and record data; second, the extraction of original data and the verification of the extracted data. Data extraction and data exchange are limited to the supply and demand parties and are transmitted over a secure and trusted encrypted channel. The request interaction between both parties requires the sender's signature information. The data recipient needs to verify the signature of the received data to ensure the authenticity and validity of the data obtained.

[0040] Blockchain-based data circulation methods allow data on the blockchain to circulate securely and reliably between supply and demand parties. Trusted encrypted communication channels ensure the privacy and reliability of data transmission, ultimately enabling the valuable circulation of isolated data through the blockchain, fully activating the value of data. Data holders can clearly understand which data is of high value and which companies are authorized to use it through the authorization information of statistical data.

[0041] The beneficial results of the present invention are: the present invention proposes a data sharing method based on blockchain, which utilizes the locality of data and the repetitiveness of access to construct a data buffer, narrowing the scope of search, and can not only find the data, but also find the original data when it is stored; thereby seeing more information based on the storage context, and utilizing the conversion technology of multiple conversion addresses and continuously eliminating the extracted data in the buffer in this circulation process.

[0042] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the scope of the claims. Furthermore, the foregoing description should be understandable and implementable by those skilled in the relevant art. Therefore, any equivalent modifications based on the disclosure of the present invention are intended to be encompassed by the claims.

Claims

1. A data sharing method based on blockchain, characterized in that: The following steps are included: The data sharing method includes constructing a data flow platform; the data flow platform includes a data label making module, a data partitioning module, a statistical auxiliary module, and a buffer construction module, and the data flow platform is equipped with a complete chain and a divided chain group; the complete chain stores all the required data of the data flow process, and the divided chain places all the data currently available for user nodes to extract; the data flow platform is provided with more than one user node, more than one maintenance node, and a management node, the user node can extract the required data on the data flow platform, the maintenance node is responsible for maintaining the data on the data flow platform, and the management node is responsible for the management of the data flow platform; the data label making module is used to assist the complete chain to work, the data partitioning module is responsible for dividing the complete chain into blocks, the statistical auxiliary module is responsible for assisting the calculation and processing on the data flow platform, and the buffer construction module is responsible for establishing a connection between the complete chain and the divided chain group; The complete chain includes more than one complete block chain. The complete block is a block on the complete chain. The complete block is divided into equal-sized capacities by the data partition module. The size of a divided capacity is used as a data measurement. The data measurement is the minimum capacity unit on the data flow platform. The capacity of the data measurement is 2 S bytes, S is a positive integer greater than 2; the unit divided by the data partitioning module on the complete block according to the capacity of a data metric is named a block unit, and each block unit has a block address by default. The block address is used to indicate the position of the block unit on the complete chain, and is composed of the high bit of the block address and the low bit of the block address; the high bit of the block address is the height of the block where the block unit is located, and the number of bits of the block height is limited by the management node, that is, the number of blocks in the complete chain is limited, and will not increase after reaching the block height limited by the management node, and the low bit of the block address is the offset address of the data metric on the complete block where it is located; the size of the complete block is M, and the unit of M is selected by the management node as one of KB, MB, GB, and TB; when the data is authorized by the data holder, it is packaged into data metrics one by one by the data label making module according to the capacity, and the data is stored in the data label making module according to the capacity. The data owned by the same data holder are packaged into data metrics. If the packaged data metric is not enough for one data metric, the remaining part is used to place the signature information of the data holder. If the packaged data metric is not enough for one data metric and the remaining part is not enough to place the signature information of the data holder alone, a data metric is added to store the signature information of the data holder. Then the data is placed in the complete chain and is assigned a block address. The block address is issued to a block unit as a fixed address label. The partition chain group contains more than one chain. The first block of all chains in the partition chain group is the same. No data is placed in the first block. Only the chain number and the keyword of the corresponding type of data are recorded. Each chain is numbered from 1 and one type of data is placed. The blocks in the partition chain group are named partition blocks. Before the data is placed in the partition block, it is packaged into 2 N The size of the capacity of a complete block that is one-tenth of the capacity of the complete block is used as a block edge. N is a positive integer, and the value of N is greater than the value of S. The values ​​of S and N are determined by the management node and placed in the partition block in the partition chain group in units of block edges. The block edges are packaged by the maintenance node in the order in which the data metrics are created. The maintenance node sequentially puts the block edges into the partition blocks, and the part of the partition block that is not large enough to fit a block edge is put into the link information of the block edge in the construction block; the statistical auxiliary module counts the extraction of the data metrics in each block edge every T time, wherein T is the period of data extraction, and the period of data extraction is used to update the partition chain group every T time, R is the time for sorting the data at the end of the data extraction period, R is less than one-fourth of the value of T, and data extraction is not allowed within the last time R of the data extraction period, and the time units and values ​​of T and R are determined by the management node; the statistical auxiliary module sets a change bit for each data metric in the partition chain group, and the change bit is set to two states, a sealed state and an activated state, which are used to limit the action that can modify the value of the change bit, that is, the change bit cannot change the value of the change bit in the sealed state, and the change bit can change the value of the change bit in the activated state. value; the change bit is used to count the number of times the data metric is extracted in the first (TR) time of each cycle of extracting data, but an upper limit of the change bit is set, the upper limit of the change bit is P, which is the maximum value of the change bit and is a positive integer greater than 1. When the value of the change bit exceeds the upper limit of the change bit, the change bit will no longer increase, and the value of P is determined in advance by the management node before each cycle of extracting data; at the beginning of the first (TR) time of each cycle of extracting data, the state of the change bit becomes an activated state and is set to 0, when each time the data metric is extracted, the change bit increases by one, when the value of the change bit exceeds P, the change bit becomes a sealed state, and the value of the change bit becomes 1, when the first (TR) time of each cycle of extracting data ends, when the value of the change bit does not exceed P and is in the activated state, the change bit becomes a sealed state, and the value of the change bit becomes 0; when the state of the change bit is the sealed state and the change bit is 1, the change bit no longer changes its value, and the statistical auxiliary module no longer counts the number of times the data metric corresponding to the change bit is extracted in the first (TR) time of each cycle of extracting data;In the last R time of each data extraction cycle, all data metrics corresponding to the changed bit being 1 and the changed bit being in the sealed state are configured with a hash pointer, the hash pointer points to the data metric with a higher value of the zone edge offset address adjacent to the data metric in the same block edge, and the data metric pointed to by the hash pointer has a changed bit being 1 and a changed bit being in the sealed state. After the hash pointer points, the data metrics are merged and then put into the chain where the data metrics of the partition chain group originally belong. Except for the data metrics whose changed bits are 1 and the changed bits are in the sealed state, the data metrics are eliminated from the partition chain group. After the merger, if there is still space in the block of the partition chain group after removing the link information, the maintenance node is preferentially used for temporary retrieval, allowing the maintenance node to retrieve the data metric from the complete chain and add it to the partition chain group. Finally, the extraction is completed in the last R time of each data extraction cycle, and then the data metrics in the partition chain group are divided into block edges according to the capacity of the block edge. The buffer construction module constructs a private address for each data metric, and the private address is used to indicate the position of the data metric in the partition chain group. A single data metric can be selected to directly use the private address as the key address of each data metric. The key address is used to give to the user node, and the user node provides the key address to extract the required data; in the second or more cycles of extracting data, the buffer construction module can construct a public key address for more than one data metric. The construction can be constructed in the current cycle of extracting data. There are two construction modes, which are used to illustrate the construction process of the public key address: the first construction mode, in the next cycle of extracting data, the data metric to be merged into the same block edge selects a public key address Key address, first, the buffer construction module checks all the changed bits to 1, which are in the sealed state as the data measurement to be merged for the next round of data extraction cycle, and selects the public key address to extract all the private addresses of the data measurement selected by the buffer construction module and within the same block edge, extract all the extracted private addresses, extract the bits with the same numerical value in the middle of the extracted private addresses, and replace the positions of the remaining numerical values ​​with replacement variables, the replacement variables are 26 lowercase letters, which are used to replace the bits except the bits with the same numerical value in the middle of the extracted private addresses, and the management node limits the number of replacement variables in each public private address; and the maintenance node can set the width of the data measurement selected for the public key address, and stipulate that the width is less than or equal to 2 K , K is a positive integer greater than or equal to 0, and the value of K is determined by the management node. K The capacity of a data metric multiplied by the capacity of a data metric is less than or equal to the capacity of the block edge; the width of the data metric of the public key address is the value that the maximum difference of the private address of the data metric using the same public key address cannot exceed; the second construction mode, after merging the data metric within the last R time of the current data extraction cycle, the buffer construction module selects from the data metric to be added to the same block edge, and the selected data metric constructs the same public key address, and stipulates that the width of the public key address of the second mode is less than or equal to 2 K / 2 , the value of K is greater than or equal to 0; all data metrics in the block edge except the data metrics of the changed bits that are 1 and in the sealed state are named as eliminated metrics; The statistical auxiliary module is responsible for constructing the private address. During the construction process, the private address is split. The private address includes three parts, which are, from high to low, the number of the chain of the partition chain group where the data measurement is located, the number of the block edge, and the offset address of the block edge; the number of the block edge is the sequential number of the block edge calculated from the position where the chain of the partition chain group where the data measurement is located is stored in the current data extraction cycle, and the offset address of the block edge is the offset address of the data measurement in the block edge, that is, the absolute value difference between the beginning of the data measurement at the block edge to the position of the data measurement at the block edge; the first construction Construction mode: if the data measurement is in the partition chain group in the last data extraction cycle, the private address is respectively the number of the chain in the partition chain group and the number of the block edge - C from high to low, C is the number of block edges moved forward when the data measurement is combined with the position of the data measurement in the last data extraction cycle, and then the private address is processed into a public key address according to the first construction mode; the second construction mode, the private address of the data measurement added to the block edge is respectively the number of the chain in the partition chain group and the number of the block edge; the low bit is the zone edge offset address; The zone edge offset address is calculated as follows: in the first data extraction cycle, the zone edge offset address is equal to the value of the remainder obtained by multiplying the sequence number of the data metric in the block where the data metric is located by the size of the data metric and dividing it by the size of the block edge capacity; in the cycle other than the first data extraction cycle, the zone edge offset address is equal to the value of the remainder obtained by subtracting the block offset address of the data metric in the previous data extraction cycle from the capacity occupied by all eliminated metrics between the beginning of the chain of the partition chain group where the data metric is located and the position of the data metric and dividing it by the size of the block edge capacity; The link information is placed in the link information. The buffer construction module divides the link information into two levels. The first level is a link directory. The number of rows in the link directory is equal to the number of chains in the partition chain group. A pointer pointing to the address of a secondary table is placed in each row of the link directory. The secondary table is an area range reduction table. The area range reduction table is a table for placing specific information of the link information. Block grids are divided. Each block grid corresponds to a block edge. The block grid is used to place the mapping information between the fixed address label of a block edge and the private addresses of all data measurements. The table is stored in a disordered order. The number of the corresponding block edge is written into a block grid. The elements contained in a pointer array of the block edge are placed in the block grid. A pointer array of the block edge is used to indicate the fixed address label of the data measurement in the block edge. The subscript of the element of the pointer array placed in the block grid is equal to the block offset of the data measurement. address, the elements of the pointer array are set to a multiple pointer variable, the multiple pointer variable is used to indicate the relationship between the private address and the fixed address label of the data measurement in the block edge, the value of the multiple pointer variable includes two levels of assignment, the first level of assignment is that the multiple pointer variable can be assigned a binary integer value, the number of bits does not exceed the size of the capacity of the complete block, the capacity of the complete block is expressed in bytes, the second level of assignment is the range of the multiple pointer variable pointing to a private address or a block height in the complete chain, when pointing to a block height value, the range pointed to by the second level of assignment of the multiple pointer variable is from the beginning to the end of the block corresponding to the block height; the default is that the first level of assignment of the elements of the pointer array is the low bit of the block address of the data measurement, and the second level of assignment of the elements of the pointer array is the number of the complete block where the block address of the data measurement is located, so that the pointing range of the pointer array starts at the beginning of a corresponding block height and ends at the end of the block height; By default, the capacity of the partitioned block is greater than the capacity of the complete block, and less than or equal to the sum of the capacity of the complete block plus the capacity of one block edge; in the first cycle of extracting data, the data partition module divides the complete block into M / 2 N+S groups, where the unit of M is resolved into bytes, each group selects at most one data metric to be placed in the partition chain group, and the data metrics selected from the same complete block are not placed in the same block edge, and the data metrics in a group whose change bits are not 1 and are in a closed state are no longer arranged to enter the partition chain group; In the data sharing method, the user node provides a key address. If it is the key address of a single data measurement, the information of the fixed address tag is directly searched in the link information within the partition block where the data measurement is located; the public key address is set so that one block edge has one and only one public key address in a data extraction cycle, and the private addresses of all data measurements selected corresponding to the public key address are stored, and the buffer construction module searches for the information of the fixed address tag in the link information within the partition block according to the private address selected corresponding to the public key address. The user who has the key address can extract the data corresponding to the key address through the key address or the fixed tag information, and verify the signature information of the data holder contained in the data corresponding to the key address.

Citation Information

Patent Citations

  • A data sharing exchange system and method based on a block chain

    CN109729168A

  • Data prefetching method, data prefetching device, terminal and storage medium

    CN110471894A