CN103838844A - Method and device for storing and transmitting key value pair data - Google Patents

Method and device for storing and transmitting key value pair data Download PDF

Info

Publication number
CN103838844A
CN103838844A CN201410075360.8A CN201410075360A CN103838844A CN 103838844 A CN103838844 A CN 103838844A CN 201410075360 A CN201410075360 A CN 201410075360A CN 103838844 A CN103838844 A CN 103838844A
Authority
CN
China
Prior art keywords
data
value
key
storage format
value data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410075360.8A
Other languages
Chinese (zh)
Other versions
CN103838844B (en
Inventor
钟振东
姚辉
周振华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Seal Interest Technology Co Ltd
Original Assignee
Zhuhai Juntian Electronic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Juntian Electronic Technology Co Ltd filed Critical Zhuhai Juntian Electronic Technology Co Ltd
Priority to CN201410075360.8A priority Critical patent/CN103838844B/en
Publication of CN103838844A publication Critical patent/CN103838844A/en
Application granted granted Critical
Publication of CN103838844B publication Critical patent/CN103838844B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

An embodiment of the invention discloses a method and a device for storing and transmitting key value pair data. The method comprises the following steps of acquiring objective data with key value pair Key-Value formats; respectively extracting Key data and Value data from the acquired objective data; determining a storing format or a transmitting format according to the extracted Key data; and storing and transmitting the extracted Value data. According to the embodiment of the invention, because only the Value data are stored or transmitted, the redundancy on repeated storing or transmitting of the Key data is reduced, the storage space is saved, the transmitting efficiency is improved, and the safety of the data is also improved.

Description

The storage of a kind of key-value pair data, transmission method and device
Technical field
The present invention relates to data storage and transmission field, particularly a kind of key-value pair data storage, transmission method and device.
Background technology
Data storage is according to different applied environments, reasonable by taking, safe and effective mode is saved in data on some medium, and can guarantee that data are effectively accessed, generally, can comprise the implication of two aspects: on the one hand it is the interim or long-term resident physical medias of data; On the other hand, it is mode or the behavior that guarantees data integrity safe storage.Data storage combines these two aspects exactly, and the solution of a set of deposit data is provided to client.Data transmission is the process of data being given to the opposing party from a side.
In prior art, the mode of a kind of conventional data storage or transmission is: data are stored or transmitted according to the mode of key-value pair (Key-Value).What for example distributed structural data storage system adopted is exactly this mode.
In the process that realizes the present invention program, inventor finds that existing this mode of data being stored according to key-value pair or transmit at least exists following problem: on the one hand, data are in the time of storage or transmission, each data all will comprise Key data and Value data two parts content, cause a large amount of repeated storage of Key data or transmission, there is redundancy in data, causes the waste of storage space, and affect transfer efficiency; On the other hand, because each data is all that Key data and Value data two parts content occur continuously, cause data security very poor, once third party has obtained these data by certain mode, be easy to directly parse the implication of these data.
Summary of the invention
The object of the embodiment of the present invention is to provide the storage of a kind of key-value pair data, transmission method and device, and in solution prior art, the redundancy issue of the storage of Key Data duplication or transmission, saves storage space, improves transfer efficiency, and improves data security.
For achieving the above object, the embodiment of the invention discloses a kind of key-value pair date storage method, comprise step:
Acquisition has the target data of key-value pair Key-Value form;
From the described target data obtaining, extract respectively Key data and Value data;
According to extracted Key data, determine storage format;
Extracted Value data are stored, and set up the corresponding relation of this storage format and the Value data of storing.
Preferably, described extracted Value data are stored, comprising:
In extracted Value data, the numeric type data that identification exists with string format;
Described numeric type data-switching is become to numeric type form;
Result after conversion is stored.
Preferably, the corresponding relation of the described Value data of setting up this storage format and store, comprising:
Content to determined storage format is preserved, and sets up the corresponding relation of this storage format and the Value data of storing.
Preferably, the corresponding relation of the described Value data of setting up this storage format and store, comprising:
In default storage format database, whether search there is the storage format identical with determined storage format content,
If so, directly set up the corresponding relation of this storage format and the Value data of storing;
If not, the content of determined storage format is preserved, and set up the corresponding relation of this storage format and the Value data of storing.
For achieving the above object, the embodiment of the invention also discloses a kind of key-value pair data transmission method, comprise step:
Acquisition has the target data of key-value pair Key-Value form;
From the described target data obtaining, extract respectively Key data and Value data;
According to extracted Key data, determine transformat;
Extracted Value data are transmitted.
Preferably, described extracted Value data are transmitted, being comprised:
In extracted Value data, the numeric type data that identification exists with string format;
Described numeric type data-switching is become to numeric type form;
According to determined transformat, to the Value data after changing transmit.
For achieving the above object, the embodiment of the invention also discloses a kind of key-value pair data storage device, comprising:
Target data obtains module, for obtaining the target data with key-value pair Key-Value form;
Data extraction module, for the described target data from obtaining, extracts respectively Key data and Value data;
Storage format determination module, for according to extracted Key data, determines storage format;
Memory module, stores for the Value data to extracted, and sets up the corresponding relation of this storage format and the Value data of storing.
Preferably, memory module, specifically for:
In extracted Value data, the numeric type data that identification exists with string format;
Described numeric type data-switching is become to numeric type form;
Result after conversion is stored.
Preferably, memory module, specifically for:
Content to determined storage format is preserved, and sets up the corresponding relation of this storage format and the Value data of storing.
Preferably, memory module, specifically for:
In default storage format database, whether search there is the storage format identical with determined storage format content,
If so, directly set up the corresponding relation of this storage format and the Value data of storing;
If not, the content of determined storage format is preserved, and set up the corresponding relation of the Value data of this storage format and storage.
For achieving the above object, the embodiment of the invention also discloses a kind of key-value pair data transmission device, comprising:
Target data obtains module, for obtaining the target data with key-value pair Key-Value form;
Data extraction module, for the described target data from obtaining, extracts respectively Key data and Value data;
Transformat determination module, for according to extracted Key data, determines transformat;
Transport module, transmits for the Value data to extracted.
Preferably, transport module, specifically for:
In extracted Value data, the numeric type data that identification exists with string format;
Described numeric type data-switching is become to numeric type form;
According to determined transformat, to the Value data after changing transmit.
As seen from the above technical solutions, the embodiment of the present invention provides the storage of a kind of key-value pair data, transmission method and device, data are in the process of storage or transmission, storage or transmission only have Value data, reduce the redundancy of the storage of Key Data duplication or transmission, save storage space, improved transfer efficiency, and improved the security of data.Certainly, implement arbitrary product of the present invention or method and must not necessarily need to reach above-described all advantages simultaneously.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The schematic flow sheet of a kind of key-value pair date storage method that Fig. 1 provides for the embodiment of the present invention;
The schematic flow sheet of the another kind of key-value pair date storage method that Fig. 2 provides for the embodiment of the present invention;
The schematic flow sheet of another key-value pair date storage method that Fig. 3 provides for the embodiment of the present invention;
The schematic flow sheet of a kind of key-value pair data transmission method that Fig. 4 provides for the embodiment of the present invention;
The structural representation of a kind of key-value pair data storage device that Fig. 5 provides for the embodiment of the present invention;
The structural representation of a kind of key-value pair data transmission device that Fig. 6 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
The embodiment of the present invention provides the storage of a kind of key-value pair data, transmission method and device, in this scheme, acquisition has the target data of key-value pair Key-Value form, from the described target data obtaining, extract respectively Key data and Value data, according to extracted Key data, determine storage format or transformat, extracted Value data are stored or transmitted.
Below by specific embodiment, the present invention is described in detail.
The schematic flow sheet of a kind of key-value pair date storage method that Fig. 1 provides for the embodiment of the present invention, comprises the steps:
S101: obtain the target data with key-value pair Key-Value form;
For example: certain antivirus software represents as follows in data of wooden horse being carried out after overall killing:
Killing type: wooden horse, killing position: killing totally, scanning document number: 54345, threaten number: 2, sweep time: 2012-10-512:24:32.
Wherein, describe with " killing type: the wooden horse " data instance in these data, " killing type: wooden horse " is for having the data of key-value pair Key-Value form, Key data are " killing type ", Value data are " wooden horse ", similarly, killing position, scanning document number, threat number, sweep time are Key data, and killing, 54345,2 totally, 2012-10-512:24:32 are Value data.
Above-mentioned data are the target data with key-value pair Key-Value form, obtain after these data, further carry out subsequent step.
S102: from the described target data obtaining, extract respectively Key data and Value data;
For example, the target data obtaining according to previous step, can extract respectively Key data and Value data are as follows:
Key data: " scanning document number: int, threatens number: int, sweep time: datetime for killing type: string, killing position: string ".
Value data: " wooden horse, killing totally, 54345,2,2012-10-512:24:32 ".
Wherein, in Key data, " killing type: string " describes as example, and killing type is this Key data name, and string is the data type of this Key data in advance definition.
S103: according to extracted Key data, determine storage format;
For example: the Key data of extracting according to previous step, definite storage format is as follows:
Killing type: string
Killing position: string
Scanning document number: int
Threaten number: int
Sweep time: datetime
Wherein this storage format has 5 fields, and wherein: the first field name is killing type, this field data types is string; The second field name is killing position, and this field data types is string; The 3rd field name is scanning document number, and this field data types is int; The 4th field name is for threatening number, and this field data types is int; The 5th field name is sweep time, and this field data types is datetime.
S104: extracted Value data are stored, and set up the corresponding relation of this storage format and the Value data of storing.
For example: the storage format definite according to step S103, extracted Value data " wooden horse, killing totally, 54345,2,2012-10-512:24:32 " are stored, as shown in table 1:
Table 1
Wooden horse Killing totally 54345 2 2012-10-512:24:32
Set up the corresponding relation of table 1 and the determined storage format of S103, follow-up using in the process of Value data, according to this corresponding relation, can learn the concrete meaning of the Value data of storage, to Value data are resolved.
According to general data type feature, for same digital text, both can adopt string format storage, also can adopt numeric format storage, but front a kind of mode generally need to take more storage space than rear a kind of mode, therefore, in a kind of preferred implementation of the present invention, can detect and in extracted Value data, whether have the numeric type data that exist with string format, if had, convert thereof into numeric type form and store, thereby reach the object of further saving storage space.
For example: suppose that extracted Value data are for " wooden horse, 1342,54345,2,2012-10-512:24:32 "; The storage format definite according to step S102, the digital text 1342 identifying in Value is the numeric type data that exist with string format, therefore can further be translated into numeric type form, to conversion after result " wooden horse; 1342(numeric type form); 54345,2,2012-10-512:24:32 " store.Conventionally during with string format storage " 1342 ", need to take 4 bytes of storage space, and need to take 2 byte spaces during with numeric format storage " 1342 ", compared with the mode of directly Value data being stored, further reduce the demand that takies of storage space.
Be understandable that, the example of above-mentioned " 1342 " is only for schematically illustrating, in actual applications, need digital text to be processed may have various ways, corresponding conversion results is the corresponding multiple concrete numeric format of possibility also, for example shaping, floating type, long shaping, short shaping etc., and the concrete space that different numeric formats need to take is also incomplete same, according to embodiments of the invention, those skilled in the art can select flexibly according to practical application scene the mode of conversion.
The present invention is embodiment illustrated in fig. 1 in application, in the time that many of storages have the target data of key-value pair Key-Value form, owing to only storing Value data, solve the redundancy issue of Key Data duplication storage in data storage, save storage space, by setting up the corresponding relation of storage format and Value data, can learn the concrete meaning of the Value data of storage, the convenient parsing to Value data later; In addition, in the preferred embodiment of the present invention, become numeric type form to store the numeric type data-switching existing with string format, further saved storage space.
It should be noted that, in the present embodiment, in default system, to have had the storage format consistent with current definite storage format, therefore do not need the determined storage format of S103 to do further preservation operation, in the time setting up the Value data corresponding relation of storage format and storage, can directly in stored Value data and system, between already present storage format, set up corresponding relation.This situation is applicable to the data handling system that function ratio is more single, and for this type systematic, it needs data layout to be processed to fix, and therefore in system, can solidify one or more storage formats.For current target data to be processed, only need the Value data to extracting to store, and set up corresponding relation, do not need separately determined storage format to be done to further preservation operation.
For the situation that there is no to solidify one or more storage formats in system, the embodiment of the present invention also provides another kind of key-value pair date storage method, and shown in Figure 2, the method comprises the steps:
S201: obtain the target data with key-value pair Key-Value form;
S202: from the described target data obtaining, extract respectively Key data and Value data;
S203: according to extracted Key data, determine storage format;
S204: extracted Value data are stored, the content of determined storage format is preserved, and set up the corresponding relation of this storage format and the Value data of storing.
S201~S203 in the present embodiment and embodiment illustrated in fig. 1 in S101~S103 basic identical, no longer repeat here describe in detail.Only the S204 distinguishing to some extent with last embodiment is described below.
For comparatively complicated data system, it may be diversified needing data layout to be processed, and system may not understood the actual storage form of these data before deal with data, for this situation, in order to guarantee the follow-up correct parsing to Value data, in the S204 of the present embodiment, do further preservation operation for determined storage format in S203.
For example, in S203, the storage format of definite current deal with data is as follows:
Killing type: string
Killing position: string
Scanning document number: int
Threaten number: int
Sweep time: datetime
Can further preserve above-mentioned storage format, for example, save as form as shown in table 2:
Table 2
Figure BDA0000472159040000091
Suppose that stored data layout is still as shown in table 1, so in the present embodiment, can, by setting up the corresponding relation of the row data that in table 1 and table 2, ID is 1, realize the foundation of Value data and storage format corresponding relation.Follow-up using in the process of Value data, according to this corresponding relation, can learn the concrete meaning of the Value data of storage, to Value data are resolved.
Such scheme, processing each time in the process of new data, all determined storage format is stored, but in some cases, for determined storage format, may in system, preserve this form, preserve operation for fear of repeating, the embodiment of the present invention also provides another key-value pair date storage method, and shown in Figure 3, the method comprises the steps:
S301: obtain the target data with key-value pair Key-Value form;
S302: from the described target data obtaining, extract respectively Key data and Value data;
S303: according to extracted Key data, determine storage format;
S304: according to determined storage format, extracted Value data are stored;
S305: in default storage format database, whether search exists the storage format identical with determined storage format content, if so, carries out S306, if not, carries out S307;
S306: the corresponding relation of setting up this storage format and the Value data of storing;
S307: the content to determined storage format is preserved, and set up the corresponding relation of the Value data of this storage format and storage.
S301~S304 in the present embodiment and the S101~S104 in embodiment illustrated in fig. 1 can be identical, no longer repeat here to describe in detail.Only the step of distinguishing to some extent with front two embodiment is described below.
For comparatively complicated data system, it may be diversified needing data layout to be processed, and system is before deal with data, in system, may there is the storage format identical with definite storage format, for this situation, for fear of the operation of repeated storage, in the S305 of the present embodiment, do further search operation for determined storage format in S303.
For example: in default storage format database, had storage format as shown in table 2;
Suppose: objective data with key-value pair Key-Value form of acquisition are: " killing type: wooden horse, killing position: C interrogates and examines and kills, scanning document number: 5434, threaten number: 0, sweep time: 2012-10-515:27:35 ",
The Key data of extracting are: " scanning document number: int, threatens number: int, sweep time: datetime for killing type: string, killing position: string ",
The Value data of extracting are: " wooden horse, C interrogates and examines and kills, 5434,0,2012-10-515:27:35 "
Determined storage format is as follows,
Killing type: string
Killing position: string
Scanning document number: int
Threaten number: int
Sweep time: datetime
First according to determined storage format, to by the Value data of extraction being: " wooden horse, C interrogates and examines and kills, 5434,0,2012-10-515:27:35 " stored.
According to S305, in table 2, whether search exists and storage format as implied above, Search Results is yes, therefore further carry out S306, set up the corresponding relation of the represented storage format of row data that in table 2, ID is 1 and the Value data of storing, realize the foundation of Value data and storage format corresponding relation.
Suppose: the key-value pair Key-Value form one objective data that have of acquisition are: " killing type: virus, killing position: killing totally, scanning document number: 54234, threaten number: 0 ",
The Key data of extracting are: " scanning document number: int, threatens number: int for killing type: string, killing position: string ",
The Value data of extracting are: " virus, killing totally, 54234,0 ",
Determined storage format is as follows:
Killing type: string
Killing position: string
Scanning document number: int
Threaten number: int
First according to determined storage format, the Value data to extracting: store " virus, killing totally, 54234,0 ".
According to S305, in table 2, whether search exists and storage format as implied above, and Search Results is no, therefore further carries out S307, and the content of determined storage format is preserved, as shown in table 3:
Table 3
Visible, table 3 compared with table 2, a line new data that to have increased ID be 2, the row data i.e. corresponding new definite storage format.According to S307, further set up the corresponding relation of the Value data of the represented storage format of row data that in table 3, ID is 2 and storage, realize the foundation of Value data and storage format corresponding relation.
The present invention is embodiment illustrated in fig. 3 in application, with embodiment illustrated in fig. 1 and embodiment illustrated in fig. 2 comparing, further in default storage format database, whether search there is the storage format identical with determined storage format content, only, in non-existent situation, the content of determined storage format is preserved, thereby avoid the storage operation of repetition, also can reduce the indegree of writing to storage medium, extend the serviceable life of disk.
The schematic flow sheet of a kind of key-value pair data transmission method that Fig. 4 provides for the embodiment of the present invention, comprises the steps:
S401: obtain the target data with key-value pair Key-Value form;
S402: from the described target data obtaining, extract respectively Key data and Value data;
S401~S402 in the present embodiment and the S101~S102 in embodiment illustrated in fig. 1 can be identical, no longer repeat here to describe in detail.Below only to being described with the step of storing difference to some extent.
S403: according to extracted Key data, determine transformat;
For example: according to extracted Key data, definite transformat is as follows:
Killing type: string
Killing position: string
Scanning document number: int
Threaten number: int
Sweep time: datetime
Wherein this transformat has 5 fields, wherein:
The first field name is killing type, and this field data types is string; The second field name is killing position, and this field data types is string; The 3rd field name is scanning document number, and this field data types is int; The 4th field name is for threatening number, and this field data types is int; The 5th field name is sweep time, and this field data types is datetime.
S404: extracted Value data are transmitted.
For example: extracted Value data " wooden horse, killing totally, 54345,2,2012-10-512:24:32 " are transmitted.
Embodiment similar to Figure 1, can change into numeric type data by the numeric type data that exist with string format and transmit.
The present invention is embodiment illustrated in fig. 4 in application, in the time that many of transmission have the target data of key-value pair Key-Value form, owing to only transmitting Value data, has reduced the redundancy of Key data transmission, thereby has improved transfer efficiency; Even and if third party obtained the Value data of transmission by certain mode, can not parse the implication of these Value data, improve data security.In addition, in the preferred embodiment of the present invention, become numeric type form to transmit the numeric type data-switching existing with character string, further improved transfer efficiency;
Be understandable that, above-mentioned data transmission method is applied to transmit leg, resolves and take over party need to understand the Value data that corresponding storage format and corresponding relation just can send transmit leg.So, for transmit leg, if can determine that take over party also has corresponding storage format, can not transmit determined storage format; If transmit leg cannot determine take over party and have corresponding storage format, transmit leg also needs further determined storage format also to be offered to take over party; Or by sending out the mode of message asks, determine whether take over party has corresponding storage format, and not this storage format in the situation that, further determined storage format is also offered to take over party in take over party's feedback.
The structural representation of a kind of key-value pair data storage device that Fig. 5 provides for the embodiment of the present invention, comprising: target data obtains module 501, data extraction module 502, storage format determination module 503, memory module 504.
Wherein: target data obtains module 501, for obtaining the target data with key-value pair Key-Value form;
Data extraction module 502, for the described target data from obtaining, extracts respectively Key data and Value data;
Storage format determination module 503, for according to extracted Key data, determines storage format;
Memory module 504, stores for the Value data to extracted, and sets up the corresponding relation of this storage format and the Value data of storing.
Wherein: memory module 504 can also be used for: in extracted Value data, the numeric type data that identification exists with string format; Described numeric type data-switching is become to numeric type form; Result after conversion is stored.
Wherein: memory module 504 can also be used for: the content to determined storage format is preserved.
Wherein: memory module 504 can also be used for:
In default storage format database, whether search there is the storage format identical with determined storage format content,
If so, directly set up the corresponding relation of this storage format and the Value data of storing;
If not, the content of determined storage format is preserved, and set up the corresponding relation of the Value data of this storage format and storage.
The present invention is embodiment illustrated in fig. 5 in application, in the time that many of storages have the target data of key-value pair Key-Value form, owing to only storing Value data, solve the redundancy issue of Key Data duplication storage in data storage, save storage space, and set up the corresponding relation of storage format and Value data, according to this corresponding relation, can learn the concrete meaning of the Value data of storage, the convenient parsing to Value data later.
In the preferred embodiment of the present invention, also become numeric type form to store the numeric type data-switching existing with string format, further save storage space.
In the preferred embodiment of the present invention, also the content of the storage format to determined variation to be preserved, applicable application scenarios is more extensive.
In the preferred embodiment of the present invention, further in default storage format database, whether search there is the storage format identical with determined storage format content, only in non-existent situation, content to determined storage format is preserved, thereby avoid the storage operation of repetition, also can reduce the indegree of writing to storage medium, extend the serviceable life of disk.
The structural representation of a kind of key-value pair data transmission device that Fig. 6 provides for the embodiment of the present invention, comprising: target data obtains module 601, data extraction module 602, transformat determination module 603, transport module 604.
Wherein: target data obtains module 601, for obtaining the target data with key-value pair Key-Value form;
Data extraction module 602, for the described target data from obtaining, extracts respectively Key data and Value data;
Transformat determination module 603, for according to extracted Key data, determines transformat;
Transport module 604, transmits for the Value data to extracted.
Wherein: transport module 604 can also be used for:
In extracted Value data, the numeric type data that identification exists with string format; Described numeric type data-switching is become to numeric type form; Result after conversion is transmitted.
The present invention is embodiment illustrated in fig. 6 in application, in the time that many of transmission have the target data of key-value pair Key-Value form, owing to only transmitting Value data, has reduced the redundancy of Key data transmission, thereby has improved transfer efficiency; Even and if third party obtained the Value data of transmission by certain mode, can not parse the implication of these Value data, improve data security.In addition, in the preferred embodiment of the present invention, become numeric type form to transmit the numeric type data-switching existing with character string, further improved transfer efficiency.
For device embodiment, because it is substantially similar in appearance to embodiment of the method, so description is fairly simple, relevant part is referring to the part explanation of embodiment of the method.
It should be noted that, in this article, relational terms such as the first and second grades is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply and between these entities or operation, have the relation of any this reality or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby the process, method, article or the equipment that make to comprise a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or be also included as the intrinsic key element of this process, method, article or equipment.The in the situation that of more restrictions not, the key element being limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
One of ordinary skill in the art will appreciate that all or part of step realizing in said method embodiment is can carry out the hardware that instruction is relevant by program to complete, described program can be stored in computer read/write memory medium, here the alleged storage medium obtaining, as: ROM/RAM, magnetic disc, CD etc.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.All any modifications of doing within the spirit and principles in the present invention, be equal to replacement, improvement etc., be all included in protection scope of the present invention.

Claims (12)

1. a key-value pair date storage method, is characterized in that, described method comprises step:
Acquisition has the target data of key-value pair Key-Value form;
From the described target data obtaining, extract respectively Key data and Value data;
According to extracted Key data, determine storage format;
Extracted Value data are stored, and set up the corresponding relation of this storage format and the Value data of storing.
2. method according to claim 1, is characterized in that, described extracted Value data is stored, and comprising:
In extracted Value data, the numeric type data that identification exists with string format;
Described numeric type data-switching is become to numeric type form;
Result after conversion is stored.
3. method according to claim 1, is characterized in that, the corresponding relation of the described Value data of setting up this storage format and store, comprising:
Content to determined storage format is preserved, and sets up the corresponding relation of this storage format and the Value data of storing.
4. method according to claim 1, is characterized in that, the corresponding relation of the described Value data of setting up this storage format and store, comprising:
In default storage format database, whether search there is the storage format identical with determined storage format content,
If so, directly set up the corresponding relation of this storage format and the Value data of storing;
If not, the content of determined storage format is preserved, and set up the corresponding relation of this storage format and the Value data of storing.
5. a key-value pair data transmission method, is characterized in that, described method comprises step:
Acquisition has the target data of key-value pair Key-Value form;
From the described target data obtaining, extract respectively Key data and Value data;
According to extracted Key data, determine transformat;
Extracted Value data are transmitted.
6. method according to claim 5, is characterized in that, described extracted Value data is transmitted, and comprising:
In extracted Value data, the numeric type data that identification exists with string format;
Described numeric type data-switching is become to numeric type form;
According to determined transformat, to the Value data after changing transmit.
7. a key-value pair data storage device, is characterized in that, described device comprises:
Target data obtains module, for obtaining the target data with key-value pair Key-Value form;
Data extraction module, for the described target data from obtaining, extracts respectively Key data and Value data;
Storage format determination module, for according to extracted Key data, determines storage format;
Memory module, stores for the Value data to extracted, and sets up the corresponding relation of this storage format and the Value data of storing.
8. device according to claim 7, is characterized in that, described memory module, specifically for:
In extracted Value data, the numeric type data that identification exists with string format;
Described numeric type data-switching is become to numeric type form;
Result after conversion is stored.
9. device according to claim 7, is characterized in that, described memory module, specifically for:
Content to determined storage format is preserved, and sets up the corresponding relation of this storage format and the Value data of storing.
10. device according to claim 7, is characterized in that, described memory module, specifically for:
In default storage format database, whether search there is the storage format identical with determined storage format content,
If so, directly set up the corresponding relation of this storage format and the Value data of storing;
If not, the content of determined storage format is preserved, and set up the corresponding relation of the Value data of this storage format and storage.
11. 1 kinds of key-value pair data transmission devices, is characterized in that, described device comprises:
Target data obtains module, for obtaining the target data with key-value pair Key-Value form;
Data extraction module, for the described target data from obtaining, extracts respectively Key data and Value data;
Transformat determination module, for according to extracted Key data, determines transformat;
Transport module, transmits for the Value data to extracted.
12. devices according to claim 11, is characterized in that, described transport module, specifically for:
In extracted Value data, the numeric type data that identification exists with string format;
Described numeric type data-switching is become to numeric type form;
According to determined transformat, to the Value data after changing transmit.
CN201410075360.8A 2014-03-03 2014-03-03 A kind of key-value pair data storage, transmission method and device Active CN103838844B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410075360.8A CN103838844B (en) 2014-03-03 2014-03-03 A kind of key-value pair data storage, transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410075360.8A CN103838844B (en) 2014-03-03 2014-03-03 A kind of key-value pair data storage, transmission method and device

Publications (2)

Publication Number Publication Date
CN103838844A true CN103838844A (en) 2014-06-04
CN103838844B CN103838844B (en) 2018-01-19

Family

ID=50802341

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410075360.8A Active CN103838844B (en) 2014-03-03 2014-03-03 A kind of key-value pair data storage, transmission method and device

Country Status (1)

Country Link
CN (1) CN103838844B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104184822A (en) * 2014-08-29 2014-12-03 海视云(北京)科技有限公司 Data synchronism method and system
CN104461380A (en) * 2014-11-17 2015-03-25 华为技术有限公司 Data storage method and device
CN106202092A (en) * 2015-05-04 2016-12-07 阿里巴巴集团控股有限公司 The method and system that data process
CN107340993A (en) * 2016-04-28 2017-11-10 北京中科寒武纪科技有限公司 A kind of apparatus and method for the neural network computing for supporting less digit floating number
CN107562804A (en) * 2017-08-08 2018-01-09 上海数据交易中心有限公司 Data buffer service system and method, terminal
CN108491364A (en) * 2018-01-25 2018-09-04 苏州麦迪斯顿医疗科技股份有限公司 Medical treatment and nursing paperwork management system
WO2019184618A1 (en) * 2018-03-28 2019-10-03 腾讯科技(深圳)有限公司 Method and device for storing data, server, and storage medium
CN111736776A (en) * 2020-06-24 2020-10-02 杭州海康威视数字技术股份有限公司 Data storage and reading method and device
CN112579003A (en) * 2020-12-15 2021-03-30 浙江大华技术股份有限公司 Key value pair adjustment method, key value pair adjustment device, storage medium and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101551807A (en) * 2009-05-07 2009-10-07 山东中创软件商用中间件股份有限公司 Multilevel index technology for file database
US20110191396A1 (en) * 2010-02-03 2011-08-04 Fujitsu Limited Storage device and data storage control method
CN103502970A (en) * 2011-12-21 2014-01-08 华为技术有限公司 Method and device for key-value pair operation
CN103559027A (en) * 2013-10-22 2014-02-05 北京航空航天大学 Design method of separate-storage type key-value storage system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101551807A (en) * 2009-05-07 2009-10-07 山东中创软件商用中间件股份有限公司 Multilevel index technology for file database
US20110191396A1 (en) * 2010-02-03 2011-08-04 Fujitsu Limited Storage device and data storage control method
CN103502970A (en) * 2011-12-21 2014-01-08 华为技术有限公司 Method and device for key-value pair operation
CN103559027A (en) * 2013-10-22 2014-02-05 北京航空航天大学 Design method of separate-storage type key-value storage system

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104184822A (en) * 2014-08-29 2014-12-03 海视云(北京)科技有限公司 Data synchronism method and system
CN104461380B (en) * 2014-11-17 2017-11-21 华为技术有限公司 Date storage method and device
CN104461380A (en) * 2014-11-17 2015-03-25 华为技术有限公司 Data storage method and device
CN106202092B (en) * 2015-05-04 2020-03-06 阿里巴巴集团控股有限公司 Data processing method and system
US10872070B2 (en) 2015-05-04 2020-12-22 Advanced New Technologies Co., Ltd. Distributed data processing
CN106202092A (en) * 2015-05-04 2016-12-07 阿里巴巴集团控股有限公司 The method and system that data process
US10592491B2 (en) 2015-05-04 2020-03-17 Alibaba Group Holding Limited Distributed data processing
CN107340993A (en) * 2016-04-28 2017-11-10 北京中科寒武纪科技有限公司 A kind of apparatus and method for the neural network computing for supporting less digit floating number
CN107340993B (en) * 2016-04-28 2021-07-16 中科寒武纪科技股份有限公司 Arithmetic device and method
CN107562804A (en) * 2017-08-08 2018-01-09 上海数据交易中心有限公司 Data buffer service system and method, terminal
CN108491364A (en) * 2018-01-25 2018-09-04 苏州麦迪斯顿医疗科技股份有限公司 Medical treatment and nursing paperwork management system
WO2019184618A1 (en) * 2018-03-28 2019-10-03 腾讯科技(深圳)有限公司 Method and device for storing data, server, and storage medium
US11275759B2 (en) 2018-03-28 2022-03-15 Tencent Technology (Shenzhen) Company Limited Data storage method and apparatus, server, and storage medium
CN111736776A (en) * 2020-06-24 2020-10-02 杭州海康威视数字技术股份有限公司 Data storage and reading method and device
CN111736776B (en) * 2020-06-24 2023-10-10 杭州海康威视数字技术股份有限公司 Data storage and reading method and device
CN112579003A (en) * 2020-12-15 2021-03-30 浙江大华技术股份有限公司 Key value pair adjustment method, key value pair adjustment device, storage medium and electronic device
CN112579003B (en) * 2020-12-15 2022-06-14 浙江大华技术股份有限公司 Key value pair adjustment method, key value pair adjustment device, storage medium and electronic device

Also Published As

Publication number Publication date
CN103838844B (en) 2018-01-19

Similar Documents

Publication Publication Date Title
CN103838844A (en) Method and device for storing and transmitting key value pair data
CN109670053B (en) Data object mapping method, device, equipment and computer readable storage medium
CN108446314B (en) Student information storage method, computer readable storage medium and terminal equipment
CN109189888B (en) Electronic device, infringement analysis method, and storage medium
Meli et al. Selecting species for passive and active riparian restoration in Southern Mexico
CN107977396B (en) Method and device for updating data table of KeyValue database
CN102208002B (en) Novel computer virus scanning and killing device
CN102833258A (en) Website access method and system
US10637643B2 (en) Methods and apparatuses of digital data processing
CN103593440A (en) Method and device for reading and writing log file
CN103209153A (en) Method, device and system for processing messages
CN102915344B (en) SQL (structured query language) statement processing method and device
CN103324713A (en) Data processing method and device in multistage server and data processing system
CN106919882A (en) A kind of method that two-dimentional digital content switchs to pure digi-tal symbolic coding
CN114201756A (en) Vulnerability detection method and related device for intelligent contract code segment
CN112000692B (en) Page query feedback method and device, computer equipment and readable storage medium
CN103049561A (en) Data compressing method, storage engine and storage system
CN103136166B (en) Method and device for font determination
CN109408577B (en) ORACLE database JSON analysis method, system, device and storable medium
CN113535727B (en) Data output method and device of information system and electronic equipment
CN104780038A (en) A distributed collaborative encryption method and device
CN113051333A (en) Data processing method and device, electronic equipment and storage medium
Akart Cyber Warfare: Prepping for Tomorrow-Volume 1
CN116028481B (en) Data quality detection method, device, equipment and storage medium
CN103984722A (en) File system with nodes and file processing method

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
TR01 Transfer of patent right

Effective date of registration: 20181210

Address after: Room 105-53811, No. 6 Baohua Road, Hengqin New District, Zhuhai City, Guangdong Province

Patentee after: Zhuhai Seal Interest Technology Co., Ltd.

Address before: 519070, six level 601F, 10 main building, science and technology road, Tangjia Bay Town, Zhuhai, Guangdong.

Patentee before: Zhuhai Juntian Electronic Technology Co.,Ltd.