CN105389334B - The conversion method and device of data store organisation - Google Patents
The conversion method and device of data store organisation Download PDFInfo
- Publication number
- CN105389334B CN105389334B CN201510674542.1A CN201510674542A CN105389334B CN 105389334 B CN105389334 B CN 105389334B CN 201510674542 A CN201510674542 A CN 201510674542A CN 105389334 B CN105389334 B CN 105389334B
- Authority
- CN
- China
- Prior art keywords
- data
- chained list
- converted
- key
- value
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
Abstract
The present invention provides a kind of conversion plans of data store organisation, it include: the chained list mark for extracting the station location marker and chained list of each data to be converted in the same chained list based on original chained list storage organization, and the station location marker of chained list mark and each data to be converted is merged respectively, to determine the key converted in storage organization corresponding with each data to be converted, it will then extract and merged respectively with station location marker of each data to be converted in chained list in the adjacent two data of left and right and the value data cell in each data to be converted extracted, with the value being determined as in the conversion storage organization of each data to be converted, according to conversion storage organization, by data key values that key and value form to storing into key value database.Through the invention, the storage system that a kind of data storage processing efficiency is higher, had not only supported a plurality of types of data store organisations but also had not been limited by physical memory finally can be achieved.
Description
Technical field
The present invention relates to field of computer technology, specifically, a kind of conversion of data store organisation of the present invention
Method and device.
Background technique
With the rapid development of information age, the number of TB magnitude is not only also accumulated from large enterprises or even some small enterprises
Begin with that processing is extensive and the demand of the data of multiple data type according to, the tissue of various scales, and traditional relationship type
Database (SQL database) nearly reaches the limit at the expansible aspect that data store.In order to solve large-scale data set and
The problem of multiple data type bring challenge and big data application, non-relational database (NoSQL database) are come into being.
Common non-relational database includes KV (Key-Value, key assignments) storing data library, and data are according to key-value pair
Form carry out tissue, index and storage.KV storage mode is very suitable to not be related to the number of excessive data relationship and business relations
According to storage service, the number of read-write disk can be effectively reduced, possesses better readwrite performance than SQL database storage, KV is deposited
The achievable mode for storing up database includes Redis and LevelDB etc., and LevelDB can support the data volume of billion rank,
And very high data storage processing performance can also be kept under this number of levels, meanwhile, LevelDB can deposit data
Storage is conducive to the persistence of data to disk;But the interface of LevelDB only supports the key-value of no deformation at present
(key-value pair) type data, interface is more single, poor to the scalability of business.Redis is a kind of high performance key-value
Storage system can support the data store organisation of a variety of value types, including string (character string) type, list (chain
Table) type, set (set) type, zset (ordered set) type and hash (Hash) type, it is still, higher in order to guarantee
Data storage processing efficiency, data are all to cache in memory, i.e. Redis is a kind of memory type database, therefore the storage
Mode is limited by physical memory, cannot achieve big data storage.
It can be seen that how realizing that a kind of data storage processing efficiency is higher, both having supported a plurality of types of data storage knots
Structure, the storage system not limited again by physical memory are current urgent problems.
Summary of the invention
To overcome above-mentioned technical problem or at least being partially solved above-mentioned technical problem, spy proposes following technical scheme:
The embodiment of the present invention proposes a kind of conversion method of data store organisation, comprising:
Extract in the same chained list based on original chained list storage organization the station location marker of each data to be converted and described
The chained list of chained list identifies, and the chained list is identified and the station location marker of each data to be converted merges respectively, with
The determining key converted in storage organization corresponding with each data to be converted;
Extract with station location marker of each data to be converted in the chained list in the adjacent two data of left and right and
Value data cell in each data to be converted, and will extract with each data to be converted in the chain
Station location marker in table in the adjacent two data of left and right and the value data cell in each data to be converted extracted
It merges respectively, with the value being determined as in the conversion storage organization of each data to be converted;
According to the conversion storage organization, by data key values that the key and described value form to storing to key value database
In.
Preferably, this method further include:
Determine structurally interrelated information corresponding with original chained list storage organization in the chained list;
By the structure key-value pair for being identified as key with scheduled link table information, being formed using the structurally interrelated information as value and institute
The each data to be converted stated in same chained list are stored into key value database in association.
Wherein, the structurally interrelated information, includes at least:
The quantity of data to be converted in the chained list;
Next available station location marker in the chained list;
The station location marker of the header data of the chained list;
The station location marker of the tail data of the chained list.
Wherein, the scheduled link table information mark, includes at least:
The chained list of the chained list identifies;Variable mark.
Preferably, this method further include:
When to any data key values to be updated to operation is updated, to the data key values to be updated with this described
The adjacent corresponding data key values of two data in left and right are to accordingly being updated in chained list
And to the data key values to be updated are corresponding to associated structure key-value pair progress updates.
Another embodiment also proposed a kind of conversion equipment of data store organisation in the present invention characterized by comprising
Key determining module, for extracting the position of each data to be converted in the same chained list based on original chained list storage organization
It sets the chained list mark of mark and the chained list, and the chained list is identified and the station location marker of each data to be converted point
It does not merge, with the determining key converted in storage organization corresponding with each data to be converted;
It is worth determining module, for extracting with each data to be converted in the chained list in the adjacent two data of left and right
Station location marker and each data to be converted in value data cell, and will extract with it is described each wait turn
Change station location marker of the data in the chained list in the adjacent two data of left and right in each data to be converted for extracting
Value data cell merge respectively, be determined as each data to be converted conversion storage organization in value;
Data key values are used for the number that according to the conversion storage organization, the key and described value are formed to memory module
It stores according to key-value pair into key value database.
Preferably, the device further include:
Structure determination module, for determining structurally interrelated information corresponding with original chained list storage organization in the chained list;
Structure key-value pair memory module, for key will to be identified as with scheduled link table information, with the structurally interrelated information
It is stored in association for each data to be converted in the structure key-value pair and the same chained list of value composition to key value database
In.
Wherein, the structurally interrelated information, includes at least:
The quantity of data to be converted in the chained list;
Next available station location marker in the chained list;
The station location marker of the header data of the chained list;
The station location marker of the tail data of the chained list.
Wherein, the scheduled link table information mark, includes at least:
The chained list of the chained list identifies;Variable mark.
Preferably, the device further include:
Update module is used for
When to any data key values to be updated to operation is updated, to the data key values to be updated with this described
The adjacent corresponding data key values of two data in left and right are to accordingly being updated in chained list,
And to the data key values to be updated are corresponding to associated structure key-value pair progress updates.
In the embodiment of the present invention, a kind of conversion plan of data store organisation is proposed, by the way that original storage will be based on
The data conversion of structure is stored as based on the data in conversion storage organization, and realization turns a variety of storing data types with unification
The mode for changing storage organization carries out data storage.Further, the data store organisation of a variety of value types will be supported
The data of a variety of data store organisations in Redis storage system are transferred to and the key-value pair data of no deformation are only supported to store knot
The LevelDB storage system of structure is realized under the premise of guaranteeing higher data storage processing efficiency, will be limited by physical memory
The storage mode of system is converted to storage mode storing target as data using disk, not limited by physical memory.By this hair
It is bright, it finally can be achieved that a kind of data storage processing efficiency is higher, had not only supported a plurality of types of data store organisations but also not by physics
The storage system of memory limitation, since the storage system can carry out efficient storage to the mass data of plurality of data structures type,
So that the data storage method of this programme possesses stronger operation expanding.
The additional aspect of the present invention and advantage will be set forth in part in the description, these will become from the following description
Obviously, or practice through the invention is recognized.
Detailed description of the invention
Above-mentioned and/or additional aspect and advantage of the invention will become from the following description of the accompanying drawings of embodiments
Obviously and it is readily appreciated that, in which:
Fig. 1 is the flow chart of the conversion method of the data store organisation of one embodiment in the present invention;
Fig. 2 is the flow chart of the conversion method of the data store organisation of a preferred embodiment in the present invention;
Fig. 3 is the structural schematic diagram of the conversion equipment of the data store organisation of another embodiment in the present invention;
Fig. 4 is the structural schematic diagram of the device of the conversion of the data store organisation of another preferred embodiment in the present invention;
Fig. 5 is the structural schematic diagram of a data to be converted in list type chained list;
Fig. 6 is the station location marker and structural schematic diagram of each data to be converted in a list type chained list;
Fig. 7 is the station location marker for adding each data after a new node at third node in the list type chained list of Fig. 6
And structural schematic diagram;
Fig. 8 is station location marker and the structural representation that each data after second node are deleted in the list type chained list of Fig. 7
Figure.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end
Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached
The embodiment of figure description is exemplary, and for explaining only the invention, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one
It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in specification of the invention
Diction " comprising " refer to that there are the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition
Other one or more features, integer, step, operation, element, component and/or their group.It should be understood that when we claim member
Part is " connected " or when " coupled " to another element, it can be directly connected or coupled to other elements, or there may also be
Intermediary element.In addition, " connection " used herein or " coupling " may include being wirelessly connected or wirelessly coupling.It is used herein to arrange
Diction "and/or" includes one or more associated wholes for listing item or any cell and all combinations.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, all terms used herein (including technology
Term and scientific term), there is meaning identical with the general understanding of those of ordinary skill in fields of the present invention.Also answer
It should be appreciated that those terms such as defined in the general dictionary, it should be understood that have in the context of the prior art
The consistent meaning of meaning otherwise with idealization or too formal will not contain and unless by specific definitions as here
Justice is explained.
Fig. 1 is the flow chart of the conversion method of the data store organisation of one embodiment in the present invention.
Step S110: the station location marker of each data to be converted in the same chained list based on original chained list storage organization is extracted
And the chained list mark of chained list, and the station location marker of chained list mark and each data to be converted is merged respectively, with determination
The key converted in storage organization corresponding with each data to be converted;Step S120: it extracts with each data to be converted in chained list
Station location marker in middle left and right adjacent two data and the value data cell in each data to be converted and will extract with
In station location marker of each data to be converted in chained list in the adjacent two data of left and right and each data to be converted extracted
Value data cell merge respectively, be determined as each data to be converted conversion storage organization in value;Step
S130: according to conversion storage organization, by the data key values of key and value composition to storing into key value database.
In the embodiment of the present invention, a kind of conversion plan of data store organisation is proposed, by the way that original storage will be based on
The data conversion of structure is stored as based on the data in conversion storage organization, and realization turns a variety of storing data types with unification
The mode for changing storage organization carries out data storage.Further, the data store organisation of a variety of value types will be supported
The data of a variety of data store organisations in Redis storage system are transferred to and the key-value pair data of no deformation are only supported to store knot
The LevelDB storage system of structure is realized under the premise of guaranteeing higher data storage processing efficiency, will be limited by physical memory
The storage mode of system is converted to storage mode storing target as data using disk, not limited by physical memory.By this hair
It is bright, it finally can be achieved that a kind of data storage processing efficiency is higher, had not only supported a plurality of types of data store organisations but also not by physics
The storage system of memory limitation, since the storage system can carry out efficient storage to the mass data of plurality of data structures type,
So that the data storage method of this programme possesses stronger operation expanding.
In the present embodiment, by taking original chained list storage organization is list type linked list data structure as an example, the list type chain
Table is the doubly linked list structure with data field, and the structure of a data to be converted in chained list is as shown in Figure 5.
Wherein, data represents the value data cell in the data to be converted, and prior represents a left side for the data to be converted
The station location marker of side adjacent data, next represent the station location marker of the right adjacent data of the data to be converted.
If there are 3 data to be converted, i.e. 3 nodes in list type chained list, the station location marker of each data to be converted and
Structure is as shown in Figure 6.
Wherein, in the chained list for including 3 data to be converted, the station location marker of the data to be converted of first node is 1,
Value data cell is a, and the station location marker of left side adjacent data is -1, and the station location marker of right adjacent data is 2;Second node
The station location markers of data to be converted be 2, value data cell be b, the station location marker of left side adjacent data is 1, right consecutive number
According to station location marker be 3;The station location marker of the data to be converted of third node is that 3, value data cell is c, left side consecutive number
According to station location marker be 2, the station location marker of right adjacent data is -1;Wherein, since the data to be converted of first node are not present
Front nodal point is not present the station location marker of left side adjacent data, is then set as -1, similarly, the data to be converted of third node are not deposited
In posterior nodal point, that is, the station location marker of the right adjacent data is not present, is also set as -1.
Step S110: the station location marker of each data to be converted in the same chained list based on original chained list storage organization is extracted
And the chained list mark of chained list, and the station location marker of chained list mark and each data to be converted is merged respectively, with determination
The key converted in storage organization corresponding with each data to be converted.
For example, extract as Fig. 6 list type linked list data structure in each data to be converted station location marker 1,2,3 with
And the chained list mark of the chained list such as K, and the station location marker of chained list mark and each data to be converted is merged respectively, with true
The fixed key converted in storage organization corresponding with each data to be converted, the key for such as obtaining the data to be converted of first node is K+
1, the key of the data to be converted of second node is K+2, and the key of the data to be converted of third node is K+3.
Step S120: it extracts and station location marker of each data to be converted in chained list in the adjacent two data of left and right and each
Value data cell in a data to be converted, and by extracting with each data to be converted left and right in chained list adjacent two
Station location marker in a data merges respectively with the value data cell in each data to be converted extracted, with true
The value being set in the conversion storage organization of each data to be converted.
For example, example is connected, the position with each data to be converted in chained list in the adjacent two data of left and right that will be extracted
Mark is set, it is to be converted such as first node with extracting if the prior of the data to be converted of first node is -1, next 2
The value data cell a of data is merged, to be determined as in the conversion storage organization of the data to be converted of first node
It is worth to get being " -1,2, a " to the value of the data to be converted of first node;Similarly, the value of the data to be converted of second node is
" 1,3, b ", the value of the data to be converted of third node are " 2, -1, c ".
Step S130: according to conversion storage organization, by the data key values of key and value composition to storing into key value database.
For example, connect example, key and value are merged into composition data key-value pair, and by data key values to " K+1-'-1,2, a ' ",
" K+2- ' 1,3, b ' " and " K+3- ' 2, -1, c ' " is stored into key value database.
In a preferred embodiment, as shown in Fig. 2, this method further includes step S210 and step S220;Step S210: really
Determine structurally interrelated information corresponding with original chained list storage organization in chained list;Step S220: it will be identified with scheduled link table information
It is that the structure key-value pair that value forms is deposited in association with each data to be converted in same chained list for key, with structurally interrelated information
Storage is into key value database.
Wherein, structurally interrelated information is specifically including but not limited to:
The quantity of data to be converted in chained list;
Next available station location marker in chained list;
The station location marker of the header data of chained list;
The station location marker of the tail data of chained list.
Wherein, scheduled link table information mark, includes at least:
The chained list of chained list identifies;Variable mark.It is such as identified with the chained list that " K " is chained list, " meta " is variable mark.
For example, connecting example, structurally interrelated information corresponding with storage of linked list structure shown in fig. 6 includes: such as chain in chained list
The quantity of data to be converted in table, the station location marker of the header data of next available station location marker in chained list, chained list and
The station location marker of the tail data of chained list, according to Fig.6, it may be determined that the quantity of the data to be converted in chained list is 3, in chained list
Next available station location marker be 4, the station location marker of the header data of chained list is 1, the station location marker of the tail data of chained list
It is 3, " K is identified with scheduled link table informationmeta" it is key, " 3,4,1,3 " be the structure key-value pair of value composition to structurally interrelated information
“Kmeta' 3,4,1,3 ' " it is stored in association into key value database with each data to be converted in the chained list.Wherein, it ties
Mode is structure key-value pair in association with each data to be converted, the key " K of structure key-value pairmeta" in include be element " K ", respectively
Each key of the data key values of a data to be converted to " K+1- ' -1,2, a ' ", " K+2- ' 1,3, b ' " and " K+3- ' 2, -1, c ' "
Including in " K+1 ", " K+2 " and " K+3 " is element " K ", can establish incidence relation by " K ".
Preferably, this method further include:
When to any data key values to be updated to operation is updated, to the data key values to be updated with this described
The adjacent corresponding data key values of two data in left and right are to accordingly being updated in chained list;
When to any data key values to be updated to operation is updated, to the data key values to be updated to related
The structure key-value pair of connection is accordingly updated.
For example, connecting example, a new node, value is added in the second node in chained list shown in Fig. 6 and third node
Data cell is d, then the station location marker of the prior of second node, can be occurred therewith with the station location marker of the next of third node
Variation, second node data key values corresponding with third node are to being also required to be updated accordingly, the data of former second node
Key-value pair is updated to " K+2- ' 1,4, b ' ", and the data key values of former third node are to being updated to " K+3- ' 4, -1, c ' ";The chained list
Corresponding structure key-value pair is also changed, and the quantity of the data to be converted in chained list after increasing new node is 4, in chained list
Next available station location marker be 5, the station location marker of the header data of chained list is 1, the station location marker of the tail data of chained list
It is 3, " K is identified with scheduled link table informationmeta" it is key, structurally interrelated information " 4,5,1,3 ", therefore corresponding structure key-value pair
It is updated to " Kmeta' 4,5,1,3 ' ", the list structure after being added is as shown in Figure 7.
In another example connect example, the second node that value data cell is b is deleted in Fig. 7 chained list, then first node
The previous available station location marker of next available station location marker and third node is changed, corresponding data key values to
It needs to be updated accordingly, the data key values of former first node are to being updated to " K+1-'-1,4, a ' " at this time, former third node
Data key values to being updated to " K+4-' 1,3, d ' ";Corresponding structure key-value pair is also changed, after deleting second node
Chained list in the quantity of data to be converted be 3, next available station location marker in chained list is 5, the header data of chained list
Station location marker is 1, and the station location marker of the tail data of chained list is 3, identifies " K with scheduled link table informationmeta" it is key, structure phase
Pass information " 3,5,1,3 ", therefore corresponding structure key-value pair is updated to " Kmeta' 3,5,1,3 ' ", the chained list knot after being deleted
Structure is as shown in Figure 8.
Fig. 3 is the structural schematic diagram of the conversion equipment of the data store organisation of another embodiment in the present invention.
Key determining module 310 extracts the position of each data to be converted in the same chained list based on original chained list storage organization
The chained list of mark and chained list mark, and the station location marker of chained list mark and each data to be converted is merged respectively, with
Determine the key converted in storage organization corresponding with each data to be converted;It is worth determining module 320 to extract and each number to be converted
According to the station location marker in chained list in the adjacent two data of left and right and the value data cell in each data to be converted and will mention
Get with station location marker of each data to be converted in chained list in the adjacent two data of left and right with extract it is each wait turn
The value data cell changed in data merges respectively, to be determined as in the conversion storage organization of each data to be converted
Value;Data key values to memory module 330 according to conversion storage organization, by the data key values of key and value composition to storing to key assignments number
According in library.
In the embodiment of the present invention, a kind of conversion plan of data store organisation is proposed, by the way that original storage will be based on
The data conversion of structure is stored as based on the data in conversion storage organization, and realization turns a variety of storing data types with unification
The mode for changing storage organization carries out data storage.Further, the data store organisation of a variety of value types will be supported
The data of a variety of data store organisations in Redis storage system are transferred to and the key-value pair data of no deformation are only supported to store knot
The LevelDB storage system of structure is realized under the premise of guaranteeing higher data storage processing efficiency, will be limited by physical memory
The storage mode of system is converted to storage mode storing target as data using disk, not limited by physical memory.By this hair
It is bright, it finally can be achieved that a kind of data storage processing efficiency is higher, had not only supported a plurality of types of data store organisations but also not by physics
The storage system of memory limitation, since the storage system can carry out efficient storage to the mass data of plurality of data structures type,
So that the data storage method of this programme possesses stronger operation expanding.
In the present embodiment, by taking original chained list storage organization is list type linked list data structure as an example, the list type chain
Table is the doubly linked list structure with data field, and the structure of a data to be converted in chained list is as shown in Figure 5.
Wherein, data represents the value data cell in the data to be converted, and prior represents a left side for the data to be converted
The station location marker of side adjacent data, next represent the station location marker of the right adjacent data of the data to be converted.
If there are 3 data to be converted, i.e. 3 nodes in list type chained list, the station location marker of each data to be converted and
Structure such as Fig. 6.
Wherein, in the chained list for including 3 data to be converted, the station location marker of the data to be converted of first node is 1,
Value data cell is a, and the station location marker of left side adjacent data is -1, and the station location marker of right adjacent data is 2;Second node
The station location markers of data to be converted be 2, value data cell be b, the station location marker of left side adjacent data is 1, right consecutive number
According to station location marker be 3;The station location marker of the data to be converted of third node is that 3, value data cell is c, left side consecutive number
According to station location marker be 2, the station location marker of right adjacent data is -1;Wherein, since the data to be converted of first node are not present
Front nodal point is not present the station location marker of left side adjacent data, is then set as -1, similarly, the data to be converted of third node are not deposited
In posterior nodal point, that is, the station location marker of the right adjacent data is not present, is also set as -1.
Key determining module 310 extracts the position of each data to be converted in the same chained list based on original chained list storage organization
The chained list of mark and chained list mark, and the station location marker of chained list mark and each data to be converted is merged respectively, with
Determine the key converted in storage organization corresponding with each data to be converted.
For example, extract as Fig. 6 list type linked list data structure in each data to be converted station location marker 1,2,3 with
And the chained list mark of the chained list such as K, and the station location marker of chained list mark and each data to be converted is merged respectively, with true
The fixed key converted in storage organization corresponding with each data to be converted, the key for such as obtaining the data to be converted of first node is K+
1, the key of the data to be converted of second node is K+2, and the key of the data to be converted of third node is K+3.
It is worth determining module 320 to extract and station location marker of each data to be converted in chained list in the adjacent two data of left and right
And value data cell in each data to be converted and adjacent with each data to be converted left and right in chained list by what is extracted
Station location marker in two data merges respectively with the value data cell in each data to be converted extracted, with
The value being determined as in the conversion storage organization of each data to be converted.
For example, example is connected, the position with each data to be converted in chained list in the adjacent two data of left and right that will be extracted
Mark is set, it is to be converted such as first node with extracting if the prior of the data to be converted of first node is -1, next 2
The value data cell a of data is merged, to be determined as in the conversion storage organization of the data to be converted of first node
It is worth to get being " -1,2, a " to the value of the data to be converted of first node;Similarly, the value of the data to be converted of second node is
" 1,3, b ", the value of the data to be converted of third node are " 2, -1, c ".
Data key values to memory module 330 according to conversion storage organization, by key and value composition data key values to store to
In key value database.
For example, connect example, key and value are merged into composition data key-value pair, and by data key values to " K+1-'-1,2, a ' ",
" K+2- ' 1,3, b ' " and " K+3- ' 2, -1, c ' " is stored into key value database.
In a preferred embodiment, as shown in figure 4, the device further includes that structure determination module 410 and structure key-value pair are deposited
Store up module 420;Structure determination module 410 determines structurally interrelated information corresponding with original chained list storage organization in chained list;Structure
Key-value pair memory module 420 will be identified as key with scheduled link table information, be the structure key assignments that value forms with structurally interrelated information
It is stored in association into key value database to each data to be converted in same chained list.
Wherein, structurally interrelated information is specifically including but not limited to:
The quantity of data to be converted in chained list;
Next available station location marker in chained list;
The station location marker of the header data of chained list;
The station location marker of the tail data of chained list.
Wherein, scheduled link table information mark, includes at least:
The chained list of chained list identifies;Variable mark.It is such as identified with the chained list that " K " is chained list, " meta " is variable mark.
For example, connecting example, structurally interrelated information corresponding with storage of linked list structure shown in fig. 6 includes: such as chain in chained list
The quantity of data to be converted in table, the station location marker of the header data of next available station location marker in chained list, chained list and
The station location marker of the tail data of chained list, according to Fig.6, it may be determined that the quantity of the data to be converted in chained list is 3, in chained list
Next available station location marker be 4, the station location marker of the header data of chained list is 1, the station location marker of the tail data of chained list
It is 3, " K is identified with scheduled link table informationmeta" it is key, " 3,4,1,3 " be the structure key-value pair of value composition to structurally interrelated information
“Kmeta' 3,4,1,3 ' " it is stored in association into key value database with each data to be converted in the chained list.Wherein, it ties
Mode is structure key-value pair in association with each data to be converted, the key " K of structure key-value pairmeta" in include be element " K ", respectively
Each key of the data key values of a data to be converted to " K+1- ' -1,2, a ' ", " K+2- ' 1,3, b ' " and " K+3- ' 2, -1, c ' "
Including in " K+1 ", " K+2 " and " K+3 " is element " K ", can establish incidence relation by " K ".
Preferably, which further includes update module (not shown);When to any data key values to be updated into
When row updates operation, update module:
To with the data key values to be updated in the chained list the corresponding data key values pair of two adjacent data of left and right
Accordingly updated;And to the data key values to be updated are corresponding to associated structure key-value pair progress updates.
For example, connecting example, a new node, value is added in the second node in chained list shown in Fig. 6 and third node
Data cell is d, then the station location marker of the prior of second node, can be occurred therewith with the station location marker of the next of third node
Variation, second node data key values corresponding with third node are to being also required to be updated accordingly, the data of former second node
Key-value pair is updated to " K+2- ' 1,4, b ' ", and the data key values of former third node are to being updated to " K+3- ' 4, -1, c ' ";The chained list
Corresponding structure key-value pair is also changed, and the quantity of the data to be converted in chained list after increasing new node is 4, in chained list
Next available station location marker be 5, the station location marker of the header data of chained list is 1, the station location marker of the tail data of chained list
It is 3, " K is identified with scheduled link table informationmeta" it is key, structurally interrelated information " 4,5,1,3 ", therefore corresponding structure key-value pair
It is updated to " Kmeta' 4,5,1,3 ' ", list structure such as Fig. 7 after being added.
In another example connect example, the second node that value data cell is b is deleted in Fig. 7 chained list, then first node
The previous available station location marker of next available station location marker and third node is changed, corresponding data key values to
It needs to be updated accordingly, the data key values of former first node are to being updated to " K+1-'-1,4, a ' " at this time, former third node
Data key values to being updated to " K+4-' 1,3, d ' ";Corresponding structure key-value pair is also changed, after deleting second node
Chained list in the quantity of data to be converted be 3, next available station location marker in chained list is 5, the header data of chained list
Station location marker is 1, and the station location marker of the tail data of chained list is 3, identifies " K with scheduled link table informationmeta" it is key, structure phase
Pass information " 3,5,1,3 ", therefore corresponding structure key-value pair is updated to " Kmeta' 3,5,1,3 ' ", the chained list knot after being deleted
Structure is as shown in Figure 8.
Those skilled in the art of the present technique are appreciated that the present invention includes being related to for executing in operation described herein
One or more equipment.These equipment can specially design and manufacture for required purpose, or also may include general
Known device in computer.These equipment have the computer program being stored in it, these computer programs are selectively
Activation or reconstruct.Such computer program can be stored in equipment (for example, computer) readable medium or be stored in
It e-command and is coupled in any kind of medium of bus respectively suitable for storage, the computer-readable medium includes but not
Be limited to any kind of disk (including floppy disk, hard disk, CD, CD-ROM and magneto-optic disk), ROM (Read-Only Memory, only
Read memory), RAM (Random Access Memory, immediately memory), EPROM (Erasable Programmable
Read-Only Memory, Erarable Programmable Read only Memory), EEPROM (Electrically Erasable
Programmable Read-Only Memory, Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or light card
Piece.It is, readable medium includes by equipment (for example, computer) with any Jie for the form storage or transmission information that can be read
Matter.
Those skilled in the art of the present technique be appreciated that can be realized with computer program instructions these structure charts and/or
The combination of each frame and these structure charts and/or the frame in block diagram and/or flow graph in block diagram and/or flow graph.This technology neck
Field technique personnel be appreciated that these computer program instructions can be supplied to general purpose computer, special purpose computer or other
The processor of programmable data processing method is realized, to pass through the processing of computer or other programmable data processing methods
The scheme specified in frame or multiple frames of the device to execute structure chart and/or block diagram and/or flow graph disclosed by the invention.
Those skilled in the art of the present technique have been appreciated that in the present invention the various operations crossed by discussion, method, in process
Steps, measures, and schemes can be replaced, changed, combined or be deleted.Further, each with having been crossed by discussion in the present invention
Kind of operation, method, other steps, measures, and schemes in process may also be alternated, changed, rearranged, decomposed, combined or deleted.
Further, in the prior art to have and the step in various operations, method disclosed in the present invention, process, measure, scheme
It may also be alternated, changed, rearranged, decomposed, combined or deleted.
The above is only some embodiments of the invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (10)
1. a kind of conversion method of data store organisation characterized by comprising
Extract the station location marker and the chained list of each data to be converted in the same chained list based on original chained list storage organization
Chained list mark, and the chained list is identified and the station location marker of each data to be converted merges respectively, with determination
The key converted in storage organization corresponding with each data to be converted;
It extracts and station location marker of each data to be converted in the chained list in the adjacent two data of left and right and described
Value data cell in each data to be converted, and will extract with each data to be converted in the chained list
Station location marker in the adjacent two data of left and right is distinguished with the value data cell in each data to be converted extracted
It merges, with the value being determined as in the conversion storage organization of each data to be converted;
According to the conversion storage organization, by data key values that the key and described value form to storing into key value database.
2. the conversion method of data store organisation according to claim 1, wherein this method further include:
Determine structurally interrelated information corresponding with original chained list storage organization in the chained list;
By with scheduled link table information be identified as key, take the structurally interrelated information as the structure key-value pair that form of value with it is described together
Each data to be converted in one chained list are stored into key value database in association.
3. the conversion method of data store organisation according to claim 2, wherein the structurally interrelated information at least wraps
It includes:
The quantity of data to be converted in the chained list;
Next available station location marker in the chained list;
The station location marker of the header data of the chained list;
The station location marker of the tail data of the chained list.
4. the conversion method of data store organisation according to claim 2 or 3, wherein the scheduled link table information mark
Knowledge includes at least:
The chained list of the chained list identifies;Variable mark.
5. the conversion method of data store organisation according to claim 2, wherein this method further include:
When to any data key values to be updated to operation is updated, to the data key values to be updated with this to described
The adjacent corresponding data key values of two data in left and right are to accordingly being updated in chained list,
And to the data key values to be updated are corresponding to associated structure key-value pair progress updates.
6. a kind of conversion equipment of data store organisation characterized by comprising
Key determining module, the position for extracting each data to be converted in the same chained list based on original chained list storage organization are marked
Know and the chained list chained list mark, and by the chained list identify and the station location marker of each data to be converted respectively into
Row merges, with the determining key converted in storage organization corresponding with each data to be converted;
It is worth determining module, for extracting and position of each data to be converted in the chained list in the adjacent two data of left and right
The value data cell in mark and each data to be converted is set, and by extracting with each number to be converted
According in the station location marker in the chained list in the adjacent two data of left and right and each data to be converted extracted
Value data cell merges respectively, with the value being determined as in the conversion storage organization of each data to be converted;
Data key values are used for the data key that according to the conversion storage organization, the key and described value are formed to memory module
Value is to storing into key value database.
7. the conversion equipment of data store organisation according to claim 6, wherein the device further include:
Structure determination module, for determining structurally interrelated information corresponding with original chained list storage organization in the chained list;
Structure key-value pair memory module, for key will to be identified as with scheduled link table information, with the structurally interrelated information for value
Each data to be converted in the structure key-value pair of composition and the same chained list are stored into key value database in association.
8. the conversion equipment of data store organisation according to claim 7, wherein the structurally interrelated information at least wraps
It includes:
The quantity of data to be converted in the chained list;
Next available station location marker in the chained list;
The station location marker of the header data of the chained list;
The station location marker of the tail data of the chained list.
9. the conversion equipment of data store organisation according to claim 7 or 8, wherein the scheduled link table information mark
Knowledge includes at least:
The chained list of the chained list identifies;Variable mark.
10. the conversion equipment of data store organisation according to claim 9, wherein the device further includes update module:
Update module, for when to any data key values to be updated to operation is updated, to the data to be updated with this
The adjacent corresponding data key values of two data in key-value pair left and right in the chained list are waited for this to accordingly being updated
The data key values of update accordingly update associated structure key-value pair.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510674542.1A CN105389334B (en) | 2015-10-16 | 2015-10-16 | The conversion method and device of data store organisation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510674542.1A CN105389334B (en) | 2015-10-16 | 2015-10-16 | The conversion method and device of data store organisation |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105389334A CN105389334A (en) | 2016-03-09 |
CN105389334B true CN105389334B (en) | 2019-03-01 |
Family
ID=55421624
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510674542.1A Active CN105389334B (en) | 2015-10-16 | 2015-10-16 | The conversion method and device of data store organisation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105389334B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106777293A (en) * | 2016-12-29 | 2017-05-31 | 北京奇虎科技有限公司 | Data storage and lookup method and device |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104216961A (en) * | 2014-08-21 | 2014-12-17 | 北京奇艺世纪科技有限公司 | Method and device for data processing |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7305404B2 (en) * | 2003-10-21 | 2007-12-04 | United Parcel Service Of America, Inc. | Data structure and management system for a superset of relational databases |
JP5344543B2 (en) * | 2008-06-11 | 2013-11-20 | 任天堂株式会社 | Data processing program and data processing apparatus |
-
2015
- 2015-10-16 CN CN201510674542.1A patent/CN105389334B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104216961A (en) * | 2014-08-21 | 2014-12-17 | 北京奇艺世纪科技有限公司 | Method and device for data processing |
Also Published As
Publication number | Publication date |
---|---|
CN105389334A (en) | 2016-03-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109034809B (en) | Block chain generation method and device, block chain node and storage medium | |
CN101996250B (en) | Hadoop-based mass stream data storage and query method and system | |
CN103577440B (en) | A kind of data processing method and device in non-relational database | |
CN105260464B (en) | The conversion method and device of data store organisation | |
US20160314161A1 (en) | Multi-Version Concurrency Control Method in Database and Database System | |
CN102929936B (en) | Log recording method, log inquiring method and system | |
CN105900093B (en) | A kind of update method of the tables of data of KeyValue databases and table data update apparatus | |
CN106164865A (en) | Affairs batch processing for the dependency perception that data replicate | |
CN102831222A (en) | Differential compression method based on data de-duplication | |
CN106156070B (en) | A kind of querying method, file mergences method and relevant apparatus | |
CN106933836B (en) | Data storage method and system based on sub-tables | |
CN106599104A (en) | Mass data association method based on redis cluster | |
CN104111955A (en) | Combined inquiring method oriented to Hbase database | |
CN104572809B (en) | A kind of distributed relational database spread method | |
CN109194646A (en) | A kind of safety certification data access method based on block chain | |
CN105302889B (en) | The conversion method and device of data store organisation | |
CN110427364A (en) | A kind of data processing method, device, electronic equipment and storage medium | |
CN105488471B (en) | A kind of font recognition methods and device | |
CN106844233A (en) | A kind of router service data caching method and system based on Hash table | |
CN104461774B (en) | Asynchronous replication method, apparatus and system | |
CN105389334B (en) | The conversion method and device of data store organisation | |
CN105787090A (en) | Index building method and system of OLAP system of electric data | |
CN109388635A (en) | A kind of data storage method of the multi-value data based on binary system and dictionary table | |
CN105045891A (en) | Method and system for improving performance of sequence list, architecture, optimization method and storage apparatus | |
CN108628892B (en) | Method and device for storing ordered data, electronic equipment and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220718 Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015 Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park) Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Patentee before: Qizhi software (Beijing) Co.,Ltd. |
|
TR01 | Transfer of patent right |