CN110309196A - Block chain data storage and query method, apparatus, equipment and storage medium - Google Patents
Block chain data storage and query method, apparatus, equipment and storage medium Download PDFInfo
- Publication number
- CN110309196A CN110309196A CN201910427137.8A CN201910427137A CN110309196A CN 110309196 A CN110309196 A CN 110309196A CN 201910427137 A CN201910427137 A CN 201910427137A CN 110309196 A CN110309196 A CN 110309196A
- Authority
- CN
- China
- Prior art keywords
- data
- block chain
- plan
- data base
- index
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 238000013500 data storage Methods 0.000 title claims abstract description 42
- 238000003780 insertion Methods 0.000 claims abstract description 94
- 230000037431 insertion Effects 0.000 claims abstract description 94
- 230000004048 modification Effects 0.000 claims abstract description 63
- 238000012986 modification Methods 0.000 claims abstract description 63
- 230000008859 change Effects 0.000 claims description 4
- 235000013399 edible fruits Nutrition 0.000 claims description 4
- 238000004590 computer program Methods 0.000 claims description 3
- 230000006399 behavior Effects 0.000 claims 3
- 238000011161 development Methods 0.000 abstract description 11
- 230000006872 improvement Effects 0.000 abstract description 2
- 238000012545 processing Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 5
- 239000004744 fabric Substances 0.000 description 4
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000012217 deletion Methods 0.000 description 3
- 230000037430 deletion Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000010354 integration Effects 0.000 description 2
- 230000008439 repair process Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 230000000877 morphologic effect Effects 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
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/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
- G06F16/2246—Trees, e.g. B+trees
-
- 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/2458—Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
- G06F16/2471—Distributed queries
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Software Systems (AREA)
- Fuzzy Systems (AREA)
- Mathematical Physics (AREA)
- Probability & Statistics with Applications (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention relates to block chain field more particularly to block structure improvement areas, a kind of block chain data storage and query method, apparatus, equipment and storage medium are disclosed.Block chain data storage and query method includes: generation index data base;Target structural query language SQL statement is obtained, target SQL statement is the legal sentence for meeting SQL syntax rule;Target SQL statement is parsed according to Predistribution Algorithm, obtains abstract syntax tree;Logic executive plan is generated according to abstract syntax tree, logic executive plan includes insertion data plan, modification data plan and inquiry data plan;Block chain distributed data base is written and read according to logic generation plan and index data base, is read and write as a result, block chain distributed data base is for storing and inquiring data.The present invention realizes the storage of data cochain and inquiry by encapsulating to block chain physical layer interface, using SQL statement and index data base, reduces exploitation threshold, improves retrieval and development efficiency.
Description
Technical field
The present invention relates to block structure improvement areas more particularly to block chain data storage and query method, apparatus, equipment
And storage medium.
Background technique
Block chain (block chain, BC) is the intelligence equity with distributed data base identification, propagation and information-recording
Network, also referred to as value internet, block chain are inherently the database of a decentralization, and block chain includes one and claimed
For the list of block, there is the record of sustainable growth and marshalling.Each block include a timestamp and one with
The link of previous block, block chain distort data can not, once recording, the data in a block can not
It is inverse.
Block chain distributed storage data are key assignments (key-value) types, although the bottom of block chain technology also provides
The interface of data manipulation is carried out, but these interfaces are all fairly simple, be stored in the Transaction Information in block substantially with character string
Form exists, and application program is needed frequently to parse the data information of character string.It only supports to inquire the number stored on chain according to key
According to not supporting complex query, use inconvenience.
During practical item development, for the data that will be stored in originally in relational data, it is revised as block chain
Storage, needs to rewrite the logical code of data storage and query part, while also needing to be familiar with block chain data manipulation and connecing
Mouthful, development amount is big, and consuming time is long, and development efficiency is low.
Summary of the invention
It is a primary object of the present invention to solve block chain to support complex query insufficient, the low problem of recall precision, together
When solve to store data block chain distributed data base be revised as by relevant database, need to rewrite data query and deposit
Logical code is stored up, the problem that lead to that development amount is big, consuming time is long low with development efficiency.
To achieve the above object, first aspect present invention provides a kind of block chain data storage and query method, comprising:
Generate index data base;Target structural query language SQL statement is obtained, the target SQL statement is to meet SQL syntax rule
Legal sentence;The target SQL statement is parsed according to Predistribution Algorithm, obtains abstract syntax tree;According to described abstract
Syntax tree generates logic executive plan, and the logic executive plan includes insertion data plan, modification data plan and inquiry number
According to plan;Block chain distributed data base is written and read according to the logic generation plan and the index data base,
It is read and write as a result, the block chain distributed data base is for storing and inquiring data.
Optionally, described to be generated according to the abstract syntax tree in the first implementation of first aspect present invention
Logic executive plan, the logic executive plan include that insertion data plan, modification data plan and inquiry data plan include:
The abstract syntax tree is traversed by visitor, obtains the element of the target SQL statement;According to the target SQL language
The Element generation logic executive plan of sentence, the logic executive plan include insertion data plan, modification data plan and inquiry
Data plan.
Optionally, in second of implementation of first aspect present invention, it is described according to the logic generate plan and
The index data base is written and read block chain distributed data base, is read and write as a result, the block chain is distributed
Database is for storing and inquiring data include: to judge whether the logic executive plan is the insertion data plan, described
Modify data plan or the inquiry data plan;If the logic executive plan is the insertion data plan, to institute
It states index data base and the block chain distributed data base carries out insertion operation, obtain the read-write result;If the logic
Executive plan is the modification data plan, then modifies to the index data base and the block chain distributed data base
Operation, obtains the read-write result;If the logic executive plan is the inquiry data plan, to the index data base
Inquiry operation is carried out with the block chain distributed data base, obtains the read-write result.
Optionally, in the third implementation of first aspect present invention, if the logic executive plan is institute
Insertion data plan is stated, then insertion operation is carried out to the index data base and the block chain distributed data base, obtains institute
Stating read-write result includes;Generate the first index mark;SQL is generated according to the insertion data plan and the first index mark
It is inserted into sentence;Insertion operation is carried out according to index data base described in the SQL parenthesis sentence pair, the index data base is obtained and returns
The Major key returned;The index data base is inquired according to the Major key, obtains the insertion data that the index data base returns;
Insertion operation is carried out to the block chain distributed data base according to the first index mark and the insertion data, is inserted
Enter as a result, setting the read-write result for the insertion result.
Optionally, in the 4th kind of implementation of first aspect present invention, if the logic executive plan is institute
Modification data plan is stated, then modifies operation to the index data base and the block chain distributed data base, obtains institute
Stating read-write result includes: to generate SQL modification sentence according to the modification data plan;Sentence, which is modified, according to the SQL updates institute
Index data base is stated, the second index mark is obtained;The block chain distributed data base is inquired according to the second index mark,
Obtain block chain primary data;It modifies to the block chain primary data, obtains block chain target data;According to described
The block chain distributed data base is written in the block chain target data by two index marks, is modified as a result, will be described
Modification result is set as the read-write result.
Optionally, in the 5th kind of implementation of first aspect present invention, if the logic executive plan is institute
Inquiry data plan is stated, then inquiry operation is carried out to the index data base and the block chain distributed data base, obtains institute
Stating read-write result includes: to generate SQL query statement according to the inquiry data plan;Institute is inquired according to the SQL query statement
Index data base is stated, third index mark is obtained;Mark, which is indexed, according to the third reads the block chain distributed data base,
Query result is obtained, sets the read-write result for the query result.
Optionally, in the 6th kind of implementation of first aspect present invention, block chain data storage and query side
Method further include: send first message to message queue, obtain Transaction Identifier;According to the Transaction Identifier to the index data base
Write operation is carried out, result is written;Judge whether said write result is to be written successfully;If said write result is write-in
Success then carries out write operation to the block chain distributed data base by the message queue;If said write result is
Write-in failure then carries out delete operation to the index data base by the message queue.
Second aspect of the present invention provides a kind of block chain data storage and query device, comprising: the first generation unit is used
In generation index data base;Acquiring unit, for obtaining target structural query language SQL statement, the target SQL statement is
Meet the legal sentence of SQL syntax rule;Resolution unit, for being parsed according to Predistribution Algorithm to the target SQL statement,
Obtain abstract syntax tree;Second generation unit, for generating logic executive plan according to the abstract syntax tree, the logic is held
Row plan includes insertion data plan, modification data plan and inquiry data plan;Read-write cell, for raw according to the logic
Block chain distributed data base is written and read at plan and the index data base, is read and write as a result, the block
Chain distributed data base is for storing and inquiring data.
Optionally, in the first implementation of second aspect of the present invention, second generation unit is specifically used for: logical
It crosses visitor and traverses the abstract syntax tree, obtain the element of the target SQL statement;According to the target SQL statement
Element generation logic executive plan, the logic executive plan include insertion data plan, modification data plan and inquiry number
According to plan.
Optionally, in second of implementation of second aspect of the present invention, the read-write cell includes: that judgement is single
Member, for judging whether the logic executive plan is the insertion data plan, the modification data plan or described looks into
Ask data plan;It is inserted into subelement, if the logic executive plan is the insertion data plan, for the index number
Insertion operation is carried out according to library and the block chain distributed data base, obtains the read-write result;Subelement is modified, if described patrol
Volume executive plan is the modification data plan, then for the index data base and the block chain distributed data base into
Row modification operation, obtains the read-write result;Subelement is inquired, if the logic executive plan is the inquiry data plan,
Inquiry operation then is carried out to the index data base and the block chain distributed data base, obtains the read-write result.
Optionally, in the third implementation of second aspect of the present invention, the insertion subelement is specifically used for: generating
First index mark;It generates SQL according to the insertion data plan and the first index mark and is inserted into sentence;According to described
Index data base described in SQL parenthesis sentence pair carries out insertion operation, obtains the Major key that the index data base returns;According to institute
It states Major key and inquires the index data base, obtain the insertion data that the index data base returns;According to first index
Mark and the insertion data carry out insertion operation to the block chain distributed data base, are inserted into as a result, inserting described
Enter result and is set as the read-write result.
Optionally, in the 4th kind of implementation of second aspect of the present invention, the modification subelement is specifically used for: according to
The modification data plan generates SQL and modifies sentence;Sentence is modified according to the SQL and updates the index data base, obtains the
Two index marks;The block chain distributed data base is inquired according to the second index mark, obtains block chain primary data;
It modifies to the block chain primary data, obtains block chain target data;It is identified according to second index by the area
The block chain distributed data base is written in block chain target data, is modified as a result, setting described for the modification result
Read and write result.
Optionally, in the 5th kind of implementation of second aspect of the present invention, the inquiry subelement is specifically used for: according to
The inquiry data plan generates SQL query statement;The index data base is inquired according to the SQL query statement, obtains the
Three index marks;Mark is indexed according to the third and reads the block chain distributed data base, obtains query result, it will be described
Query result is set as the read-write result.
Optionally, in the 6th kind of implementation of second aspect of the present invention, the block chain data storage and query dress
It sets further include: transmission unit obtains Transaction Identifier for sending first message to message queue;First writing unit is used for root
Write operation is carried out to the index data base according to the Transaction Identifier, is written result;Judging unit, it is described for judging
Be written whether result is to be written successfully;Second writing unit, if said write result is to be written successfully, for being disappeared by described
It ceases queue and write operation is carried out to the block chain distributed data base;Unit is deleted, if said write result is write-in failure,
Then for carrying out delete operation to the index data base by the message queue.
Third aspect present invention provides a kind of block chain data storage and query method equipment, comprising: memory and extremely
Lack a processor, it is mutual by route that instruction, the memory and at least one described processor are stored in the memory
Connection;At least one described processor calls the described instruction in the memory, so that the block chain data are stored and looked into
It askes equipment and executes method described in above-mentioned various aspects.
The fourth aspect of the present invention provides a kind of computer readable storage medium, in the computer readable storage medium
It is stored with instruction, when run on a computer, so that computer executes method described in above-mentioned various aspects.
The fifth aspect of the present invention provides a kind of computer program product comprising instruction, when it runs on computers
When, so that computer executes method described in above-mentioned various aspects.
As can be seen from the above technical solutions, the invention has the following advantages that
In technical solution provided by the invention, index data base is generated;Target structural query language SQL statement is obtained,
The target SQL statement is the legal sentence for meeting SQL syntax rule;The target SQL statement is carried out according to Predistribution Algorithm
Parsing, obtains abstract syntax tree;According to the abstract syntax tree logic executive plan, the logic executive plan includes insert number
According to plan, modification data plan and inquiry data plan;Plan and the index data base are generated to block according to the logic
Chain distributed data base is written and read, and is read and write as a result, the block chain distributed data base is for storing and inquiring
Data.In the embodiment of the present invention, by the processing to SQL statement, using SQL statement it is compatible in block chain distributed data base and
The inquiry and storage of relevant database are mentioned by establishing the corresponding relationship of index data base and block chain distributed data base
The recall precision of high block chain business information encapsulates block chain physical layer interface, realizes number using SQL statement and index data base
It stores and inquires according to cochain.
Detailed description of the invention
Fig. 1 is one embodiment schematic diagram of block chain data storage and query method in the embodiment of the present invention;
Fig. 2 is another embodiment schematic diagram of block chain data storage and query method in the embodiment of the present invention;
Fig. 3 is one embodiment schematic diagram of block chain data storage and query device in the embodiment of the present invention;
Fig. 4 is another embodiment schematic diagram of block chain data storage and query device in the embodiment of the present invention;
Fig. 5 is another embodiment schematic diagram of block chain data storage and query equipment in the embodiment of the present invention.
Specific embodiment
The embodiment of the invention provides a kind of block chain data storage and query method, apparatus, equipment and storage mediums, originally
It is compatible in block chain distributed data base and relationship type using SQL statement by the processing to SQL statement in inventive embodiments
The inquiry and storage of database improve block by establishing the corresponding relationship of index data base and block chain distributed data base
The recall precision of chain business information encapsulates block chain physical layer interface, realizes data cochain using SQL statement and index data base
Storage and inquiry reduce exploitation threshold, improve development efficiency.
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention
The embodiment of the present invention is described in attached drawing.
Description and claims of this specification and term " first ", " second ", " third ", " in above-mentioned attached drawing
The (if present)s such as four " are to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should manage
The data that solution uses in this way are interchangeable under appropriate circumstances, so that the embodiments described herein can be in addition to illustrating herein
Or the sequence other than the content of description is implemented.In addition, term " includes " or " having " and its any deformation, it is intended that covering is not
Exclusive includes, for example, the process, method, system, product or equipment for containing a series of steps or units be not necessarily limited to it is clear
Step or unit those of is listed on ground, but is not clearly listed or for these process, methods, product or is set
Standby intrinsic other step or units.
For ease of understanding, the detailed process of the embodiment of the present invention is described below, referring to Fig. 1, the present invention is implemented
One embodiment of block chain data storage and query method includes: in example
101, index data base is generated;
Server generates index data base according to business demand.The index data base is among the data of block chain
In part, which additionally provides the unified interface of block chain bottom block chain access, which visits
The unified interface asked includes the creation to data, inquiry, modification and deletion (create read update delete, CURD).
Index data is stored using relevant database MySQL, the data type in a corresponding block chain distributed data base, in rope
Draw and creates one-to-one index data table in database.The structure of index data table contains number in block chain distributed data base
According to all information of structure.Such as: user integral data are stored on block chain, which includes User ID, uses
Family name and user integral, then creating 1 user integral user concordance list of table in index database.
Table 1: user integral user concordance list
Field name | Field type | Remarks |
user_id | bigint | User ID, major key |
user_name | varchar | Address name |
point | int | User integral |
data_id | varchar | Index mark, the key of corresponding block chain data |
It include an index identification field data_id in table 1, corresponding to storing data in block chain distributed data base
Key key, server must according to index mark could inquire or memory block chain distributed data base on data.Index number
Data_id field is all contained according to every concordance list in library, which is uniquely, with block in index data base
Key key in chain distributed data base is corresponding one by one, establishes index data and block chain data corresponding relationship.
102, obtain target structural query language SQL statement, target SQL statement be meet SQL syntax rule it is legal
Sentence;
Server obtains the target structural query language SQL statement of service request, and target SQL statement is to meet SQL language
The legal sentence of method rule.The SQL statement is consistent with the SQL statement of access relational database, including insertion insert, modification
Update, inquiry select and deletion tetra- kinds of SQL statements of delete, corresponding to different interfaces.Specifically, server receives just
Beginning SQL statement and parameter, encapsulate initial SQL statement and parameter, and server calls relevant interface obtains the initial SQL language encapsulated
Sentence and parameter, obtain target SQL statement.The target SQL statement is legal sentence, and service request is before to the legal of SQL
Property is judged that the sentence for not meeting SQL syntax rule is rejected.
It should be noted that structured query language (structured query language, SQL) is a kind of data
Library inquiry and programming language, including SQL syntax rule, for accessing data and administrative relationships Database Systems, SQL statement
It can be used to execute various operations, for example, by insertion of data into data library, modify data in database and from data
Data etc. are extracted in library.
103, target SQL statement is parsed according to Predistribution Algorithm, obtains abstract syntax tree;
Server is handled target SQL statement according to Predistribution Algorithm, obtains abstract syntax tree.Specifically, server
Target SQL statement is parsed according to SQL resolver, which includes morphology parsing and syntax parsing.Wherein, morphology parses
Refer to and target SQL statement is split as not subdivisible lexical unit one by one.In SQL syntax, lexical unit includes key
Word, identifier, literal, operator and delimiter.For example, server is true when server reads the UPDATE of target SQL statement
Determine the rule that first character " U " meets keyword and identifier, determines that second character " P " similarly meets keyword and mark
Show the rule of symbol, and so on, when the 7th character is space, server judgement is unsatisfactory for the rule, then server is just
Complete the identification of a lexical unit.UPDATE is both that SQL standardizes the keyword of definition and meets identifier rule,
Therefore when a lexical unit is identifier, SQL resolver carry out priority judgement, determine a lexical unit whether be
Keyword, the priority of keyword are higher than identifier rule.Other rules include the character with number beginning then according to numerical value
The literal of rule reads character;Character is then read according to the literal of character string rule with what double quotation marks or single quotation marks started;
Operator or delimiter are then identified according to symbolic feature.
Syntax parsing obtains a lexical unit from morphology parsing every time.If meeting rule, continue next word
The extraction and matching of method unit, until end of string;If being unsatisfactory for rule, just prompt is wrong and terminates this parsing.Grammer
Target SQL statement is finally converted to abstract syntax tree by parsing.
Optionally, server parses target SQL statement using the SQL Parser module of database connection pool druid, will
Naturally semantic SQL statement is parsed into more abstractively data structure, i.e., abstract syntax tree (abstract syntax tree,
AST).It should be noted that AST is the tree-shaped expression of the abstract syntax structure of source code, each node on tree indicates source
One of code structure, AST are not offered as out each details that true grammer occurs, such as, nested parenthesis is implied
In the structure of tree, there is no presented in the form of node.
104, according to abstract syntax tree logic executive plan, logic executive plan includes insertion data plan, modification data
Plan and inquiry data plan;
For server according to abstract syntax tree logic executive plan, logic executive plan includes insertion data plan, modification number
According to plan and inquiry data plan.Specifically, server obtains SQL element and data according to abstract syntax tree, logic is generated
Executive plan.The logic executive plan describes which data needed to inquire, or stores which data, the logic executive plan
Including insertion data plan, modification data plan and inquiry data plan.Such as: the inquiry request of user integral, server solution
Received SQL query select sentence is analysed, original SQL character string is decomposed into logic executive plan, i.e., from user integral user
The value of integral point field is read in concordance list, filter condition is the record that user's name user_name value is Tom.
105, block chain distributed data base is written and read according to logic generation plan and index data base, is obtained
Read-write is as a result, block chain distributed data base is used to storing and inquiring data;
Server is written and read block chain distributed data base according to logic generation plan and index data base, obtains
To read-write as a result, the block chain distributed data base is for storing and inquiring data.The read-write operation is inserted into according to sql command
Insert, modification update and inquiry select are divided, and SQL statement is being parsed generation logic executive plan by server
Afterwards, in conjunction with index data base operation block chain distributed data base, the inquiry and storage operation of data are completed.
When detecting logic executive plan to be inserted into data plan, server is distributed to index data base and block chain
Database carries out insertion operation, obtains read-write result.Specifically, server generates the first index mark;Server is according to insertion
Data plan and the first index mark carry out insertion operation to index data base, obtain the Major key of index data base return;Clothes
Device be engaged according to Major key search index database, obtains the insertion data of index data base return;Server is according to the first index
Mark and insertion data carry out insertion operation to block chain distributed data base.For example, for being inserted into user integral request of data,
The first index mark data_id that user integral concordance list is arranged in server first is character string USER_1, then server root
The user integral concordance list of index data base is write data into according to the insertion data plan of user integral and the first index mark
In, the Major key 1 of major key user_id is obtained, user integral concordance list is inquired according to Major key 1, inquiry data is obtained, will inquire
Other fields and data are encapsulated as JS object numbered musical notation by key key of the USER_1 as block chain distributed data base in data
(JavaScript Object Notation, JSON) format, and block chain distributed data base is set by the JSON data
Value value, recall block chain physical layer interface, by key and value write-in block chain distributed data base in.
When detecting logic executive plan to modify data plan, server is distributed to index data base and block chain
Database is modified operation, and read-write result is obtained.Number is inquired from block chain distributed data base according to the second index mark
According to obtaining primary data, and block chain distributed data base is written again to primary data update, it is ensured that block chain distributed data
The data integrity and consistency in library.For example, being asked for the user integral point field for modifying user integral concordance list user
It asks, server obtains update element, then server updates index first according to the corresponding logic executive plan of the request
Database, and the value of the second index mark data_id of more new data is obtained, it regard the second index mark as key key, inquiry
Block chain distributed data base, obtains initial value, which is JSON formatted data, modifies the initial value
The value of user integral point obtains target value, and target value is also JSON formatted data, last server calls block
Chain physical layer interface will be in key and target value write-in block chain distributed data base.
When detecting logic executive plan to inquire data plan, server is distributed to index data base and block chain
Database carries out inquiry operation, obtains read-write result.Server obtains query result from block chain distributed data base, it is ensured that
The accuracy of data.For example, server inquires user integral data rope according to query statement for the request for inquiring user integral
Draw table, obtains the value USER_1 of third index mark data_id field, server is using USER_1 as key inquiry block chain point
Cloth database, obtains query result.
It is compatible in block chain distributed data using SQL statement by the processing to SQL statement in the embodiment of the present invention
The inquiry and storage in library and relevant database are closed by establishing index data base and the corresponding of block chain distributed data base
The recall precision of block chain business information improves in system, encapsulates to block chain physical layer interface, uses SQL statement and index data base
It realizes the storage of data cochain and inquiry, reduces exploitation threshold, improve development efficiency.
Referring to Fig. 2, another embodiment of block chain data storage and query method includes: in the embodiment of the present invention
201, index data base is generated;
Server generates index data base according to business demand.The index data base is among the data of block chain
In part, which additionally provides the unified interface of block chain bottom block chain access, which visits
The unified interface asked includes the creation to data, inquiry, modification and deletion (create read update delete CURD).
Index data is stored using relevant database MySQL, the data type in a corresponding block chain distributed data base, in rope
Draw and creates one-to-one index data table in database.The structure of index data table contains number in block chain distributed data base
According to all information of structure.Such as: user integral data are stored on block chain, which includes User ID, uses
Family name and user integral, then creating 1 user integral user concordance list of table in index database.
It include an index identification field data_id in table 1, corresponding to storing data in block chain distributed data base
Key key, server must according to index mark could inquire or memory block chain distributed data base on data.Index number
Index identification field is all contained according to every concordance list in library, index mark is uniquely, with block in index data base
Key key in chain distributed data base is corresponding one by one, establishes index data and block chain data corresponding relationship.For example, user
The index mark data_id stored in integral concordance list is USER_1, then also storing one in block chain distributed data base
Key key is the user integral data of USER_1.It should be noted that index mark is named as data_id, or
Index_id does not conflict, specifically herein without limitation with other fields of the concordance list in index data base.
202, obtain target structural query language SQL statement, target SQL statement be meet SQL syntax rule it is legal
Sentence;
Server obtains the target structural query language SQL statement of database request, and target SQL statement is to meet SQL
The legal sentence of syntax rule.The SQL statement is consistent with the SQL statement of access relational database, including is inserted into insert, repairs
Change update, inquiry select and delete tetra- kinds of SQL statements of delete, corresponding to different interfaces.The target SQL statement is to close
Method sentence judged the legitimacy of SQL before service request, for do not meet the sentence of SQL syntax rule into
Row is rejected.Specifically, server receives the request including target structural query language SQL statement and parameter, which is root
According to the data format that preset rules are packaged target SQL statement and parameter, in order to which server is obtained using unified approach
Target SQL statement and parameter.For example, the database SQL of user integral is inquired after select sentence and parameter param encapsulation such as
Shown in 2 user integral inquiry request table of table.
Table 2: user integral inquiry request table
Parameter name | Parameter type | Value |
sql | Character string | Select point from user where user_name=? |
param | Character string | {0:{sqlType:12,value:’Tom’}} |
Parameter sql is structured query language SQL statement, and parameter param is the other parameters set of JSON data structure.
The parsing of server calls relevant interface includes the request of target SQL statement and parameter, and get parms sql, obtains target SQL language
Sentence.
It should be noted that structured query language (structured query language, SQL) is a kind of data
Library inquiry and programming language, including SQL syntax rule, for accessing data and administrative relationships Database Systems, SQL statement
It can be used to execute various operations, for example, by insertion of data into data library, modify data in database and from data
Data etc. are extracted in library.
Optionally, the configuration file of server setting connection database, the configuration file include two, and one closes for connection
It is the configuration file of type database, another is the configuration file for connecting block chain, and the parameter name of two configuration files is kept
It unanimously, all include link address url, the database-driven driver of access, only parameter value is different.Server is by being arranged not
Same configuration file is realized then in the case where not changing existing business logical code in relevant database and block chain point
Being switched fast in cloth database and the operation such as stored and inquired using identical SQL statement.For example, not by setting
Same configuration file, user integral service can make centralised storage and inquiry in MySQL database, can also be in block
Make distributed storage and inquiry in chain distributed data base.
203, target SQL statement is parsed according to Predistribution Algorithm, obtains abstract syntax tree;
Server is handled target SQL statement according to Predistribution Algorithm, obtains abstract syntax tree.Specifically, server
Target SQL statement is parsed according to SQL resolver, which includes morphology parsing and syntax parsing.Wherein, morphology parses
Refer to and target SQL statement is split as not subdivisible lexical unit one by one.In SQL syntax, lexical unit includes key
Word, identifier, literal, operator and delimiter.For example, server is true when server reads the UPDATE of target SQL statement
Determine the rule that first character " U " meets keyword and identifier, determines that second character " P " similarly meets keyword and mark
Show the rule of symbol, and so on, when the 7th character is space, server judgement is unsatisfactory for the rule, it is determined that a word
The identification of method unit.It should be noted that UPDATE is both that SQL standardizes the keyword of definition and meets identifier rule,
Therefore when a lexical unit is identifier, SQL resolver carries out the judgement of priority, determines whether lexical unit is crucial
Word.Other rules include then reading character according to the literal of numerical value rule with the character of number beginning;With double quotation marks or list
Quotation marks beginning then reads character according to the literal of character string rule;Operator or delimiter are then known according to symbolic feature
Not.
Syntax parsing obtains a lexical unit from morphology parsing every time.If meeting rule, continue next word
The extraction and matching of method unit, until end of string;If being unsatisfactory for rule, just prompt is wrong and terminates this parsing.Grammer
Target SQL statement is finally converted to abstract syntax tree by parsing.For example, for target SQL statement:
SELECT user_id,user_name,point FROM user WHERE user_id>10;
Server using SQL resolver carry out morphological analysis after, obtain lexical unit include keyword be SELECT,
FROM and WHERE;Identifier is user_id, user_name, point and user;Literal is 10;Operator is >;Delimiter
For, and;.Syntactic analysis is then that the circular treatment and branching selection of rule are carried out on the basis of lexical unit, finally resolves to one
A abstract syntax tree including root node.
Optionally, server parses target SQL statement using the SQL Parser module of database connection pool druid, will
Naturally semantic SQL statement is parsed into more abstractively data structure, i.e., abstract syntax tree (abstract syntax tree,
AST).It should be noted that AST is the tree-shaped expression of the abstract syntax structure of source code, each node on tree indicates source
One of code structure, AST are not offered as out each details that true grammer occurs, such as, nested parenthesis is implied
In the structure of tree, there is no presented in the form of node.
204, logic executive plan is generated according to abstract syntax tree, which includes insertion data plan, repairs
Change data plan and inquiry data plan;
Server according to abstract syntax tree generate logic executive plan, the logic executive plan include insertion data plan,
Modify data plan and inquiry data plan.Specifically, server obtains SQL element and data according to abstract syntax tree, it is raw
At logic executive plan.The logic executive plan includes insertion data plan, modification data plan and inquires data plan, also
It depicts and which data is needed to inquire, or which data stored, wherein insertion data plan includes insertion insert member
Element, modification data plan includes modification update element and inquiry data plan includes inquiry select element.
Firstly, server uses visitor, AST syntax tree is traversed, obtains each element in target SQL statement,
The element includes SQL basic element and related data.Visitor, also known as visitor mode, separate structure and data,
A visitor is write, the element in access data structure is removed, then all gives Accessor Classes the processing to each element.
Then, server passes through the Element generation logic executive plan in SQL statement.The logic plan describes needs and looks into
Which data is ask, or which data stored.Data middleware provides the physics realization of logic executive plan, calls bottom block
Chain interface completes actual execution.Such as: 2 user integral inquiry request table of table, server parse received SQL query
Original SQL character string is decomposed into logic executive plan by select sentence, i.e., integral is read from user integral user concordance list
The value of point field, filter condition are the records that user's name user_name value is Tom.Logic executive plan includes insert number
According to plan, modification data plan and inquiry data plan.
205, whether decision logic executive plan is insertion data plan, modification data plan or inquiry data plan;
Whether the executive plan of server decision logic is insertion data plan, modification data plan or inquiry data meter
It draws.Specifically, the executive plan of server decision logic whether include SQL insert element, if logic executive plan includes SQL
Insert element, it is determined that logic executive plan be insertion data plan;The executive plan of server decision logic whether include
The update element of SQL, if logic executive plan includes the update element of SQL, it is determined that logic executive plan is modification number
According to plan;The executive plan of server decision logic whether include SQL select element, if logic executive plan includes SQL's
Select element, it is determined that logic executive plan is insertion data plan.
It should be noted that server according to logic generate plan and index data base to block chain distributed data base into
Row operation, the block chain distributed data base is for storing and inquiring data.The operation is inserted into insert according to sql command,
Modification update and inquiry select are divided, and server is after parsing generation logic executive plan for SQL statement, in conjunction with rope
Draw database operation block chain distributed data base, completes the inquiry and storage operation of data.
If 206, logic executive plan is insertion data plan, to index data base and block chain distributed data base into
Row insertion operation obtains read-write result;
If logic executive plan is insertion data plan, server is to index data base and block chain distributed data base
Insertion operation is carried out, read-write result is obtained.Specifically, server generates the first index mark, wherein the first index is identified as clothes
Device be engaged according to presetting rule dynamic generation, there is uniqueness;Server is generated according to insertion data plan and the first index mark
SQL is inserted into sentence, and further, server obtains insertion data insert element in the works, index table name, multiple is inserted into
The field name of data and respective corresponding field value;Server obtains the first index and identifies corresponding index field name;Server will
Multiple field names for being inserted into data and the first index identify corresponding index field name and are set as multiple insertion index data tables
Field, by it is multiple be inserted into the corresponding field value of data and first index mark according to multiple insertion index data literary names
The corresponding sequence of section sets gradually as the corresponding data value of multiple insertion index data literary name sections;Server is according to SQL syntax
Rule to insert element, index table name, multiple insertion index data literary name sections and multiple insertion index data literary name sections respectively
The SQL of corresponding data value building insertion index data base is inserted into sentence;Server is according to SQL parenthesis sentence pair index data base
Insertion operation is carried out, the Major key of index data base return is obtained;Server obtains rope according to Major key search index database
Draw the insertion data of database return;Server according to first index identify and insertion data to block chain distributed data base into
Row insertion operation is inserted into as a result, the insertion result will be inserted into result and set including being inserted into data success and being inserted into data failure
It is set to read-write result.For example, user integral is written in application requests, firstly, server generates the first rope according to presetting rule
Draw and be identified as USER_1, it is as follows that SQL is inserted into sentence:
insert into`user`(user_id,user_name,point,data_id)values(1,‘Tom’,0,
‘USER_1');
Server writes data into the user integral user concordance list in index data base further according to SQL insertion sentence, obtains
To insertion as a result, as table 3 is inserted into shown in user integral concordance list.
Table 3: insertion user integral concordance list
user_id | user_name | point | data_id |
1 | Tom | 0 | USER_1 |
Finally, the user table in server search index database, obtains inquiry data, the USER_1 in data will be inquired
As the key key of block chain distributed data base, other fields and data are encapsulated as JS object numbered musical notation (JavaScript
Object Notation, JSON) format, and by the JSON data { ' userId ': 1, ' userName ': ' Tom ', point:0 }
It is set as the value value of block chain distributed data base, block chain physical layer interface is recalled by key and value and block chain is written
In distributed data base, the data stored on block chain after write-in such as the following table 4 block chain distributed data table, and inserted what is obtained
Enter result and returns to terminal.
Table 4: block chain distributed data table
key | value |
USER_1 | {‘userId’:1,‘userName’:’Tom’,point:0} |
If 207, logic executive plan is modification data plan, to index data base and block chain distributed data base into
Row modification operation, obtains read-write result;
If logic executive plan is modification data plan, server is to index data base and block chain distributed data base
It modifies operation, obtains read-write result.Specifically, generating SQL according to modification data plan modifies sentence, and further, clothes
Be engaged in device obtain modification data plan in update element, index table name, modification condition, multiple data to be modified field name and
Respective corresponding field value;Server is according to SQL syntax rule to update element, index table name, modification condition, multiple to be modified
The field name of data and respective corresponding field value are rebuild, and the SQL modification sentence of modification index data base is obtained;According to
SQL modifies sentence and updates index data base, obtains the second index mark;According to the second index mark inquiry block chain distribution number
According to library, block chain primary data is obtained;It modifies to block chain primary data, obtains block chain target data;According to second
Block chain distributed data base is written in block chain target data by index mark, is modified as a result, the modification result includes repairing
Change data success and modification data failure, sets read-write result for modification result.For example, application requests are to user identifier
1 increases by 100 integrals, and it is as follows to generate SQL modification sentence for server first:
Update`user`set point=point+100where user_id=1;
Then, server executes the user table in SQL modification sentence update index data base, updated user table number
User integral concordance list is updated according to such as table 5.
Table 5: user integral concordance list is updated
user_id | user_name | point | data_id |
1 | Tom | 100 | USER_1 |
Finally, the data on server update block chain, specifically, server executes select data_id from`
User`where user_id=1 obtains the value USERT_1 of the second index mark data_id field;Server is by USERT_1
Block chain database is inquired as key, returns to JSON data { ' userId ': 1, ' userName ': ' Tom ', point:0 };Clothes
Be engaged in device by the JSON data conversion integrate update operation, updated integration data be ' userId ': 1, ' userName ':
' Tom ', point:100 }, finally, calling block chain physical layer interface that block chain distribution number is written updated integration data
According on library, block chain data such as table 6 more new block chain distributed data base after update, and obtained modification result is returned into end
End.
Table 6: more new block chain distributed data base
Key | Value |
USER_1 | {‘userId’:1,‘userName’:‘Tom’,point:100} |
It should be noted that inquiring data from block chain distributed data base according to the second index mark, obtain initial
Data, and block chain distributed data base is written again to primary data update, it is ensured that the data of block chain distributed data base are complete
Whole property and consistency.
If 208, logic executive plan is inquiry data plan, to index data base and block chain distributed data base into
Row inquiry operation obtains read-write result.
If logic executive plan is inquiry data plan, index data base and block chain distributed data base are looked into
Operation is ask, read-write result is obtained.Specifically, generating SQL query statement according to inquiry data plan, further, server is obtained
Take select element, index table name, querying condition and the multiple field names to be checked in inquiry data plan;Server according to
SQL syntax rule rebuilds select element, index table name, querying condition and multiple field names to be checked, obtains
To the SQL query statement of search index database;According to SQL query statement search index database, third index mark is obtained;
Mark is indexed according to third and reads block chain distributed data base, obtains query result, sets read-write result for query result.
For example, the integral of application requests inquiry user identifier 1, target SQL statement are select point from`user`
Where user_id=1, the SQL query statement that server generates are select data_id from`user`where
User_id=1;Server executes the user table in SQL query statement reading index data base, returns the result as USER_1;Clothes
Be engaged in device using key value USER_1 read block chain distributed data base, obtain inquiry data for ' userId ': 1,
' userName ': ' Tom ', point:100 } and, server parsing inquiry data obtain point=100 and return to using journey
Sequence.It should be noted that wherein, when the data volume of query result is 0, indicating that query result is sky.Server is from block chain
Query result is obtained in distributed data base, it is ensured that the accuracy of data.
Further, the SQL statement of the complexity such as multilist conjunctive query, grouping and sequence is requested, the basic think of of processing
Road is all first to parse target SQL statement, analyzes logic executive plan, then rewrites SQL statement in logic executive plan, obtain
Third index mark data_id is taken, basic data is read from block chain distributed data base according to data_id, it is finally right again
Data are polymerize and are calculated, and final query result is obtained.
Optionally, server sends first message to message queue, obtains Transaction Identifier;Server is according to Transaction Identifier pair
Index data base carries out write operation, is written result;Server judges to be written whether result is to be written successfully;If write-in knot
Fruit is to be written successfully, then server carries out write operation to block chain distributed data base by message queue;If result is written
For write-in failure, then server carries out delete operation to index data base by message queue.Specifically, server is all first will
Index data base is written in data, writes data into block chain distributed data base again according to index mark, server uses distribution
The transaction message function that formula message-oriented middleware RocketMQ is provided allows and writes index data and send distributed message to RocketMQ
Inside a things, guarantees write-in data and send message success simultaneously or fail simultaneously.Block chain point is written in server
Cloth database by detection RocketMQ message complete, increase write-in log sheet guarantee idempotence, realize index data base and
The final consistency of block chain distributed data base.
It is compatible in block chain distributed data using SQL statement by the processing to SQL statement in the embodiment of the present invention
The inquiry and storage in library and relevant database are closed by establishing index data base and the corresponding of block chain distributed data base
The recall precision of block chain business information improves in system, encapsulates to block chain physical layer interface, uses SQL statement and index data base
It realizes the storage of data cochain and inquiry, reduces exploitation threshold, improve development efficiency.
Block chain data storage and query method in the embodiment of the present invention is described above, below to of the invention real
It applies block chain data storage and query device in example to be described, referring to Fig. 3, block chain data store in the embodiment of the present invention
Include: with inquiry unit one embodiment
First generation unit 301, for generating index data base;
Acquiring unit 302, for obtaining target structural query language SQL statement, target SQL statement is to meet SQL language
The legal sentence of method rule;
Resolution unit 303 obtains abstract syntax tree for parsing according to Predistribution Algorithm to target SQL statement;
Second generation unit 304, for generating logic executive plan according to abstract syntax tree, logic executive plan includes inserting
Enter data plan, modification data plan and inquiry data plan;
Read-write cell 305 carries out block chain distributed data base for generating plan and index data base according to logic
Read-write operation is read and write as a result, the block chain distributed data base is for storing and inquiring data.
It is compatible in block chain distributed data using SQL statement by the processing to SQL statement in the embodiment of the present invention
The inquiry and storage in library and relevant database are closed by establishing index data base and the corresponding of block chain distributed data base
The recall precision of block chain business information improves in system, encapsulates to block chain physical layer interface, uses SQL statement and index data base
It realizes the storage of data cochain and inquiry, reduces exploitation threshold, improve development efficiency.
Referring to Fig. 4, another embodiment of block chain data storage and query device includes: in the embodiment of the present invention
First generation unit 301, for generating index data base;
Acquiring unit 302, for obtaining target structural query language SQL statement, target SQL statement is to meet SQL language
The legal sentence of method rule;
Resolution unit 303 obtains abstract syntax tree for parsing according to Predistribution Algorithm to target SQL statement;
Second generation unit 304, for generating logic executive plan according to abstract syntax tree, logic executive plan includes inserting
Enter data plan, modification data plan and inquiry data plan;
Read-write cell 305 carries out block chain distributed data base for generating plan and index data base according to logic
Read-write operation is read and write as a result, the block chain distributed data base is for storing and inquiring data.
Optionally, the second generation unit 304 can also be specifically used for:
By visitor ergodic abstract syntax tree, the element of target SQL statement is obtained;
According to the Element generation logic executive plan of target SQL statement, the logic executive plan include insertion data plan,
Modify data plan and inquiry data plan.
Optionally, read-write cell 305 can further comprise:
Judgment sub-unit 3051, for decision logic executive plan whether be insertion data plan, modification data plan or
Person inquires data plan;
It is inserted into subelement 3052, if logic executive plan is insertion data plan, for index data base and block
Chain distributed data base carries out insertion operation, obtains read-write result;
Subelement 3053 is modified, if logic executive plan is modification data plan, for index data base and block
Chain distributed data base is modified operation, and read-write result is obtained;
Subelement 3054 is inquired, if logic executive plan is inquiry data plan, is used for index data base and block chain
Distributed data base carries out inquiry operation, obtains read-write result.
Optionally, insertion subelement 3052 can also be specifically used for:
Generate the first index mark;
It generates SQL according to insertion data plan and the first index mark and is inserted into sentence;
Insertion operation is carried out according to SQL parenthesis sentence pair index data base, obtains the Major key of index data base return;
According to Major key search index database, the insertion data of index data base return are obtained;
Insertion operation is carried out to block chain distributed data base according to the first index mark and insertion data, obtains insertion knot
Insertion result is set read-write result by fruit.
Optionally, modification subelement 3053 can also be specifically used for:
SQL, which is generated, according to modification data plan modifies sentence;
Sentence is modified according to SQL and updates index data base, obtains the second index mark;
According to the second index mark inquiry block chain distributed data base, block chain primary data is obtained;
It modifies to block chain primary data, obtains block chain target data;
According to second index mark by block chain target data be written block chain distributed data base, modified as a result,
Read-write result is set by modification result.
Optionally, inquiry subelement 3054 can also be specifically used for:
SQL query statement is generated according to inquiry data plan;
According to SQL query statement search index database, third index mark is obtained;
Mark is indexed according to third and reads block chain distributed data base, is obtained query result, is set query result to
Read and write result.
Optionally, block chain data storage and query device further include:
Transmission unit 306 obtains Transaction Identifier for sending first message to message queue;
First writing unit 307 is written knot for carrying out write operation to index data base according to Transaction Identifier
Fruit;
Judging unit 308 is written whether result is to be written successfully for judging;
Second writing unit 309, if write-in result is to be written successfully, for distributed to block chain by message queue
Database carries out write operation;
Unit 310 is deleted, if write-in result is write-in failure, for deleting by message queue to index data base
Except operation.
It is compatible in block chain distributed data using SQL statement by the processing to SQL statement in the embodiment of the present invention
The inquiry and storage in library and relevant database are closed by establishing index data base and the corresponding of block chain distributed data base
The recall precision of block chain business information improves in system, encapsulates to block chain physical layer interface, uses SQL statement and index data base
It realizes the storage of data cochain and inquiry, reduces exploitation threshold, improve development efficiency.
Above figure 3 and Fig. 4 from the angle of modular functionality entity in the embodiment of the present invention the storage of block chain data and
Inquiry unit is described in detail, below from the angle of hardware handles to block chain data storage and query in the embodiment of the present invention
Equipment is described in detail.
Fig. 5 is a kind of structural schematic diagram of block chain data storage and query equipment provided in an embodiment of the present invention, the area
Block chain data storage and query equipment 500 can generate bigger difference because configuration or performance are different, may include one or
More than one processor (central processing units, CPU) 501 (for example, one or more processors) and
Storage medium 508 (such as one or one of memory 509, one or more storage application programs 509 or data 509
The above mass memory unit).Wherein, memory 509 and storage medium 508 can be of short duration storage or persistent storage.It is stored in
The program of storage medium 508 may include one or more modules (diagram does not mark), and each module may include to area
Series of instructions operation in block chain data storage and query.Further, processor 501 can be set to and storage medium
508 communications execute the series of instructions operation in storage medium 508 in block chain data storage and query equipment 500.
Block chain data storage and query equipment 500 can also include one or more power supplys 502, one or one
The above wired or wireless network interface 503, one or more input/output interfaces 504, and/or, one or more
Operating system 505, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD etc..Those skilled in the art
It is appreciated that the block chain data storage and query device structure shown in Fig. 5 is not constituted to block chain data storage and query
The restriction of equipment may include perhaps combining certain components or different component cloth than illustrating more or fewer components
It sets.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided by the present invention, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components
It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit
It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention
Portion or part steps.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (read-only memory,
ROM), random access memory (random access memory, RAM), magnetic or disk etc. are various can store program
The medium of code.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although referring to before
Stating embodiment, invention is explained in detail, those skilled in the art should understand that: it still can be to preceding
Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these
It modifies or replaces, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.
Claims (10)
1. a kind of block chain data storage and query method characterized by comprising
Generate index data base;
Target structural query language SQL statement is obtained, the target SQL statement is the legal sentence for meeting SQL syntax rule;
The target SQL statement is parsed according to Predistribution Algorithm, obtains abstract syntax tree;
Logic executive plan is generated according to the abstract syntax tree, the logic executive plan includes insertion data plan, modification
Data plan and inquiry data plan;
Block chain distributed data base is written and read according to the logic generation plan and the index data base, is obtained
Read-write is as a result, the block chain distributed data base is used to storing and inquiring data.
2. block chain data storage and query method according to claim 1, which is characterized in that described according to described abstract
Syntax tree generates logic executive plan, and the logic executive plan includes insertion data plan, modification data plan and inquiry number
Include: according to plan
The abstract syntax tree is traversed by visitor, obtains the element of the target SQL statement;
According to the Element generation logic executive plan of the target SQL statement, the logic executive plan includes insertion data meter
It draws, modify data plan and inquiry data plan.
3. block chain data storage and query method according to claim 2, which is characterized in that described according to the logic
Generation plan and the index data base are written and read block chain distributed data base, are read and write as a result, the area
Block chain distributed data base is used to storing and inquiring data
Judge whether the logic executive plan is the insertion data plan, the modification data plan or the inquiry number
According to plan;
It is distributed to the index data base and the block chain if the logic executive plan is the insertion data plan
Database carries out insertion operation, obtains the read-write result;
It is distributed to the index data base and the block chain if the logic executive plan is the modification data plan
Database is modified operation, and the read-write result is obtained;
It is distributed to the index data base and the block chain if the logic executive plan is the inquiry data plan
Database carries out inquiry operation, obtains the read-write result.
4. block chain data storage and query method according to claim 3, which is characterized in that if the logic is held
Row plan is the insertion data plan, then carries out insertion behaviour to the index data base and the block chain distributed data base
Make, obtaining the read-write result includes:
Generate the first index mark;
It generates SQL according to the insertion data plan and the first index mark and is inserted into sentence;
Insertion operation is carried out according to index data base described in the SQL parenthesis sentence pair, obtains what the index data base returned
Major key;
The index data base is inquired according to the Major key, obtains the insertion data that the index data base returns;
Insertion operation is carried out to block chain distributed data base according to the first index mark and the insertion data, is inserted
Enter as a result, setting the read-write result for the insertion result.
5. block chain data storage and query method according to claim 3, which is characterized in that if the logic is held
Row plan is the modification data plan, then modifies behaviour to the index data base and the block chain distributed data base
Make, obtaining the read-write result includes:
SQL, which is generated, according to the modification data plan modifies sentence;
Sentence is modified according to the SQL and updates the index data base, obtains the second index mark;
The block chain distributed data base is inquired according to the second index mark, obtains block chain primary data;
It modifies to the block chain primary data, obtains block chain target data;
The block chain distributed data base is written into the block chain target data according to the second index mark, is repaired
Change as a result, setting the read-write result for the modification result.
6. block chain data storage and query method according to claim 3, which is characterized in that if the logic is held
Row plan is the inquiry data plan, then carries out inquiry behaviour to the index data base and the block chain distributed data base
Make, obtaining the operating result includes:
SQL query statement is generated according to the inquiry data plan;
The index data base is inquired according to the SQL query statement, obtains third index mark;
Mark is indexed according to the third and reads the block chain distributed data base, obtains query result, and the inquiry is tied
Fruit is set as the read-write result.
7. block chain data storage and query method according to any one of claims 1 to 6, which is characterized in that the side
Method further include:
First message is sent to message queue, obtains Transaction Identifier;
Write operation is carried out to the index data base according to the Transaction Identifier, is written result;
Judge whether said write result is to be written successfully;
If said write result is to be written successfully, the block chain distributed data base is write by the message queue
Enter operation;
If said write result is write-in failure, delete operation is carried out to the index data base by the message queue.
8. a kind of block chain data storage and query device, which is characterized in that the block chain data storage and query device packet
It includes:
First generation unit, for generating index data base;
Acquiring unit, for obtaining target structural query language SQL statement, the target SQL statement is to meet SQL syntax rule
Legal sentence then;
Resolution unit obtains abstract syntax tree for parsing according to Predistribution Algorithm to the target SQL statement;
Second generation unit, for generating logic executive plan according to the abstract syntax tree, the logic executive plan includes
It is inserted into data plan, modification data plan and inquiry data plan;
Read-write cell carries out block chain distributed data base for generating plan and the index data base according to the logic
Read-write operation is read and write as a result, the block chain distributed data base is for storing and inquiring data.
9. a kind of block chain data storage and query equipment, which is characterized in that the block chain data storage and query equipment packet
Include: memory and at least one processor are stored with instruction in the memory, the memory and logarithm at least one handle
Device is interconnected by route;
At least one described processor calls the described instruction in the memory, so that the block chain data are stored and looked into
Ask method of the equipment execution as described in any one of claim 1-7.
10. a kind of computer readable storage medium, is stored thereon with computer program, it is characterised in that: the computer program
It is realized when being executed by processor such as the step of any one of claim 1-7 the method.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910427137.8A CN110309196A (en) | 2019-05-22 | 2019-05-22 | Block chain data storage and query method, apparatus, equipment and storage medium |
PCT/CN2020/087585 WO2020233367A1 (en) | 2019-05-22 | 2020-04-28 | Blockchain data storage and query method, apparatus and device, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910427137.8A CN110309196A (en) | 2019-05-22 | 2019-05-22 | Block chain data storage and query method, apparatus, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110309196A true CN110309196A (en) | 2019-10-08 |
Family
ID=68074933
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910427137.8A Pending CN110309196A (en) | 2019-05-22 | 2019-05-22 | Block chain data storage and query method, apparatus, equipment and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110309196A (en) |
WO (1) | WO2020233367A1 (en) |
Cited By (46)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111046066A (en) * | 2019-12-09 | 2020-04-21 | 上海达梦数据库有限公司 | Method, device and equipment for optimizing remote database object and storage medium |
CN111177182A (en) * | 2019-12-19 | 2020-05-19 | 达闼科技成都有限公司 | Data query method and device, storage medium and electronic equipment |
CN111309765A (en) * | 2020-01-22 | 2020-06-19 | 北京飞漫软件技术有限公司 | Method and device for directly querying structured data |
CN111310137A (en) * | 2020-03-23 | 2020-06-19 | 杭州溪塔科技有限公司 | Block chain associated data evidence storing method and device and electronic equipment |
CN111400297A (en) * | 2020-03-19 | 2020-07-10 | 上海德拓信息技术股份有限公司 | Mass data quality verification method based on Hadoop |
CN111414438A (en) * | 2020-03-13 | 2020-07-14 | 上海银赛计算机科技有限公司 | Real-time rule matching method and system based on mysql |
CN111651296A (en) * | 2020-04-30 | 2020-09-11 | 中国平安财产保险股份有限公司 | Intercept backup method, device, device and storage medium for data deletion operation |
CN111680067A (en) * | 2020-05-28 | 2020-09-18 | 中国工商银行股份有限公司 | Data processing method, device and system based on block chain |
CN111767301A (en) * | 2020-06-24 | 2020-10-13 | 江苏荣泽信息科技股份有限公司 | Relational database solution based on block chain |
CN111782671A (en) * | 2020-07-01 | 2020-10-16 | 浪潮云信息技术股份公司 | Optimization method for realizing CDC (performance control) based on distributed database |
CN111897891A (en) * | 2020-06-19 | 2020-11-06 | 阿里云计算有限公司 | Data processing method and device |
WO2020233367A1 (en) * | 2019-05-22 | 2020-11-26 | 深圳壹账通智能科技有限公司 | Blockchain data storage and query method, apparatus and device, and storage medium |
CN112052255A (en) * | 2020-09-02 | 2020-12-08 | 福建天晴在线互动科技有限公司 | SQL (structured query language) interpretation method and device for splitting multi-table slow query from top to bottom |
CN112069201A (en) * | 2020-09-04 | 2020-12-11 | 北京百度网讯科技有限公司 | Target data acquisition method and device |
CN112487027A (en) * | 2020-12-02 | 2021-03-12 | 济南浪潮高新科技投资发展有限公司 | Efficient data query implementation method based on block chain electronic transaction |
CN112506946A (en) * | 2020-12-03 | 2021-03-16 | 平安科技(深圳)有限公司 | Service data query method, device, equipment and storage medium |
CN112579610A (en) * | 2020-12-23 | 2021-03-30 | 安徽航天信息有限公司 | Multi-data source structure analysis method, system, terminal device and storage medium |
CN112667489A (en) * | 2020-12-28 | 2021-04-16 | 杭州趣链科技有限公司 | Method and device for measuring data query workload in block chain and terminal |
CN112711592A (en) * | 2020-12-31 | 2021-04-27 | 中国科学院计算技术研究所数字经济产业研究院 | Data indexing method based on block chain |
CN112765156A (en) * | 2020-12-29 | 2021-05-07 | 中国人寿保险股份有限公司上海数据中心 | Data modification method, system and storage medium based on data modification rule |
CN112817990A (en) * | 2021-01-28 | 2021-05-18 | 北京百度网讯科技有限公司 | Data processing method and device, electronic equipment and readable storage medium |
CN113139019A (en) * | 2021-06-18 | 2021-07-20 | 智己汽车科技有限公司 | Method and device for recording mileage data of vehicle on block chain |
CN113204571A (en) * | 2021-04-23 | 2021-08-03 | 新华三大数据技术有限公司 | SQL execution method and device related to write-in operation and storage medium |
CN113297306A (en) * | 2020-09-30 | 2021-08-24 | 阿里云计算有限公司 | Data processing method and device |
CN113434503A (en) * | 2021-06-25 | 2021-09-24 | 上海佩俪信息科技有限公司 | Block chain browsing method and system |
CN113535777A (en) * | 2021-06-24 | 2021-10-22 | 上海浦东发展银行股份有限公司 | Database query method, device and system |
CN113626423A (en) * | 2021-06-29 | 2021-11-09 | 欧电云信息科技(江苏)有限公司 | Log management method, device and system of service database |
CN113687827A (en) * | 2021-08-24 | 2021-11-23 | 平安国际智慧城市科技股份有限公司 | Data list generation method, device and equipment based on widget and storage medium |
CN113792040A (en) * | 2021-08-02 | 2021-12-14 | 浪潮软件股份有限公司 | Method for randomly drawing and matching supervision object library and law enforcement personnel library |
CN113868711A (en) * | 2021-09-02 | 2021-12-31 | 广州广电运通金融电子股份有限公司 | Data federation storage method, data federation query method and data federation query system |
CN113935851A (en) * | 2021-10-22 | 2022-01-14 | 中国平安人寿保险股份有限公司 | Contract settlement method, device, equipment and storage medium |
CN113946588A (en) * | 2020-07-17 | 2022-01-18 | 深圳云天励飞技术有限公司 | Database updating method and device |
CN114238469A (en) * | 2021-12-07 | 2022-03-25 | 杭州天均数聚科技有限公司 | Data extraction interface opening method and device, computer equipment and storage medium |
CN114328598A (en) * | 2021-11-29 | 2022-04-12 | 浪潮云信息技术股份公司 | Cache optimization method and system for pipeline based on ClickHouse database |
CN114490707A (en) * | 2021-12-21 | 2022-05-13 | 杭州趣链科技有限公司 | Method and device for testing block chain execution structured query statement and related equipment |
CN114510537A (en) * | 2022-02-16 | 2022-05-17 | 蚂蚁财富(上海)金融信息服务有限公司 | Data storage and query method and data storage system |
WO2022140936A1 (en) * | 2020-12-28 | 2022-07-07 | 杭州趣链科技有限公司 | Metering method and device for data query workload in blockchain, and terminal |
CN114880351A (en) * | 2022-05-31 | 2022-08-09 | 中国电信股份有限公司 | Slow query statement identification method and device, storage medium and electronic equipment |
CN115168338A (en) * | 2022-06-02 | 2022-10-11 | 阿里云计算有限公司 | Data processing method, electronic device and storage medium |
CN115329395A (en) * | 2022-08-09 | 2022-11-11 | 数字广东网络建设有限公司 | Data processing method, device, system, device and storage medium for database |
CN115421698A (en) * | 2022-08-30 | 2022-12-02 | 敏于行(北京)科技有限公司 | Data processing method and device based on declarative and distributed accounts book and electronic device |
CN115964385A (en) * | 2021-10-13 | 2023-04-14 | 远光软件股份有限公司 | Data query method based on general data access framework |
CN116089476A (en) * | 2023-04-07 | 2023-05-09 | 北京宝兰德软件股份有限公司 | Data query method and device and electronic equipment |
CN116975126A (en) * | 2023-09-25 | 2023-10-31 | 恒生电子股份有限公司 | Data query method, device, computing equipment and computer readable storage medium |
CN118410032A (en) * | 2024-07-02 | 2024-07-30 | 天津南大通用数据技术股份有限公司 | A distributed database generation method, device, terminal and storage medium |
CN118897866A (en) * | 2024-10-09 | 2024-11-05 | 恒辉信达技术有限公司 | A data query method and related device based on relational cluster database |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112527794B (en) * | 2020-12-07 | 2023-05-26 | 广州海量数据库技术有限公司 | Data processing method and system for realizing aggregate data types in database |
CN113312373A (en) * | 2021-05-12 | 2021-08-27 | 上海哲锦信息科技有限公司 | Method and equipment for analyzing data structured query statement |
CN113688148B (en) * | 2021-07-13 | 2024-10-11 | 交控科技股份有限公司 | Urban rail data query method and device, electronic equipment and readable storage medium |
CN113672781A (en) * | 2021-08-20 | 2021-11-19 | 平安国际智慧城市科技股份有限公司 | Data query method, device, electronic device and storage medium |
CN114048139A (en) * | 2021-11-18 | 2022-02-15 | 天翼数字生活科技有限公司 | SQL statement auditing method and device, electronic equipment and storage medium |
CN114138899B (en) * | 2021-11-22 | 2024-07-16 | 支付宝(杭州)信息技术有限公司 | Data streaming method and device based on block chain |
CN116204524A (en) * | 2021-11-30 | 2023-06-02 | 核动力运行研究所 | Nuclear power multi-field data query display implementation method based on elastic search |
CN114936217A (en) * | 2022-02-28 | 2022-08-23 | 河南甘棠软件科技有限公司 | Time query conversion processing method and device based on snowflake algorithm |
CN114840529A (en) * | 2022-05-20 | 2022-08-02 | 中国工商银行股份有限公司 | Database statement checking method, system and device and electronic equipment |
CN117055895B (en) * | 2023-08-07 | 2024-03-29 | 北京东方金信科技股份有限公司 | Method, system and readable medium for converting SQL sentence into HTTP interface |
CN119046176B (en) * | 2024-11-04 | 2025-02-11 | 杭州新中大企业管理技术有限公司 | Database adaptation debugging method, device, equipment and storage medium |
CN119474154A (en) * | 2025-01-10 | 2025-02-18 | 天津南大通用数据技术股份有限公司 | A query result set caching method for database |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105302842A (en) * | 2014-07-31 | 2016-02-03 | 北大方正集团有限公司 | Data processing method and device |
WO2016078423A1 (en) * | 2014-11-17 | 2016-05-26 | 中兴通讯股份有限公司 | Transaction processing method and apparatus for distributed database system |
US20170228371A1 (en) * | 2016-02-05 | 2017-08-10 | Manifold Technology, Inc. | Blockchain-enhanced database |
CN108563694A (en) * | 2018-03-19 | 2018-09-21 | 广州视源电子科技股份有限公司 | Method, apparatus, computer device and storage medium for performing SQ L for logical deletion |
CN108647361A (en) * | 2018-05-21 | 2018-10-12 | 中国工商银行股份有限公司 | A kind of date storage method, apparatus and system based on block chain |
CN109492053A (en) * | 2018-11-08 | 2019-03-19 | 北京百度网讯科技有限公司 | Method and apparatus for accessing data |
CN109522008A (en) * | 2018-11-06 | 2019-03-26 | 陕西医链区块链集团有限公司 | A kind of block chain intelligence contract construction method |
CN109559231A (en) * | 2018-12-29 | 2019-04-02 | 华东师范大学 | A kind of retrospect querying method towards block chain |
CN109741192A (en) * | 2018-11-15 | 2019-05-10 | 深圳壹账通智能科技有限公司 | Date storage method, device, equipment and readable storage medium storing program for executing based on block chain |
CN109784918A (en) * | 2018-12-15 | 2019-05-21 | 深圳壹账通智能科技有限公司 | Information measure of supervision, device, equipment and storage medium based on block chain |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6325780B1 (en) * | 1999-09-13 | 2001-12-04 | Advanced Cardiovascular Systems, Inc. | Inflatable member formed of liquid crystal polymeric material blend |
CN109241104B (en) * | 2018-10-12 | 2021-11-02 | 北京聚云位智信息科技有限公司 | AISQL resolver in decision-making distributed database system and implementation method thereof |
CN110309196A (en) * | 2019-05-22 | 2019-10-08 | 深圳壹账通智能科技有限公司 | Block chain data storage and query method, apparatus, equipment and storage medium |
-
2019
- 2019-05-22 CN CN201910427137.8A patent/CN110309196A/en active Pending
-
2020
- 2020-04-28 WO PCT/CN2020/087585 patent/WO2020233367A1/en active Application Filing
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105302842A (en) * | 2014-07-31 | 2016-02-03 | 北大方正集团有限公司 | Data processing method and device |
WO2016078423A1 (en) * | 2014-11-17 | 2016-05-26 | 中兴通讯股份有限公司 | Transaction processing method and apparatus for distributed database system |
US20170228371A1 (en) * | 2016-02-05 | 2017-08-10 | Manifold Technology, Inc. | Blockchain-enhanced database |
CN108563694A (en) * | 2018-03-19 | 2018-09-21 | 广州视源电子科技股份有限公司 | Method, apparatus, computer device and storage medium for performing SQ L for logical deletion |
CN108647361A (en) * | 2018-05-21 | 2018-10-12 | 中国工商银行股份有限公司 | A kind of date storage method, apparatus and system based on block chain |
CN109522008A (en) * | 2018-11-06 | 2019-03-26 | 陕西医链区块链集团有限公司 | A kind of block chain intelligence contract construction method |
CN109492053A (en) * | 2018-11-08 | 2019-03-19 | 北京百度网讯科技有限公司 | Method and apparatus for accessing data |
CN109741192A (en) * | 2018-11-15 | 2019-05-10 | 深圳壹账通智能科技有限公司 | Date storage method, device, equipment and readable storage medium storing program for executing based on block chain |
CN109784918A (en) * | 2018-12-15 | 2019-05-21 | 深圳壹账通智能科技有限公司 | Information measure of supervision, device, equipment and storage medium based on block chain |
CN109559231A (en) * | 2018-12-29 | 2019-04-02 | 华东师范大学 | A kind of retrospect querying method towards block chain |
Cited By (68)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020233367A1 (en) * | 2019-05-22 | 2020-11-26 | 深圳壹账通智能科技有限公司 | Blockchain data storage and query method, apparatus and device, and storage medium |
CN111046066B (en) * | 2019-12-09 | 2023-05-12 | 上海达梦数据库有限公司 | Remote database object optimization method, device, equipment and storage medium |
CN111046066A (en) * | 2019-12-09 | 2020-04-21 | 上海达梦数据库有限公司 | Method, device and equipment for optimizing remote database object and storage medium |
CN111177182A (en) * | 2019-12-19 | 2020-05-19 | 达闼科技成都有限公司 | Data query method and device, storage medium and electronic equipment |
CN111309765A (en) * | 2020-01-22 | 2020-06-19 | 北京飞漫软件技术有限公司 | Method and device for directly querying structured data |
CN111414438A (en) * | 2020-03-13 | 2020-07-14 | 上海银赛计算机科技有限公司 | Real-time rule matching method and system based on mysql |
CN111414438B (en) * | 2020-03-13 | 2023-06-02 | 上海银赛计算机科技有限公司 | Real-time rule matching method and system based on mysql |
CN111400297A (en) * | 2020-03-19 | 2020-07-10 | 上海德拓信息技术股份有限公司 | Mass data quality verification method based on Hadoop |
CN111400297B (en) * | 2020-03-19 | 2023-11-03 | 上海德拓信息技术股份有限公司 | Hadoop-based mass data quality verification method |
CN111310137A (en) * | 2020-03-23 | 2020-06-19 | 杭州溪塔科技有限公司 | Block chain associated data evidence storing method and device and electronic equipment |
CN111651296A (en) * | 2020-04-30 | 2020-09-11 | 中国平安财产保险股份有限公司 | Intercept backup method, device, device and storage medium for data deletion operation |
CN111680067A (en) * | 2020-05-28 | 2020-09-18 | 中国工商银行股份有限公司 | Data processing method, device and system based on block chain |
CN111897891A (en) * | 2020-06-19 | 2020-11-06 | 阿里云计算有限公司 | Data processing method and device |
CN111897891B (en) * | 2020-06-19 | 2023-06-13 | 阿里云计算有限公司 | Data processing method and device |
US12292885B2 (en) | 2020-06-19 | 2025-05-06 | Alibaba Cloud Computing Co. Ltd. | Data processing method and data processing apparatus |
CN111767301A (en) * | 2020-06-24 | 2020-10-13 | 江苏荣泽信息科技股份有限公司 | Relational database solution based on block chain |
CN111767301B (en) * | 2020-06-24 | 2022-07-15 | 江苏荣泽信息科技股份有限公司 | Relational database solution method based on block chain |
CN111782671A (en) * | 2020-07-01 | 2020-10-16 | 浪潮云信息技术股份公司 | Optimization method for realizing CDC (performance control) based on distributed database |
CN111782671B (en) * | 2020-07-01 | 2024-10-18 | 浪潮云信息技术股份公司 | Optimization method for realizing CDC (CDC) based on distributed database |
CN113946588A (en) * | 2020-07-17 | 2022-01-18 | 深圳云天励飞技术有限公司 | Database updating method and device |
CN112052255B (en) * | 2020-09-02 | 2022-05-03 | 福建天晴在线互动科技有限公司 | SQL (structured query language) interpretation method and device for splitting multi-table slow query from top to bottom |
CN112052255A (en) * | 2020-09-02 | 2020-12-08 | 福建天晴在线互动科技有限公司 | SQL (structured query language) interpretation method and device for splitting multi-table slow query from top to bottom |
CN112069201A (en) * | 2020-09-04 | 2020-12-11 | 北京百度网讯科技有限公司 | Target data acquisition method and device |
CN113297306A (en) * | 2020-09-30 | 2021-08-24 | 阿里云计算有限公司 | Data processing method and device |
CN112487027B (en) * | 2020-12-02 | 2022-08-23 | 山东浪潮科学研究院有限公司 | Efficient data query implementation method based on block chain electronic transaction |
CN112487027A (en) * | 2020-12-02 | 2021-03-12 | 济南浪潮高新科技投资发展有限公司 | Efficient data query implementation method based on block chain electronic transaction |
CN112506946B (en) * | 2020-12-03 | 2024-04-05 | 平安科技(深圳)有限公司 | Service data query method, device, equipment and storage medium |
CN112506946A (en) * | 2020-12-03 | 2021-03-16 | 平安科技(深圳)有限公司 | Service data query method, device, equipment and storage medium |
CN112579610A (en) * | 2020-12-23 | 2021-03-30 | 安徽航天信息有限公司 | Multi-data source structure analysis method, system, terminal device and storage medium |
CN112667489A (en) * | 2020-12-28 | 2021-04-16 | 杭州趣链科技有限公司 | Method and device for measuring data query workload in block chain and terminal |
WO2022140936A1 (en) * | 2020-12-28 | 2022-07-07 | 杭州趣链科技有限公司 | Metering method and device for data query workload in blockchain, and terminal |
CN112765156A (en) * | 2020-12-29 | 2021-05-07 | 中国人寿保险股份有限公司上海数据中心 | Data modification method, system and storage medium based on data modification rule |
CN112711592A (en) * | 2020-12-31 | 2021-04-27 | 中国科学院计算技术研究所数字经济产业研究院 | Data indexing method based on block chain |
CN112711592B (en) * | 2020-12-31 | 2022-06-28 | 中国科学院计算技术研究所数字经济产业研究院 | Data indexing method based on block chain |
CN112817990B (en) * | 2021-01-28 | 2024-03-08 | 北京百度网讯科技有限公司 | Data processing method, device, electronic equipment and readable storage medium |
CN112817990A (en) * | 2021-01-28 | 2021-05-18 | 北京百度网讯科技有限公司 | Data processing method and device, electronic equipment and readable storage medium |
CN113204571A (en) * | 2021-04-23 | 2021-08-03 | 新华三大数据技术有限公司 | SQL execution method and device related to write-in operation and storage medium |
CN113204571B (en) * | 2021-04-23 | 2022-08-30 | 新华三大数据技术有限公司 | SQL execution method and device related to write-in operation and storage medium |
CN113139019A (en) * | 2021-06-18 | 2021-07-20 | 智己汽车科技有限公司 | Method and device for recording mileage data of vehicle on block chain |
CN113535777B (en) * | 2021-06-24 | 2023-05-23 | 上海浦东发展银行股份有限公司 | Database query method, device and system |
CN113535777A (en) * | 2021-06-24 | 2021-10-22 | 上海浦东发展银行股份有限公司 | Database query method, device and system |
CN113434503A (en) * | 2021-06-25 | 2021-09-24 | 上海佩俪信息科技有限公司 | Block chain browsing method and system |
CN113626423B (en) * | 2021-06-29 | 2024-01-30 | 欧电云信息科技(江苏)有限公司 | Log management method, device and system of business database |
CN113626423A (en) * | 2021-06-29 | 2021-11-09 | 欧电云信息科技(江苏)有限公司 | Log management method, device and system of service database |
CN113792040A (en) * | 2021-08-02 | 2021-12-14 | 浪潮软件股份有限公司 | Method for randomly drawing and matching supervision object library and law enforcement personnel library |
CN113687827B (en) * | 2021-08-24 | 2024-03-12 | 平安国际智慧城市科技股份有限公司 | Data list generation method, device and equipment based on widget and storage medium |
CN113687827A (en) * | 2021-08-24 | 2021-11-23 | 平安国际智慧城市科技股份有限公司 | Data list generation method, device and equipment based on widget and storage medium |
CN113868711A (en) * | 2021-09-02 | 2021-12-31 | 广州广电运通金融电子股份有限公司 | Data federation storage method, data federation query method and data federation query system |
CN115964385A (en) * | 2021-10-13 | 2023-04-14 | 远光软件股份有限公司 | Data query method based on general data access framework |
CN113935851A (en) * | 2021-10-22 | 2022-01-14 | 中国平安人寿保险股份有限公司 | Contract settlement method, device, equipment and storage medium |
CN114328598B (en) * | 2021-11-29 | 2024-06-11 | 上海沄熹科技有限公司 | Cache optimization method and system for pipeline based on ClickHouse database |
CN114328598A (en) * | 2021-11-29 | 2022-04-12 | 浪潮云信息技术股份公司 | Cache optimization method and system for pipeline based on ClickHouse database |
CN114238469B (en) * | 2021-12-07 | 2022-07-12 | 杭州天均数聚科技有限公司 | Data extraction interface opening method and device, computer equipment and storage medium |
CN114238469A (en) * | 2021-12-07 | 2022-03-25 | 杭州天均数聚科技有限公司 | Data extraction interface opening method and device, computer equipment and storage medium |
CN114490707A (en) * | 2021-12-21 | 2022-05-13 | 杭州趣链科技有限公司 | Method and device for testing block chain execution structured query statement and related equipment |
CN114510537A (en) * | 2022-02-16 | 2022-05-17 | 蚂蚁财富(上海)金融信息服务有限公司 | Data storage and query method and data storage system |
CN114880351B (en) * | 2022-05-31 | 2024-02-06 | 中国电信股份有限公司 | Recognition method and device of slow query statement, storage medium and electronic equipment |
CN114880351A (en) * | 2022-05-31 | 2022-08-09 | 中国电信股份有限公司 | Slow query statement identification method and device, storage medium and electronic equipment |
CN115168338A (en) * | 2022-06-02 | 2022-10-11 | 阿里云计算有限公司 | Data processing method, electronic device and storage medium |
CN115329395A (en) * | 2022-08-09 | 2022-11-11 | 数字广东网络建设有限公司 | Data processing method, device, system, device and storage medium for database |
CN115421698A (en) * | 2022-08-30 | 2022-12-02 | 敏于行(北京)科技有限公司 | Data processing method and device based on declarative and distributed accounts book and electronic device |
CN116089476A (en) * | 2023-04-07 | 2023-05-09 | 北京宝兰德软件股份有限公司 | Data query method and device and electronic equipment |
CN116975126B (en) * | 2023-09-25 | 2023-12-19 | 恒生电子股份有限公司 | Data query method, device, computing equipment and computer readable storage medium |
CN116975126A (en) * | 2023-09-25 | 2023-10-31 | 恒生电子股份有限公司 | Data query method, device, computing equipment and computer readable storage medium |
CN118410032A (en) * | 2024-07-02 | 2024-07-30 | 天津南大通用数据技术股份有限公司 | A distributed database generation method, device, terminal and storage medium |
CN118410032B (en) * | 2024-07-02 | 2024-09-24 | 天津南大通用数据技术股份有限公司 | A distributed database generation method, device, terminal and storage medium |
CN118897866A (en) * | 2024-10-09 | 2024-11-05 | 恒辉信达技术有限公司 | A data query method and related device based on relational cluster database |
CN118897866B (en) * | 2024-10-09 | 2025-02-11 | 恒辉信达技术有限公司 | Data query method and related device based on relational cluster database |
Also Published As
Publication number | Publication date |
---|---|
WO2020233367A1 (en) | 2020-11-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110309196A (en) | Block chain data storage and query method, apparatus, equipment and storage medium | |
US5632031A (en) | Method and means for encoding storing and retrieving hierarchical data processing information for a computer system | |
CN110688397B (en) | SQL-based distributed data unified access system and method | |
US9870382B2 (en) | Data encoding and corresponding data structure | |
US5721895A (en) | Computer program product and program storage device for a data transmission dictionary for encoding, storing, and retrieving hierarchical data processing information for a computer system | |
CN110866029B (en) | sql statement construction method, device, server and readable storage medium | |
US11693912B2 (en) | Adapting database queries for data virtualization over combined database stores | |
US20060235838A1 (en) | System and method for managing complex relationships over distributed heterogeneous data sources | |
CN111324577B (en) | Yml file reading and writing method and device | |
CN113312392A (en) | Lightweight rule engine processing method and device | |
CN109508355A (en) | A kind of data pick-up method, system and terminal device | |
CN112970011B (en) | Pedigree in record query optimization | |
CN110673839B (en) | Distributed tool configuration construction generation method and system | |
WO2007136959A2 (en) | Apparatus and method for recursively rationalizing data source queries | |
CN114491172B (en) | Rapid retrieval method, device and equipment for tree structure nodes and storage medium | |
CN115329504A (en) | BOM construction method based on complex product structure | |
CN107870949A (en) | Data analysis job dependence relation generation method and system | |
EP2965492B1 (en) | Selection of data storage settings for an application | |
CN116795859A (en) | Data analysis method, device, computer equipment and storage medium | |
CN119396558B (en) | A data migration and upgrade method based on multi-node parallelism | |
CN113886419B (en) | SQL sentence processing method, device, computer equipment and storage medium | |
KR20180104498A (en) | Method and apparatus for processing query | |
CN114519071A (en) | Generation method, matching method, system, device and medium of rule matching model | |
CN113934749A (en) | Database persistence method based on cache | |
US5687365A (en) | System and method for creating a data dictionary for encoding, storing, and retrieving hierarchical data processing information for a computer system |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20191008 |
|
WD01 | Invention patent application deemed withdrawn after publication |