CN105893616B - A kind of identification information configuration method and device - Google Patents
A kind of identification information configuration method and device Download PDFInfo
- Publication number
- CN105893616B CN105893616B CN201610270073.1A CN201610270073A CN105893616B CN 105893616 B CN105893616 B CN 105893616B CN 201610270073 A CN201610270073 A CN 201610270073A CN 105893616 B CN105893616 B CN 105893616B
- Authority
- CN
- China
- Prior art keywords
- identification information
- data
- default mark
- group
- distributed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computing Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention provides a kind of identification information configuration method and device, in detecting distributed data base in the case where pre-write data, obtain the current identification information of distributed data base, based on current identification information and default mark difference, the identification information for configuring pre-write data, realizes automatically configuring for identification information.And above-mentioned current identification information is stored in allocation list, this mean that allocation list can not distributed storage database whole identification informations so that allocation list need memory space reduce.Above-mentioned identification information configuration method is applied in the corresponding distributed server of distributed data base simultaneously, and data are still valid after distributed server power down, after distributed server powers on again, distributed server remains to the current identification information that distributed data base is got from allocation list, a possibility that reducing loss of data, therefore in the case where above-mentioned identification information configuration method memory space needed for reducing, a possibility that also further decreasing loss of data.
Description
Technical field
The invention belongs to distributed data base technique fields, more specifically more particularly to a kind of identification information configuration method
And device.
Background technique
The basic thought of distributed data base is to pass through the data dispersion storage in original centralized database to multiple
On the data memory node of network connection, to obtain bigger memory capacity and higher concurrent amount of access.In recent years, with number
According to the rapid growth of amount, the technology of distributed data base has obtained quick development, with and how what is come be for distributed number
According to any one data configuration identification information in library, as it is stored in the tables of data on any one data memory node
Any data line configuration identifier information avoids data collision so that every data has unique identification information.
There are many current modes for data configuration identification information, and one way in which is: building configuration letter in the buffer
Number is that every data configures unique identification information, but configuration function is lost after caching power down, and falls by configuration function
The last one identification information that configuration function configures before electricity is also lost, and needs again to copy configuration function after caching powers on again
Shellfish artificially searches the last one identification information in distributed data base into caching.
Another way is: configuring an allocation list for distributed data base, the allocation list is dedicated for record distribution
The identification information of every data in formula database, i.e., when one data of pre-write in distributed data base, allocation list then can base
In existing identification information, an identification information is distributed for pre-write data and is recorded, but allocation list needs to manage distributed number
According to the identification information of data every in library, and the data volume in distributed data base is larger, and allocation list is caused to be also required for enough
Space store identification information.From above two mode it is found that there are easy to be lost, occupancy for the configuration mode of identification information at present
The larger problem of memory space.
Summary of the invention
In view of this, the purpose of the present invention is to provide a kind of identification information configuration method and device, it is existing for solving
Configuration mode is easy to be lost and occupies the larger problem of memory space.Specifically, technical solution is as follows:
The present invention provides a kind of identification information configuration method, is applied to the corresponding distributed server of distributed data base
In, which comprises
In detecting the distributed data base in the case where pre-write data, working as the distributed data base is obtained
Preceding identification information;
Based on the current identification information and default mark difference, the identification information of the pre-write data is configured;
Wherein the current identification information is stored in the allocation list of the distributed server, and the current identification is believed
Last bit identification information in total data that breath is written before being the distributed data base.
Preferably, the method also includes: obtain the default mark increment stored in the allocation list, match wherein described
It sets and is only stored with the current identification information and the default mark increment in table;
It is described that the identification information of the pre-write data is configured based on the current identification information and default mark difference,
It include: that the pre-write is configured based on the current identification information, the default mark difference and the default mark increment
The identification information of data.
It is preferably, described to be based on the current identification information, the default mark difference and the default mark increment,
Configure the identification information of the pre-write data, comprising:
It is described in the distributed data base once configures based on the current identification information and the default mark difference
The identification information of default mark increment, to control the first data volume of the pre-write data being written every time described default
It identifies in increment.
Preferably, described to be based on the current identification information and the default mark difference, it is the distributed data base
Once configure the identification information of the default mark increment, comprising:
Obtain the first data volume of the pre-write data;
When first data volume is less than or equal to the default mark increment, once match for the distributed data base
Set the identification information of first data volume;
When first data volume is greater than the default mark increment, based on the default mark increment to described
Pre-write data are grouped, and obtain N group data group, and wherein N is natural number greater than 1, and the 1st group to the second of N-1 group
Data volume is equal to the default mark increment, and the second data volume of N group is first data volume and second data
Amount × (N-1) difference;
Configure in order identification information for every group of data group, wherein every group of data group configuration identification information quantity be equal to pair
Answer the second data volume of data group.
Preferably, the value of the default mark difference is 1, and the value of the default mark increment is 1.
The present invention also provides a kind of identification information configuration devices, are applied to the corresponding distributed server of distributed data base
In, described device includes:
First acquisition unit, in the case where pre-write data, obtaining institute in detecting the distributed data base
State the current identification information of distributed data base;
Configuration unit, for configuring the pre-write data based on the current identification information and default mark difference
Identification information;
Wherein the current identification information is stored in the allocation list of the distributed server, and the current identification is believed
Last bit identification information in total data that breath is written before being the distributed data base.
Preferably, described device further include: second acquisition unit, for obtaining the default mark stored in the allocation list
Increment, wherein being only stored with the current identification information and the default mark increment in the allocation list;
The configuration unit, for being based on the current identification information, the default mark difference and the default mark
Increment configures the identification information of the pre-write data.
Preferably, the configuration unit is described for being based on the current identification information and the default mark difference
Distributed data base once configures the identification information of the default mark increment, to control the pre-write number being written every time
According to the first data volume in the default mark increment.
Preferably, the configuration unit includes: and obtains subelement, the first configuration subelement, grouping subelement and second to match
Set subelement;
The acquisition subelement, for obtaining the first data volume of the pre-write data;
The first configuration subelement is used for when first data volume is less than or equal to the default mark increment,
The identification information of first data volume is once configured for the distributed data base;
The grouping subelement, for being based on described when first data volume is greater than the default mark increment
Default mark increment is grouped the pre-write data, obtains N group data group, and wherein N is the natural number greater than 1, and
1st group of the second data volume to N-1 group is equal to the default mark increment, and the second data volume of N group is described first
Data volume and second data volume × (N-1) difference;
The second configuration subelement, for configuring in order identification information for every group of data group, wherein every group of data group is matched
The quantity for the identification information set is equal to the second data volume of corresponding data group.
Preferably, the value of the default mark difference is 1, and the value of the default mark increment is 1.
Compared with prior art, above-mentioned technical proposal provided by the invention has the advantages that
From above-mentioned technical proposal it is found that in detecting distributed data base in the case where pre-write data, distribution is obtained
The current identification information of formula database, based on current identification information and default mark difference, the mark letter of configuration pre-write data
Breath, realizes automatically configuring for identification information.And above-mentioned current identification information is stored in allocation list, this means that allocation list
Can not distributed storage database whole identification informations so that allocation list need memory space reduce.Above-mentioned mark simultaneously
Know information configuring methods to be applied in the corresponding distributed server of distributed data base, and data after distributed server power down
Still valid, after distributed server powers on again, distributed server remains to get distributed data base from allocation list
Current identification information, reduce loss of data a possibility that, therefore identification information configuration method provided by the invention reduce institute
In the case where needing memory space, a possibility that loss of data can also be further decreased.
Detailed description of the invention
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 technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is the present invention
Some embodiments for those of ordinary skill in the art without creative efforts, can also basis
These attached drawings obtain other attached drawings.
Fig. 1 is a kind of flow chart of identification information configuration method provided in an embodiment of the present invention;
Fig. 2 is another flow chart of identification information configuration method provided in an embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of identification information configuration device provided in an embodiment of the present invention;
Fig. 4 is another structural schematic diagram of identification information configuration device provided in an embodiment of the present invention;
Fig. 5 is the structural schematic diagram of configuration unit in identification information configuration device provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Referring to Fig. 1, being answered it illustrates a kind of flow chart of identification information configuration method provided in an embodiment of the present invention
For may comprise steps of in the corresponding distributed server of distributed data base:
101: in detecting distributed data base in the case where pre-write data, obtaining the current mark of distributed data base
Know information.Wherein distributed server presets a monitoring interface, and the interface of monitoring is for the reading to distributed data base
Write operation is monitored, and when pre-write data in distributed data base, monitors interface to being used to indicate distributed data
The instruction of data will be written in library, distributed server can then go to obtain the current identification information of distributed data base at this time.
In embodiments of the present invention, current identification information is stored in the allocation list of distributed server, and current identification
Last bit identification information in total data that information is written before being distributed data base.For in distributed data base
For total data, every data has unique identification information, and allocation list only records last in multiple identification informations
Bit identification information, in order to the data configuration identification information to subsequent write-in.
102: based on current identification information and default mark difference, configuring the identification information of pre-write data.Wherein preset
Identifying difference is to be arranged in distributed server in advance, is used to indicate the ginseng of two neighboring identification information interval how much numerical value
Number.Such as using ID (Identity identity number) as identification information, if current identification information is 101,
And default mark difference is 1, then based on current identification information and default mark difference, the identification information of the pre-write data of configuration
It is 102.
Certainly, presetting mark difference may be arranged as other values, such as can be set to 2 or 3, be preferably arranged to 1.
Why be preferably arranged to 1 be because are as follows: ID value be natural number in the case where, it is ensured that the difference between two neighboring ID
Minimum, in this way in the biggish situation of data volume, it is larger that the value of the ID of configuration can be made, which not increase in a short time,
Value.
From above-mentioned technical proposal it is found that in detecting distributed data base in the case where pre-write data, distribution is obtained
The current identification information of formula database, based on current identification information and default mark difference, the mark letter of configuration pre-write data
Breath, realizes automatically configuring for identification information.And above-mentioned current identification information is stored in allocation list, this means that allocation list
Can not distributed storage database whole identification informations so that allocation list need memory space reduce.Above-mentioned mark simultaneously
Know information configuring methods to be applied in the corresponding distributed server of distributed data base, and data after distributed server power down
Still valid, after distributed server powers on again, distributed server remains to get distributed data base from allocation list
Current identification information, a possibility that reducing loss of data, therefore identification information configuration method provided in an embodiment of the present invention exists
Needed for reducing in the case where memory space, a possibility that loss of data can also be further decreased.
Referring to Fig. 2, it illustrates another flow charts of identification information configuration method provided in an embodiment of the present invention, together
Sample is applied in the corresponding distributed server of distributed data base, specifically, may comprise steps of:
201: in detecting distributed data base in the case where pre-write data, obtaining the current mark of distributed data base
Know information.
202: obtaining the default mark increment stored in allocation list.Current identification information is wherein only stored in allocation list
With default mark increment, for the corresponding identification information of existing allocation list storage total data, the embodiment of the present invention
The information content of middle allocation list is substantially reduced, so that the memory space that allocation list occupies reduces.
Above-mentioned default mark increment is used to indicate the quantity of the identification information once configured, for example increases in default mark
In the case that amount is set as 5, distributed server can once configure 5 identification informations, and such distributed data base can be with one
5 datas of secondary write-in, and the corresponding mark of the 5th data (i.e. the last item data in current distributed database) being written
Information is the identification information of last position in 5 identification informations of configuration.
Such as the ID as identification information by the way of gradually increasing when, maximum ID in 5 identification informations of configuration
It is the identification information of last position, when ID is by the way of gradually reducing, the smallest ID is most end in 5 identification informations of configuration
The identification information of position.
203: based on current identification information, default mark difference and default mark increment, configuring the mark of pre-write data
Know information.It is preceding to have addressed, the quantity for the identification information that default mark increment instruction once configures, therefore the embodiment of the present invention can
To configure the value of the identification information of pre-write based on current identification information and default mark difference, and preset mark increment
To limit the quantity of the identification information once configured.
I.e. based on current identification information and default mark difference, default mark increment is once configured for distributed data base
Identification information, to control the first data volume of pre-write data being written every time in default mark increment.Such as preceding citing,
In the case where default mark increment is set as 5, distributed server can once configure 5 marks for distributed data base
Information, likewise, distributed data base can be with 5 data of write-once.
But in the actual operation process, the first data volume that distributed data base is written every time is different, in such situation
Under, needing the comparison situation based on the first data volume and default mark increment, detailed process is as follows come configuration identifier information:
The first data volume of pre-write data is obtained first;Secondly the first data volume and default mark increment are compared
It is right, and according to comparison result come configuration identifier information.Specifically, when the first data volume is less than or equal to default mark increment,
The identification information of the first data volume is once configured for distributed data base, i.e., is less than or equal to default mark in the first data volume and increases
In the case where amount, the identification information that quantity is equal to the first data volume is configured on the basis of the first data volume;When the first data
When amount is greater than default mark increment, illustrate that the first data volume of pre-write data is larger, and distributed server can not be primary
For whole pre-write data configuration identification informations, it is therefore desirable to pre-write data configuration identifier information in batches, in batches
Configuration process is:
When the first data volume is greater than default mark increment, pre-write data are divided based on default mark increment
Group obtains N group data group, and wherein N is the natural number greater than 1, and the 1st group of the second data volume to N-1 group is equal to pre- bidding
Know increment, then it is every group of number that the second data volume of N group, which is the first data volume and the second data volume × (N-1) difference,
Identification information is configured in order according to group, wherein the quantity of the identification information of every group of data group configuration is equal to the second number of corresponding data group
According to amount.
The first data volume is indicated with A, and B indicates default mark increment, and C indicates the second data volume, thenThe
1 group of second data quantity C to N-1 group, which is equal to, presets mark increment B, and the second data quantity C of N group=A-B × (N-
1)。
From above-mentioned technical proposal it is found that can control the number of the identification information configured every time based on default mark increment
Amount reduces the data volume being written every time in this way it is prevented that once configuring more identification information, in order to avoid cause identification information
Error corresponding with pre-write data.
In order to reduce identification information error corresponding with pre-write data, mark increment is preset in embodiments of the present invention
Value be preferably 1, the data volume being written every time in this way is one, and the identification information configured is also one, so that current pre-
Data are written can be corresponding with unique identification information of current-configuration, improves the corresponding accuracy of the two.
For the various method embodiments described above, for simple description, therefore, it is stated as a series of action combinations, but
Be those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because according to the present invention, certain
A little steps can be performed in other orders or simultaneously.Secondly, those skilled in the art should also know that, it is retouched in specification
The embodiment stated belongs to preferred embodiment, and related actions and modules are not necessarily necessary for the present invention.
Corresponding with above method embodiment, the embodiment of the present invention also provides a kind of identification information configuration device, is applied to
In the corresponding distributed server of distributed data base, structural schematic diagram is as shown in figure 3, may include: first acquisition unit
11 and configuration unit 12.
First acquisition unit 11, in the case where pre-write data, obtaining distribution in detecting distributed data base
The current identification information of formula database.Wherein distributed server presets a monitoring interface, the monitoring interface for pair
The read-write operation of distributed data base is monitored, and when pre-write data in distributed data base, monitors interface to use
The instruction of data will be written in instruction distributed data base, first acquisition unit 11 can then go to obtain distributed data at this time
The current identification information in library.
In embodiments of the present invention, current identification information is stored in the allocation list of distributed server, and current identification
Last bit identification information in total data that information is written before being distributed data base.For in distributed data base
For total data, every data has unique identification information, and allocation list only records last in multiple identification informations
Bit identification information, in order to the data configuration identification information to subsequent write-in.
Configuration unit 12, for based on current identification information and default mark difference, the mark letter of configuration pre-write data
Breath.Wherein presetting mark difference is to be arranged in distributed server in advance, and it is more to be used to indicate two neighboring identification information interval
The parameter of minority value.Such as using ID as identification information, if current identification information is 101, and default mark is poor
Value is 1, then based on current identification information and default mark difference, the identification information of the pre-write data of configuration is 102.
Certainly, presetting mark difference may be arranged as other values, such as can be set to 2 or 3, be preferably arranged to 1.
Why be preferably arranged to 1 be because are as follows: ID value be natural number in the case where, it is ensured that the difference between two neighboring ID
Minimum, in this way in the biggish situation of data volume, it is larger that the value of the ID of configuration can be made, which not increase in a short time,
Value.
From above-mentioned technical proposal it is found that in detecting distributed data base in the case where pre-write data, distribution is obtained
The current identification information of formula database, based on current identification information and default mark difference, the mark letter of configuration pre-write data
Breath, realizes automatically configuring for identification information.And above-mentioned current identification information is stored in allocation list, this means that allocation list
Can not distributed storage database whole identification informations so that allocation list need memory space reduce.Above-mentioned mark simultaneously
Know information configuring methods to be applied in the corresponding distributed server of distributed data base, and data after distributed server power down
Still valid, after distributed server powers on again, distributed server remains to get distributed data base from allocation list
Current identification information, a possibility that reducing loss of data, therefore identification information configuration method provided in an embodiment of the present invention exists
Needed for reducing in the case where memory space, a possibility that loss of data can also be further decreased.
Referring to Fig. 4, it illustrates another structural representations of identification information configuration device provided in an embodiment of the present invention
Figure, can also include: second acquisition unit 13 on the basis of Fig. 3, for obtaining the default mark increment stored in allocation list,
It is wherein only stored with current identification information and default mark increment in allocation list, stores total data relative to existing allocation list
For corresponding identification information, the information content of allocation list is substantially reduced in the embodiment of the present invention, so that the storage that allocation list occupies
Space reduction.
Above-mentioned default mark increment is used to indicate the quantity of the identification information once configured, for example increases in default mark
In the case that amount is set as 5, configuration unit 12 can once configure 5 identification informations, and such distributed data base can be primary
5 datas are written, and the corresponding mark letter of the 5th data (i.e. the last item data in current distributed database) being written
Breath is the identification information of last position in 5 identification informations of configuration.
Such as the ID as identification information by the way of gradually increasing when, maximum ID in 5 identification informations of configuration
It is the identification information of last position, when ID is by the way of gradually reducing, the smallest ID is most end in 5 identification informations of configuration
The identification information of position.
Correspondingly, configuration unit 12, for being based on current identification information, default mark difference and default mark increment,
Configure the identification information of pre-write data.It is preceding to have addressed, the quantity for the identification information that default mark increment instruction once configures,
Therefore the embodiment of the present invention can configure taking for the identification information of pre-write based on current identification information and default mark difference
Value, and mark increment is preset to limit the quantity of the identification information once configured.
I.e. based on current identification information and default mark difference, default mark increment is once configured for distributed data base
Identification information, to control the first data volume of pre-write data being written every time in default mark increment.Such as preceding citing,
In the case where default mark increment is set as 5, distributed server can once configure 5 marks for distributed data base
Information, likewise, distributed data base can be with 5 data of write-once.
But in the actual operation process, the first data volume that distributed data base is written every time is different, in such situation
Under, configuration unit 12 needs the comparison situation based on the first data volume and default mark increment come configuration identifier information, specifically
Structural schematic diagram is as shown in figure 5, may include: to obtain subelement 121, first to configure subelement 122, grouping 123 and of subelement
Second configuration subelement 124.
Subelement 121 is obtained, for obtaining the first data volume of pre-write data, wherein the first data volume is currently to prewrite
Enter the total amount of data.
First configuration subelement 122 is used for when the first data volume is less than or equal to default mark increment, for distribution number
The identification information of the first data volume is once configured according to library.I.e. the case where the first data volume is less than or equal to default mark increment
Under, the identification information that quantity is equal to the first data volume is configured on the basis of the first data volume
It is grouped subelement 123, for identifying increment based on default when the first data volume is greater than default mark increment
Pre-write data are grouped, N group data group is obtained, wherein N is natural number greater than 1, and the 1st group to the of N-1 group
Two data volumes are equal to default mark increment, and the second data volume of N group is the first data volume and the second data volume × (N-1)
Difference.
The first data volume is indicated with A, and B indicates default mark increment, and C indicates the second data volume, thenThe
1 group of second data quantity C to N-1 group, which is equal to, presets mark increment B, and the second data quantity C of N group=A-B × (N-
1)。
Second configuration subelement 124, for configuring in order identification information for every group of data group, wherein every group of data group configuration
Identification information quantity be equal to corresponding data group the second data volume.
From above-mentioned technical proposal it is found that can control the number of the identification information configured every time based on default mark increment
Amount reduces the data volume being written every time in this way it is prevented that once configuring more identification information, in order to avoid cause identification information
Error corresponding with pre-write data.
In order to reduce identification information error corresponding with pre-write data, mark increment is preset in embodiments of the present invention
Value be preferably 1, the data volume being written every time in this way is one, and the identification information configured is also one, so that current pre-
Data are written can be corresponding with unique identification information of current-configuration, improves the corresponding accuracy of the two.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
The foregoing description of the disclosed embodiments can be realized those skilled in the art or using the present invention.To this
A variety of modifications of a little embodiments will be apparent for a person skilled in the art, and the general principles defined herein can
Without departing from the spirit or scope of the present invention, to realize in other embodiments.Therefore, the present invention will not be limited
It is formed on the embodiments shown herein, and is to fit to consistent with the principles and novel features disclosed in this article widest
Range.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (4)
1. a kind of identification information configuration method, which is characterized in that it is applied in the corresponding distributed server of distributed data base,
The described method includes:
In detecting the distributed data base in the case where pre-write data, obtains the default mark stored in allocation list and increase
Length is measured and the current identification information of the distributed data base, is only stored with the current identification information and institute in the allocation list
Default mark increment is stated, it is last in the total data that the current identification information is written before being the distributed data base
One bit identification information;
Based on the current identification information and default mark difference, the default mark is once configured for the distributed data base
The identification information of increment is increased with controlling the first data volume of the pre-write data being written every time in the default mark
In amount;
Wherein, described to be based on the current identification information and the default mark difference, once match for the distributed data base
Set the identification information of the default mark increment, comprising:
Obtain the first data volume of the pre-write data;
When first data volume is less than or equal to the default mark increment, institute is once configured for the distributed data base
State the identification information of the first data volume;
When first data volume is greater than the default mark increment, prewrite based on the default mark increment to described
Enter data to be grouped, obtain N group data group, wherein N is natural number greater than 1, and the 1st group of the second data to N-1 group
Amount is equal to the default mark increment, the second data volume of N group be first data volume with second data volume ×
(N-1) difference;
Identification information is configured in order for every group of data group, wherein the quantity of the identification information of every group of data group configuration is equal to corresponding number
According to the second data volume of group.
2. the method according to claim 1, wherein the value of the default mark difference is 1, and described default
The value for identifying increment is 1.
3. a kind of identification information configuration device, which is characterized in that it is applied in the corresponding distributed server of distributed data base,
Described device includes:
First acquisition unit, in the case where pre-write data, obtaining allocation list in detecting the distributed data base
The current identification information of the distributed data base of middle storage;
Second acquisition unit, for obtaining the default mark increment stored in the allocation list;It is only stored in the allocation list
There are the current identification information and the default mark increment, the current identification information is before the distributed data base
Last bit identification information in the total data of write-in;
Configuration unit, for once matching for the distributed data base based on the current identification information and default mark difference
The identification information of the default mark increment is set, to control the first data volume of the pre-write data being written every time in institute
It states in default mark increment;
The configuration unit includes: to obtain subelement, the first configuration subelement, grouping subelement and the second configuration subelement;
The acquisition subelement, for obtaining the first data volume of the pre-write data;
The first configuration subelement, is used for when first data volume is less than or equal to the default mark increment, for institute
State the identification information that distributed data base once configures first data volume;
The grouping subelement, for being preset based on described when first data volume is greater than the default mark increment
Mark increment is grouped the pre-write data, obtains N group data group, and wherein N is natural number greater than 1, and the 1st group
The second data volume to N-1 group is equal to the default mark increment, and the second data volume of N group is first data volume
With second data volume × (N-1) difference;
The second configuration subelement, for configuring in order identification information for every group of data group, wherein what every group of data group configured
The quantity of identification information is equal to the second data volume of corresponding data group.
4. device according to claim 3, which is characterized in that the value of the default mark difference is 1, and described default
The value for identifying increment is 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610270073.1A CN105893616B (en) | 2016-04-27 | 2016-04-27 | A kind of identification information configuration method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610270073.1A CN105893616B (en) | 2016-04-27 | 2016-04-27 | A kind of identification information configuration method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105893616A CN105893616A (en) | 2016-08-24 |
CN105893616B true CN105893616B (en) | 2019-05-24 |
Family
ID=56701768
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610270073.1A Active CN105893616B (en) | 2016-04-27 | 2016-04-27 | A kind of identification information configuration method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105893616B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101551814A (en) * | 2009-05-13 | 2009-10-07 | 广东威创视讯科技股份有限公司 | Method for data management and data search |
CN103345519A (en) * | 2013-07-11 | 2013-10-09 | 华为技术有限公司 | Method and device for data distribution of shared-nothing distributed database |
CN103631967A (en) * | 2013-12-18 | 2014-03-12 | 北京华环电子股份有限公司 | Processing method and device for data table with autoincrement identification fields |
CN104573100A (en) * | 2015-01-29 | 2015-04-29 | 无锡江南计算技术研究所 | Step-by-step database synchronization method with autoincrement identifications |
-
2016
- 2016-04-27 CN CN201610270073.1A patent/CN105893616B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101551814A (en) * | 2009-05-13 | 2009-10-07 | 广东威创视讯科技股份有限公司 | Method for data management and data search |
CN103345519A (en) * | 2013-07-11 | 2013-10-09 | 华为技术有限公司 | Method and device for data distribution of shared-nothing distributed database |
CN103631967A (en) * | 2013-12-18 | 2014-03-12 | 北京华环电子股份有限公司 | Processing method and device for data table with autoincrement identification fields |
CN104573100A (en) * | 2015-01-29 | 2015-04-29 | 无锡江南计算技术研究所 | Step-by-step database synchronization method with autoincrement identifications |
Also Published As
Publication number | Publication date |
---|---|
CN105893616A (en) | 2016-08-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105447174B (en) | A kind of report generation method and device | |
CN108009408A (en) | A kind of right management method, device, computer-readable recording medium and storage control | |
CN108509157A (en) | A kind of data balancing method and device applied to distributed file system | |
CN103577483B (en) | The method and system of date storage method and system and data access | |
CN107463692B (en) | Super large text data is synchronized to the method and system of search engine | |
CN105592178B (en) | A kind of back end method for determining position and device | |
CN106354564A (en) | System resource distribution method and system | |
CN104615684A (en) | Mass data communication concurrent processing method and system | |
CN105336024A (en) | Virtual entrance guard card punching method and device | |
CN101567014B (en) | Equipment information retrieval method, device and cable fastener | |
CN105138632A (en) | Organization and management method for file data and file management server | |
CN106598548A (en) | Solution method and device for read-write conflict of storage unit | |
CN106980647A (en) | A kind of Distributed File System Data location mode and device | |
CN105893616B (en) | A kind of identification information configuration method and device | |
CN100488173C (en) | A method for carrying out automatic selection of packet classification algorithm | |
CN106708445B (en) | Link selecting method and device | |
CN106940648A (en) | A kind of method, equipment and the test system of automatic loading test item | |
CN109951330B (en) | Management method for automatically identifying equipment type and communication manager | |
CN106776255A (en) | The log extracting method and device of intelligent television system | |
CN110334896A (en) | State affairs management method, device, equipment and computer storage medium | |
CN110019863A (en) | A kind of object lookup method, device, terminal device and storage medium | |
CN105162933B (en) | A kind of method, apparatus managing address book contact and a kind of intelligent terminal | |
CN108491451A (en) | A kind of English reads article and recommends method, apparatus, electronic equipment and storage medium | |
CN104660428B (en) | A kind of management method and device of performance data | |
CN106772090B (en) | The Analysis of Networking method and Analysis of Networking system of Monitored System of Industrial Storage Cell |
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 |