CN109408509A - Date storage method, device and computer equipment - Google Patents
Date storage method, device and computer equipment Download PDFInfo
- Publication number
- CN109408509A CN109408509A CN201811201270.3A CN201811201270A CN109408509A CN 109408509 A CN109408509 A CN 109408509A CN 201811201270 A CN201811201270 A CN 201811201270A CN 109408509 A CN109408509 A CN 109408509A
- Authority
- CN
- China
- Prior art keywords
- data
- memory
- stored
- node
- index
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Abstract
The present invention provides a kind of date storage method, device and computer equipments, belong to technical field of data storage.Date storage method provided in an embodiment of the present invention, device and computer equipment, it is provided with multiple memory nodes, and the incidence relation of data type and memory node is pre-saved in the index, when receiving data to be stored, the corresponding data type of data to be stored can be determined according to indexing, and target storage node is found according to determining data type in the index, to store data to be stored to target storage node, it may be implemented through multiple memory nodes dispersedly storing data, reduce the data volume stored on single memory node, improve data access speed.
Description
Technical field
The present invention relates to technical field of data storage, in particular to a kind of data storage method of adjustment, device and meter
Calculate machine equipment.
Background technique
With the rise of big data, data are stored using database and are widely applied.But as needs are deposited
The data of storage are more and more, and the data volume of databases storage is excessive, and the amount of access of database also increases with it, and increases
Database externally provides the pressure of service, reduces data access speed.
Summary of the invention
For above-mentioned problems of the prior art, the present invention provides a kind of date storage method, device and calculating
Machine equipment may be implemented to reduce the data volume stored on single memory node by multiple memory nodes dispersedly storing data,
Improve data access speed.
In a first aspect, the embodiment of the invention provides a kind of date storage methods, wherein include:
Receive data to be stored;
Index is obtained, the index is the incidence relation of data type and memory node;
The corresponding data type of the data to be stored is determined based on the index;
Target storage node is found in the index based on determining data type;
The data to be stored is stored to the target storage node.
With reference to first aspect, the embodiment of the invention provides the first possible embodiments of first aspect, wherein
The data to be stored includes at least one data field;
Data type in the index includes: at least one critical field.
The possible embodiment of with reference to first aspect the first, the embodiment of the invention provides second of first aspect
Possible embodiment, wherein
It is described that the corresponding data type of the data to be stored is determined based on the index, comprising:
If all critical fielies can be in the data to be stored in a data type in the index
It is fitted on identical data field, then determines that the data to be stored belongs to the data type.
The possible embodiment of second with reference to first aspect, the embodiment of the invention provides the third of first aspect
Possible embodiment, wherein
Each critical field includes: keyword and the first respective value;
Each data field includes: tag name and the second respective value;
If the keyword of a critical field is identical with the tag name of one data word section, and the first respective value and second
Respective value is identical, then determines that the critical field is identical as the data field.
Any one embodiment into the third possible embodiment of first aspect with reference to first aspect, this hair
Bright embodiment provides the 4th kind of possible embodiment of first aspect, wherein
It is described that target storage node is found in the index based on determining data type, further includes:
If a memory node is found in the index based on determining data type, it is determined that the memory node
In data type corresponding with the data to be stored memory space;
If the memory space is less than, the memory node found is determined as the target storage node;
If the memory space has been expired, a memory node is increased newly, and the newly-increased memory node is determined as
The target storage node, and increase in the index incidence relation of the data type and newly-increased memory node.
The 4th kind of possible embodiment with reference to first aspect, the embodiment of the invention provides the 5th kind of first aspect
Possible embodiment, wherein
By judging that the memory space has been expired in lower section method:
Obtain amount of storage threshold value corresponding with the memory space and currently stored magnitude;
If the currently stored magnitude is less than the amount of storage threshold value, determine that the memory space is less than, otherwise, then
Determine that memory space has been expired.
Any one embodiment into the third possible embodiment of first aspect with reference to first aspect, this hair
Bright embodiment provides the 6th kind of possible embodiment of first aspect, wherein
It is described that target storage node is found in the index based on determining data type, if further including based on determination
Data type multiple memory nodes are found in the index, then by the following method from multiple memory nodes determine one
For the target storage node:
Determine the memory space of data type corresponding with the data to be stored in each memory node;
Select the maximum memory node of memory space surplus as target storage node from multiple memory nodes.
The 6th kind of possible embodiment with reference to first aspect, the embodiment of the invention provides the 7th kind of first aspect
Possible embodiment, wherein
The surplus of the memory space is determined by the following method:
Obtain amount of storage threshold value corresponding with the memory space and currently stored magnitude;
Ratio calculation is carried out to currently stored magnitude and amount of storage threshold value;
The surplus of the memory space is determined based on the ratio.
Second aspect, the embodiment of the invention also provides a kind of data storage devices, wherein described device includes:
Data reception module, for receiving data to be stored;
Index obtains module, and for obtaining index, the index is the incidence relation of data type and memory node;
Data memory module, for determining the corresponding data type of the data to be stored based on the index;Based on true
Fixed data type finds target storage node in the index;The data to be stored is stored to the target to store and is saved
Point.
In conjunction with second aspect, the embodiment of the invention provides the first possible embodiments of second aspect, wherein
The data to be stored includes at least one data field;Data type in the index includes at least one pass
Key field.
In conjunction with the first possible embodiment of second aspect, the embodiment of the invention provides second of second aspect
Possible embodiment, wherein
The data memory module is also used to: if critical field all in a data type in the index is equal
It can be matched to identical data field in the data to be stored, then determine that the data to be stored belongs to the data type.
In conjunction with second of possible embodiment of second aspect, the embodiment of the invention provides the third of second aspect
Possible embodiment, wherein each critical field includes: keyword and the first respective value;Each data field
It include: tag name and the second respective value;The data memory module is also used to: if the keyword of critical field and one
The tag name of data field is identical, and the first respective value is identical with the second respective value, then determines the critical field and the number
It is identical according to field.
In conjunction with second aspect to second aspect the third possible embodiment in any one embodiment, this hair
Bright embodiment provides the 4th kind of possible embodiment of second aspect, wherein the data memory module is also used to: if
A memory node is found in the index based on determining data type, it is determined that with described wait deposit in the memory node
Store up the memory space of the corresponding data type of data;If the memory space is less than, the memory node found is determined as
The target storage node;If the memory space has been expired, a memory node, and the storage section that will be increased newly are increased newly
Point is determined as the target storage node, and increases in the index being associated with for the data type and the memory node that increases newly
Relationship.
In conjunction with the 4th kind of possible embodiment of second aspect, the embodiment of the invention provides the 5th kind of second aspect
Possible embodiment, wherein the data memory module is also used to: amount of storage threshold value corresponding with the memory space is obtained
With currently stored magnitude;If the currently stored magnitude is less than the amount of storage threshold value, determine that the memory space is less than,
Otherwise, then determine that memory space has been expired.
In conjunction with second aspect to second aspect the third possible embodiment in any one embodiment, this hair
Bright embodiment provides the 6th kind of possible embodiment of second aspect, wherein the data memory module is also used to: determining
The memory space of data type corresponding with the data to be stored in each memory node;It is selected from multiple memory nodes
The maximum memory node of memory space surplus is selected as target storage node.
In conjunction with kind of possible embodiment of second aspect, the 7th kind the embodiment of the invention provides second aspect can
Can embodiment, wherein the data memory module is also used to: obtain corresponding with memory space amount of storage threshold value and
Currently stored magnitude;Ratio calculation is carried out to currently stored magnitude and amount of storage threshold value;The storage is determined based on the ratio
The surplus in space.
The third aspect, the embodiment of the invention also provides a kind of computer equipments, wherein including processor and memory,
The machine-executable instruction that can be executed by the processor is stored in the memory, the processor executes the machine
Executable instruction is to realize method described in any one of first aspect.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, wherein the computer can
It reads storage medium and is stored with machine-executable instruction, the machine-executable instruction is described when being called and being executed by processor
Machine-executable instruction promotes described in any item methods of the processor realization first aspect.
The embodiment of the present invention bring it is following the utility model has the advantages that
Date storage method, device and computer equipment provided in an embodiment of the present invention are provided with multiple memory nodes, and
The incidence relation of data type and memory node is pre-saved in the index, it, can basis when receiving data to be stored
It indexes and determines the corresponding data type of data to be stored, and target storage section is found according to determining data type in the index
Point may be implemented dispersedly to store number by multiple memory nodes to storing data to be stored to target storage node
According to reducing the data volume stored on single memory node, improve data access speed.
Other features and advantages of the present invention will illustrate in the following description, also, partly become from specification
It obtains it is clear that understand through the implementation of the invention.The objectives and other advantages of the invention are in specification, claims
And specifically noted structure is achieved and obtained in attached drawing.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate
Appended attached drawing, is described in detail below.
Detailed description of the invention
It, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical solution in the prior art
Embodiment or attached drawing needed to be used in the description of the prior art be briefly described, it should be apparent that, it is described below
Attached drawing is some embodiments of the present invention, for those of ordinary skill in the art, before not making the creative labor
It puts, is also possible to obtain other drawings based on these drawings.
Fig. 1 is the flow chart of date storage method provided by one embodiment of the invention;
Fig. 2 is the flow chart of step S108 in Fig. 1;
Fig. 3 is the structural block diagram of data storage device provided by another embodiment of the present invention;
Fig. 4 is a kind of structural block diagram of computer equipment provided by one embodiment of the invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention
Technical solution be clearly and completely described, it is clear that described embodiments are some of the embodiments of the present invention, rather than
Whole embodiments.The component of embodiments of the present invention, which are generally described and illustrated herein in the accompanying drawings can be matched with a variety of different
It sets to arrange and design.Therefore, the detailed description of the embodiment of the present invention provided in the accompanying drawings is not intended to limit below
The range of claimed invention, but it is merely representative of selected embodiment of the invention.Based on the embodiments of the present invention, originally
Field those of ordinary skill every other embodiment obtained without making creative work, belongs to the present invention
The range of protection.
For the problem that the data volume of existing databases storage is excessive, the access speed of database, this hair are reduced
Bright embodiment provides a kind of date storage method, device and computer equipment, below first to data storage side of the invention
Method describes in detail.
Embodiment one
A kind of date storage method is present embodiments provided, is applied in database, it may also be said to applied to database
Management node.Illustratively, which can use unstructured database, such as ES (ElasticSearch) database,
ES database is the open source system for having search engine and NoSQL database function concurrently, is based on Java/Lucene language structure
It builds, can be used for full-text search, structured search and in real time analysis.
As shown in Figure 1, this method comprises the following steps:
Step S102 receives data to be stored.
The management node of database receives data to be stored.It may include one or more data words in data to be stored
Section, each data field includes tag name and the second respective value.
Step S104 obtains index.
Wherein, the incidence relation of data type and memory node is stored in index.Index can store in the database
In corresponding caching, for example, the caching can be redis (data structure buffer).The management node of database is receiving
After data to be stored, index is read from caching.Compared with reading index from memory node or from hard disk, read from caching
Index, reading speed is faster.
In an alternative embodiment, index can be using the form storing data type of table and the pass of memory node
Connection relationship, as shown in table 1.
Table 1
Data type | Memory node |
Type=1, area=2, user=3; | Node1 |
Type=4, area=5, user=6; | Node2 |
Type=7, area=8, user=9; | Node3、Node4 |
From table 1 it follows that the data type in index includes one or more critical fielies, each critical field packet
Include keyword and the first respective value.Such as index in the first data type include three critical fielies, be respectively as follows: type=1,
Area=2, user=3.
Step S106 determines the corresponding data type of data to be stored based on indexing.
If the keyword of a critical field is identical with the tag name of one data word section, and first pair of the keyword
It should be worth identical with the second respective value of the tag name, then it is assumed that the critical field is identical as the data field.If in index
All critical fielies can be matched to identical data field in data to be stored in one data type, then determine wait deposit
Storage data belong to the data type.
Step S108 finds target storage node based on determining data type in the index.
It, can based on determining data type due to being stored with the incidence relation of data type and memory node in index
To find corresponding memory node in the index, using the memory node found as target storage node.
Step S110 stores data to be stored to target storage node.
Optionally, above-mentioned steps S108 can be realized using mode shown in Fig. 2, comprising:
Step S1081 searches target storage node based on determining data type in the index.
Whether step S1082 judges the target storage node found only comprising a memory node;If so, executing
Step S1083;If not, executing step S1087.
Step S1083 determines the memory space of data type corresponding with data to be stored in the memory node.
In an alternative embodiment, the memory space parameter of each memory node, including storage are stored in caching
The corresponding amount of storage threshold value in space and currently stored magnitude.The memory space parameter of each memory node, which can store, to be indexed
In.Illustratively, the memory space parameter of each memory node in index shown in table 1 are as follows: Node1: amount of storage threshold value
200, currently stored magnitude 100;Node2: amount of storage threshold value 200, currently stored magnitude 200;Node3: amount of storage threshold value 200,
Currently stored magnitude 100;Node4: amount of storage threshold value 200, currently stored magnitude 150.
Step S1084, judges whether the memory space has expired;If so, executing step S1086;If not, executing step
S1085。
It can judge whether memory space has expired by following steps: obtain amount of storage threshold value corresponding with memory space
With currently stored magnitude, the corresponding amount of storage threshold value of memory space and currently stored magnitude can be read from caching.If worked as
Preceding storage magnitude is less than amount of storage threshold value, then determines that memory space is less than, otherwise, then determine that memory space has been expired.
The memory node found is determined as target storage node by step S1085.
For example, when the data to be stored obtained is < type=1;Area=2;User=3;... ... > when, the rope of acquisition
Draw as shown in table 1, can determine that the corresponding data type of data to be stored is the first data type in index according to index:
Type=1, area=2, user=3, the corresponding memory node of the data type are Node1.Depositing for Node1 is obtained from caching
Store up spatial parameter are as follows: amount of storage threshold value 200, currently stored magnitude 100.Since currently stored magnitude 100 is less than amount of storage threshold value
200, therefore, the memory space of the memory node is less than, using Node1 as target storage node, by data to be stored store to
Node1。
Step S1086, increases a memory node newly, and newly-increased memory node is determined as target storage node, and
Increase the incidence relation of data type and newly-increased memory node in index.
For example, when the data to be stored obtained is < type=4, area=5, user=6;... ... > when, the rope of acquisition
Draw as shown in table 1, can determine that the corresponding data type of data to be stored is second of data type in index according to index:
Type=4, area=5, user=6, the corresponding memory node of the data type are Node2.Node2 node is obtained from caching
Memory space parameter are as follows: amount of storage threshold value 200, currently stored magnitude 200.Since currently stored magnitude 200 is not less than storage
Threshold value 200 is measured, therefore, the memory space of the memory node has been expired, and can increase a memory node Node5 newly, and in the index
Second of data type (type=4, area=5, user=6) corresponding to increase memory node Node5 in memory node.
Data to be stored is stored to Node5.
Step S1087 determines the memory space of data type corresponding with data to be stored in each memory node.
If the target storage node found include multiple memory nodes, determine in each memory node with number to be stored
According to the memory space of corresponding data type.
Step S1088 selects the maximum memory node of memory space surplus to deposit as target from multiple memory nodes
Store up node.
It is also possible to obtain amount of storage threshold value corresponding with memory space and currently stored magnitude from caching;To current
It stores magnitude and amount of storage threshold value carries out ratio calculation;The surplus of memory space is determined based on ratio, selects memory space surplus
The maximum memory node of surplus is as target storage node.
For example, when the data to be stored obtained is < type=7, area=8, user=9;... ... > when, the rope of acquisition
Draw as shown in table 1, can determine that the corresponding data type of data to be stored is the third data type in index according to index:
Type=7, area=8, user=9, and the corresponding memory node of the data type is Node3 and Node4.It is obtained from caching
The memory space parameter of Node3 are as follows: amount of storage threshold value 200, currently stored magnitude 100;The memory space parameter of Node4 are as follows: deposit
Reserves threshold value 200, currently stored magnitude 150.The memory space surplus that Node3 is calculated is depositing for 100/200, Node4
Storing up Spatial Residual amount is 150/200, it can be seen that memory space of the memory space surplus of Node3 greater than Node4 is remaining
Amount.Therefore, using Node3 as target storage node, data to be stored is stored to Node3.
Date storage method provided in an embodiment of the present invention is provided with multiple memory nodes, and by data type and stores
The incidence relation of node pre-saves in the index, when receiving data to be stored, can determine number to be stored according to index
Target storage node is found in the index according to corresponding data type, and according to determining data type, thus will number be stored
According to storing to target storage node, may be implemented to reduce single storage section by multiple memory nodes dispersedly storing data
The data volume stored on point improves data access speed, meanwhile, achieve the effect that the data storage in database is balanced.
Embodiment two
With above method embodiment correspondingly, present embodiments provide a kind of data storage device, as shown in figure 3, should
Device includes:
Data reception module 31, for receiving data to be stored.
Index obtains module 32, for obtaining index, indexes the incidence relation for data type and memory node.
Data memory module 33, for determining the corresponding data type of data to be stored based on index;Based on determining number
Target storage node is found in the index according to type;Data to be stored is stored to target storage node.
Above-mentioned data to be stored includes at least one data field;Data type in index includes at least one keyword
Section.
Further, above-mentioned data memory module 33 is also used to: if all pass in a data type in index
Key field can be matched to identical data field in data to be stored, then determine that data to be stored belongs to the data type.
Each critical field includes: keyword and the first respective value;Each data field includes: that tag name and second are corresponding
Value;Above-mentioned data memory module is also used to: if the keyword of a critical field is identical with the tag name of one data word section,
And first respective value it is identical with the second respective value, then determine that critical field is identical as data field.
Above-mentioned data memory module 33 is also used to: if finding a storage section in the index based on determining data type
Point, it is determined that the memory space of data type corresponding with data to be stored in memory node;It, will if memory space is less than
The memory node found is determined as target storage node;If memory space has been expired, a memory node is increased newly, and will increase newly
Memory node be determined as target storage node, and increase data type in the index and be associated with the memory node increased newly
System.
Above-mentioned data memory module 33 is also used to: obtaining amount of storage threshold value corresponding with memory space and currently stored amount
Value;If currently stored magnitude is less than amount of storage threshold value, determines that memory space is less than, otherwise, then determine that memory space has been expired.
Above-mentioned data memory module 33 is also used to: determining data type corresponding with data to be stored in each memory node
Memory space;Select the maximum memory node of memory space surplus as target storage node from multiple memory nodes.
Above-mentioned data memory module 33 is also used to: obtaining amount of storage threshold value corresponding with memory space and currently stored amount
Value;Ratio calculation is carried out to currently stored magnitude and amount of storage threshold value;The surplus of memory space is determined based on ratio.
Data storage device provided in an embodiment of the present invention is provided with multiple memory nodes, and by data type and stores
The incidence relation of node pre-saves in the index, when receiving data to be stored, can determine number to be stored according to index
Target storage node is found in the index according to corresponding data type, and according to determining data type, thus will number be stored
According to storing to target storage node, may be implemented to reduce single storage section by multiple memory nodes dispersedly storing data
The data volume stored on point improves data access speed, meanwhile, achieve the effect that the data storage in database is balanced.
Embodiment three
On the basis of the above embodiments, the embodiment of the present disclosure additionally provides a kind of computer equipment, as shown in figure 4, should
Computer equipment includes processor 41, memory 42 and bus 43.Wherein, memory 42, can be used for storing software program and
Module, as the corresponding program instruction/module of the data storage device in the embodiment of the present invention and processor 41 pass through operation and deposit
The software program and module in memory 42 are stored up, thereby executing corresponding various function application and data processing, such as this hair
The date storage method that bright embodiment provides, memory 42 can mainly include storing program area and storage data area, wherein storage
It program area can application program (date storage method of such as embodiment of the present invention) needed for storage program area, at least one function
Deng;Storage data area, which can be stored, uses created data (such as various embodiment data) etc. according to display equipment.In addition,
Memory 42 may include high-speed random access memory, can also include nonvolatile memory, for example, at least a disk
Memory device, flush memory device or other volatile solid-state parts.
Processor 41 is the control centre of the electronic equipment, utilizes each portion of various interfaces and connection whole equipment
Point, by running or execute the software program and/or module that are stored in memory 42, and calls and be stored in memory 42
Data, perform various functions and handle data, thus to electronic equipment carry out integral monitoring.Optionally, processor 41 can wrap
Include one or more processing units.
Bus 43 connects the modules unit of the computer equipment, the control instruction letter for issuing to processor 41
Breath, and the information that memory 42 stores is transferred to processor 41.
Computer equipment provided in an embodiment of the present invention may also include the more or less component than shown in Fig. 4, or
Person has the configuration different from shown in Fig. 4.Each component shown in Fig. 4 can be realized using hardware, software, or its combination.
Further, the embodiment of the invention also provides a kind of machine readable storage medium, the machine readable storage mediums
It is stored with machine-executable instruction, when being called and being executed by processor, machine-executable instruction promotees the machine-executable instruction
Processor is set to realize above-mentioned data back up method.
Date storage method, device and computer equipment technical characteristic having the same provided in an embodiment of the present invention, institute
Also can solve identical technical problem, reach identical technical effect.
It should be noted that in embodiment provided by the present invention, it should be understood that disclosed system and method, it can
To realize by another way.The apparatus embodiments described above are merely exemplary, for example, the unit is drawn
Point, only a kind of logical function partition, there may be another division manner in actual implementation, in another example, multiple units or group
Part can be combined or can be integrated into another system, or some features can be ignored or not executed.It is described to be used as separation unit
The unit that part illustrates may or may not be physically separated, and component shown as a unit can be or can also
Not to be physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to reality
Needs some or all of the units may be selected to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in embodiment provided by the invention can integrate in one processing unit, it can also
To be that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product
It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a
People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.
In addition, term " first ", " second ", " third " are used for description purposes only, it is not understood to indicate or imply phase
To importance.
Finally, it should be noted that embodiment described above, only a specific embodiment of the invention, to illustrate the present invention
Technical solution, rather than its limitations, scope of protection of the present invention is not limited thereto, although with reference to the foregoing embodiments to this hair
It is bright to be described in detail, those skilled in the art should understand that: anyone skilled in the art
In the technical scope disclosed by the present invention, it can still modify to technical solution documented by previous embodiment or can be light
It is readily conceivable that variation or equivalent replacement of some of the technical features;And these modifications, variation or replacement, do not make
The essence of corresponding technical solution is detached from the spirit and scope of technical solution of the embodiment of the present invention, should all cover in protection of the invention
Within the scope of.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (18)
1. a kind of date storage method characterized by comprising
Receive data to be stored;
Index is obtained, the index is the incidence relation of data type and memory node;
The corresponding data type of the data to be stored is determined based on the index;
Target storage node is found in the index based on determining data type;
The data to be stored is stored to the target storage node.
2. storage method according to claim 1, which is characterized in that
The data to be stored includes at least one data field;
Data type in the index includes at least one critical field.
3. storage method according to claim 2, which is characterized in that described to determine the number to be stored based on the index
According to corresponding data type, comprising:
If all critical fielies can be matched in the data to be stored in a data type in the index
Identical data field then determines that the data to be stored belongs to the data type.
4. storage method according to claim 3, which is characterized in that
Each critical field includes: keyword and the first respective value;
Each data field includes: tag name and the second respective value;
If the keyword of a critical field is identical with the tag name of one data word section, and the first respective value and second corresponds to
It is worth identical, then determines that the critical field is identical as the data field.
5. storage method according to claim 1-4, which is characterized in that described to be existed based on determining data type
Target storage node is found in the index, further includes:
If a memory node is found in the index based on determining data type, it is determined that in the memory node with
The memory space of the corresponding data type of the data to be stored;
If the memory space is less than, the memory node found is determined as the target storage node;
If the memory space has been expired, a memory node is increased newly, and the newly-increased memory node is determined as described
Target storage node, and increase in the index incidence relation of the data type and newly-increased memory node.
6. storage method according to claim 5, which is characterized in that by having judged the memory space in lower section method
It is full:
Obtain amount of storage threshold value corresponding with the memory space and currently stored magnitude;
If the currently stored magnitude is less than the amount of storage threshold value, determines that the memory space is less than, otherwise, then determine
Memory space has been expired.
7. storage method according to claim 1-4, which is characterized in that described to be existed based on determining data type
Target storage node is found in the index, if further including finding multiple deposit in the index based on determining data type
Node is stored up, then determines that one is the target storage node from multiple memory nodes by the following method:
Determine the memory space of data type corresponding with the data to be stored in each memory node;
Select the maximum memory node of memory space surplus as target storage node from multiple memory nodes.
8. storage method according to claim 7, which is characterized in that by determining the memory space in lower section method
Surplus:
Obtain amount of storage threshold value corresponding with the memory space and currently stored magnitude;
Ratio calculation is carried out to currently stored magnitude and amount of storage threshold value;
The surplus of the memory space is determined based on the ratio.
9. a kind of data storage device characterized by comprising
Data reception module, for receiving data to be stored;
Index obtains module, and for obtaining index, the index is the incidence relation of data type and memory node;
Data memory module, for determining the corresponding data type of the data to be stored based on the index;Based on determining
Data type finds target storage node in the index;The data to be stored is stored to the target storage node.
10. device according to claim 9, which is characterized in that the data to be stored includes at least one data field;
Data type in the index includes at least one critical field.
11. device according to claim 10, which is characterized in that the data memory module is also used to: if the rope
All critical fielies can be matched to identical data field in the data to be stored in the data type drawn,
Then determine that the data to be stored belongs to the data type.
12. device according to claim 11, which is characterized in that each critical field includes: keyword and first
Respective value;Each data field includes: tag name and the second respective value;The data memory module is also used to: if one
The keyword of a critical field is identical with the tag name of one data word section, and the first respective value is identical with the second respective value, then
Determine that the critical field is identical as the data field.
13. the device according to claim 9~12, which is characterized in that the data memory module is also used to: if be based on
Determining data type finds a memory node in the index, it is determined that in the memory node with the number to be stored
According to the memory space of corresponding data type;If the memory space is less than, the memory node found is determined as described
Target storage node;If the memory space has been expired, a memory node is increased newly, and the newly-increased memory node is true
It is set to the target storage node, and increases in the index being associated with for the data type and newly-increased memory node
System.
14. device according to claim 13, which is characterized in that the data memory module is also used to: obtain with it is described
The corresponding amount of storage threshold value of memory space and currently stored magnitude;If the currently stored magnitude is less than the amount of storage threshold
Value, then determine that the memory space is less than, otherwise, then determine that memory space has been expired.
15. the device according to claim 9~12, which is characterized in that the data memory module is also used to: determining each
The memory space of data type corresponding with the data to be stored in the memory node;It selects to deposit from multiple memory nodes
The maximum memory node of Spatial Residual amount is stored up as target storage node.
16. device according to claim 15, which is characterized in that the data memory module is also used to: obtain with it is described
The corresponding amount of storage threshold value of memory space and currently stored magnitude;Radiometer is carried out to currently stored magnitude and amount of storage threshold value
It calculates;The surplus of the memory space is determined based on the ratio.
17. a kind of computer equipment, which is characterized in that including processor and memory, being stored in the memory can be by
The machine-executable instruction that the processor executes, the processor execute the machine-executable instruction to realize claim
Method described in any one of 1 to 8.
18. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has machine that can hold
Row instruction, for the machine-executable instruction when being called and being executed by processor, the machine-executable instruction promotes the place
It manages device and realizes method described in any item of the claim 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811201270.3A CN109408509A (en) | 2018-10-15 | 2018-10-15 | Date storage method, device and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811201270.3A CN109408509A (en) | 2018-10-15 | 2018-10-15 | Date storage method, device and computer equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109408509A true CN109408509A (en) | 2019-03-01 |
Family
ID=65467274
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811201270.3A Pending CN109408509A (en) | 2018-10-15 | 2018-10-15 | Date storage method, device and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109408509A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110658779A (en) * | 2019-10-09 | 2020-01-07 | 翼石电子股份有限公司 | PLC data storage method and device |
CN111142806A (en) * | 2019-12-31 | 2020-05-12 | 北京三快在线科技有限公司 | Vehicle data storage method, device, equipment and storage medium |
CN111404978A (en) * | 2019-09-06 | 2020-07-10 | 杭州海康威视系统技术有限公司 | Data storage method and cloud storage system |
CN111552441A (en) * | 2020-04-29 | 2020-08-18 | 重庆紫光华山智安科技有限公司 | Data storage method and device, main node and distributed system |
CN112084250A (en) * | 2020-09-15 | 2020-12-15 | 深圳市宝能投资集团有限公司 | Data storage method, data query method and electronic equipment |
CN112434039A (en) * | 2020-11-30 | 2021-03-02 | 浙江大华技术股份有限公司 | Data storage method, device, storage medium and electronic device |
CN114661249A (en) * | 2022-05-26 | 2022-06-24 | 深圳高灯计算机科技有限公司 | Data storage method and device, computer equipment and storage medium |
CN117082083A (en) * | 2023-08-30 | 2023-11-17 | 杭州浩联智能科技有限公司 | Data storage method, device and medium based on distributed Internet of things architecture |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2010148415A1 (en) * | 2009-06-19 | 2010-12-23 | Blekko, Inc. | Scalable cluster database |
CN107015985A (en) * | 2016-01-27 | 2017-08-04 | 阿里巴巴集团控股有限公司 | A kind of data storage and acquisition methods and device |
CN107092439A (en) * | 2017-03-07 | 2017-08-25 | 华为技术有限公司 | A kind of method and apparatus of data storage |
CN108052290A (en) * | 2017-12-13 | 2018-05-18 | 北京百度网讯科技有限公司 | For storing the method and apparatus of data |
CN108093207A (en) * | 2016-11-23 | 2018-05-29 | 杭州海康威视数字技术股份有限公司 | A kind of data storage, acquisition methods and device |
CN108334288A (en) * | 2017-11-29 | 2018-07-27 | 成都野望数码科技有限公司 | Date storage method and device |
-
2018
- 2018-10-15 CN CN201811201270.3A patent/CN109408509A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2010148415A1 (en) * | 2009-06-19 | 2010-12-23 | Blekko, Inc. | Scalable cluster database |
CN107015985A (en) * | 2016-01-27 | 2017-08-04 | 阿里巴巴集团控股有限公司 | A kind of data storage and acquisition methods and device |
CN108093207A (en) * | 2016-11-23 | 2018-05-29 | 杭州海康威视数字技术股份有限公司 | A kind of data storage, acquisition methods and device |
CN107092439A (en) * | 2017-03-07 | 2017-08-25 | 华为技术有限公司 | A kind of method and apparatus of data storage |
CN108334288A (en) * | 2017-11-29 | 2018-07-27 | 成都野望数码科技有限公司 | Date storage method and device |
CN108052290A (en) * | 2017-12-13 | 2018-05-18 | 北京百度网讯科技有限公司 | For storing the method and apparatus of data |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111404978A (en) * | 2019-09-06 | 2020-07-10 | 杭州海康威视系统技术有限公司 | Data storage method and cloud storage system |
CN110658779A (en) * | 2019-10-09 | 2020-01-07 | 翼石电子股份有限公司 | PLC data storage method and device |
CN111142806A (en) * | 2019-12-31 | 2020-05-12 | 北京三快在线科技有限公司 | Vehicle data storage method, device, equipment and storage medium |
CN111552441A (en) * | 2020-04-29 | 2020-08-18 | 重庆紫光华山智安科技有限公司 | Data storage method and device, main node and distributed system |
CN111552441B (en) * | 2020-04-29 | 2023-02-28 | 重庆紫光华山智安科技有限公司 | Data storage method and device, main node and distributed system |
CN112084250A (en) * | 2020-09-15 | 2020-12-15 | 深圳市宝能投资集团有限公司 | Data storage method, data query method and electronic equipment |
CN112434039A (en) * | 2020-11-30 | 2021-03-02 | 浙江大华技术股份有限公司 | Data storage method, device, storage medium and electronic device |
CN114661249A (en) * | 2022-05-26 | 2022-06-24 | 深圳高灯计算机科技有限公司 | Data storage method and device, computer equipment and storage medium |
CN114661249B (en) * | 2022-05-26 | 2022-09-27 | 深圳高灯计算机科技有限公司 | Data storage method and device, computer equipment and storage medium |
CN117082083A (en) * | 2023-08-30 | 2023-11-17 | 杭州浩联智能科技有限公司 | Data storage method, device and medium based on distributed Internet of things architecture |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109408509A (en) | Date storage method, device and computer equipment | |
US10216793B2 (en) | Optimization of continuous queries in hybrid database and stream processing systems | |
Wang et al. | Energy-efficient reverse skyline query processing over wireless sensor networks | |
CN109446844B (en) | Privacy protection method and system for big data release | |
CN109783512A (en) | Data processing method, device, computer equipment and storage medium | |
CN101841565A (en) | Database cluster system load balancing method and database cluster system | |
CN103793439B (en) | A kind of real-time retrieval information acquisition method, device and server | |
CN104424240B (en) | Multilist correlating method, main service node, calculate node and system | |
CN111881221A (en) | Method, device and equipment for customer portrait in logistics service | |
CN110442773A (en) | Distributed system interior joint caching method, system, device and computer media | |
US20130159347A1 (en) | Automatic and dynamic design of cache groups | |
CN104778185A (en) | Determination method for abnormal SQL (structured query language) statement and server | |
TW201543394A (en) | Method and device for establishing click through ratio prediction model and method and system for providing information | |
CN107133367A (en) | A kind of information processing method and system, server | |
CN106446289B (en) | Information query method and device based on Pinpoint | |
CN112202617A (en) | Resource management system monitoring method and device, computer equipment and storage medium | |
CN107491463A (en) | The optimization method and system of data query | |
KR20150121945A (en) | Item recommend system and method for recommending item | |
CN104331490B (en) | network data processing method and device | |
CN105242873B (en) | The acquisition of the performance data of cloud computing system and storage method and device | |
CN105117333A (en) | Method and system for management of test cases | |
CN105302909B (en) | Network security log system big data search method based on subregion calculations of offset | |
CN108073661A (en) | Data retrieval method and device, report generating system and method | |
CN105656709A (en) | Method and apparatus for predicting capacity of packet domain network | |
CN101639856B (en) | Webpage correlation evaluation device for detecting internet information spreading |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190301 |
|
RJ01 | Rejection of invention patent application after publication |