CN102999532B - Method and device for configuring data by users - Google Patents
Method and device for configuring data by users Download PDFInfo
- Publication number
- CN102999532B CN102999532B CN201110277579.2A CN201110277579A CN102999532B CN 102999532 B CN102999532 B CN 102999532B CN 201110277579 A CN201110277579 A CN 201110277579A CN 102999532 B CN102999532 B CN 102999532B
- Authority
- CN
- China
- Prior art keywords
- user
- configuration data
- editor
- data entry
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method and a device for configuring data by users. The method comprises the following steps that the operation user name and the operation type are stored under the corresponding configuration data entry in an editing table according to the operation of a user on the configuration data, the conflict data in the editing table is processed under the condition of data conflict existence in the editing table, and the table name of the editing table and the corresponding operation user are stored in a preset increase table under the condition without data conflict existence in the editing table; and when the user submits the configuration data, the corresponding editing table is obtained according to the increase table and the operation user of the user, and in addition, the modified configuration data by the user, recorded in the editing table is submitted to a on-line table, wherein the on-line table is used for storing efficient configuration data.
Description
Technical field
The present invention relates to field of mobile communication, more particularly to a kind of method and device of user configuring data.
Background technology
At present, it is a data acquisition system by the complete data definition of every set logic in data configuration management system, it is traditional
Data configuration process takes is the mode that locks to whole data acquisition system ensureing the mutual exclusion of data manipulation between multi-user
Property, therefore multi-user is not supported while operating same data acquisition system, and for multi-user's modification of same table cannot be done
Go out to distinguish.In the prior art, for the modification of each user is not cached, the data interlacing of each user's modification is caused
Together, if do not locked to data acquisition system, when the data configuration of a user is submitted to, the modification of all users can all be carried
Intergrowth is imitated.
As the data for needing to configure in data collocation system are on the increase, in actual applications, a data acquisition system
Data be generally all completed by way of multiple person cooperational configure.The configuration mode of single user can affect in initial configuration
The efficiency of data configuration, the configuration in follow-up O&M between each user can interact, and be likely to result in active user and be not intended to
The data that submission comes into force are submitted to by another user and come into force.Meanwhile, available data system is just carried out when data are submitted to data
Conflict checks, and by multi-user carry out amended data by turns can lead to not definitely to judge data should with conflict in where
One number formulary evidence is defined.
At present, for the scheme of multi-user's simultaneously configuration data mainly realizes that user is by compiling using data partition
Volume different database tables, when data are submitted to and come into force and the modification of other users carries out data collision inspection.But, by upper
Technical scheme is stated, in multi-user's configuration data simultaneously, multi-user can not simultaneously configure same data acquisition system, additionally,
Conflict in real time can not be carried out during data edition to check, and can not carry out independent data in units of specified user carrying
Hand over and independent data rewind.
The content of the invention
The present invention provides a kind of method and device of user configuring data, to solve prior art in user configuring data
When multi-user can not simultaneously configure same data acquisition system, in real time conflict can not be carried out in data edition and is checked, and
And can not to specify user in units of carry out the problem that independent data are submitted to.
The present invention provides a kind of method of user configuring data, including:
According to operation of the user to configuration data, corresponding configuration data bar preserves now operation user name in editor's table
And action type, the data in editor's table are deposited in the case of a conflict, the colliding data in editor's table are processed, in volume
In the case of data in volume table are conflict free, the table name of editor's table and corresponding operation user name are stored in the increasing for pre-setting
In scale;
When user submits configuration data to, corresponding editor is obtained according to the operation user name and increment list of the user
Table, and the amended configuration data of the user recorded in editor's table is submitted to into online table, wherein, online table is used to preserve
The configuration data for coming into force.
Present invention also offers a kind of device of user configuring data, including:
First preserving module, for the operation according to user to configuration data, the corresponding configuration data bar in editor's table
Now operation user name and action type are preserved;
Data collision module, deposits in the case of a conflict, to the number of collisions in editor's table for the data in editor's table
According to being processed;
Second preserving module, for the data in editor's table it is conflict free in the case of, will the table name of editor's table and corresponding
Operation user name be stored in the increment list for pre-setting;
Data submit module to, for when user submits configuration data to, according to the operation user name and increment of the user
Table obtains corresponding editor's table, and the amended configuration data of the user recorded in editor's table is submitted to into online table, its
In, online table is used to preserve the configuration data for coming into force.
The present invention has the beneficial effect that:
By the way that data base's allocation list is designed as into two sets of tables of online table and editor's table, wherein, online table and existing data
Allocation list is completely the same, and the table structure of editor's table is transformed completely based on the table structure of existing data configuration table, root
Coming into force by user and by user time for multi-user's configuration data is controlled according to the information of online table, editor's table and increment table record
Tumble flow journey, solve in prior art in user configuring data multi-user can not while configure same data acquisition system,
Conflict in real time can not be carried out during data edition to check, and can not carry out independent data in units of specified user carrying
The problem of friendship, can carry out real-time data collision inspection, simultaneously as have recorded each user in multi-user's configuration data
Operation information, can support to carry out independently coming into force and carrying out the independent rollback of data, Ke Yiqi by user for data by user
To the function of real-time automatically backup data.
Description of the drawings
Fig. 1 is the flow chart of the method for the user configuring data of the embodiment of the present invention;
Fig. 2 is the relation schematic diagram of the online table editor table increment list of the embodiment of the present invention;
Fig. 3 is the detailed process figure of the method for the user configuring data of the embodiment of the present invention;
Fig. 4 is the flow chart that the data collision of the embodiment of the present invention is checked;
Fig. 5 is the structural representation of the device of the user configuring data of the embodiment of the present invention.
Specific embodiment
In in order to solve prior art in user configuring data multi-user can not while configure same data acquisition system,
Conflict in real time can not be carried out in data edition to check, and can not carry out independent data in units of specified user
The problem of submission, the invention provides a kind of method and device of user configuring data, exists according to the table structure of data configuration table
Two sets of tables, a set of online table (being represented with O tables below) for being to store the online data for truly coming into force are generated in data base;It is a set of
It is the editor's table (being represented with E tables below) for storing user's off-line editing process data.Increase operation user name in each E table
(CURRENT_USER) attribute column, for representing the user for currently changing the record;Action type is also add in each E table
(OP) attribute column, for representing the operation that user is done to the record, additionally, the technical scheme of the embodiment of the present invention also safeguards
Open increment list (being represented with D tables below) to store user's operation information, wherein, user's operation information includes operation user
(CURRENT_USER) and E tables table name (TABLENAME).Multi-user is controlled by the information of O tables, E tables and D table records to match somebody with somebody
Put the coming into force by user and by user's rollback flow process of data.Below in conjunction with accompanying drawing and embodiment, the present invention is carried out further
Describe in detail.It should be appreciated that specific embodiment described herein is only to explain the present invention, the present invention is not limited.
Embodiment of the method
Embodiments in accordance with the present invention, there is provided a kind of method of user configuring data, below first to present invention enforcement
The design of database table structure in example is described in detail:For all of data configuration table is designed as two sets in data base
Table:A set of online table (O tables) for being to store the online data for truly coming into force, O tables are not applied to user and are operated;A set of is to deposit
Editor's table (E tables) of storage user's off-line editing process data, user can only directly operate the data of E tables.
The table architectural difference of O tables and E tables is to increase by two attribute columns in each E table for preserving user operation process
Information:String is operation user name (CURRENT_USER) attribute column, for the user name that storage operates the record;Another row are
Action type (OP) attribute column, for storing the action type that user is done to the record.For OP attribute columns, three kinds are only existed
Action type:Increase (being represented with A), change (being represented with M), delete (being represented with D).
Except data configuration off-balancesheet, in addition it is also necessary to safeguard an increment list (D tables) store in E tables editor and not
The operation information that submission comes into force, including the table name (TABLENAME) of operation user name (CURRENT_USER) and E tables.
Fig. 1 is the flow chart of the method for the user configuring data of the embodiment of the present invention, as shown in figure 1, according to of the invention real
Applying the method for the user configuring data of example includes following process:
Step 101, according to operation of the user to configuration data, corresponding configuration data bar preserves now operation in E tables
User name and action type, the data in E tables are deposited in the case of a conflict, the colliding data in E tables are processed, in E
In the case of data in table are conflict free, the table name of E tables and corresponding operation user name are stored in the D tables for pre-setting;
Preferably, action type includes:Increase (A), modification (M) and delete (D).
In a step 101, process is carried out to the colliding data in E tables and specifically includes following process:
In the case where same user is to carrying out multi-pass operation with a configuration data entry and causing data collision, if first
A certain bar configuration data entry is performed increases operation, operation of subsequently modifying to the configuration data entry, then will modification
Property synchronization in E tables corresponding configuration data bar now, and by its action type be set to increase;If first to a certain bar
Configuration data entry is performed increases operation, subsequently carries out deletion action to the configuration data entry, then directly delete phase in E tables
The configuration data entry answered;If successively performing modification operation to a certain bar configuration data entry, will accordingly configure in E tables
Action type under Data Entry is set to modification;It is subsequently right if first performing modification operation to a certain bar configuration data entry
The configuration data entry carries out deletion action, then be set to delete by corresponding configuration data bar action type now in E tables
Remove;If first performing deletion action to a certain bar configuration data entry, subsequently increase operation is carried out to the configuration data entry,
Then relatively deleted configuration data entry is different from the configuration data entry for newly increasing and changes configuration data entry, by E
Corresponding configuration data bar action type now is set to modification in table.
In the case where different user is to successively carrying out multi-pass operation with configuration data entry and causing data collision, carry
Show that latter individual operation user configuration data entry is edited and do not submitted to by other operation users to come into force;
A plurality of configuration data entry is carried out in the case that operation causes data collision in different user, if user is repaiied
The configuration data entry cited in configuration data entry for changing is deleted by other users, then point out the user operation failure;
If the configuration data entry cited in the configuration data entry that user is changed is newly increased and do not submitted to by other users
Come into force, then point out the user operation failure;If user deletes the configuration data entry cited in other configurations Data Entry,
And the entitled user of the operation user under other configurations Data Entry, action type are to delete, then by the configuration data bar in E tables
Now action type is set to delete;If user deletes the configuration data entry cited in other configurations Data Entry,
And the entitled empty or other users of the operation user under other configurations Data Entry, then point out the user operation failure.
That is, it is divided into three kinds of scenes during data configuration, without operation conflict, single user operation conflict and multi-user operation
Conflict.
1st, to the process without operation conflict
For user USER A, a record RECORD 1 of E tables is increased, then by the CURRENT_USER of RECORD 1
The value of row is set to USER A, and the value of OP row is set to A;A record RECORD 2 of E tables is have modified, then by RECORD's 2
The value of CURRENT_USER row is set to USER A, and the value of OP row is set to M;A record RECORD 3 of E tables is deleted, then
The value that the CURRENT_USER of RECORD 3 is arranged is set to into USER A, the value of OP row is set to D, and RECORD 3 is not carried out
Delete.
2nd, the process of single user operation conflict
For single user, operation conflict refer to for the same data record of same E tables carried out it is multiple
Operation, including following several scenes:
M after first A, by the property synchronization of M the record is modified to, and OP operators are still A;
D after first A, directly deletes record from E tables;
M after first M, OP operator is still M;
D after first M, OP operator is D;
The difference of A after first D, the record deleted and newly-increased record, using the attribute of the new record for creating as M
Come into force, OP is revised as M.
3rd, the process of multi-user operation conflict
For multi-user, operation conflict includes the operation conflict and the operation conflict of a plurality of record of wall scroll record.Its
In, the operation conflict of wall scroll record refers to that USER A and USER B is successively recorded into edlin to the same of same E tables.It is right
Need to point out mistake in editor's application of latter data record.I.e. if it find that the CURRENT_ in the record in E tables
USER non-NULLs, to suggest that and have other users compiled mistake data to the operation user that apply editing this record
Record, and not yet submission comes into force, and after user's submission can only be waited to come into force, could enter edlin to the data, other numbers
According to can continue editor.The operation conflict of a plurality of record refers to different user when additions and deletions are recorded, and causes the reference between record
The change of relation.Including following several scenes:
USERA increases or changes a record RECORD 1, and record reference RECORD 2, but RECORD 2 is
Jing is deleted by USER B, therefore when data constraint is checked in addition to searching RECORD 2 and whether there is, needs to increase by one
Whether condition, the CURRENT_USER for being just to look for RECORD 2 is empty, if non-NULL and OP row are D, then prompting user, is drawn
Record is deleted by USER B, the modification failures of RECORD 1.
USERA increases or changes a record RECORD 1, and record reference RECORD 2, but RECORD 2 is
It is being increased by USER B and do not submit what is come into force to, therefore whether there is it except searching RECORD 2 when data constraint is checked
Outward, need to increase a condition, whether the CURRENT_USER for being just to look for RECORD2 is empty, if non-NULL and OP row are A,
So point out user, the record of reference is that USER B increase and do not submit to and come into force, the modification failures of RECORD 1.
USER A delete a record RECORD 1, but RECORD 1 is quoted by RECORD 2, if
The CURRENT_USER of RECORD 2 is USER A and OP is D, then allow to delete;If CURRENT_USER is empty or USER
B does not then allow to delete, and RECORD 1 deletes failure.
Step 102, when user submits configuration data to, according to the operation user name and D tables of the user corresponding E is obtained
Table, and the amended configuration data of the user recorded in the E tables is submitted to into O tables, wherein, O tables are for matching somebody with somebody that preservation comes into force
Put data.
Specifically, step 102 includes following process:1st, when user submits configuration data to, obtaining initiation data submission please
The operation user name of the user for asking;2nd, the table of the E table corresponding with operation user name is searched in D tables according to operation user name
Name;3rd, corresponding E tables are obtained according to the table name of E tables, the configuration data entry of the entitled user of operation user are obtained in E tables,
And the record in O tables obtains the configuration data entry of the entitled other users of operation user;4th, the action type in E tables
Indicated operation, the configuration data entry to obtaining carries out merger, and the configuration data after merger is submitted to into O tables.
That is, when data are submitted to, the operation user USER A for initiating data submission request are obtained first, according to user
Name searches the E table lists being related in D tables.Then it is USER that CURRENT_USER is found in these each E tables for changing
The data-base recording of A.For the record that CURRENT_USER is not USERA, those records in corresponding O tables are taken, according to OP
Indicated operation, carries out merger.The process logic of merger is, is exactly directly to increase for operation is increased;Changing operation is exactly
Directly change;Deletion action, just deletes the corresponding record in O tables.Data after merger, are submitted to O tables and come into force.
In a step 102, by the E tables record the amended configuration data of the user be submitted to after O tables, need into
Row is following to be processed:The record that the entitled user of user is operated in D tables is emptied, is deleted and operate in corresponding E tables the entitled use of user
Family and action type are the record deleted, and empty the configuration data bar of the entitled user of user behaviour now is operated in the E tables
Make user name and action type.
That is, if the peration data of USER A is submitted to successfully, it is USER A's to empty CURRENT_USER in D tables
Record, deletes the record that CURRENT_USER in corresponding E tables is that USER A and OP are classified as deletion labelling, then empties corresponding E
CURRENT_USER in table is the attribute column of USER A.If the peration data of USER A submits failure to, failure cause is carried
Show to user.
Preferably, before step 102, following operation is can also carry out, in user's rollback configuration data, according to the use
The operation user name at family and D tables obtain corresponding E tables, and the record in O tables is by corresponding configuration data entry in the E tables
Rollback is carried out, wherein, O tables are used to preserve the configuration data for coming into force;
Specifically include following process:1st, in user's rollback configuration data, obtain and initiate the user's that data rewind is asked
Operation user name;2nd, the operation user name in D tables, searches the table name of the E table corresponding with operation user name;3rd, according to E
The table name of table obtains corresponding E tables, and the configuration data entry of the entitled user of operation user is obtained in E tables, according to what is obtained
The record in operation and O tables indicated by configuration data bar action type now, by corresponding configuration data entry in E tables
Carry out rollback.
That is, before user carries out data submission, the operation of the user can be rolled back to into state before editor.It is first
First according to the operation user name that carry out data rewind for selecting, corresponding E tables list is obtained in D tables, looked in these E tables
The all modifications for looking for the user are recorded.According to the value of these OP row for recording, process respectively:For A operations, the note is deleted
Record;For M operations, the corresponding record of O tables is copied to E tables;For D operations, the attribute of CURRENT USER and OP row is emptied
Value.
Fig. 2 is the relation schematic diagram of the online table editor table increment list of the embodiment of the present invention, as shown in Fig. 2 O tables include
Record 1 and record 2, the value for recording 1 attribute 1 is A2, and the value for recording 2 attribute 1 is B1, and USER A are operated to E tables 1,
Wherein, record 1 and record 2 are modified and deletion action respectively by USER A, and record 3 has carried out addition behaviour by USER B
Make, the table name of E tables 1 and the operation user name of USER B of D table records the operation user name and its modification of USER A and its
The table name of the E tables 1 of modification.USER A carry out data submission, first, according to the record of D tables the E tables 1 of USERA operations are obtained, and
According to operations of the USER A recorded in E tables 1 to record 1 and record 2, merger is carried out, be submitted to O tables and come into force, finally, in O tables 1
Including amended record 1, after submission comes into force, the CURRENT_USER row and OP row of record 1 in E tables 1 are emptied, delete note
The record of USERA is deleted in record 2, D tables.
Below in conjunction with accompanying drawing, the above-mentioned technical proposal of the embodiment of the present invention is described in detail.
Fig. 3 is the detailed process figure of the method for the user configuring data of the embodiment of the present invention, as shown in figure 3, including
It is following to process:
Step 301, user operation E table records preserve operation user and action type;
Step 302, data collision inspection is checked by into step 303;Check not by into step 301;
Step 303, preserves the E tables and operation user profile of change in D tables;
Step 304, according to submitting to into step 306, user-selected number enters step 305 to user-selected number according to rollback;
Step 305, according to the corresponding record of O table rollback E tables, into step 301;
Step 306, is submitted to O tables and comes into force according to the E table records of change;
Step 307, data are submitted to and are successfully entered step 308, and data are submitted to and unsuccessfully enter step 310;
Step 308, to increase in E tables and the data record null clear operation user for changing and action type, to the number deleted
Deleted according to record, into step 309;
Step 309, clears up the operation information of D table current operation users, terminates this configuration flow;
Step 310, submits data to failure reason prompt user, terminates this configuration flow.
Fig. 4 is the flow chart that the data collision of the embodiment of the present invention is checked, as shown in figure 4, including following process:
Step 401, USER A edit data;
Step 402, judges the value of the CURRENT_USER row that target record is arranged, if CURRENT_USER is classified as sky,
Execution step 405, if CURRENT_USER is classified as USERA, execution step 403, if CURRENT_USER is classified as USER
B then execution step 404;
Step 403, according to the algorithmically merger of priority operator, execution step 405;
Step 404, checks the adduction relationship of data record, passes through if checked, execution step 405, otherwise,
Execution step 406;
Step 405, submission is modified to E tables;
Step 406, points out user operation failure cause.
The embodiment of the present invention by the way that data base's allocation list is designed as into two sets of tables of online table and editor's table, wherein, online table
Completely the same with existing data configuration table, the table structure of editor's table is completely based on the table structure of existing data configuration table
Transformed, giving birth to by user for multi-user's configuration data is controlled according to the information of online table, editor's table and increment table record
Effect and by user's rollback flow process, solves in prior art that multi-user can not be while configure same in user configuring data
Data acquisition system, conflict in real time can not be carried out in data edition and is checked, and can not be carried out in units of specified user
Independent data submit the problem with independent data rewind to, can carry out real-time data collision in multi-user's configuration data
Check, simultaneously as have recorded the operation information of each user, can support by user carry out data independently come into force and by with
Family carries out the independent rollback of data, can play the function of real-time automatically backup data.
Device embodiment
Embodiments in accordance with the present invention, there is provided a kind of device of user configuring data, below first to present invention enforcement
The design of database table structure in example is described in detail:For all of data configuration table is designed as two sets in data base
Table:A set of online table (O tables) for being to store the online data for truly coming into force, O tables are not applied to user and are operated;A set of is to deposit
Editor's table (E tables) of storage user's off-line editing process data, user can only directly operate the data of E tables.
The table architectural difference of O tables and E tables is to increase by two attribute columns in each E table for preserving user operation process
Information:String is operation user name (CURRENT_USER) attribute column, for the user name that storage operates the record;Another row are
Action type (OP) attribute column, for storing the action type that user is done to the record.For OP attribute columns, three kinds are only existed
Action type:Increase (being represented with A), change (being represented with M), delete (being represented with D).
Except data configuration off-balancesheet, in addition it is also necessary to safeguard an increment list (D tables) store in E tables editor and not
The operation information that submission comes into force, including the table name (TABLENAME) of operation user name (CURRENT_USER) and E tables.
Fig. 5 is the structural representation of the device of the user configuring data of the embodiment of the present invention, as shown in figure 5, according to this
The device of the user configuring data of bright embodiment includes:First preserving module 50, data collision module 52, the second preserving module
54 and data submit to module 56, the modules of the embodiment of the present invention are described in detail below.
Specifically, the first preserving module 50, for the operation according to user to configuration data, configures accordingly in E tables
Operation user name and action type are preserved under Data Entry;Wherein, action type includes:Increase, change and delete;
Data collision module 52, deposits in the case of a conflict for the data in E tables, and the colliding data in E tables is entered
Row is processed;
Data collision module 52 is specifically included:
First data collision submodule, for causing to carrying out multi-pass operation with a configuration data entry in same user
In the case of data collision, if first a certain bar configuration data entry is performed increasing operation, subsequently to the configuration data bar
Mesh is modified operation, then by the property synchronization of modification, corresponding configuration data bar now, and its action type is set in E tables
It is set to increase;If first a certain bar configuration data entry is performed increases operation, subsequently the configuration data entry is deleted
Division operation, then directly delete corresponding configuration data entry in E tables;If successively performing modification to a certain bar configuration data entry
Operation, then be set to modification by corresponding configuration data bar action type now in E tables;If first to a certain bar configuration data
Entry performs modification operation, subsequently carries out deletion action to the configuration data entry, then by corresponding configuration data bar in E tables
Now action type is set to delete;If first performing deletion action to a certain bar configuration data entry, subsequently this is matched somebody with somebody
Putting Data Entry carries out increase operation, then more deleted configuration data entry is different from the configuration data entry for newly increasing
And configuration data entry is changed, corresponding configuration data bar action type now in E tables is set to into modification;
Second data collision submodule, for carrying out repeatedly to carrying out priority with a configuration data entry in different user
In the case that operation causes data collision, latter individual operation user configuration data entry is pointed out by other operation users
Edit and do not submit to and come into force;
3rd data collision submodule, causes data to be rushed for carrying out operation to a plurality of configuration data entry in different user
In the case of prominent, if the configuration data entry cited in the configuration data entry changed of user is deleted by other users
Remove, then point out the user operation failure;If the configuration data entry cited in the configuration data entry that user is changed be by
It is that other users are newly increased and do not submit to and come into force, then point out user operation failure;If user is deleted by other configurations data
Configuration data entry cited in entry, and the entitled user of the operation user under other configurations Data Entry, action type be
Delete, be then set to the configuration data bar action type now in E tables delete, if user is deleted by other configurations data
Configuration data entry cited in entry, and the entitled empty or other users of the operation user under other configurations Data Entry, then carry
Show the user operation failure.
That is, it is divided into three kinds of scenes during data configuration, without operation conflict, single user operation conflict and multi-user operation
Conflict.
1st, 52 pairs of process without operation conflict of data collision module
For user USER A, a record RECORD 1 of E tables is increased, then by the CURRENT_USER of RECORD 1
The value of row is set to USER A, and the value of OP row is set to A;A record RECORD 2 of E tables is have modified, then by RECORD's 2
The value of CURRENT_USER row is set to USER A, and the value of OP row is set to M;A record RECORD 3 of E tables is deleted, then
The value that the CURRENT_USER of RECORD 3 is arranged is set to into USER A, the value of OP row is set to D, and RECORD 3 is not carried out
Delete.
2nd, the process of the single user operation of data collision module 52 conflict
For single user, operation conflict refer to for the same data record of same E tables carried out it is multiple
Operation, including following several scenes:
M after first A, by the property synchronization of M the record is modified to, and OP operators are still A;
D after first A, directly deletes record from E tables;
M after first M, OP operator is still M;
D after first M, OP operator is D;
The difference of A after first D, the record deleted and newly-increased record, using the attribute of the new record for creating as M
Come into force, OP is revised as M.
3rd, the process of the multi-user operation of data collision module 52 conflict
For multi-user, operation conflict includes the operation conflict and the operation conflict of a plurality of record of wall scroll record.Its
In, the operation conflict of wall scroll record refers to that USER A and USER B is successively recorded into edlin to the same of same E tables.It is right
Need to point out mistake in editor's application of latter data record.I.e. if it find that the CURRENT_ in the record in E tables
USER non-NULLs, to suggest that and have other users compiled mistake data to the operation user that apply editing this record
Record, and not yet submission comes into force, and after user's submission can only be waited to come into force, could enter edlin to the data, other numbers
According to can continue editor.The operation conflict of a plurality of record refers to different user when additions and deletions are recorded, and causes the reference between record
The change of relation.Including following several scenes:
USERA increases or changes a record RECORD 1, and record reference RECORD 2, but RECORD 2 is
Jing is deleted by USER B, therefore when data constraint is checked in addition to searching RECORD 2 and whether there is, needs to increase by one
Whether condition, the CURRENT_USER for being just to look for RECORD 2 is empty, if non-NULL and OP row are D, then prompting user, is drawn
Record is deleted by USER B, the modification failures of RECORD 1.
USERA increases or changes a record RECORD 1, and record reference RECORD 2, but RECORD 2 is
It is being increased by USER B and do not submit what is come into force to, therefore whether there is it except searching RECORD 2 when data constraint is checked
Outward, need to increase a condition, whether the CURRENT_USER for being just to look for RECORD2 is empty, if non-NULL and OP row are A,
So point out user, the record of reference is that USER B increase and do not submit to and come into force, the modification failures of RECORD 1.
USER A delete a record RECORD 1, but RECORD 1 is quoted by RECORD 2, if
The CURRENT_USER of RECORD 2 is USER A and OP is D, then allow to delete;If CURRENT_USER is empty or USER
B does not then allow to delete, and RECORD 1 deletes failure.
Second preserving module 54, for the data in E tables it is conflict free in the case of, by the table name of E tables and corresponding behaviour
During the D tables for pre-setting are stored in as user name;
Data submit module 56 to, for when user submits configuration data to, according to the operation user name and D tables of the user
Corresponding E tables are obtained, and the amended configuration data of the user recorded in the E tables is submitted to into O tables.
Data submit to module 56 specifically for:When user submits configuration data to, the use for initiating data submission request is obtained
The operation user name at family;The table name of the E table corresponding with operation user name is searched in D tables according to operation user name;According to E tables
Table name obtain corresponding E tables, the configuration data entry of the entitled user of operation user is obtained in E tables, and according in O tables
Record obtains the configuration data entry of the entitled other users of operation user;The operation indicated by action type in E tables, it is right
The configuration data entry of acquisition carries out merger, and the configuration data after merger is submitted to into O tables.
That is, data submit module 56 to when data are submitted to, the operation use for initiating data submission request is obtained first
Family USER A, the E table lists being related to are searched according to user name in D tables.Then find in these each E tables for changing
CURRENT_USER is the data-base recording of USER A.For the record that CURRENT_USER is not USER A, corresponding O tables are taken
In those record, according to the operation indicated by OP, carry out merger.The process logic of merger is, is exactly straight for operation is increased
Connect increase;Modification operation is exactly directly modification;Deletion action, just deletes the corresponding record in O tables.Data after merger, carry
It is sent to O tables to come into force.
Preferably, said apparatus also include:Data rewind module, in user's rollback configuration data, according to the use
The operation user name at family and D tables obtain corresponding E tables, and the record in O tables is by corresponding configuration data entry in the E tables
Rollback is carried out, wherein, O tables are used to preserve the configuration data for coming into force;
Data rewind module specifically for:In user's rollback configuration data, the user for initiating data rewind request is obtained
Operation user name;The table name of the E table corresponding with operation user name is searched in D tables according to operation user name;According to E tables
Table name obtains corresponding E tables, and the configuration data entry of the entitled user of operation user is obtained in E tables, according to the configuration for obtaining
The record in the operation indicated by action type and O tables under Data Entry, corresponding configuration data entry in E tables is carried out
Rollback;
That is, data rewind module is before user carries out data submission, the operation of the user can be rolled back to volume
State before volume.First according to the operation user name that carry out data rewind for selecting, corresponding E tables list is obtained in D tables,
The all modifications record of the user is searched in these E tables.According to the value of these OP row for recording, process respectively:For A behaviour
Make, delete the record;For M operations, the corresponding record of O tables is copied to E tables;For D operation, empty CURRENT USER and
The property value of OP row.
Preferably, said apparatus also include:Data empty module, for emptying D tables in operate the entitled user's of user
Record, operates the entitled user of user and action type is the record deleted in the corresponding E tables of deletion, and empties behaviour in the E tables
As the configuration data bar that user name is user operation user name now and action type.
That is, if the peration data of USERA is submitted to successfully, data empty module to be needed to empty in D tables
CURRENT_USER is the record of USER A, and CURRENT_USER is USERA and OP is classified as deletion labelling in the corresponding E tables of deletion
Record, then empty CURRENT_USER in corresponding E tables for USER A attribute column.If the peration data of USER A is carried
Failure is handed over, by failure reason prompt to user.
Fig. 2 is the relation schematic diagram of the online table editor table increment list of the embodiment of the present invention, as shown in Fig. 2 O tables include
Record 1 and record 2, the value for recording 1 attribute 1 is A2, and the value for recording 2 attribute 1 is B1, and USER A are operated to E tables 1,
Wherein, record 1 and record 2 are modified and deletion action respectively by USER A, and record 3 has carried out addition behaviour by USER B
Make, the table name of E tables 1 and the operation user name of USER B of D table records the operation user name and its modification of USER A and its
The table name of the E tables 1 of modification.USER A carry out data submission, first, according to the record of D tables the E tables 1 of USERA operations are obtained, and
According to operations of the USER A recorded in E tables 1 to record 1 and record 2, merger is carried out, be submitted to O tables and come into force, finally, in O tables 1
Including amended record 1, after submission comes into force, the CURRENT_USER row and OP row of record 1 in E tables 1 are emptied, delete note
The record of USERA is deleted in record 2, D tables.
Below in conjunction with accompanying drawing, the above-mentioned technical proposal of the embodiment of the present invention is described in detail.
Fig. 3 is the detailed process figure of the method for the user configuring data of the embodiment of the present invention, as shown in figure 3, including
It is following to process:
Step 301, user operation E table records preserve operation user and action type;
Step 302, data collision inspection is checked by into step 303;Check not by into step 301;
Step 303, preserves the E tables and operation user profile of change in D tables;
Step 304, according to submitting to into step 306, user-selected number enters step 305 to user-selected number according to rollback;
Step 305, according to the corresponding record of O table rollback E tables, into step 301;
Step 306, is submitted to O tables and comes into force according to the E table records of change;
Step 307, data are submitted to and are successfully entered step 308, and data are submitted to and unsuccessfully enter step 310;
Step 308, to increase in E tables and the data record null clear operation user for changing and action type, to the number deleted
Deleted according to record, into step 309;
Step 309, clears up the operation information of D table current operation users, terminates this configuration flow;
Step 310, submits data to failure reason prompt user, terminates this configuration flow.
Fig. 4 is the flow chart that the data collision of the embodiment of the present invention is checked, as shown in figure 4, including following process:
Step 401, USER A edit data;
Step 402, judges the value of the CURRENT_USER row that target record is arranged, if CURRENT_USER is classified as sky,
Execution step 405, if CURRENT_USER is classified as USERA, execution step 403, if CURRENT_USER is classified as USER
B then execution step 404;
Step 403, according to the algorithmically merger of priority operator, execution step 405;
Step 404, checks the adduction relationship of data record, passes through if checked, execution step 405, otherwise,
Execution step 406;
Step 405, submission is modified to E tables;
Step 406, points out user operation failure cause.
The embodiment of the present invention by the way that data base's allocation list is designed as into two sets of tables of online table and editor's table, wherein, online table
Completely the same with existing data configuration table, the table structure of editor's table is completely based on the table structure of existing data configuration table
Transformed, giving birth to by user for multi-user's configuration data is controlled according to the information of online table, editor's table and increment table record
Effect and by user's rollback flow process, solves in prior art that multi-user can not be while configure same in user configuring data
Data acquisition system, conflict in real time can not be carried out in data edition and is checked, and can not be carried out in units of specified user
Independent data submit the problem with independent data rewind to, can carry out real-time data collision in multi-user's configuration data
Check, simultaneously as have recorded the operation information of each user, can support by user carry out data independently come into force and by with
Family carries out the independent rollback of data, can play the function of real-time automatically backup data.
Although being example purpose, the preferred embodiments of the present invention are had been disclosed for, those skilled in the art will recognize
Various improvement, increase and replacement are also possible, therefore, the scope of the present invention should be not limited to above-described embodiment.
Claims (9)
1. a kind of method of user configuring data, it is characterised in that include:
According to operation of the user to configuration data, corresponding configuration data bar preserves now operation user name and behaviour in editor's table
Make type, the data in editor's table are deposited in the case of a conflict, the colliding data in editor's table processed,
In the case of the data edited in table are conflict free, the table name of editor's table and corresponding operation user name are stored in
In the increment list for pre-setting;
The action type includes:Increase, change and delete;
Data in editor's table are deposited in the case of a conflict, and the colliding data in editor's table is carried out to process concrete bag
Include:
In the case where same user is to carrying out multi-pass operation with a configuration data entry and causing data collision, if first to certain
One configuration data entry is performed and increases operation, operation of subsequently modifying to the configuration data entry, then by the category of modification
Property be synchronized in editor's table corresponding configuration data bar now, and by its action type be set to increase;If first to certain
One configuration data entry is performed and increases operation, subsequently carries out deletion action to the configuration data entry, then directly delete institute
State corresponding configuration data entry in editor's table;If modification operation is successively performed to a certain bar configuration data entry, by institute
State corresponding configuration data bar action type now in editor's table and be set to modification;If first to a certain bar configuration data entry
Modification operation is performed, subsequently deletion action is carried out to the configuration data entry, then by corresponding configuration number in editor's table
It is set to delete according to bar action type now;If first deletion action is performed to a certain bar configuration data entry, subsequently to this
Bar configuration data entry carries out increase operation, then more deleted configuration data entry and the configuration data entry for newly increasing
Difference simultaneously changes the configuration data entry, and corresponding configuration data bar action type now in editor's table is set to
Modification;
In the case where different user with a configuration data entry to carrying out successively carrying out multi-pass operation and causing data collision, carry
Show that latter individual operation user configuration data entry is edited and do not submitted to by other operation users to come into force;
A plurality of configuration data entry is carried out in the case that operation causes data collision in different user, if what user was changed
Configuration data entry cited in configuration data entry is deleted by other users, then point out the user operation failure;If
The configuration data entry cited in configuration data entry that user is changed is newly increased and do not submitted to and come into force by other users,
Then point out the user operation failure;If user deletes the configuration data entry cited in other configurations Data Entry, and institute
Entitled user of operation user under other configurations Data Entry, action type are stated to delete, then by editor's table this match somebody with somebody
Put the action type under Data Entry to be set to delete, if user deletes the configuration number cited in other configurations Data Entry
According to entry, and the entitled empty or other users of the operation user under the other configurations Data Entry, then point out the user operation to lose
Lose;
When user submits configuration data to, corresponding editor is obtained according to the operation user name and the increment list of the user
Table, and the amended configuration data of the user recorded in editor's table is submitted to into online table, wherein, the online table is used for
The configuration data that preservation comes into force.
2. the method for claim 1, it is characterised in that before user submits configuration data to, methods described also includes:
In user's rollback configuration data, corresponding editor is obtained according to the operation user name and the increment list of the user
Corresponding configuration data entry in editor's table is carried out rollback by table, the record in online table.
3. method as claimed in claim 2, it is characterised in that in user's rollback configuration data, according to the operation of the user
User name and the increment list obtain corresponding editor's table, and the record in online table will accordingly be configured in editor's table
Data Entry carries out rollback and specifically includes:
In user's rollback configuration data, the operation user name of the user for initiating data rewind request is obtained;
The table name of the editor table corresponding with the operation user name is searched in the increment list according to the operation user name;
Corresponding editor's table is obtained according to the table name of editor's table, in editor's table the entitled user of operation user is obtained
Configuration data entry, operation according to indicated by the configuration data bar action type now for obtaining and described online
Record in table, by corresponding configuration data entry in editor's table rollback is carried out.
4. the method for claim 1, it is characterised in that when user submits configuration data to, according to the operation of the user
User name and the increment list obtain corresponding editor's table, and the amended configuration number of the user that will be recorded in editor's table
Specifically include according to the online table is submitted to:
When user submits configuration data to, the operation user name of the user for initiating data submission request is obtained;
The table name of the editor table corresponding with the operation user name is searched in the increment list according to the operation user name;
Corresponding editor's table is obtained according to the table name of editor's table, in editor's table the entitled user of operation user is obtained
Configuration data entry, and the record in the online table obtains the configuration data bar of the operation entitled other users of user
Mesh;
The operation indicated by the action type in editor's table, the configuration data entry to obtaining is returned
And, and the configuration data after merger is submitted to into the online table.
5. method as claimed in claim 1 or 2, it is characterised in that match somebody with somebody the user recorded in editor's table is amended
Put data to be submitted to after online table, methods described also includes:
The record that the entitled user of user is operated in the increment list is emptied, operation user is entitled in the corresponding editor's table of deletion should
User and action type are the record deleted, and empty the configuration data bar of the entitled user of user is operated in editor's table now
Operation user name and action type.
6. a kind of device of user configuring data, it is characterised in that include:
First preserving module, for the operation according to user to configuration data, corresponding configuration data bar is now in editor's table
Preserve operation user name and action type;
Data collision module, deposits in the case of a conflict for the data in editor's table, to editor's table in rush
Prominent data are processed;
Second preserving module, for it is described editor table in data it is conflict free in the case of, by it is described editor table table name and
Corresponding operation user name is stored in the increment list for pre-setting;
Data submit module to, for when user submits configuration data to, according to the operation user name and the increment of the user
Table obtains corresponding editor's table, and the amended configuration data of the user recorded in editor's table is submitted to into online table, its
In, the online table is used to preserve the configuration data for coming into force;
The action type includes:Increase, change and delete;
The data collision module is specifically included:
First data collision submodule, for causing data to carrying out multi-pass operation with a configuration data entry in same user
In the case of conflict, if first a certain bar configuration data entry is performed increasing operation, subsequently the configuration data entry is entered
Row modification operation, then by corresponding configuration data bar in the property synchronization of modification to editor's table now, and operated class
Type is set to increase;If first a certain bar configuration data entry is performed increases operation, subsequently the configuration data entry is entered
Row deletion action, then directly delete corresponding configuration data entry in editor's table;If successively to a certain bar configuration data
Entry performs modification operation, then corresponding configuration data bar action type now in editor's table is set to into modification;Such as
Fruit first performs modification operation to a certain bar configuration data entry, subsequently carries out deletion action to the configuration data entry, then will
Corresponding configuration data bar action type now is set to delete in editor's table;If first to a certain bar configuration data bar
Mesh performs deletion action, subsequently carries out increase operation to the configuration data entry, then more deleted configuration data entry
It is different from the configuration data entry for newly increasing and change the configuration data entry, will corresponding configuration number in editor's table
Modification is set to according to bar action type now;
Second data collision submodule, for carrying out multi-pass operation to carrying out priority with a configuration data entry in different user
In the case of causing data collision, latter individual operation user configuration data entry is pointed out to be edited by other operation users
And do not submit to and come into force;
3rd data collision submodule, for carrying out operating causing data collision to a plurality of configuration data entry in different user
In the case of, if the configuration data entry cited in the configuration data entry changed of user is deleted by other users,
Point out the user operation failure;If the configuration data entry cited in the configuration data entry that user is changed is used by other
It is that family newly increases and do not submit to and come into force, then point out user operation failure;If user is deleted by other configurations Data Entry institute
Entitled user of operation user, action type under the configuration data entry of reference, and the other configurations Data Entry is to delete
Remove, be then set to the configuration data bar action type now in editor's table delete, if user deletes matched somebody with somebody by other
Put operation user under the configuration data entry cited in Data Entry, and the other configurations Data Entry it is entitled empty or other
User, then point out the user operation failure.
7. device as claimed in claim 6, it is characterised in that described device also includes:
Data rewind module, in user's rollback configuration data, according to the operation user name and the increment of the user
Table obtains corresponding editor's table, and corresponding configuration data entry in editor's table is carried out rollback by the record in online table.
8. device as claimed in claim 7, it is characterised in that
The data rewind module specifically for:In user's rollback configuration data, the user for initiating data rewind request is obtained
Operation user name;The editor corresponding with the operation user name is searched in the increment list according to the operation user name
The table name of table;Corresponding editor's table is obtained according to the table name of editor's table, operation user is obtained in editor's table entitled
The configuration data entry of the user, the operation and institute according to indicated by the configuration data bar for obtaining action type now
The record in online table is stated, corresponding configuration data entry in editor's table is carried out into rollback;
The data submit to module specifically for:When user submits configuration data to, the user for initiating data submission request is obtained
Operation user name;The editor corresponding with the operation user name is searched in the increment list according to the operation user name
The table name of table;Corresponding editor's table is obtained according to the table name of editor's table, operation user is obtained in editor's table entitled
The configuration data entry of the user, and the record in the online table obtains the configuration number of the entitled other users of operation user
According to entry;The operation indicated by the action type in editor's table, the configuration data entry to obtaining is entered
Row merger, and the configuration data after merger is submitted to into the online table.
9. device as claimed in claims 6 or 7, it is characterised in that described device also includes:
Data empty module, for emptying the increment list in operate the record of the entitled user of user, delete corresponding editor
The entitled user of user is operated in table and action type is the record deleted, and empty entitled use of operation user in editor's table
The configuration data bar at family operation user name now and action type.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110277579.2A CN102999532B (en) | 2011-09-19 | 2011-09-19 | Method and device for configuring data by users |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110277579.2A CN102999532B (en) | 2011-09-19 | 2011-09-19 | Method and device for configuring data by users |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102999532A CN102999532A (en) | 2013-03-27 |
CN102999532B true CN102999532B (en) | 2017-05-10 |
Family
ID=47928105
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110277579.2A Active CN102999532B (en) | 2011-09-19 | 2011-09-19 | Method and device for configuring data by users |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102999532B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106354732B (en) * | 2015-07-17 | 2019-07-05 | 中国石油化工股份有限公司 | A kind of off-line data version conflict solution for supporting concurrently to cooperate with |
CN110019254A (en) * | 2017-07-17 | 2019-07-16 | 中兴通讯股份有限公司 | Processing method, device and the computer readable storage medium of planning region increment record |
CN108667682B (en) * | 2018-03-21 | 2020-11-06 | 北京天融信网络安全技术有限公司 | Connection synchronization method, device and medium based on secure gateway deep packet detection |
CN109885422B (en) * | 2018-12-29 | 2024-01-12 | 贝壳技术有限公司 | Data rollback method and device for configuration platform in real estate transaction system |
CN111523291B (en) * | 2020-04-21 | 2023-04-18 | 四川川大智胜软件股份有限公司 | Low-altitude radar multi-seat airspace data editing method |
CN111984893B (en) * | 2020-09-29 | 2023-09-12 | 杭州迪普科技股份有限公司 | System log configuration conflict reminding method, device and system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101896915A (en) * | 2007-12-14 | 2010-11-24 | 微软公司 | Collaborative authoring modes |
CN102016834A (en) * | 2008-04-28 | 2011-04-13 | 微软公司 | Conflict resolution |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8195621B2 (en) * | 2007-11-14 | 2012-06-05 | Moshe Elisha | Database schema management system |
-
2011
- 2011-09-19 CN CN201110277579.2A patent/CN102999532B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101896915A (en) * | 2007-12-14 | 2010-11-24 | 微软公司 | Collaborative authoring modes |
CN102016834A (en) * | 2008-04-28 | 2011-04-13 | 微软公司 | Conflict resolution |
Also Published As
Publication number | Publication date |
---|---|
CN102999532A (en) | 2013-03-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102999532B (en) | Method and device for configuring data by users | |
CN103902702B (en) | A kind of data-storage system and storage method | |
CN107003935A (en) | Optimize database duplicate removal | |
CN104636349B (en) | A kind of index data compression and the method and apparatus of index data search | |
CN103140840B (en) | The method and device of data management | |
CN110018989A (en) | A kind of method and apparatus that snapshot compares | |
CN109299046B (en) | Collaborative editing method based on TCP WebSocket protocol | |
CN102801565B (en) | Method for carrying out centralized management on service configuration in network management system | |
CN104021123A (en) | Method and system for data transfer | |
CN108829651A (en) | A kind of method, apparatus of document treatment, terminal device and storage medium | |
CN106484694A (en) | Full-text search method based on distributed data base and system | |
CN104765910B (en) | A kind of route selection of Duo Hui branches, ranking interaction, scene modeling system and method | |
CN107357630A (en) | A kind of method, apparatus and storage medium for realizing that virtual machine is synchronous | |
CN108776678A (en) | Index creation method and device based on mobile terminal NoSQL databases | |
CN107526746A (en) | The method and apparatus of management document index | |
CN107025279A (en) | The online parallel deployment system and method for SCD file based on database interface layer operation stream | |
CN115329504A (en) | BOM construction method based on complex product structure | |
CN103530067B (en) | A kind of method and apparatus of data manipulation | |
CN108073641A (en) | The method and apparatus for inquiring about tables of data | |
CN107818113A (en) | File access method for determining position and device | |
CN106708713A (en) | Method and device for writing in journal file | |
CN102519476A (en) | Communication regulation treatment method based on composite crossing | |
CN101968747B (en) | Cluster application management system and application management method thereof | |
CN109741820A (en) | Configuration method, device, medical supply and the computer storage medium of medical supply operation pages | |
CN108595482A (en) | A kind of data index method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |