CN110019347A - A kind of data processing method, device and the terminal device of block chain - Google Patents
A kind of data processing method, device and the terminal device of block chain Download PDFInfo
- Publication number
- CN110019347A CN110019347A CN201810000830.2A CN201810000830A CN110019347A CN 110019347 A CN110019347 A CN 110019347A CN 201810000830 A CN201810000830 A CN 201810000830A CN 110019347 A CN110019347 A CN 110019347A
- Authority
- CN
- China
- Prior art keywords
- block
- column
- data
- transaction record
- block chain
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2453—Query optimisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24553—Query execution of query operations
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention provides data processing method, device and the terminal device of a kind of block chain, wherein, the data processing method of the block chain includes: the block data for obtaining block chain to be written, column compression processing is carried out according to transaction record column to the transaction record row data in the block data, block column compressed data is obtained, the block chain is written into the block column compressed data.The solution of the present invention, the structure of the block data by improving write-in block chain can largely reduce system I/O operations, avoid the wasting of resources, meet the query requirement of high concurrent and be efficiently treated through to data when inquiring the transaction record of block.
Description
Technical field
The present invention relates to technical field of data processing more particularly to a kind of data processing method, device and the ends of block chain
End equipment.
Background technique
Currently, the structure of the data block in block chain generally includes head construction and transaction record structure, wherein trading
Interrecord structure is recorded by each transaction and is stored according to row.But mainly have by the transaction record structure of row storage as follows
Disadvantage: (1) when transaction record is inquired, all detailed information of transaction record can be all queried to, and largely used I/O operation, caused
The wasting of resources;(2) when facing a large amount of query demand, it is unable to satisfy the query requirement of high concurrent;(3) in each transaction record row
Data comprising various data types, such as exchange hour (date-time type), reception/expenditure quantity (value type), friendship
Easy digital signature information etc. is unfavorable for the efficient process etc. of data;(4) transaction record detailed information, which changes, (for example increases
Add new transaction attribute) when, existing line storage organization can not cope with;(5) transaction block data amount is very big, serious to occupy
System resource.
Summary of the invention
The embodiment of the present invention provides data processing method, device and the terminal device of a kind of block chain, existing to solve
The wasting of resources caused by transaction record structure by row storage is unable to satisfy the query requirement of high concurrent and is unfavorable for data
Efficient process the problem of.
To solve the above-mentioned problems, in a first aspect, the embodiment of the invention provides a kind of data processing method of block chain,
Include:
Obtain the block data of block chain to be written;
Column compression processing is carried out according to transaction record column to the transaction record row data in the block data, obtains block
Column compressed data;
The block chain is written into the block column compressed data.
Optionally, the transaction record row data in the block data carry out at column compression according to transaction record column
Reason, obtains block column compressed data, comprising:
According to preset column compressed format, to the transaction record row data in the block data according to transaction record arrange into
Ranks compression processing obtains the block column compressed data.
Optionally, the transaction record row data in the block data carry out at column compression according to transaction record column
Reason, after obtaining block column compressed data, before the block chain by block column compressed data write-in, the method
Further include:
Create block identification information, wherein include the column pressure of the block column compressed data in the block identification information
Contracting format information;
The block identification information is added into the head construction of the block column compressed data;
It is described that the block chain is written into the block column compressed data, comprising:
The block column compressed data after the block identification information will be added, the block chain is written.
It optionally, further include the size information of the block data in the block identification information, the area for identification
The true and false of block column compressed data.
Second aspect, the embodiment of the invention also provides a kind of data processing methods of block chain, comprising:
Determine the block column compressed data to be read in block chain;
The transaction record column data in the block column compressed data is read according to transaction record column and unzips it place
Reason.
Optionally, the transaction record column data according in the transaction record column reading block column compressed data is gone forward side by side
Row decompression, comprising:
According to preset column compressed format, corresponding transaction in the block column compressed data is read according to transaction record column
Record column data simultaneously carries out decompression.
Optionally, described according to transaction record after the block column compressed data to be read in the determining block chain
Before column read the transaction record column data in the block column compressed data and carry out decompression, the method is also wrapped
It includes:
Read the block identification information in the head construction of the block column compressed data, wherein the block identification letter
It include the column compressed format information of the block column compressed data in breath;
It is described to read the transaction record column data in the block column compressed data according to transaction record column and decompressed
Contracting processing, comprising:
According to the column compressed format information, corresponding friendship in the block column compressed data is read according to transaction record column
It easily records column data and carries out decompression.
The third aspect, the embodiment of the invention also provides a kind of data processing equipments of block chain, comprising:
Module is obtained, for obtaining the block data of block chain to be written;
First processing module, for being arranged according to transaction record the transaction record row data in the block data
Compression processing obtains block column compressed data;
Writing module, for the block chain to be written in the block column compressed data.
Optionally, the first processing module is specifically used for:
According to preset column compressed format, to the transaction record row data in the block data according to transaction record arrange into
Ranks compression processing obtains the block column compressed data.
Optionally, the data processing equipment of the block chain further include:
Creation module, for creating block identification information, wherein include block column pressure in the block identification information
The column compressed format information of contracting data;
Adding module, for the block identification information to be added into the head construction of the block column compressed data;
The write module is specifically used for:
The block column compressed data after the block identification information will be added, the block chain is written.
It optionally, further include the size information of the block data in the block identification information, the area for identification
The true and false of block column compressed data.
Fourth aspect, the embodiment of the invention also provides a kind of data processing equipments of block chain, comprising:
Determining module, for determining the block column compressed data to be read in block chain;
Second processing module, for reading the transaction record columns in the block column compressed data according to transaction record column
According to and carry out decompression.
Optionally, the Second processing module is specifically used for:
According to preset column compressed format, corresponding transaction in the block column compressed data is read according to transaction record column
Record column data simultaneously carries out decompression.
Optionally, the data processing equipment of the block chain further include:
Read module, the block identification information in head construction for reading the block column compressed data, wherein institute
State the column compressed format information in block identification information including the block column compressed data;
The Second processing module is specifically used for:
According to the column compressed format information, corresponding friendship in the block column compressed data is read according to transaction record column
It easily records column data and carries out decompression.
5th aspect the embodiment of the invention also provides a kind of terminal device, including memory, processor and is stored in institute
State the computer program that can be run on memory and on the processor, wherein the computer program is by the processor
The step of data processing method of above-mentioned block chain is realized when execution.
6th aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer
Program, wherein the computer program realizes the step of data processing method of above-mentioned block chain when being executed by processor.
The data processing method of the block chain of the embodiment of the present invention, the knot of the block data by improving write-in block chain
Structure, that is, the transaction record row data treated in the block data of write-in block chain carry out column compression processing according to transaction record column,
Block chain is written into block column compressed data after column compression processing, presses the capable transaction record structure stored compared to existing,
At least one of can have the advantages that:
(1) when inquiring the transaction record of block, the correspondence column information of transaction record need to be only inquired, without inquiring transaction note
The all properties information of record avoids the wasting of resources to largely reduce system I/O operations;
(2) the transaction record data after column compression processing can support the query requirement of large capacity, high concurrent;
(3) after carrying out column compression processing to the transaction record data in block, the data type of each column is identical, data characteristics
It is similar, be conducive to the efficient process of data;
(4) transaction record detailed information change (for example increasing new transaction details attribute) when, it may be convenient to it is right
Column storage organization is extended.
(5) after carrying out column compression processing to the transaction record data in block, it can be significantly reduced data redundancy, save system
System resource.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, will make below to required in the embodiment of the present invention
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without any creative labor, it can also be obtained according to these attached drawings
His attached drawing.
Fig. 1 is the flow chart of the data processing method of a block chain of the embodiment of the present invention;
Fig. 2 is the flow chart of the data processing method of another block chain of the embodiment of the present invention;
Fig. 3 is one of the structural schematic diagram of data processing equipment of the block chain of the embodiment of the present invention;
Fig. 4 is the second structural representation of the data processing equipment of the block chain of the embodiment of the present invention;
Fig. 5 is the third structural representation of the data processing equipment of the block chain of the embodiment of the present invention;
Fig. 6 is the four of the structural schematic diagram of the data processing equipment of the block chain of the embodiment of the present invention;
Fig. 7 is the structural schematic diagram of the terminal device of the embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, shall fall within the protection scope of the present invention.
It participates in shown in Fig. 1, the embodiment of the invention provides a kind of data processing methods of block chain, set applied to terminal
It is standby, include the following steps:
Step 101: obtaining the block data of block chain to be written.
It should be noted that the data processing method of the block chain of the embodiment of the present invention can be in the block chain client of terminal device
It is realized in the program of end, i.e., embeds column compression processing mistake in the method that existing block chain client-side program saves block data
Journey, the transaction record row data being written into the block data of block chain become to arrange the data of compression by transaction record to deposit
Storage.Wherein, which can obtain after starting block chain client-side program and during running block chain client-side program.
The structure of the block data may include head construction and transaction record structure, and transaction record structure corresponds to transaction record data.
Step 102: column compression processing being carried out according to transaction record column to the transaction record row data in block data, is obtained
Block column compressed data.
It wherein, can when carrying out column compression processing according to transaction record column to the transaction record row data in block data
Column compression processing is carried out according to preset column compressed format.The system of the preset column compressed format concretely block column structures
One complete format.
Step 103: block chain is written into block column compressed data.
Wherein, after obtaining the block column compressed data after column compression processing, block can be written in block column compressed data
Chain, to guarantee the reliability of block data.
The data processing method of the block chain of the embodiment of the present invention, the knot of the block data by improving write-in block chain
Structure, that is, the transaction record row data treated in the block data of write-in block chain carry out column compression processing according to transaction record column,
Block chain is written into block column compressed data after column compression processing, presses the capable transaction record structure stored compared to existing,
At least one of can have the advantages that:
(1) when inquiring the transaction record of block, the correspondence column information of transaction record need to be only inquired, without inquiring transaction note
The all properties information of record avoids the wasting of resources to largely reduce system I/O operations;
(2) the transaction record data after column compression processing can support the query requirement of large capacity, high concurrent;
(3) after carrying out column compression processing to the transaction record data in block, the data type of each column is identical, data characteristics
It is similar, be conducive to the efficient process of data;
(4) transaction record detailed information change (for example increasing new transaction details attribute) when, it may be convenient to it is right
Column storage organization is extended.
(5) after carrying out column compression processing to the transaction record data in block, it can be significantly reduced data redundancy, save system
System resource.
In the embodiment of the present invention, column compression is being carried out according to transaction record column to the transaction record row data in block data
Processing, after obtaining block column compressed data, and by block column compressed data be written block chain before, the method also includes:
Create block identification information;
Block identification information is added into the head construction of block column compressed data.
Corresponding, block column compressed data write-in block chain is included: by the block column after addition block identification information by this
Block chain is written in compressed data.
It wherein, may include the column compressed format information of block column compressed data in the block identification information, for decompressing
The transaction record data of (decoding) respective column.The column compressed format information may include that each transaction record arranges corresponding compressed format
(alternatively referred to as compression algorithm), or the block compressed format that is combined into of compressed format with block different lines.For example, an if area
It include 3 column transaction record data in block column compressed data, respectively D1, D2 and D3, the corresponding column compressed format of D1 is A1, D2 pairs
The column compressed format answered is A2, and the corresponding column compressed format of D3 is A3, then the column compressed format information of the block column compressed data
It can be A1, A2 and A3;And if column compressed format A1, A2 and A3 are combined into compressed format B, the column of the block column compressed data
Compressed format information can be B.
In this way, block identification information is added into the head construction of block column compressed data to and is written block chain, it can
Be conducive to the subsequent accurate transaction record data for reading respective column.
Further, it may also include the title of transaction record column, block data before compression in the block identification information
Size information etc..The size information of block data before the compression can be used to identify the true of compressed block column compressed data
It is pseudo-.
In the following, being illustrated by taking bit coin block as an example to the embodiment of the present invention.
Time, index number, expenditure address, expenditure are generated specifically, having in the transaction record structure of bit coin block
The attributes such as number of addresses.And use the method for the embodiment of the present invention to the transaction record row data in bit coin block data, example
Time, index number, expenditure address, expenditure number of addresses are such as generated, the process for carrying out column compression processing can are as follows:
For generating the time, an earliest transaction record is generated into the time as the benchmark of entire block generation time
Time, value of the generation time of subsequent transaction record after column compression processing are the generation time of subsequent transaction record and base
Between punctual or the difference of the generation time of a upper transaction record;
For index number, using the index number of first transaction record as initial value, on the basis of the ascending series that increment is 1
Queue, if the index number of subsequent transaction record is matched with reference queue, boil down to 0, otherwise boil down to index number and base
Different piece in quasi- queue;
For paying address, byte length (2/4 byte) fragment is first pressed into the expenditure address of bit coin block, further according to area
It is compressed the case where all address slices using existing Huffman encoding in block;
For paying number of addresses, the average value for the expenditure number of addresses that All Activity records in bit coin block is calculated
(round) be used as a reference value, this column expenditure number of addresses compressed value for and a reference value deviation.
In this way, can be very good the transaction record number in compression bit coin block by above-mentioned column compression process
According to being significantly reduced data redundancy, save system resource.
Shown in Figure 2, the embodiment of the invention also provides a kind of data processing methods of block chain, set applied to terminal
It is standby, include the following steps:
Step 201: determining the block column compressed data to be read in block chain.
It should be noted that the data processing method of the block chain of the embodiment of the present invention can be in the block chain client of terminal device
It is realized in the program of end, i.e., is embedded in the method that existing block chain client-side program reads block data and press column decompression
Process arranges the transaction record column data read in block column compressed data according to transaction record and carries out decompression.Wherein,
The block column compressed data can be determined after starting block chain client-side program and during running block chain client-side program.
Step 202: arranging the transaction record column data read in block column compressed data according to transaction record and decompressed
Contracting processing.
Wherein, the transaction record column data read in block column compressed data is being arranged according to transaction record and is being unziped it
When processing, it can be arranged according to transaction record according to preset column compressed format and read corresponding transaction note in block column compressed data
Record column data simultaneously carries out decompression.The complete lattice of the unification of the preset column compressed format concretely block column structures
Formula.
The data processing method of the block chain of the embodiment of the present invention is arranged according to transaction record and is read in block column compressed data
Transaction record column data and carry out decompression, system I/O operations can be largely reduced, avoid the wasting of resources.
In the embodiment of the present invention, after determining the block column compressed data to be read in block chain, and according to transaction
Before record column read the transaction record column data in block column compressed data and carry out decompression, the method is also wrapped
It includes:
Read the block identification information in the head construction of block column compressed data, wherein wrap in the block identification information
Include the column compressed format information of block column compressed data.
It is corresponding, the transaction record column data read in block column compressed data should be arranged according to transaction record and was decompressed
Contracting is handled
According to column compressed format information, is arranged according to transaction record and read corresponding transaction record column in block column compressed data
Data simultaneously carry out decompression.
Wherein, which can be used for analyzing transaction record column data to be read, and decompress respective column
Transaction record data, it may include each transaction record arranges corresponding compressed format, or the compressed format with block different lines
The block compressed format being combined into.
In this way, being arranged according to transaction record according to column compressed format information and reading corresponding transaction in block column compressed data
Record column data simultaneously carries out decompression, is conducive to the transaction record data for precisely reading respective column.
The data processing method of block chain of the invention is illustrated in above-described embodiment, below in conjunction with embodiment and
Attached drawing is illustrated the data processing equipment of block chain of the invention.
Shown in Figure 3, the embodiment of the invention also provides a kind of data processing equipments of block chain, comprising:
Module 31 is obtained, for obtaining the block data of block chain to be written;
First processing module 32 is carried out for being arranged according to transaction record the transaction record row data in the block data
Column compression processing obtains block column compressed data;
Writing module 33, for the block chain to be written in the block column compressed data.
The data processing equipment of the block chain of the embodiment of the present invention, the knot of the block data by improving write-in block chain
Structure, that is, the transaction record row data treated in the block data of write-in block chain carry out column compression processing according to transaction record column,
Block chain is written into block column compressed data after column compression processing, presses the capable transaction record structure stored compared to existing,
At least one of can have the advantages that:
(1) when inquiring the transaction record of block, the correspondence column information of transaction record need to be only inquired, without inquiring transaction note
The all properties information of record avoids the wasting of resources to largely reduce system I/O operations;
(2) the transaction record data after column compression processing can support the query requirement of large capacity, high concurrent;
(3) after carrying out column compression processing to the transaction record data in block, the data type of each column is identical, data characteristics
It is similar, be conducive to the efficient process of data;
(4) transaction record detailed information change (for example increasing new transaction details attribute) when, it may be convenient to it is right
Column storage organization is extended.
(5) after carrying out column compression processing to the transaction record data in block, it can be significantly reduced data redundancy, save system
System resource.
Optionally, the first processing module 32 is specifically used for:
According to preset column compressed format, to the transaction record row data in the block data according to transaction record arrange into
Ranks compression processing obtains the block column compressed data.
Shown in Figure 4 in the embodiment of the present invention, the data processing equipment of the block chain may also include that
Creation module 34, for creating block identification information, wherein include that the block arranges in the block identification information
The column compressed format information of compressed data;
Adding module 35, for the block identification information to be added into the head construction of the block column compressed data
In.
Corresponding, the write module 33 is specifically used for:
The block column compressed data after the block identification information will be added, the block chain is written.
It optionally, further include the size information of the block data in the block identification information, the area for identification
The true and false of block column compressed data.
Shown in Figure 5, the embodiment of the invention also provides a kind of data processing equipments of block chain, comprising:
Determining module 51, for determining the block column compressed data to be read in block chain;
Second processing module 52 is arranged for reading the transaction record in the block column compressed data according to transaction record column
Data simultaneously carry out decompression.
The data processing equipment of the block chain of the embodiment of the present invention is arranged according to transaction record and is read in block column compressed data
Transaction record column data and carry out decompression, system I/O operations can be largely reduced, avoid the wasting of resources.
Optionally, the Second processing module 52 is specifically used for:
According to preset column compressed format, corresponding transaction in the block column compressed data is read according to transaction record column
Record column data simultaneously carries out decompression.
Shown in Figure 6 in the embodiment of the present invention, the data processing equipment of the block chain may also include that
Read module 53, the block identification information in head construction for reading the block column compressed data, wherein
It include the column compressed format information of the block column compressed data in the block identification information.
Corresponding, the Second processing module 53 is specifically used for:
According to the column compressed format information, corresponding friendship in the block column compressed data is read according to transaction record column
It easily records column data and carries out decompression.
In addition, the embodiment of the invention also provides a kind of terminal device, including memory, processor and it is stored in described deposit
On reservoir and the computer program that can run on the processor, wherein the computer program is executed by the processor
When can realize above-mentioned block chain data processing method embodiment each process, and identical technical effect can be reached, to keep away
Exempt to repeat, which is not described herein again.
Specifically, the embodiment of the invention also provides a kind of terminal device, the terminal device includes total referring to shown in 7
Line 71, transceiver 72, antenna 73, bus interface 74, processor 75 and memory 76.
In embodiments of the present invention, the terminal device further include: be stored on memory 76 and can be on processor 75
The computer program of operation, optionally, the computer program can realize following steps when being executed by processor 75:
Obtain the block data of block chain to be written;
Column compression processing is carried out according to transaction record column to the transaction record row data in the block data, obtains block
Column compressed data;
The block chain is written into the block column compressed data.
Optionally, following steps be can also be achieved when the computer program is executed by processor 75:
Determine the block column compressed data to be read in block chain;
The transaction record column data in the block column compressed data is read according to transaction record column and unzips it place
Reason.
In Fig. 7, bus architecture (is represented) with bus 71, bus 71 may include any number of interconnection bus and
Bridge, bus 71 will include the one or more processors represented by processor 75 and the various electricity of memory that memory 76 represents
Road links together.Bus 71 can also be by the various other of such as peripheral equipment, voltage-stablizer and management circuit or the like
Circuit links together, and these are all it is known in the art, and therefore, it will not be further described herein.Bus connects
Mouth 74 provides interface between bus 71 and transceiver 72.Transceiver 72 can be an element, be also possible to multiple element, than
Such as multiple receivers and transmitter, the unit for communicating over a transmission medium with various other devices is provided.Through processor 75
The data of processing are transmitted on the radio medium by antenna 73, and further, antenna 73 also receives data and by data transmission
To processor 75.
Processor 75 is responsible for management bus 71 and common processing, can also provide various functions, including timing, periphery connects
Mouthful, voltage adjusting, power management and other control functions.And memory 76 can be used for storage processor 75 and execute behaviour
Used data when making.
Optionally, processor 75 can be CPU, ASIC, FPGA or CPLD.
The embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, described
Each process of the data processing method embodiment of above-mentioned block chain is realized when computer program is executed by processor, and can be reached
Identical technical effect, to avoid repeating, which is not described herein again.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media, can be by any side
Method or technology realize that information stores.Information can be computer readable instructions, data structure, the module of program or other numbers
According to.The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory
(SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only memory
(ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory techniques, CD-ROM are read-only
Memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or
Other magnetic storage devices or any other non-transmission medium, can be used for storage can be accessed by a computing device information.According to
Herein defines, and computer-readable medium does not include temporary computer readable media (transitory media), such as modulation
Data-signal and carrier wave.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in a storage medium
In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes
Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (11)
1. a kind of data processing method of block chain characterized by comprising
Obtain the block data of block chain to be written;
Column compression processing is carried out according to transaction record column to the transaction record row data in the block data, obtains block column pressure
Contracting data;
The block chain is written into the block column compressed data.
2. the method according to claim 1, wherein the transaction record row data in the block data
Column compression processing is carried out according to transaction record column, obtains block column compressed data, comprising:
According to preset column compressed format, the transaction record row data in the block data are arranged according to transaction record
Compression processing obtains the block column compressed data.
3. the method according to claim 1, wherein the transaction record row data in the block data
Column compression processing is carried out according to transaction record column, it is described by the block column compressed data after obtaining block column compressed data
It is written before the block chain, the method also includes:
Create block identification information, wherein the column in the block identification information including the block column compressed data compress lattice
Formula information;
The block identification information is added into the head construction of the block column compressed data;
It is described that the block chain is written into the block column compressed data, comprising:
The block column compressed data after the block identification information will be added, the block chain is written.
4. according to the method described in claim 3, it is characterized in that, further including the block data in the block identification information
Size information, the true and false of the block column compressed data for identification.
5. a kind of data processing method of block chain characterized by comprising
Determine the block column compressed data to be read in block chain;
The transaction record column data in the block column compressed data is read according to transaction record column and carries out decompression.
6. according to the method described in claim 5, it is characterized in that, described read the block column compression according to transaction record column
Transaction record column data in data simultaneously carries out decompression, comprising:
According to preset column compressed format, corresponding transaction record in the block column compressed data is read according to transaction record column
Column data simultaneously carries out decompression.
7. according to the method described in claim 5, it is characterized in that, the block to be read in the determining block chain arranges compression
It is described to read the transaction record column data in the block column compressed data according to transaction record column and decompressed after data
Before contracting processing, the method also includes:
Read the block identification information in the head construction of the block column compressed data, wherein in the block identification information
Column compressed format information including the block column compressed data;
It is described to read the transaction record column data in the block column compressed data according to transaction record column and unzip it place
Reason, comprising:
According to the column compressed format information, corresponding transaction in the block column compressed data is read according to transaction record column and is remembered
Record column data simultaneously carries out decompression.
8. a kind of data processing equipment of block chain characterized by comprising
Module is obtained, for obtaining the block data of block chain to be written;
First processing module, for carrying out column compression according to transaction record column to the transaction record row data in the block data
Processing, obtains block column compressed data;
Writing module, for the block chain to be written in the block column compressed data.
9. a kind of data processing equipment of block chain characterized by comprising
Determining module, for determining the block column compressed data to be read in block chain;
Second processing module, for reading the transaction record column data in the block column compressed data simultaneously according to transaction record column
Unzip it processing.
10. a kind of terminal device, including memory, processor and it is stored on the memory and can transports on the processor
Capable computer program, which is characterized in that such as claim 1 to 7 is realized when the computer program is executed by the processor
Any one of described in block chain data processing method the step of.
11. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The step of data processing method of the block chain as described in any one of claims 1 to 7 is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810000830.2A CN110019347B (en) | 2018-01-02 | 2018-01-02 | Data processing method and device of block chain and terminal equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810000830.2A CN110019347B (en) | 2018-01-02 | 2018-01-02 | Data processing method and device of block chain and terminal equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110019347A true CN110019347A (en) | 2019-07-16 |
CN110019347B CN110019347B (en) | 2021-05-25 |
Family
ID=67187264
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810000830.2A Active CN110019347B (en) | 2018-01-02 | 2018-01-02 | Data processing method and device of block chain and terminal equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110019347B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110457929A (en) * | 2019-08-16 | 2019-11-15 | 重庆华医康道科技有限公司 | The sharing method and system of isomery HIS big data real-time encryption and decryption compression cochain |
CN112199445A (en) * | 2020-11-11 | 2021-01-08 | 山西特信环宇信息技术有限公司 | Hierarchical structure of pyramidal block chain |
CN113064901A (en) * | 2021-04-06 | 2021-07-02 | 北京瑞卓喜投科技发展有限公司 | Method and device for forming data micro-index in contract on chain and electronic equipment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140074805A1 (en) * | 2009-04-30 | 2014-03-13 | Oracle International Corportion | Storing compression units in relational tables |
CN103729429A (en) * | 2013-12-26 | 2014-04-16 | 浪潮电子信息产业股份有限公司 | Hbase based compression method |
CN105741095A (en) * | 2016-01-29 | 2016-07-06 | 彭军红 | Dynamic compression and access method of block chain |
US20160371509A1 (en) * | 2013-07-06 | 2016-12-22 | Newvoicemedia, Ltd. | System and methods for tamper proof interaction recording and timestamping |
CN107295002A (en) * | 2017-07-12 | 2017-10-24 | 联动优势科技有限公司 | The method and server of a kind of high in the clouds data storage |
CN107423945A (en) * | 2017-04-13 | 2017-12-01 | 葛武 | Intelligent energy trade managing system and method based on block chain technology |
CN107465656A (en) * | 2017-06-14 | 2017-12-12 | 广州宏和网络科技有限公司 | A kind of safety monitoring big data processing method and system based on cloud computing |
-
2018
- 2018-01-02 CN CN201810000830.2A patent/CN110019347B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140074805A1 (en) * | 2009-04-30 | 2014-03-13 | Oracle International Corportion | Storing compression units in relational tables |
US20160371509A1 (en) * | 2013-07-06 | 2016-12-22 | Newvoicemedia, Ltd. | System and methods for tamper proof interaction recording and timestamping |
CN103729429A (en) * | 2013-12-26 | 2014-04-16 | 浪潮电子信息产业股份有限公司 | Hbase based compression method |
CN105741095A (en) * | 2016-01-29 | 2016-07-06 | 彭军红 | Dynamic compression and access method of block chain |
CN107423945A (en) * | 2017-04-13 | 2017-12-01 | 葛武 | Intelligent energy trade managing system and method based on block chain technology |
CN107465656A (en) * | 2017-06-14 | 2017-12-12 | 广州宏和网络科技有限公司 | A kind of safety monitoring big data processing method and system based on cloud computing |
CN107295002A (en) * | 2017-07-12 | 2017-10-24 | 联动优势科技有限公司 | The method and server of a kind of high in the clouds data storage |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110457929A (en) * | 2019-08-16 | 2019-11-15 | 重庆华医康道科技有限公司 | The sharing method and system of isomery HIS big data real-time encryption and decryption compression cochain |
CN110457929B (en) * | 2019-08-16 | 2021-01-19 | 重庆华医康道科技有限公司 | Method and system for sharing heterogeneous HIS (high-speed multimedia subsystem) big data real-time encryption and decryption compressed uplink |
CN112199445A (en) * | 2020-11-11 | 2021-01-08 | 山西特信环宇信息技术有限公司 | Hierarchical structure of pyramidal block chain |
CN112199445B (en) * | 2020-11-11 | 2023-06-23 | 山西特信环宇信息技术有限公司 | Hierarchical architecture of cone block chain |
CN113064901A (en) * | 2021-04-06 | 2021-07-02 | 北京瑞卓喜投科技发展有限公司 | Method and device for forming data micro-index in contract on chain and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN110019347B (en) | 2021-05-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108733344B (en) | Data reading and writing method and device and annular queue | |
US10606806B2 (en) | Method and apparatus for storing time series data | |
CN109067733B (en) | Method and apparatus for transmitting data, and method and apparatus for receiving data | |
CN105631035B (en) | Date storage method and device | |
CN111352935B (en) | Index creating method, device and equipment in block chain type account book | |
CN110019347A (en) | A kind of data processing method, device and the terminal device of block chain | |
CN109561117A (en) | Collecting method and device | |
WO2021068891A1 (en) | Method, system, electronic device, and storage medium for storing and collecting temperature data | |
CN113495903A (en) | Electric power time sequence database caching method, system, equipment and readable storage medium | |
CN109213745B (en) | Distributed file storage method, device, processor and storage medium | |
CN107423425A (en) | A kind of data quick storage and querying method to K/V forms | |
CN108228476B (en) | Data acquisition method and device | |
CN113238856A (en) | RDMA (remote direct memory Access) -based memory management method and device | |
CN102982046B (en) | A kind of web data compression and storage method and system | |
CN107436848B (en) | Method and device for realizing conversion between user data and compressed data | |
CN112764673B (en) | Hyperspectral linear array data storage rate optimization method, device and storage medium | |
CN104506390A (en) | Log storage method and device of road test system | |
CN115292280A (en) | Cross-region data scheduling method, device, equipment and storage medium | |
CN114936189A (en) | Application program operation method and device, computer equipment and readable storage medium | |
CN110377262B (en) | Data storage method and device, storage medium and processor | |
CN113360095A (en) | Hard disk data management method, device, equipment and medium | |
CN111625502A (en) | Data reading method and device, storage medium and electronic device | |
CN113297267A (en) | Data caching and task processing method, device, equipment and storage medium | |
CN106407345A (en) | Method and apparatus for updating dirty data | |
CN112131193B (en) | Application program compression method and device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |