CN110597926A - Method and system for establishing block chain side chain based on horizontal extension database - Google Patents

Method and system for establishing block chain side chain based on horizontal extension database Download PDF

Info

Publication number
CN110597926A
CN110597926A CN201910957235.2A CN201910957235A CN110597926A CN 110597926 A CN110597926 A CN 110597926A CN 201910957235 A CN201910957235 A CN 201910957235A CN 110597926 A CN110597926 A CN 110597926A
Authority
CN
China
Prior art keywords
transaction
user
block chain
proposal
transaction proposal
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.)
Pending
Application number
CN201910957235.2A
Other languages
Chinese (zh)
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.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Shandong ICity Information Technology 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 Shandong ICity Information Technology Co., Ltd. filed Critical Shandong ICity Information Technology Co., Ltd.
Priority to CN201910957235.2A priority Critical patent/CN110597926A/en
Publication of CN110597926A publication Critical patent/CN110597926A/en
Pending legal-status Critical Current

Links

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/21Design, administration or maintenance of databases
    • 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
    • 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

Abstract

The invention provides a method and a system for establishing a block chain side chain based on a horizontal expansion database. The method comprises the following steps: creating a database main library and a block chain side chain; establishing a transaction proposal of a developer user, wherein the transaction proposal is a request for writing the transaction content of the developer user into a channel corresponding to the developer user; the block chain side chain sends the transaction proposal to an extensible channel corresponding to the developer user according to the information of the developer user corresponding to the transaction proposal; preprocessing the transaction proposal by the block chain side chain to obtain a preprocessed transaction proposal; packaging the pre-processing transaction proposal into a block of a side chain of the block chain; blocks of block chain side chains are anchored into the super-book block chain. A high performance, high concurrency of blockchain sidechains is achieved through database and blockchain combinations.

Description

Method and system for establishing block chain side chain based on horizontal extension database
Technical Field
The invention relates to the field of block chains, in particular to a method and a system for establishing a block chain side chain based on a horizontal expansion database.
Background
In the prior art, large-scale application of a block chain also faces that the bottom layer performance cannot support high concurrency, effective supervision is difficult, correctness of uplink content cannot be guaranteed, and an application development threshold is too high.
Blockchains are analogous to databases, techniques used to store data. Therefore, from the underlying foundation, blockchains are a special database technology. Many of the features of databases, including scalability, high concurrency, high performance, and fast access to data, are not available in blockchains.
Therefore, there is a need in the art for a database and block chain combination, which has a problem that concurrent data storage cannot be achieved due to poor performance of the block chain.
Disclosure of Invention
The invention aims to provide a method and a system for establishing a block chain side chain based on a horizontal extension database, which can realize concurrent extension of a block chain, so as to solve the technical problem.
In order to achieve the purpose, the invention provides the following scheme:
a method for building block chain side chains based on a horizontal expansion database comprises the following steps:
creating a database main library and a block chain side chain, wherein the block chain side chain is a plurality of expandable channels, and each expandable channel corresponds to a channel database; the database master library is used for creating a developer user table, the extensible channels are used for receiving transactions of developer users, and each developer user is added with one extensible channel;
establishing a transaction proposal of a developer user, wherein the transaction proposal is a request for writing the transaction content of the developer user into a channel corresponding to the developer user;
the block chain side chain sends the transaction proposal to an extensible channel corresponding to the developer user according to the information of the developer user corresponding to the transaction proposal;
preprocessing the transaction proposal by the block chain side chain to obtain a preprocessed transaction proposal;
packaging the pre-processing transaction proposal into a block of a side chain of the block chain;
blocks of block chain side chains are anchored into the super-book block chain.
Optionally, a database master library and a block chain side chain are created, where the block chain side chain is a plurality of expandable channels, and each expandable channel corresponds to one channel database; the database master library is used for creating a developer user table, and the extensible channel is used for receiving transactions of developer users and specifically comprises the following steps:
the developer user table comprises a basic information field, a user public key and a user channel field of a user;
the basic information fields of the user are user name, user id, mobile phone number, user nickname, mailbox, user creation time, user type, user address, user birth date, user gender and login password;
the user public key is used for verifying the block chain side chain transaction of the user signature by a miner;
the user channel field is used to identify the extensible channel to which the developer user belongs.
Optionally, the constructing a transaction proposal of the developer user specifically includes:
creating original transaction content of a developer user;
hashing the original transaction content by adopting an SHA256 algorithm to obtain transaction hash;
the generation algorithm formula of the transaction hash is as follows:
Const signature=SHA256(user-id+tx-timestamp+tx-data);
the user-id represents the id of the developer user, the tx-timestamp represents the transaction timestamp of the developer user, and the tx-data represents the original transaction content of the developer user;
generating a transaction proposal by the transaction hash by adopting an application programming interface in the client SDK;
the serialized transaction proposal is in a structured text format, and a text transaction proposal is obtained;
a transaction signature is generated for the text transaction proposal based on a private key of the developer user.
Optionally, after preprocessing the transaction proposal by the block chain side chain, obtaining a preprocessed transaction proposal; packing the pre-processing transaction proposal into the blocks of the side chain of the block chain specifically comprises:
the method comprises the steps that a miner process of each channel of a block chain side chain sequences transaction proposals, the transaction proposals which are sequenced to be the first n positions are obtained, and n transaction proposals are obtained;
verifying the n transaction proposals, and acquiring qualified transaction proposals to acquire qualified transaction proposals;
connecting the hashes of the qualified transaction proposals end to end according to a sequencing sequence, wherein the transaction hashes are separated by commas and are connected into character strings;
taking Hash from the character string to obtain a Hash character string;
and signing the hash character string by adopting a private key of a blockchain side chain miner.
Optionally, the verifying n transaction proposals specifically includes:
verifying that the format of the transaction proposal is correct;
verifying that the transaction proposal is not submitted for preventing replay attacks;
verifying the signature of the transaction proposal to be valid by adopting a public key of a developer user;
verifying that the user submitting the transaction proposal belongs to the channel of the corresponding developer user.
Optionally, the anchoring rule for anchoring the block of the block chain side chain to the super-account block chain is as follows:
accumulating the number of blocks newly generated by the block chain side chain to a preset number; optionally, the preset number is 1000;
the anchoring time interval reaches a preset time length; optionally, the preset time period is 5 minutes.
Ensuring that block records are generated in the side chain of the block chain.
In order to achieve the above object, the present invention further provides the following solutions:
a system for building blockchain sidechains based on a horizontally expanding database, the system comprising:
the block chain creating module is used for creating a database main library and a block chain side chain;
the transaction proposal construction module is used for constructing a transaction proposal of the developer user, wherein the transaction proposal is a request for writing the transaction content of the developer user into a channel corresponding to the developer user;
the transaction proposal sending module is used for sending the transaction proposal to an extensible channel corresponding to the developer user by the block chain side chain according to the information of the developer user corresponding to the transaction proposal;
the transaction proposal preprocessing module is used for preprocessing the transaction proposal by the block chain side chain to obtain a preprocessed transaction proposal;
the transaction proposal packaging module is used for packaging the preprocessed transaction proposal into blocks of the block chain side chain;
and the block anchoring module is used for anchoring the blocks of the block chain side chains into the super-account block chain. Optionally, the transaction proposal building module specifically includes:
an original transaction content creating unit for creating original transaction content of a developer user;
the hash processing unit is used for hashing the original transaction content by adopting an SHA256 algorithm to obtain transaction hash;
the transaction proposal generating unit is used for generating a transaction proposal by the transaction hash by adopting an application programming interface in the client SDK;
the serialization processing unit is used for serializing the transaction proposal into a structured text format to obtain a text transaction proposal;
and the transaction signature unit is used for generating a transaction signature for the text transaction proposal according to the private key of the developer user.
Optionally, the transaction proposal preprocessing module specifically includes:
the sequencing unit is used for sequencing the transaction proposals by the miner process of each channel of the block chain side chain, acquiring the transaction proposals sequenced to be the first n positions and acquiring n transaction proposals;
the verification unit is used for verifying the n transaction proposals, acquiring the qualified transaction proposals after verification and acquiring the qualified transaction proposals;
the character string generation unit is used for connecting the heads and the tails of the hashes of the qualified transaction proposals according to a sequencing order, and the transaction hashes are separated by commas and are connected into character strings;
the hash unit is used for hashing the character string to obtain a hash character string;
and the signature unit is used for signing the hash character string by adopting a private key of a blockchain side chain miner.
Optionally, the verification unit includes:
the format verification subunit is used for verifying the correct format of the transaction proposal;
the transaction proposal submission verification subunit is used for verifying that the transaction proposal is not submitted;
the signature validity verifying subunit is used for verifying the validity of the signature of the transaction proposal by adopting the public key of the developer user;
and the channel verification subunit is used for verifying that the user submitting the transaction proposal belongs to the channel of the corresponding developer user.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects: the invention discloses a method and a system for establishing a block chain side chain based on a horizontal expansion database. The transaction proposal is a request for writing the transaction content of the developer user into a channel corresponding to the developer user; the block chain side chain sends the transaction proposal to an extensible channel corresponding to the developer user according to the information of the developer user corresponding to the transaction proposal, and the transaction and the block in the block chain side chain use a hash algorithm to obtain hash, so that the integrity of data is ensured; and the private key of the developer user is used for signing the hash, so that the data cannot be tampered and repudiated. The blocks of the block chain side chain are anchored to the super book finally, and the real non-tamper property is ensured.
Drawings
FIG. 1 is a flow chart of a method for building block chain side chains based on a horizontally expanded database according to the present invention;
FIG. 2 is a schematic diagram of a process for generating a transaction proposal according to the present invention;
fig. 3 is a block diagram of the system for building block chain side chains based on the horizontally extended database according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the drawings of the embodiments of the present invention. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the described embodiments of the invention without any inventive step, are within the scope of protection of the invention.
Example 1
Embodiment 1 of the present invention provides an embodiment of a method for creating a block chain side chain based on a horizontally-extended database, where as shown in fig. 1, the method includes the following steps:
s101: creating a database main library and a block chain side chain, wherein the block chain side chain is a plurality of expandable channels, and each expandable channel corresponds to a channel database; the database master library is used for creating a developer user table, the extensible channels are used for receiving transactions of developer users, and each developer user is added with one extensible channel;
each expandable channel corresponds to one channel library, and a new channel library is needed to be added when each channel is added;
the extensible channel (channel library) is used for receiving the transaction of the developer user to a transaction table of the channel library and punching the transaction in the channel library to a block table by an absenteeism worker.
Each developer user can only join one channel, the transactions signed by the developer users can only be stored in the channel, one channel can comprise a plurality of users, the channels are isolated for the whole high concurrency block chain side chain, and each channel independently generates blocks.
When the blockchain side chain needs higher concurrency and better performance, only one channel needs to be added, only the channel needs to be added in the blockchain side chain, namely, other databases are added, the channels are mutually isolated, data synchronization is not needed among the databases, and the improvement of the performance and the concurrency due to the addition of the channel is multiplied.
Each user needs to add a channel in advance, one channel is an independent database, and all transactions generated by the user are sent to the channel.
S102: establishing a transaction proposal of a developer user, wherein the transaction proposal is a request for writing the transaction content of the developer user into a channel corresponding to the developer user;
creating original transaction content of a developer user;
the developer initiates a transaction, the original transaction being an object in the following format:
{
user _ id: "20180828205744117494",// user id
tx _ timestamp:1562811149260,// transaction time
tx _ data// transaction content
}
Hashing the original transaction content by adopting an SHA256 algorithm to obtain transaction hash;
the generation algorithm formula of the transaction hash is as follows:
Const signature=SHA256(user-id+tx-timestamp+tx-data);
the user-id represents the id of the developer user, the tx-timestamp represents the transaction timestamp of the developer user, and the tx-data represents the original transaction content of the developer user;
the hash is signed using the private key of the user sending the transaction, ensuring non-tampering and non-repudiation of the transaction.
The transaction proposal format that the developer sends from the client to the blockchain sidechain through the SDK is as follows:
{
user _ id: "20180828205744117494",// user id
tx _ timestamp:1562811149260,// transaction time
tx _ data,// transaction content
txhash:SHA256(user_id+tx_timestamp+tx_data),
signature:sign(txhash)
}
Generating a transaction proposal by the transaction hash by adopting an application programming interface in the client SDK;
the serialized transaction proposal is in a structured text format, and a text transaction proposal is obtained;
generating a transaction signature for the text transaction proposal according to a private key of a developer user; the private key of the developer user is only stored by the developer, and only the public key corresponding to the developer user is in the block chain side chain and is used for verifying the signature of the developer user.
S103: the block chain side chain sends the transaction proposal to an extensible channel corresponding to the developer user according to the information of the developer user corresponding to the transaction proposal;
s104: preprocessing the transaction proposal by the block chain side chain to obtain a preprocessed transaction proposal;
and verifying the n transaction proposals, and acquiring the qualified transaction proposals after verification to obtain the qualified transaction proposals. Wherein n is a predetermined number and is a positive integer. The specific value of n may be specifically determined by those skilled in the art according to the actual application, and for example, the value of n may be optionally 5 to 20.
Connecting the hashes of the qualified transaction proposals end to end according to a sequencing sequence, wherein the transaction hashes are separated by commas and are connected into character strings;
taking Hash from the character string to obtain a Hash character string;
and signing the hash character string by adopting a private key of a blockchain side chain miner.
S105: packaging the pre-processing transaction proposal into a block of a side chain of the block chain;
the final blockchain side chain generated blockstructure is as follows:
{
block num 6543,// Block height
Block hash:,// block hash
PREHASH:,// PRE-BLOCK HASH
71, 71/transaction amount contained in the block
createdt:1562826147001,// Block Generation time
channel _ hash:,// channel hash
signature (sign (blockhash))// blockchain side chain signature
}
S106: blocks of block chain side chains are anchored into the super-book block chain.
The set of blocks generated in the blockchain side chain is anchored into the super ledger fabric blockchain as a transaction for the super ledger fabric.
Anchoring rules:
1. accumulating the number of blocks newly generated by the block side chain to the upper limit; preferably, the upper limit is 1000.
2. The anchoring time interval reaches a preset time length; preferably, the preset time period is 5 minutes.
3. If no new tile record is generated in the tile side chain, no transaction request is sent to the super book fabric.
The side chain block of the block chain is anchored by the super account book fabric, so that the side chain of the block chain cannot be tampered. The block chain side chain block arranges the hashes of all transactions in sequence, takes the hashes, uses the miner private key of the block chain side chain to sign, and anchors the transaction hashes of the block chain side chain into the block. And the transaction of the block chain side chain is signed by the hash of the transaction content and the private key signature of the developer user. And the block chain side chain is anchored layer by layer, so that the block chain side chain is ensured to be not tampered.
As shown in fig. 2, which is a schematic diagram of a process of generating a transaction proposal, a developer user hashes a transaction, signs a signature with its private key, generates a transaction proposal, and sends the transaction proposal to a blockchain side chain.
The blockchain sidelines distribute the 'transaction proposal' to the channels to which the user belongs according to the user information contained in the transaction proposal. The channels are mutually isolated, horizontal expansion is carried out according to performance requirements, and new channels are added.
To ensure that the blockchain sidelines are truly tamperproof, the blocks of the blockchain sidelines need to be ultimately anchored to the hyper book fabric.
Example 2
Embodiment 2 of the present invention further provides a system for establishing a block chain side chain based on a horizontally extended database, as shown in fig. 3.
A system for building blockchain sidechains based on a horizontally expanding database, the system comprising:
the block chain creating module 1 is used for creating a database main library and a block chain side chain, the block chain side chain is a plurality of expandable channels, and each expandable channel corresponds to one channel database; the database master library is used for creating a developer user table, the extensible channels are used for receiving transactions of developer users, and each developer user is added with one extensible channel;
the developer user table comprises a basic information field, a user public key and a user channel field of a user;
the basic information fields of the user are user name, user id, mobile phone number, user nickname, mailbox, user creation time, user type, user address, user birth date, user gender and login password;
the user public key is used for verifying the block chain side chain transaction of the user signature by a miner;
the user channel field is used to identify the extensible channel to which the developer user belongs.
The transaction proposal construction module 2 is used for constructing a transaction proposal of a developer user, wherein the transaction proposal is a request for writing the transaction content of the developer user into a channel corresponding to the developer user;
the transaction proposal sending module 3 is used for sending the transaction proposal to an extensible channel corresponding to the developer user according to the information of the developer user corresponding to the transaction proposal by the block chain side chain;
creating original transaction content of a developer user;
hashing the original transaction content by adopting an SHA256 algorithm to obtain transaction hash;
the generation algorithm formula of the transaction hash is as follows:
Const signature=SHA256(user-id+tx-timestamp+tx-data);
the user-id represents the id of the developer user, the tx-timestamp represents the transaction timestamp of the developer user, and the tx-data represents the original transaction content of the developer user;
generating a transaction proposal by the transaction hash by adopting an application programming interface in the client SDK;
the serialized transaction proposal is in a structured text format, and a text transaction proposal is obtained;
a transaction signature is generated for the text transaction proposal based on a private key of the developer user.
The transaction proposal preprocessing module 4 is used for preprocessing the transaction proposal by the block chain side chain to obtain a preprocessed transaction proposal;
the method comprises the steps that a miner process of each channel of a block chain side chain sequences transaction proposals, the transaction proposals which are sequenced to be the first n positions are obtained, and n transaction proposals are obtained;
verifying the n transaction proposals, and acquiring qualified transaction proposals to acquire qualified transaction proposals;
connecting the hashes of the qualified transaction proposals end to end according to a sequencing sequence, wherein the transaction hashes are separated by commas and are connected into character strings;
taking Hash from the character string to obtain a Hash character string;
and signing the hash character string by adopting a private key of a blockchain side chain miner.
The transaction proposal packaging module 5 is used for packaging the preprocessed transaction proposal into blocks of a side chain of the block chain;
and the block anchoring module 6 is used for anchoring the blocks of the block chain side chains into the super-account block chain.
The set of blocks generated in the blockchain side chain is anchored into the super ledger fabric blockchain as a transaction for the super ledger fabric.
Compared with the prior art, the invention has the following technical effects:
(1) and a block chain side chain is constructed outside the block chain by using a relational database, and the concurrency limit of a block chain platform is compensated by using the high concurrency and horizontal expansion of the relational database.
(2) The transaction and the block in the block chain side chain are hashed by using a hash algorithm, so that the integrity of data is ensured; and the private key of the developer user is used for signing the hash, so that the data cannot be tampered and repudiated.
(3) The blocks of the block chain side chain are finally anchored to the super account book fabric, so that real non-tampering is guaranteed.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
As shown in fig. 3, the embodiment of the present invention provides a system for building block chain side chains based on a horizontally extended database. The system embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. From a hardware aspect, as shown in fig. 3, for a hardware structure diagram of a device in which a system for establishing a block chain side chain based on a horizontally-extended database according to an embodiment of the present invention is located, in addition to the modules shown in fig. 3, the device in which the system is located in the embodiment may generally include other hardware, such as a CPU, a memory, a network interface, a nonvolatile memory, a forwarding chip responsible for processing a packet, and the like. Taking software implementation as an example, as a device in a logical sense, the system for establishing a block chain side chain based on a horizontal expansion database in the embodiment of the present invention is formed by reading a corresponding computer program instruction in a non-volatile memory into a memory by a CPU of a device in which the system is located to operate.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for building blockchain side chains based on a horizontally extended database, the method comprising:
creating a database main library and a block chain side chain, wherein the block chain side chain is a plurality of expandable channels, and each expandable channel corresponds to a channel database; the database master library is used for creating a developer user table, the extensible channels are used for receiving transactions of developer users, and each developer user is added with one extensible channel;
constructing a transaction proposal of the developer user, wherein the transaction proposal is a request for writing the transaction content of the developer user into a channel corresponding to the developer user;
the block chain side chain sends the transaction proposal to an extensible channel corresponding to the developer user according to the information of the developer user corresponding to the transaction proposal;
the block chain side chain preprocesses the transaction proposal to obtain a preprocessed transaction proposal;
packaging the pre-processing transaction proposal into a block of the block chain side chain;
anchoring blocks of the block chain side chain into a super-book block chain.
2. The method according to claim 1, wherein the creating a database master library and a blockchain sidelink is a blockchain sidelink, the blockchain sidelink is a plurality of expandable channels, and each expandable channel corresponds to one channel database; the database master library is used for creating a developer user table, and the extensible channel is used for receiving transactions of developer users and specifically comprises the following steps:
the developer user table comprises a basic information field, a user public key and a user channel field of a user;
the basic information fields of the user are a user name, a user id, a mobile phone number, a user nickname, a mailbox, user creation time, a user type, a user address, a user birth date, user gender and a login password;
the user public key is used for verifying the block chain side chain transaction of the user signature by a miner;
the user channel field is used to identify the extensible channel to which the developer user belongs.
3. The method according to claim 1, wherein the constructing the business proposal of the developer user specifically comprises:
creating original transaction content of a developer user;
hashing the original transaction content by adopting an SHA256 algorithm to obtain transaction hash;
the generation algorithm formula of the transaction hash is as follows:
Const signature=SHA256(user_id+tx_timestamp+tx_data);
wherein the user _ id represents the id of the developer user, the tx _ timestamp represents the transaction timestamp of the developer user, and the tx _ data represents the original transaction content of the developer user;
generating a transaction proposal by the transaction hash by adopting an application programming interface in the client SDK;
serializing the transaction proposal into a structured text format to obtain a text transaction proposal;
and generating a transaction signature for the text transaction proposal according to a private key of a developer user.
4. The method for building the block chain side chain based on the horizontally-expanded database as claimed in claim 1, wherein the block chain side chain obtains a pre-processed transaction proposal after pre-processing the transaction proposal; packing the pre-processing transaction proposal into a block of the block chain side chain specifically comprises:
the miners in each channel of the block chain side chain sequence the transaction proposals to obtain the first n transaction proposals and obtain n transaction proposals;
verifying the n transaction proposals, and acquiring qualified transaction proposals to acquire qualified transaction proposals;
connecting the hashes of the qualified transaction proposals end to end according to a sequencing sequence, wherein the transaction hashes are separated by commas and are connected into character strings;
hashing the character string to obtain a hashed character string;
and signing the hash character string by adopting a private key of a blockchain side chain miner.
5. The method according to claim 4, wherein the verifying n transaction proposals specifically comprises:
verifying that the format of the transaction proposal is correct;
verifying that the transaction proposal is not submitted for preventing replay attacks;
verifying that the signature of the transaction proposal is valid by adopting a public key of a developer user;
verifying that the user submitting the transaction proposal belongs to the channel of the corresponding developer user.
6. The method for building block chain side chains based on the horizontally extended database according to claim 1, wherein the anchoring rule for anchoring the blocks of the block chain side chains into the super-account block chain is as follows:
accumulating the number of blocks newly generated by the block chain side chain to a preset number;
the anchoring time interval reaches a preset time length;
ensuring that block records are generated in the side chain of the block chain.
7. A system for building blockchain sidechains based on a horizontally expanding database, the system comprising:
the block chain creating module is used for creating a database main library and a block chain side chain;
the transaction proposal construction module is used for constructing a transaction proposal of the developer user, wherein the transaction proposal is a request for writing the transaction content of the developer user into a channel corresponding to the developer user;
the transaction proposal sending module is used for sending the transaction proposal to an extensible channel corresponding to a developer user according to the information of the developer user corresponding to the transaction proposal by the blockchain side chain;
the transaction proposal preprocessing module is used for preprocessing the transaction proposal by the block chain side chain to obtain a preprocessed transaction proposal;
a transaction proposal packaging module for packaging the pre-processed transaction proposal into a block of the block chain side chain;
and the block anchoring module is used for anchoring the blocks of the block chain side chains into the super-account block chain.
8. The system for building block chain side chains based on horizontally expanded databases of claim 7, wherein the transaction proposal building module specifically comprises:
an original transaction content creating unit for creating original transaction content of a developer user;
the hash processing unit is used for hashing the original transaction content by adopting an SHA256 algorithm to obtain transaction hash;
the transaction proposal generating unit is used for generating a transaction proposal by the transaction hash by adopting an application programming interface in the client SDK;
the serialization processing unit is used for serializing the transaction proposal into a structured text format to obtain a text transaction proposal;
and the transaction signature unit is used for generating a transaction signature for the text transaction proposal according to the private key of the developer user.
9. The system for building block chain side chains based on horizontally expanded databases of claim 7, wherein the transaction proposal preprocessing module specifically comprises:
the sequencing unit is used for sequencing the transaction proposals by the miner process of each channel of the block chain side chain, acquiring the transaction proposals sequenced to be the first n positions and acquiring n transaction proposals;
the verification unit is used for verifying the n transaction proposals, acquiring qualified transaction proposals after verification and acquiring qualified transaction proposals;
the character string generation unit is used for connecting the heads and the tails of the hashes of the qualified transaction proposals according to a sequencing sequence, and the transaction hashes are separated by commas and are connected into character strings;
the hash unit is used for hashing the character string to obtain a hash character string;
and the signature unit is used for signing the hash character string by adopting a private key of a blockchain side chain miner.
10. The system for building block chain side chains based on horizontally expanded database according to claim 9, wherein the verification unit comprises:
the format verification subunit is used for verifying that the format of the transaction proposal is correct;
the transaction proposal submission verification subunit is used for verifying that the transaction proposal is not submitted;
the signature validity verifying subunit is used for verifying the validity of the signature of the transaction proposal by adopting a public key of a developer user;
and the channel verification subunit is used for verifying that the user submitting the transaction proposal belongs to the channel of the corresponding developer user.
CN201910957235.2A 2019-10-10 2019-10-10 Method and system for establishing block chain side chain based on horizontal extension database Pending CN110597926A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910957235.2A CN110597926A (en) 2019-10-10 2019-10-10 Method and system for establishing block chain side chain based on horizontal extension database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910957235.2A CN110597926A (en) 2019-10-10 2019-10-10 Method and system for establishing block chain side chain based on horizontal extension database

Publications (1)

Publication Number Publication Date
CN110597926A true CN110597926A (en) 2019-12-20

Family

ID=68866225

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910957235.2A Pending CN110597926A (en) 2019-10-10 2019-10-10 Method and system for establishing block chain side chain based on horizontal extension database

Country Status (1)

Country Link
CN (1) CN110597926A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112508571A (en) * 2020-12-17 2021-03-16 平安国际智慧城市科技股份有限公司 Data processing method and device based on block chain, computer equipment and storage medium
CN115062094A (en) * 2021-12-30 2022-09-16 昆明理工大学 Fabric-based relational database content synchronization method

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107169865A (en) * 2017-04-24 2017-09-15 北京果仁宝科技有限公司 Asset data processing system based on block chain technology
CN107464106A (en) * 2017-07-25 2017-12-12 北京果仁宝科技有限公司 The method and system merchandised between block chain main chain and side chain
CN109087203A (en) * 2018-07-17 2018-12-25 横琴密达科技有限责任公司 A kind of block chain isomerism system of main chain and side chain
CN109242681A (en) * 2018-08-21 2019-01-18 北京京东金融科技控股有限公司 Storage method, device, equipment and the system of asset data
EP3435270A1 (en) * 2017-07-27 2019-01-30 Siemens Aktiengesellschaft Device and method for cryptographically protected operation of a virtual machine
CN109493042A (en) * 2018-10-24 2019-03-19 南京邮电大学 A kind of intelligent contract possessing access control function is credible to deposit card method and system
CN109669940A (en) * 2018-11-12 2019-04-23 深圳市步云科技有限公司 A kind of main side chain distributed storage mode based on block chain
CN110264200A (en) * 2019-05-29 2019-09-20 中国工商银行股份有限公司 Block chain data processing method and device
CN110287259A (en) * 2019-06-27 2019-09-27 浪潮卓数大数据产业发展有限公司 A kind of audit log tamper resistant method based on block chain

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107169865A (en) * 2017-04-24 2017-09-15 北京果仁宝科技有限公司 Asset data processing system based on block chain technology
CN107464106A (en) * 2017-07-25 2017-12-12 北京果仁宝科技有限公司 The method and system merchandised between block chain main chain and side chain
EP3435270A1 (en) * 2017-07-27 2019-01-30 Siemens Aktiengesellschaft Device and method for cryptographically protected operation of a virtual machine
CN109087203A (en) * 2018-07-17 2018-12-25 横琴密达科技有限责任公司 A kind of block chain isomerism system of main chain and side chain
CN109242681A (en) * 2018-08-21 2019-01-18 北京京东金融科技控股有限公司 Storage method, device, equipment and the system of asset data
CN109493042A (en) * 2018-10-24 2019-03-19 南京邮电大学 A kind of intelligent contract possessing access control function is credible to deposit card method and system
CN109669940A (en) * 2018-11-12 2019-04-23 深圳市步云科技有限公司 A kind of main side chain distributed storage mode based on block chain
CN110264200A (en) * 2019-05-29 2019-09-20 中国工商银行股份有限公司 Block chain data processing method and device
CN110287259A (en) * 2019-06-27 2019-09-27 浪潮卓数大数据产业发展有限公司 A kind of audit log tamper resistant method based on block chain

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
邵奇峰等: "企业级区块链技术综述", 《软件学报》 *
邵奇峰等: "区块链技术:架构及进展", 《计算机学报》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112508571A (en) * 2020-12-17 2021-03-16 平安国际智慧城市科技股份有限公司 Data processing method and device based on block chain, computer equipment and storage medium
CN115062094A (en) * 2021-12-30 2022-09-16 昆明理工大学 Fabric-based relational database content synchronization method
CN115062094B (en) * 2021-12-30 2024-03-29 昆明理工大学 Relational database content synchronization method based on Fabric

Similar Documents

Publication Publication Date Title
US11756030B2 (en) Secure management of content distribution data blocks on a blockchain
US20200311670A1 (en) Secure shipping interactions using blockchains
CN108830109B (en) Electronic seal application, client implementation method, system and equipment, and storage medium
US20200110821A1 (en) Storing and verification of derivative work data on blockchain with original work data
US11681551B2 (en) Resource trust model for securing component state data for a resource using blockchains
CN111581605B (en) Block chain-based multi-person participation BIM drawing copyright protection system and method
CN111726226B (en) Signature system, signature method, first server and storage medium
CN111209591B (en) Storage structure sorted according to time and quick query method
CN110597926A (en) Method and system for establishing block chain side chain based on horizontal extension database
CN110287259A (en) A kind of audit log tamper resistant method based on block chain
RU2006116797A (en) METHOD FOR ENSURING DATA RECORDS INTEGRITY
CN110750541B (en) Block chain-based data storage indexing system and method
WO2020233149A1 (en) Method, apparatus and device for timing authentication in blockchain account book
CN112883117B (en) Data synchronization method, equipment and computer readable storage medium
WO2020244240A1 (en) Compression method for blockchain ledger, device, and equipment
US20230259938A1 (en) Blockchain-based data processing method and apparatus, device, readable storage medium and computer program product
CN109840769A (en) Card method and device, system and storage medium are deposited based on block chain
CN110059136A (en) Information storage means, equipment and storage medium based on domain name block chain
CN113506119A (en) APP-based charging pile transaction management method and system
CN109472536A (en) Express delivery cabinet based on block chain collects part method
CN109687970B (en) Mobile block chain full node and implementation method thereof
CN116896564A (en) Block generation method and device based on block chain network and computer equipment
WO2022205959A1 (en) Method and apparatus for sending transaction in blockchain, and method and apparatus for executing transaction in blockchain
CN111147477B (en) Verification method and device based on block chain network
CN101150398A (en) A method, system and communication terminal for updating communication secret key

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
TA01 Transfer of patent application right

Effective date of registration: 20200722

Address after: 250100 No. 1036 Tidal Road, Jinan High-tech Zone, Shandong Province, S01 Building, Tidal Science Park

Applicant after: Inspur cloud Information Technology Co.,Ltd.

Address before: 250100 Room 3110, S01 Building, Tidal Building, 1036 Tidal Road, Jinan High-tech Zone, Shandong Province

Applicant before: Shandong Aicheng Network Information Technology Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20191220