CN103473239A - Method and device for updating data of non relational database - Google Patents

Method and device for updating data of non relational database Download PDF

Info

Publication number
CN103473239A
CN103473239A CN2012101876860A CN201210187686A CN103473239A CN 103473239 A CN103473239 A CN 103473239A CN 2012101876860 A CN2012101876860 A CN 2012101876860A CN 201210187686 A CN201210187686 A CN 201210187686A CN 103473239 A CN103473239 A CN 103473239A
Authority
CN
China
Prior art keywords
file
data file
data
new data
new
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
CN2012101876860A
Other languages
Chinese (zh)
Other versions
CN103473239B (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.)
Tencent Technology Shenzhen Co Ltd
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201210187686.0A priority Critical patent/CN103473239B/en
Publication of CN103473239A publication Critical patent/CN103473239A/en
Application granted granted Critical
Publication of CN103473239B publication Critical patent/CN103473239B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a device for updating data of a non relational database. The method comprises the following steps of: receiving an updated command, and recording updated data carried in the updated command, wherein the updated data comprises a major key and corresponding updated operation contents; when a preset first trigger event occurred, finding a data file to which the major key belongs in each updated data; according to the updated operation contents in the updated data, combining each updated data and the corresponding data files into a new data file, and replacing the data file before combination with the new data file. Due to the adoption of the method provided by the invention, the efficiency in updating historical data in the non relational database can be improved.

Description

A kind of non-relational database data update method and device
Technical field
The present invention relates to networking technology area, particularly a kind of non-relational database data update method and device.
Background technology
Table in relevant database all has fixing data structure, the field groups Chengdu of each tuple (record of each in database table) is the same, even be not that each tuple needs all fields, but database can be the corresponding data of all field distribution of each tuple.For example, certain database table comprises name, age, three, native place field, and every record in this table all needs to comprise name, age, three, native place field so, even wherein the content of certain field of certain tuple is empty, system also will be for it distributes a default value, as 0.Such structure can so that table with show between the operation such as be connected, but it is also a key factor that causes the relevant database performance bottleneck from another angle, make relevant database can not meet the demand to the high concurrent reading and writing of database, to the high-level efficiency storage of mass data and the demand of access, to the enhanced scalability of database and the demand of high availability.
In order to address the above problem, non-relational database (NoSQL) arises at the historic moment.The BigTable of Google and the Dynamo of Amazon are very successful business NoSQL systems.The NoSQL system that some are increased income, as Membase, MongoDB, Cassandra, BeansDB, Redis etc., also obtained extensive approval.
The non-relational database, it is stored with key-value pair, and structure is unfixing, each tuple can have different field, each tuple can increase some oneself key-value pair as required, is not limited to fixing structure, can reduce the expense in some times and space.KV(Key-Value, key assignments) storage, be a kind of mode of NoSQL storage, data according to the form of key-value pair organized, index and storage.The KV storage very is applicable to not relating to the business datum of too much data relationship and business relations, can effectively reduce the number of times of read-write disk simultaneously, than relational data library storage, has better readwrite performance.
The key assignments memory mechanism adopts the storage of key-value pair form, value can be any random length data, use major key can make simple queries and complex query (as list query, range query etc.), regularly carry out the merging (this union operation can comprise the operations such as interpolation, deletion, modification) of more new data and historical data simultaneously to process stale data.As shown in Figure 1, more new data and historical data adopt 0,1 directory management, for new data more, 0,1 two catalogue is set, historical data is also arranged to 0,1 two catalogue, suppose that current renewal data directory and historical data catalogue are all 0 catalogue, when the merging of carrying out more new data and historical data, by more 0 catalogue of new data and 0 catalogue of historical data merge, and the data after merging are stored in 1 catalogue of historical data, simultaneously in merging process, new more new data is written in 1 catalogue of new data more.Upper while once carrying out the merging of more new data and historical data, more 1 catalogue of new data and 1 catalogue of historical data are merged in 0 catalogue of historical data, the rest may be inferred.
Yet, inventor's discovery, at least there are the following problems for prior art:
In existing data-updating method, the merging of each more new data and historical data, all will be merged all historical datas and new data more, and the historical data do not changed also will merge and move in another catalogue, efficiency is lower, has greatly increased the expense of system.
Summary of the invention
The object of the present invention is to provide a kind of non-relational database data update method and device, the efficiency of upgrading to improve non-relational database historical data, for this reason, the embodiment of the present invention adopts following technical scheme:
A kind of non-relational database data update method comprises:
Receive update instruction, and record the more new data carried in described update instruction, described more new data packets is drawn together major key and corresponding renewal content of operation;
When the first default trigger event occurs, search each more data file under the major key in new data;
Described renewal content of operation according in new data more, merge to each data file that more new data is corresponding with it in new data file, and replace the data file before merging by described new data file.
A kind of non-relational database data updating device comprises:
Logging modle, for receiving update instruction, and record the more new data carried in described update instruction, and described more new data packets is drawn together major key and corresponding renewal content of operation;
Search module, while occurring for the first trigger event when default, search each more data file under the major key in new data;
Update module, for according to the described renewal content of operation of new data more, merge to each data file that more new data is corresponding with it in new data file, and replace the front data file of merging by described new data file.
The above embodiment of the present invention, receive update instruction, and record the more new data carried in update instruction, more new data packets is drawn together major key and corresponding renewal content of operation, when the first default trigger event occurs, each that search record be the data file under the major key in new data more, according to the described renewal content of operation in new data more, each data file that more new data is corresponding with it is merged in new data file, and replace the data file before merging by described new data file, thereby, can improve the efficiency that non-relational database historical data is upgraded.
The accompanying drawing explanation
Fig. 1 is the storage mode schematic diagram of new data and historical data more in prior art;
The structural representation of SSTable in the non-relational database data update method that Fig. 2 provides for the embodiment of the present invention;
The schematic flow sheet of the non-relational database data update method that Fig. 3 provides for the embodiment of the present invention;
In the non-relational database data update method that Fig. 4 provides for the embodiment of the present invention according to the schematic diagram that upgrades data search corresponding data file;
The schematic diagram of meta data file storage content in the non-relational database data update method that Fig. 5 provides for the embodiment of the present invention;
The schematic flow sheet of data enquire method in the non-relational database data update method that Fig. 6 provides for the embodiment of the present invention;
The schematic flow sheet of the non-relational database data update method that Fig. 7 provides for the embodiment of the present invention;
The structural representation of the non-relational database data updating device that Fig. 8 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the present invention, the technical scheme in the present invention is carried out to clear, complete description, obviously, described embodiment is a part of embodiment of the present invention, rather than whole embodiment.Embodiment based in the present invention, all other embodiment that those of ordinary skills obtain under the prerequisite of not making creative work, belong to the scope of protection of the invention.
Embodiment mono-
In the present embodiment, more new data is stored in updating file with the storage organization of Memtable, and historical data is stored in one or more data files with the storage organization of SSTable.The SSTable structure is a kind of distributed key assignments storage organization, can comprise a plurality of SSTable in each data file, can store value corresponding to a plurality of value(major keys in each SSTable) and the corresponding interior index of piece, the structure of each SSTable can be as shown in Figure 2.When being inquired about, can be first according to the key(major key) inquire about the data file under it, and then further inquire about its SSTable affiliated in this data file, because the quantity of historical data is very huge, adopt the SSTable structure can promote search efficiency.Memtable is a kind of non-distributed storage organization, because the more general quantity of new data is fewer, so adopt the Memtable structure can promote storage efficiency.
As shown in Figure 3, the flow process of the processing of the non-relational database data update method provided for the embodiment of the present invention specifically comprises the following steps:
Step 301, system receives update instruction, and records the more new data carried in update instruction, and more new data packets is drawn together major key and corresponding renewal content of operation.
The maintainer of database can send update instruction by server or office terminal, after system receives update instruction, can first the more new data in update instruction be stored in the middle of updating file, specifically can adopt form storage key and the corresponding renewal content of operation of list.More in new data, can comprise the key that it need to upgrade, and comprise the operation (upgrading content of operation) to carrying out to corresponding key-value, this renewal content of operation can be delete key-value to, add key-value to or revise value etc.
Step 302, when the first default trigger event occurs, each data file under the major key in new data more of system searching.
Concrete, this first default trigger event can be to reach default more new data to merge the cycle, and system sets in advance more new data and merges the cycle, carries out the more merging of new data and historical data according to the cycle.In addition, the first default trigger event can also be to receive more new data merge command, can send more new data merge command by the database maintenance personnel, and with indication mechanism, more new data and historical data are merged.
Concrete, as shown in Figure 4, system can be according to the metadata recorded in meta data file, searches each more data file corresponding to key in new data.Metadata is a kind of data for data of description, and the queue of the metadata recorded in meta data file can be as shown in Figure 5, can comprise the scope of key in the reference number of a document, file of each data file, the information such as memory capacity of file.In addition, the information of all right log file numbering in meta data file, as numbered by reference number of a document, file available.
Step 303, system, according to the renewal content of operation in new data more, merges to each data file that more new data is corresponding with it in new data file, and replaces the front data file of merging by new data file.
System is for every new data more, according to the key in new data more, finds its corresponding data file, and then more new data is merged with corresponding data file.Concrete, the operation of merging is to carry out according to the renewal content of operation in new data more, can comprise delete key-value to, add key-value to or revise value etc.
When a plurality of more new data key correspond to same data file, common and this data file of these a plurality of more new datas merges in new data file.Merging process can be according to each key and the value in former data file, and the more key in new data and corresponding renewal content of operation, according to the order of key, in new data file, order generates each SSTable again, and the memory capacity of SSTable is the numerical value set in advance.
Preferably, system can be distributed new reference number of a document (choosing in the file available numbering) for the new data file that merging obtains.After merging end, system can be deleted the data file be replaced, and discharges the reference number of a document of this data file, and this document numbering is by with reference number of a document, becoming the file available numbering.
In the above-mentioned flow process of the present embodiment, system can be set up two in advance for recording the more catalogue of new data, by the more new data records of carrying in the update instruction received in one of them catalogue; Then, when the first trigger event occurs, carry out the catalogue switching, by the more new data records of carrying in the follow-up update instruction received in another catalogue, and will before record in the catalogue used each more new data with corresponding data file, merge in new data file; By in the catalogue of using before, record each more new data with after corresponding data file merges in new data file, the more new data before deleting in the catalogue of use.
Concrete, can adopt 0, the mode of 1 catalogue is stored new data more, set up respectively more 0 catalogue file of new data, 1 catalogue file, when the first trigger event occurs, carry out the catalogue switching, what suppose current use is 0 catalogue, when the first trigger event starts to carry out merging process, the more new data newly received will be stored in catalogue 1, more new data in catalogue 0 and corresponding data file are merged, and after merging process finishes, more new data in 0 catalogue is by deleted, then, in while, the first trigger event occurring next time, switching is got back to 0 catalogue and is carried out more the new data storage again, more new data in catalogue 1 and corresponding data file are merged, and after merging process finishes, delete the more new data in 1 catalogue, the rest may be inferred.
Preferably, the embodiment of the present invention also provide non-relational database data update method, can also comprise: when the second default trigger event occurs, whether the memory capacity sum that judges adjacent a plurality of data files surpasses default memory capacity threshold value, if do not surpass, described a plurality of data files are merged into to a data file.The second trigger event wherein can be to reach the preset data Piece file mergence cycle, can be also that respectively more new data is complete with corresponding data file merging, can also be to receive the data file merge command.The merging process of concrete data file can comprise the steps:
Steps A, sorted to the data file according to the order of the major key comprised in data file, using first data file in the data file after sequence as the benchmark file.
According to the order of the key stored in data file, can be sorted to the data file.For example, comprise key1, key2, key3 in data file 1, comprise key4, key5, key6 in data file 2, comprise key7, key8, key9 in data file 3, order that can the specified data file according to the order of key is data file 1, data file 2, data file 3.
Step B, whether the judgment standard file is last data file in the data file after sequence; If so, process ends; Otherwise, determine the storage space sum of the next data file of benchmark file and benchmark file, and perform step C.
Step C, judge whether described storage space sum surpasses default space threshold value; If so, using the next data file of described benchmark file as the benchmark file, and go to step B; Otherwise, the next data file of benchmark file and benchmark file is merged, using the data file after merging as the benchmark file, and go to step B.
For example, data file 1 is carried out to the data file merging process to data file n, it is 1M(million that the memory capacity threshold value is set).Using data file 1 as the benchmark file, whether the memory capacity sum of judgment standard file and data file 2 surpasses 1M, suppose not surpass 1M, data file 1 and data file 2 are merged into to data file 1 ', using data file 1 ' as the benchmark file, and whether the memory capacity sum that continues judgment standard file and data file 3 surpasses 1M, suppose to surpass 1M, using data file 3 as the benchmark file, whether the memory capacity sum of judgment standard file and data file 4 surpasses 1M, the rest may be inferred, until the benchmark file is while being last file in the data file queue, process ends.
The embodiment of the present invention also provides a kind of method of data query, and system corresponding each data file is in advance set up index file, records the scope of the major key that each SSTable in its corresponding data file stores in index file.Concrete, can record the beginning key in SSTable in index file, the number of key in SSTable, the skew in the data file of SSTable data under it.When database starts, system can be loaded into the content of each index file in internal memory in advance.
As shown in Figure 6, the flow process of this data enquire method can comprise the steps:
Step 601, when receiving query statement, system is determined the data file under the major key carried in described query statement.System can be according to the metadata recorded in meta data file, searches each more data file corresponding to key in new data, and concrete grammar is set forth in step 302, at this, is not repeated.
Step 602, the scope of the major key that each SSTable in this data file recorded in the system index file corresponding according to this data file stores, determine the SSTable under the major key carried in query statement.
When database starts, system can be loaded into the content of each index file in internal memory in advance.Then, system can, according to the scope of the major key that in the data file loaded in internal memory, each SSTable stores, be determined the SSTable that corresponding major key is affiliated.
Step 603, search the value that this major key is corresponding in the SSTable under this major key.
In the embodiment of the present invention, receive update instruction, and record the more new data carried in update instruction, more new data packets is drawn together major key and corresponding renewal content of operation, when the first default trigger event occurs, each that search record be the data file under the major key in new data more, according to the described renewal content of operation in new data more, each data file that more new data is corresponding with it is merged in new data file, and replace the data file before merging by described new data file, thereby, can improve the efficiency that non-relational database historical data is upgraded.
Embodiment bis-
As shown in Figure 7, the treatment scheme of non-relational database data update method in concrete application scenarios for the embodiment of the present invention provides, can comprise the steps:
Step 701, system is switched to more new data merging patterns, obtains the catalogue that current data is being used.The catalogue of supposing current use is 0 catalogue, and the follow-up more new data received again will be deposited in 1 catalogue.
Step 702, obtain key corresponding to all more new datas in this catalogue, and search according to metadata the data file that each key is corresponding.
Step 703, distribute the file available numbering, sets up new data file, and each data file that more new data is corresponding with it is merged in new data file.After merging end, can delete data file and corresponding index file thereof before merging, and be released to available by its reference number of a document.
Step 704, set up the index file of new data file, and by the content update of this index file in internal memory.The corresponding contents of index file in internal memory corresponding to data file before can merging with the content replacement of this index file.
Step 705, finish the more merging flow process of new data and historical data, and system is switched to normal mode.Under normal mode, system receives only more new data and stores in corresponding catalogue, and does not carry out the more merging of new data and historical data.
In the embodiment of the present invention, receive update instruction, and record the more new data carried in update instruction, more new data packets is drawn together major key and corresponding renewal content of operation, when the first default trigger event occurs, each that search record be the data file under the major key in new data more, according to the described renewal content of operation in new data more, each data file that more new data is corresponding with it is merged in new data file, and replace the data file before merging by described new data file, thereby, can improve the efficiency that non-relational database historical data is upgraded.
Embodiment tri-
Technical conceive based on identical, the embodiment of the present invention also provides a kind of non-relational database data updating device, as shown in Figure 8, comprising:
Logging modle 810, for receiving update instruction, and record the more new data carried in described update instruction, and described more new data packets is drawn together major key and corresponding renewal content of operation;
Search module 820, while occurring for the first trigger event when default, search each more data file under the major key in new data;
Update module 830, for according to the described renewal content of operation of new data more, merge to each data file that more new data is corresponding with it in new data file, and replace the front data file of merging by described new data file.
Preferably, also comprise the renewal data management module, for:
Set up in advance two for recording the catalogue of described more new data;
By the more new data records of carrying in the update instruction received in one of them catalogue;
When described the first trigger event occurs, carry out the catalogue switching, by the more new data records of carrying in the follow-up update instruction received in another catalogue, and will before record in the catalogue used each more new data with corresponding data file, merge in new data file;
By in the catalogue of using before, record each more new data with after corresponding data file merges in new data file, the more new data before deleting in the catalogue of use.
Preferably, also comprise the merging module, for:
When the second default trigger event occurs, judge whether the memory capacity sum of adjacent a plurality of data files surpasses default memory capacity threshold value, if do not surpass, described a plurality of data files are merged into to a data file.
Preferably, described merging module, specifically for:
Steps A, sorted to the data file according to the order of the major key comprised in data file, using first data file in the data file after sequence as the benchmark file;
Step B, whether the judgment standard file is last data file in the data file after sequence; If so, process ends; Otherwise, determine the storage space sum of the next data file of benchmark file and benchmark file, and perform step C;
Step C, judge whether described storage space sum surpasses default space threshold value; If so, using the next data file of described benchmark file as the benchmark file, and go to step B; Otherwise, the next data file of benchmark file and benchmark file is merged, using the data file after merging as the benchmark file, and go to step B.
Preferably, described the second default trigger event, be specially the preset data Piece file mergence cycle that reaches.
Preferably, also comprise:
Set up module, for corresponding each data file, set up index file, record the scope of the major key that each SSTable in its corresponding data file stores in index file;
Enquiry module, for when receiving query statement, determine the affiliated data file of major key of carrying in described query statement; The scope of the major key that each SSTable in this data file recorded in corresponding index file according to this data file stores, determine the SSTable under the major key carried in described query statement; Search the value that this major key is corresponding in SSTable under this major key.
Preferably, described the first default trigger event, be specially the default more new data merging cycle that reaches.
Preferably, also comprise the reference number of a document administration module, for:
For described new data file is distributed new reference number of a document;
The data file that deletion is replaced, and discharge the reference number of a document of this data file.
In the embodiment of the present invention, receive update instruction, and record the more new data carried in update instruction, more new data packets is drawn together major key and corresponding renewal content of operation, when the first default trigger event occurs, each that search record be the data file under the major key in new data more, according to the described renewal content of operation in new data more, each data file that more new data is corresponding with it is merged in new data file, and replace the data file before merging by described new data file, thereby, can improve the efficiency that non-relational database historical data is upgraded.
It will be appreciated by those skilled in the art that the module in the device in embodiment can be distributed in the device of embodiment according to the embodiment description, also can carry out respective change and be arranged in the one or more devices that are different from the present embodiment.The module of above-described embodiment can be merged into a module, also can further split into a plurality of submodules.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add essential general hardware platform by software and realize, can certainly pass through hardware, but in a lot of situation, the former is better embodiment.Understanding based on such, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product is stored in a storage medium, comprise that some instructions are with so that a station terminal equipment (can be mobile phone, personal computer, server, or the network equipment etc.) the described method of execution each embodiment of the present invention.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be looked protection scope of the present invention.

Claims (16)

1. a kind of non-relational database data update method, is characterized in that, comprising:
receive update instruction, and record the more new data carried in described update instruction, described more new data packets is drawn together major key and corresponding renewal content of operation;
when the first default trigger event occurs, search each more data file under the major key in new data;
described renewal content of operation according in new data more, merge to each data file that more new data is corresponding with it in new data file, and replace the data file before merging by described new data file.
2. the method of claim 1, is characterized in that, sets up in advance two for recording the catalogue of described more new data;
by the more new data records of carrying in the update instruction received in one of them catalogue;
when described the first trigger event occurs, carry out the catalogue switching, by the more new data records of carrying in the follow-up update instruction received in another catalogue, and will before record in the catalogue used each more new data with corresponding data file, merge in new data file;
by in the catalogue of using before, record each more new data with after corresponding data file merges in new data file, the more new data before deleting in the catalogue of use.
3. the method of claim 1, is characterized in that, also comprises:
when the second default trigger event occurs, judge whether the memory capacity sum of adjacent a plurality of data files surpasses default memory capacity threshold value, if do not surpass, described a plurality of data files are merged into to a data file.
4. , method as claimed in claim 3, it is characterized in that, whether the described memory capacity sum that judges adjacent a plurality of data files surpasses default memory capacity threshold value, if do not surpass, described a plurality of data files is merged into to a data file, is specially:
steps A, sorted to the data file according to the order of the major key comprised in data file, using first data file in the data file after sequence as the benchmark file;
step B, whether the judgment standard file is last data file in the data file after sequence; If so, process ends; Otherwise, determine the storage space sum of the next data file of benchmark file and benchmark file, and perform step C;
step C, judge whether described storage space sum surpasses default space threshold value; If so, using the next data file of described benchmark file as the benchmark file, and go to step B; Otherwise, the next data file of benchmark file and benchmark file is merged, using the data file after merging as the benchmark file, and go to step B.
5. method as claimed in claim 3, is characterized in that, described the second default trigger event, be specially the preset data Piece file mergence cycle that reaches.
6. the method of claim 1, is characterized in that, also comprises: corresponding each data file is set up index file, records the scope of the major key that each SSTable in its corresponding data file stores in index file;
when receiving query statement, determine the affiliated data file of major key of carrying in described query statement;
the scope of the major key that each SSTable in this data file recorded in corresponding index file according to this data file stores, determine the SSTable under the major key carried in described query statement;
search the value that this major key is corresponding in SSTable under this major key.
7. the method of claim 1, is characterized in that, described the first default trigger event is specially the default more new data merging cycle that reaches.
8. the method of claim 1, is characterized in that, also comprises:
for described new data file is distributed new reference number of a document;
the data file that deletion is replaced, and discharge the reference number of a document of this data file.
?
9. a kind of non-relational database data updating device, is characterized in that, comprising:
logging modle, for receiving update instruction, and record the more new data carried in described update instruction, and described more new data packets is drawn together major key and corresponding renewal content of operation;
search module, while occurring for the first trigger event when default, search each more data file under the major key in new data;
update module, for according to the described renewal content of operation of new data more, merge to each data file that more new data is corresponding with it in new data file, and replace the front data file of merging by described new data file.
10. device as claimed in claim 9, is characterized in that, also comprises the renewal data management module, for:
set up in advance two for recording the catalogue of described more new data;
by the more new data records of carrying in the update instruction received in one of them catalogue;
when described the first trigger event occurs, carry out the catalogue switching, by the more new data records of carrying in the follow-up update instruction received in another catalogue, and will before record in the catalogue used each more new data with corresponding data file, merge in new data file;
by in the catalogue of using before, record each more new data with after corresponding data file merges in new data file, the more new data before deleting in the catalogue of use.
11. device as claimed in claim 9, is characterized in that, also comprises the merging module, for:
when the second default trigger event occurs, judge whether the memory capacity sum of adjacent a plurality of data files surpasses default memory capacity threshold value, if do not surpass, described a plurality of data files are merged into to a data file.
12. device as claimed in claim 11, is characterized in that, described merging module, specifically for:
steps A, sorted to the data file according to the order of the major key comprised in data file, using first data file in the data file after sequence as the benchmark file;
step B, whether the judgment standard file is last data file in the data file after sequence; If so, process ends; Otherwise, determine the storage space sum of the next data file of benchmark file and benchmark file, and perform step C;
step C, judge whether described storage space sum surpasses default space threshold value; If so, using the next data file of described benchmark file as the benchmark file, and go to step B; Otherwise, the next data file of benchmark file and benchmark file is merged, using the data file after merging as the benchmark file, and go to step B.
13. device as claimed in claim 11, is characterized in that, described the second default trigger event, be specially the preset data Piece file mergence cycle that reaches.
14. device as claimed in claim 9, is characterized in that, also comprises:
set up module, for corresponding each data file, set up index file, record the scope of the major key that each SSTable in its corresponding data file stores in index file;
enquiry module, for when receiving query statement, determine the affiliated data file of major key of carrying in described query statement; The scope of the major key that each SSTable in this data file recorded in corresponding index file according to this data file stores, determine the SSTable under the major key carried in described query statement; Search the value that this major key is corresponding in SSTable under this major key.
15. device as claimed in claim 9, is characterized in that, described the first default trigger event is specially the default more new data merging cycle that reaches.
16. device as claimed in claim 9, is characterized in that, also comprises the reference number of a document administration module, for:
for described new data file is distributed new reference number of a document;
the data file that deletion is replaced, and discharge the reference number of a document of this data file.
CN201210187686.0A 2012-06-08 2012-06-08 A kind of data of non relational database update method and device Active CN103473239B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210187686.0A CN103473239B (en) 2012-06-08 2012-06-08 A kind of data of non relational database update method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210187686.0A CN103473239B (en) 2012-06-08 2012-06-08 A kind of data of non relational database update method and device

Publications (2)

Publication Number Publication Date
CN103473239A true CN103473239A (en) 2013-12-25
CN103473239B CN103473239B (en) 2016-12-21

Family

ID=49798095

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210187686.0A Active CN103473239B (en) 2012-06-08 2012-06-08 A kind of data of non relational database update method and device

Country Status (1)

Country Link
CN (1) CN103473239B (en)

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744628A (en) * 2014-01-27 2014-04-23 北京奇虎科技有限公司 SSTable file storage method and device
CN104285223A (en) * 2013-12-31 2015-01-14 华为技术有限公司 Method for modifying root nodes and associated modifying apparatus
WO2016175880A1 (en) * 2015-04-29 2016-11-03 Hewlett Packard Enterprise Development Lp Merging incoming data in a database
CN106375360A (en) * 2015-07-24 2017-02-01 阿里巴巴集团控股有限公司 A method, device and system for updating map data
WO2017020576A1 (en) * 2015-07-31 2017-02-09 华为技术有限公司 Method and apparatus for file compaction in key-value storage system
CN106603610A (en) * 2015-10-19 2017-04-26 阿里巴巴集团控股有限公司 Data acquisition method and apparatus
CN107016548A (en) * 2016-12-09 2017-08-04 阿里巴巴集团控股有限公司 Client system, information processing method, reading and writing method and device
CN107145501A (en) * 2017-03-20 2017-09-08 中国建设银行股份有限公司 File updating method, file copying method and corresponding system
CN107315764A (en) * 2017-05-11 2017-11-03 北京奇艺世纪科技有限公司 A kind of update method and system of non-relational database associated data
CN107682356A (en) * 2017-10-26 2018-02-09 广州市雷军游乐设备有限公司 Update method and device, the equipment and storage medium of data
CN108121718A (en) * 2016-11-28 2018-06-05 北京国双科技有限公司 A kind of data processing method and synchronizer
CN108512948A (en) * 2018-03-21 2018-09-07 平安普惠企业管理有限公司 Address book updating method, device, computer equipment and storage medium
CN109597819A (en) * 2018-12-07 2019-04-09 北京字节跳动网络技术有限公司 Method and apparatus for more new database
CN109933573A (en) * 2019-01-30 2019-06-25 北京融链科技有限公司 Database service update method, device and system
CN109947700A (en) * 2019-01-30 2019-06-28 上海卫星工程研究所 Spaceborne imaging data management method based on multistage file symbol
CN110109866A (en) * 2017-12-28 2019-08-09 中移(杭州)信息技术有限公司 A kind of management method and equipment of file system directories
CN110147359A (en) * 2017-12-13 2019-08-20 北京奇虎科技有限公司 A kind of increment generation method, device and a kind of data-updating method, device
US10467192B2 (en) 2014-11-12 2019-11-05 Hauwei Technologies Co.,Ltd. Method and apparatus for updating data table in keyvalue database
CN110727685A (en) * 2019-10-09 2020-01-24 苏州浪潮智能科技有限公司 Data compression method, equipment and storage medium based on Cassandra database
CN111488405A (en) * 2020-04-16 2020-08-04 北京字节跳动网络技术有限公司 Information updating method and device
CN112015819A (en) * 2020-08-31 2020-12-01 杭州欧若数网科技有限公司 Data updating method, device, equipment and medium for distributed graph database
CN110019212B (en) * 2017-11-29 2021-06-18 杭州海康威视数字技术股份有限公司 A data processing method, device and database server
CN120873240A (en) * 2025-06-24 2025-10-31 中科腾龙信息技术有限公司 Data storage method, apparatus, device, readable storage medium, and program product

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101499069A (en) * 2008-02-02 2009-08-05 中兴通讯股份有限公司 Internal memory database file updating method and apparatus
US20100306236A1 (en) * 2009-05-29 2010-12-02 Sun Microsystems, Inc. Data Policy Management System and Method for Managing Data

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101499069A (en) * 2008-02-02 2009-08-05 中兴通讯股份有限公司 Internal memory database file updating method and apparatus
US20100306236A1 (en) * 2009-05-29 2010-12-02 Sun Microsystems, Inc. Data Policy Management System and Method for Managing Data

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
佚名: "Nosql数据库教程之初探MongoDB-第一部", 《HTTP://M.GBIN1.COM/TECHNOLOGY/JAVAUTILITIES/20120116GETTINGSTARTEDWITHMONGODBPART1/INDEX.HTML》 *
佚名: "键值存储【KV存储】以及SSTable介绍", 《HTTP://BLOG.SINA.COM.CN/S/BLOG_502D765F01010NWX.HTML》 *

Cited By (40)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104285223B (en) * 2013-12-31 2018-03-13 华为技术有限公司 Change the method and modification device of root node
CN104285223A (en) * 2013-12-31 2015-01-14 华为技术有限公司 Method for modifying root nodes and associated modifying apparatus
WO2015100626A1 (en) * 2013-12-31 2015-07-09 华为技术有限公司 Method for modifying root nodes and modifying apparatus
US10289710B2 (en) 2013-12-31 2019-05-14 Huawei Technologies Co., Ltd. Method for modifying root node, and modification apparatus
CN103744628B (en) * 2014-01-27 2016-09-28 北京奇虎科技有限公司 SSTable file storage method and device
CN103744628A (en) * 2014-01-27 2014-04-23 北京奇虎科技有限公司 SSTable file storage method and device
US10467192B2 (en) 2014-11-12 2019-11-05 Hauwei Technologies Co.,Ltd. Method and apparatus for updating data table in keyvalue database
WO2016175880A1 (en) * 2015-04-29 2016-11-03 Hewlett Packard Enterprise Development Lp Merging incoming data in a database
CN106375360A (en) * 2015-07-24 2017-02-01 阿里巴巴集团控股有限公司 A method, device and system for updating map data
WO2017020576A1 (en) * 2015-07-31 2017-02-09 华为技术有限公司 Method and apparatus for file compaction in key-value storage system
US11232073B2 (en) 2015-07-31 2022-01-25 Huawei Technologies Co., Ltd. Method and apparatus for file compaction in key-value store system
CN106603610B (en) * 2015-10-19 2019-11-22 阿里巴巴集团控股有限公司 A data acquisition and synchronization method and device
CN106603610A (en) * 2015-10-19 2017-04-26 阿里巴巴集团控股有限公司 Data acquisition method and apparatus
CN108121718A (en) * 2016-11-28 2018-06-05 北京国双科技有限公司 A kind of data processing method and synchronizer
CN108121718B (en) * 2016-11-28 2021-12-24 北京国双科技有限公司 Data processing method and synchronization equipment
CN107016548A (en) * 2016-12-09 2017-08-04 阿里巴巴集团控股有限公司 Client system, information processing method, reading and writing method and device
CN107016548B (en) * 2016-12-09 2022-01-28 创新先进技术有限公司 Client system, information processing method, reading and writing method and device
CN114677145A (en) * 2016-12-09 2022-06-28 创新先进技术有限公司 Client system, information processing method, and reading and writing method and device
CN107145501A (en) * 2017-03-20 2017-09-08 中国建设银行股份有限公司 File updating method, file copying method and corresponding system
CN107145501B (en) * 2017-03-20 2020-09-29 中国建设银行股份有限公司 File updating method, file copying method and corresponding system
CN107315764A (en) * 2017-05-11 2017-11-03 北京奇艺世纪科技有限公司 A kind of update method and system of non-relational database associated data
CN107315764B (en) * 2017-05-11 2020-04-21 北京奇艺世纪科技有限公司 Method and system for updating non-relational database associated data
CN107682356A (en) * 2017-10-26 2018-02-09 广州市雷军游乐设备有限公司 Update method and device, the equipment and storage medium of data
CN110019212B (en) * 2017-11-29 2021-06-18 杭州海康威视数字技术股份有限公司 A data processing method, device and database server
CN110147359A (en) * 2017-12-13 2019-08-20 北京奇虎科技有限公司 A kind of increment generation method, device and a kind of data-updating method, device
CN110147359B (en) * 2017-12-13 2024-11-05 北京奇虎科技有限公司 A method and device for incremental generation and a method and device for data updating
CN110109866A (en) * 2017-12-28 2019-08-09 中移(杭州)信息技术有限公司 A kind of management method and equipment of file system directories
CN110109866B (en) * 2017-12-28 2021-11-09 中移(杭州)信息技术有限公司 Method and equipment for managing file system directory
CN108512948A (en) * 2018-03-21 2018-09-07 平安普惠企业管理有限公司 Address book updating method, device, computer equipment and storage medium
CN108512948B (en) * 2018-03-21 2022-05-17 平安普惠企业管理有限公司 Address book updating method, device, computer equipment and storage medium
CN109597819A (en) * 2018-12-07 2019-04-09 北京字节跳动网络技术有限公司 Method and apparatus for more new database
CN109947700A (en) * 2019-01-30 2019-06-28 上海卫星工程研究所 Spaceborne imaging data management method based on multistage file symbol
CN109933573A (en) * 2019-01-30 2019-06-25 北京融链科技有限公司 Database service update method, device and system
CN109933573B (en) * 2019-01-30 2021-06-01 北京融链科技有限公司 Database service update method, device and system
CN110727685B (en) * 2019-10-09 2022-04-22 苏州浪潮智能科技有限公司 Data compression method, equipment and storage medium based on Cassandra database
CN110727685A (en) * 2019-10-09 2020-01-24 苏州浪潮智能科技有限公司 Data compression method, equipment and storage medium based on Cassandra database
CN111488405A (en) * 2020-04-16 2020-08-04 北京字节跳动网络技术有限公司 Information updating method and device
CN112015819A (en) * 2020-08-31 2020-12-01 杭州欧若数网科技有限公司 Data updating method, device, equipment and medium for distributed graph database
CN120873240A (en) * 2025-06-24 2025-10-31 中科腾龙信息技术有限公司 Data storage method, apparatus, device, readable storage medium, and program product
CN120873240B (en) * 2025-06-24 2026-04-07 中科腾龙信息技术有限公司 Data storage methods, apparatus, devices, readable storage media and program products

Also Published As

Publication number Publication date
CN103473239B (en) 2016-12-21

Similar Documents

Publication Publication Date Title
CN103473239A (en) Method and device for updating data of non relational database
US10831736B2 (en) Fast multi-tier indexing supporting dynamic update
CN106708427B (en) A storage method suitable for key-value pair data
CN102629247B (en) Method, device and system for data processing
US8799601B1 (en) Techniques for managing deduplication based on recently written extents
CN102542071B (en) Distributed data processing system and method
CN102375853A (en) Distributed database system, method for building index therein and query method
CN105912687B (en) Magnanimity distributed data base storage unit
CN102495894A (en) Method, device and system for searching repeated data
CN102043726B (en) Storage management method of large-scale timing sequence data
CN103139300A (en) Virtual machine image management optimization method based on data de-duplication
CN105159845A (en) Memory reading method
CN107766374B (en) Optimization method and system for storage and reading of massive small files
CN104239377A (en) Platform-crossing data retrieval method and device
CN105631003A (en) Intelligent index establishing, inquiring and maintaining method supporting mass data classification and counting
CN103106286A (en) Method and device for managing metadata
CN102739622A (en) Expandable data storage system
EP3767486B1 (en) Multi-record index structure for key-value stores
CN107766355B (en) Hierarchical data management method, hierarchical data management system and instant messaging system
CN105512325B (en) Update, deletion and the method for building up and device of multi-edition data index
CN114297196A (en) Metadata storage method and device, electronic equipment and storage medium
CN102073690B (en) Method for constructing memory database supporting historical Key information
CN104166661A (en) Data storage system and method
CN102096676B (en) Data updating and query control method and system
CN105631010A (en) Optimization method based on HDFS small file storage

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200902

Address after: 518057 Nanshan District science and technology zone, Guangdong, Zhejiang Province, science and technology in the Tencent Building on the 1st floor of the 35 layer

Co-patentee after: TENCENT CLOUD COMPUTING (BEIJING) Co.,Ltd.

Patentee after: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

Address before: Shenzhen Futian District City, Guangdong province 518057 Zhenxing Road, SEG Science Park 2 East Room 403

Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

TR01 Transfer of patent right