CN102999525A - Data-table processing method and system - Google Patents

Data-table processing method and system Download PDF

Info

Publication number
CN102999525A
CN102999525A CN2011102762773A CN201110276277A CN102999525A CN 102999525 A CN102999525 A CN 102999525A CN 2011102762773 A CN2011102762773 A CN 2011102762773A CN 201110276277 A CN201110276277 A CN 201110276277A CN 102999525 A CN102999525 A CN 102999525A
Authority
CN
China
Prior art keywords
sequence
tables
data
user
maximal value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2011102762773A
Other languages
Chinese (zh)
Other versions
CN102999525B (en
Inventor
陈伟君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Kingdee Tianyanyun Computing Co Ltd
Original Assignee
Shenzhen Kingdee Middleware Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Kingdee Middleware Co ltd filed Critical Shenzhen Kingdee Middleware Co ltd
Priority to CN201110276277.3A priority Critical patent/CN102999525B/en
Publication of CN102999525A publication Critical patent/CN102999525A/en
Application granted granted Critical
Publication of CN102999525B publication Critical patent/CN102999525B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

The invention relates to a data-table processing method and a data-table processing system. The method comprises the following steps of: creating a sequence table, wherein the sequence table comprises name fields of data tables, a current maximum-value field of the sequences and primary key fields; acquiring an operation request of a user on the data tables, and acquiring the names of the data tables of user operation according to the operation request; searching the names of the data tables of the user operation in the sequence table, and locking records comprising the names of the data tables in the sequence table; acquiring the current maximum value of the sequences in the locked records in the sequence table, adding a preset value for the current maximum value of the sequence, and updating the current maximum value of the sequences; and updating the data tables of the user operation according to the updated current maximum value of the sequences. The invention has the advantages that since the records are locked, the operation of certain user on the data tables can be ensured, and the operation of other users for the data tables is ineffective, so that the condition of conflict of the sequence numbers can be avoided.

Description

Tables of data disposal route and system
[technical field]
The present invention relates to the tables of data process field, particularly a kind of tables of data disposal route and system.
[background technology]
In database, sequence generator can be the automatic formation sequence of the row in the tables of data number, produces one group of equally spaced numerical value, is mainly used in the Major key of generated data table.Wherein, major key claims again primary key (primary key), the one or more fields in referring to show, and its value is used for a certain record of unique label table.
In Database application, need to be that every in tables of data record generates ID (Identity, sequence number), with this ID as major key.Traditional method is to use certain algorithm to generate character string, so that each character string that generates is different, as utilize machine time to add MAC (Media Access Control, hardware address) address adds the character string that random factor generates according to certain strategy, but string length is at least 32 characters usually, to space requirement than digital ID (Identity, sequence number) wants high, cause search index speed slower than digital ID, and when a plurality of users operate same tables of data, may cause occurrence sequence number conflict; Major key that traditional method also has a usage data storehouse system is from increasing function, Identity such as SqlServer, the Auto_Increment of MySql etc., the ID of this data model is digital value, but sequence generator can't with concrete Database Systems decoupling zero, namely need a corresponding sequence generator to realize for each Database Systems, and when a plurality of users operate same packet, may cause occurrence sequence number conflict.
[summary of the invention]
Based on this, be necessary to provide a kind of tables of data disposal route that can prevent the sequence number conflict.
A kind of tables of data disposal route may further comprise the steps:
Create sequence table, described sequence table comprises the current maximal value field of name field, the sequence of tables of data and major key field;
Obtain the user to the operation requests of tables of data, obtain the title of the tables of data of user's operation according to described operation requests;
In described sequence table, search the title of the tables of data of described user operation, the record of the title that comprises described tables of data in the described sequence table is locked;
Obtain the current maximal value of sequence in the record that locks in the described sequence table, and the current maximal value of described sequence is increased predetermined value, upgrade the current maximal value of described sequence;
Upgrade the tables of data of described user's operation according to the current maximal value of the sequence after the described renewal.
Preferably, in described sequence table, search the title of the tables of data of described user operation, the record of the title that comprises described tables of data in the described sequence table advanced line-locked step be specially:
In described sequence table, search the title of the tables of data of described user's operation, when in described sequence table, not finding, described sequence table is locked, in described sequence table, create the record of the title of the tables of data that comprises described user's operation, the current maximal value of sequence in the described record of initialization, then the record with the title that comprises described tables of data in the described sequence table locks.
Preferably, the current maximal value of the sequence in the record that in obtaining described sequence table, locks, and with the current maximal value increase of described sequence predetermined value, upgrade the current peaked step of described sequence and also comprise step afterwards:
Formation comprises the sequence of interval piece of a predetermined value sequence number;
The step of upgrading the tables of data of described user's operation according to the current maximal value of the sequence after the described renewal is: the tables of data of upgrading described user's operation according to described sequence of interval piece.
Preferably, described obtaining after the step of user to the operation requests of described tables of data also comprises:
Judge whether sequence number is finished in the described sequence of interval piece, if, then obtain new sequence of interval piece, if not, then directly from described sequence of interval piece, obtain sequence number, according to the tables of data of the described user's operation of the sequence number update that obtains, wherein, described sequence number is less than the current maximal value of described sequence.
Preferably, homing sequence number, maximum sequence number and current sequence number have been recorded in the described sequence of interval piece.
In addition, also be necessary to provide a kind of tables of data disposal system that can prevent the sequence number conflict.
A kind of tables of data disposal system comprises:
Creation module is used for creating sequence table, and described sequence table comprises the current maximal value field of name field, the sequence of tables of data and major key field;
Acquisition module is used for obtaining the user to the operation requests of tables of data, obtains the title of the tables of data of user's operation according to described operation requests;
Search module, be used for searching in described sequence table the title of the tables of data of described user's operation;
Processing module, be used for the record of the title that comprises described tables of data of described sequence table is locked, obtain the current maximal value of sequence in the record that locks in the described sequence table, and the current maximal value of described sequence is increased predetermined value, upgrade the current maximal value of described sequence;
Update module is used for upgrading the tables of data that described user operates according to the current maximal value of the sequence after the described renewal.
Preferably, in the described module of searching when in described sequence table, not finding the title of tables of data of described user operation, described processing module also is used for described sequence table is locked, in described sequence table, create the record of the title of the tables of data that comprises described user's operation, the current maximal value of the sequence of the described record of initialization, then the record with the title that comprises described tables of data in the described sequence table locks.
Preferably, described processing module also is used to form the sequence of interval piece that comprises a predetermined value sequence number; Described update module also is used for upgrading according to described sequence of interval piece the tables of data of described user's operation.
Preferably, also comprise judge module, described judge module is used for after described acquisition module obtains the operation requests of described user to described tables of data, judge whether sequence number is finished in the described sequence of interval piece, described acquisition module is when described judge module judges that sequence number has been finished in the described sequence of interval piece, described processing module also is used for obtaining new sequence of interval piece, described processing module also is used for when described judge module is judged described sequence of interval piece sequence number and is not finished, directly from described sequence blocks, obtain sequence number, described update module also is used for the tables of data according to the described user's operation of the sequence number update that obtains, wherein, described sequence number is less than the current maximal value of described sequence.
Preferably, homing sequence number, maximum sequence number and current sequence number have been recorded in the described sequence blocks.
Above-mentioned tables of data disposal route and system, create sequence table, obtain the user to the operation requests of tables of data and the title of tables of data, in sequence table, search the title of the tables of data of user's operation, the record that will comprise the title of this tables of data locks, obtain the current maximal value of sequence in the record of locking, after increasing predetermined value, the current maximal value of renewal sequence, upgrade again the tables of data of user's operation according to the current maximal value of the sequence of upgrading, owing to having locked the record of the title of the tables of data that comprises user's operation, in the time of can guaranteeing that certain user operates tables of data, other users are invalid to the operation of this tables of data, situation that so can occurrence sequence number conflict, and the data that can be applicable in the distributed environment are synchronous.
[description of drawings]
Fig. 1 is the process flow diagram of tables of data disposal route among the embodiment;
Fig. 2 is the structural representation of tables of data disposal system among the embodiment;
Fig. 3 is the structural representation of tables of data disposal system among another embodiment.
[embodiment]
Be described in detail below in conjunction with specific embodiment and the accompanying drawing technical scheme to sequence generating method and system.
As shown in Figure 1, in one embodiment, a kind of sequence generating method may further comprise the steps:
Step S110 creates sequence table, and this sequence table comprises the current maximal value field of name field, the sequence of tables of data and major key field.
Utilize the sql like language of standard to create a sequence table.The current maximal value field of name field, sequence and the major key field that comprise tables of data in this sequence table.For example, the structure of the sequence table of establishment is as follows:
create?table?My_IDSequence(
seqName?varchar(128),
seqNext?int,
primary?key(seqName)
);
Wherein, the name field of seqName varchar (128) expression tables of data, seqNext int represents the current maximal value field of sequence, primary key (seqName) represents major key field.The record that has many tables of data in this sequence table.The sequence number that will generate next time in the maximal value of existing sequence number or the tables of data in the value representation tables of data in the current maximal value field of sequence, maximal value such as already present sequence number in the tables of data is 20, and the current maximal value of the sequence of this tables of data that then records in the sequence table can be 20 or 21.In the present embodiment, the current maximal value of the sequence of the tables of data that records in this sequence table is the sequence number that tables of data will generate next time.This sequence table with the name field of tables of data as major key.
Step S120 obtains the user to the operation requests of tables of data, obtains the title of the tables of data of user's operation according to this operation requests.
Obtain the user to the operation requests of tables of data, because there being the record of many tables of data in the sequence table, need obtain the title of the tables of data of user operation, in order to follow-uply in sequence table, search.After obtaining the operation requests of user to tables of data, can be connected with Database, at this moment, need this connection to be set to non-automatic submission data, to guarantee follow-up lock operation.Submitting data to database is association database affairs.Generally speaking, db transaction is defaulted as automatic submission, namely as namely submitting data to after the operation, in the present embodiment, need should to connect maintenance a period of time, guarantee that operation in the whole affairs is finished after, just submit data to, transfer accounts 100 yuan such as user A in the account of user B, be divided into two steps: 1. button goes 100 yuan in the account of user A; 2. in the account of user B, increase by 100 yuan.When two steps are all finished, just submit data to.
Step S130 searches the title of the tables of data of user operation in this sequence table, the record of the title that comprises this tables of data in this sequence table is locked.
Search the title of the tables of data of user's operation in sequence table, if find, then direct record to the title that comprises this tables of data in the sequence table locks, and to prevent other users the record of the title of this tables of data is operated.
In one embodiment, if when in sequence table, not finding, then this sequence table is locked, in sequence table, create the record of the title of the tables of data that comprises this user's operation, the current maximal value of sequence of the record that initialization creates, the record with the title of the tables of data that comprises user's operation in this sequence table locks again.Sequence table is locked, and in the time of can preventing that other users from operating this tables of data simultaneously, sequence table also creates same record, thereby causes record to repeat, and occupies resource.After establishment comprises the record of title of tables of data of this user operation, the current maximal value of sequence to the tables of data that comprises this user operation is carried out initialization, can be 1 such as the current maximal value of this sequence, the sequence number that namely represents to generate in the tables of data of this user's operation is since 1.The record of the title of the tables of data that comprises user's operation that then will create locks, and can discharge the locking to sequence table, makes things convenient for other users that the record of the title that comprises other tables of data in the sequence table is operated.
Step S140 obtains the current maximal value of sequence in the record that locks in this sequence table, and the current maximal value of this sequence is increased predetermined value, upgrades the current maximal value of this sequence.
After the record of the title of the tables of data of the user that comprises in sequence table operation locked, get access to the current maximal value of sequence of this record, the current maximal value of this sequence increases predetermined value for the sequence number that this tables of data will generate next time with it, has upgraded the current maximal value of sequence.This predetermined value can be Arbitrary Digit, such as 10000.The current maximal value of sequence of the record of the title of the tables of data that comprises user operation of for example obtaining is 10001, then increase predetermined value 10000 after, the current maximal value of the sequence after the renewal is 20001.
In a preferred embodiment, after step S140, also comprise step: form the sequence of interval piece that comprises a predetermined value sequence number.Such as the sequence of interval piece [10001,20000] that comprises 10000 sequence numbers that forms, sequence number is the round values that comprises two end points in the sequence of interval piece.
Record homing sequence number, maximum sequence number and current sequence number in the sequence of interval piece, saved cache resources.Wherein, current sequence number refer to the serial number assignment in the sequence of interval piece to the user after, next with the sequence number that distributes.
After comprising the sequence of interval piece of a predetermined value sequence number, formation also comprises: submit data to, discharge the record of the title of the tables of data that comprises user's operation in the sequence table of locking.So that other users operate the record of the title of this tables of data.
Step S150 upgrades the tables of data that the user operates according to the current maximal value of sequence after upgrading.
Comprise the sequence of interval piece of a predetermined value sequence number in formation after, the tables of data of upgrading user's operation according to the current maximal value of sequence after upgrading is specially: the tables of data of upgrading user's operation according to this sequence of interval piece.This sequence of interval piece has comprised the sequence number between the current maximal value of sequence of upgrading after the front current maximal value of sequence arrives renewal, sequence number in this sequence of interval piece is all distributed to this user, when other users operate this tables of data, can not use the sequence number in this sequence of interval piece.
In one embodiment, after obtaining the operation requests of this user to this tables of data, also comprise: judge whether sequence number is finished in this sequence of interval piece, if then carry out and obtain new sequence of interval piece, if not, then directly from this sequence of interval piece, obtain sequence number, according to the tables of data of this user's operation of the sequence number update that obtains, wherein, described sequence number is less than the current maximal value of described sequence.
For example, when personnel system operation subscriber's meter, in subscriber's meter, insert user A, need to distribute a sequence number to user A, if the sequence generator of subscriber's meter obtains sequence of interval piece [1,10000], judge first whether the sequence number in this sequence of interval piece is finished, if do not have, then directly from the sequence of interval piece, obtain a serial number assignment to user A, if then need obtain new sequence of interval piece.
As shown in Figure 2, in one embodiment, a kind of tables of data disposal system comprises creation module 210, acquisition module 220, searches module 230, processing module 240 and update module 250.Wherein,
Creation module 210 is used for creating sequence table, and this sequence table comprises the current maximal value field of name field, the sequence of tables of data and major key field.Utilize the sql like language of standard to create a sequence table.The current maximal value field of name field, sequence and the major key field that comprise tables of data in this sequence table.The structure of sequence table can as describing in the above-mentioned tables of data disposal route, not repeat them here.
Acquisition module 220 is used for obtaining the user to the operation requests of tables of data, obtains the title of the tables of data of user's operation according to this operation requests.Acquisition module office 220 obtains the user to the operation requests of tables of data, because there being the record of many tables of data in the sequence table, need obtain the title of the tables of data of user operation, in order to follow-uply search in sequence table.
Search module 230 for the title of the tables of data of searching this user's operation in this sequence table.
Search module 230 and in sequence table, search the title of the tables of data of user's operation, if find, then processing module 240 directly locks the record of the title that comprises this tables of data in the sequence table, to prevent other users the record of the title of this tables of data is operated.
If search module 230 when in sequence table, not finding, then processing module 240 locks this sequence table, in sequence table, create the record of the title of the tables of data that comprises this user's operation, the current maximal value of sequence of the record that initialization creates, the record with the title of the tables of data that comprises user's operation in this sequence table locks again.Sequence table is locked, and in the time of can preventing that other users from operating this tables of data simultaneously, sequence table also creates same record, causes record to repeat, and occupies resource.After establishment comprises the record of title of tables of data of this user operation, the current maximal value of sequence to the tables of data that comprises this user operation is carried out initialization, can be 1 such as the current maximal value of this sequence, the sequence number that namely represents to generate in the tables of data of this user's operation is since 1.The record of the title of the tables of data that comprises user's operation that then will create locks, and can discharge the locking to sequence table, makes things convenient for other users that the record of the title that comprises other tables of data in the sequence table is operated.
Processing module 240 is used for the record of the title of the tables of data that comprises user's operation of this sequence table is locked, obtain the current maximal value of sequence in the record that locks in this sequence table, and with the current maximal value increase of this sequence predetermined value, upgrade the current maximal value of this sequence.
After the record of the title of the tables of data of the user's operation that comprises in 240 pairs of sequence tables of processing module locks, get access to the current maximal value of sequence of this record, the current maximal value of this sequence increases predetermined value for the sequence number that this tables of data will generate next time with it, has upgraded the current maximal value of sequence.This predetermined value can be Arbitrary Digit, such as 10000.The current maximal value of sequence of the record of the title of the tables of data that comprises user operation of for example obtaining is 10001, then increase predetermined value 10000 after, the current maximal value of the sequence after the renewal is 20001.
In the preferred embodiment, processing module 240 also is used to form the sequence of interval piece that comprises a predetermined value sequence number.Such as the sequence of interval piece [10001,20000] that comprises 10000 sequence numbers that forms, sequence number is the round values that comprises two end points in the sequence of interval piece.
Homing sequence number, maximum sequence number and current sequence number have been recorded in the sequence of interval piece.Saved cache resources.Wherein, current sequence number refer to the serial number assignment in the sequence of interval piece to the user after, next with the sequence number that distributes.
Processing module 240 also is used for submitting to data, discharges the record of the title of the tables of data that comprises user's operation in the sequence table that locks.So that other users operate the record of the title of this tables of data.
Update module 250 is used for upgrading according to the current maximal value of the sequence after this renewal the tables of data of this user's operation.
Update module 250 also is used for upgrading according to this sequence of interval piece the tables of data of this user's operation.This sequence of interval piece has comprised the sequence number between the current maximal value of sequence of upgrading after the front current maximal value of sequence arrives renewal, sequence number in this sequence of interval piece is all distributed to this user, when other users operate this tables of data, can not use the sequence number in this sequence of interval piece.
In one embodiment, as shown in Figure 3, above-mentioned tables of data disposal system, except comprise creation module 210, acquisition module 220, search module 230, processing module 240 and update module 250, also comprise judge module 260.Wherein,
Judge module 260 is used for after acquisition module 220 obtains the operation requests of this user to this tables of data, judge whether sequence number is finished in this sequence of interval piece, acquisition module 220 is when judge module 260 judges that sequence number has been finished in this sequence of interval piece, obtain the title of the tables of data of user's operation according to this operation requests, search module 230 and also be used for searching in this sequence table the title of the tables of data of this user's operation, processing module 240 also is used for the record of the title of the tables of data that comprises user's operation of this sequence table is locked, obtain the current maximal value of sequence in the record that locks in this sequence table, and with the current maximal value increase of this sequence predetermined value, upgrade the current maximal value of this sequence, form the new sequence of interval piece that comprises a predetermined value sequence number; Processing module 240 also is used for when judge module 260 is judged this sequence of interval piece sequence number and is not finished, directly from this sequence blocks, obtain sequence number, update module 250 also is used for the tables of data according to this user's operation of the sequence number update that obtains, wherein, this sequence number is less than the current maximal value of this sequence.
For example, when personnel system operation subscriber's meter, in subscriber's meter, insert user A, need to distribute a sequence number to user A, if subscriber's meter obtains sequence blocks [1,10000], judge module 260 judges whether the sequence number in this sequence blocks is finished, if do not have, then processing module 240 directly obtains a serial number assignment to user A from the sequence of interval piece, if then need obtain new sequence of interval piece.
For the course of work of clearer explanation tables of data disposal system, describe with concrete example, but the notebook data list processing system is not limited to be applied to this concrete example.
There is subscriber's meter T_user (id int, userName varchar (128)) in main data system; Organization table T_org (id int, orgName varchar (128)).Creation module 210 creates first sequence table My_IDSequence in database.If two application systems are arranged, the S1 of human resources system and purchasing system S2.S1 and S2 have the business that creates the user, need to generate user's sequence number.S1 system creation sequence generator SEQ1, S2 system creation sequence generator SEQ2, all sequence numbers generate since 1.
When the request that user A1 is inserted in operation to subscriber's meter T_user of S1 system, after then acquisition module 220 obtains this operation requests, SEQ1 is connected with Database, search module 230 and from the seqName of My_IDSequence table, search the record that whether has T_user, if do not exist, then processing module 240 locking My_IDSequence show, in the My_IDSequence table, create the record of the title that comprises this T_user, and then the record of the title that comprises this T_user locked, the current maximal value seqNext of the sequence of this T_user of initialization is 1, the current maximal value seqNext of sequence that inquiry obtains this T_user is 1, with 1 increase predetermined value 10000, then upgrading seqNext is 10001, and formation sequence extent block [1,10000], to be that SEQ1 is unique hold this sequence of interval piece.Update module 250 is upgraded this subscriber's meter T_user according to this sequence of interval piece, namely obtains a serial number assignment to user A1 from the sequence of interval piece.
Equally, the request that user a1 is inserted in operation to subscriber's meter T_user of S2 system, after then acquisition module 220 obtains operation requests, SEQ2 is connected with Database, search the T_user record among the seqName that module 230 finds My_IDSequence table, processing module 240 obtains the row level lock of this T_user, the current maximal value seqNext of sequence that inquiry obtains this T_user is 10001, increase predetermined value 10000 with 10001, then upgrading seqNext is 20001, and formation sequence extent block [10001,20000], to be that SEQ2 is unique hold this sequence of interval piece.Update module 250 is upgraded this subscriber's meter T_user according to this sequence of interval piece, namely obtains a serial number assignment to user a1 from this sequence of interval piece.
So the data in subscriber's meter T_user, inserted of SEQ1 for (1, A1), (2, A2) ..., (10000, A10000).
The data that SEQ2 inserts in subscriber's meter T_user for (10001, a1), (10002, a2) ..., (20000, a10000).
Above-mentioned tables of data disposal route and system, create sequence table, obtain the user to the operation requests of tables of data and the title of tables of data, in sequence table, search the title of the tables of data of user's operation, the record that will comprise the title of this tables of data locks, obtain the current maximal value of sequence in the record of locking, after increasing predetermined value, the current maximal value of renewal sequence, upgrade again the tables of data of user's operation according to the current maximal value of the sequence of upgrading, owing to having locked the record of the title of the tables of data that comprises user's operation, in the time of can guaranteeing that certain user operates tables of data, other users are invalid to the operation of this tables of data, so can occurrence sequence number conflict, can be applicable in the distributed environment data synchronous.
In addition, do not rely on concrete programming language, expanded its range of application, obtain a sequence of interval piece at every turn, reduced the access times of database, improved the sequence number formation efficiency; Only record start sequence number, maximum sequence number and current sequence number in the sequence blocks can be saved cache resources.
The above embodiment has only expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to claim of the present invention.Should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.

Claims (10)

1. tables of data disposal route may further comprise the steps:
Create sequence table, described sequence table comprises the current maximal value field of name field, the sequence of tables of data and major key field;
Obtain the user to the operation requests of tables of data, obtain the title of the tables of data of user's operation according to described operation requests;
In described sequence table, search the title of the tables of data of described user operation, the record of the title that comprises described tables of data in the described sequence table is locked;
Obtain the current maximal value of sequence in the record that locks in the described sequence table, and the current maximal value of described sequence is increased predetermined value, upgrade the current maximal value of described sequence;
Upgrade the tables of data of described user's operation according to the current maximal value of the sequence after the described renewal.
2. tables of data disposal route according to claim 1 is characterized in that, searches the title of the tables of data of described user operation in described sequence table, the record of the title that comprises described tables of data in the described sequence table is advanced line-locked step be specially:
In described sequence table, search the title of the tables of data of described user's operation, when in described sequence table, not finding, described sequence table is locked, in described sequence table, create the record of the title of the tables of data that comprises described user's operation, the current maximal value of sequence in the described record of initialization, then the record with the title that comprises described tables of data in the described sequence table locks.
3. tables of data disposal route according to claim 1 and 2, it is characterized in that, the current maximal value of sequence in the record that in obtaining described sequence table, locks, and with the current maximal value increase of described sequence predetermined value, upgrade the current peaked step of described sequence and also comprise step afterwards:
Formation comprises the sequence of interval piece of a predetermined value sequence number;
The step of upgrading the tables of data of described user's operation according to the current maximal value of the sequence after the described renewal is: the tables of data of upgrading described user's operation according to described sequence of interval piece.
4. tables of data disposal route according to claim 3 is characterized in that, described obtaining after the step of user to the operation requests of described tables of data also comprises:
Judge whether sequence number is finished in the described sequence of interval piece, if, then obtain new sequence of interval piece, if not, then directly from described sequence of interval piece, obtain sequence number, according to the tables of data of the described user's operation of the sequence number update that obtains, wherein, described sequence number is less than the current maximal value of described sequence.
5. tables of data disposal route according to claim 3 is characterized in that, has recorded homing sequence number, maximum sequence number and current sequence number in the described sequence of interval piece.
6. a tables of data disposal system is characterized in that, comprising:
Creation module is used for creating sequence table, and described sequence table comprises the current maximal value field of name field, the sequence of tables of data and major key field;
Acquisition module is used for obtaining the user to the operation requests of tables of data, obtains the title of the tables of data of user's operation according to described operation requests;
Search module, be used for searching in described sequence table the title of the tables of data of described user's operation;
Processing module, be used for the record of the title that comprises described tables of data of described sequence table is locked, obtain the current maximal value of sequence in the record that locks in the described sequence table, and the current maximal value of described sequence is increased predetermined value, upgrade the current maximal value of described sequence;
Update module is used for upgrading the tables of data that described user operates according to the current maximal value of the sequence after the described renewal.
7. tables of data disposal system according to claim 6, it is characterized in that, in the described module of searching when in described sequence table, not finding the title of tables of data of described user operation, described processing module also is used for described sequence table is locked, in described sequence table, create the record of the title of the tables of data that comprises described user's operation, the current maximal value of the sequence of the described record of initialization, then the record with the title that comprises described tables of data in the described sequence table locks.
8. according to claim 6 or 7 described tables of data disposal systems, it is characterized in that, described processing module also is used to form the sequence of interval piece that comprises a predetermined value sequence number; Described update module also is used for upgrading according to described sequence of interval piece the tables of data of described user's operation.
9. tables of data disposal system according to claim 8, it is characterized in that, also comprise judge module, described judge module is used for after described acquisition module obtains the operation requests of described user to described tables of data, judge whether sequence number is finished in the described sequence of interval piece, described acquisition module is when described judge module judges that sequence number has been finished in the described sequence of interval piece, described processing module also is used for obtaining new sequence of interval piece, described processing module also is used for when described judge module is judged described sequence of interval piece sequence number and is not finished, directly from described sequence blocks, obtain sequence number, described update module also is used for the tables of data according to the described user's operation of the sequence number update that obtains, wherein, described sequence number is less than the current maximal value of described sequence.
10. tables of data disposal system according to claim 8 is characterized in that, has recorded homing sequence number, maximum sequence number and current sequence number in the described sequence blocks.
CN201110276277.3A 2011-09-16 2011-09-16 Tables of data processing method and system Active CN102999525B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110276277.3A CN102999525B (en) 2011-09-16 2011-09-16 Tables of data processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110276277.3A CN102999525B (en) 2011-09-16 2011-09-16 Tables of data processing method and system

Publications (2)

Publication Number Publication Date
CN102999525A true CN102999525A (en) 2013-03-27
CN102999525B CN102999525B (en) 2016-08-03

Family

ID=47928099

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110276277.3A Active CN102999525B (en) 2011-09-16 2011-09-16 Tables of data processing method and system

Country Status (1)

Country Link
CN (1) CN102999525B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103020268A (en) * 2012-12-26 2013-04-03 大唐软件技术股份有限公司 Serial number applying method and system of relational database
CN104142954A (en) * 2013-05-10 2014-11-12 中国电信股份有限公司 Data sheet comparing and updating method and device based on frequentness partition
CN108206744A (en) * 2016-12-16 2018-06-26 北京京东尚科信息技术有限公司 The method and system of the high performance Serial No. generation of High Availabitity
CN108256019A (en) * 2018-01-09 2018-07-06 顺丰科技有限公司 Database key generation method, device, equipment and its storage medium
CN108959403A (en) * 2018-06-06 2018-12-07 阿里巴巴集团控股有限公司 A kind of distributed transaction processing method and device
CN111125112A (en) * 2019-12-25 2020-05-08 京东数字科技控股有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN112925787A (en) * 2019-12-06 2021-06-08 中国电信股份有限公司 Data processing method, device and computer readable storage medium
CN113342851A (en) * 2021-05-28 2021-09-03 北京银行股份有限公司 Sequence capacity expansion method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1834957A (en) * 2005-03-17 2006-09-20 华为技术有限公司 Multi-chart information initializing method of database
CN101661509A (en) * 2009-09-29 2010-03-03 金蝶软件(中国)有限公司 Method for generating major key field of database table and device thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1834957A (en) * 2005-03-17 2006-09-20 华为技术有限公司 Multi-chart information initializing method of database
CN101661509A (en) * 2009-09-29 2010-03-03 金蝶软件(中国)有限公司 Method for generating major key field of database table and device thereof

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103020268A (en) * 2012-12-26 2013-04-03 大唐软件技术股份有限公司 Serial number applying method and system of relational database
CN104142954A (en) * 2013-05-10 2014-11-12 中国电信股份有限公司 Data sheet comparing and updating method and device based on frequentness partition
CN104142954B (en) * 2013-05-10 2017-11-21 中国电信股份有限公司 A kind of tables of data based on frequency subregion compares update method and device
CN108206744A (en) * 2016-12-16 2018-06-26 北京京东尚科信息技术有限公司 The method and system of the high performance Serial No. generation of High Availabitity
CN108256019A (en) * 2018-01-09 2018-07-06 顺丰科技有限公司 Database key generation method, device, equipment and its storage medium
CN108959403A (en) * 2018-06-06 2018-12-07 阿里巴巴集团控股有限公司 A kind of distributed transaction processing method and device
CN112925787A (en) * 2019-12-06 2021-06-08 中国电信股份有限公司 Data processing method, device and computer readable storage medium
CN111125112A (en) * 2019-12-25 2020-05-08 京东数字科技控股有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN113342851A (en) * 2021-05-28 2021-09-03 北京银行股份有限公司 Sequence capacity expansion method
CN113342851B (en) * 2021-05-28 2024-04-02 北京银行股份有限公司 Sequence capacity expansion method

Also Published As

Publication number Publication date
CN102999525B (en) 2016-08-03

Similar Documents

Publication Publication Date Title
CN102999525A (en) Data-table processing method and system
CA3042254C (en) Multiversion concurrency control of database records with uncommitted transactions
US7461066B2 (en) Techniques for sharing persistently stored query results between multiple users
US9239741B2 (en) System and method for flexible distributed massively parallel processing (MPP)
EP2713555B1 (en) Data configuration method and device, and rollback method and device for data configuration
US9710532B2 (en) Method for avoiding conflicts in database cluster
JP3910577B2 (en) Method and apparatus for managing resource contention
CN102103642A (en) OLTP-based data deletion method, system and graphic database sever
CN103559032A (en) Device and method for managing objects of embedded system
CN101442558A (en) Method and system for providing index service for P2SP network
CN111737711B (en) Time-limited user temporary role management method and device
JP2002344486A5 (en)
CN102023899B (en) Multithreaded data synchronization method and device
CN110543606B (en) Method and system for storing genealogy data based on alliance chain
CN102891811A (en) Name service database locking method and exchange
CN101789963A (en) Data synchronization system
CN110535939A (en) A kind of service discovery and method for pre-emptively, device, computer equipment and storage medium
CN114756385B (en) Elastic distributed training method under deep learning scene
WO2023124242A1 (en) Transaction execution method and apparatus, device, and storage medium
JP6912724B2 (en) Information processing program, information processing device and information processing method
CN100386990C (en) Method for implementing intelligent network flexible authority management
US7647296B2 (en) Method for estimating a first access time of transactions accessing a database object
CN102368762A (en) LDAP (Lightweight Directory Access Protocol) user management method and device thereof
CN103763359A (en) Hybrid-structure-based discovery service system building method and query method
CN111831743A (en) Block chain data storage system and method based on cloud storage

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee
CP03 Change of name, title or address

Address after: South South technology twelve road 518000 in Guangdong province Shenzhen City Guangdong streets Nanshan District high tech Industrial Park, No. 2, Kingdee Software Park building A floor 2 South Block

Patentee after: Shenzhen Kingdee middleware Limited by Share Ltd.

Address before: 518057 Guangdong City, Nanshan District province high tech Zone in the middle of the industrial zone of the sparrow tower M-6 building, floor 1, area 3, second, 4

Patentee before: Shenzhen Kingdee Middleware Co., Ltd.

CP01 Change in the name or title of a patent holder

Address after: South South technology twelve road 518000 in Guangdong province Shenzhen City Guangdong streets Nanshan District high tech Industrial Park, No. 2, Kingdee Software Park building A floor 2 South Block

Patentee after: Shenzhen Kingdee tianyanyun computing Co., Ltd.

Address before: South South technology twelve road 518000 in Guangdong province Shenzhen City Guangdong streets Nanshan District high tech Industrial Park, No. 2, Kingdee Software Park building A floor 2 South Block

Patentee before: Shenzhen Kingdee middleware Limited by Share Ltd.

CP01 Change in the name or title of a patent holder