CN112508571A - Data processing method and device based on block chain, computer equipment and storage medium - Google Patents

Data processing method and device based on block chain, computer equipment and storage medium Download PDF

Info

Publication number
CN112508571A
CN112508571A CN202011495961.6A CN202011495961A CN112508571A CN 112508571 A CN112508571 A CN 112508571A CN 202011495961 A CN202011495961 A CN 202011495961A CN 112508571 A CN112508571 A CN 112508571A
Authority
CN
China
Prior art keywords
information
transaction
data
target
fragmentation
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
CN202011495961.6A
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.)
Ping An International Smart City Technology Co Ltd
Original Assignee
Ping An International Smart City 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 Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN202011495961.6A priority Critical patent/CN112508571A/en
Publication of CN112508571A publication Critical patent/CN112508571A/en
Pending legal-status Critical Current

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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • 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/602Providing cryptographic facilities or services
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • 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
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • General Business, Economics & Management (AREA)
  • General Health & Medical Sciences (AREA)
  • Strategic Management (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Computer Hardware Design (AREA)
  • Bioethics (AREA)
  • Tourism & Hospitality (AREA)
  • Development Economics (AREA)
  • Educational Administration (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a data processing method, a device, computer equipment and a storage medium based on a block chain, wherein the method comprises the following steps: acquiring transaction information of a user; filtering the transaction information of the user through a side chain to obtain target data; acquiring preset main chain fragmentation information, and acquiring at least one fragmentation region information according to the preset main chain fragmentation information; searching corresponding fragment area information according to the target data to obtain a target fragment area; and processing the target data through the target fragment area to obtain a processing result. The invention relates to a data processing technology based on a block chain, belonging to the field of block chains.

Description

Data processing method and device based on block chain, computer equipment and storage medium
Technical Field
The present invention relates to the field of block chain technologies, and in particular, to a data processing method and apparatus based on a block chain, a computer device, and a storage medium.
Background
The blockchain is a distributed ledger because the blockchain network is linked by individual nodes, requiring that each fully participating node must verify every transaction and that the nodes must be consistent with all other nodes of the entire network. Such a mechanism can guarantee the safety of the whole network to the maximum extent, so that the block chain has great advantages in fault tolerance, safety, political center and authenticity, but the mode has the cost of reducing the expandability. The throughput of the public chain is very small at the present stage, and only 7-15 transactions per second can be processed on average, so that the development of the application which is important to the throughput on the chain is hindered to a great extent.
Disclosure of Invention
The embodiment of the invention provides a data processing method and device based on a block chain, computer equipment and a storage medium, and aims to solve the problem that the throughput of the block chain is too low in the prior art.
In a first aspect, an embodiment of the present invention provides a data processing method based on a block chain, including:
acquiring transaction information of a user;
filtering the transaction information of the user through a side chain to obtain target data;
acquiring preset main chain fragmentation information, and acquiring at least one fragmentation region information according to the preset main chain fragmentation information;
searching corresponding fragment area information according to the target data to obtain a target fragment area;
and processing the target data through the target fragmentation area to obtain a processing result.
In a second aspect, an embodiment of the present invention provides a data processing apparatus based on a block chain, including:
the user transaction information acquisition unit is used for acquiring the transaction information of the user;
the transaction information filtering unit is used for filtering the transaction information of the user through a side chain to obtain target data;
the main chain information acquisition unit is used for acquiring preset main chain fragmentation information and acquiring at least one fragmentation region information according to the preset main chain fragmentation information;
the fragment area information searching unit is used for searching the corresponding fragment area information according to the target data to obtain a target fragment area;
and the processing unit is used for processing the target data through the target slicing area to obtain a processing result.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the processor implements the data processing method based on the blockchain according to the first aspect.
In a fourth aspect, the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to execute the method for processing data based on a blockchain according to the first aspect.
The embodiment of the invention provides a data processing method and device based on a block chain, computer equipment and a storage medium. The transaction information of the user is filtered through the side chain to obtain target data, so that the interference of invalid data on the main chain operation is reduced. The preset main chain fragmentation information is obtained, so that the fragmentation region corresponding to the correspondingly processed main chain can be calculated, and finally, the data is distributed to the corresponding fragmentation region for processing, so that the throughput of data processing in the block chain is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1-1 is a schematic flowchart of a data processing method based on a block chain according to an embodiment of the present invention;
fig. 1-2 are side chain main chain interactions of a block chain-based data processing method provided by an embodiment of the present invention;
fig. 1-3 are schematic sub-flow diagrams of a data processing method based on a block chain according to an embodiment of the present invention;
fig. 1-4 are schematic sub-flow diagrams of a data processing method based on a block chain according to an embodiment of the present invention;
fig. 1-5 are schematic sub-flow diagrams of a data processing method based on a block chain according to an embodiment of the present invention;
fig. 1-6 are schematic sub-flow diagrams of a data processing method based on a block chain according to an embodiment of the present invention;
fig. 1-7 are schematic sub-flow diagrams of a data processing method based on a block chain according to an embodiment of the present invention;
fig. 1-8 are schematic sub-flow diagrams of a data processing method based on a block chain according to an embodiment of the present invention;
FIG. 2 is a schematic block diagram of a data processing apparatus based on a blockchain according to an embodiment of the present invention;
FIG. 3 is a schematic block diagram of a computer device provided by an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention 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 be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1-1, fig. 1-1 is a schematic flow chart of a data processing method based on a block chain according to an embodiment of the present invention, where the data processing method based on a block chain is applied to a server, and the method is executed by an execution program of the server, where the server is a terminal device for executing the data processing method based on a block chain, and the server may be a server for providing various services. It should be noted that the data processing method based on the blockchain provided by the embodiment of the present invention is generally executed by a server, and accordingly, the data processing apparatus based on the blockchain is generally configured in the server. As shown in FIG. 1-1, the method includes steps 101-105.
101. And acquiring the transaction information of the user.
In this embodiment, the transaction information may be a plurality of acquired original data, and the transaction information of the user may be acquired through network communication or may be acquired through a database. Generally, a large amount of noise and invalid data exist in the acquired original data, and if the acquired original data are directly used, a large amount of invalid garbage data can be calculated by a calculation server, so that the calculation of the server is easily overloaded, and the server is crashed.
102. And filtering the transaction information of the user through a side chain to obtain target data.
In this embodiment, the interaction between the main chain and the side chain is as shown in fig. 1-2, for example, since the government affair item is open to all citizens or enterprises in this city, any user can fill in the application for the government affair item, so that many unqualified enterprise data are always stored in the database (the transaction information includes many invalid data), and thus the number of nodes of the blockchain is increased, which affects the efficiency of the blockchain. The side chain is an independent block chain, the side chain has an intelligent contract, all enterprises can be registered in the side chain through the intelligent contract, only the enterprise (the target data) preliminarily identified through the intelligent contract is added into the main block chain, and the side chain does not adopt a consensus mechanism, so that the swallowing capacity (TPS) of the system can be greatly improved.
103. Acquiring preset main chain fragmentation information, and acquiring at least one fragmentation region information according to the preset main chain fragmentation information.
In this embodiment, the main chain may be understood as an formally online and independent blockchain network, the fragmentation information refers to a rule of fragmentation, and is specifically applied to how to fragment the main chain, and the rule of fragmentation may be implemented by using an SHA256 encryption algorithm, and after obtaining a result of an encryption operation, performing hash calculation, and obtaining fragmentation area information according to a result of the hash calculation. Or the calculation can be carried out by other methods, and the slicing is calculated according to the specific application scene. Taking Shenzhen administrative regions as the slicing rules as an example, encrypting the region number of each region through an encryption algorithm to obtain an encryption result, then performing hash operation on the encryption result to obtain a corresponding result, and dividing the slicing regions according to the corresponding result. Backbone refers to the collective term for all block chains that adhere to the side chain protocol. The fragmentation area refers to a node area that processes data. For example, how to allocate shards can be determined according to transaction shards, taking Shenzhen as a blockchain main chain as an example, the Shenzhen has 11 regions (main chain shard information), and thus can be divided into a plurality of shards according to the administrative region of Shenzhen, for example, the administrative region of Shenzhen has a Nanshan region, a Longhua region, a Futian region, and a Jean region. The Longhua area and the Baoan area can be divided into a first fragment area, the Nanshan area is divided into a second fragment area, the Futian area can be divided into a third fragment area, the system can allocate one fragment according to the address of a request sender, data submitted by the Nanshan area can be added into the fragment area where the Nanshan area is located if the data passes the verification of an intelligent contract, nodes of all the Nanshan areas can store one fragment, each node is only responsible for hosting own fragment data, and the complete block chain state does not need to be stored.
104. And searching the corresponding fragment area information according to the target data to obtain a target fragment area.
In this embodiment, it can be specifically understood that target data is verified through a preset rule, a corresponding target region is allocated according to the preset rule after verification, such as a certificate number, a unified social credit code, a company type, a legal person/a natural person, to obtain corresponding feature data, and the certificate number is determined as an example, the certificate of the user is the certificate number of the Shenzhen nan mountainous region, and is automatically allocated to the node processing of the Shenzhen nan mountainous region, at this time, a block chain region where the Shenzhen nan mountainous region is a second fragmentation region, and the second fragmentation region (a region formed by nodes of the Shenshan region) is the target fragmentation region. The fragmentation area is composed of a plurality of nodes, and the nodes are the places where the blocks are connected, and the blocks need to be linked for use. The properties of the nodes comprise transparency, openness answer, information non-tampering and decentralization, the fragmentation technology is to divide a chain into individual areas, each area is called a fragment, each fragment bears the function of full time, and the nodes are also dispersed on each fragment to process corresponding work. Therefore, during processing, the transaction information is divided into nodes on the target fragment and processed at the same time, and is distributed as if each department is in work and cooperation, and each node processes only a small part of transactions in the network, so that the processing efficiency of the chain can be naturally and greatly improved.
105. And processing the target data through the target fragmentation area to obtain a processing result.
In the embodiment, the processing result can provide federal service, compliance service and integrated bridge docking service, and multiple versions of SDKs are provided, so that the method is suitable for micro payment and has extremely low commission charge; matching is completed on a distributed transaction chain, so that automatic currency conversion is facilitated; based on time events, multiple signatures and authority hierarchical control, the service safety is higher than the network activity, and an exquisite consensus mechanism provides various APIs (application program interfaces) with access reaching the bottom layer to external applications, so that various commercial applications can be accessed quickly.
According to the invention, the transaction information of the user is filtered through the side chain to obtain the target data, so that the interference of invalid data on the main chain operation is reduced. The preset main chain fragmentation information is obtained, so that the fragmentation region corresponding to the correspondingly processed main chain can be calculated, and finally, the data is distributed to the corresponding fragmentation region for processing, so that the throughput of data processing in the block chain is improved.
In some embodiments, the obtaining of the preset main chain fragmentation information and the obtaining of the at least one fragmentation region information according to the preset main chain fragmentation information includes:
111. acquiring preset main chain fragmentation information;
112. performing hash calculation on the preset main chain fragmentation information by adopting an SHA256 algorithm to obtain transaction hash, wherein the transaction hash at least comprises an id of a user, a transaction timestamp and transaction information of the user;
113. calculating a hash result by using a Const signature (SHA 256(user _ id + tx _ timestamp + tx _ data)), wherein the user _ id represents the id of the user, the tx _ timestamp represents the transaction timestamp, the tx _ data represents the transaction information of the user, and the Const signature is the hash result;
114. generating a transaction proposal by the hash result through a client application programming interface;
115. serializing the transaction proposal into a structured text format to obtain a text transaction proposal;
116. and generating at least one piece of region information for the text transaction proposal according to a private key of an encryption algorithm.
In the above embodiment, the flow chart is as shown in fig. 1 to 3, for example, where shenzhen is taken as an example, shenzhen has 11 regions and can be divided into 11 fragments, the system can allocate one fragment according to an address of a sender, for example, allocate the fragment to a south mountain region for operation, and generate a transaction hash according to information of the south mountain region and a user request, where the transaction hash includes a plurality of transaction information, perform encryption operation through SHA256 to obtain a final encryption result, automatically generate a proposal through an application programming interface, and convert the proposal into a corresponding text through a serialization technology. The security of the transaction can be ensured through the mode.
In some embodiments, after generating at least one piece of region information for the text transaction proposal according to a private key of an encryption algorithm, the method further comprises:
121. extracting target character segments from at least two target data according to a preset rule;
122. and if the target character segments are the same, stopping the transaction.
In the above embodiments, the flow chart is shown in fig. 1-4, for example, when a transaction center company wants to repeatedly submit a government affair item and receive a subsidy, one data contains a plurality of transaction information, such as company name, company address, etc., but the unified social credit code (target character segment) is unique. If there are two target data they appear to be identical to a uniform social credit code. Since the unified social credit code of each enterprise is unique, the double flower phenomenon is judged to occur in this way, and the transaction is stopped. Two times of data are generated for one transaction through the above embodiment, thereby creating double flowers.
In some embodiments, after the searching for the corresponding information of the segment area according to the target data to obtain the target segment area, the method further includes:
131. carrying out randomness fragmentation on the nodes of the target fragmentation area through a randomness fragmentation technology to obtain at least one target processing node;
the processing the target data through the target fragmentation area to obtain a processing result includes:
132. and processing the target data through the at least one target processing node to obtain a processing result.
In the foregoing embodiments and flowcharts shown in fig. 1 to 5, another very important mechanism of the fragmentation technology is a random allocation mechanism, and through the network fragmentation technology, by utilizing randomness, for example, a network can randomly extract nodes by using a VRF method to form fragments, so as to prevent a malicious node from occupying a certain fragment. After the fragment area is obtained, the nodes are randomly extracted for operation, so that a hacker cannot accurately blacken out the corresponding nodes, the cost of hacker intrusion is improved, and the safety of the block chain is improved.
In some embodiments, the filtering the transaction information of the user through the side chain to obtain the target data includes:
141. inputting transaction information of the user to a side chain;
142. extracting feature data from the transaction information of the user through the side chain;
143. and verifying the transaction information of the user according to the characteristic data to obtain target data.
In the above embodiment, the flow chart is as shown in fig. 1 to 6, and first, the user inputs the corresponding information and stores the information in the side chain. And then the side chain checks according to some necessary input information (such as a certificate number, a unified social credit code, a company type, a legal person/natural person), screens out data meeting conditions after checking, modifies the state and synchronizes to the main chain. For example, the enterprise can be declared only for the key enterprise, and whether the enterprise is the key enterprise or not can be judged according to the tax payment amount, the company scale, the company type and the like. Specifically, the transaction information of the user is input into the side chain, corresponding feature data, such as a certificate number, a unified social credit code, a company type, a legal person/natural person, is extracted through a preset extraction rule to obtain the corresponding feature data, whether the part of data is in compliance is checked, and the compliance rule is determined as target data.
In some embodiments, the extracting feature data from the transaction information of the user through the side chain includes:
151. creating a database main library and a block chain side chain, wherein the block chain side chain is a plurality of extensible channels;
152. constructing a transaction proposal based on the transaction information, and sending the transaction proposal to the corresponding expandable channel;
153. preprocessing the transaction proposal through the side chain to obtain characteristic data;
154. storing the feature data into the blockchain side chain;
155. sending blocks of the block chain side chains into the main chain.
In the foregoing embodiments, the flow charts are shown in fig. 1 to 7, where each of the extensible channels corresponds to a channel database; the database 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 into one extensible channel.
In some embodiments, after the processing the target data by the target sharded area, the method further comprises:
161. verifying whether the format of the processing result is correct;
162. if the format of the processing result is correct, verifying the processing result through a public key of the encryption algorithm to obtain a verification result;
163. and if the verification result is successful, storing the processing result in a database.
In the above embodiment, the flowcharts are shown in fig. 1 to 8, since the data stored in the database should satisfy the preset rule arrangement, if the arrangement of the data is different, the data cannot be stored in the database. And when the processing result meets the storage format of the database, if the format meets the uploading requirement, the processing result is verified through an encryption algorithm, and if the processing result cannot be decrypted through a public key, the data is not stored. Whether the processing result is correct is verified through the method. Preventing erroneous results from being saved to the database.
The technical method can be applied to application scenes including data processing based on block chains, such as intelligent government affairs, intelligent city management, intelligent community, intelligent security protection, intelligent logistics, intelligent medical treatment, intelligent education, intelligent environmental protection and intelligent traffic, so that the construction of intelligent cities is promoted.
In the data processing method based on the block chain provided by the embodiment of the invention, the transaction information of a user is acquired; filtering the transaction information of the user through a side chain to obtain target data; acquiring preset main chain fragmentation information, and acquiring at least one fragmentation region information according to the preset main chain fragmentation information; searching corresponding fragment area information according to the target data to obtain a target fragment area; and processing the target data through the target fragment area to obtain a processing result. The invention discloses a data processing technology based on a block chain, belongs to the field of block chains, and divides data in the block chain into a plurality of subsets according to a certain rule by a transaction fragmentation technology, wherein the subsets are verified by different fragments. The throughput of data processing based on block chains is improved.
An embodiment of the present invention further provides a data processing apparatus based on a block chain, where the data processing apparatus based on a block chain is configured to execute any of the embodiments of the data processing method based on a block chain. Specifically, referring to fig. 2, fig. 2 is a schematic block diagram of a data processing apparatus based on a block chain according to an embodiment of the present invention. The block chain based data processing apparatus may be configured in a user terminal.
As shown in fig. 2, the data processing apparatus 200 based on the block chain includes a user transaction information obtaining unit 210, a transaction information filtering unit 220, a main chain information obtaining unit 230, a fragmentation region information searching unit 240, and a processing unit 250.
A transaction information obtaining unit 210 for obtaining transaction information of a user;
the transaction information filtering unit 220 is configured to filter the transaction information of the user through a side chain to obtain target data;
a main chain information obtaining unit 230, configured to obtain preset main chain fragmentation information, and obtain at least one fragmentation region information according to the preset main chain fragmentation information;
a segment area information searching unit 240, configured to search the corresponding segment area information according to the target data to obtain a target segment area;
a processing unit 250, configured to process the target data through the target fragment area to obtain a processing result.
In some optional implementation manners of this embodiment, the main chain information obtaining unit includes a main chain information obtaining subunit, a transaction hash calculation subunit, a hash result calculation subunit, a transaction proposal generation subunit, a serialization subunit, and a fragmentation area information generation subunit.
The main chain information acquisition subunit is used for acquiring preset main chain fragmentation information;
the transaction hash calculation subunit is configured to perform hash calculation on the preset main chain fragmentation information by using an SHA256 algorithm to obtain a transaction hash, where the transaction hash at least includes an id of a user, a transaction timestamp, and transaction information of the user;
a hash result calculation subunit for
Calculating a hash result by using a Const signature (SHA 256(user _ id + tx _ timestamp + tx _ data)), wherein the user _ id represents the id of the user, the tx _ timestamp represents the transaction timestamp, the tx _ data represents the transaction information of the user, and the Const signature is the hash result;
the transaction proposal generating subunit is used for generating the transaction proposal by the hash result through a client application programming interface;
the serialization subunit is used for serializing the transaction proposal into a structured text format to obtain a text transaction proposal;
and the fragment area information generating subunit is used for generating at least one piece of fragment area information for the text transaction proposal according to a private key of an encryption algorithm.
In some optional implementations of this embodiment, the apparatus 200 further includes: a check module, the check module comprising: an extraction subunit and a judgment subunit.
The extraction subunit is used for extracting target character segments from at least two target data according to a preset rule;
and the judging subunit is used for stopping the transaction if the target character segments are the same.
In some optional implementations of this embodiment, the apparatus 200 further includes: a fragmentation module, the fragmentation module comprising: a fragmentation subunit and a node processing subunit.
The fragmentation subunit is used for carrying out randomness fragmentation on the nodes of the target fragmentation area through a randomness fragmentation technology to obtain at least one target processing node;
the processing the target data through the target fragmentation area to obtain a processing result includes:
and the node processing subunit is used for processing the target data through the at least one target processing node to obtain a processing result.
In some optional implementation manners of this embodiment, the transaction information filtering unit includes a side chain input subunit, a user transaction information extraction subunit, and a fragmentation area verification checking subunit.
A side chain input subunit, configured to input transaction information of the user to a side chain;
the user transaction information extraction subunit is used for extracting characteristic data from the transaction information of the user through the side chain;
and the partitioned area verification subunit is used for verifying the transaction information of the user according to the characteristic data to obtain target data.
In some optional implementation manners of this embodiment, the partitioned region checking and verifying subunit includes a main chain side chain constructing subunit, a transaction proposal constructing subunit, a preprocessing subunit, a side chain storing subunit, and a main chain storing subunit.
The main chain side chain construction subunit is used for creating a database main library and a block chain side chain, and the block chain side chain is a plurality of expandable channels;
the transaction proposal construction subunit is used for constructing a transaction proposal based on the transaction information and sending the transaction proposal to the corresponding expandable channel;
the preprocessing subunit is used for preprocessing the transaction proposal through the side chain to obtain characteristic data;
a side chain storage subunit for storing the characteristic data into the block chain side chain;
a main chain storage subunit for sending the blocks of the block chain side chains into the main chain.
In some optional implementations of this embodiment, the apparatus 200 further includes: a transaction verification unit, the transaction verification unit comprising: the device comprises a format verification subunit, a processing result verification subunit and an encryption algorithm verification subunit.
The format verifying subunit is used for verifying whether the format of the processing result is correct or not;
the processing result verifying subunit is used for verifying the processing result through the public key of the encryption algorithm to obtain a verification result if the format of the processing result is correct;
and the encryption algorithm verification subunit is used for storing the target data to a database if the verification result is successful.
The data processing device based on the block chain provided by the embodiment of the invention adopts the data processing method based on the block chain to obtain the transaction information of the user; filtering the transaction information of the user through a side chain to obtain target data; acquiring preset main chain fragmentation information, and acquiring at least one fragmentation region information according to the preset main chain fragmentation information; searching corresponding fragment area information according to the target data to obtain a target fragment area; and processing the target data through the target fragment area to obtain a processing result. According to the invention, the preset main chain fragmentation information is obtained, so that the fragmentation region corresponding to the correspondingly processed main chain can be calculated, and finally, the data is distributed to the corresponding fragmentation region for processing, thereby improving the throughput of data processing based on the block chain.
The above-described blockchain based data processing apparatus may be implemented in the form of a computer program which may be run on a computer device as shown in fig. 3.
Referring to fig. 3, fig. 3 is a schematic block diagram of a computer device according to an embodiment of the present invention. The computer device may be a user terminal for performing a blockchain based data processing method for blockchain based data processing.
Referring to fig. 3, the computer device 300 includes a processor 302, memory, which may include a non-volatile storage medium 303 and an internal memory 304, and a network interface 305 connected by a system bus 301.
The nonvolatile storage medium 303 may store an operating system 3031 and a computer program 3032. The computer program 3032, when executed, may cause the processor 302 to perform a blockchain-based data processing method.
The processor 302 is used to provide computing and control capabilities that support the operation of the overall computer device 300.
The internal memory 304 provides an environment for the execution of the computer program 3032 in the non-volatile storage medium 303, and the computer program 3032, when executed by the processor 302, causes the processor 302 to perform a block chain based data processing method.
The network interface 305 is used for network communication, such as providing transmission of data information. It will be appreciated by those skilled in the art that the configuration shown in fig. 3 is a block diagram of only a portion of the configuration associated with the inventive arrangements and is not intended to limit the computing device 300 to which the inventive arrangements may be applied, and that a particular computing device 300 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The processor 302 is configured to run a computer program 3032 stored in the memory, so as to implement the corresponding functions in the above-mentioned data processing method based on the blockchain.
Those skilled in the art will appreciate that the embodiment of a computer device illustrated in fig. 3 does not constitute a limitation on the specific construction of the computer device, and in other embodiments a computer device may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. For example, in some embodiments, the computer device may only include a memory and a processor, and in such embodiments, the structures and functions of the memory and the processor are consistent with those of the embodiment shown in fig. 3, and are not described herein again.
It should be understood that, in the embodiment of the present invention, the Processor 302 may be a Central Processing Unit (CPU), and the Processor 302 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In another embodiment of the invention, a computer-readable storage medium is provided. The computer readable storage medium may be a non-volatile computer readable storage medium. The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps included in the above-mentioned blockchain-based data processing method.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided by the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only a logical division, and there may be other divisions when the actual implementation is performed, or units having the same function may be grouped into one unit, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention essentially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a computer-readable storage medium, which includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned computer-readable storage media comprise: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for processing data based on a blockchain, the method comprising:
acquiring transaction information of a user;
filtering the transaction information of the user through a side chain to obtain target data;
acquiring preset main chain fragmentation information, and acquiring at least one fragmentation region information according to the preset main chain fragmentation information;
searching corresponding fragment area information according to the target data to obtain a target fragment area;
and processing the target data through the target fragmentation area to obtain a processing result.
2. The block chain-based data processing method according to claim 1, wherein the obtaining of the preset main chain fragmentation information and the obtaining of the at least one fragmentation region information according to the preset main chain fragmentation information comprises:
acquiring preset main chain fragmentation information;
performing hash calculation on the preset main chain fragmentation information by adopting an SHA256 algorithm to obtain transaction hash, wherein the transaction hash at least comprises an id of a user, a transaction timestamp and transaction information of the user;
calculating a hash result by using a Const signature (SHA 256(user _ id + tx _ timestamp + tx _ data)), wherein the user _ id represents the id of the user, the tx _ timestamp represents the transaction timestamp, the tx _ data represents the transaction information of the user, and the Const signature is the hash result;
generating a transaction proposal by the hash result through a client application programming interface;
serializing the transaction proposal into a structured text format to obtain a text transaction proposal;
and generating at least one piece of region information for the text transaction proposal according to a private key of an encryption algorithm.
3. The blockchain-based data processing method of claim 2, wherein after generating at least one piece of partitioned area information for the text transaction proposal according to a private key of an encryption algorithm, the method further comprises:
extracting target character segments from at least two target data according to a preset rule;
and if the target character segments are the same, stopping the transaction.
4. The block chain-based data processing method according to claim 2, wherein after the corresponding information of the segment area is searched according to the target data to obtain a target segment area, the method further comprises:
carrying out randomness fragmentation on the nodes of the target fragmentation area through a randomness fragmentation technology to obtain at least one target processing node;
the processing the target data through the target fragmentation area to obtain a processing result includes:
and processing the target data through the at least one target processing node to obtain a processing result.
5. The blockchain-based data processing method according to claim 3 or 4, wherein the filtering transaction information of the user through the side chain to obtain target data includes:
inputting transaction information of the user to a side chain;
extracting feature data from the transaction information of the user through the side chain;
and verifying the transaction information of the user according to the characteristic data to obtain target data.
6. The method for processing data based on block chain as claimed in claim 5, wherein the extracting feature data from the transaction information of the user through the side chain comprises:
creating a database main library and a block chain side chain, wherein the block chain side chain is a plurality of extensible channels;
constructing a transaction proposal based on the transaction information, and sending the transaction proposal to the corresponding expandable channel;
preprocessing the transaction proposal through the side chain to obtain characteristic data;
storing the feature data into the blockchain side chain;
sending blocks of the block chain side chains into the main chain.
7. The blockchain-based data processing method according to claim 6, wherein after the target data is processed by the target partitioned area to obtain a processing result, the method further includes:
verifying whether the format of the processing result is correct;
if the format of the processing result is correct, verifying the processing result through a public key of the encryption algorithm to obtain a verification result;
and if the verification result is successful, storing the processing result in a database.
8. A blockchain-based data processing apparatus, comprising:
the user transaction information acquisition unit is used for acquiring the transaction information of the user;
the transaction information filtering unit is used for filtering the transaction information of the user through a side chain to obtain target data;
the main chain information acquisition unit is used for acquiring preset main chain fragmentation information and acquiring at least one fragmentation region information according to the preset main chain fragmentation information;
the fragment area information searching unit is used for searching the corresponding fragment area information according to the target data to obtain a target fragment area;
and the processing unit is used for processing the target data through the target slicing area to obtain a processing result.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the blockchain-based data processing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to carry out the blockchain-based data processing method according to any one of claims 1 to 7.
CN202011495961.6A 2020-12-17 2020-12-17 Data processing method and device based on block chain, computer equipment and storage medium Pending CN112508571A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011495961.6A CN112508571A (en) 2020-12-17 2020-12-17 Data processing method and device based on block chain, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011495961.6A CN112508571A (en) 2020-12-17 2020-12-17 Data processing method and device based on block chain, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112508571A true CN112508571A (en) 2021-03-16

Family

ID=74922156

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011495961.6A Pending CN112508571A (en) 2020-12-17 2020-12-17 Data processing method and device based on block chain, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112508571A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113949742A (en) * 2021-09-18 2022-01-18 深圳时空云科技有限公司 Method and device for improving throughput of block chain

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180082296A1 (en) * 2016-09-21 2018-03-22 R-Stor Inc. Systems and methods for using a distributed ledger for data handling
CN110245185A (en) * 2019-05-21 2019-09-17 平安普惠企业管理有限公司 Data processing method, terminal device and computer storage medium based on alliance's chain
CN110287259A (en) * 2019-06-27 2019-09-27 浪潮卓数大数据产业发展有限公司 A kind of audit log tamper resistant method based on block chain
CN110597926A (en) * 2019-10-10 2019-12-20 山东爱城市网信息技术有限公司 Method and system for establishing block chain side chain based on horizontal extension database
CN111047445A (en) * 2019-12-11 2020-04-21 深圳区块大陆科技有限公司 Completely decentralized side chain crossing method
CN111901350A (en) * 2020-07-30 2020-11-06 平安科技(深圳)有限公司 Block chain system, data processing method, computer device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180082296A1 (en) * 2016-09-21 2018-03-22 R-Stor Inc. Systems and methods for using a distributed ledger for data handling
CN110245185A (en) * 2019-05-21 2019-09-17 平安普惠企业管理有限公司 Data processing method, terminal device and computer storage medium based on alliance's chain
CN110287259A (en) * 2019-06-27 2019-09-27 浪潮卓数大数据产业发展有限公司 A kind of audit log tamper resistant method based on block chain
CN110597926A (en) * 2019-10-10 2019-12-20 山东爱城市网信息技术有限公司 Method and system for establishing block chain side chain based on horizontal extension database
CN111047445A (en) * 2019-12-11 2020-04-21 深圳区块大陆科技有限公司 Completely decentralized side chain crossing method
CN111901350A (en) * 2020-07-30 2020-11-06 平安科技(深圳)有限公司 Block chain system, data processing method, computer device and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
潘晨;刘志强;刘振;龙宇;: "区块链可扩展性研究:问题与方法", 计算机研究与发展, no. 10 *
邵奇峰 等: "区块链技术:架构及进展", 《计算机学报》, vol. 41, no. 5, pages 969 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113949742A (en) * 2021-09-18 2022-01-18 深圳时空云科技有限公司 Method and device for improving throughput of block chain
CN113949742B (en) * 2021-09-18 2023-11-10 深圳时空云科技有限公司 Method and device for improving throughput of block chain

Similar Documents

Publication Publication Date Title
CN109522362B (en) Incomplete data synchronization method, system and equipment based on block chain data
CN106878000B (en) Alliance chain consensus method and system
CN109379397B (en) Transaction consensus processing method and device based on block chain and electronic equipment
CN110024357B (en) System and method for data processing using distributed ledgers
EP3429122B1 (en) Method and apparatus for controlling electronic voting
CN112041872A (en) Maintaining blocks of a blockchain in a partitioned blockchain network
CN111066283A (en) System and method for communicating, storing and processing data provided by entities on a blockchain network
KR20190075772A (en) AuthenticationSystem Using Block Chain Through Combination of Data after Separating Personal Information
CN108769230B (en) Transaction data storage method, device, server and storage medium
CN111788791A (en) Computer-implemented voting process and system
CN113256297B (en) Data processing method, device and equipment based on block chain and readable storage medium
CN114884697B (en) Data encryption and decryption method and related equipment based on cryptographic algorithm
CN108848125B (en) Method and apparatus for providing consensus service in block chain and storage medium
CN111476572A (en) Data processing method and device based on block chain, storage medium and equipment
CN112862490A (en) Output consensus method under asynchronous network
CN115884110B (en) Method and system for judging short message verification code
CN111292190A (en) Transaction generation method, block creation method, related device and equipment
CN116583833A (en) Self-auditing blockchain
CN115134069A (en) Block chain editing method and block chain link point
CN111476640A (en) Authentication method, system, storage medium and big data authentication platform
CN112508571A (en) Data processing method and device based on block chain, computer equipment and storage medium
CN112417052B (en) Data synchronization method, device, equipment and storage medium in block chain network
CN113901520A (en) Data processing method, device, equipment and medium based on block chain
EP3457622A1 (en) Electronic voting system and control method
CN111259411B (en) Block chain management method, device, electronic equipment and readable 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