CN110163755B - Block chain-based data compression and query method and device and electronic equipment - Google Patents

Block chain-based data compression and query method and device and electronic equipment Download PDF

Info

Publication number
CN110163755B
CN110163755B CN201910363442.5A CN201910363442A CN110163755B CN 110163755 B CN110163755 B CN 110163755B CN 201910363442 A CN201910363442 A CN 201910363442A CN 110163755 B CN110163755 B CN 110163755B
Authority
CN
China
Prior art keywords
data
block chain
transaction
intelligent contract
compression
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201910363442.5A
Other languages
Chinese (zh)
Other versions
CN110163755A (en
Inventor
程龙
李艳鹏
贾博岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Advanced New Technologies Co Ltd
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 Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN201910363442.5A priority Critical patent/CN110163755B/en
Priority to CN202110043051.2A priority patent/CN112750037A/en
Publication of CN110163755A publication Critical patent/CN110163755A/en
Priority to TW109100896A priority patent/TWI726573B/en
Priority to PCT/CN2020/072133 priority patent/WO2020220764A1/en
Priority to US16/786,794 priority patent/US10795882B2/en
Application granted granted Critical
Publication of CN110163755B publication Critical patent/CN110163755B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1744Redundancy elimination performed by the file system using compression, e.g. sparse files
    • 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

Abstract

An embodiment of the present specification provides a data compression method and apparatus based on a block chain, and an electronic device, where the method includes: the business party compresses the target data to be stored and certified according to a preset compression template; assembling the compressed target data and the unique identification of the compressed template into a deposit certificate transaction; and sending the deposit transaction to node equipment of a block chain, so that the node equipment responds to the deposit transaction, inquires an intelligent contract corresponding to the unique identifier distributed in the block chain, calls a compression template stated in the intelligent contract to check the data format of the target data, and if the check passes the deposit of the target data.

Description

Block chain-based data compression and query method and device and electronic equipment
Technical Field
The embodiment of the specification relates to the technical field of block chains, in particular to a data compression and query method and device based on a block chain and an electronic device.
Background
The block chain technology, also called distributed ledger technology, is an emerging technology in which several computing devices participate in "accounting" together, and a complete distributed database is maintained together. The blockchain technology has characteristics of decentralization, public transparency, participation of each computing device in database recording, and rapid data synchronization among the computing devices, so that the blockchain technology is widely applied in many fields.
Disclosure of Invention
The embodiment of the specification provides a data compression and query method and device based on a block chain and an electronic device:
according to a first aspect of embodiments herein, there is provided a method for data compression based on a blockchain, the method comprising:
the business party compresses the target data to be stored and certified according to a preset compression template;
assembling the compressed target data and the unique identification of the compressed template into a deposit certificate transaction;
and sending the deposit transaction to node equipment of a block chain, so that the node equipment responds to the deposit transaction, inquires an intelligent contract corresponding to the unique identifier distributed in the block chain, calls a compression template stated in the intelligent contract to check the data format of the target data, and if the check passes the deposit of the target data.
Optionally, compressing the target data to be stored with the certificate according to a preset compression template specifically includes:
determining a data structure of target data to be stored;
and compressing the target data according to the compression template corresponding to the data structure.
Optionally, the data structure of the target data is composed of a self-description structure and actual data; wherein the self-describing structure is used to represent the meaning expressed by the actual data;
the compression template records the compression rule of the self-description structure;
the compressing the target data comprises:
mapping a self-description structure of the target data into custom data according to the compression rule; wherein the custom data volume is less than the data volume of the self-describing structure.
Optionally, the method further includes:
assembling the compression template into a creation transaction of the intelligent contract;
sending the created transaction to a node device of a block chain, so that the node device responds to the created transaction, invokes contract auditing logic declared in an auditing contract issued in the block chain, writes a voting event in a transaction log, and submits the voting transaction to the auditing contract after the auditing node of the block chain monitors the voting event; and the auditing contract collects and sorts the voting transactions to obtain an auditing result of the intelligent contract.
Optionally, the method further includes:
and if the auditing result is that the intelligent contract passes, creating the intelligent contract in the block chain, and returning the unique identifier of the intelligent contract to the service party.
Optionally, the unique identifier includes:
and performing hash calculation on the unique content of the compression template declared in the intelligent contract to obtain a hash value.
According to a second aspect of embodiments herein, there is provided an apparatus for block chain based data compression, the apparatus comprising:
the node equipment of the block chain receives the deposit and certificate transaction submitted by the service party; the deposit transaction comprises a unique identifier and target data to be deposited, wherein the target data is data compressed by a compression template corresponding to the unique identifier;
and responding to the evidence storing transaction, inquiring the intelligent contract corresponding to the unique identifier distributed in the block chain, calling a compression template declared in the intelligent contract to check the data format of the target data, and storing and verifying the target data if the check is passed.
Optionally, the method further includes:
receiving a creating transaction of an intelligent contract which is sent by a service party and assembled by aiming at a compression template;
responding to the created transaction, calling contract auditing logic declared in an auditing contract issued in the block chain, writing a voting event in a transaction log, and submitting the voting transaction to the auditing contract after the auditing node of the block chain monitors the voting event; and the auditing contract collects and sorts the voting transactions to obtain an auditing result of the intelligent contract.
Optionally, the method further includes:
and if the auditing result is that the intelligent contract passes, creating the intelligent contract in the block chain, and returning the unique identifier of the intelligent contract to the service party.
Optionally, the unique identifier includes:
and performing hash calculation on the unique content of the compression template declared in the intelligent contract to obtain a hash value.
According to a third aspect of the embodiments of the present specification, there is provided a data query apparatus based on a block chain, where data certified on the block chain is compressed data obtained by performing data compression based on the data compression method based on the block chain; the method comprises the following steps:
the business party assembles the unique identification into a query transaction according to the data to be queried;
sending the query transaction to node equipment of a blockchain, so that the node equipment responds to the query transaction and queries the compressed data stored on the blockchain; inquiring an intelligent contract corresponding to the unique identifier distributed in the block chain, and calling a compression template declared in the intelligent contract to restore the compressed data into complete data;
and receiving the complete data returned by the node equipment.
Optionally, a compression rule of a self-description structure is recorded in the compression template;
the restoring the compressed data into complete data specifically includes:
mapping the self-defined data in the compressed data into a self-description structure according to the compression rule; wherein the custom data volume is less than the data volume of the self-describing structure.
According to a fourth aspect of the embodiments of the present specification, there is provided a data query apparatus based on a block chain, where data certified on the block chain is compressed data obtained by performing data compression based on the data compression method based on the block chain; the method comprises the following steps:
the node equipment of the block chain receives the inquiry transaction submitted by the service party; wherein, the inquiry transaction comprises a unique identifier;
in response to the query transaction, querying the compressed data for evidence stored on the blockchain;
inquiring an intelligent contract corresponding to the unique identifier distributed in the block chain, and calling a compression template declared in the intelligent contract to restore the compressed data into complete data;
and returning the complete data to the service party.
Optionally, a compression rule of a self-description structure is recorded in the compression template;
the restoring the compressed data into complete data specifically includes:
mapping the self-defined data in the compressed data into a self-description structure according to the compression rule; wherein the custom data volume is less than the data volume of the self-describing structure.
According to a fifth aspect of embodiments herein, there is provided an electronic apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to any one of the above block chain based data compression methods.
According to a sixth aspect of embodiments herein, there is provided an electronic apparatus comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured as any one of the above block chain based data query methods.
The embodiment of the present specification provides a data compression scheme based on a block chain, where a service party locally compresses target data to be stored and certified based on a compression template, and a node device of a corresponding block chain verifies the compressed data based on an intelligent contract corresponding to the compression template, so as to ensure that the compressed data to be stored and certified meets the requirements of a data format to avoid data anomalies (such as data scrambling and misalignment). Therefore, data is compressed from the data source through the format constraint of the compression template and the intelligent contract, and the data volume is reduced. On the other hand, when the data query scheme based on the block chain is provided, when the node device of the block chain receives query transaction of a service party, the data certified by the block chain is compressed data, so that the compressed data can be restored to be complete data based on the compression template stated in the intelligent contract. Therefore, the method is also based on the compression template of the intelligent contract, and the certified compression data is restored into complete data to be provided for a business party, so that the data correctness is ensured.
Drawings
Fig. 1 is a flowchart of a block chain-based data compression method according to an embodiment of the present specification;
fig. 2 is a flowchart of a data compression method based on a block chain according to an embodiment of the present specification;
FIG. 3 is a flowchart of a method for querying data based on a blockchain according to an embodiment of the present disclosure;
FIG. 4 is a flowchart of a block chain-based data query method provided in an embodiment of the present specification;
fig. 5 is a hardware structure diagram of a data compression apparatus based on a block chain according to an embodiment of the present specification;
fig. 6 is a block diagram of a block chain-based data compression apparatus according to an embodiment of the present disclosure;
fig. 7 is a block diagram of a block chain-based data compression apparatus according to an embodiment of the present disclosure;
fig. 8 is a hardware configuration diagram of a data query apparatus based on a block chain according to an embodiment of the present specification;
fig. 9 is a block diagram of a data query apparatus based on a blockchain according to an embodiment of the present disclosure;
fig. 10 is a block chain-based data query apparatus according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the specification, as detailed in the appended claims.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present specification. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The source tracing and evidence storing scene based on the block chain is one of the most widely applied scenes of the block chain technology. The characteristics of tamper resistance, traceability, fairness and justice of data storage and the like of the block chain technology enable the public credibility of storing and certifying the traceable data, and are widely used in the industry. However, as the block chain is that the multi-node devices respectively have their own data accounts, that is, a copy of the evidence-storing data can be copied and stored by the multi-node devices, and as the amount of the business evidence-storing data increases, the evidence-storing data on the whole block chain can be multiplied, thereby occupying a large amount of storage resources and network overhead.
Specifically, the existing uplink certified data is usually in the form of a data structure. Such as xml, json, etc. data structures. The advantages of such a data structure are a self-describing structure which has the advantage of revealing the meaning expressed by the data, but which takes up a lot of storage space.
The storage resources and network resources of the block chain are not endless; therefore, how to ensure the realization of the service requirement and save the resource overhead becomes a problem to be solved urgently.
The embodiment of the present specification provides a data compression scheme based on a block chain, where a service party locally compresses target data to be stored and certified based on a compression template, and a node device of a corresponding block chain verifies the compressed data based on an intelligent contract corresponding to the compression template, so as to ensure that the compressed data to be stored and certified meets the requirements of a data format to avoid data anomalies (such as data scrambling and misalignment). Therefore, data is compressed from the data source through the format constraint of the compression template and the intelligent contract, and the data volume is reduced. On the other hand, when the data query scheme based on the block chain is provided, when the node device of the block chain receives query transaction of a service party, the data certified by the block chain is compressed data, so that the compressed data can be restored to be complete data based on the compression template stated in the intelligent contract. Therefore, the method is also based on the compression template of the intelligent contract, and the certified compression data is restored into complete data to be provided for a business party, so that the data correctness is ensured.
The blockchain described in this specification may specifically include a private chain, a common chain, a federation chain, and the like, and is not particularly limited in this specification.
For example, in one scenario, the block chain may be specifically a federation chain formed by a business system, an auditing system, an exposure system, and the like as federation members; an operator of the alliance chain can deploy the data compression evidence storage service by relying on the alliance chain; the service system, the auditing system and the disclosing system which are described above as the members of the federation can all be used as a service node of the data compression evidence storage service. Each service node can distribute the compressed data generated or received by itself in a form of transaction in the alliance chain, and after the transaction is subjected to consensus processing of the consensus nodes in the alliance chain, the transaction is stored in a distributed database in the alliance chain, so that uplink certification of the logistics inspection result is completed.
It should be noted that the Transaction (Transaction) described in this specification refers to a Transaction that is created by a client of a blockchain and needs to be finally issued to a piece of data in a distributed database of the blockchain.
Transactions in a blockchain, generally have a narrow sense of transaction and a broad sense of transaction score. The transaction in the narrow sense refers to value transfer issued by a business direction block chain; for example, in a conventional bitcoin blockchain network, a transaction may be a transfer initiated by a business party in the blockchain. The generalized transaction refers to a piece of business data with a business purpose, which is issued by a business direction block chain; for example, an operator may build a federation chain based on actual business requirements, relying on the federation chain to deploy some other types of online business unrelated to value transfer (e.g., business data storage, business data query, business data processing, etc.), and in such federation chain, the transaction may be a business message or business request with a business intent issued by a business party in the federation chain.
The client may include any type of upper layer application that uses the bottom layer service data stored in the blockchain as a data support to implement a specific service function.
A Smart contract (Smart contract) is a computer protocol intended to apply a contract that can be propagated, verified, or executed in an informational manner, deployed on a blockchain. Performing the corresponding operation can be realized by declaring the business logic in the smart contract. Smart contracts allow trusted transactions to be conducted without third parties. These transactions are traceable and irreversible. Smart contracts can provide security over traditional contract methodologies and reduce other transaction costs associated with contracts.
The scheme provided by the specification mainly comprises two parts, namely data compression and evidence storage and compressed data query.
Referring to fig. 1, fig. 1 is a flowchart of a block chain-based data compression method provided in an embodiment of the present disclosure, where the method is applied to a service side, and specifically includes the following steps:
step 110: the business party compresses the target data to be stored and certified according to a preset compression template;
step 120: assembling the compressed target data and the unique identification of the compressed template into a deposit certificate transaction;
step 130: and sending the deposit transaction to node equipment of a block chain, so that the node equipment responds to the deposit transaction, inquires an intelligent contract corresponding to the unique identifier distributed in the block chain, calls a compression template stated in the intelligent contract to check the data format of the target data, and if the check passes the deposit of the target data.
It is worth mentioning that the intelligent contract corresponding to the unique identifier in the block chain is issued to the block chain in advance by any service party. The method comprises the following specific steps:
a1: assembling the compression template into a creation transaction of the intelligent contract;
a2: sending the created transaction to a node device of a block chain, so that the node device responds to the created transaction, invokes contract auditing logic declared in an auditing contract issued in the block chain, writes a voting event in a transaction log, and submits the voting transaction to the auditing contract after the auditing node of the block chain monitors the voting event; and the auditing contract collects and sorts the voting transactions to obtain an auditing result of the intelligent contract.
In this embodiment, the business party may create an intelligent contract for verifying the business data, the intelligent contract being assembled based on the compression template.
In general, smart contracts need to meet the specifications of the smart contracts. Therefore, it is necessary for the node device to audit the intelligent contract submitted by the business party. Specifically, a contract auditing logic declared in an auditing contract issued in the block chain is called, a voting event is written in a transaction log, and after the auditing node of the block chain monitors the voting event, a voting transaction is submitted to the auditing contract; and the auditing contract collects and sorts the voting transactions to obtain an auditing result of the intelligent contract.
And if the auditing result is passed, the business side submits an intelligent contract for data compression verification, and the block chain can generate a unique identifier corresponding to the intelligent contract. That is, there is a one-to-one correspondence between the unique identifier and the intelligent contract.
In an embodiment, the unique identifier may refer to a hash value obtained by performing a hash calculation on unique content of a compression template declared in the smart contract. And the hash value also serves as a contract address for storing the intelligent contract.
Besides the hash value, the unique identifier may also be any identifier with uniqueness, for example, an ID that grows in sequence is used for identification. For example, starting from ID ═ 0, each time an intelligent contract is created, 1 is added on the basis of the original ID as the unique identifier of the newly created intelligent contract.
As described above, the business party may receive the unique identifier assigned by the blockchain in addition to the intelligent contract corresponding to the compression template successfully issued. The unique identifier not only can correspond to an intelligent contract in the block chain, but also can correspond to a local compression template of a business party. That is, there is a one-to-one correspondence between the unique identifier and the compressed template.
In an embodiment, different compression templates are used for compressing the service data of different data structures. Therefore, the step 110 of compressing the target data to be stored according to the preset compression template may specifically include:
determining a data structure of target data to be stored;
and compressing the target data according to the compression template corresponding to the data structure.
For example, assuming that the target data belongs to an XML data structure, the service side needs to compress the target data by using a compression template of XML;
and if the target data belongs to a JSON data structure, the business side needs to compress the target data by adopting a JSON compression template.
In one embodiment, the data structure of the target data is composed of a self-description structure and actual data; wherein the self-describing structure is used to represent the meaning expressed by the actual data;
the compression template records the compression rule of the self-description structure;
the compressing the target data comprises:
mapping a self-description structure of the target data into custom data according to the compression rule; wherein the custom data volume is less than the data volume of the self-describing structure.
For example, the XML data structure is characterized by "/" as a self-describing structure, where "/" is content describing the meaning of the actual data; for example: /username/ZhangSan; the user name can be determined to be expressed by Zhangsan through/username/.
Similarly, the JSON data structures are characterized by "×: "as a self-describing structure, wherein". star "is content describing the meaning of actual data; for example: the username: ZhangSan; by username: it can be determined that "ZhangSan" expresses a user name.
Regardless of the data structure, the mapping relationship between each self-describing structure and the custom data can be predefined in the corresponding compression template. Therefore, a business party can map the self-description structure of the target data into the self-defined data according to the compression rule; wherein the custom data volume is less than the data volume of the self-describing structure.
For example, for the target data: /username/ZhangSan; since the data structure of the target data is an XML data structure, it is assumed that the/username/mapping defined in the compression template of XML is "1"; the compressed target data becomes: 1 ZhangSan. It can be seen that the data amount of the target data before and after compression is much reduced.
The embodiment of the present specification provides a data compression scheme based on a block chain, where a service party locally compresses target data to be stored and certified based on a compression template, and a node device of a corresponding block chain verifies the compressed data based on an intelligent contract corresponding to the compression template, so as to ensure that the compressed data to be stored and certified meets the requirements of a data format to avoid data anomalies (such as data scrambling and misalignment). Therefore, data is compressed from the data source through the format constraint of the compression template and the intelligent contract, and the data volume is reduced.
Referring to fig. 2, fig. 2 is a flowchart of a data compression method based on a blockchain according to an embodiment of the present disclosure, where the method is applied to a node device of a blockchain, and specifically includes the following steps:
step 210: the node equipment of the block chain receives the deposit and certificate transaction submitted by the service party; the deposit transaction comprises a unique identifier and target data to be deposited, wherein the target data is data compressed by a compression template corresponding to the unique identifier;
step 220: and responding to the evidence storing transaction, inquiring the intelligent contract corresponding to the unique identifier distributed in the block chain, calling a compression template declared in the intelligent contract to check the data format of the target data, and storing and verifying the target data if the check is passed.
Different from the foregoing embodiment shown in fig. 1, the embodiment in this embodiment is an execution subject, and specific implementation may refer to the description in the embodiment in fig. 1.
The business party can create an intelligent contract for checking business data, and the intelligent contract is assembled based on the compression template.
In general, smart contracts need to meet the specifications of the smart contracts. Therefore, it is necessary for the node device to audit the intelligent contract submitted by the business party.
In one embodiment, a node device of a block chain receives a creation transaction of an intelligent contract assembled by a compression template and sent by a service party;
responding to the created transaction, calling contract auditing logic declared in an auditing contract issued in the block chain, writing a voting event in a transaction log, and submitting the voting transaction to the auditing contract after the auditing node of the block chain monitors the voting event; and the auditing contract collects and sorts the voting transactions to obtain an auditing result of the intelligent contract.
And if the auditing result is that the intelligent contract passes, creating the intelligent contract in the block chain, and returning the unique identifier of the intelligent contract to the service party. That is, there is a one-to-one correspondence between the unique identifier and the intelligent contract.
In an embodiment, the unique identifier may refer to a hash value obtained by performing a hash calculation on unique content of a compression template declared in the smart contract. And the hash value also serves as a contract address for storing the intelligent contract.
Besides the hash value, the unique identifier may also be any identifier with uniqueness, for example, an ID that grows in sequence is used for identification. For example, starting from ID ═ 0, each time an intelligent contract is created, 1 is added on the basis of the original ID as the unique identifier of the newly created intelligent contract.
For target data uploaded by a service party and compressed locally on the service party based on a compression template, node equipment needs to verify the target data. And determining that the verification is passed only when the data format of the target data conforms to the data format specified by the compressed template, so that the compressed target data is stored and verified.
The embodiment of the present specification provides a data compression scheme based on a block chain, where a service party locally compresses target data to be stored and certified based on a compression template, and a node device of a corresponding block chain verifies the compressed data based on an intelligent contract corresponding to the compression template, so as to ensure that the compressed data to be stored and certified meets the requirements of a data format to avoid data anomalies (such as data scrambling and misalignment). Therefore, data is compressed from the data source through the format constraint of the compression template and the intelligent contract, and the data volume is reduced.
As described above, the service party can compress the target data and then uplink the stored certificate, so that the data volume of the uplink stored certificate can be greatly reduced, thereby reducing the storage resources required by the data stored certificate; however, since the data is compressed, after reading the compressed data, how to restore the compressed data to the complete data needs to be solved.
Referring to fig. 3, fig. 3 is a flowchart of a data query method based on a block chain according to an embodiment of the present disclosure, where the method is applied to a service party, and data stored on the block chain is compressed data after data compression is performed based on the embodiment shown in fig. 1; the embodiment may specifically include the following steps:
step 310: the business party assembles the unique identification into a query transaction according to the data to be queried;
step 320: sending the query transaction to node equipment of a blockchain, so that the node equipment responds to the query transaction and queries the compressed data stored on the blockchain; inquiring an intelligent contract corresponding to the unique identifier distributed in the block chain, and calling a compression template declared in the intelligent contract to restore the compressed data into complete data;
step 330: and receiving the complete data returned by the node equipment.
When a business party needs to acquire target data, the business party can assemble the target data into a query transaction based on the unique identifier corresponding to the data structure to which the target data belongs, namely the query transaction contains the unique identifier.
The node equipment responds to the inquiry transaction, and can inquire the compressed data of the target data stored on the block chain; and inquiring the intelligent contract corresponding to the unique identifier.
Here, the execution of the query compressed data and the intelligent contract has no absolute time sequence order, and may be executed simultaneously, or the compressed data may be executed first, or the query intelligent contract may be executed first.
After the intelligent contract and the compressed data are inquired, a compression template stated in the intelligent contract needs to be called to restore the compressed data into complete data.
In one embodiment, the compression template records compression rules of a self-description structure;
the restoring the compressed data into complete data specifically includes:
mapping the self-defined data in the compressed data into a self-description structure according to the compression rule; wherein the custom data volume is less than the data volume of the self-describing structure.
Continuing with the foregoing example: aiming at the target data: /username/ZhangSan; since the data structure of the target data is an XML data structure, it is assumed that the/username/mapping defined in the compression template of XML is "1"; the compressed target data becomes: 1 ZhangSan;
if the business side needs to obtain the target data, the evidence stored in the block chain is 1 Zhangsan; the custom data needs to be restored back to the self-describing structure; the mapping relation between "/username/" and "1" is defined in the XML compression template declared in the intelligent contract; therefore, the node device can convert the custom data "1" in the compressed data into a self-description structure "/username/", that is, the restored complete data is/username/ZhangSan; the queried data ZhangSan means a user name.
In the embodiment of the present specification, a data query scheme based on a block chain is provided, where when a node device of the block chain receives a query transaction of a service party, because data certified by the block chain is compressed data, the compressed data can be restored to complete data based on a compression template stated in an intelligent contract. Therefore, the method is also based on the compression template of the intelligent contract, and the certified compression data is restored into complete data to be provided for a business party, so that the data correctness is ensured.
Referring to fig. 4, fig. 4 is a flowchart of a data query method based on a blockchain according to an embodiment of the present disclosure, where the method is applied to a node device of a blockchain, and data stored in the blockchain is compressed data after data compression is performed based on the embodiment shown in fig. 1; the embodiment may specifically include the following steps:
step 410: the node equipment of the block chain receives the inquiry transaction submitted by the service party; wherein, the inquiry transaction comprises a unique identifier;
step 420: in response to the query transaction, querying the compressed data for evidence stored on the blockchain;
step 430: inquiring an intelligent contract corresponding to the unique identifier distributed in the block chain, and calling a compression template declared in the intelligent contract to restore the compressed data into complete data;
step 440: and returning the complete data to the service party.
Different from the foregoing embodiment shown in fig. 3, the embodiment in this embodiment is an execution subject, and specific implementation may refer to the description in the embodiment in fig. 3.
The service party can initiate a query transaction to the node device of the blockchain to query the target data stored on the blockchain. Wherein, the inquiry transaction comprises a unique identifier.
The node equipment responds to the inquiry transaction, and can inquire the compressed data of the target data stored on the block chain; and inquiring the intelligent contract corresponding to the unique identifier.
Here, the execution of the query compressed data and the intelligent contract has no absolute time sequence order, and may be executed simultaneously, or the compressed data may be executed first, or the query intelligent contract may be executed first.
After the intelligent contract and the compressed data are inquired, a compression template stated in the intelligent contract needs to be called to restore the compressed data into complete data.
In one embodiment, the compression template records compression rules of a self-description structure;
the restoring the compressed data into complete data specifically includes:
mapping the self-defined data in the compressed data into a self-description structure according to the compression rule; wherein the custom data volume is less than the data volume of the self-describing structure.
Continuing with the foregoing example: aiming at the target data: /username/ZhangSan; since the data structure of the target data is an XML data structure, it is assumed that the/username/mapping defined in the compression template of XML is "1"; the compressed target data becomes: 1 ZhangSan;
if the business side needs to obtain the target data, the evidence stored in the block chain is 1 Zhangsan; the custom data needs to be restored back to the self-describing structure; the mapping relation between "/username/" and "1" is defined in the XML compression template declared in the intelligent contract; therefore, the node device can convert the custom data "1" in the compressed data into a self-description structure "/username/", that is, the restored complete data is/username/ZhangSan; the queried data ZhangSan means a user name.
In the embodiment of the present specification, a data query scheme based on a block chain is provided, where when a node device of the block chain receives a query transaction of a service party, because data certified by the block chain is compressed data, the compressed data can be restored to complete data based on a compression template stated in an intelligent contract. Therefore, the method is also based on the compression template of the intelligent contract, and the certified compression data is restored into complete data to be provided for a business party, so that the data correctness is ensured.
In correspondence with the aforementioned blockchain-based bonus funds distribution method embodiments, the present specification also provides embodiments of blockchain-based bonus funds distribution devices. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and as a logical device, the device is formed by reading corresponding computer business program instructions in the nonvolatile memory into the memory for operation through the processor of the device in which the device is located. From a hardware aspect, as shown in fig. 5, a hardware structure diagram of a device where the reward fund distribution apparatus based on a block chain is located in this specification is shown, except for the processor, the network interface, the memory, and the nonvolatile memory shown in fig. 5, the device where the apparatus is located in the embodiment may generally distribute an actual function according to the reward fund based on the block chain, and may further include other hardware, which is not described again.
Referring to fig. 6, a block diagram of a device for data compression based on a block chain according to an embodiment of the present disclosure is provided, where the device corresponds to the embodiment shown in fig. 1 and is applied to a service side, and the device includes:
a compressing unit 510, which compresses the target data to be stored according to a preset compression template by the service party;
an assembling unit 520, which assembles the compressed target data and the unique identifier of the compressed template into a deposit transaction;
and the evidence storing unit 530 is configured to send the evidence storing transaction to a node device of the block chain, so that the node device queries an intelligent contract corresponding to the unique identifier issued in the block chain in response to the evidence storing transaction, invokes a compression template declared in the intelligent contract to check the data format of the target data, and if the check passes the evidence storing of the target data.
Optionally, the compressing unit 510 specifically includes:
the determining subunit is used for determining a data structure of target data to be stored;
and the compression subunit compresses the target data according to the compression template corresponding to the data structure.
Optionally, the data structure of the target data is composed of a self-description structure and actual data; wherein the self-describing structure is used to represent the meaning expressed by the actual data;
the compression template records the compression rule of the self-description structure;
in the compression subunit, compressing the target data includes:
mapping a self-description structure of the target data into custom data according to the compression rule; wherein the custom data volume is less than the data volume of the self-describing structure.
Optionally, the apparatus further comprises:
the transaction assembly subunit is used for assembling the compression template into a creation transaction of the intelligent contract;
a contract creating subunit, configured to send the created transaction to a node device of a block chain, so that the node device invokes a contract audit logic declared in an audit contract issued to the block chain in response to the created transaction, and writes a voting event in a transaction log, where after the audit node of the block chain monitors the voting event, the node device submits the voting transaction to the audit contract; and the auditing contract collects and sorts the voting transactions to obtain an auditing result of the intelligent contract.
Optionally, the contract creating subunit further includes:
and if the auditing result is that the intelligent contract passes, creating the intelligent contract in the block chain, and returning the unique identifier of the intelligent contract to the service party.
Optionally, the unique identifier includes:
and performing hash calculation on the unique content of the compression template declared in the intelligent contract to obtain a hash value.
Referring to fig. 7, a block diagram of a data compression apparatus based on a blockchain according to an embodiment of the present disclosure is provided, where the apparatus corresponds to the embodiment shown in fig. 2 and is applied to a node device of the blockchain, and the apparatus includes:
a receiving unit 610, where node equipment of the block chain receives a deposit transaction submitted by a service party; the deposit transaction comprises a unique identifier and target data to be deposited, wherein the target data is data compressed by a compression template corresponding to the unique identifier;
the response unit 620, in response to the deposit transaction, queries the intelligent contract corresponding to the unique identifier issued in the block chain, invokes a compression template declared in the intelligent contract to check the data format of the target data, and deposits the target data if the check is passed.
The node equipment of the block chain receives the deposit and certificate transaction submitted by the service party; the deposit transaction comprises a unique identifier and target data to be deposited, wherein the target data is data compressed by a compression template corresponding to the unique identifier;
and responding to the evidence storing transaction, inquiring the intelligent contract corresponding to the unique identifier distributed in the block chain, calling a compression template declared in the intelligent contract to check the data format of the target data, and storing and verifying the target data if the check is passed.
Optionally, the apparatus further comprises:
the receiving subunit is used for receiving the establishment transaction of the intelligent contract which is formed by assembling the compression template and sent by the service party;
a creating subunit, configured to invoke contract audit logic declared in an audit contract issued in the block chain in response to the created transaction, write a voting event in a transaction log, and submit the voting transaction to the audit contract after the audit node of the block chain monitors the voting event; and the auditing contract collects and sorts the voting transactions to obtain an auditing result of the intelligent contract.
Optionally, the creating a subunit further includes:
and if the auditing result is that the intelligent contract passes, creating the intelligent contract in the block chain, and returning the unique identifier of the intelligent contract to the service party.
Optionally, the unique identifier includes:
and performing hash calculation on the unique content of the compression template declared in the intelligent contract to obtain a hash value.
Corresponding to the foregoing embodiments of the data query method based on a blockchain, the present specification also provides embodiments of a data query apparatus based on a blockchain. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and as a logical device, the device is formed by reading corresponding computer business program instructions in the nonvolatile memory into the memory for operation through the processor of the device in which the device is located. From a hardware aspect, as shown in fig. 8, the hardware structure diagram of the device where the data query apparatus based on the blockchain is located in this specification is shown, except for the processor, the network interface, the memory, and the nonvolatile memory shown in fig. 8, the device where the apparatus is located in the embodiment may generally query an actual function according to the data based on the blockchain, and may further include other hardware, which is not described again.
Referring to fig. 9, a block diagram of a data compression apparatus based on a block chain according to an embodiment of the present disclosure is shown, where the apparatus corresponds to the embodiment shown in fig. 3 and is applied to a service side, and data stored in the block chain is compressed data obtained by performing data compression by the data compression method based on the block chain; the device comprises:
an assembling unit 710, for the business party to assemble the unique identifier into a query transaction with respect to the data to be queried;
the query unit 720, which sends the query transaction to the node device of the blockchain, so that the node device queries the compressed data certified on the blockchain in response to the query transaction; inquiring an intelligent contract corresponding to the unique identifier distributed in the block chain, and calling a compression template declared in the intelligent contract to restore the compressed data into complete data;
the receiving unit 730 receives the complete data returned by the node device.
Optionally, a compression rule of a self-description structure is recorded in the compression template;
in the querying unit 720, the restoring the compressed data into complete data specifically includes:
mapping the self-defined data in the compressed data into a self-description structure according to the compression rule; wherein the custom data volume is less than the data volume of the self-describing structure.
Please refer to fig. 10, which is a block diagram of a data compression apparatus based on a block chain according to an embodiment of the present disclosure, where the apparatus corresponds to the embodiment shown in fig. 4 and is applied to a node device of the block chain, and data stored in the block chain is compressed data obtained by performing data compression by using the data compression method based on the block chain; the device comprises:
a receiving unit 810, where a node device of the blockchain receives an inquiry transaction submitted by a service party; wherein, the inquiry transaction comprises a unique identifier;
a query unit 820, configured to query the compressed data stored in the blockchain in response to the query transaction;
the decompression unit 830 is configured to query the intelligent contract corresponding to the unique identifier issued in the block chain, and call a compression template declared in the intelligent contract to restore the compressed data to complete data;
a returning unit 840, which returns the complete data to the service party.
Optionally, a compression rule of a self-description structure is recorded in the compression template;
the decompressing unit 830 restores the compressed data to complete data, which specifically includes:
mapping the self-defined data in the compressed data into a self-description structure according to the compression rule; wherein the custom data volume is less than the data volume of the self-describing structure.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in the specification. One of ordinary skill in the art can understand and implement it without inventive effort.
Fig. 6 above describes the internal functional modules and the structural schematic of the data compression apparatus based on the block chain, and the substantial execution subject may be an electronic device, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
the business party compresses the target data to be stored and certified according to a preset compression template;
assembling the compressed target data and the unique identification of the compressed template into a deposit certificate transaction;
and sending the deposit transaction to node equipment of a block chain, so that the node equipment responds to the deposit transaction, inquires an intelligent contract corresponding to the unique identifier distributed in the block chain, calls a compression template stated in the intelligent contract to check the data format of the target data, and if the check passes the deposit of the target data.
Fig. 7 above describes the internal functional modules and the structural schematic of the data compression apparatus based on the block chain, and the substantial execution subject may be an electronic device, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
the node equipment of the block chain receives the deposit and certificate transaction submitted by the service party; the deposit transaction comprises a unique identifier and target data to be deposited, wherein the target data is data compressed by a compression template corresponding to the unique identifier;
and responding to the evidence storing transaction, inquiring the intelligent contract corresponding to the unique identifier distributed in the block chain, calling a compression template declared in the intelligent contract to check the data format of the target data, and storing and verifying the target data if the check is passed.
Fig. 9 above describes the internal functional modules and the structural schematic of the data query apparatus based on the block chain, and the substantial execution subject may be an electronic device, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
the business party assembles the unique identification into a query transaction according to the data to be queried; the data stored on the block chain is compressed data obtained by data compression by any one of the block chain-based data compression methods;
sending the query transaction to node equipment of a blockchain, so that the node equipment responds to the query transaction and queries the compressed data stored on the blockchain; inquiring an intelligent contract corresponding to the unique identifier distributed in the block chain, and calling a compression template declared in the intelligent contract to restore the compressed data into complete data;
and receiving the complete data returned by the node equipment.
Fig. 10 above describes the internal functional modules and the structural schematic of the data query apparatus based on the block chain, and the substantial execution subject may be an electronic device, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
the node equipment of the block chain receives the inquiry transaction submitted by the service party; wherein, the inquiry transaction comprises a unique identifier; the data stored on the block chain is compressed data obtained by data compression by any one of the block chain-based data compression methods;
in response to the query transaction, querying the compressed data for evidence stored on the blockchain;
inquiring an intelligent contract corresponding to the unique identifier distributed in the block chain, and calling a compression template declared in the intelligent contract to restore the compressed data into complete data;
and returning the complete data to the service party.
In the above embodiments of the electronic device, it should be understood that the Processor may be a Central Processing Unit (CPU), other general-purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, and the aforementioned memory may be a read-only memory (ROM), a Random Access Memory (RAM), a flash memory, a hard disk, or a solid state disk. The steps of a method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiment of the electronic device, since it is substantially similar to the embodiment of the method, the description is simple, and for the relevant points, reference may be made to part of the description of the embodiment of the method.
Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the specification following, in general, the principles of the specification and including such departures from the present disclosure as come within known or customary practice within the art to which the specification pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
It will be understood that the present description is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.

Claims (13)

1. A data compression method based on block chains is applied to a service side, and the method comprises the following steps:
a service party locally determines a data structure of target data to be stored and a compression template corresponding to the data structure; wherein the data structure of the target data is composed of a self-description structure and actual data; the self-description structure is used for representing the meaning expressed by the actual data;
mapping the self-description structure of the target data into the self-defined data according to the mapping relation between the self-description structure and the self-defined data which are predefined in the compression template; wherein the custom data volume is less than the data volume of the self-describing structure;
assembling the compressed target data and the unique identification of the compressed template into a deposit certificate transaction;
sending the deposit transaction to node equipment of a block chain, so that the node equipment responds to the deposit transaction, inquires an intelligent contract corresponding to the unique identifier distributed in the block chain, calls a compression template stated in the intelligent contract to check the data format of the target data, and if the check passes the deposit of the target data;
wherein the creation process of the intelligent contract comprises:
assembling the compression template into a creation transaction of the intelligent contract; sending the created transaction to a node device of a block chain, so that the node device responds to the created transaction, invokes contract auditing logic declared in an auditing contract issued in the block chain, writes a voting event in a transaction log, and submits the voting transaction to the auditing contract after the auditing node of the block chain monitors the voting event; the auditing contract collects and sorts the voting transactions to obtain the auditing result of the intelligent contract; if the auditing result is that the intelligent contract passes, creating the intelligent contract in the block chain, and returning the unique identifier of the intelligent contract to a service party; the unique identification and the intelligent contract have one-to-one correspondence.
2. The method of claim 1, the unique identification comprising:
and performing hash calculation on the unique content of the compression template declared in the intelligent contract to obtain a hash value.
3. A data compression method based on a block chain is applied to a node device of the block chain, and the method comprises the following steps:
the node equipment of the block chain receives the deposit and certificate transaction submitted by the service party; the deposit transaction comprises a unique identifier and target data to be deposited, wherein the target data is data compressed by a compression template corresponding to the unique identifier;
responding to the evidence storing transaction, inquiring an intelligent contract corresponding to the unique identifier distributed in the block chain, calling a compression template declared in the intelligent contract to check the data format of the target data, and storing and verifying the target data if the check is passed;
wherein the target data compression process comprises:
the business side locally determines a data structure of data before compression and a compression template corresponding to the data structure; the data structure of the data before compression consists of a self-description structure and actual data; the self-description structure is used for representing the meaning expressed by the actual data;
mapping the self-description structure of the data before compression into the self-defined data according to the mapping relation between the self-description structure and the self-defined data which are predefined in the compression template; wherein the custom data volume is less than the data volume of the self-describing structure;
wherein the creation process of the intelligent contract comprises:
receiving a creating transaction of an intelligent contract which is sent by a service party and assembled by aiming at a compression template; responding to the created transaction, calling contract auditing logic declared in an auditing contract issued in the block chain, writing a voting event in a transaction log, and submitting the voting transaction to the auditing contract after the auditing node of the block chain monitors the voting event; the auditing contract collects and sorts the voting transactions to obtain the auditing result of the intelligent contract; if the auditing result is that the intelligent contract passes, creating the intelligent contract in the block chain, and returning the unique identifier of the intelligent contract to a service party; the unique identification and the intelligent contract have one-to-one correspondence.
4. The method of claim 3, the unique identification comprising:
and performing hash calculation on the unique content of the compression template declared in the intelligent contract to obtain a hash value.
5. A data query method based on a block chain, wherein the data certified on the block chain is compressed data after data compression based on the method of claim 1; the method comprises the following steps:
the business party assembles the unique identification into a query transaction according to the data to be queried;
sending the query transaction to node equipment of a blockchain, so that the node equipment responds to the query transaction and queries the compressed data stored on the blockchain; inquiring an intelligent contract corresponding to the unique identifier distributed in the block chain, and calling a compression template declared in the intelligent contract to restore the compressed data into complete data;
and receiving the complete data returned by the node equipment.
6. The method of claim 5, wherein the compression template records a compression rule of a self-description structure;
the restoring the compressed data into complete data specifically includes:
mapping the self-defined data in the compressed data into a self-description structure according to the compression rule; wherein the custom data volume is less than the data volume of the self-describing structure.
7. A data query method based on a block chain, wherein the data certified on the block chain is compressed data after data compression based on the method of claim 3; the method comprises the following steps:
the node equipment of the block chain receives the inquiry transaction submitted by the service party; wherein, the inquiry transaction comprises a unique identifier;
in response to the query transaction, querying the compressed data for evidence stored on the blockchain;
inquiring an intelligent contract corresponding to the unique identifier distributed in the block chain, and calling a compression template declared in the intelligent contract to restore the compressed data into complete data;
and returning the complete data to the service party.
8. The method of claim 7, wherein the compression template records a compression rule of a self-description structure;
the restoring the compressed data into complete data specifically includes:
mapping the self-defined data in the compressed data into a self-description structure according to the compression rule; wherein the custom data volume is less than the data volume of the self-describing structure.
9. A device for data compression based on block chain, applied to a service side, the device comprising:
the business side locally determines a data structure of target data to be stored and certified and a compression template corresponding to the data structure; wherein the data structure of the target data is composed of a self-description structure and actual data; the self-description structure is used for representing the meaning expressed by the actual data; mapping the self-description structure of the target data into the self-defined data according to the mapping relation between the self-description structure and the self-defined data which are predefined in the compression template; wherein the custom data volume is less than the data volume of the self-describing structure;
the assembling unit is used for assembling the compressed target data and the unique identifier of the compressed template into a deposit certificate transaction;
the response unit is used for sending the deposit transaction to the node equipment of the block chain so as to enable the node equipment to respond to the deposit transaction, inquire the intelligent contract corresponding to the unique identifier distributed in the block chain, call a compression template declared in the intelligent contract to check the data format of the target data, and if the check passes the deposit of the target data;
the transaction assembly subunit is used for assembling the compression template into a creation transaction of the intelligent contract;
a contract creating subunit, configured to send the created transaction to a node device of a block chain, so that the node device invokes a contract audit logic declared in an audit contract issued to the block chain in response to the created transaction, and writes a voting event in a transaction log, where after the audit node of the block chain monitors the voting event, the node device submits the voting transaction to the audit contract; the auditing contract collects and sorts the voting transactions to obtain the auditing result of the intelligent contract; if the auditing result is that the intelligent contract passes, creating the intelligent contract in the block chain, and returning the unique identifier of the intelligent contract to a service party; the unique identification and the intelligent contract have one-to-one correspondence.
10. An apparatus for data compression based on a blockchain, applied to a node device of the blockchain, the apparatus comprising:
the receiving unit is used for receiving the deposit and certificate transaction submitted by the service party by the node equipment of the block chain; the deposit transaction comprises a unique identifier and target data to be deposited, wherein the target data is data compressed by a compression template corresponding to the unique identifier; wherein the target data compression process comprises: the business side locally determines a data structure of data before compression and a compression template corresponding to the data structure; the data structure of the data before compression consists of a self-description structure and actual data; the self-description structure is used for representing the meaning expressed by the actual data; mapping the self-description structure of the data before compression into the self-defined data according to the mapping relation between the self-description structure and the self-defined data which are predefined in the compression template; wherein the custom data volume is less than the data volume of the self-describing structure;
the response unit is used for responding to the evidence storing transaction, inquiring the intelligent contract corresponding to the unique identifier distributed in the block chain, calling a compression template declared in the intelligent contract to check the data format of the target data, and storing and verifying the target data if the check is passed;
the receiving subunit is used for receiving the establishment transaction of the intelligent contract which is formed by assembling the compression template and sent by the service party;
a creating subunit, configured to invoke contract audit logic declared in an audit contract issued in the block chain in response to the created transaction, write a voting event in a transaction log, and submit the voting transaction to the audit contract after the audit node of the block chain monitors the voting event; the auditing contract collects and sorts the voting transactions to obtain the auditing result of the intelligent contract; if the auditing result is that the intelligent contract passes, creating the intelligent contract in the block chain, and returning the unique identifier of the intelligent contract to a service party; the unique identification and the intelligent contract have one-to-one correspondence.
11. A data inquiry device based on a block chain, wherein the data certified on the block chain is compressed data after data compression based on the method of claim 1; the device comprises:
the assembly unit is used for assembling the unique identifier into an inquiry transaction by a business party according to the data to be inquired;
the query unit is used for sending the query transaction to the node equipment of the block chain so as to enable the node equipment to respond to the query transaction and query the compressed data stored on the block chain; inquiring an intelligent contract corresponding to the unique identifier distributed in the block chain, and calling a compression template declared in the intelligent contract to restore the compressed data into complete data;
and the receiving unit is used for receiving the complete data returned by the node equipment.
12. A data query device based on a block chain, wherein data certified on the block chain is compressed data after data compression based on the method of claim 3; the device comprises:
the receiving unit is used for receiving the inquiry transaction submitted by the service party by the node equipment of the block chain; wherein, the inquiry transaction comprises a unique identifier;
the query unit is used for responding to the query transaction and querying the compressed data stored on the block chain;
the decompression unit is used for inquiring the intelligent contract corresponding to the unique identifier distributed in the block chain and calling a compression template declared in the intelligent contract to restore the compressed data into complete data;
and the return unit is used for returning the complete data to the service party.
13. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured as the method of any of the preceding claims 1-8.
CN201910363442.5A 2019-04-30 2019-04-30 Block chain-based data compression and query method and device and electronic equipment Active CN110163755B (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
CN201910363442.5A CN110163755B (en) 2019-04-30 2019-04-30 Block chain-based data compression and query method and device and electronic equipment
CN202110043051.2A CN112750037A (en) 2019-04-30 2019-04-30 Block chain-based data compression and query method and device and electronic equipment
TW109100896A TWI726573B (en) 2019-04-30 2020-01-10 Block chain-based data compression and query method and device and electronic equipment
PCT/CN2020/072133 WO2020220764A1 (en) 2019-04-30 2020-01-15 Blockchain-based data compression and query method and apparatus, and electronic device
US16/786,794 US10795882B2 (en) 2019-04-30 2020-02-10 Blockchain-based data compression and searching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910363442.5A CN110163755B (en) 2019-04-30 2019-04-30 Block chain-based data compression and query method and device and electronic equipment

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202110043051.2A Division CN112750037A (en) 2019-04-30 2019-04-30 Block chain-based data compression and query method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN110163755A CN110163755A (en) 2019-08-23
CN110163755B true CN110163755B (en) 2020-11-24

Family

ID=67633304

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202110043051.2A Pending CN112750037A (en) 2019-04-30 2019-04-30 Block chain-based data compression and query method and device and electronic equipment
CN201910363442.5A Active CN110163755B (en) 2019-04-30 2019-04-30 Block chain-based data compression and query method and device and electronic equipment

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202110043051.2A Pending CN112750037A (en) 2019-04-30 2019-04-30 Block chain-based data compression and query method and device and electronic equipment

Country Status (3)

Country Link
CN (2) CN112750037A (en)
TW (1) TWI726573B (en)
WO (1) WO2020220764A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10795882B2 (en) 2019-04-30 2020-10-06 Alibaba Group Holding Limited Blockchain-based data compression and searching
CN112750037A (en) * 2019-04-30 2021-05-04 创新先进技术有限公司 Block chain-based data compression and query method and device and electronic equipment
CN110928534B (en) * 2019-10-14 2021-11-09 上海唯链信息科技有限公司 Workflow node authentication method and device based on block chain
CN111260469A (en) * 2020-01-10 2020-06-09 杭州溪塔科技有限公司 Block chain-based evidence storing method, block chain-based evidence storing query method, corresponding device and electronic equipment
CN111262876B (en) * 2020-01-22 2022-05-27 腾讯科技(深圳)有限公司 Data processing method, device and equipment based on block chain and storage medium
US11263206B1 (en) * 2021-03-02 2022-03-01 Coupang Corp. Systems and methods for multi-nodal stream processing framework for partitioned database
CN113242044B (en) * 2021-06-02 2022-10-14 湖北央中巨石信息技术有限公司 Block chain data storage compression method for reducing memory occupation
CN113468583A (en) * 2021-07-26 2021-10-01 华链时代(北京)科技有限公司 Encrypted data processing method and device based on block chain and electronic equipment

Family Cites Families (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1526472A3 (en) * 1995-02-13 2006-07-26 Intertrust Technologies Corp. Systems and methods for secure transaction management and electronic rights protection
US20030037237A1 (en) * 2001-04-09 2003-02-20 Jean-Paul Abgrall Systems and methods for computer device authentication
CN103595559A (en) * 2013-11-05 2014-02-19 深圳市远行科技有限公司 System and method for transmitting big data and service system thereof
US9736081B2 (en) * 2015-06-04 2017-08-15 At&T Intellectual Property I, L.P. Apparatus and method to improve compression and storage data
GB2604540B (en) * 2016-02-03 2023-01-11 Luther Systems System and method for secure management of digital contracts
US20180284758A1 (en) * 2016-05-09 2018-10-04 StrongForce IoT Portfolio 2016, LLC Methods and systems for industrial internet of things data collection for equipment analysis in an upstream oil and gas environment
US20180039422A1 (en) * 2016-08-05 2018-02-08 Alibaba Group Holding Limited Solid state storage capacity management systems and methods
US20180046992A1 (en) * 2016-08-10 2018-02-15 Jpmorgan Chase Bank, N.A. Systems and methods for account reconciliation using a distributed ledger
CN106326641A (en) * 2016-08-13 2017-01-11 深圳市樊溪电子有限公司 Data processing method for block chain system based on compressed sensing and sparse reconstruction algorithm
US10681133B2 (en) * 2016-09-19 2020-06-09 Tego, Inc. Methods and systems for endpoint device operating system in an asset intelligence platform
WO2018089447A1 (en) * 2016-11-10 2018-05-17 EyeVerify Inc. Verified and private portable identity
CN110024422B (en) * 2016-12-30 2023-07-18 英特尔公司 Naming and blockchain recording for the internet of things
CN107728941B (en) * 2017-09-28 2019-09-24 中国银行股份有限公司 A kind of block chain data compression method and system
CN107944868A (en) * 2017-12-07 2018-04-20 杭州趣链科技有限公司 A kind of electronics deposit system and management method based on block chain intelligence contract
CN108156173A (en) * 2018-01-09 2018-06-12 江苏徐工信息技术股份有限公司 A kind of dynamic lossless compression method of JSON data packets
US10181948B1 (en) * 2018-01-25 2019-01-15 Fortress Cyber Security, LLC Secure storage of hashes within a distributed ledger
CN108256354B (en) * 2018-01-29 2022-02-22 张天 Test data-based storage method and storage medium
CN108446991A (en) * 2018-04-02 2018-08-24 深圳市亚来科技有限公司 Car accident processing method and system based on block chain
CN108563796A (en) * 2018-05-04 2018-09-21 蔷薇信息技术有限公司 Data compressing method, device and the electronic equipment of block chain
CN109067541B (en) * 2018-06-29 2020-09-22 阿里巴巴集团控股有限公司 Data verification method and device based on block chain and electronic equipment
CN109173261A (en) * 2018-08-08 2019-01-11 平安科技(深圳)有限公司 Online game asset data amending method, device and electronic equipment
CN109274377A (en) * 2018-08-22 2019-01-25 泰康保险集团股份有限公司 Data processing method, device, medium and the electronic equipment of block chain network
CN113283905A (en) * 2018-10-26 2021-08-20 创新先进技术有限公司 Data storage and acquisition method and device based on block chain
CN109615517A (en) * 2018-12-07 2019-04-12 北京瑞卓喜投科技发展有限公司 A kind of intelligence contract execution method and intelligent contract execute system
CN112750037A (en) * 2019-04-30 2021-05-04 创新先进技术有限公司 Block chain-based data compression and query method and device and electronic equipment

Also Published As

Publication number Publication date
TWI726573B (en) 2021-05-01
WO2020220764A1 (en) 2020-11-05
CN112750037A (en) 2021-05-04
TW202042218A (en) 2020-11-16
CN110163755A (en) 2019-08-23

Similar Documents

Publication Publication Date Title
CN110163755B (en) Block chain-based data compression and query method and device and electronic equipment
TWI737944B (en) Block chain-based transaction execution method and device, and electronic equipment
CN110033244B (en) Intelligent contract execution method and device based on block chain and electronic equipment
CN109191124B (en) Block chain network, deployment method and storage medium
CN109325854B (en) Block chain network, deployment method and storage medium
CN109003078B (en) Intelligent contract calling method and device based on block chain and electronic equipment
CN110263035B (en) Block chain-based data storage and query method and device and electronic equipment
CN109218079B (en) Block chain network, deployment method and storage medium
JP7350845B2 (en) Blockchain notification board that stores blockchain resources
CN111144881A (en) Selective access to asset transfer data
JP7228322B2 (en) Auto-commit transaction management in blockchain networks
CN109886694B (en) Data processing method and device based on block chain and electronic equipment
CN110060155B (en) Intelligent contract execution method and device of block chain and electronic equipment
US20220382746A1 (en) Blockchain notification board storing blockchain resources
CN110046523B (en) Intelligent contract checking method and device and electronic equipment
CN109981646B (en) Resource transfer method and device based on block chain and electronic equipment
CN110400217B (en) Rule change processing method and device for intelligent contract
CN111461723A (en) Data processing system, method and device based on block chain
CN112612856B (en) Block chain-based data processing method and device
US10795882B2 (en) Blockchain-based data compression and searching
CN112287033B (en) Data synchronization method, equipment and computer readable storage medium
CN114971827A (en) Account checking method and device based on block chain, electronic equipment and storage medium
CN109586949A (en) Block generation method and computer storage medium
CN113420323B (en) Data sharing method and terminal equipment
US20230259930A1 (en) Cross-chain transaction processing method and apparatus, electronic device, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200930

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200930

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant