CN108241715A - A kind of distributed data base major key generation method and device - Google Patents
A kind of distributed data base major key generation method and device Download PDFInfo
- Publication number
- CN108241715A CN108241715A CN201611228520.3A CN201611228520A CN108241715A CN 108241715 A CN108241715 A CN 108241715A CN 201611228520 A CN201611228520 A CN 201611228520A CN 108241715 A CN108241715 A CN 108241715A
- Authority
- CN
- China
- Prior art keywords
- major key
- generation
- configuration
- data base
- service
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
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/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention relates to database technical fields, disclose a kind of distributed data base major key generation method and device, and globally unique major key can be generated under distributed environment, the generation method is without network interaction, it economizes on resources, the major key of generation occupies little space, and is conducive to save memory space.The generation method, including:Type of service is obtained from configuration file, the type of service can customize configuration;Timestamp and host identification are obtained from server;Cycle counter is configured, generation is digital from increasing;According to the type of service of the acquisition, the timestamp obtained from server and host identification and, the splicing generation major key digital from increasing of the generation.The present invention is suitable for the generation of database key under distributed environment.
Description
Technical field
The present invention relates to database technical field, it particularly relates to a kind of distributed data base major key generation method and
Device.
Background technology
In one-of-a-kind system, such as a Relational DBMS (English abbreviation:MySQL) example, Wei Yishi
Other code (corresponding English:Unique ID) generation be very simple, " from ID functions are increased " directly carried using MySQL is just
It can realize.But at one, there are multiple points of libraries to divide table (corresponding English:Shards data are inserted into distributed system),
Such as it is inserted into data in a cluster of multiple MySQL examples composition.This problem can become extremely complex, and high concurrent field
There are bottlenecks for performance under scape.Therefore, the uniqueness of major key is ensured by the lock mechanism of existing database, it is gradually light
Go out in the industry.
In addition, also there are following some methods in the prior art:For example, directly utilize UUID.randomUUID (java class
The method that globally unique identifier is realized in library) interface generates unique ID.But the ID of this method generation has 128bits.
Also without band timestamp (corresponding English in the ID of this method generation simultaneously:Timestamp), do not sort, can not ensure trend
Be incremented by, do not have business meaning, while is readable very poor, and be often made with character string storage, the efficiency of inquiry than relatively low,
Memory space is bigger.
For another example, also exist in the prior art and uniformly generate unique ID, such as Redis using a central server
Database.But there is single-point in this method, once central server is unavailable, entire service is just paralysed.In addition, network
Influence of the interactive time under high concurrent scene can be also amplified, and the most key is reached in cluster scale and business scale
Under a certain amount grade, the performance of this central server cannot effectively ensure and lasting extension.
Invention content
The object of the present invention is to provide a kind of distributed data base major key generation method and devices, can be in distribution
Major key is generated under environment, and the generation method economizes on resources without network interaction;The major key of generation occupies little space, and is conducive to
Save memory space.
In order to achieve the above objectives, the embodiment of the present invention uses following technical scheme:
In a first aspect, the embodiment of the present invention provides a kind of distributed data base major key generation method, including:
Type of service is obtained from configuration file, the type of service can customize configuration;
Timestamp and host identification are obtained from server;
Cycle counter is configured, generation is digital from increasing;
According to the type of service of the acquisition, the timestamp obtained from server and host identification and the generation
From increase number, splicing generation major key.
With reference to first aspect, as the first mode in the cards, the timestamp length is made by oneself according to business demand
Justice adjustment, least unit is millisecond.
With reference to first aspect, as second of mode in the cards, the host identification is configured by unified configuration center
And maintenance, including IP address and port numbers;It is obtained alternatively, the host identification is run by program, including IP address and process ID.
With reference to first aspect, as the third mode in the cards, the configuration cycle counter is generated from increasing number
Word, including:Cycle counter is configured, is automatically generated from minimum value to maximum value from number is increased, described is integer from number is increased;
After maximum value is reached from increasing number, the cycle counter regenerates digital from increasing since minimum value.
With reference to first aspect or the third mode in the cards of first aspect, as the 4th kind of side in the cards
Formula, the configuration cycle counter, including:Atomic counters example is created, and using acquiring unit and increases unit certainly to obtain
And setting value.
With reference to first aspect, as the 5th kind of mode in the cards, the splicing generation major key is run in memory.
Second aspect, the embodiment of the present invention provide a kind of distributed data base major key generating means, including:
First acquisition module:For obtaining type of service from configuration file, the type of service can customize configuration;
Second acquisition module:For obtaining timestamp and host identification from server;
Configuration and generation module:For cycle counter to be configured, generation is digital from increasing;
Concatenation module:For obtained according to first acquisition module type of service, second acquisition module obtain
Timestamp and host identification, it is described configuration with generation module generation from increase number, splicing generation major key;
The concatenation module is run in memory.
With reference to second aspect, as the first mode in the cards, the timestamp length is made by oneself according to business demand
Justice adjustment, least unit is millisecond.
With reference to second aspect, as second of mode in the cards, the host identification is configured by unified configuration center
And maintenance, including IP address and port numbers;It is obtained alternatively, the host identification is run by program, including IP address and process ID.
With reference to second aspect, as the third mode in the cards, the configuration includes with generation module:
Configuration module:For cycle counter to be configured;
Cycle counter:For being automatically generated from minimum value to maximum value from number is increased, described is integer from number is increased;
It is additionally operable to after maximum value is reached from increasing number, regenerate since minimum value digital from increasing;
The configuration module includes:Create atomic counters example, and using acquiring unit and from increase unit obtaining and
Setting value.
Compared with prior art, a kind of distributed data base major key generation method and device of the embodiment of the present invention, can be with
Major key is generated under distributed environment, and the generation method economizes on resources without network interaction;The major key occupied space of generation
It is small, be conducive to save memory space.What method provided in an embodiment of the present invention was obtained according to the type of service of acquisition, from server
Timestamp and, the splicing generation major key digital from increasing of host identification and cycle counter generation.The generation method is applied to divide
Cloth deployed environment does not need to interact with database or third party's component, reduces network consumption, also there is no centers
Server can be completed in memory, without network interaction, economize on resources.
Description of the drawings
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to needed in the embodiment
Attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some embodiments of the present invention, for ability
For the those of ordinary skill of domain, without creative efforts, it can also be obtained according to these attached drawings other attached
Figure.
Fig. 1 is the method flow block diagram of the embodiment of the present invention;
Fig. 2 is the distributed database structure figure of the embodiment of the present invention;
Fig. 3 is the apparatus structure block diagram of the embodiment of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawings, the technical solution of the embodiment of the present invention is described in detail.
For those skilled in the art is made to more fully understand technical scheme of the present invention, below in conjunction with the accompanying drawings and specific embodiment party
Formula is described in further detail the present invention.Embodiments of the present invention are described in more detail below, the embodiment is shown
Example is shown in the drawings, wherein same or similar label represents same or similar element or with identical or class from beginning to end
Like the element of function.It is exemplary below with reference to the embodiment of attached drawing description, is only used for explaining the present invention, and cannot
It is construed to limitation of the present invention.Those skilled in the art of the present technique are appreciated that unless expressly stated, odd number shape used herein
Formula " one ", "one", " described " and "the" may also comprise plural form.It is to be further understood that the specification of the present invention
The middle wording " comprising " used refers to there are the feature, integer, step, operation, element and/or component, but it is not excluded that
Other one or more features of presence or addition, integer, step, operation, element, component and/or their group.It should be understood that
When we claim element to be " connected " or during " coupled " to another element, it can be directly connected or coupled to other elements or
There may also be intermediary elements.In addition, " connection " used herein or " coupling " can include wireless connection or coupling.Here make
Wording "and/or" includes any cell of one or more associated list items and all combines.The art
Technical staff is appreciated that unless otherwise defined all terms used herein have (including technical terms and scientific terms)
The meaning identical with the general understanding of the those of ordinary skill in fields of the present invention.It should also be understood that such as general
Those terms defined in dictionary, which should be understood that, to be had a meaning that is consistent with the meaning in the context of the prior art, and
Unless being defined as here, will not be explained with the meaning of idealization or too formal.
The method of the embodiment of the present invention is applied to distributed data base.Distributed data base refers to utilize high-speed computer network
The multiple data storage cells physically disperseed are connected the unified database in logic of composition one by network.Distributed data
The basic thought in library is to store the data dispersion storage in original centralized database to multiple data by network connection
On node, to obtain the memory capacity of bigger and higher concurrent visit capacity.Existing distributed data base major key, usually by one
A central server uniformly generates unique ID, once central server is unavailable, entire service is just paralysed.
For this purpose, as shown in Figure 1, a kind of distributed data base major key generation method of the embodiment of the present invention, method include:
S10 obtains type of service from configuration file.
Wherein, type of service can customize configuration.When containing in system there are many different types of service, and requirement passes through master
When key distinguishes, it can be distinguished by type of service.For example, the different business such as sale and buying are included in inventory system
Type.The corresponding type of service of selling operation is 01, and the corresponding type of service of procurement business is 02.Since type of service quantity has
Limit, type of service is represented using 2 characters.Therefore, preferably, the type of service uses two digits table
Show, to reduce memory space as far as possible.In this way by identifying number, it is possible to know different types of service.
Configuration file is storable in systematic unity configuration center in the step.Type of service is stored in configuration file.
Type of service is obtained by the step, corresponding specific business can be quickly identified, realize the business of the major key ultimately generated
Meaning.
S20 obtains timestamp and host identification from server.
Wherein, the length of timestamp is according to the self-defined adjustment of business demand.In this preference, the least unit of timestamp is
Millisecond.Timestamp includes 17 characters.The storage format of timestamp is:yyyyMMddHHMMssSSS.Wherein, yyyy represents year
Part, MM represents month, and dd represents day, and HH represents hour, and MM represents minute, and ss represents the second, and SSS represents millisecond.For example,
20161023085558012.Certainly, timestamp can also be in seconds.
Preferably, host identification uses 4 characters, it is server host mark.It is multiple based on a server disposition
The situation of example, the embodiment of the present invention is preferably taken unified configuration center configuration and is safeguarded, including interconnection protocol between network (in text
Referred to as:IP) address and port numbers.It, can flexible expansion using unique mark as value with " IP+ port numbers " for key.Using 4 characters
It stores, could support up 9999 node instances of deployment.As another preferred embodiment, the host identification is obtained by program operation
It takes, including IP address and process ID.The program does not need to unified configuration center, but is run and realized by program.
Cycle counter is configured in S30, and generation is digital from increasing.
Preferably, the step S30 is specifically included:Cycle counter is configured, using cycle counter from minimum value
It is gradually automatically generated to maximum value from number is increased, described is integer from number is increased;After maximum value is reached from increasing number, cycle
Counter regenerates digital from increasing since minimum value.
Preferably, the length from increasing number is 4 characters.In this way, same millisecond clock at most allows each process
Possess 10000 different ID.Cycle counter counts every time, is all that primary count is incremented preceding.Reach 9999 when increasing number certainly
Afterwards, cycle counter counts again since 0000, ensures that 4 can be used, and will not overflow.
S40 is according to the type of service of the acquisition, the timestamp obtained from server and host identification and the life
Into from increase number, splicing generation major key.
Preferably, the S40 is specifically included:Increase the type of service of the acquisition, timestamp, host identification and certainly
Number, sequentially or out of order splicing generates major key.The major key of generation can represent as follows:| type of service | timestamp | machine ID | from
Increase number |.Contain timestamp in major key, directly data temporally can be ranked up by timestamp.
In the step S40, splicing can be completed in memory.Center service is not present in the splicing
Device, it is not required that additional network consumption, performance are very high.Meanwhile the splicing also without with database or third
Square component interacts, and reduces network consumption.
As shown in Fig. 2, application starts in initialization procedure, the major key strategy configuration of unified configuration center is loaded, including three
A part:First part:The formate forms (second or millisecond can be accurate to) of timestamp, second part:With machine IP and
The service port number of the application searches the host identification in caching, Part III as key:The digit of cycle counter (determines
The concurrent upper limit of every millisecond of current jvm).Preceding two-part splicing is fairly simple, it is critical that Part III circular order counts
The realization of device.In order to which performance considers and no dependence, the introducing of third party's component (such as redis from increasing sequence) is abandoned, is used
Java codes realize the splicing of Part III, and simple and flexible easily safeguards.In this preference, cycle counter, packet is configured
It includes:Create high performance adder atomic counters example, and obtain and setting value using acquiring unit and from unit is increased.Example
Such as, LongAdder examples are created, and obtain and setting value using acquiring unit intValue () and from increasing unit add ().
The thing that this class is done is:When a direct CAS (corresponding English:Compare-and-Swap relatively and is converted, for solving
Certainly in the case of multi-threaded parallel using lock cause performance be lost a kind of mechanism) due to competition failure when, it by delta (from increase
Want increased value) it is stored in the internal element object distributed for the thread, then when intValue () is called,
The value of these temporary locations can be added to result again in by it.This reduces return to CAS again or block other threads
Necessity.The embodiment of the present invention preferably uses LongAdder adders.The adder just completes distributed master with several line codes
The generation of key, each node processes are independent of each other.The machine machine of delaying of generation nor affects on the service of other node processes, has height
Availability.
In above-mentioned preference, type of service contains 2 characters, and timestamp contains 17 characters, and host identification contains 4 words
Symbol contains 4 characters from number is increased.Major key entire in this way is represented with 27 characters.Due to preceding 23 characters ensure that it is same
The uniqueness of 23 before the ID that millisecond clock different machines difference process generates, behind 4 from numerical characters are increased be a jvm rank
Count up device certainly, the ID for ensureing same millisecond is unique.In this way, same millisecond clock at most allows each process to possess
10000 different Id.
In above-described embodiment, type of service, timestamp, machine ID and oneself number of characters of increasing number can be according to concrete scenes
It is adjusted, so that the number of characters of major key has the scalability, so as to adjust memory space.
In the major key of this method generation, started with type of service.By identifying type of service, the corresponding tool of the major key is obtained
Body business so that major key is provided with business meaning.This is convenient for being follow-up various data manipulations, such as migrates, and establishes basic.Generation
Major key further includes timestamp, host identification and increases number certainly.Which ensure that the global uniqueness of major key, will not repeat.It is in addition, raw
Into major key include timestamp and from number is increased, improve the performance of storage and the inquiry of database.In preference of the present invention
In, the major key of generation only has the length of 27.The length of middle 100 multidigit character of major key, this preference are effective compared with prior art
Reduce memory space.This method can according to practical application scenarios, flexible configuration character length, such as setup time stamp and
From the character length for increasing number, to control memory space.
The major key of generation of the embodiment of the present invention, expansible improving performance, to meet the constantly soaring requirement of portfolio.With
The increase of portfolio, the present invention can be with flexible expansions.I.e. on the one hand the generating means can be with self-defined type of service, it is only necessary to industry
The configuration access of business side without special adjustment, on the other hand can flexibly select major key each according to the characteristics of business
Partial length carrys out meet demand.
In the generation method of the embodiment of the present invention, using distributed deployment, there is no Single Point of Faliures.It is being individually-generated device
It breaks down, it is impossible to which when generating major key, other generating means still can work normally.Single-point refers under distributed environment, portion
Affix one's name to every machine node service can complete independently major key generation, be independent of each other between node;When individual machine node
Failure removed from cluster after, entire Distributed Services are still available, unaffected.
The major key of generation of the embodiment of the present invention, available for serial number, order number divides table major key etc., and applicability is high.Meanwhile
In major key generating process, interacted completely without with database or third party's component, reduce network consumption, also not
There are central servers, can be completed in memory completely, no intrusion, low cost, and performance is very high.Needed in the generation method
The configuration information wanted just is loaded into from unified configuration center in jvm (Java Virtual Machine) when application starts.
The major key of generation of the embodiment of the present invention has high concurrent performance.Such as it in the scene of a high-throughput, needs
The tens of thousands of a ID of generation per second (the newest peak values of Twitter reach 143,199Tweets/s, that is, 100,000+/ second).Using
This method generation major key can meet the requirement.Meanwhile if high-volume database, it is necessary to consider the problems of amount of storage.It is right
For the present invention, it can be stabbed by regulating time and from the character length for increasing number, to adjust memory space.
The database key of above-described embodiment generation so that database key has intuitive easy-to-use as business number
Feature, and can support distributed data deployed environment.The database key can the globally unique ID of effective acquisition, can be widely applied to
Serial number, order number etc. have the generation of business meaning or the unique identification without business meaning.The database key is main
Support big cluster and distributed deployment environment.
As shown in figure 3, the embodiment of the invention also discloses a kind of distributed data base major key generating means, including:
First acquisition module:For obtaining type of service from configuration file, the type of service can customize configuration;
Second acquisition module:For obtaining timestamp and host identification from server;
Configuration and generation module:For cycle counter to be configured, generation is digital from increasing;
Concatenation module:For obtained according to first acquisition module type of service, second acquisition module obtain
Timestamp and host identification, it is described configuration with generation module generation from increase number, splicing generation major key;
The concatenation module is run in memory.
In the major key of the device generation of above-described embodiment, started with type of service.By identifying type of service, the master is obtained
The corresponding specific business of key so that major key is provided with business meaning.This is convenient for being follow-up various data manipulations, such as migrates, establishes
Basis.The major key of generation further includes timestamp, host identification and increases number certainly.Which ensure that the global uniqueness of major key, it will not
It repeats.In addition, the major key of generation includes timestamp and from number is increased, the performance of storage and the inquiry of database is improved.
In preference of the present invention, the major key of generation only has the length of 27.The length of middle 100 multidigit character of major key compared with prior art,
This preference effectively reduces memory space.The device can according to practical application scenarios, flexible configuration character length, such as with
Timestamp is put and from the character length for increasing number, to control memory space.
The major key of device of embodiment of the present invention generation, can extend improving performance, and to meet, portfolio is constantly soaring to be wanted
It asks.With the increase of portfolio, device of the embodiment of the present invention can be with flexible expansion.I.e. on the one hand the device can be with self-defined business
Type, it is only necessary to the configuration access of business side, on the other hand can be according to the characteristics of business without special adjustment, spirit
The length of selection major key various pieces living carrys out meet demand.
In device of the embodiment of the present invention, the concatenation module is run in memory.The operation of whole device does not need to sum number
It is interacted according to library or third party's component, reduces network consumption, also there is no central servers, in memory can be complete
Into no intrusion is inexpensive, and performance is very high.In the device required configuration information when application starts just from unified
Configuration center is loaded into Java Virtual Machine (corresponding English:Java Virtual Machine;In text referred to as:JVM in).
In device of the embodiment of the present invention, using distributed deployment, there is no Single Point of Faliures.There is event in individual database
Barrier, it is impossible to which when generating major key, other databases still can work normally.
As preference, the timestamp length is millisecond according to the self-defined adjustment of business demand, least unit.Work as selection
During least unit millisecond, timestamp includes 17 characters.Timestamp length is according to the self-defined adjustment of business demand so that major key
Number of characters has the scalability, so as to adjust memory space.
As preference, the host identification is by unified configuration center configuration and safeguards, including IP address and port numbers;Or
Person, the host identification is run by program and obtained, including IP address and process ID.Using later approach, do not need to uniformly match
Center is put, but is run and realized by program.
As preference, the configuration includes with generation module:
Configuration module:For cycle counter to be configured;
Cycle counter:For being automatically generated from minimum value to maximum value from number is increased, described is integer from number is increased;
It is additionally operable to after maximum value is reached from increasing number, regenerate since minimum value digital from increasing.
Wherein, the configuration module includes:Atomic counters example is created, and using acquiring unit and increases unit certainly to obtain
It takes and setting value.For example, creating LongAdder examples, and come using acquiring unit intValue () and from unit add () is increased
Acquisition and setting value.
As shown in Fig. 2, there are multiple generating means in distributed data base, one of generating means are because failure cannot
During normal generation major key, other generating means still work normally.Each generating means are correspondingly arranged JVM cachings.Splicing master
The process of key can be completed in JVM cachings.Entire generating means are correspondingly arranged a unified configuration center.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment
Point just to refer each other, and the highlights of each of the examples are difference from other examples.Especially for equipment reality
For applying example, since it is substantially similar to embodiment of the method, so describing fairly simple, related part is referring to embodiment of the method
Part explanation.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a computer read/write memory medium
In, the program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, RAM) etc..
The above description is merely a specific embodiment, but protection scope of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, all should by the change or replacement that can be readily occurred in
It is included within the scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.
Claims (10)
1. a kind of distributed data base major key generation method, which is characterized in that including:
Type of service is obtained from configuration file, the type of service can customize configuration;
Timestamp and host identification are obtained from server;
Cycle counter is configured, generation is digital from increasing;
According to the type of service of the acquisition, the timestamp obtained from server and oneself of host identification and the generation
Increase number, splicing generation major key.
2. distributed data base major key generation method according to claim 1, which is characterized in that the timestamp length root
According to the self-defined adjustment of business demand, least unit is millisecond.
3. distributed data base major key generation method according to claim 1, which is characterized in that the host identification is by uniting
One configuration center is configured and safeguards, including I P address and port numbers;Alternatively,
The host identification is run by program and obtained, including I P address and process I D.
4. distributed data base major key generation method according to claim 1, which is characterized in that the configuration cycle count
Device, generation is digital from increasing, including:
Cycle counter is configured, is automatically generated from minimum value to maximum value from number is increased, described is integer from number is increased;When certainly
After increasing number reaches maximum value, the cycle counter regenerates digital from increasing since minimum value.
5. the distributed data base major key generation method according to claim 1 or 4, which is characterized in that the configuration cycle
Counter, including:Create atomic counters example, and obtain and setting value using acquiring unit and from unit is increased.
6. distributed data base major key generation method according to claim 1, which is characterized in that the splicing generation major key
It runs in memory.
7. a kind of distributed data base major key generating means, which is characterized in that including:
First acquisition module:For obtaining type of service from configuration file, the type of service can customize configuration;
Second acquisition module:For obtaining timestamp and host identification from server;
Configuration and generation module:For cycle counter to be configured, generation is digital from increasing;
Concatenation module:For obtained according to first acquisition module type of service, second acquisition module obtain when
Between stamp and host identification, it is described configuration with generation module generation from increase number, splicing generate major key;
The concatenation module is run in memory.
8. distributed data base major key generating means according to claim 7, which is characterized in that the timestamp length root
According to the self-defined adjustment of business demand, least unit is millisecond.
9. distributed data base major key generating means according to claim 7, which is characterized in that the host identification is by uniting
One configuration center is configured and safeguards, including I P address and port numbers;Alternatively,
The host identification is run by program and obtained, including I P address and process I D.
10. distributed data base major key generating means according to claim 7, which is characterized in that the configuration and generation
Module includes:
Configuration module:For cycle counter to be configured;
Cycle counter:For being automatically generated from minimum value to maximum value from number is increased, described is integer from number is increased;Also use
In after maximum value is reached from increasing number, regenerated since minimum value digital from increasing;
The configuration module includes:Atomic counters example is created, and using acquiring unit and increases unit certainly to obtain and set
Value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611228520.3A CN108241715A (en) | 2016-12-27 | 2016-12-27 | A kind of distributed data base major key generation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611228520.3A CN108241715A (en) | 2016-12-27 | 2016-12-27 | A kind of distributed data base major key generation method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108241715A true CN108241715A (en) | 2018-07-03 |
Family
ID=62702887
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611228520.3A Pending CN108241715A (en) | 2016-12-27 | 2016-12-27 | A kind of distributed data base major key generation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108241715A (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109165216A (en) * | 2018-08-02 | 2019-01-08 | 杭州启博科技有限公司 | A kind of generation method and system, storage medium of Redis distributed data base major key id |
CN109241056A (en) * | 2018-08-23 | 2019-01-18 | 重庆富民银行股份有限公司 | A kind of digital ID generation system for distributed system |
CN109241177A (en) * | 2018-07-12 | 2019-01-18 | 四川大学 | A kind of database key generation method suitable for distributed system |
CN109241057A (en) * | 2018-08-23 | 2019-01-18 | 重庆富民银行股份有限公司 | A kind of digital ID generation method for distributed system |
CN109522132A (en) * | 2018-11-27 | 2019-03-26 | 郑州云海信息技术有限公司 | A kind of method and device that mark generates |
CN109740120A (en) * | 2018-12-14 | 2019-05-10 | 深圳壹账通智能科技有限公司 | The generation method of unique identification, device, computer equipment under distributed environment |
CN110442642A (en) * | 2019-06-19 | 2019-11-12 | 北京航天智造科技发展有限公司 | Data processing method, device and the storage medium of distributed data base |
CN110597829A (en) * | 2019-11-12 | 2019-12-20 | 深圳竹云科技有限公司 | Method, device and equipment for generating primary key |
CN111061765A (en) * | 2019-11-25 | 2020-04-24 | 福建天泉教育科技有限公司 | Method for merging prefetched data, storage medium |
CN111753016A (en) * | 2020-06-28 | 2020-10-09 | 深圳前海微众银行股份有限公司 | Data processing method, device, system and computer readable storage medium |
CN112445800A (en) * | 2020-11-20 | 2021-03-05 | 北京思特奇信息技术股份有限公司 | Method and system for generating data serial number and electronic equipment |
CN113626410A (en) * | 2021-08-11 | 2021-11-09 | 北京神州数字科技有限公司 | Distributed decentralized sequence generation method, device and system |
CN113672621A (en) * | 2021-08-20 | 2021-11-19 | 建信金融科技有限责任公司 | Method, device and equipment for generating time sequence main key |
CN117635273A (en) * | 2023-12-12 | 2024-03-01 | 苏州思客信息技术有限公司 | Business order number generation method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102769667A (en) * | 2012-06-29 | 2012-11-07 | 北京奇虎科技有限公司 | Method, equipment and system for generating ID |
CN103823810A (en) * | 2012-11-19 | 2014-05-28 | 中国电信股份有限公司 | Method, device and system for generating unique keys in distributed system |
CN106572165A (en) * | 2016-10-26 | 2017-04-19 | 宜人恒业科技发展(北京)有限公司 | Distributed global unique ID application method |
-
2016
- 2016-12-27 CN CN201611228520.3A patent/CN108241715A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102769667A (en) * | 2012-06-29 | 2012-11-07 | 北京奇虎科技有限公司 | Method, equipment and system for generating ID |
CN103823810A (en) * | 2012-11-19 | 2014-05-28 | 中国电信股份有限公司 | Method, device and system for generating unique keys in distributed system |
CN106572165A (en) * | 2016-10-26 | 2017-04-19 | 宜人恒业科技发展(北京)有限公司 | Distributed global unique ID application method |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109241177A (en) * | 2018-07-12 | 2019-01-18 | 四川大学 | A kind of database key generation method suitable for distributed system |
CN109165216A (en) * | 2018-08-02 | 2019-01-08 | 杭州启博科技有限公司 | A kind of generation method and system, storage medium of Redis distributed data base major key id |
CN109241057B (en) * | 2018-08-23 | 2020-12-08 | 重庆富民银行股份有限公司 | Digital ID generation method for distributed system |
CN109241056A (en) * | 2018-08-23 | 2019-01-18 | 重庆富民银行股份有限公司 | A kind of digital ID generation system for distributed system |
CN109241057A (en) * | 2018-08-23 | 2019-01-18 | 重庆富民银行股份有限公司 | A kind of digital ID generation method for distributed system |
CN109522132A (en) * | 2018-11-27 | 2019-03-26 | 郑州云海信息技术有限公司 | A kind of method and device that mark generates |
CN109740120A (en) * | 2018-12-14 | 2019-05-10 | 深圳壹账通智能科技有限公司 | The generation method of unique identification, device, computer equipment under distributed environment |
CN110442642A (en) * | 2019-06-19 | 2019-11-12 | 北京航天智造科技发展有限公司 | Data processing method, device and the storage medium of distributed data base |
CN110442642B (en) * | 2019-06-19 | 2021-11-23 | 北京航天智造科技发展有限公司 | Data processing method and device for distributed database and storage medium |
CN110597829A (en) * | 2019-11-12 | 2019-12-20 | 深圳竹云科技有限公司 | Method, device and equipment for generating primary key |
CN111061765A (en) * | 2019-11-25 | 2020-04-24 | 福建天泉教育科技有限公司 | Method for merging prefetched data, storage medium |
CN111061765B (en) * | 2019-11-25 | 2022-09-06 | 福建天泉教育科技有限公司 | Method for merging prefetched data, storage medium |
CN111753016A (en) * | 2020-06-28 | 2020-10-09 | 深圳前海微众银行股份有限公司 | Data processing method, device, system and computer readable storage medium |
CN111753016B (en) * | 2020-06-28 | 2024-06-04 | 深圳前海微众银行股份有限公司 | Data processing method, device, system and computer readable storage medium |
CN112445800A (en) * | 2020-11-20 | 2021-03-05 | 北京思特奇信息技术股份有限公司 | Method and system for generating data serial number and electronic equipment |
CN113626410A (en) * | 2021-08-11 | 2021-11-09 | 北京神州数字科技有限公司 | Distributed decentralized sequence generation method, device and system |
CN113672621A (en) * | 2021-08-20 | 2021-11-19 | 建信金融科技有限责任公司 | Method, device and equipment for generating time sequence main key |
CN117635273A (en) * | 2023-12-12 | 2024-03-01 | 苏州思客信息技术有限公司 | Business order number generation method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108241715A (en) | A kind of distributed data base major key generation method and device | |
US7730099B2 (en) | Storage and retrieval of richly typed hierarchical network models | |
CN107113341B (en) | System for high throughput processing of transactions in a distributed relational database management system for data partitioning | |
US9323791B2 (en) | Apparatus and method for expanding a shared-nothing system | |
CN104462269A (en) | Isomerous database data exchange method and system | |
CN103095687A (en) | Method and device of metadata processing | |
CN109947411B (en) | Method for generating unique ID (identity) primary key by distributed software | |
CN102194009A (en) | Database hosting method and database hosting platform system | |
CN113326264A (en) | Data processing method, server and storage medium | |
JP6975153B2 (en) | Data storage service processing method and equipment | |
CN110602158A (en) | Global unique ID generation system and method, ID generator and storage medium | |
CN113220659A (en) | Data migration method, system, electronic device and storage medium | |
US11620311B1 (en) | Transformation of directed graph into relational data | |
CN109241057B (en) | Digital ID generation method for distributed system | |
US20070174264A1 (en) | Three-dimensional data structure for storing data of multiple domains and the management thereof | |
CN112463790A (en) | Method and system for rapidly generating ID (identity) under micro-service architecture | |
CN116303789A (en) | Parallel synchronization method and device for multi-fragment multi-copy database and readable medium | |
Pankowski | Consistency and availability of Data in replicated NoSQL databases | |
CN110935168B (en) | Distributed ID generation method, device and equipment for global uniform architecture | |
CN104572921A (en) | Cross-datacenter data synchronization method and device | |
CN113761053A (en) | Data query method and device, electronic equipment and storage medium | |
CN113553329B (en) | Data integration system and method | |
CN116662290B (en) | Read optimization method and device for stateful server non-perceptual function | |
JP7060797B2 (en) | Table generation method, table generator and table generation program | |
KR100678926B1 (en) | System and method for managing log information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180703 |
|
RJ01 | Rejection of invention patent application after publication |