CN110515957A - A kind of method, system, equipment and the readable storage medium storing program for executing of the storage of block chain data - Google Patents

A kind of method, system, equipment and the readable storage medium storing program for executing of the storage of block chain data Download PDF

Info

Publication number
CN110515957A
CN110515957A CN201910823676.3A CN201910823676A CN110515957A CN 110515957 A CN110515957 A CN 110515957A CN 201910823676 A CN201910823676 A CN 201910823676A CN 110515957 A CN110515957 A CN 110515957A
Authority
CN
China
Prior art keywords
data
written
value
block chain
keyword
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910823676.3A
Other languages
Chinese (zh)
Inventor
刘鹏程
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Onething Technology Co Ltd
Shenzhen Xunlei Network Technology Co Ltd
Original Assignee
Shenzhen Onething Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN201910823676.3A priority Critical patent/CN110515957A/en
Publication of CN110515957A publication Critical patent/CN110515957A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2358Change logging, detection, and notification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Abstract

This application discloses a kind of methods of block chain data storage, comprising: receives data write request;It calls bottom LSM storage engines to write data into the corresponding data write-in journal file to be written of request, and is written into data write-in memory database;Judge whether the value of data to be written is less than predetermined threshold;If it is not, then storing the keyword and value pointer of data to be written in file system.The application is by judging whether the value of data to be written is less than predetermined threshold, if otherwise storing the keyword and value pointer of data to be written in file system, to reduce the size of SSTable file, the slow problem of read-write caused by greatly having delayed SSTable file excessive, the service life of single node memory block chain data is extended, and the overall performance of data is made to have the promotion of highly significant.The application additionally provides system, equipment and the computer readable storage medium of a kind of block chain data storage simultaneously, has above-mentioned beneficial effect.

Description

A kind of method, system, equipment and the readable storage medium storing program for executing of the storage of block chain data
Technical field
This application involves block chain field, in particular to a kind of method, system, equipment and the calculating of the storage of block chain data Machine readable storage medium storing program for executing.
Background technique
Block chain is by LSM Tree (Log Structure Merge Tree, log-structured merging tree) structure to data It is stored, traditional LSM Tree can pass through level db (the very efficient kv database that google is realized), rocks Db (embedded Key-value storage system) etc. realizes the storage to data, its advantage is that by converting the random write of disk At sequential write, with the write performance being optimal, to rapidly establish index.
However, level level increases as data volume constantly increases, LSM reading scale-up problem is more obvious, and LSM Compaction expense is increased sharply, and is especially apparent under pressure environment, is influenced block chain process overall performance.
Therefore, how to promote block chain global storage performance is that the technology that those skilled in the art need to solve at present is asked Topic.
Summary of the invention
The purpose of the application is to provide method, system, equipment and the computer-readable storage of a kind of block chain data storage Medium, for promoting block chain global storage performance.
In order to solve the above technical problems, the application provides a kind of method of block chain data storage, this method comprises:
Receive data write request;
Call bottom LSM storage engines that the corresponding data to be written of the data write request are written in journal file, And it will be in the data write-in memory database to be written;
If the value of the data to be written is greater than or equal to predetermined threshold, stored in file system described to be written The keyword and value pointer of data;Wherein, described value pointer includes the location information and length letter of the value of the data to be written Breath.
Optionally, further includes:
Receive data read request;
The keyword of data to be read is determined according to the data read request;
Call the bottom LSM storage engines in sequence successively in the memory database, volatile data base and described The corresponding data item of the keyword is searched in file system;
When the data item is the value pointer of the data to be read, parsing described value pointer obtains the access of continuing According to location information, and get the value of the data to be read according to the positional information.
Optionally, in the calling bottom LSM storage engines in sequence successively in the memory database, ephemeral data After searching the corresponding data item of the keyword in library and the file system, further includes:
If not finding the corresponding data item of the keyword, miscue information is returned.
Optionally, it after keyword and value pointer that the data to be written are stored in the LSM storage engines, also wraps It includes:
Obtain block chain state of a process information;
When the block chain state of a process is idle, the legacy data in the journal file is recycled.
Optionally, the method also includes:
If the value of the data to be written is less than the predetermined threshold, stored in the file system described to be written Enter the keyword and value of data.
The application also provides a kind of system of block chain data storage, which includes:
First receiving module, for receiving data write request;
First calling module, for calling bottom LSM storage engines by the corresponding number to be written of the data write request According in write-in journal file, and the data to be written are written in memory database;
Memory module, if the value for the data to be written is greater than or equal to predetermined threshold, in file system Store the keyword and value pointer of the data to be written;Wherein, described value pointer includes the position of the value of the data to be written Confidence breath and length information.
Optionally, further includes:
Second receiving module, for receiving data read requests;
Determining module, for determining the keyword of data to be read according to the data read request;
Second calling module, for call the bottom LSM storage engines in sequence successively the memory database, The corresponding data item of the keyword is searched in volatile data base and the file system;
First obtains module, for when the data item is the value pointer of the data to be read, parsing described value to refer to Needle obtains the location information of the data to be read, and gets the value of the data to be read according to the positional information.
Optionally, further includes:
Return module, for returning to miscue information when not finding the corresponding data item of the keyword.
The application also provides a kind of block chain data storage device, which includes:
Memory, for storing computer program;
Processor realizes the side that the block chain data as described in any of the above-described store when for executing the computer program The step of method.
The application also provides a kind of computer readable storage medium, and calculating is stored on the computer readable storage medium Machine program, the method that the block chain data as described in any of the above-described store is realized when the computer program is executed by processor Step.
The method of block chain data storage provided herein, comprising: receive data write request;Bottom LSM is called to deposit Storage engine writes data into the corresponding data write-in journal file to be written of request, and is written into data write-in internal storage data In library;If the value of data to be written is greater than or equal to predetermined threshold, the key of data to be written is stored in file system Word and value pointer;Wherein, value pointer includes the location information and length information of the value of data to be written.
Technical solution provided herein, by be written into data be written memory database after, if to be written Enter the value of data not less than predetermined threshold, then stores the keyword and value pointer of data to be written, in file system to reduce The size of SSTable file, and the use of block chain is supplied in the form of plug-in unit, greatly delay SSTable file excessive The caused slow problem of read-write, extends the service life of single node memory block chain data, and have the overall performance of data The promotion of highly significant.The application additionally provides the system of block chain data storage a kind of, equipment and computer-readable simultaneously Storage medium has above-mentioned beneficial effect, and details are not described herein.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow chart of the method for block chain data storage provided by the embodiment of the present application;
Fig. 2 is the schematic diagram that LSM storage engines execute secondary union operation;
Fig. 3 is the schematic diagram that LSM storage engines execute main union operation;
Fig. 4 is the flow chart of the method for the storage of another kind block chain data provided by the embodiment of the present application;
Fig. 5 is a kind of structure chart of the system of block chain data storage provided by the embodiment of the present application;
Fig. 6 is the structure chart of the system of the storage of another kind block chain data provided by the embodiment of the present application;
Fig. 7 is a kind of structure chart of block chain data storage device provided by the embodiment of the present application.
Specific embodiment
The core of the application is to provide method, system, equipment and the computer-readable storage of a kind of block chain data storage Medium, for promoting block chain global storage performance.
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
Referring to FIG. 1, Fig. 1 is a kind of flow chart of the method for block chain data storage provided by the embodiment of the present application.
It specifically comprises the following steps:
S101: data write request is received;
Block chain stores data by LSM Tree structure, and LSM Tree is a kind of data knot based on the hard disk Structure can reduce hard disk tracking expense, and can provide the high speed to file in longer time compared with B+tree significantly It is inserted into (deletion).However LSM-tree is in some cases, especially when inquiry needs quick response, performance is bad.Usually LSM-tree is suitable for indexing the insertion application system more more frequent than retrieving.
When the size of data stored in memory database reaches preset predetermined threshold, LSM storage engines can execute secondary Union operation (Minor Compaction) is wanted, by the data persistence in memory database into file system, please refers to figure 2, Fig. 2 execute the schematic diagram of secondary union operation for LSM storage engines, as shown in Fig. 2, secondary union operation be choose one or The data stored in multiple small, adjacent dump SSTable files and 0 or multiple memory databases are merged into one bigger SSTable file, Minor Compaction's the result is that less and bigger SSTable file;
When there are following three kinds of situations, secondary union operation operation can be triggered:
1) when 0 layer of number of files is more than the scheduled upper limit;
2) when the maximum capacity limitation that the file total size of a certain layer has been more than this layer;
3) when some file is invalid read number it is excessive;
Referring to FIG. 3, Fig. 3 is the schematic diagram that LSM storage engines execute main union operation, as shown in figure 3, main merge Operating (Major Compaction) is by the SSTable file of multiple low-levels and the SSTable for being merged into a high-level File, under normal circumstances, the main union operation time can be persistently long, and whole process can consume a large amount of system resources, to upper Layer service has bigger influence, and after data volume increases, level level can increase therewith, and LSM is caused to read scale-up problem It is more obvious, therefore this application provides a kind of methods of block chain data storage, for solving the above problems.
S102: calling bottom LSM storage engines to write data into the corresponding data write-in journal file to be written of request, And it is written into data write-in memory database;
After receiving data write request, block chain LSM storage engines can be written into data first and be sequentially written in In journal file, lost to avoid the memory database data under abnormal conditions, as data WAL (Write-Ahead Logging, write-ahead log) success after, then be written into data write-in memory database in, so far write operation complete;
WAL is a kind of efficient log algorithm in database, under identical data volume, using the database of WAL log For system when affairs are submitted, disk write operation only has traditional half of rewind journal or so, substantially increases data library disk The efficiency of I/O operation, to improve the performance of database.
S103: if the value of data to be written is greater than or equal to predetermined threshold, number to be written is stored in file system According to keyword and value pointer;
Optionally, if the value of data to be written is less than predetermined threshold, data to be written are stored in file system Keyword and value;
When the value of data to be written is less than predetermined threshold, be directly written into data keyword and data to be written It is worth (key-value) to be stored in file system directly in the form of SSTable file;
Value pointer (key-valuepointer) mentioned herein includes the location information and length of the value of data to be written The purpose of information, the keyword and value pointer that store data to be written in file system here is, reduces SSTable file Size, and then the slow problem of read-write caused by having delayed SSTable file excessive;
Optionally, which is specifically as follows the data of 12 byte-sizeds, and content is as follows:
4 byte Fid 4 byte Value Length 4 byte Offiset
Wherein, which value journal file Fid is used to record the values of the data to be written in, and Value Length is The length of the value of the data to be written, Offiset are position of the value of the data to be written in value journal file;
Optionally, stored in LSM storage engines data to be written keyword and value pointer after, can also be performed as Lower step:
Obtain block chain state of a process information;
When block chain state of a process is idle, the legacy data in journal file is recycled;
Legacy data of the embodiment of the present application when block chain process is idle in recycling journal file, to ensure storage overhead not Can infinitely it be amplified;
According to the above technical scheme it is found that the performance boost of the bigger this programme of the value of data to be written is just more obvious, and area The value of the most of data to be written of block chain is relatively large;And from the point of view of surveying result according to pressure, under 20,000,000 contract reference datas, The LSM storage engines reading performance of technical solution provided herein is 2.8 times of prior art performance, and SSTable file is big Small to be reduced to original 8%, block chain pressure is surveyed under scene, and LSM Compaction time-consuming is reduced to original 30%.The program It is greatly improved the overall performance of block chain bottom LSM storage engines.
Based on the above-mentioned technical proposal, the method for a kind of block chain data storage provided herein, by will be to be written After entering data write-in memory database, judge whether the value of data to be written is less than predetermined threshold, if data to be written Value is not less than predetermined threshold, then the keyword and value pointer of data to be written are stored in file system, to reduce SSTable text The size of part, and the use of block chain is supplied in the form of plug-in unit, read-write caused by greatly having delayed SSTable file excessive Slow problem, extends the service life of single node memory block chain data, and the overall performance of data is made to have highly significant Promotion.
It on the basis of the above embodiments, can also include step as shown in Figure 4 when receiving data read command Suddenly, it is illustrated below with reference to Fig. 4.
Referring to FIG. 4, Fig. 4 is the process of the method for the storage of another kind block chain data provided by the embodiment of the present application Figure.
Itself specifically includes the following steps:
S401: data read request is received;
S402: the keyword of data to be read is determined according to data read request;
S403: call bottom LSM storage engines in sequence successively in memory database, volatile data base and file system The corresponding data item of middle search key;
Optionally, in calling bottom LSM storage engines in sequence successively in memory database, volatile data base and file In system after the corresponding data item of search key, further includes:
If not finding the corresponding data item of keyword, miscue information is returned.
S404: when data item is the value pointer of data to be read, analytic value pointer obtains the position letter of data to be read It ceases, and gets the value of data to be read according to location information.
Optionally, when data item is the value of data to be read, then the value for directly returning to the data to be read can be completed Data read operation.
Optionally, above-mentioned steps S403- step S404 is specifically as follows:
1) the corresponding data item of search key in memory database, is directly entered step 4 if searching;
2) the corresponding data item of search key in volatile data base, is directly entered step 4 if searching;
3) the corresponding data item of lookup keyword incremented by successively since 0 level of file system is straight if searching It connects and enters step 4;
4) it after getting data item, is directly returned the result when the data item is the value of data to be written.If value be to The value pointer that data are written, then parse the value pointer, and enter in specified value journal file and get data to be written Value;
Preferably, it is obtained since the SSTable file of 0 level executes Minor Compaction, therefore the application is real When can also by all SSTable files of 0 level carry out mmap operation be mapped into memory, with promoted 0 level reading performance.
Referring to FIG. 5, Fig. 5 is a kind of structure chart of the system of block chain data storage provided by the embodiment of the present application.
The system may include:
First receiving module 100, for receiving data write request;
First calling module 200, for calling bottom LSM storage engines to write data into the corresponding data to be written of request It is written in journal file, and is written into data write-in memory database;
Memory module 300 is deposited in file system if the value for data to be written is greater than or equal to predetermined threshold Store up the keyword and value pointer of data to be written;Wherein, value pointer includes the location information and length letter of the value of data to be written Breath.
Referring to FIG. 6, Fig. 6 is the structure of the system of the storage of another kind block chain data provided by the embodiment of the present application Figure.
The system can also include:
Second receiving module, for receiving data read requests;
Determining module, for determining the keyword of data to be read according to data read request;
Second calling module, for calling bottom LSM storage engines in sequence successively in memory database, ephemeral data The corresponding data item of search key in library and file system;
First obtains module, for when data item is the value pointer of data to be read, analytic value pointer to obtain to be read The location information of data, and get according to location information the value of data to be read.
The system can also include:
Return module, for returning to miscue information when not finding the corresponding data item of keyword.
The system can also include:
Second obtains module, for obtaining block chain state of a process information;
Recycling module, for recycling the legacy data in journal file when block chain state of a process is idle.
Each component part in system above can be applied in embodiment below:
First receiving module receives data write request;First calling module calls bottom LSM storage engines to write data Enter to request in corresponding data write-in journal file to be written, and is written into data write-in memory database;If to be written The value for entering data is greater than or equal to predetermined threshold, then memory module stores the keyword and value of data to be written in file system Pointer;Second, which obtains module, obtains block chain state of a process information;When block chain state of a process is idle, recycling module Recycle the legacy data in journal file.
Second receiving module receives data read request;Determining module determines data to be read according to data read request Keyword;Second calling module calls bottom LSM storage engines in sequence successively in memory database, volatile data base and text The corresponding data item of search key in part system;When not finding the corresponding data item of keyword, return module returns wrong Accidentally prompt information.When data item is the value pointer of data to be read, the first acquisition module analytic value pointer obtains access of continuing According to location information, and get according to location information the value of data to be read.
Referring to FIG. 7, Fig. 7 is a kind of structure chart of block chain data storage device provided by the embodiment of the present application.
The block chain data storage device 700 can generate bigger difference because configuration or performance are different, may include One or more processors (central processing units, CPU) 722 are (for example, one or more are handled Device) and memory 732, one or more storage application programs 742 or data 744 storage medium 730 (such as one or More than one mass memory unit).Wherein, memory 732 and storage medium 730 can be of short duration storage or persistent storage.It deposits Storage may include one or more modules (diagram does not mark) in the program of storage medium 730, and each module may include To the series of instructions operation in device.Further, central processing unit 722 can be set to communicate with storage medium 730, The series of instructions operation in storage medium 730 is executed on block chain data storage device 700.
Block chain data storage device 700 can also include one or more power supplys 727, one or more have Line or radio network interface 750, one or more input/output interfaces 758, and/or, one or more operation systems System 741, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..
Step in the method for the storage of block chain data described in above-mentioned Fig. 1 to Fig. 4 is by block chain data storage device It is realized based on the structure shown in Fig. 7.
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 module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed device, device and method, it can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the division of module, Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple module or components can be with In conjunction with or be desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed Mutual coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING of device or module or Communication connection can be electrical property, mechanical or other forms.
Module may or may not be physically separated as illustrated by the separation member, show as module Component may or may not be physical module, it can and it is in one place, or may be distributed over multiple networks In module.Some or all of the modules therein can be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
It, can also be in addition, can integrate in a processing module in each functional module in each embodiment of the application It is that modules physically exist alone, can also be integrated in two or more modules in a module.Above-mentioned integrated mould Block both can take the form of hardware realization, can also be realized in the form of software function module.
If integrated module is realized and when sold or used as an independent product in the form of software function module, can To be stored in a computer readable storage medium.Based on this understanding, the technical solution of the application substantially or Say that all or part of the part that contributes to existing technology or the technical solution can embody in the form of software products Out, which is stored in a storage medium, including some instructions are used so that a computer equipment The whole of (can be personal computer, funcall device or the network equipment etc.) execution each embodiment method of the application 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.
It to a kind of method of block chain data storage provided herein, system, equipment and computer-readable deposits above Storage media is described in detail.Specific examples are used herein to illustrate the principle and implementation manner of the present application, The description of the example is only used to help understand the method for the present application and its core ideas.It should be pointed out that for this technology For the those of ordinary skill in field, under the premise of not departing from the application principle, several improvement can also be carried out to the application And modification, these improvement and modification are also fallen into the protection scope of the claim of this application.
It should also be noted that, in the present specification, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except there is also other identical elements in the process, method, article or equipment for including element.

Claims (10)

1. a kind of method of block chain data storage characterized by comprising
Receive data write request;
Call bottom LSM storage engines that the corresponding data to be written of the data write request are written in journal file, and will In the data write-in memory database to be written;
If the value of the data to be written is greater than or equal to predetermined threshold, the data to be written are stored in file system Keyword and value pointer;Wherein, described value pointer includes the location information and length information of the value of the data to be written.
2. the method according to claim 1, wherein further include:
Receive data read request;
The keyword of data to be read is determined according to the data read request;
Call the bottom LSM storage engines in sequence successively in the memory database, volatile data base and the file The corresponding data item of the keyword is searched in system;
When the data item is the value pointer of the data to be read, parsing described value pointer obtains the data to be read Location information, and the value of the data to be read is got according to the positional information.
3. according to the method described in claim 2, it is characterized in that, call the bottom LSM storage engines in sequence according to It is secondary the corresponding data item of the keyword is searched in the memory database, volatile data base and the file system after, Further include:
If not finding the corresponding data item of the keyword, miscue information is returned.
4. the method according to claim 1, wherein storing the number to be written in the LSM storage engines According to keyword and value pointer after, further includes:
Obtain block chain state of a process information;
When the block chain state of a process is idle, the legacy data in the journal file is recycled.
5. the method according to claim 1, wherein the method also includes:
If the value of the data to be written is less than the predetermined threshold, the number to be written is stored in the file system According to keyword and value.
6. a kind of system of block chain data storage characterized by comprising
First receiving module, for receiving data write request;
First calling module, for calling bottom LSM storage engines to write the corresponding data to be written of the data write request Enter in journal file, and will be in the data write-in memory database to be written;
Memory module stores in file system if the value for the data to be written is greater than or equal to predetermined threshold The keyword and value pointer of the data to be written;Wherein, described value pointer includes the position letter of the value of the data to be written Breath and length information.
7. system according to claim 6, which is characterized in that further include:
Second receiving module, for receiving data read requests;
Determining module, for determining the keyword of data to be read according to the data read request;
Second calling module, for calling the bottom LSM storage engines in sequence successively in the memory database, interim The corresponding data item of the keyword is searched in database and the file system;
First obtains module, for when the data item is the value pointer of the data to be read, parsing described value pointer to be obtained To the location information of the data to be read, and the value of the data to be read is got according to the positional information.
8. system according to claim 7, which is characterized in that further include:
Return module, for returning to miscue information when not finding the corresponding data item of the keyword.
9. a kind of block chain data storage device characterized by comprising
Memory, for storing computer program;
Processor realizes that block chain data store as described in any one of claim 1 to 5 when for executing the computer program Method the step of.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program, realizing that block chain data store as described in any one of claim 1 to 5 when the computer program is executed by processor The step of method.
CN201910823676.3A 2019-09-02 2019-09-02 A kind of method, system, equipment and the readable storage medium storing program for executing of the storage of block chain data Pending CN110515957A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910823676.3A CN110515957A (en) 2019-09-02 2019-09-02 A kind of method, system, equipment and the readable storage medium storing program for executing of the storage of block chain data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910823676.3A CN110515957A (en) 2019-09-02 2019-09-02 A kind of method, system, equipment and the readable storage medium storing program for executing of the storage of block chain data

Publications (1)

Publication Number Publication Date
CN110515957A true CN110515957A (en) 2019-11-29

Family

ID=68630378

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910823676.3A Pending CN110515957A (en) 2019-09-02 2019-09-02 A kind of method, system, equipment and the readable storage medium storing program for executing of the storage of block chain data

Country Status (1)

Country Link
CN (1) CN110515957A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015697A (en) * 2020-10-27 2020-12-01 暗链科技(深圳)有限公司 Method and system for archiving data on block chain
CN112395212A (en) * 2020-11-05 2021-02-23 华中科技大学 Method and system for reducing garbage recovery and write amplification of key value separation storage system
CN112433671A (en) * 2020-10-29 2021-03-02 苏州浪潮智能科技有限公司 Data persistence method, system, device and medium
CN112765155A (en) * 2020-12-14 2021-05-07 杭州趣链科技有限公司 Block chain-based key value storage method and device, terminal equipment and medium
CN113806300A (en) * 2021-09-23 2021-12-17 北京百度网讯科技有限公司 Data storage method, system, device, equipment and storage medium
CN116628274A (en) * 2023-07-25 2023-08-22 浙江锦智人工智能科技有限公司 Data writing method, device and medium for graph database
CN117271531A (en) * 2023-11-21 2023-12-22 苏州元脑智能科技有限公司 Data storage method, system, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160179865A1 (en) * 2014-12-17 2016-06-23 Yahoo! Inc. Method and system for concurrency control in log-structured merge data stores
CN108052643A (en) * 2017-12-22 2018-05-18 北京奇虎科技有限公司 Date storage method, device and storage engines based on LSM Tree structures
CN108733306A (en) * 2017-04-14 2018-11-02 华为技术有限公司 A kind of Piece file mergence method and device
CN109086388A (en) * 2018-07-26 2018-12-25 百度在线网络技术(北京)有限公司 Block chain date storage method, device, equipment and medium
CN109213432A (en) * 2017-07-04 2019-01-15 华为技术有限公司 Utilize the log-structured storage device and method thereof for merging tree and writing data into

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160179865A1 (en) * 2014-12-17 2016-06-23 Yahoo! Inc. Method and system for concurrency control in log-structured merge data stores
CN108733306A (en) * 2017-04-14 2018-11-02 华为技术有限公司 A kind of Piece file mergence method and device
CN109213432A (en) * 2017-07-04 2019-01-15 华为技术有限公司 Utilize the log-structured storage device and method thereof for merging tree and writing data into
CN108052643A (en) * 2017-12-22 2018-05-18 北京奇虎科技有限公司 Date storage method, device and storage engines based on LSM Tree structures
CN109086388A (en) * 2018-07-26 2018-12-25 百度在线网络技术(北京)有限公司 Block chain date storage method, device, equipment and medium

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015697A (en) * 2020-10-27 2020-12-01 暗链科技(深圳)有限公司 Method and system for archiving data on block chain
CN112015697B (en) * 2020-10-27 2021-02-02 暗链科技(深圳)有限公司 Method and system for archiving data on block chain
CN112433671A (en) * 2020-10-29 2021-03-02 苏州浪潮智能科技有限公司 Data persistence method, system, device and medium
CN112433671B (en) * 2020-10-29 2023-01-06 苏州浪潮智能科技有限公司 Data persistence method, system, device and medium
CN112395212A (en) * 2020-11-05 2021-02-23 华中科技大学 Method and system for reducing garbage recovery and write amplification of key value separation storage system
CN112765155B (en) * 2020-12-14 2022-05-31 杭州趣链科技有限公司 Block chain-based key value storage method and device, terminal equipment and medium
CN112765155A (en) * 2020-12-14 2021-05-07 杭州趣链科技有限公司 Block chain-based key value storage method and device, terminal equipment and medium
CN113806300A (en) * 2021-09-23 2021-12-17 北京百度网讯科技有限公司 Data storage method, system, device, equipment and storage medium
CN113806300B (en) * 2021-09-23 2023-08-01 北京百度网讯科技有限公司 Data storage method, system, device, equipment and storage medium
CN116628274A (en) * 2023-07-25 2023-08-22 浙江锦智人工智能科技有限公司 Data writing method, device and medium for graph database
CN116628274B (en) * 2023-07-25 2023-09-22 浙江锦智人工智能科技有限公司 Data writing method, device and medium for graph database
CN117271531A (en) * 2023-11-21 2023-12-22 苏州元脑智能科技有限公司 Data storage method, system, equipment and medium
CN117271531B (en) * 2023-11-21 2024-02-23 苏州元脑智能科技有限公司 Data storage method, system, equipment and medium

Similar Documents

Publication Publication Date Title
CN110515957A (en) A kind of method, system, equipment and the readable storage medium storing program for executing of the storage of block chain data
CN107463632B (en) Distributed NewSQL database system and data query method
CN102725752B (en) Method and device for processing dirty data
CN102541875B (en) Access method, device and system for relational node data of directed acyclic graph
US7921085B2 (en) Method and system for quantifying a data page repetition pattern for a database index in a database management system
CN104239377A (en) Platform-crossing data retrieval method and device
US11567681B2 (en) Method and system for synchronizing requests related to key-value storage having different portions
US20080010238A1 (en) Index having short-term portion and long-term portion
CN111506559A (en) Data storage method and device, electronic equipment and storage medium
US11748357B2 (en) Method and system for searching a key-value storage
CN104424219A (en) Method and equipment of managing data documents
CN107247624A (en) A kind of cooperative optimization method and system towards Key Value systems
CN102737068A (en) Method and equipment for performing cache management on retrieval data
US20080005077A1 (en) Encoded version columns optimized for current version access
CN110532228A (en) A kind of method, system, equipment and the readable storage medium storing program for executing of block chain reading data
US20180011897A1 (en) Data processing method having structure of cache index specified to transaction in mobile environment dbms
CN112131214A (en) Method, system, equipment and storage medium for data writing and data query
US8548980B2 (en) Accelerating queries based on exact knowledge of specific rows satisfying local conditions
US7672925B2 (en) Accelerating queries using temporary enumeration representation
CN108334565A (en) A kind of data mixing storage organization, data store query method, terminal and medium
US20200341678A1 (en) Data storage method and data storage engine
CN111666302A (en) User ranking query method, device, equipment and storage medium
CN114691039A (en) Data processing method and device, electronic equipment and storage medium
CN114064729A (en) Data retrieval method, device, equipment and storage medium
CN108984720B (en) Data query method and device based on column storage, server and storage medium

Legal Events

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

Effective date of registration: 20210910

Address after: 518000 21 / f-23 / F, block B, building 12, Shenzhen Bay science and technology ecological park, No. 18, South Keji Road, high tech community, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Xunlei Networking Technologies, Ltd.

Applicant after: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd.

Address before: 518052 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant before: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd.

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

Application publication date: 20191129