WO2022262446A1 - 分层裁剪区块链交易内数据的方法、装置、设备及介质 - Google Patents

分层裁剪区块链交易内数据的方法、装置、设备及介质 Download PDF

Info

Publication number
WO2022262446A1
WO2022262446A1 PCT/CN2022/090567 CN2022090567W WO2022262446A1 WO 2022262446 A1 WO2022262446 A1 WO 2022262446A1 CN 2022090567 W CN2022090567 W CN 2022090567W WO 2022262446 A1 WO2022262446 A1 WO 2022262446A1
Authority
WO
WIPO (PCT)
Prior art keywords
data set
data
transaction
clipping
hash
Prior art date
Application number
PCT/CN2022/090567
Other languages
English (en)
French (fr)
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 中国科学技术大学
Priority to GB2319803.9A priority Critical patent/GB2622343A/en
Publication of WO2022262446A1 publication Critical patent/WO2022262446A1/zh
Priority to US18/543,440 priority patent/US20240168942A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present disclosure belongs to the technical field of blockchain, and in particular relates to a method, device, equipment and medium for hierarchically clipping data in blockchain transactions.
  • Blockchain technology is a distributed ledger technology, which consists of multiple ledger maintenance nodes distributed in different geographical locations to participate in bookkeeping and record transaction data into a distributed database.
  • Ledger maintenance nodes are nodes that run compatible accounting software of the same kind and may become accounting nodes.
  • Transaction data can be defined as a functionally complete and independent accounting data unit transmitted between all ledger maintenance nodes.
  • Each accounting is sent by the user to broadcast or point-to-point a transaction to the distributed network, and the accounting node selected according to the consensus rules is added to the ledger database, and finally realized through the verification of other ledger maintenance nodes.
  • ledger synchronization nodes There are also nodes in the network that do not participate in bookkeeping but still record complete or partial, historical or current transaction data, which can be called ledger synchronization nodes. There are also some user nodes in the network, which only save the transaction data related to the user itself or the user group itself, or also save the most basic block header structure data, which are called light nodes.
  • blockchain is only for simplification of description, and its meaning is not limited to this narrow blockchain network, but includes all forms of distributed ledgers, and the bookkeeping transactions in it do not have to be Packed into a block, it can also be added to the distributed ledger in a relatively independent manner.
  • the main data in the transaction is hashed as a whole to obtain the transaction identification number TXID.
  • the node needs to use hash calculation to verify the authenticity of part of the transaction data, it must receive the transaction pointed to by the TXID
  • the complete transaction data increases the cost of storage, transmission and secondary utilization of transaction data, and increases the unnecessary burden on users.
  • the present disclosure provides a method, device, electronic device, storage medium and program product for hierarchically pruning data in a blockchain transaction.
  • a method for hierarchically pruning data in a blockchain transaction including: acquiring a transaction data set. Based on the data pruning model, N rounds of pruning are performed on the transaction data set to obtain the target data set, where N is a positive integer greater than or equal to 1. Process the target data set to obtain the target value, where the target value is configured to point to the transaction identification number used when the target data set is on-chain.
  • N rounds of pruning are performed on the transaction data set to obtain the target data set, including: S1, using the transaction data set to construct a reserved data set and M pruning data sets, where M is A positive integer greater than or equal to 1.
  • S2. Perform first serialization encoding on the clipping data set to obtain a first serialization encoding value corresponding to the clipping data set.
  • S3. Perform hash calculation on the first serialized encoding value to obtain a first hash value corresponding to the first serialized encoding value.
  • S4. Construct a first hash value set from the M first hash values corresponding to the first serialized code value, and merge with the reserved data set to obtain an intermediate transaction data set.
  • an apparatus for hierarchically pruning data in a blockchain transaction including: an acquisition module, configured to acquire a transaction data set.
  • the clipping module is configured to perform N rounds of clipping on the transaction data set based on the data clipping model to obtain the target data set, where N is a positive integer greater than or equal to 1.
  • the processing module is used to process the target data set to obtain the target value, wherein the target value is configured to point to the transaction identification number used when the target data set is on-chain.
  • an electronic device including: one or more processors.
  • a storage device for storing one or more programs, wherein, when one or more programs are executed by one or more processors, one or more processors are made to perform the above-mentioned method for hierarchically pruning data in blockchain transactions .
  • a computer-readable storage medium on which executable instructions are stored, and when the instructions are executed by a processor, the processor executes the above-mentioned method for hierarchically pruning data in a blockchain transaction.
  • a computer program product including a computer program.
  • the computer program When the computer program is executed by a processor, the above-mentioned method for hierarchically pruning data in a blockchain transaction is implemented.
  • FIG. 1 schematically shows a flowchart of a method for hierarchically pruning data in a blockchain transaction according to an embodiment of the present disclosure
  • FIG. 2 schematically shows a flowchart of a method for performing N rounds of clipping on transaction data to obtain a target data set according to an embodiment of the present disclosure
  • Fig. 3 schematically shows a schematic diagram of division of transaction data sets according to Embodiment 1 of the present disclosure
  • FIG. 4 schematically shows a schematic diagram of division of transaction data sets according to Embodiment 2 of the present disclosure
  • Fig. 5 schematically shows a schematic diagram of division of transaction data sets according to Embodiment 3 of the present disclosure
  • FIG. 6 schematically shows a structural block diagram of a device for hierarchically pruning data in a blockchain transaction according to an embodiment of the present disclosure
  • Fig. 7 schematically shows a block diagram of an electronic device suitable for implementing a method for hierarchically pruning data in a blockchain transaction according to an embodiment of the present disclosure.
  • Fig. 1 schematically shows a flowchart of a method for hierarchically pruning data in a blockchain transaction according to an embodiment of the present disclosure.
  • the method 100 includes operations S110-S130.
  • N rounds of pruning are performed on the transaction data set to obtain a target data set, where N is a positive integer greater than or equal to 1.
  • the pruning round N in the case of distributed ledgers under the UTXO model, in the case of different numbers of transaction data input and transaction data output, the pruning round N can be determined according to the actual pruning requirements, After determining the specific trimming order, execute the trimming operation on the transaction data set.
  • the pruning round N may not be affected by the number of transaction data input and transaction data output, that is, the pruning round N may not depend on the number of transaction data input and transaction data output.
  • the transaction data set may be a collection of complete transaction data propagated in the distributed ledger network, and the transaction data set may be denoted as X 0 .
  • the set of complete transaction data data may include all necessary transaction data elements without including some redundant data.
  • the necessary data may be the data required when the validity of the transaction is verified by the ledger maintenance node.
  • unlocking script size data or locking script size data is also a kind of redundant data, which can be data that does not need to be verified by ledger maintenance nodes.
  • the transaction data set X0 can be formed by combining multiple pieces of data, for example, it can be expressed as formula (1):
  • X 0 ⁇ x 1 , x 2 , x 3 , . . . , x n ⁇ (1)
  • x 1 , x 2 , x 3 , ..., x n are data elements in the transaction data set, and n is the number of data elements in the transaction data set.
  • the data set obtained after each round of pruning of the transaction data set through the data pruning model F can be expressed as formula (2):
  • S is the reserved data set in the input data set X
  • W 1 , W 2 ,..., W M are the cropped data sets in the input data set X
  • M is the number of cropped data sets
  • binW M is the cropped data
  • HASH(binW M ) is the hash value of binW M
  • Y is the data set after the input data set X is cut by the data pruning model.
  • X, S and W h can be expressed as formula (3):
  • X ⁇ x 1 , x 2 , x 3 , . . . , x a ⁇ ;
  • S ⁇ s 1 , s 2 , s 3 , . . . , s b ⁇ ;
  • W h is any clipping data set in the clipping data set W 1 , W 2 , ..., W M ;
  • a is the number of data elements in the input data set X, x 1 , x 2 , x 3 , ..., x a is the data element in the input data set X;
  • b is the number of data elements in the reserved data set S (b ⁇ 0), s 1 , s 2 , s 3 , ..., s b is Keep the data elements in the data set S;
  • h is the number of cropped data sets, 1 ⁇ h ⁇ M;
  • c h is the number of data elements in the cropped data set W h , and c h ⁇ 1, is the data element in the clipping data set W h .
  • the input data set can be set as formula (4):
  • the input data set X is represented as a union of the reserved data set S and the cropped data sets W 1 , W 2 , . . . , W M to reduce redundant data.
  • the input data set can also be set as formula (5):
  • the input data set X is expressed in the form of Equation 5, so as to avoid data duplication and improve data clipping efficiency.
  • the hash in hash(HASH r-1 (p)) represents the hash function used in the rth hash calculation, and the hash function can be any kind of hash function or a newly designed function with the same effect.
  • HASH r (p) consists of r arbitrary nested hash functions, and the r hash functions can be different or the same.
  • Some constant data and consensus rules can be added to the encoding operation to meet specific retrieval and decoding needs.
  • performing N rounds of pruning on the transaction data set based on the data pruning model F may include pruning the data elements in the transaction data set to form a pruning data set, serializing and hashing the pruning data set Calculate, keep the unpruned data set, and form the hash set composed of the hash value of the pruned data and the kept unpruned data set into the target data set.
  • FIG. 2 schematically shows a flowchart of a method for performing N rounds of pruning on transaction data to obtain a target data set according to an embodiment of the present disclosure.
  • the method 200 further includes operations S1-S5.
  • operation S1 use the transaction data set to construct a reserved data set and M clipped data sets, where M is a positive integer greater than or equal to 1.
  • a first serialized encoding is performed on the clipped data set to obtain a first serialized coded value corresponding to the clipped data set.
  • a hash calculation is performed on the first serialized code value to obtain a first hash value corresponding to the first serialized coded value.
  • a first hash value set is constructed from M first hash values corresponding to the first serialized encoding value, and combined with the reserved data set to obtain an intermediate transaction data set.
  • the intermediate transaction data set is used to cycle operations S1 to S4 until the intermediate transaction data set satisfies a predetermined condition, and a target data set is obtained.
  • the transaction data set X 0 ⁇ x 1 , x 2 , x 3 ,..., x n ⁇ are divided into transaction data that does not need to be clipped and transaction data that can be clipped during the current round of clipping.
  • the data set constructed from transaction data that does not need to be clipped can be used as a reserved data set S 0
  • multiple data sets constructed from transaction data that can be clipped can be used as a clipped data set M0 is the number of cropped data sets in the first round of cropping of the cropped data set, and M is a positive integer greater than 1.
  • the transaction data set X 0 is divided into a reserved data set S 0 and M clipped data sets can be recorded as: It can also be written as formula (6):
  • the retained data set in the first round of pruning may be a non-empty data set.
  • the data clipping model F when used to perform the first round of data clipping on the M clipping data sets, that is, performing the first serialization encoding and hash calculation may include: for the l-th clipping data set W l 0 performs the first serialization encoding, where 1 ⁇ l ⁇ M, obtains the binary first serialization encoding value binW l 0 , and then performs hash calculation on the first serialization encoding value binW l 0 to obtain the data
  • M clipping data sets are first serialized and encoded and then hashed to obtain M first hash value sets corresponding to the first serialized encoding values of the corresponding clipping data sets, for example It can be expressed as formula (7):
  • the hash value set corresponding to the first round of pruning is combined with the reserved data set S 0 to obtain the intermediate transaction data set Y 0 , that is, the transaction data set X 0 is passed through the data pruning model
  • the transaction data X 1 obtained after the first round of pruning of F can be expressed as formula (8):
  • the intermediate transaction data set Y 0 (X 1 ) is used as an input data set to perform the above operations S1-S4, and the obtained intermediate transaction data set Y i is the transaction data set X 0 through data clipping
  • the transaction data X i+1 obtained after the i+1 round of pruning of the model F satisfies the predetermined conditions in the intermediate transaction data set Y i
  • the transaction data set Y i is used as the target data set X N , where 1 ⁇ i ⁇ N-1.
  • the intermediate transaction data set Y i obtained after the i+1 round of pruning for example, can be expressed as formula (9):
  • the process of performing N rounds of pruning on the transaction data set X0 can be expressed as formula (10):
  • X i+1 represents the data of the transaction data set X 0 cut by the i+1 layer of the data clipping model F;
  • X i is the input data set of the data clipping model F in the i+1 round of clipping;
  • Y i is The output data set of the data clipping model F during the i+1th round of clipping;
  • S i is the reserved data set of Xi during the i +1th layer clipping; be the clipping data set of Xi during the i +1th round of clipping, where Mi is the number of clipping data sets that need to be clipped for data clipping during the i+1th round of clipping;
  • b i is the number of data elements in the retained data set during the i+1 round of cropping;
  • the hth cropped data set during the i+1 round of cropping can be expressed as data set, where Cropped dataset for round i+1 Any clipping data set in , ci, h is The number of data elements in .
  • the transaction data set if the transaction data set is pruned round by round, the transaction data set will have an additional layer of hash pointers. It varies depending on the number of input data and the number of output data.
  • the output data cropped in the middle round can not be stored in the node, but can only be obtained again through temporary calculation of other data when needed, so as to reduce the pressure on data storage.
  • the division of M clipped data sets in the transaction data set during the same round of clipping realizes the separate hashing and encoding of different transaction data in the M clipped data sets, which is beneficial to subsequent Tracing and decoding of transaction data.
  • the input data and output data in the same round of hashing are packaged and encoded separately to facilitate data decoding and verification.
  • the target data set is processed to obtain a target value, and the target value is configured to point to the transaction identification number used when the target data set is on-chain.
  • processing the obtained target data set to obtain the target value may include: performing a second serialized encoding on the target data set to obtain a second serialized encoded value corresponding to the target data set.
  • a hash calculation is performed on the second serialized encoded value to obtain the target value.
  • the second serialized encoding is performed on the target data set X N to obtain the second serialized encoded value binX N corresponding to the target data set X N , and the second serialized encoded value binX N is performed Hash calculation to obtain the target value hash value HASH(binX N ), the target hash value is the obtained target value, which is configured to point to the transaction identification number TXID used when the target data set is on-chain.
  • the transaction identification number obtained by this method may be called a structured index transaction identification number.
  • the transaction data set contains all transaction data before the first round of pruning, and in the second round of pruning and above, the hash value of the data is used to replace the transaction data in the transaction data set.
  • Original data in the process of data migration, the traces of the original data always exist in the form of hash value, tampering with any transaction data will change the set of transaction input data cut each round to facilitate data traceability.
  • each data in the transaction data set exists in the blockchain or distributed network in the form of original data or in the form of hash code corresponding to the In the node of the transaction dataset. It solves the technical problem that when a node or transaction locking script needs to verify the authenticity of part of the transaction data in the input data, it must receive the entire and complete transaction data, which increases the amount of data required for the storage and transmission of transaction data. In this way, when it is only necessary to verify the authenticity of part of the data in the transaction data, the TXID of the transaction data where the part of the data is located and the hash value of other transaction data are used to verify the authenticity of part of the transaction data.
  • the user may not download or save the data content of the transaction output that he does not care about, but only download or save the hash value of these data content as a substitute.
  • the reserved data set is not an empty set, that is, the reserved data set is a non-empty data set in operation S110 .
  • the transaction data set is hash-trimmed for the first time in the j-round pruning process, the transaction data set exists in the reserved data set in the first j-1 rounds of pruning process, so as to facilitate data traceability.
  • any pruning data set W h may contain one or more pieces of data. That is, in the embodiments of the present disclosure, during each round of data clipping, any clipped data set W h may contain one or more data. In this way, multiple data are packaged into a cropped data set for uniform encoding and hash transformation, which reduces the workload and improves work efficiency. Through the division of the clipping data set in the same layer of hash clipping, the separate hash coding of different types of data is realized, which is beneficial to the subsequent traceability and decoding of data.
  • the transaction data set X 0 may include: the transaction version number Version, the transaction time lock data LockTime, the number of transaction inputs InputCount, each transaction input All data elements contained in the data TxIn, the number of transaction outputs OutputCount, and all data elements contained in the data TxOut of each transaction output.
  • all data elements contained in the data TxIn of each transaction input include: TXID, VOUT, Unlocking Script Size, Unlocking Script and Sequence data, where TXID specifies the previous transaction corresponding to the input, and VOUT specifies The ordering position of the transaction output of the previous transaction, the two jointly specify the output TxOut position of the previous transaction spent by the input, and the Unlocking Script records the unlocking script required to spend this transaction output.
  • All data elements contained in the data TxOut of each transaction output are: Value, Locking Script Size and Locking Script.
  • the unlocking script elements of each transaction input data in the transaction data set form an independent Clip the dataset.
  • the data elements related to the unlocking script elements in the input data of each transaction belong to the same pruning data set, where 2 ⁇ j ⁇ N.
  • the locking script elements of each transaction output data in the transaction data set form an independent Clip the dataset.
  • the data elements related to the locking script elements of each transaction output data belong to the same pruning data set, where 2 ⁇ j ⁇ N.
  • each Unlocking Script Size follows the Unlocking Script data
  • the Locking Script Size data follows the Locking Script data, into the same prunable data set, so that the pruned output data can be concentrated with the transaction input and output content
  • the relevant data has a constant byte length, which facilitates the rapid segmentation and analysis of transaction data.
  • the unlocking script size data is a measure of the length of the unlocking script data
  • the unlocking script size data can be derived from the unlocking script data, therefore, the locking script size data may not be recorded in the transaction data set, and may not Participate in the calculation of the subsequent transaction identification number; similarly, the locked script size data may not be recorded in the transaction data set, or may not participate in the subsequent calculation of the transaction identification number.
  • the unlocking script (Unlocking Script) data in each transaction input is used to prove the legal validity of the transaction to the ledger maintenance node, which may include the previous transaction data or other data that can lead to a large transaction volume.
  • the ledger maintenance node basically no longer needs this data.
  • the Unlocking Script data in each transaction input is individually hashed, the data content can be trimmed as needed in subsequent transaction scripts or node interactions, and only its hash value is retained to verify the authenticity of other data in the transaction. real legitimacy.
  • the Locking Script in each transaction output represents the spending condition of the transaction output, which can have the same content in different outputs of different transactions, and is used to express the same transaction acceptor or verification script code.
  • the script can have a large size and be used multiple times in some scenarios.
  • hashing the locking script of each output individually on the one hand, it is possible to prove that the script is a transaction at a specific position in a transaction without giving the full content of the script, only using its hash value output, so as to reduce the size of transaction scripts or interactive data between nodes.
  • multiple transactions can share this part of transaction data through the same hash pointer to save storage space.
  • any elements of each transaction input data in the transaction data set form an independent pruning data set;
  • An independent clipping data set is formed between any elements of each transaction output data of , where 2 ⁇ j ⁇ N-1.
  • any round of trimming above the second round optionally, for the second round and any round of trimming above the second round, only two trimmable data sets are set, one is used to contain the content of any transaction input Related data elements, a data element used to contain the content related to any transaction output. Redundant data can be reduced after the first round of pruning, and the division of the two prunable data sets in the second and second rounds and above can make the input-related data and output-related data independent of each other, avoiding possible
  • the over-division of the clipping data set further facilitates the traceability of the data.
  • the transaction version number Version when multiple rounds of pruning is performed on the transaction data set X 0 in the distributed ledger under the UTXO model, the transaction version number Version, transaction time lock data LockTime, transaction input individual The number InputCount, the TXID, VOUT and Sequence in each transaction input data TxIn, the number of transaction outputs OutputCount, and the Value in each transaction output data TxOut belong to the reserved data set S 0 .
  • the Unlocking Script Size, Unlocking Script in the transaction input data TxIn in the transaction data set, and the Unlocking Script of the transaction output
  • the Locking Script Size and Locking Script in the data TxOut perform a generalized hash calculation to reduce redundant data.
  • S g′ the reserved data set of any data in the data set G
  • G the data node with the transaction version number Version and the transaction time lock data Lock Time is closest to the root node, which facilitates the identification of these two parts of the data in the transaction.
  • the method for uploading N rounds of clipped data to the chain applied to the blockchain will be described in detail in conjunction with three embodiments of the distributed ledger under the UTXO model.
  • the Bitcoin Nakamoto Vision (BSV) blockchain is taken as an example, but those skilled in the art should understand that this does not constitute a limitation to the protection scope of the present invention, and the target blockchain of this implementation It can be other transactions with similar transaction data elements, including the Bitcoin (BTC) blockchain, Dogecoin (DOGE) blockchain, Litecoin (LTC) blockchain, and Bitcoin Cash (BCH) blockchain.
  • BTC Bitcoin Nakamoto Vision
  • DOGE Dogecoin
  • LTC Litecoin
  • BCH Bitcoin Cash
  • the following three embodiments all use two-input and two-output transactions, which can also be transactions with any number of inputs and any number of outputs, and only need to apply the implementation of the first two transaction inputs or transaction outputs to Other transaction inputs or outputs are fine.
  • Table 1 is the composition of the transaction data set X 0 in the following embodiments 1-3. As shown in Table 1.
  • the transaction data set X 0 in Table 1 is pruned round by round.
  • the division of the reserved data set S and the pruned data set W is shown in Table 2 and FIG. 3 .
  • the Unlocking Script element and the Unlocking Script Size element of each input (TxIn) of the transaction form a clipping data set
  • the Locking Script element and the Locking Script element of each output (TxOut) of the transaction are combined with the Locking Script Size element.
  • Script Size elements make up a cropped dataset.
  • Fig. 3 schematically shows a schematic diagram of division of transaction data sets according to Embodiment 1 of the present disclosure.
  • Table 2 is the partition table of the reserved data set and the pruned data set for the transaction data set X 0 when one round of pruning is performed on the transaction data set X 0 . As shown in table 2.
  • TxOut1 Locking Script data of the transaction provided by other nodes or users
  • TXID transaction identification number
  • the data in the transaction can be verified by hash calculation whether the provided data is indeed the corresponding data in the transaction.
  • all input raw data of Unlocking Script and Unlocking Script Size and raw data of Locking Script and Locking Script Size in the second output can be trimmed to achieve the purpose of data reduction.
  • a node when a node needs to reuse TxOut1: Locking Script data, it can use the hash pointer HASH (binW 3 0 ) to store the data. When other transactions also have the same Locking Script data, they can share this The data pointed to by the hash pointer.
  • the verification of other data may use the above method to provide necessary verification data for verification, so as to fully reduce the size of the data, and details will not be repeated here.
  • a second round of pruning is performed on the transaction data set X0 .
  • the division of the reserved data set S and the pruned data set W is shown in Table 3 and Figure 4 below.
  • the Unlocking Script element and the Unlocking Script Size element of each input (TxIn) of the transaction form a clipping data set
  • the Locking Script element and the Locking Script element of each output (TxOut) of the transaction are combined with the Locking Script Size element.
  • Script Size elements make up a cropped dataset.
  • the data elements related to the content of any transaction input belong to the same pruning data set, and the data elements related to the content of any transaction output belong to another pruning data set.
  • datasets such as:
  • a j is a set or an empty set containing any data elements
  • f j represents the hash value, 1 ⁇ j ⁇ k
  • R(f j ) represents the preimage of the hash value f j
  • the preimage is the data set or A collection of strings
  • x′ is a data element in any transaction input
  • x′, f 1 , f 2 , f 3 ,..., f k are all data elements related to the transaction input content
  • x' is a data element in any transaction output
  • x', f 1 , f 2 , f 3 ,..., f k are all data elements related to the content of the transaction output.
  • two clipping data sets are set, one W 1 1 is used to store data elements related to the content of any transaction input, and one W 2 1 is used to store A data element related to the content of any transaction output.
  • the redundant data can be reduced by cutting the first layer, and the division of the two cuttable data sets on the second layer and above can make the input related data and output related data independent of each other, avoiding the excessive cutting of the cutable data set.
  • the situation of division further facilitates the traceability of data.
  • Fig. 4 schematically shows a schematic diagram of division of transaction data sets according to Embodiment 2 of the present disclosure.
  • Table 3 is the partition table of the reserved data set and the pruned data set for the transaction data set X 0 when the second round of pruning is performed on the transaction data set X 0 . as shown in Table 3.
  • TxOut1 Locking Script data of the transaction provided by other nodes or users
  • TXID transaction identification number
  • the data in the transaction can be verified by hash calculation whether the provided data is indeed the corresponding data in the transaction.
  • all input raw data and the Locking Script and Locking Script Size raw data in the second output can be trimmed to achieve the purpose of data reduction.
  • a node when a node needs to reuse TxOut1:Locking Script data, it can use the hash pointer HASH (binW 3 0 ) to store the data. When other transactions also have the same Locking Script data, they can share this The data pointed to by the hash pointer.
  • the verification of other data may use the above method to provide necessary verification data for verification, so as to fully reduce the size of the data, and details will not be repeated here.
  • a second round of pruning is performed on the transaction data set X 0 .
  • the measurement elements in the transaction data including the element representing the byte length of a certain element in the transaction data and the count element representing the number of certain types of elements in the transaction data, are not trimmed together with the measurement target element.
  • the Unlocking Script Size element in each transaction input data does not belong to the same clipping data set as the Unlocking Script element
  • the Locking Script Size element in each transaction output data does not belong to the same clipping data set as the Locking Script element
  • the InputCount element does not belong to the same clipping data set as the TXID in all transaction input data
  • the OutputCount element does not belong to the same clipping data set as the Value element in all output transaction data.
  • the Unlocking Script element of each input (TxIn) of the transaction forms an independent tailorable data set
  • the Locking Script element of each output (TxOut) of the transaction forms an independent Datasets can be clipped.
  • Fig. 5 schematically shows a schematic diagram of division of transaction data sets according to Embodiment 3 of the present disclosure.
  • Table 3 is the partition table of the reserved data set and the pruned data set for the transaction data set X 0 when the second round of pruning is performed on the transaction data set X 0 . As shown in Table 4.
  • TxOut1 Locking Script data of the transaction provided by other nodes or users
  • TXID transaction identification number
  • the data in the transaction can be verified by hash calculation whether the provided data is indeed the corresponding data in the transaction.
  • all input raw data and the Locking Script and Locking Script Size raw data in the second output can be trimmed to achieve the purpose of data reduction.
  • a node when a node needs to reuse TxOut1: Locking Script data, it can use the hash pointer HASH (binW 0 3 ) to store the data. When other transactions also have the same Locking Script data, they can share this The data pointed to by the hash pointer.
  • the verification of other data may use the above method to provide necessary verification data for verification, so as to fully reduce the size of the data, and details will not be repeated here.
  • the present disclosure also provides a device for hierarchically clipping data in a blockchain transaction.
  • Fig. 6 schematically shows a structural block diagram of an apparatus for hierarchically pruning data in a blockchain transaction according to an embodiment of the present disclosure.
  • the apparatus 600 includes: an acquisition module 610 , a clipping module 620 and a processing module 630 .
  • An acquisition module 610 configured to acquire a transaction data set.
  • the pruning module 620 is configured to perform N rounds of pruning on the transaction data set based on the data pruning model to obtain a target data set, wherein N is a positive integer greater than or equal to 1.
  • the processing module 630 is configured to process the target data set to obtain a target value, wherein the target value is configured to point to the transaction identification number used when the target data set is on-chain.
  • the clipping module 620 may include: a construction submodule 620-1, a serialization encoding submodule 620-2, a calculation submodule 620-3, an acquisition submodule 620-4, and a loop submodule 620-5.
  • the construction sub-module 620-1 is configured to use the transaction data set to construct a reserved data set and M clipped data sets, where M is a positive integer greater than or equal to 1.
  • the serialization encoding sub-module 620-2 is configured to perform the first serialization encoding on the clipping data set to obtain the first serialization encoding value corresponding to the clipping data set.
  • the calculating sub-module 620-3 is configured to perform hash calculation on the first serialized encoding value to obtain a first hash value corresponding to the first serialized encoding value.
  • Obtaining sub-module 620-4 configured to construct a first hash value set from the M first hash values corresponding to the first serialized encoding value, and combine them with the reserved data set to obtain an intermediate transaction data set.
  • the cycle sub-module 620-5 is used to cycle the operations corresponding to the above sub-modules by using the intermediate transaction data set until the intermediate transaction data set satisfies the predetermined condition to obtain the target data set.
  • any multiple modules of the acquiring module 610, the clipping module 620 and the processing module 630 may be implemented in one module, or any one of the modules may be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module.
  • At least one of the acquisition module 610, the cropping module 620, and the processing module 630 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), A system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuits, such as hardware or firmware, or in a combination of software, hardware, and firmware Any one of these implementations or an appropriate combination of any of them.
  • FPGA field programmable gate array
  • PLA programmable logic array
  • ASIC application-specific integrated circuit
  • at least one of the obtaining module 610, the cropping module 620 and the processing module 630 may be at least partially implemented as a computer program module, and when the computer program module is executed, corresponding functions may be performed.
  • Fig. 7 schematically shows a block diagram of an electronic device suitable for implementing a method for hierarchically pruning data in a blockchain transaction according to an embodiment of the present disclosure.
  • an electronic device 700 includes a processor 701, which can be loaded into a random access memory (RAM) 703 according to a program stored in a read-only memory (ROM) 702 or from a storage section 708.
  • processor 701 may include, for example, a general-purpose microprocessor (eg, a CPU), an instruction set processor and/or related chipsets, and/or a special-purpose microprocessor (eg, an application-specific integrated circuit (ASIC)), and the like.
  • Processor 701 may also include on-board memory for caching purposes.
  • the processor 701 may include a single processing unit or a plurality of processing units for executing different actions of the method flow according to the embodiments of the present disclosure.
  • the processor 701, ROM 702, and RAM 703 are connected to each other through a bus 704.
  • the processor 701 executes various operations according to the method flow of the embodiment of the present disclosure by executing programs in the ROM 702 and/or RAM 703. It should be noted that programs may also be stored in one or more memories other than ROM 702 and RAM 703.
  • the processor 701 may also perform various operations according to the method flow of the embodiments of the present disclosure by executing programs stored in one or more memories.
  • the electronic device 700 may further include an input/output (I/O) interface 705 which is also connected to the bus 704 .
  • the electronic device 700 may also include one or more of the following components connected to the I/O interface 705: an input section 706 including a keyboard, a mouse, etc.; An output section 707 of a speaker or the like; a storage section 708 including a hard disk or the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like.
  • the communication section 709 performs communication processing via a network such as the Internet.
  • a drive 710 is also connected to the I/O interface 705 as needed.
  • a removable medium 711 such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc. is mounted on the drive 710 as necessary so that a computer program read therefrom is installed into the storage section 708 as necessary.
  • the present disclosure also provides a computer-readable storage medium.
  • the computer-readable storage medium may be included in the device/apparatus/system described in the above embodiments; it may also exist independently without being assembled into the device/system device/system.
  • the above-mentioned computer-readable storage medium carries one or more programs, and when the above-mentioned one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as may include but not limited to: portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM) , erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable storage medium may include one or more memories other than the above-described ROM 702 and/or RAM 703 and/or ROM 702 and RAM 703.
  • Embodiments of the present disclosure also include a computer program product, which includes a computer program, and the computer program includes program codes for executing the method shown in the flow chart.
  • the program code is used to make the computer system implement the item recommendation method provided by the embodiments of the present disclosure.
  • the computer program may rely on tangible storage media such as optical storage devices and magnetic storage devices.
  • the computer program can also be transmitted and distributed in the form of a signal on a network medium, downloaded and installed through the communication part 709, and/or installed from the removable medium 711.
  • the program code contained in the computer program can be transmitted by any appropriate network medium, including but not limited to: wireless, wired, etc., or any appropriate combination of the above.
  • the computer program may be downloaded and installed from a network via communication portion 709 and/or installed from removable media 711 .
  • the computer program is executed by the processor 701
  • the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed.
  • the above-described systems, devices, devices, modules, units, etc. may be implemented by computer program modules.
  • the program codes for executing the computer programs provided by the embodiments of the present disclosure can be written in any combination of one or more programming languages, specifically, high-level procedural and/or object-oriented programming language, and/or assembly/machine language to implement these computing programs.
  • Programming languages include, but are not limited to, programming languages such as Java, Rust, C++, python, "C" or similar.
  • the program code can execute entirely on the user computing device, partly on the user device, partly on the remote computing device, or entirely on the remote computing device or server.
  • the remote computing device may be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider). business to connect via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service provider an Internet service provider
  • each block in a flowchart or block diagram may represent a module, program segment, or portion of code that includes one or more logical functions for implementing specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block in the block diagrams or flowchart illustrations, and combinations of blocks in the block diagrams or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a A combination of dedicated hardware and computer instructions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Business, Economics & Management (AREA)
  • Computing Systems (AREA)
  • Accounting & Taxation (AREA)
  • Computer Hardware Design (AREA)
  • Finance (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本公开提供一种分层裁剪区块链交易内数据的方法,包括:获取交易数据集。基于数据裁剪模型,对交易数据集进行N轮次裁剪,得到目标数据集,包括:S1,利用交易数据集构造保留数据集和M个裁剪数据集。S2,对裁剪数据集进行第一序列化编码,得到第一序列化编码值。S3,对第一序列化编码值进行哈希计算,得到与第一序列化编码值对应的第一哈希值。S4,将M个与第一序列化编码值对应的第一哈希值构造第一哈希值集合,并与保留数据集做并集,得到中间交易数据集。S5,利用中间交易数据集循环操作S1~S4,直至中间交易数据集满足预定条件,得到目标数据集。对目标数据集进行处理,得到目标值,目标值被配置为指向目标数据集上链时使用的交易识别号。

Description

分层裁剪区块链交易内数据的方法、装置、设备及介质
相关申请的引用
本申请要求于2021年06月18日向中国国家知识产权局递交的发明名称为“一种分层裁剪区块链交易内数据的方法、系统和存储介质”的中国专利申请202110682927.8的优先权,该申请的全部内容通过引用加入至本申请中。
技术领域
本公开属于区块链技术领域,尤其涉及一种分层裁剪区块链交易内数据的方法、装置、设备及介质。
背景技术
区块链技术是一种分布式账本的技术,由一种由分布在不同地理位置的多个账本维护节点共同参与记账,将交易数据记录到一份分布式数据库的技术。账本维护节点为运行兼容的同类记账软件且可能会成为记账节点的节点。交易数据可以定义为所有账本维护节点间传输的功能完整且独立的记账数据单元。每次记账由用户广播或点对点的发送一个交易到分布式网络中,并由根据共识规则选出的记账节点添加到账本数据库中,最后通过其他账本维护节点的验证来实现。
网络中也存在不参与记账但仍记录完整的或部分的、历史的或当前的交易数据的节点,可称为账本同步节点。网络中还存在一些用户节点,只保存用户自身或者用户群组自身相关的交易数据,或者也保存最基本的区块头结构数据,其被称为轻节点。特别的,在本公开中,使用“区块链”仅为了简化描述,其含义不限于此狭义的区块链网络,而是包括所有形式的分布式分类账,其中的记账交易亦不必被打包为一个区块,也可以以相对独立的方式加入到分布式账本中。
在现有区块链技术中,交易中的主要数据被整体哈希以得到交易识别号TXID,当节点需要使用哈希计算来验证其中部分交易数据的真伪时,必须接收该TXID指向的交易的完整交易数据,增加了交易数据的存储、传输与二次利用的成本,增大了不必要的用户负担。
公开内容
为了至少部分解决上述问题,本公开提供了一种分层裁剪区块链交易内数据的方法、装置、电子设备、存储介质和程序产品。
根据本公开的一方面,提供了一种分层裁剪区块链交易内数据的方法,包括:获取交易数据集。基于数据裁剪模型,对交易数据集进行N轮次裁剪,得到目标数据集,其中,N为大于等于1的正整数。对目标数据集进行处理,得到目标值,其中,目标值被配置为指向目标数据集上链时使用的交易识别号。
根据本公开的实施例,基于数据裁剪模型,对交易数据集进行N轮次裁剪,得到目标数据集,包括:S1,利用交易数据集构造保留数据集和M个裁剪数据集,其中,M为大于等于1的正整数。S2,对裁剪数据集进行第一序列化编码,得到与裁剪数据集对应的第一序列化编码值。S3,对第一序列化编码值进行哈希计算,得到与第一序列化编码值对应的第一哈希值。S4,将M个与第一序列化编码值对应的第一哈希值构造第一哈希值集合,并与保留数据集做并集,得到中间交易数据集。S5,利用中间交易数据集循环操作S1~S4,直至中间交易数据集满足预定条件,得到目标数据集。
根据本公开的另一方面,提供了一种分层裁剪区块链交易内数据的装置,包括:获取模块,用于获取交易数据集。裁剪模块,用于基于数据裁剪模型,对交易数据集进行N轮次裁剪,得到目标数据集,其中,N为大于等于1的正整数。处理模块,用于对目标数据集进行处理,得到目标值,其中,目标值被配置为指向目标数据集上链时使用的交易识别号。
根据本公开的另一方面,提供了一种电子设备,包括:一个或多个处理器。存储装置,用于存储一个或多个程序,其中,当一个或多个程序被一个或多个处理器执行时,使得一个或多个处理器执行上述分层裁剪区块链交易内数据的方法。
根据本公开的另一方面,提供了一种计算机可读存储介质,其上存储有可执行指令,该指令被处理器执行时使处理器执行上述分层裁剪区块链交易内数据的方法。
根据本公开的另一方面,提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述分层裁剪区块链交易内数据的方法。
附图说明
图1示意性示出了根据本公开实施例的分层裁剪区块链交易内数据的方法的流程图;
图2示意性示出了根据本公开实施例的对交易数据进行N轮次裁剪,得到目标数据集的方法的流程图;
图3示意性示出了根据本公开实施例一的交易数据集划分示意图;
图4示意性示出了根据本公开实施例二的交易数据集划分示意图;
图5示意性示出了根据本公开实施例三的交易数据集划分示意图;
图6示意性示出了根据本公开实施例的分层裁剪区块链交易内数据的装置的结构框图; 以及
图7示意性示出了根据本公开实施例的适于实现分层裁剪区块链交易内数据的方法的电子设备的方框图。
具体实施方式
以下,将参照附图来描述本公开的实施例。但是应该理解,这些描述只是示例性的,而并非要限制本公开的范围。在下面的详细描述中,为便于解释,阐述了许多具体的细节以提供对本公开实施例的全面理解。然而,明显地,一个或多个实施例在没有这些具体细节的情况下也可以被实施。此外,在以下说明中,省略了对公知结构和技术的描述,以避免不必要地混淆本公开的概念。
在此使用的术语仅仅是为了描述具体实施例,而并非意在限制本公开。在此使用的术语“包括”、“包含”等表明了特征、步骤、操作和/或部件的存在,但是并不排除存在或添加一个或多个其他特征、步骤、操作或部件。
在此使用的所有术语(包括技术和科学术语)具有本领域技术人员通常所理解的含义,除非另外定义。应注意,这里使用的术语应解释为具有与本说明书的上下文相一致的含义,而不应以理想化或过于刻板的方式来解释。
在使用类似于“A、B和C等中至少一个”这样的表述的情况下,一般来说应该按照本领域技术人员通常理解该表述的含义来予以解释(例如,“具有A、B和C中至少一个的系统”应包括但不限于单独具有A、单独具有B、单独具有C、具有A和B、具有A和C、具有B和C、和/或具有A、B、C的系统等)。
在本公开的技术方案中,对数据的获取、收集、存储、使用、加工、传输、提供、公开和应用等处理,均符合相关法律法规的规定,采取了必要保密措施,且不违背公序良俗。
图1示意性示出了根据本公开实施例的分层裁剪区块链交易内数据的方法的流程图。
如图1所示,该方法100包括操作S110~S130。
在操作S110,获取交易数据集。
在操作S120,基于数据裁剪模型,对交易数据集进行N轮次裁剪,得到目标数据集,N为大于等于1的正整数。
根据本公开的实施例,在应用于UTXO模型下的分布式账本的情况下,在不同的交易数据输入与交易数据输出的个数的情况下,裁剪轮次N可以根据实际裁剪需求进行确定,确定具体的裁剪伦次之后,执行对交易数据集的裁剪操作。裁剪轮次N可以为不受交易数据输入和交易数据输出的个数的影响,也即是,裁剪轮次N可以不依赖交易数据输入和交易数据输 出的个数。
根据本公开的实施例,通过确定裁剪轮次从而确定裁剪层级个数的模式,有利于简化相关软件代码的实施,同时也有利于对本申请裁剪方法实现代码硬件化。
根据本公开的实施例,交易数据集可以为分布式账本网络中传播的完整交易数据的集合,交易数据集可以表示为X 0。完整交易数据数据的集合可以包括所有必要的交易数据元素,而不必包括部分冗余数据。必要数据可以为交易有效性被账本维护节点验证时所需要的数据。例如,解锁脚本大小数据或锁定脚本大小数据也是一种冗余数据,可以为不需要被账本维护节点验证所需要的数据。根据本公开的实施例,交易数据集X 0可以由多段数据组合形成,例如可以表示为式(1):
X 0={x 1,x 2,x 3,...,x n}  (1)
其中,x 1,x 2,x 3,...,x n为交易数据集中的数据元素,n为交易数据集中的数据元素的数量。
根据本公开的实施例,通过数据裁剪模型F对交易数据集进行每轮次裁剪后得到的数据集,例如可以表示为式(2):
Y=S∪{HASH(binW 1),HASH(binW 2),...,HASH(binW M)}  (2)
其中,S为输入数据集X中的保留数据集;W 1,W 2,...,W M为输入数据集X中的裁剪数据集;M为裁剪数据集的数量;binW M为裁剪数据集W M的序列化编码值;HASH(binW M)为binW M的哈希值;Y为输入数据集X经数据裁剪模型裁剪后的数据集。其中,X、S和W h例如可以表示为式(3):
X={x 1,x 2,x 3,...,x a};S={s 1,s 2,s 3,...,s b};
Figure PCTCN2022090567-appb-000001
其中,W h为裁剪数据集W 1、W 2、...、W M中的任一裁剪数据集;a为输入数据集X中的数据元素的数量,x 1,x 2,x 3,...,x a为输入数据集X中的数据元素;b为保留数据集S中的数据元素的数量(b≥0),s 1,s 2,s 3,...,s b为保留数据集S中的数据元素;h为裁剪数据集的数量,1≤h≤M;c h为裁剪数据集W h中的数据元素的数量,且c h≥1,
Figure PCTCN2022090567-appb-000002
为裁剪数据集W h中的数据元素。
根据本公开的实施例,可选的,输入数据集可以设置为式(4):
X=S∪W 1∪W 2∪...∪W M  (4)
该式(4)中,输入数据集X表示为保留数据集S与裁剪数据集W 1、W 2、...、W M的并集,以减少冗余数据。
根据本公开的实施例,可选的,输入数据集也可以设置为式(5):
X=S+W 1+W 2+...+W M,a=b+c 1+c 2+...+c M,M+1≤a  (5)
根据本公开的实施例,输入数据集X表示为式五的形式,以避免数据重复,提高数据裁剪效率。
需要说明的是,在本公开实施例中,例如,HASH(p)表示对数据p进行一次或一次以上嵌套的哈希计算后获得的哈希值;对数据p进行一次哈希计算获得的哈希值记作hash(p),对数据p进行r次嵌套的哈希计算后获得的哈希值记作HASH r(p),HASH r(p)=hash(HASH r-1(p)),r≥1,HASH 0(p)=p。
其中,hash(HASH r-1(p))中的hash表示第r次哈希计算时使用的hash函数,hash函数可以是任意一种哈希函数或者是新设计的具有同等功效的函数。HASH r(p)由r个任意的hash函数嵌套组成,该r个hash函数可以不同或相同。
根据本公开的实施例,例如,对任意一个数据集R的序列化编码操作记为Encode(R),编码操作后的输出数据为二进制数据,可相应记为binR或者bin(R),即有bin(R)=binR=Encode(R)。该编码操作中可以加入一些常量数据与共识规则,以满足特定的检索与解码需要。该编码操作可以是具备逆向解码操作方法(记为Decode)的任意一种变换操作,即具有特性R=Decode(Encode(R))。
根据本公开的实施例,基于数据裁剪模型F对交易数据集进行N轮次裁剪可以包括对交易数据集中的数据元素进行裁剪,形成裁剪数据集,并对裁剪数据集进行序列化编码并哈希计算,保留未裁剪的数据集,将裁剪数据的哈希值组成的哈希集合和保留的未裁剪的数据集形成目标数据集。
例如,图2示意性示出了根据本公开实施例的对交易数据进行N轮次裁剪,得到目标数 据集的方法的流程图。
如图2所示,该方法200还包括操作S1~S5。
在操作S1,利用交易数据集构造保留数据集和M个裁剪数据集,其中,M为大于等于1的正整数。
在操作S2,对裁剪数据集进行第一序列化编码,得到与裁剪数据集对应的第一序列化编码值。
在操作S3,对第一序列化编码值进行哈希计算,得到与第一序列化编码值对应的第一哈希值。
在操作S4,将M个与第一序列化编码值对应的第一哈希值构造第一哈希值集合,并与保留数据集做并集,得到中间交易数据集。
在操作S5,利用中间交易数据集循环操作S1~S4,直至中间交易数据集满足预定条件,得到目标数据集。
根据本公开的实施例,交易数据集作为输入数据集进行第一轮次裁剪时,可以根据数据划分规则,将该交易数据集X 0={x 1,x 2,x 3,...,x n}划分为当前轮次裁剪过程中不需要裁剪的交易数据和可裁剪的交易数据。不需要裁剪的交易数据构造数据集,可以作为保留数据集S 0,可裁剪的交易数据构造多个数据集,可以作为裁剪数据集
Figure PCTCN2022090567-appb-000003
M0为裁剪数据集在第一轮次裁剪时的裁剪数据集的数量,M为大于1的正整数。
根据本公开的实施例,将交易数据集X 0划分为保留数据集S 0和M个裁剪数据集
Figure PCTCN2022090567-appb-000004
可以记作:
Figure PCTCN2022090567-appb-000005
也可以记作式(6):
Figure PCTCN2022090567-appb-000006
根据本公开的实施例,第一轮裁剪时的保留数据集可以为非空数据集。
根据本公开的实施例,通过数据裁剪模型F,对M个裁剪数据集分别进行第一轮数据裁剪时,即进行第一序列化编码并哈希计算可以包括:对第l个裁剪数据集W l 0进行第一序列化编码,其中,1≤l≤M,得到二进制的第一序列化编码值binW l 0,再对该第一序列化编码值binW l 0进行哈希计算,得到该数据集W l 0的哈希指针hashW l 0,即,与该数据集的第一序列化编码值对应的第一哈希值hashW l 0=HASH(binW l 0)。
根据本公开的实施例,对M个裁剪数据集进行第一序列化编码后再哈希计算,得到M 个与相应裁剪数据集的第一序列化编码值对应的第一哈希值集合,例如可以表示为式(7):
Figure PCTCN2022090567-appb-000007
根据本公开的实施例,将第一轮次裁剪对应的哈希值集合与保留数据集S 0做并集,得到中间交易数据集Y 0,也即,对交易数据集X 0通过数据裁剪模型F的第一轮次裁剪后得到的交易数据X 1,例如可以表示为式(8):
Figure PCTCN2022090567-appb-000008
根据本公开的实施例,将该中间交易数据集Y 0(X 1)作为输入数据集以执行上述操作S1~S4,得到的中间交易数据集Y i,即对交易数据集X 0通过数据裁剪模型F的第i+1轮次裁剪后得到的交易数据X i+1,在中间交易数据集Y i满足预定条件,将该交易数据集Y i作为目标数据集X N,其中,1≤i≤N-1。第i+1轮次裁剪后的得到的中间交易数据集Y i,例如可以表示为式(9):
Figure PCTCN2022090567-appb-000009
需要说明的是,对交易数据集或中间交易数据集通过数据裁剪模型F进行数据裁剪时,每一轮次数据裁剪的过程都是相互独立的,即,M0、M1、...、Mi、...、M(N-1)均为独立常数。
根据本公开的实施例,对交易数据集X 0进行N轮次裁剪的过程,例如可以表示为式(10):
Figure PCTCN2022090567-appb-000010
其中,X i+1表示交易数据集X 0经数据裁剪模型F的i+1层裁剪后的数据;X i为第i+1轮次裁剪时数据裁剪模型F的输入数据集;Y i为第i+1轮次裁剪时数据裁剪模型F的输出数据集;S i为第i+1层裁剪时的X i的保留数据集;
Figure PCTCN2022090567-appb-000011
为第i+1轮次裁剪时的X i的裁剪数据集,其中,Mi为第i+1轮次裁剪时需要进行数据裁剪的裁剪数据集的数量;
Figure PCTCN2022090567-appb-000012
其中,b i为第i+1轮次裁剪时的保留数据集中的数据元素的数量; 第i+1轮次裁剪时的第h个裁剪数据集可表示为
Figure PCTCN2022090567-appb-000013
数据集,其中,
Figure PCTCN2022090567-appb-000014
为第i+1轮次裁剪时的裁剪数据集
Figure PCTCN2022090567-appb-000015
中的任一裁剪数据集,c i,h
Figure PCTCN2022090567-appb-000016
中的数据元素的数量。
根据本公开的实施例,对交易数据集进行一轮次裁剪,则交易数据集就多一层哈希指针,在每轮次裁剪过程中的保留数据集和裁剪数据集的数量因交易中的输入数据个数与输出数据个数的不同而有变化。
根据本公开的实施例,在中间轮次裁剪的输出数据,如
Figure PCTCN2022090567-appb-000017
可以不在节点中存储,而仅在需要时通过其他数据经过临时计算而再次获得,以减小数据存储压力。
根据本公开的实施例,在同一轮次裁剪过程中对交易数据集中的M个裁剪数据集的划分,实现了对M个裁剪数据集中的不同交易数据的分开哈希与编码,有利于后续对交易数据的追溯和解码。例如,对同一轮次哈希中的输入数据和输出数据分开打包编码,便于数据解码验证。
在操作S130,对目标数据集进行处理,得到目标值,目标值被配置为指向目标数据集上链时使用的交易识别号。
根据本公开的实施例,对得到的目标数据集进行处理,得到目标值,可以包括:对目标数据集进行第二序列化编码,得到与目标数据集对应的第二序列化编码值。对第二序列化编码值进行哈希计算,得到目标值。
根据本公开的实施例,对目标数据集X N进行第二序列化编码,得到与目标数据集X N对应的第二序列化编码值binX N,并对该第二序列化编码值binX N进行哈希计算,得到目标值哈希值HASH(binX N),该目标哈希值为得到的目标值,被配置为指向目标数据集上链时使用的交易识别号TXID。
根据本公开的实施例,该方法得到的交易识别号可以被称为一种结构化索引的交易识别号。
根据本公开的实施例,交易数据集在被裁剪之前,特别是区块链维护节点之间传输时,可以选择保持传输的原始交易数据的格式不变,沿用当前已有的格式,以兼容当前软件与应用环境。
根据本公开的实施例,交易数据集在第一轮次裁剪之前,包含有所有交易数据,在第二轮次及第二轮次以上的裁剪过程中,以数据哈希值取代交易数据集中的原始数据,在数据迁 移过程中,原始数据的痕迹以哈希值表示始终存在,对任意交易数据的篡改均会使得每轮次裁剪的交易输入数据集合发生改变,以方便数据追溯。
根据本公开的实施例,通过对交易数据集进行多层哈希处理,交易数据集中的每个数据均以原数据的形态或者哈希编码的形态存在于区块链或分布式网络中对应该交易数据集的节点中。解决了当节点或交易锁定脚本需要验证输入的数据中的部分交易数据的真伪时,必须接收整个完整的该交易数据,增加了交易数据的存储及传输所需的数据量的技术问题。从而实现在只需验证交易数据中的部分数据的真伪时,利用该部分数据所在的交易数据的TXID以及其他交易数据的哈希值,实现对部分交易数据的真伪性的验证,也可使得该交易数据集在节点间迁移的过程中按需缩减冗余数据,以减少数据传输过程中的数据包大小,避免冗余数据的重复传输,从而提高数据传输和处理效率。同时,由于数据迁移过程中,至少以哈希编码的形式存在于数据节点中,保证了数据的可靠性验证,避免数据被篡改。且,通过数据的分层哈希,方便了对指定数据的追溯,使得用户可根据需要进行数据下载,以获得需要数据的同时,也避免冗余数据的下载。
根据本公开的实施例,例如,对于UTXO模型下的多个交易输出,用户可以不用下载或不用保存自身不关心的交易输出的数据内容,仅下载或保存这些数据内容的哈希值作为替代。
根据本公开的实施例,为了保证数据分层哈希,保证部分常用数据的快速追溯,可设置
Figure PCTCN2022090567-appb-000018
进一步实施时,还可设置通过数据裁剪模型F对数据进行哈希裁剪时,每一层裁剪过程中,保留数据集均不为空集,即,在操作S110中保留数据集为非空数据集。
根据本公开的实施例,可选的,
Figure PCTCN2022090567-appb-000019
其中,
Figure PCTCN2022090567-appb-000020
为第i+1轮次裁剪时的保留数据集中的第k个数据元素,S j为第j轮次裁剪时的保留数据集。即,当交易数据集在第j轮次裁剪过程中首次被哈希裁剪,则该交易数据集在前j-1轮次裁剪过程中均存在于保留数据集中,以方便数据追溯。
根据本公开的实施例,通过数据裁剪模型F对数据进行哈希裁剪的过程中,任一裁剪数据集W h中包含的数据可以是一个,也可以是多个。即,在本公开的实施例中,在每轮次数据裁剪过程中,任一裁剪数据集W h中包含的数据可以是一个,也可以是多个。如此,通过多个数据打包成一个裁剪数据集进行统一编码和哈希变换,减少了工作量,提高了工作效率。通过同一层哈希裁剪中裁剪数据集的划分,实现了对不同类数据的分开哈希编码,有利于后续对数据的追溯和解码。
根据本公开的实施例,该方法应用于UTXO模型下的分布式账本时,交易数据集X 0可 以包括:交易版本号Version、交易时间锁数据LockTime、交易输入的个数InputCount、每一个交易输入的数据TxIn中包含的所有数据元素,交易输出的个数OutputCount,以及每一个交易输出的数据TxOut中包含的所有数据元素。
根据本公开的实施例,每一个交易输入的数据TxIn中包含的所有数据元素有:TXID、VOUT、Unlocking Script Size、Unlocking Script与Sequence数据,其中TXID指定了该输入对应的前序交易,VOUT指定了此前序交易的交易输出的排序位置,两者共同指定了该输入所花费的前序交易的输出TxOut的位置,Unlocking Script记录了花费此交易输出所需要的解锁脚本。每一个交易输出的数据TxOut中包含的所有数据元素有:Value、Locking Script Size与Locking Script。
根据本公开的实施例,可选的,应用于UTXO模型下的分布式账本的情况下,在第一轮次裁剪的情况下,交易数据集中的每个交易输入数据的解锁脚本元素形成独立的裁剪数据集。在第j轮次裁剪的情况下,与每个交易输入数据中的解锁脚本元素相关的数据元素均同属于一个裁剪数据集,其中,2≤j≤N。
根据本公开的实施例,可选的,应用于UTXO模型下的分布式账本的情况下,在第一轮次裁剪的情况下,交易数据集中的每个交易输出数据的锁定脚本元素形成独立的裁剪数据集。在第j轮次裁剪的情况下,与每个交易输出数据的锁定脚本元素相关的数据元素均同属于一个裁剪数据集,其中,2≤j≤N。
根据本公开的实施例,应用于UTXO模型下的分布式账本中,交易每一个输入与输出中的所有数据中,仅有解锁脚本大小(Unlocking Script Size)与锁定脚本大小(Locking Script Size)数据使用了变长数据格式,其字节长度大小不是恒定的。可选的,将每一个Unlocking Script Size跟随Unlocking Script数据,或Locking Script Size数据跟随Locking Script数据,划入同一个可裁剪数据集,可以使得此次裁剪后的输出数据集中跟交易输入与输出内容有关的数据均具有恒定不变的字节长度,方便对交易数据的快速分割与解析。
根据本公开的实施例,例如,解锁脚本大小数据为对解锁脚本数据的长度计量,解锁脚本大小数据可以由解锁脚本数据推导出,因此,锁定脚本大小数据可以不记入交易数据集中,可以不参与后续的交易识别号计算;同理,锁定脚本大小数据可以不记入交易数据集中,也可以不参与后续的交易识别号计算。
根据本公开的实施例,UTXO模型下的分布式账本中,每个交易输入中的解锁脚本 (Unlocking Script)数据用于向账本维护节点证明该笔交易的合法有效性,其可能包括前序交易的数据或其他可以导致交易体积很大的数据。当该笔交易被验证通过并写入分布式账本数据库以后,账本维护节点基本不再需要此数据。通过将每个交易输入中的Unlocking Script数据单独哈希后,可以在后续的交易脚本或节点交互中按需裁剪掉该数据内容,仅保留其哈希值,来验证该笔交易中其他数据的真实合法性。同理,每个交易输出中的锁定脚本(Locking Script)表示该交易输出的花费条件,该花费条件可以在不同交易的不同输出中具有同样的内容,用于表达相同的交易接受方或验证脚本代码。该脚本可以具有较大的体积,并在某些场景下被多次使用。通过将每个输出的锁定脚本被单独哈希,一方面,可以在不给出该脚本的完整内容的情况下,仅使用其哈希值便可以证明该脚本是某一交易中特定位置的交易输出,以此减少交易脚本或者节点间的交互数据的大小,另一方面,多个交易可以通过同一个哈希指针来共享这部分交易数据,达到节省存储空间的。
根据本公开的实施例,可选的,在确定交易数据集为第j轮次裁剪的情况下,交易数据集中的每个交易输入数据的任意元素之间形成独立的裁剪数据集;交易数据集中的每个交易输出数据的任意元素之间形成独立的裁剪数据集,其中,2≤j≤N-1。
根据本公开的实施例,可选的,针对第二轮次及第二轮次以上的任一轮次裁剪中,只设置两个可裁剪数据集,一个用于收容跟任意一个交易输入的内容相关的数据元素,一个用于收容跟任意一个交易输出的内容相关的数据元素。可通过第一轮次裁剪后消减冗余数据,通过第二第二轮次及第二轮次以上的两个可裁剪数据集的划分,使得输入相关数据和输出相关数据相互独立,避免了可裁剪数据集过度划分的情况,进一步方便了数据的溯源。
根据本公开的实施例,可选的,例如,在UTXO模型下的分布式账本中对交易数据集X 0进行多轮次裁剪时,交易版本号Version,交易时间锁数据LockTime,交易输入的个数InputCount,每一个交易输入的数据TxIn中的TXID、VOUT和Sequence,交易输出的个数OutputCount,以及每一个交易输出的数据TxOut中的Value均属于保留数据集S 0
根据本公开的实施例,可选的,在对交易数据集X 0进行第一轮次裁剪时,便对交易数据集中的交易输入的数据TxIn中的Unlocking Script Size、Unlocking Script,以及交易输出的数据TxOut中的Locking Script Size与Locking Script进行广义的哈希计算,以缩小冗余数据。具体实施时,在裁剪过程中,将最后存在有交易版本号Version和交易时间锁数据LockTime中任一项的保留数据集记作S g,令G=S 0-Version-LockTime,将最后存在有数据集G中 任一项数据的保留数据集记作S g′,g>g′,即
Figure PCTCN2022090567-appb-000021
如此,保证了区块链上,存在有交易版本号Version和交易时间锁数据Lock Time的数据节点最靠近根节点,方便了对交易中这两部分数据的识别。
以下,结合UTXO模型下的分布式账本下的三个实施例,对上述的应用于区块链的N轮次裁剪数据上链方法进行具体说明。在以下实施例中,以比特币中本聪远景(BSV)区块链作为示例,但本领域技术人员应当理解的是,这并不构成对本发明保护范围的限定,该实施的目标区块链可以是包括比特币(BTC)区块链、狗狗币(DOGE)区块链、莱特币(LTC)区块链、比特币现金(BCH)区块链在内的其他具有同类交易数据元素的UTXO模型区块链。
为方便说明,以下三个实施例均采用两输入两输出的交易,其也可以是任意输入数与任意输出数的交易,只需将对前两个交易输入或交易输出的实施方式同样施加到其他交易输入或输出即可。
表1为以下实施例1-3中的交易数据集X 0的组成。如表1所示。
表1
Figure PCTCN2022090567-appb-000022
Figure PCTCN2022090567-appb-000023
实施例1
在本实施例中,对表1中交易数据集X 0进行一轮次裁剪,裁剪过程中,保留数据集S和裁剪数据集W的划分如表2及图3所示。
本实施例中,在第一轮次裁剪时,交易的每一个输入(TxIn)的Unlocking Script元素与Unlocking Script Size元素组成一个裁剪数据集,交易的每一个输出(TxOut)的Locking Script元素与Locking Script Size元素组成一个裁剪数据集。
图3示意性示出了根据本公开实施例一的交易数据集划分示意图。
表2为对交易数据集X 0进行一轮次裁剪时,对交易数据集X 0进行保留数据集和裁剪数据集的划分表。如表2所示。
表2
X 0 S 0 W 0 1 W 0 2 W 0 3 W 0 4
x 1=Version x 1        
x 2=LockTime x 2        
x 3=InputCount x 3        
x 4=OutputCount x 4        
x 5=TxIn1:TXID x 5        
x 6=TxIn1:VOUT x 6        
x 7=TxIn1:Unlocking Script Size   x 7      
x 8=TxIn1:Unlocking Script   x 8      
x 9=TxIn1:Sequence x 9        
x 10=TxIn2:TXID x 10        
x 11=TxIn2:VOUT x 11        
x 12=TxIn2:Unlocking Script Size     x 12    
x 13=TxIn2:Unlocking Script     x 13    
x 14=TxIn2:Sequence x 14        
x 15=TxOut1:Value x 15        
x 16=TxOut 1:Locking Script Size       x 16  
x 17=TxOut 1:Locking Script       x 17  
x 18=TxOut2:Value x 18        
x 19=TxOut2:Locking Script Size         x 19
x 20=TxOut2:Locking Script         x 20
如表2所示,并结合图3的示意图300,该实施例中对交易数据集的裁剪过程以公式表示如下:
Figure PCTCN2022090567-appb-000024
Figure PCTCN2022090567-appb-000025
即,
Figure PCTCN2022090567-appb-000026
Figure PCTCN2022090567-appb-000027
本实施例中,当一个节点或合约需要验证其他节点或用户提供的该交易的TxIn1:TXID与TxIn1:VOUT数据的真伪时,仅需要联合该交易的交易识别号TXID与集合
Figure PCTCN2022090567-appb-000028
中的数据,即可通过哈希计算来验证提供的数据是否确实为该交易中的相应数据。此过程中,所有输入的Unlocking Script与Unlocking Script Size原始数据与所有输出的Locking Script与Locking Script Size原始数据均可以被裁剪,达到缩减数据的目的。
本实施例下,当一个节点或合约需要验证其他节点或用户提供的该交易的TxOut1:Locking Script数据的真伪时,仅需要联合该交易的交易识别号TXID与集合
Figure PCTCN2022090567-appb-000029
中的数据,即可通过哈希计算来验证提供的数据是否确实为该交易中的相应数据。此过程中,所有 输入的Unlocking Script与Unlocking Script Size原始数据与第二个输出中的Locking Script与Locking Script Size原始数据均可以被裁剪,达到缩减数据的目的。
本实施例下,当一个节点需要复用TxOut1:Locking Script数据时,可以将该数据使用哈希指针HASH(binW 3 0)来存储,当其他交易也具有相同的Locking Script数据时,可以共用此哈希指针指向的数据。
需要说明的是,在本实施例中,对其他数据的验证可采用上述方法提供必要的验证数据进行验证,以充分缩减数据大小,具体地,在此不再赘述。
实施例2
本实施例中,在表1的基础上,对交易数据集X 0进行了二轮次裁剪,裁剪过程中,保留数据集S和裁剪数据集W的划分如下表3和图4所示。
本实施例中,在第一轮次裁剪时,交易的每一个输入(TxIn)的Unlocking Script元素与Unlocking Script Size元素组成一个裁剪数据集,交易的每一个输出(TxOut)的Locking Script元素与Locking Script Size元素组成一个裁剪数据集。
本实施例中,在第二轮次裁剪中,跟任意一个交易输入的内容相关的数据元素均同属于一个裁剪数据集,并且跟任意一个交易输出的内容相关的数据元素均同属于另一个裁剪数据集,例如:
f 1=HASH(binx′),x′∈R(f 1)
f 2=HASH{bin(f 1∪A 1)},f 1∈R(f 2),R(f 2)=f 1∪A 1
f 3=HASH{bin(f 2∪A 2)},f 2∈R(f 3),R(f 3)=f 2∪A 2
……
f k=HASH{bin(f k-1∪A k-1)},f k-1∈R(f k),R(f k)=f k-1∪A k-1
其中,A j为包含有任意数据元素的集合或者空集,f j表示哈希值,1≤j≤k;R(f j)表示哈希值f j的原像,原像为数据集合或者字符串集合;则,x′为任意一个交易输入中的数据元素时,x′、f 1、f 2、f 3、......、f k均为跟交易输入内容相关的数据元素;x′为任意一个交易输出中的数据元素时,x′、f 1、f 2、f 3、......、f k均为跟交易输出内容相关的数据元素。
具体的,本实施例中,在第二轮次裁剪中,设置了两个裁剪数据集,一个W 1 1用于收容跟任意一个交易输入的内容相关的数据元素,一个W 2 1用于收容跟任意一个交易输出的内容相关 的数据元素。
具体实施时,针对第二轮次及大于第二轮次的任一轮次裁剪中,均设置两个裁剪数据集,一个用于收容跟任意一个交易输入的内容相关的数据元素,一个用于收容跟任意一个交易输出的内容相关的数据元素。如此,可通过第一层裁剪消减冗余数据,通过第二层及第二层以上的两个可裁剪数据集的划分,使得输入相关数据和输出相关数据相互独立,避免了可裁剪数据集过度划分的情况,进一步方便了数据的溯源。
图4示意性示出了根据本公开实施例二的交易数据集划分示意图。
表3为对交易数据集X 0进行二轮次裁剪时,对交易数据集X 0进行保留数据集和裁剪数据集的划分表。如表3所示。
表3
Figure PCTCN2022090567-appb-000030
Figure PCTCN2022090567-appb-000031
如表3所示,并结合图4中示意图400,该实施例中对交易数据集的裁剪过程以公式表示如下:
Figure PCTCN2022090567-appb-000032
Figure PCTCN2022090567-appb-000033
Figure PCTCN2022090567-appb-000034
Figure PCTCN2022090567-appb-000035
Figure PCTCN2022090567-appb-000036
S 1={x 1,x 2,x 3,x 4},
Figure PCTCN2022090567-appb-000037
本实施例中,当一个节点或合约需要验证其他节点或用户提供的该交易的TxIn1:TXID与TxIn1:VOUT数据的真伪时,仅需要联合该交易的交易识别号TXID与集合
Figure PCTCN2022090567-appb-000038
中的数据,即可通过哈希计算来验证提供的数据是否确实为该交易中的相应数据。此过程中,所有输入的Unlocking Script与Unlocking Script Size原始数据与所有的输出数据均可以被裁剪,达到缩减数据的目的。
本实施例中,当一个节点或合约需要验证其他节点或用户提供的该交易的TxOut1:Locking Script数据的真伪时,仅需要联合该交易的交易识别号TXID与集合
Figure PCTCN2022090567-appb-000039
中的数据,即可通过哈希计算来验证提供的数据是否确实为该交易中的相应数据。此过程中,所有的输入原始数据与第二个输出中的Locking Script与Locking Script Size原始数据均可以被裁剪,达到缩减数据的目的。
本实施例中,当一个节点需要复用TxOut1:Locking Script数据时,可以将该数据使用哈希指针HASH(binW 3 0)来存储,当其他交易也具有相同的Locking Script数据时,可以共用此哈希指针指向的数据。
本实施例下,当一个节点或合约已经确定一个数据的哈希值为
Figure PCTCN2022090567-appb-000040
后,因该数据中表示每一个输出的数据段具有相等的字节长度,可以继续将该数据分为相等字节数的前后两部分数据,然后方便且安全地确定前一部分数据为{TxOut1:Value,HASH(binW 3 0)}的编码值,后一部分数据为{TxOut2:Value,HASH(binW 4 0)}的编码值,然后经过解码即可得到相应的数据。
需要说明的是,在本实施例中,对其他数据的验证可采用上述方法提供必要的验证数据进行验证,以充分缩减数据大小,具体地,在此不再赘述。
实施例3
本实施例中,在表1的基础上,对交易数据集X 0进行了二轮次裁剪。
本实施例中,交易数据中的计量元素,包括表示交易数据中某元素的字节长度的元素以及表示交易数据中某类型元素的个数的计数元素,不与其计量的目标元素一同被裁剪。具体的实施中,每一个交易输入数据中的Unlocking Script Size元素不与Unlocking Script元素同属于一个裁剪数据集,每一个交易输出数据中的Locking Script Size元素不与Locking Script元素同属于一个裁剪数据集,InputCount元素不与所有交易输入数据中的TXID同属于一个裁剪数据集,OutputCount元素不与所有输出交易数据中的Value元素同属于一个裁剪数据集。
具体的,本实施例中,在第一层裁剪时,交易的每一个输入(TxIn)的Unlocking Script元素形成独立的可裁剪数据集,交易的每一个输出(TxOut)的Locking Script元素形成独立的可裁剪数据集。
在本实施例3中的裁剪过程中,保留数据集S和裁剪数据集W的划分如下表4和图5所示。
图5示意性示出了根据本公开实施例三的交易数据集划分示意图。
表3为对交易数据集X 0进行二轮次裁剪时,对交易数据集X 0进行保留数据集和裁剪数据集的划分表。如表4所示。
表4
X 0 S 0 W 0 1 W 0 2 W 0 3 W 0 4 X 1=Y 0 S 1 W 1 1 W 1 2
x 1 x 1         x 1 x 1    
x 2 x 2         x 2 x 2    
x 3 x 3         x 3 x 3    
x 4 x 4         x 4 x 4    
x 5 x 5         x 5   x 5  
x 6 x 6         x 6   x 6  
x 7 x 7         x 7   x 7  
x 8   x 8       HASH(binW 0 1)   HASH(binW 0 1)  
x 9 x 9         x 9   x 9  
x 10 x 10         x 10   x 10  
x 11 x 11         x 11   x 11  
x 12 x 12         x 12   x 12  
x 13     x 13     HASH(binW 0 2)   HASH(binW 0 2)  
x 14 x 14         x 14   x 14  
x 15 x 15         x 15     x 15
x 16 x 16         x 16     x 16
x 17       x 17   HASH(binW 0 3)     HASH(binW 0 3)
x 18 x 18         x 18     x 18
x 19 x 19         x 19     x 19
x 20         x 20 HASH(binW 0 4)     HASH(binW 0 4)
如表4所示,并结合图5的示意图500,该实施例中对交易数据集的裁剪过程以公式表示如下:
Figure PCTCN2022090567-appb-000041
Figure PCTCN2022090567-appb-000042
Figure PCTCN2022090567-appb-000043
Figure PCTCN2022090567-appb-000044
Figure PCTCN2022090567-appb-000045
S 1={x 1,x 2,x 3,x 4},
Figure PCTCN2022090567-appb-000046
本实施例中,当一个节点或合约需要验证其他节点或用户提供的该交易的TxIn1:TXID与TxIn1:VOUT数据的真伪时,仅需要联合该交易的交易识别号TXID与集合
Figure PCTCN2022090567-appb-000047
中的数据,即可通过哈希计算来验证提供的数据是否确实为该交易中的相应数据。此过程中,所有输入的Unlocking Script原始数据与所有的输出数据均可以被裁剪,达到缩减数据的目的。
本实施例中,当一个节点或合约需要验证其他节点或用户提供的该交易的TxOut1:Locking Script数据的真伪时,仅需要联合该交易的交易识别号TXID与集合
Figure PCTCN2022090567-appb-000048
中的数据,即可通过哈希计算来验证提供的数据是否确实为该交易中的相应数据。此过程中,所有的输入原始数据与第二个输出中的Locking Script与Locking Script Size原始数据均可以被裁剪,达到缩减数据的目的。
本实施例下,当一个节点需要复用TxOut1:Locking Script数据时,可以将该数据使用哈希指针HASH(binW 0 3)来存储,当其他交易也具有相同的Locking Script数据时,可以共用此哈希指针指向的数据。
需要说明的是,在本实施例中,对其他数据的验证可采用上述方法提供必要的验证数据进行验证,以充分缩减数据大小,具体地,在此不再赘述。
还需进一步说明的是,在本公开的实施例中,仅以上述例举的方式对本公开的方案进行进一步说明,而并非为了限制本公开的范围。
基于上述分层裁剪区块链交易内数据的方法,本公开还提供了一种分层裁剪区块链交易内数据的装置。
图6示意性示出了根据本公开实施例的分层裁剪区块链交易内数据的装置的结构框图。
如图6所示,该装置600包括:获取模块610、裁剪模块620和处理模块630。
获取模块610,用于获取交易数据集。
裁剪模块620,用于基于数据裁剪模型,对交易数据集进行N轮次裁剪,得到目标数据集,其中,N为大于等于1的正整数。
处理模块630,用于对目标数据集进行处理,得到目标值,其中,目标值被配置为指向目标数据集上链时使用的交易识别号。
根据本公开的实施例,裁剪模块620可以包括:构造子模块620-1、序列化编码子模块620-2、计算子模块620-3、获得子模块620-4和循环子模块620-5。
构造子模块620-1,用于利用交易数据集构造保留数据集和M个裁剪数据集,其中,M为大于等于1的正整数。
序列化编码子模块620-2,用于对裁剪数据集进行第一序列化编码,得到与裁剪数据集对应的第一序列化编码值。
计算子模块620-3,用于对第一序列化编码值进行哈希计算,得到与第一序列化编码值对应的第一哈希值。
获得子模块620-4,用于将M个与第一序列化编码值对应的第一哈希值构造第一哈希值集合,并与保留数据集做并集,得到中间交易数据集。
循环子模块620-5,用于利用中间交易数据集循环上述子模块对应的操作,直至中间交易数据集满足预定条件,得到目标数据集。
根据本公开的实施例,获取模块610、裁剪模块620和处理模块630中的任意多个模块可以合并在一个模块中实现,或者其中的任意一个模块可以被拆分成多个模块。或者,这些模块中的一个或多个模块的至少部分功能可以与其他模块的至少部分功能相结合,并在一个模块中实现。根据本公开的实施例,获取模块610、裁剪模块620和处理模块630中的至少一个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式等硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,获取模块610、裁剪模块620和处理模块630中的至少一个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。
图7示意性示出了根据本公开实施例的适于实现分层裁剪区块链交易内数据的方法的电子设备的方框图。
如图7所示,根据本公开实施例的电子设备700包括处理器701,其可以根据存储在只读存储器(ROM)702中的程序或者从存储部分708加载到随机访问存储器(RAM)703中的程序而执行各种适当的动作和处理。处理器701例如可以包括通用微处理器(例如CPU)、指令集处理器和/或相关芯片组和/或专用微处理器(例如,专用集成电路(ASIC))等等。处理器701还可以包括用于缓存用途的板载存储器。处理器701可以包括用于执行根据本公开实施例的方法流程的不同动作的单一处理单元或者是多个处理单元。
在RAM 703中,存储有电子设备700操作所需的各种程序和数据。处理器701、ROM 702以及RAM 703通过总线704彼此相连。处理器701通过执行ROM 702和/或RAM 703中的程序来执行根据本公开实施例的方法流程的各种操作。需要注意,程序也可以存储在除ROM  702和RAM 703以外的一个或多个存储器中。处理器701也可以通过执行存储在一个或多个存储器中的程序来执行根据本公开实施例的方法流程的各种操作。
根据本公开的实施例,电子设备700还可以包括输入/输出(I/O)接口705,输入/输出(I/O)接口705也连接至总线704。电子设备700还可以包括连接至I/O接口705的以下部件中的一项或多项:包括键盘、鼠标等的输入部分706;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分707;包括硬盘等的存储部分708;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分709。通信部分709经由诸如因特网的网络执行通信处理。驱动器710也根据需要连接至I/O接口705。可拆卸介质711,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器710上,以便于从其上读出的计算机程序根据需要被安装入存储部分708。
本公开还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例中描述的设备/装置/系统中所包含的;也可以是单独存在,而未装配入该设备/装置/系统中。上述计算机可读存储介质承载有一个或者多个程序,当上述一个或者多个程序被执行时,实现根据本公开实施例的方法。
根据本公开的实施例,计算机可读存储介质可以是非易失性的计算机可读存储介质,例如可以包括但不限于:便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。例如,根据本公开的实施例,计算机可读存储介质可以包括上文描述的ROM 702和/或RAM 703和/或ROM 702和RAM 703以外的一个或多个存储器。
本公开实施例还包括一种计算机程序产品,其包括计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。当计算机程序产品在计算机系统中运行时,该程序代码用于使计算机系统实现本公开实施例所提供的物品推荐方法。
在该计算机程序被处理器701执行时执行本公开实施例的系统/装置中限定的上述功能。根据本公开的实施例,上文描述的系统、装置、模块、单元等可以通过计算机程序模块来实现。
在一种实施例中,该计算机程序可以依托于光存储器件、磁存储器件等有形存储介质。在另一种实施例中,该计算机程序也可以在网络介质上以信号的形式进行传输、分发,并通过通信部分709被下载和安装,和/或从可拆卸介质711被安装。该计算机程序包含的程序代码可以用任何适当的网络介质传输,包括但不限于:无线、有线等等,或者上述的任意合适 的组合。
在这样的实施例中,该计算机程序可以通过通信部分709从网络上被下载和安装,和/或从可拆卸介质711被安装。在该计算机程序被处理器701执行时,执行本公开实施例的系统中限定的上述功能。根据本公开的实施例,上文描述的系统、设备、装置、模块、单元等可以通过计算机程序模块来实现。
根据本公开的实施例,可以以一种或多种程序设计语言的任意组合来编写用于执行本公开实施例提供的计算机程序的程序代码,具体地,可以利用高级过程和/或面向对象的编程语言、和/或汇编/机器语言来实施这些计算程序。程序设计语言包括但不限于诸如Java,Rust,C++,python,“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
本领域技术人员可以理解,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合或/或结合,即使这样的组合或结合没有明确记载于本公开中。特别地,在不脱离本公开精神和教导的情况下,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合。所有这些组合和/或结合均落入本公开的范围。
以上对本公开的实施例进行了描述。但是,这些实施例仅仅是为了说明的目的,而并非为了限制本公开的范围。尽管在以上分别描述了各实施例,但是这并不意味着各个实施例中的措施不能有利地结合使用。本公开的范围由所附权利要求及其等同物限定。不脱离本公开的范围,本领域技术人员可以做出多种替代和修改,这些替代和修改都应落在本公开的范围之内。

Claims (12)

  1. 一种分层裁剪区块链交易内数据的方法,包括:
    获取交易数据集;
    基于数据裁剪模型,对所述交易数据集进行N轮次裁剪,得到目标数据集,其中,N为大于等于1的正整数;
    对所述目标数据集进行处理,得到目标值,其中,所述目标值被配置为指向所述目标数据集上链时使用的交易识别号;
    其中,所述基于数据裁剪模型,对所述交易数据集进行N轮次裁剪,得到目标数据集,包括:
    S1,利用所述交易数据集构造保留数据集和M个裁剪数据集,其中,M为大于等于1的正整数;
    S2,对所述裁剪数据集进行第一序列化编码,得到与所述裁剪数据集对应的第一序列化编码值;
    S3,对所述第一序列化编码值进行哈希计算,得到与所述第一序列化编码值对应的第一哈希值;
    S4,将M个与所述第一序列化编码值对应的第一哈希值构造第一哈希值集合,并与所述保留数据集做并集,得到中间交易数据集;
    S5,利用所述中间交易数据集循环操作S1~S4,直至所述中间交易数据集满足预定条件,得到所述目标数据集。
  2. 根据权利要求1所述的方法,其中,经所述数据裁剪模型裁剪后的数据集表示为:
    Y=S∪{HASH(binW 1),HASH(binW 2),...,HASH(binW M)},
    其中,S为输入数据集X中的保留数据集;W 1,W 2,...,W M为输入数据集X中的裁剪数据集;M为裁剪数据集的数量;binW M为裁剪数据集W M的序列化编码值;HASH(binW M)为binW M的哈希值;Y为输入数据集X经数据裁剪模型裁剪后的数据集;X={x 1,x 2,x 3,...,x a},S={s 1,s 2,s 3,...,s b},
    Figure PCTCN2022090567-appb-100001
    W h为裁剪数据集W 1、W 2、...、W M中的任一裁剪数据集;a为输入数据集X中的数据元素的数量,x 1,x 2,x 3,...,x a为输入数据集X中的数据元素;b为保留数据集S中的数据元素的数量,s 1,s 2,s 3,...,s b为保留数据集S中的数据元素;h为裁剪数据集的数量,1≤h≤M;c h为裁 剪数据集W h中的数据元素的数量,且c h≥1,
    Figure PCTCN2022090567-appb-100002
    为裁剪数据集W h中的数据元素。
  3. 根据权利要求1所述的方法,其中,所述对所述目标数据集进行处理,得到目标值,包括:
    对所述目标数据集进行第二序列化编码,得到与所述目标数据集对应的第二序列化编码值;
    对所述第二序列化编码值进行哈希计算,得到目标值。
  4. 根据权利要求1或2所述的方法,其中,第一轮裁剪时的所述保留数据集为非空数据集。
  5. 根据权利要求1所述的方法,其中,应用于UTXO模型下的分布式账本的情况下,在第一轮次裁剪的情况下,所述交易数据集中的每个交易输入数据的解锁脚本元素形成独立的裁剪数据集。
  6. 根据权利要求5所述的方法,其中,在第j轮次裁剪的情况下,与所述每个交易输入数据中的解锁脚本元素相关的数据元素均同属于一个裁剪数据集,其中,2≤j≤N。
  7. 根据权利要求1所述的方法,其中,应用于UTXO模型下的分布式账本的情况下,在第一轮次裁剪的情况下,所述交易数据集中的每个交易输出数据的锁定脚本元素形成独立的裁剪数据集。
  8. 根据权利要求6所述的方法,其中,在第j轮次裁剪的情况下,与每个交易输出数据的锁定脚本元素相关的数据元素均同属于一个裁剪数据集,其中,2≤j≤N。
  9. 一种分层裁剪区块链交易内数据的装置,包括:
    获取模块,用于获取交易数据集;
    裁剪模块,用于基于数据裁剪模型,对所述交易数据集进行N轮次裁剪,得到目标数据集,其中,N为大于等于1的正整数;
    处理模块,用于对所述目标数据集进行处理,得到目标值,其中,所述目标值被配置为指向所述目标数据集上链时使用的交易识别号;
    其中,裁剪模块,包括:
    构造子模块,用于利用所述交易数据集构造保留数据集和M个裁剪数据集,其中,M为大于等于1的正整数;
    序列化编码子模块,用于对所述裁剪数据集进行第一序列化编码,得到与所述裁剪 数据集对应的第一序列化编码值;
    计算子模块,用于对所述第一序列化编码值进行哈希计算,得到与所述第一序列化编码值对应的第一哈希值;
    获得子模块,用于将M个与所述第一序列化编码值对应的第一哈希值构造第一哈希值集合,并与所述保留数据集做并集,得到中间交易数据集;
    循环子模块,用于利用所述中间交易数据集循环上述子模块对应的操作,直至所述中间交易数据集满足预定条件,得到所述目标数据集。
  10. 一种电子设备,包括:
    一个或多个处理器;
    存储装置,用于存储一个或多个程序,
    其中,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器执行根据权利要求1~8中任一项所述的方法。
  11. 一种计算机可读存储介质,其上存储有可执行指令,该指令被处理器执行时使处理器执行根据权利要求1~8中任一项所述的方法。
  12. 一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现根据权利要求1~8中任一项所述的方法。
PCT/CN2022/090567 2021-06-18 2022-04-29 分层裁剪区块链交易内数据的方法、装置、设备及介质 WO2022262446A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
GB2319803.9A GB2622343A (en) 2021-06-18 2022-04-29 Method and apparatus for hierarchically clipping data in blockchain transaction, and device medium
US18/543,440 US20240168942A1 (en) 2021-06-18 2023-12-18 Method and apparatus for hierarchically pruning data in blockchain transaction, device and medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110682927.8A CN113360578B (zh) 2021-06-18 2021-06-18 一种分层裁剪区块链交易内数据的方法、系统和存储介质
CN202110682927.8 2021-06-18

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/543,440 Continuation US20240168942A1 (en) 2021-06-18 2023-12-18 Method and apparatus for hierarchically pruning data in blockchain transaction, device and medium

Publications (1)

Publication Number Publication Date
WO2022262446A1 true WO2022262446A1 (zh) 2022-12-22

Family

ID=77535251

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/090567 WO2022262446A1 (zh) 2021-06-18 2022-04-29 分层裁剪区块链交易内数据的方法、装置、设备及介质

Country Status (4)

Country Link
US (1) US20240168942A1 (zh)
CN (1) CN113360578B (zh)
GB (1) GB2622343A (zh)
WO (1) WO2022262446A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360578B (zh) * 2021-06-18 2023-04-07 中国科学技术大学 一种分层裁剪区块链交易内数据的方法、系统和存储介质
CN115207785B (zh) * 2022-09-15 2023-02-03 四川瑞吉绿能科技有限公司 一种配电箱智能防火系统及其方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106899412A (zh) * 2017-03-30 2017-06-27 北京链银博科技有限责任公司 一种区块链隐私保护方法、装置及系统
CN109542455A (zh) * 2018-11-29 2019-03-29 杭州复杂美科技有限公司 合约执行方法、合约精简方法、设备和存储介质
KR102046059B1 (ko) * 2019-03-20 2019-11-18 엘에스웨어(주) 블록체인의 정보변경장치 및 방법
CN110727644A (zh) * 2019-09-29 2020-01-24 南京金宁汇科技有限公司 一种区块链数据裁剪的方法、系统及存储介质
CN111340496A (zh) * 2020-05-20 2020-06-26 南京如般量子科技有限公司 一种自动优化历史交易数据的区块链系统及方法
CN113360578A (zh) * 2021-06-18 2021-09-07 中国科学技术大学 一种分层裁剪区块链交易内数据的方法、系统和存储介质

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110347684B (zh) * 2019-06-28 2020-09-01 阿里巴巴集团控股有限公司 基于区块链的分级存储方法及装置、电子设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106899412A (zh) * 2017-03-30 2017-06-27 北京链银博科技有限责任公司 一种区块链隐私保护方法、装置及系统
CN109542455A (zh) * 2018-11-29 2019-03-29 杭州复杂美科技有限公司 合约执行方法、合约精简方法、设备和存储介质
KR102046059B1 (ko) * 2019-03-20 2019-11-18 엘에스웨어(주) 블록체인의 정보변경장치 및 방법
CN110727644A (zh) * 2019-09-29 2020-01-24 南京金宁汇科技有限公司 一种区块链数据裁剪的方法、系统及存储介质
CN111340496A (zh) * 2020-05-20 2020-06-26 南京如般量子科技有限公司 一种自动优化历史交易数据的区块链系统及方法
CN113360578A (zh) * 2021-06-18 2021-09-07 中国科学技术大学 一种分层裁剪区块链交易内数据的方法、系统和存储介质

Also Published As

Publication number Publication date
CN113360578B (zh) 2023-04-07
GB202319803D0 (en) 2024-02-07
US20240168942A1 (en) 2024-05-23
GB2622343A (en) 2024-03-13
CN113360578A (zh) 2021-09-07

Similar Documents

Publication Publication Date Title
WO2022262446A1 (zh) 分层裁剪区块链交易内数据的方法、装置、设备及介质
US20220335338A1 (en) Feature processing tradeoff management
US11544623B2 (en) Consistent filtering of machine learning data
US10366053B1 (en) Consistent randomized record-level splitting of machine learning data
US10339465B2 (en) Optimized decision tree based models
US10713589B1 (en) Consistent sort-based record-level shuffling of machine learning data
US11100420B2 (en) Input processing for machine learning
US10318882B2 (en) Optimized training of linear machine learning models
US11182691B1 (en) Category-based sampling of machine learning data
US10360405B2 (en) Anonymization apparatus, and program
CN111858472B (zh) 文件格式转换方法、装置、计算机设备及存储介质
CN111177113B (zh) 数据迁移方法、装置、计算机设备和存储介质
CN112035355A (zh) 数据处理方法、装置、计算机设备和存储介质
US11222131B2 (en) Method for a secure storage of data records
CN110309496B (zh) 数据汇总方法、电子装置及计算机可读存储介质
CN111984674A (zh) 结构化查询语言的生成方法及系统
CN113468248B (zh) 数据统计方法、装置、设备及存储介质
CN114328486A (zh) 基于模型的数据质量核查方法及装置
US20220207042A1 (en) Query tree labeling and processing
Purdilă et al. Single‐scan: a fast star‐join query processing algorithm
CN114048219A (zh) 图数据库更新方法及装置
WO2020248149A1 (en) Data sharing and data analytics implementing local differential privacy
CN112328601A (zh) 基于区块链的数据处理方法、装置、设备和存储介质
JP2024525189A (ja) ブロックチェーン取引内のデータを階層的に裁断する方法、装置、機器及び媒体
CN112667721A (zh) 数据分析方法、装置、设备及存储介质

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: 22823929

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2023578039

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 202319803

Country of ref document: GB

Kind code of ref document: A

Free format text: PCT FILING DATE = 20220429

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22823929

Country of ref document: EP

Kind code of ref document: A1