CN104965908B - A kind of position range determines method and device - Google Patents

A kind of position range determines method and device Download PDF

Info

Publication number
CN104965908B
CN104965908B CN201510379657.8A CN201510379657A CN104965908B CN 104965908 B CN104965908 B CN 104965908B CN 201510379657 A CN201510379657 A CN 201510379657A CN 104965908 B CN104965908 B CN 104965908B
Authority
CN
China
Prior art keywords
row
file
modified logo
station location
location marker
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510379657.8A
Other languages
Chinese (zh)
Other versions
CN104965908A (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201510379657.8A priority Critical patent/CN104965908B/en
Publication of CN104965908A publication Critical patent/CN104965908A/en
Application granted granted Critical
Publication of CN104965908B publication Critical patent/CN104965908B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

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

Abstract

The embodiment of the invention discloses a kind of position ranges to determine that method and device, this method may include:Obtain the modified logo file and data storage file corresponding to hbase tables;By the modified logo file, the corresponding each first kind station location marker of the modified logo is determined;Extract that corresponding row is strong and timestamp from each first kind station location marker determined respectively;The second required class station location marker is searched from the data storage file, wherein the second required class station location marker includes:With the row in the first kind station location marker determined be good for identical row it is strong and with the identical timestamp of corresponding timestamp in the first kind station location marker;Row key corresponding to the second class station location marker based on lookup, determines the range for the position that data value is changed.Compared with prior art, it saves and searches the time, reduce the occupancy to terminal device resource, user experiences more preferably.

Description

A kind of position range determines method and device
Technical field
The present embodiments relate to database application field, more particularly to a kind of position range determines method and device.
Background technology
Hbase tables are a distributed nosql databases based on row storage , row strong by row are good for and timestamp defines each data value in the hbase tables.Usual attribute is similar to arrange strong be combined into One row cluster, each row cluster corresponds to a physical file in storing process, which is one group of key-value sequence, Strong, row are strong and timestamp forms by going by middle key.Such as:Interface present hbase tables as shown in Figure 1, storage when, according to Row cluster is stored into two physical files of Fig. 2 and Fig. 3.Fig. 2 is the physical file stored according to row cluster " personal information " and Fig. 3 is The physical file stored according to row cluster " treatment ".
Since hbase tables can store mass data, when some or the certain data in these data are changed, In order to find the position for the data changed, then method that the full table scan of generally use compares, due in hbase data compared with More, the method for full table scan is time-consuming longer, and many inconvenience are brought to user.It is then scanning then comparison diagram corresponding to above-mentioned example Each station location marker and the station location marker meaning in physical file shown in 2 and Fig. 3 subrogate the data value in setting, so relatively Cumbersome and time-consuming, user's impression is bad.
Invention content
Based on the above issues, the embodiment of the invention discloses a kind of position ranges to determine method and device, is searched with saving Time reduces the occupancy to terminal device resource.Technical solution is as follows:
An embodiment of the present invention provides a kind of position ranges to determine method, may comprise steps of:
Obtain the modified logo file and data storage file corresponding to hbase tables, the row cluster in the hbase tables Including modified logo row cluster and data value row cluster, the modified logo in the modified logo row cluster is when in the data value row cluster Corresponding data value added when changing;Wherein, the modified logo file is for the modified logo row cluster The file for being stored and being formed, and include:The corresponding row of modified logo at least one table by hbase are strong, row is strong and The first kind station location marker that timestamp is formed, and each first kind station location marker meaning subrogate the modified logo in setting;Its In, the data storage file includes to be stored the file to be formed for the data value row cluster:It is at least one by Row key, row corresponding to data value in hbase tables are good for and the second class station location marker and each second of timestamp composition Class station location marker meaning subrogates the data value in setting;
By the modified logo file, the corresponding each first kind station location marker of the modified logo is determined;
Extract that corresponding row is strong and timestamp from each first kind station location marker determined respectively;
The second required class station location marker is searched from the data storage file, wherein the second required class position Setting mark includes:With the row in the first kind station location marker determined be good for identical row it is strong and with the first kind station location marker In the identical timestamp of corresponding timestamp;
Row key corresponding to the second class station location marker based on lookup, determines the range for the position that data value is changed.
Optionally, further include:
After determining the range of position that data value is changed, by the first kind position in the modified logo file Mark and corresponding modified logo are deleted.
Optionally, the modified logo is null character string or modification information.
Optionally, when the modified logo is modification information, the method further includes:
According to the modification information, data value is determined from the range for the position that the data value determined is changed The position changed.
Optionally, further include:
After determining position that data value is changed, by the modified logo file first kind station location marker and Corresponding modified logo is deleted.
Optionally, further include:
After the association hbase tables and the association hbase tables that the hbase tables have successively execution relationship are When executive table, after the first kind station location marker and corresponding modified logo in the deletion modified logo file, institute is generated The corresponding association identification file of association identification row cluster in association hbase tables is stated, the association identification row cluster is the association Row cluster corresponding with the associated data value that the data value changed in the hbase tables is associated, described in hbase tables Association identification and the modified logo in association identification file is identical or different.
The embodiment of the present invention additionally provides a kind of position range determining device, may include:File obtaining unit, mark are true Order member, Objective extraction unit, identifier lookup unit and range determination unit, wherein
The file obtaining unit, for obtaining modified logo file and data storage file corresponding to hbase tables, Row cluster in the hbase tables includes modified logo row cluster and data value row cluster, the modification mark in the modified logo row cluster Know to be added when the corresponding data value in the data value row cluster is changed;Wherein, the modified logo file To be stored the file to be formed for the modified logo row cluster, and include:Modification at least one table by hbase The first kind station location marker that corresponding row are strong, row is strong and timestamp is formed is identified, and each first kind station location marker is signified Subrogate the modified logo in setting;Wherein, the data storage file is stored for the data value row cluster and is formed File, and include:The row key corresponding to data value at least one table by hbase, row be strong and timestamp forms second Class station location marker and each second class station location marker meaning subrogate the data value in setting;
The mark determination unit, for the modified logo file that is obtained by the file obtaining unit, described in determination The corresponding each first kind station location marker of modified logo;
The Objective extraction unit, for being marked respectively from each first kind position that the mark determination unit is determined Extract that corresponding row is strong and timestamp in knowledge;
The identifier lookup unit, for from the data storage file that the file obtaining unit obtains search needed for Second class station location marker, wherein the second required class station location marker includes:With in the first kind station location marker determined Row be good for identical row it is strong and with the identical timestamp of corresponding timestamp in the first kind station location marker;
The range determination unit, corresponding to the second class station location marker for being searched based on the identifier lookup unit Row key determines the range for the position that data value is changed.
Optionally, further include:First deleting unit, first deleting unit are true for working as the range determination unit After the range for making the position that data value is changed, by first kind station location marker in the modified logo file and corresponding Modified logo is deleted.
Optionally, the modified logo is null character string or modification information.
Optionally, when the modified logo is modification information, described device further includes:Position determination unit, institute's rheme Determination unit is set, what the data value for according to the modification information, being determined from the range determination unit was changed The position that data value is changed is determined in the range of position.
Optionally, further include:Second deleting unit, second deleting unit are true for working as the position determination unit After making the position that data value is changed, by the first kind station location marker and corresponding modification mark in the modified logo file Know and deletes.
Optionally, further include:File generating unit, the file generating unit, for existing first when the hbase tables When the association hbase tables and the association hbase tables of execution relationship are rear executive table afterwards, in second deleting unit After deleting first kind station location marker and the corresponding modified logo in the modified logo file, the association hbase tables are generated The corresponding association identification file of association identification row cluster in lattice, the association identification row cluster be the association hbase tables in and The associated corresponding row cluster of associated data value of the data value changed in the hbase tables, the association identification file In association identification and the modified logo it is identical or different.
In the embodiment of the present invention, the modified logo file and data storage file corresponding to hbase tables are obtained;Pass through institute Modified logo file is stated, determines the corresponding each first kind station location marker of the modified logo;Respectively from each of being determined Extract that corresponding row is strong and timestamp in first kind station location marker;The second required class is searched from the data storage file Station location marker, wherein the second required class station location marker includes:It is strong with the row in the first kind station location marker determined Identical row it is strong and with the identical timestamp of corresponding timestamp in the first kind station location marker;The second class based on lookup Row key corresponding to station location marker, determines the range for the position that data value is changed.The embodiment of the present invention utilizes modified logo It can quickly determine the range of location revision, compared with prior art, save and search the time, reduce to terminal device resource It occupies, user experiences more preferably.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Obtain other attached drawings according to these attached drawings.
Fig. 1 is that figure is presented in a kind of interface of hbase tables;
Fig. 2 is a kind of corresponding data value storage file of hbase tables;
Fig. 3 is the corresponding another data value storage file of hbase tables;
Fig. 4 is that figure is presented in another interface of hbase tables;
Fig. 5 is the corresponding modified logo file of hbase tables;
Fig. 6 is determined a kind of flow chart of method by a kind of position range that the embodiment of the present invention provides;
Fig. 7 is determined another flow chart of method by a kind of position range that the embodiment of the present invention provides;
Fig. 8 is determined another flow chart of method by a kind of position range that the embodiment of the present invention provides;
A kind of structural schematic diagram for position range determining device that Fig. 9 is provided by the embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without creative efforts Embodiment shall fall within the protection scope of the present invention.
Method, which illustrates, to be determined to a kind of position range provided in an embodiment of the present invention first, this method may include with Lower step:
Obtain the modified logo file and data storage file corresponding to hbase tables, the row cluster in the hbase tables Including modified logo row cluster and data value row cluster, the modified logo in the modified logo row cluster is when in the data value row cluster Corresponding data value added when changing;Wherein, the modified logo file is for the modified logo row cluster The file for being stored and being formed, and include:The corresponding row of modified logo at least one table by hbase are strong, row is strong and The first kind station location marker that timestamp is formed, and each first kind station location marker meaning subrogate the modified logo in setting;Its In, the data storage file includes to be stored the file to be formed for the data value row cluster:It is at least one by Row key, row corresponding to data value in hbase tables are good for and the second class station location marker and each second of timestamp composition Class station location marker meaning subrogates the data value in setting;
By the modified logo file, the corresponding each first kind station location marker of the modified logo is determined;
Extract that corresponding row is strong and timestamp from each first kind station location marker determined respectively;
The second required class station location marker is searched from the data storage file, wherein the second required class position It sets and is identified as:With the row in the first kind station location marker determined be good for identical row it is strong and in the first kind station location marker The identical timestamp of corresponding timestamp;
Row key corresponding to the second class station location marker based on lookup, determines the range for the position that data value is changed.
It should be noted that hbase tables are a tables based on row storage, it is strong, row key and timestamp with row It defines each data value, and the similar row key of attribute is typically stored into or reads together, therefore often belongs to these Property similar row key form a row cluster, the corresponding storage file of hbase tables is then the file stored for row cluster.It should Storage file is one group of key-value sequence, and for key by going strong, row key and timestamp forms, value is then specific data value. Modified logo row cluster is increased in the hbase tables of the embodiment of the present invention, therefore is stored as modified logo file and data are deposited Store up file, wherein modified logo file is the file stored for modified logo row cluster, and data storage file is for number The file stored according to storage row cluster.The modified logo can be null character string, or modification information, such as:" " " or Row are good for information.
The embodiment of the present invention can quickly determine the range of location revision using modified logo, compared with prior art, save The lookup time, reduce occupancy to terminal device resource, user experiences more preferably.
It describes in detail below to the step of embodiment of the present invention.
Fig. 6 is determined that the flow chart of method, this method may include by a kind of position range that the embodiment of the present invention provides Following steps:
S101 obtains modified logo file and data storage file corresponding to hbase tables;
Wherein, the row cluster in the hbase tables includes modified logo row cluster and data value row cluster, the modified logo row Modified logo in cluster is is added when the corresponding data value in the data value row cluster is changed;Wherein, described Modified logo file includes to be stored the file to be formed for the modified logo row cluster:It is at least one by hbase The first kind station location marker and each first kind that the corresponding row of modified logo in table are strong, row is strong and timestamp is formed Station location marker meaning subrogates the modified logo in setting;Wherein, the data storage file is to be carried out for the data value row cluster The file of storage and formation, and include:The row key corresponding to data value, capable strong and time at least one table by hbase The the second class station location marker and each second class station location marker meaning for stabbing composition subrogate the data value in setting;
It should be noted that after the data value in the hbase tables of the embodiment of the present invention is modified, in modified logo row cluster In the change data value corresponding position add modified logo, the modified logo file stored for the modified logo row cluster It is also one group of key-value sequence, by the corresponding row of change data value, strong, row key and timestamp form key, and value is then The corresponding modified logo of change data value.In embodiments of the present invention, hbase tables include two class row clusters, are several respectively According to value row cluster and modified logo row cluster, the file of corresponding storage is data value storage file and modified logo file, wherein the number Be the file that is stored of corresponding data value row cluster according to value storage file, the modified logo file be corresponding modified logo row cluster into The file of row storage.Such as:Fig. 4 is the hbase spreadsheet interface presentation figures after data value is changed, and Fig. 2 and Fig. 3 are respectively to scheme 4 data value row cluster " personal information " and the corresponding data value storage file of data value row cluster " treatment ", Fig. 5 are the modification of Fig. 4 The corresponding modified logo file of identity column cluster " flag bit ".
Specifically, obtaining the modified logo file and data storage file corresponding to hbase tables, the modified logo file It is one group of key-value sequence, including at least one first kind station location marker, which is key, by changing It identifies corresponding row to be good for, arrange strong and timestamp composition, which is value, is that addition exists when data value is changed In modified logo row cluster;The data value storage file is also one group of key-value sequence, including at least one second class position Mark, which is key, and, row strong by the corresponding row of data value are good for and timestamp forms, the second class position It is value that mark meaning, which subrogates the data value set,.
For example, figure is presented in the interface that Fig. 4 is hbase tables, including:" personal information " and " treatment " two data values Row cluster, " flag bit " modified logo row cluster.The data value storage file of corresponding " personal information " storage is Fig. 2, therein One the second class station location marker is r1:Area:T8, corresponding data value are " Beijing ";The data value of corresponding " treatment " storage is deposited Storage file is Fig. 3, one of those second class station location marker is r1:Wage:T8, corresponding data value are " 1000 ";Corresponding " mark The modified logo file of will position " storage is Fig. 5, and one of first kind station location marker is r2:Index:T9, corresponding modification It is identified as " " ".S101 steps are to obtain Fig. 2, Fig. 3 and Fig. 5.
S102 determines the corresponding each first kind station location marker of the modified logo by the modified logo file;
Specifically, obtaining modified logo file in S101 steps, which includes:First kind station location marker and The first kind station location marker meaning subrogates the modified logo for setting place, it is possible to which, by the modified logo file, determination is each repaiied Change the corresponding first kind station location marker of mark.
Come, for example, Fig. 5 is modified logo file, there was only one in the modified logo file using the example in S101 steps The corresponding first kind station location marker of a first kind station location marker and corresponding modified logo, you can directly determine modified logo " " " r2:Index:t9.Deduce successively, it, also can directly really if there is second first kind station location marker modified logo corresponding with its It is fixed.
S103, extracts that corresponding row is strong and timestamp from each first kind station location marker determined respectively;
Specifically, the first kind station location marker in modified logo file is strong by the corresponding row of modified logo, row are strong and the time Stamp composition, therefore after determining each first kind station location marker in S102 steps, can be marked from each first kind position determined Extract that corresponding row is strong and timestamp in knowledge respectively.
Come with the example in S102 steps for example, the first kind station location marker in Fig. 5 is r2:Index:T9, wherein r2 Strong for row, " index " is that row are strong, and t9 is timestamp, you can r2 and timestamp t9 is good in extraction trip.
S104 searches the second required class station location marker from the data storage file;
Wherein, the second required class station location marker includes:It is strong with the row in the first kind station location marker determined Identical row is strong, with the identical timestamp of corresponding timestamp in the first kind station location marker;
It should be noted that data storage file includes:Second class station location marker and the second class station location marker are referred to Data value at position, wherein strong, row are strong and timestamp forms by going for the second class station location marker.
Specifically, respectively from being extracted in first kind station location marker after corresponding row is strong and timestamp in S103 steps, The second required class station location marker is searched in the data storage file obtained in S101 steps, the second required class station location marker Row strong identical, the timestamp of the second required class station location marker and first kind position are good for the row in first kind station location marker Timestamp in mark is identical.
Come with the example in S103 steps for example, the row extracted from Fig. 5 is good for then exists for r2, timestamp t9 Row is searched in Fig. 2 and Fig. 3 to be good for as r2, and the second class station location marker that corresponding timestamp is t9, can find eligible The second class station location marker be r2:Occupation:t9.
S105, the row key corresponding to the second class station location marker based on lookup, determines the position that data value is changed Range.
Specifically, after finding the second required class station location marker in S104 steps, the second class position found Mark can be one, can also be multiple.If the second class station location marker found is one, the second class position mark There are one strong of the row that knowledge includes, and the range for the position that data value is changed is that the second class station location marker is referred to Position;If the second class station location marker found is multiple, these the second class station location markers are in addition to all including S103 steps In the row that extracts is strong and timestamp outside, further include that respectively different row are strong, the position that these the second class station location markers are referred to It is multiple, the range for the position that data value is changed is each position that these the second class station location markers are referred to.
Come with the example in S104 steps for example, the second required class station location marker found only has r2:Occupation: T9, so the range for the position that data value is changed is r2:Occupation:The position that t9 is referred to, it is known that, the number in the position It is " electrician " according to value.But in another specific embodiment, if the second required class station location marker found is r2:A: t9、r2:B:T9 and r2:C:T9, then the ranging from r2 for the position that data value is changed can only be determined:A:t9、r2:B:T9 and r2:C:Three positions that t9 is referred to.
In the embodiment of the present invention, the modified logo file and data storage file corresponding to hbase tables are obtained;Pass through institute Modified logo file is stated, determines the corresponding each first kind station location marker of the modified logo;Respectively from each of being determined Extract that corresponding row is strong and timestamp in first kind station location marker;The second required class is searched from the data storage file Station location marker, wherein the second required class station location marker includes:It is strong with the row in the first kind station location marker determined Identical row is strong, with the identical timestamp of corresponding timestamp in the first kind station location marker;The second class position based on lookup The corresponding row key of mark is set, determines the range for the position that data value is changed.The embodiment of the present invention can using modified logo Quickly to determine the range of location revision, compared with prior art, saves and search the time, reduce and terminal device resource is accounted for With user experiences more preferably.
In order to reduce occupancy of the storage to memory of hbase tables, usually in the position for determining that data value is changed Range after, by the relevant information deletion of modified logo.As shown in fig. 7, a kind of position model provided by the embodiment of the present invention It encloses the flow chart of determining method, on the basis of Fig. 7 embodiments shown in Fig. 6, can also include the following steps:
S206, after determining the range of position that data value is changed, by first in the modified logo file Class station location marker and corresponding modified logo are deleted.
Specifically, after determining the range of position that data value is changed in S105 steps, the modified logo file In first kind station location marker and corresponding modified logo for this data value change do not acted on, therefore can directly by First kind station location marker and corresponding modified logo in the modified logo file are deleted.Reduce depositing for hbase tables in this way Store up capacity so that faster, user experiences more preferably the speed of operation hbase tables.
In practice, modified logo can be null character string or modification information may not represent any if it is null character string Information, only the effect of a mark, is equivalent to and has done a label to location revision;But when modified logo is modification information When, the exact position that data value is changed is determined according to the modification information.Then when the modified logo is modification information, such as Shown in Fig. 8, determine that another flow chart of method, Fig. 8 are shown in Fig. 6 by a kind of position range that the embodiment of the present invention provides On the basis of embodiment, it can also include the following steps:
S306 is determined according to the modification information from the range for the position that the data value determined is changed The position that data value is changed.
Specifically, the range for the position that the data value determined in S105 steps is changed can be a second class position The position that mark refers to is set, can also be the position that multiple second class station location markers refer to.Certainly if it is a second class position The position that mark refers to is set, can directly be determined;But if being the position that multiple second class station location markers refer to, you can according to repairing Breath is converted to, judges which in the position that multiple second class station location markers refer to position that data value is changed be specifically It is a.Such as:Modification information is that row are strong, then can be directly found in the modification information from multiple second class station location markers Strong the second class station location marker of row, and then the accurate position for determining data value and changing.
If carrying out the ranging from r2 for example, the position that data value is changed with the example in S105 steps:A:t9、 r2:B:T9 and r2:C:Three positions that t9 is referred to, modification information is that row are good for A, then can directly determine that data value is changed Position be r2:A:The position that t9 is referred to.
Occupancy of the storage to memory in order to reduce hbase tables can after determining the position that data value is changed By the relevant information deletion of modified logo, then the method for the embodiment of the present invention can also include the following steps:
After determining position that data value is changed, by the modified logo file first kind station location marker and Corresponding modified logo is deleted.
Specifically, after determining position that data value is changed in S306 steps, in the modified logo file A kind of station location marker and corresponding modified logo have not acted on the change of this data value.It therefore can be directly by the modification The first kind station location marker and corresponding modified logo identified in file is deleted, and reduces the memory capacity of hbase tables in this way, So that the speed of operation hbase tables is faster, user experiences more preferably.
In practical applications, many relevant hbase tables, the data value in one of hbase tables are usually present It changes, exists in other hbase tables and the relevant data value of the data value can also be changed.In order to improve hbase The efficiency of the position range of the searching data value change of table, the method for the embodiment of the present invention can also include the following steps:
After the association hbase tables and the association hbase tables that the hbase tables have successively execution relationship are When executive table, after the first kind station location marker and corresponding modified logo in the deletion modified logo file, institute is generated The corresponding association identification file of association identification row cluster in association hbase tables is stated, the association identification row cluster is the association Row cluster corresponding with the associated data value that the data value changed in the hbase tables is associated, described in hbase tables Association identification file association mark is identical or different with the modified logo.
Specifically, when the hbase tables in the embodiment of the present invention have association hbase tables, it is associated in hbase tables Associated data value is related with some or the certain data values in hbase tables.And hbase tables are first carried out, execute association afterwards When hbase tables, the first kind position mark in the corresponding modified logo file of hbase tables in deleting the embodiment of the present invention Know and after corresponding modified logo, automatically generates the corresponding association identification file of association hbase tables.The association identification file is For the file of the association identification row cluster storage of association hbase tables, the association identification in the association identification row cluster is incidence number It is added when being changed according to value.The association identification of addition and above-mentioned modified logo are identical or different.
For example, there is data value a in hbase tables, being associated in hbase tables has data value a+1, then a occurs more When changing, a+1 can also be changed, and after only change data value a, data value a+1 can just be changed, i.e. hbase tables There is successively execution relationship with hbase tables are associated with, then the correlation in deleting the corresponding modified logo file of hbase tables After information, the association identification file for the corresponding association identification row cluster storages of a+1 is automatically generated, and then pass through the association identification File finds the position range for the data value changed.
As known from the above, this automatically generates the method for association identification file many there are the hbase of incidence relation searching When the change data value of table, searches effect and especially protrude, the change data of series of forms can be found at a terrific speed Value, improves search efficiency, and user experiences more preferably.
In the embodiment of the present invention, the modified logo file and data storage file corresponding to hbase tables are obtained;Pass through institute Modified logo file is stated, determines the corresponding each first kind station location marker of the modified logo;Respectively from each of being determined Extract that corresponding row is strong and timestamp in first kind station location marker;The second required class is searched from the data storage file Station location marker, wherein the second required class station location marker includes:It is strong with the row in the first kind station location marker determined Identical row it is strong and with the identical timestamp of corresponding timestamp in the first kind station location marker;The second class based on lookup Row key corresponding to station location marker, determines the range for the position that data value is changed.The embodiment of the present invention utilizes modified logo It can quickly determine the range of location revision, compared with prior art, save and search the time, reduce to terminal device resource It occupies, user experiences more preferably.
Corresponding to above method embodiment, the embodiment of the present invention additionally provides a kind of position range determining device, such as Fig. 9 institutes Show, may include:File obtaining unit 410, mark determination unit 420, Objective extraction unit 430,440 and of identifier lookup unit Range determination unit 450, wherein
The file obtaining unit 410, for obtaining modified logo file and data storage text corresponding to hbase tables Part, the row cluster in the hbase tables includes modified logo row cluster and data value row cluster, the modification in the modified logo row cluster It is identified as and is added when the corresponding data value in the data value row cluster is changed;Wherein, the modified logo text Part includes to be stored the file to be formed for the modified logo row cluster:Repairing at least one table by hbase Change the first kind station location marker for identifying that corresponding row are strong, row is strong and timestamp is formed, and each first kind station location marker institute Refer to the modified logo in position;Wherein, the data storage file to be formed to be stored for the data value row cluster File, and include:The row key corresponding to data value at least one table by hbase, row be strong and timestamp forms the Two class station location markers and each second class station location marker meaning subrogate the data value in setting;
The mark determination unit 420, the modified logo file for being obtained by the file obtaining unit 410, really Determine the corresponding each first kind station location marker of the modified logo;
The Objective extraction unit 430, each first kind for being determined respectively from the mark determination unit 420 Extract that corresponding row is strong and timestamp in station location marker;
The identifier lookup unit 440, for being searched from the data storage file that the file obtaining unit 410 obtains The second required class station location marker, wherein the second required class station location marker includes:Really with mark determination unit institute Row in the first kind station location marker made be good for identical row it is strong and with the corresponding timestamp phase in the first kind station location marker Same timestamp;
The range determination unit 450, the second class station location marker institute for being searched based on the identifier lookup unit 440 Corresponding row key, determines the range for the position that data value is changed.
The embodiment of the present invention can quickly determine the range of location revision using modified logo, compared with prior art, save The lookup time, reduce occupancy to terminal device resource, user experiences more preferably.
On the basis of embodiment shown in Fig. 9, can also include:First deleting unit, first deleting unit, is used for It, will be in the modified logo file after range determination unit 450 determines the range for the position that data value is changed First kind station location marker and corresponding modified logo delete.
In a specific embodiment, the modified logo is null character string or modification information.
In a specific embodiment, when the modified logo is modification information, described device further includes:Location determination Unit, the position determination unit, the number for according to the modification information, being determined from the range determination unit 450 The position that data value is changed is determined in the range for the position changed according to value.
On the basis of above-mentioned specific embodiment, can also include:Second deleting unit, second deleting unit are used In after the position determination unit determines the position that data value is changed, by the first kind in the modified logo file Station location marker and corresponding modified logo are deleted.
On the basis of the embodiment of the second deleting unit of above-mentioned increase, can also include:File generating unit, the text Part generation unit, for successively executing the association hbase tables of relationship and the association hbase when the hbase tables exist When table is rear executive table, first kind station location marker in second deleting unit deletes the modified logo file and After corresponding modified logo, the corresponding association identification file of association identification row cluster in the association hbase tables is generated.It is described Association identification row cluster is pass associated with the data value changed in the hbase tables in the association hbase tables Join the corresponding row cluster of data value, the association identification and the modified logo in the association identification file are identical or different.
For system or device embodiment, since it is substantially similar to the method embodiment, so the comparison of description is simple Single, the relevent part can refer to the partial explaination of embodiments of method.
It should be noted that herein, be such as used merely to an entity with second or the like relational terms or Person operates to be distinguished with another entity or operation, is appointed without necessarily requiring or implying existing between these entities or operation What this actual relationship or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or equipment including a series of elements includes not only those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or equipment institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including institute State in the process, method, article or equipment of element that there is also other identical elements.
One of ordinary skill in the art will appreciate that all or part of step in realization above method embodiment is can It is completed with instructing relevant hardware by program, the program can be stored in computer read/write memory medium, The storage medium designated herein obtained, such as:ROM/RAM, magnetic disc, CD etc..
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (12)

1. a kind of position range determines method, which is characterized in that including:
The modified logo file and data storage file corresponding to hbase tables are obtained, the row cluster in the hbase tables includes Modified logo row cluster and data value row cluster, the modified logo in the modified logo row cluster are when the phase in the data value row cluster What corresponding data value was added when changing;Wherein, the modified logo file is to be carried out for the modified logo row cluster The file of storage and formation, and include:The corresponding row of modified logo at least one table by hbase are good for, row is strong and the time The formed first kind station location marker of stamp, and each first kind station location marker meaning subrogate the modified logo in setting;Wherein, institute Data storage file is stated to be stored the file to be formed for the data value row cluster, and includes:It is at least one by hbase Row key, the second class station location marker that row is good for and timestamp forms corresponding to data value in table and each second class position Set the signified data value subrogated in setting of mark;
By the modified logo file, the corresponding each first kind station location marker of the modified logo is determined;
Extract that corresponding row is strong and timestamp from each first kind station location marker determined respectively;
The second required class station location marker is searched from the data storage file, wherein required the second class position mark Knowledge includes:With the row in the first kind station location marker determined be good for identical row it is strong and in the first kind station location marker The identical timestamp of corresponding timestamp;
Row key corresponding to the second class station location marker based on lookup, determines the range for the position that data value is changed.
2. according to the method described in claim 1, it is characterized in that, further including:
After determining the range of position that data value is changed, by the first kind station location marker in the modified logo file It is deleted with corresponding modified logo.
3. according to the method described in claim 1, it is characterized in that, the modified logo is null character string or modification information.
4. according to the method described in claim 3, it is characterized in that, when the modified logo be modification information when, the method Further include:
According to the row key in the modification information, determine to count from the range for the position that the data value determined is changed The position changed according to value.
5. according to the method described in claim 4, it is characterized in that, further including:
After determining position that data value is changed, by the first kind station location marker and correspondence in the modified logo file Modified logo delete.
6. according to the method described in claim 5, it is characterized in that, further including:
It is executed after the association hbase tables and the association hbase tables that the hbase tables have successively execution relationship are When table, after the first kind station location marker and corresponding modified logo in the deletion modified logo file, the pass is generated Join the corresponding association identification file of association identification row cluster in hbase tables, the association identification row cluster is the association hbase Row cluster corresponding with the associated associated data value of data value changed in the hbase tables in table, the association mark Association identification and the modified logo in knowledge file is identical or different.
7. a kind of position range determining device, which is characterized in that including:File obtaining unit, mark determination unit, Objective extraction Unit, identifier lookup unit and range determination unit, wherein
The file obtaining unit, it is described for obtaining modified logo file and data storage file corresponding to hbase tables Row cluster in hbase tables includes modified logo row cluster and data value row cluster, and the modified logo in the modified logo row cluster is It is added when the corresponding data value in the data value row cluster is changed;Wherein, the modified logo file is needle The file that the modified logo row cluster is stored and is formed, and include:Modified logo at least one table by hbase The first kind station location marker that corresponding row are strong, row is strong and timestamp is formed, and each first kind station location marker meaning are subrogated Modified logo in setting;Wherein, the data storage file is stored the file to be formed for the data value row cluster, And include:The row key corresponding to data value, the second class position that row is good for and timestamp forms at least one table by hbase Mark and each second class station location marker meaning subrogate the data value in setting;
The mark determination unit, the modified logo file for being obtained by the file obtaining unit, determines the modification Identify corresponding each first kind station location marker;
The Objective extraction unit, for being identified in each first kind station location marker that determination unit is determined from described respectively Extract that corresponding row is strong and timestamp;
The identifier lookup unit, for searching required second from the data storage file that the file obtaining unit obtains Class station location marker, wherein the second required class station location marker includes:First determined with the mark determination unit Row in class station location marker be good for identical row it is strong and with the corresponding timestamp identical time in the first kind station location marker Stamp;
The range determination unit, the row corresponding to the second class station location marker for being searched based on the identifier lookup unit Key determines the range for the position that data value is changed.
8. device according to claim 7, which is characterized in that further include:First deleting unit, described first deletes list Member, after range for determining the position that data value is changed when the range determination unit, by modified logo text First kind station location marker and corresponding modified logo in part are deleted.
9. device according to claim 7, which is characterized in that the modified logo is null character string or modification information.
10. device according to claim 9, which is characterized in that when the modified logo is modification information, described device Further include:Position determination unit, the position determination unit are used for according to the row key in the modification information, from the range The position that data value is changed is determined in the range for the position that the data value that determination unit is determined is changed.
11. device according to claim 10, which is characterized in that further include:Second deleting unit, described second deletes list Member will be in the modified logo file for after the position determination unit determines the position that data value is changed First kind station location marker and corresponding modified logo are deleted.
12. according to the devices described in claim 11, which is characterized in that further include:File generating unit, the file generated list Member, after association hbase tables and the association hbase tables for there is successively execution relationship when the hbase tables are When executive table, first kind station location marker in second deleting unit deletes the modified logo file and corresponding repair After changing mark, the corresponding association identification file of association identification row cluster in the association hbase tables, the association identification are generated Row cluster be in the association hbase tables with the associated associated data value pair of data value changed in the hbase tables The row cluster answered, the association identification and the modified logo in the association identification file are identical or different.
CN201510379657.8A 2015-06-30 2015-06-30 A kind of position range determines method and device Active CN104965908B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510379657.8A CN104965908B (en) 2015-06-30 2015-06-30 A kind of position range determines method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510379657.8A CN104965908B (en) 2015-06-30 2015-06-30 A kind of position range determines method and device

Publications (2)

Publication Number Publication Date
CN104965908A CN104965908A (en) 2015-10-07
CN104965908B true CN104965908B (en) 2018-08-03

Family

ID=54219946

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510379657.8A Active CN104965908B (en) 2015-06-30 2015-06-30 A kind of position range determines method and device

Country Status (1)

Country Link
CN (1) CN104965908B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107038179B (en) * 2016-08-23 2020-04-10 平安科技(深圳)有限公司 Information item storage method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103605805A (en) * 2013-12-09 2014-02-26 冶金自动化研究设计院 Storage method of massive time series data
CN104239576A (en) * 2014-10-09 2014-12-24 浪潮(北京)电子信息产业有限公司 Method and device for searching for all lines in column values of HBase list
CN104468787A (en) * 2014-12-09 2015-03-25 浪潮电子信息产业股份有限公司 Big-data-based driver-vehicle associate recognition method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9842126B2 (en) * 2012-04-20 2017-12-12 Cloudera, Inc. Automatic repair of corrupt HBases

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103605805A (en) * 2013-12-09 2014-02-26 冶金自动化研究设计院 Storage method of massive time series data
CN104239576A (en) * 2014-10-09 2014-12-24 浪潮(北京)电子信息产业有限公司 Method and device for searching for all lines in column values of HBase list
CN104468787A (en) * 2014-12-09 2015-03-25 浪潮电子信息产业股份有限公司 Big-data-based driver-vehicle associate recognition method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
HBase下时态信息索引策略研究;陈磊等;《广东工业大学学报》;20141028(第3期);第102-108页 *

Also Published As

Publication number Publication date
CN104965908A (en) 2015-10-07

Similar Documents

Publication Publication Date Title
CN110291518A (en) Merge tree garbage index
CN110268399A (en) Merging tree for attended operation is modified
CN108089893A (en) Definite method, apparatus, terminal device and the storage medium of redundant resource
CN104965886B (en) Data dimension processing method
CN106682012A (en) Commodity object information searching method and device
CN109902130A (en) A kind of date storage method, data query method and apparatus, storage medium
CN103593449B (en) A kind of database resource recovery method and system
CN105912665B (en) The model conversion and data migration method of a kind of Neo4j to relevant database
CN104794221A (en) Multi-dimensional data analyzing system based on service objects
CN106203494A (en) A kind of parallelization clustering method calculated based on internal memory
KR101238381B1 (en) Method and device to provide the most optimal process of n sort queries in multi-range scan
CN107783974B (en) Data processing system and method
CN102929999A (en) Method and device for comparing similarities and differences of data
CN108009049A (en) The offline restoration methods of MYISAM storage engines deletion records, storage medium
JPWO2015025401A1 (en) Database management system and database management method
CN106802958A (en) Conversion method and system of the CAD data to GIS data
CN104965908B (en) A kind of position range determines method and device
CN103455964A (en) Case clue analyzing system and method based on case information
CN106095852A (en) A kind of efficient querying method for event trace
CN103714121B (en) The management method and device of a kind of index record
CN105138636A (en) Graph construction method and device for entity relationship
CN104715040A (en) Data classification method and device
CN107943912A (en) A kind of response type Resource TOC data visualization management method, terminal and device
CN103593409A (en) Real-time database retrieval method and real-time database retrieval system
CN106446086A (en) Tree structure operation method and system used for cloud computing environment

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