[go: up one dir, main page]

CN102999532B - Method and device for configuring data by users - Google Patents

Method and device for configuring data by users Download PDF

Info

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
data entry
name
editing
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.)
Expired - Fee Related
Application number
CN201110277579.2A
Other languages
Chinese (zh)
Other versions
CN102999532A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201110277579.2A priority Critical patent/CN102999532B/en
Publication of CN102999532A publication Critical patent/CN102999532A/en
Application granted granted Critical
Publication of CN102999532B publication Critical patent/CN102999532B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

本发明公开了一种用户配置数据的方法及装置。该方法包括:根据用户对配置数据的操作,在编辑表中相应的配置数据条目下保存操作用户名和操作类型,在编辑表中的数据存在冲突的情况下,对编辑表中的冲突数据进行处理,在编辑表中的数据无冲突的情况下,将编辑表的表名和相应的操作用户名保存在预先设置的增量表中;在用户提交配置数据时,根据该用户的操作用户名以及增量表获取相应的编辑表,并将该编辑表中记录的该用户修改后的配置数据提交到在线表,其中,在线表用于保存生效的配置数据。

The invention discloses a method and a device for user configuration data. The method includes: according to the user's operation on the configuration data, storing the operating user name and operation type under the corresponding configuration data entry in the editing table, and processing the conflicting data in the editing table when there is a conflict in the data in the editing table , when there is no conflict in the data in the editing table, save the table name of the editing table and the corresponding operation user name in the preset increment table; when the user submits the configuration data, according to the user's operation user name and increment The scale obtains the corresponding editing table, and submits the configuration data modified by the user recorded in the editing table to the online table, wherein the online table is used to save the effective configuration data.

Description

用户配置数据的方法及装置Method and device for user configuration data

技术领域technical field

本发明涉及移动通讯领域,特别是涉及一种用户配置数据的方法及装置。The invention relates to the field of mobile communication, in particular to a method and device for user configuration data.

背景技术Background technique

目前,在数据配置管理系统中,将每套逻辑完整的数据定义为一个数据集合,传统的数据配置过程采取的是对整个数据集合加锁的方式来保证多用户之间数据操作的互斥性,因此不支持多用户同时操作同一个数据集合,并且对于同一个表的多用户修改无法做出区分。在现有技术中,对于每个用户的修改没有进行缓存,导致各个用户修改的数据交织在一起,如果不对数据集合加锁,则一个用户的数据配置提交时,会将所有用户的修改都提交生效。At present, in the data configuration management system, each set of logically complete data is defined as a data set. The traditional data configuration process adopts the method of locking the entire data set to ensure the mutual exclusion of data operations among multiple users. , so it does not support multiple users operating the same data set at the same time, and cannot distinguish between multiple users modifying the same table. In the existing technology, the modification of each user is not cached, resulting in the data modified by each user being intertwined. If the data set is not locked, when a user's data configuration is submitted, all user modifications will be submitted. take effect.

随着数据配置系统的中需要配置的数据不断增多,在实际应用中,一个数据集合的数据通常都是通过多人协作的方式完成配置的。单用户的配置方式在初始配置时会影响数据配置的效率,在后续运维时各用户间的配置会互相影响,可能会造成当前用户不希望提交生效的数据被另一个用户提交生效。同时,现有数据系统在数据提交时才对数据进行冲突检查,而由多用户进行轮番修改后的数据会导致无法确切判断数据应该以冲突中的哪一方数据为准。With the continuous increase of data to be configured in the data configuration system, in practical applications, the data of a data set is usually configured through the cooperation of multiple people. The single-user configuration method will affect the efficiency of data configuration during the initial configuration, and the configurations between users will affect each other during subsequent operation and maintenance, which may cause the data that the current user does not want to submit to take effect to be submitted by another user. At the same time, the existing data system only checks the data for conflicts when the data is submitted, and the data modified by multiple users in turn will make it impossible to determine exactly which party's data in the conflict should prevail.

目前,对于多用户同时配置数据的方案主要是采用数据分区来实现,用户通过编辑不同的数据库表,在数据提交生效时和其他用户的修改进行数据冲突检查。但是,通过上述技术方案,在多用户同时配置数据时,多用户不能够同时配置同一个数据集合,此外,在数据编辑时不能够进行实时的冲突检查,并且不能够以指定用户为单位进行独立的数据提交和独立的数据回滚。At present, the solution for multiple users to configure data at the same time is mainly implemented by data partitioning. Users edit different database tables and check for data conflicts with other users' modifications when the data submission takes effect. However, through the above technical solution, when multiple users configure data at the same time, multiple users cannot configure the same data set at the same time. In addition, real-time conflict checking cannot be performed during data editing, and independent Data commit and independent data rollback.

发明内容Contents of the invention

本发明提供一种用户配置数据的方法及装置,以解决现有技术中在用户配置数据时多用户不能够同时配置同一个数据集合,在数据编辑时不能够进行实时的冲突检查,并且不能够以指定用户为单位进行独立的数据提交的问题。The present invention provides a method and device for user configuration data to solve the problem that in the prior art, when users configure data, multiple users cannot configure the same data set at the same time, and cannot perform real-time conflict checking when editing data, and cannot The problem of independent data submission in units of designated users.

本发明提供一种用户配置数据的方法,包括:The present invention provides a method for user configuration data, including:

根据用户对配置数据的操作,在编辑表中相应的配置数据条目下保存操作用户名和操作类型,在编辑表中的数据存在冲突的情况下,对编辑表中的冲突数据进行处理,在编辑表中的数据无冲突的情况下,将编辑表的表名和相应的操作用户名保存在预先设置的增量表中;According to the user's operation on the configuration data, save the operating user name and operation type under the corresponding configuration data entry in the editing table. If there is a conflict in the data in the editing table, process the conflicting data in the editing table. If there is no conflict in the data in , save the table name of the editing table and the corresponding operating user name in the pre-set incremental table;

在用户提交配置数据时,根据该用户的操作用户名以及增量表获取相应的编辑表,并将该编辑表中记录的该用户修改后的配置数据提交到在线表,其中,在线表用于保存生效的配置数据。When a user submits configuration data, obtain the corresponding editing table according to the user's operating user name and the increment table, and submit the user's modified configuration data recorded in the editing table to the online table, wherein the online table is used for Save the effective configuration data.

本发明还提供了一种用户配置数据的装置,包括:The present invention also provides a device for user configuration data, including:

第一保存模块,用于根据用户对配置数据的操作,在编辑表中相应的配置数据条目下保存操作用户名和操作类型;The first saving module is used to save the operating user name and operation type under the corresponding configuration data entry in the edit table according to the user's operation on the configuration data;

数据冲突模块,用于在编辑表中的数据存在冲突的情况下,对编辑表中的冲突数据进行处理;The data conflict module is used to process the conflicting data in the editing table when the data in the editing table is in conflict;

第二保存模块,用于在编辑表中的数据无冲突的情况下,将编辑表的表名和相应的操作用户名保存在预先设置的增量表中;The second saving module is used to save the table name of the editing table and the corresponding operating user name in the preset incremental table under the condition that the data in the editing table has no conflict;

数据提交模块,用于在用户提交配置数据时,根据该用户的操作用户名以及增量表获取相应的编辑表,并将该编辑表中记录的该用户修改后的配置数据提交到在线表,其中,在线表用于保存生效的配置数据。The data submission module is used to obtain the corresponding editing table according to the user's operating user name and the increment table when the user submits the configuration data, and submit the modified configuration data of the user recorded in the editing table to the online table, Among them, the online table is used to save effective configuration data.

本发明有益效果如下:The beneficial effects of the present invention are as follows:

通过将数据库配置表设计为在线表和编辑表两套表,其中,在线表和现有的数据配置表完全一致,编辑表的表结构完全以现有的数据配置表的表结构为基础进行改造,根据在线表、编辑表以及增量表记录的信息来控制多用户配置数据的按用户生效和按用户回滚流程,解决了现有技术中在用户配置数据时多用户不能够同时配置同一个数据集合,在数据编辑时不能够进行实时的冲突检查,并且不能够以指定用户为单位进行独立的数据提交的问题,能够在多用户配置数据时进行实时的数据冲突检查,同时,由于记录了每个用户的操作信息,可以支持按用户进行数据的独立生效和按用户进行数据的独立回滚,可以起到实时自动备份数据的功能。By designing the database configuration table into two sets of online table and editing table, the online table is completely consistent with the existing data configuration table, and the table structure of the editing table is completely modified based on the table structure of the existing data configuration table According to the information recorded in the online table, edit table and incremental table, the user-by-user validation and user-by-user rollback process of multi-user configuration data is controlled, which solves the problem that multiple users cannot simultaneously configure the same For data collection, real-time conflict checking cannot be performed during data editing, and independent data submission cannot be performed in units of specified users. Real-time data conflict checking can be performed when multiple users configure data. At the same time, due to the recorded The operation information of each user can support the independent validation of data by user and the independent rollback of data by user, and can play the function of real-time automatic data backup.

附图说明Description of drawings

图1是本发明实施例的用户配置数据的方法的流程图;Fig. 1 is the flowchart of the method for the user configuration data of the embodiment of the present invention;

图2是本发明实施例的在线表编辑表增量表的关系示意图;Fig. 2 is a schematic diagram of the relationship between the online table editing table increment table of the embodiment of the present invention;

图3是本发明实施例的用户配置数据的方法的详细处理流程图;Fig. 3 is a detailed processing flowchart of a method for configuring data by a user according to an embodiment of the present invention;

图4是本发明实施例的数据冲突检查的流程图;Fig. 4 is the flowchart of the data conflict checking of the embodiment of the present invention;

图5是本发明实施例的用户配置数据的装置的结构示意图。Fig. 5 is a schematic structural diagram of an apparatus for user configuration data according to an embodiment of the present invention.

具体实施方式detailed description

为了解决现有技术中在用户配置数据时多用户不能够同时配置同一个数据集合,在数据编辑时不能够进行实时的冲突检查,并且不能够以指定用户为单位进行独立的数据提交的问题,本发明提供了一种用户配置数据的方法及装置,根据数据配置表的表结构在数据库中生成两套表,一套是存储真实生效的在线数据的在线表(以下用O表来表示);一套是存储用户离线编辑过程数据的编辑表(以下用E表来表示)。在每个E表中增加操作用户名(CURRENT_USER)属性列,用于表示当前修改该记录的用户;在每个E表中还增加了操作类型(OP)属性列,用于表示用户对该记录所做的操作,此外,本发明实施例的技术方案还维护一张增量表(以下用D表表示)来存储用户操作信息,其中,用户操作信息包括操作用户(CURRENT_USER)和E表的表名(TABLENAME)。通过O表、E表和D表记录的信息来控制多用户配置数据的按用户生效和按用户回滚流程。以下结合附图以及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不限定本发明。In order to solve the problems in the prior art that multiple users cannot configure the same data set at the same time when users configure data, real-time conflict checking cannot be performed during data editing, and independent data submission cannot be performed in units of designated users, The present invention provides a method and device for user configuration data. According to the table structure of the data configuration table, two sets of tables are generated in the database, one set is an online table for storing real and effective online data (hereinafter represented by O table); One set is an edit table (represented by E table hereinafter) for storing user offline editing process data. Add operation user name (CURRENT_USER) attribute column in each E table to indicate the user currently modifying the record; also increase operation type (OP) attribute column in each E table to indicate that the user has changed the record The operation done, in addition, the technical scheme of the embodiment of the present invention also maintains an incremental table (represented by D table below) to store user operation information, wherein, user operation information includes the table name of operation user (CURRENT_USER) and E table ( TABLENAME). Use the information recorded in O table, E table, and D table to control the user-by-user validation and user-by-user rollback process of multi-user configuration data. The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

方法实施例method embodiment

根据本发明的实施例,提供了一种用户配置数据的方法,以下首先对本发明实施例中数据库表结构的设计进行详细的说明:对于所有的数据配置表在数据库中设计为两套表:一套是存储真实生效的在线数据的在线表(O表),O表不提供给用户进行操作;一套是存储用户离线编辑过程数据的编辑表(E表),用户只能直接操作E表的数据。According to the embodiment of the present invention, a kind of method of user's configuration data is provided, below at first the design of database table structure in the embodiment of the present invention is described in detail: for all data configuration tables are designed as two sets of tables in the database: one One set is an online table (O table) that stores real and effective online data. The O table is not provided for users to operate; the other set is an edit table (E table) that stores the user's offline editing process data. Users can only directly operate the E table. data.

O表和E表的表结构差异在于每个E表中会增加两个属性列用来保存用户操作过程信息:一列是操作用户名(CURRENT_USER)属性列,用于存储操作该记录的用户名;另一列是操作类型(OP)属性列,用于存储用户对该记录所做的操作类型。对于OP属性列,只存在三种操作类型:增加(用A表示),修改(用M表示),删除(用D表示)。The table structure difference between the O table and the E table is that each E table will add two attribute columns to store user operation process information: one column is the operation user name (CURRENT_USER) attribute column, which is used to store the user name for operating the record; The other column is the operation type (OP) attribute column, which is used to store the type of operation the user has performed on the record. For the OP attribute column, there are only three operation types: add (represented by A), modify (represented by M), and delete (represented by D).

除了数据配置表外,还需要维护一张增量表(D表),来存储已经在E表中编辑而未提交生效的操作信息,包括操作用户名(CURRENT_USER)和E表的表名(TABLENAME)。In addition to the data configuration table, it is also necessary to maintain an incremental table (D table) to store the operation information that has been edited in the E table but not submitted to take effect, including the operating user name (CURRENT_USER) and the table name of the E table (TABLENAME).

图1是本发明实施例的用户配置数据的方法的流程图,如图1所示,根据本发明实施例的用户配置数据的方法包括如下处理:Fig. 1 is the flow chart of the method for the user configuration data of the embodiment of the present invention, as shown in Fig. 1, the method for the user configuration data according to the embodiment of the present invention includes the following processing:

步骤101,根据用户对配置数据的操作,在E表中相应的配置数据条目下保存操作用户名和操作类型,在E表中的数据存在冲突的情况下,对E表中的冲突数据进行处理,在E表中的数据无冲突的情况下,将E表的表名和相应的操作用户名保存在预先设置的D表中;优选地,操作类型包括:增加(A)、修改(M)、以及删除(D)。Step 101, according to the user's operation on the configuration data, save the operating user name and operation type under the corresponding configuration data entry in the E table, and in the case of conflicting data in the E table, process the conflicting data in the E table, In the case that the data in the E table has no conflict, the table name of the E table and the corresponding operation user name are stored in the preset D table; preferably, the operation type includes: increase (A), modification (M), and delete (D).

在步骤101中,对E表中的冲突数据进行处理具体包括如下处理:In step 101, processing the conflicting data in the E table specifically includes the following processing:

在同一用户对用一条配置数据条目进行多次操作导致数据冲突的情况下,如果先对某一条配置数据条目执行增加操作,随后对该条配置数据条目进行修改操作,则将修改的属性同步到E表中相应的配置数据条目下,并将其操作类型设置为增加;如果先对某一条配置数据条目执行增加操作,随后对该条配置数据条目进行删除操作,则直接删除E表中相应的配置数据条目;如果先后对某一条配置数据条目执行修改操作,则将E表中相应的配置数据条目下的操作类型设置为修改;如果先对某一条配置数据条目执行修改操作,随后对该条配置数据条目进行删除操作,则将E表中相应的配置数据条目下的操作类型设置为删除;如果先对某一条配置数据条目执行删除操作,随后对该条配置数据条目进行增加操作,则比较已删除的配置数据条目与新增加的配置数据条目的不同并修改配置数据条目,将E表中相应的配置数据条目下的操作类型设置为修改。In the case that the same user performs multiple operations on a configuration data entry, resulting in data conflicts, if the add operation is performed on a configuration data entry first, and then the configuration data entry is modified, the modified attributes will be synchronized to Under the corresponding configuration data entry in the E table, and set its operation type to add; if you perform an add operation on a configuration data entry first, and then delete the configuration data entry, the corresponding configuration data entry in the E table will be directly deleted. Configuration data entry; if modifying a certain configuration data entry one after another, set the operation type under the corresponding configuration data entry in Table E to modify; if modifying a certain configuration data entry first, then To delete a configuration data entry, set the operation type under the corresponding configuration data entry in Table E to delete; if a configuration data entry is deleted first, and then the configuration data entry is added, then compare The deleted configuration data entry is different from the newly added configuration data entry and to modify the configuration data entry, set the operation type under the corresponding configuration data entry in Table E to modify.

在不同用户对用一条配置数据条目先后进行多次操作导致数据冲突的情况下,提示后一个操作用户该条配置数据条目已经被其他操作用户编辑并且未提交生效;In the case that different users perform multiple operations on a configuration data item successively, resulting in a data conflict, the next operating user is prompted that the configuration data item has been edited by other operating users and has not been submitted to take effect;

在不同用户对多条配置数据条目进行操作导致数据冲突的情况下,如果用户所修改的配置数据条目所引用的配置数据条目已经被其他用户删除,则提示该用户操作失败;如果用户所修改的配置数据条目所引用的配置数据条目是被其他用户新增加的且未提交生效,则提示该用户操作失败;如果用户删除被其他配置数据条目所引用的配置数据条目,且其他配置数据条目下的操作用户名为该用户、操作类型为删除,则将E表中该配置数据条目下的操作类型设置为删除;如果用户删除被其他配置数据条目所引用的配置数据条目,且其他配置数据条目下的操作用户名为空或其他用户,则提示该用户操作失败。In the case that different users operate on multiple configuration data entries, resulting in data conflicts, if the configuration data entry referenced by the configuration data entry modified by the user has been deleted by other users, the user will be prompted to fail the operation; The configuration data entry referenced by the configuration data entry is newly added by other users and has not been submitted to take effect, and the user will be prompted that the operation failed; if the user deletes the configuration data entry referenced by other configuration data entries, and the If the operating user name is the user and the operation type is delete, then set the operation type under the configuration data entry in Table E to delete; if the user deletes the configuration data entry referenced by other configuration data entries, and the If the user name of the operation is empty or other users, the user will be prompted that the operation failed.

也就是说,数据配置时分为三种场景,无操作冲突、单用户操作冲突和多用户操作冲突。That is to say, data configuration is divided into three scenarios, no operation conflict, single user operation conflict and multi-user operation conflict.

1、对无操作冲突的处理1. Handling of no-operation conflicts

对于用户USER A,增加了E表的一条记录RECORD 1,则将RECORD 1的CURRENT_USER列的值设置为USER A,OP列的值设置为A;修改了E表的一条记录RECORD 2,则将RECORD 2的CURRENT_USER列的值设置为USER A,OP列的值设置为M;删除了E表的一条记录RECORD 3,则将RECORD 3的CURRENT_USER列的值设置为USER A,OP列的值设置为D,而RECORD 3并不进行删除。For user USER A, if a record RECORD 1 in table E is added, the value of the CURRENT_USER column of RECORD 1 is set to USER A, and the value of the OP column is set to A; if a record RECORD 2 of E table is modified, RECORD The value of the CURRENT_USER column of 2 is set to USER A, and the value of the OP column is set to M; if a record RECORD 3 of the E table is deleted, the value of the CURRENT_USER column of RECORD 3 is set to USER A, and the value of the OP column is set to D , while RECORD 3 does not delete.

2、单用户操作冲突的处理2. Handling of single-user operation conflicts

对于单用户而言,操作冲突是指对于同一个E表的同一条数据记录进行了多次的操作,包括如下几种场景:For a single user, an operation conflict refers to multiple operations on the same data record in the same E table, including the following scenarios:

先A后M,将M的属性同步修改到该条记录,OP操作符仍为A;First A and then M, modify the attributes of M to this record synchronously, and the OP operator is still A;

先A后D,直接将记录从E表中删除;First A and then D, directly delete the record from E table;

先M后M,OP操作符仍为M;First M and then M, the OP operator is still M;

先M后D,OP操作符为D;M first and then D, the OP operator is D;

先D后A,比较已经删除的记录和新增的记录的不同,把新创建的记录的属性作为M生效,OP修改为M。First D and then A, compare the difference between the deleted record and the newly added record, make the attribute of the newly created record effective as M, and modify the OP to M.

3、多用户操作冲突的处理3. Handling of multi-user operation conflicts

对于多用户而言,操作冲突包括单条记录的操作冲突和多条记录的操作冲突。其中,单条记录的操作冲突是指USER A和USER B先后对同一个E表的同一条记录进行编辑。对于后一个数据记录的编辑申请需要提示错误。即如果发现E表中的该记录中的CURRENT_USER已经非空,就提示给要申请编辑这条记录的操作用户有其他用户已经编辑过该条数据记录,并且尚未提交生效,只能等该用户提交生效之后,才能对该条数据进行编辑,其他数据可以继续编辑。多条记录的操作冲突是指不同用户在增删记录时,引起了记录间的引用关系的变更。包括如下几种场景:For multiple users, operation conflicts include operation conflicts of a single record and operation conflicts of multiple records. Among them, the operation conflict of a single record means that USER A and USER B successively edit the same record of the same E table. For the editing application of the latter data record, an error should be prompted. That is, if it is found that the CURRENT_USER in the record in the E table is not empty, it will prompt the operating user who wants to apply to edit this record that other users have edited the data record and have not yet submitted it to take effect, and can only wait for the user to submit After it takes effect, the data can be edited, and other data can continue to be edited. The operation conflict of multiple records refers to the change of the reference relationship between records when different users add or delete records. Including the following scenarios:

USERA增加或修改一条记录RECORD 1,而该记录引用了RECORD 2,但是RECORD 2已经被USER B删除,因此在数据约束检查时除了查找RECORD 2是否存在之外,需要增加一个条件,就是查找RECORD 2的CURRENT_USER是否为空,如果非空且OP列是D,那么提示用户,引用的记录已经被USER B删除,RECORD 1修改失败。USERA adds or modifies a record RECORD 1, which refers to RECORD 2, but RECORD 2 has been deleted by USER B. Therefore, in addition to checking whether RECORD 2 exists, a condition needs to be added during the data constraint check, which is to find RECORD 2 Whether the CURRENT_USER is empty, if it is not empty and the OP column is D, then the user will be prompted that the referenced record has been deleted by USER B, and the modification of RECORD 1 failed.

USERA增加或修改一条记录RECORD 1,而该记录引用了RECORD 2,但是RECORD 2是被USER B增加的并且未提交生效的,因此在数据约束检查时除了查找RECORD 2是否存在之外,需要增加一个条件,就是查找RECORD2的CURRENT_USER是否为空,如果非空且OP列是A,那么提示用户,引用的记录是USER B增加且未提交生效的,RECORD 1修改失败。USERA adds or modifies a record RECORD 1, which references RECORD 2, but RECORD 2 is added by USER B and has not been submitted to take effect. Therefore, in addition to finding whether RECORD 2 exists during data constraint checking, it is necessary to add a The condition is to check whether the CURRENT_USER of RECORD2 is empty. If it is not empty and the OP column is A, then the user is prompted that the referenced record was added by USER B and has not been submitted to take effect, and the modification of RECORD 1 fails.

USER A删除了一条记录RECORD 1,但是RECORD 1是被RECORD 2引用的,如果RECORD 2的CURRENT_USER为USER A并且OP为D,则允许删除;如果CURRENT_USER为空或USERB则不允许删除,RECORD 1删除失败。USER A deletes a record RECORD 1, but RECORD 1 is referenced by RECORD 2. If the CURRENT_USER of RECORD 2 is USER A and OP is D, the deletion is allowed; if CURRENT_USER is empty or USERB is not allowed to delete, RECORD 1 is deleted fail.

步骤102,在用户提交配置数据时,根据该用户的操作用户名以及D表获取相应的E表,并将该E表中记录的该用户修改后的配置数据提交到O表,其中,O表用于保存生效的配置数据。Step 102, when the user submits the configuration data, obtain the corresponding E table according to the user's operating user name and the D table, and submit the modified configuration data of the user recorded in the E table to the O table, wherein the O table Used to save effective configuration data.

具体地,步骤102包括如下处理:1、在用户提交配置数据时,获取发起数据提交请求的用户的操作用户名;2、根据操作用户名在D表中查找与操作用户名相对应的E表的表名;3、根据E表的表名获取相应的E表,在E表中获取操作用户名为该用户的配置数据条目,并根据O表中的记录获取操作用户名为其他用户的配置数据条目;4、根据E表中的操作类型所指示的操作,对获取的配置数据条目进行归并,并将归并后的配置数据提交到O表。Specifically, step 102 includes the following processing: 1. When the user submits the configuration data, obtain the user's operating user name who initiates the data submission request; 2. Search the E table corresponding to the operating user name in the D table according to the operating user name 3. Obtain the corresponding E table according to the table name of the E table, obtain the configuration data entry of the operating user named the user in the E table, and obtain the configuration of the operating user named other users according to the records in the O table Data entry; 4. Merge the obtained configuration data entries according to the operation indicated by the operation type in the E table, and submit the merged configuration data to the O table.

也就是说,数据提交时,首先获取发起数据提交请求的操作用户USER A,根据用户名在D表中查找涉及到的E表列表。然后在这些变化的每个E表中寻找CURRENT_USER为USERA的数据库记录。对于CURRENT_USER不是USERA的记录,取对应的O表中的那些记录,按照OP所指示的操作,进行归并。归并的处理逻辑是,对于增加操作就是直接增加;修改操作就是直接修改;删除操作,就把O表中的对应记录删除。归并后的数据,提交到O表生效。That is to say, when submitting data, first obtain the operating user USER A who initiates the data submission request, and look up the list of E tables involved in D table according to the user name. Then look for the database record whose CURRENT_USER is USERA in each E table of these changes. For the records whose CURRENT_USER is not USERA, take those records in the corresponding O table, and merge them according to the operation indicated by the OP. The processing logic of merging is that for adding operations, it is directly adding; for modifying operations, it is directly modifying; for deleting operations, the corresponding records in the O table are deleted. The merged data will be submitted to Form O to take effect.

在步骤102中,将该E表中记录的该用户修改后的配置数据提交到O表之后,需要进行如下处理:清空D表中操作用户名为该用户的记录,删除相应的E表中操作用户名为该用户且操作类型为删除的记录,并清空该E表中操作用户名为该用户的配置数据条目下的操作用户名和操作类型。In step 102, after submitting the modified configuration data of the user recorded in the E table to the O table, the following processing needs to be performed: clear the record of the user whose name is the operating user in the D table, and delete the corresponding operation in the E table. The user name is the record of the user and the operation type is delete, and the operation user name and operation type under the configuration data entry of the operation user name in the E table are cleared.

也就是说,如果USER A的操作数据提交成功,清空D表中CURRENT_USER为USER A的记录,删除相应的E表中CURRENT_USER为USER A且OP列为删除标记的记录,然后清空相应E表中的CURRENT_USER为USER A的属性列。如果USER A的操作数据提交失败,将失败原因提示给用户。That is to say, if the operation data of USER A is successfully submitted, clear the records in table D where CURRENT_USER is USER A, delete the corresponding records in table E where CURRENT_USER is USER A and the OP column is the deletion mark, and then clear the records in the corresponding table E CURRENT_USER is the attribute column of USER A. If the operation data submission of USER A fails, the failure reason will be prompted to the user.

优选地,在步骤102之前,还可以执行如下操作,在用户回滚配置数据时,根据该用户的操作用户名以及D表获取相应的E表,根据O表中的记录将该E表中相应的配置数据条目进行回滚,其中,O表用于保存生效的配置数据;Preferably, before step 102, the following operations can also be performed. When the user rolls back the configuration data, the corresponding E table is obtained according to the user's operating user name and the D table, and the corresponding E table is obtained according to the records in the O table. The configuration data entry is rolled back, and the O table is used to save the effective configuration data;

具体包括如下处理:1、在用户回滚配置数据时,获取发起数据回滚请求的用户的操作用户名;2、根据D表中的操作用户名,查找与操作用户名相对应的E表的表名;3、根据E表的表名获取相应的E表,在E表中获取操作用户名为该用户的配置数据条目,根据获取的配置数据条目下的操作类型所指示的操作以及O表中的记录,将E表中相应的配置数据条目进行回滚。It specifically includes the following processing: 1. When the user rolls back the configuration data, obtain the operation user name of the user who initiates the data rollback request; 2. According to the operation user name in the D table, search for the E table corresponding to the operation user name Table name; 3. Obtain the corresponding E table according to the table name of the E table, obtain the configuration data entry whose operating user name is the user in the E table, and obtain the operation indicated by the operation type under the obtained configuration data entry and the O table In the record, roll back the corresponding configuration data entry in the E table.

也就是说,在用户进行数据提交前,都可以将该用户的操作回滚到编辑前状态。首先根据选择的要进行数据回滚的操作用户名,到D表中获取相应的E表列表,在这些E表中查找该用户的所有修改记录。根据这些记录的OP列的取值,分别处理:对于A操作,删除该记录;对于M操作,将O表的对应记录拷贝到E表;对于D操作,清空CURRENT USER和OP列的属性值。That is to say, before the user submits the data, the user's operation can be rolled back to the state before editing. Firstly, according to the selected operating user name for data rollback, go to the D table to obtain the corresponding E table list, and find all the modification records of the user in these E tables. According to the value of the OP column of these records, process respectively: for A operation, delete the record; for M operation, copy the corresponding record of O table to E table; for D operation, clear the attribute values of CURRENT USER and OP column.

图2是本发明实施例的在线表编辑表增量表的关系示意图,如图2所示,O表中包括记录1和记录2,记录1的属性1的值为A2,记录2的属性1的值为B1,USER A对E表1进行操作,其中,记录1和记录2分别被USER A进行了修改和删除操作,记录3被USER B进行了添加操作,D表记录了USER A的操作用户名及其修改的E表1的表名、以及USER B的操作用户名及其修改的E表1的表名。USER A进行数据提交,首先,根据D表的记录获取USERA操作的E表1,并根据E表1中记录的USER A对记录1和记录2的操作,进行归并,提交到O表生效,最后,O表1中包括修改后的记录1,在提交生效后,将E表1中记录1的CURRENT_USER列和OP列清空,删除记录2,D表中删除USERA的记录。Fig. 2 is the schematic diagram of the relation of the online table editing table incremental table of the embodiment of the present invention, as shown in Fig. 2, comprise record 1 and record 2 in the O table, the value of the attribute 1 of record 1 is A2, the attribute 1 of record 2 The value is B1, USER A operates on E table 1, among which, record 1 and record 2 are respectively modified and deleted by USER A, record 3 is added by USER B, and table D records the operation of USER A The user name and its modified table name of E table 1, and the operating user name of USER B and its modified table name of E table 1. USER A submits data. First, obtain the E table 1 operated by USERA according to the records in D table, and merge the operations of record 1 and record 2 according to the records of USER A in E table 1, and submit them to O table to take effect, and finally , O table 1 includes the modified record 1. After the submission takes effect, clear the CURRENT_USER column and OP column of record 1 in E table 1, delete record 2, and delete the USERA record in D table.

以下结合附图,对本发明实施例的上述技术方案进行详细说明。The technical solutions of the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.

图3是本发明实施例的用户配置数据的方法的详细处理流程图,如图3所示,包括如下处理:Fig. 3 is a detailed processing flowchart of the method for user configuration data in an embodiment of the present invention, as shown in Fig. 3 , including the following processing:

步骤301,用户操作E表记录,保存操作用户及操作类型;Step 301, user operation E table record, save the operating user and operation type;

步骤302,数据冲突检查,检查通过进入步骤303;检查不通过进入步骤301;Step 302, data conflict check, if the check is passed, go to step 303; if the check is not passed, go to step 301;

步骤303,在D表中保存变化的E表及操作用户信息;Step 303, saving the changed E-list and operating user information in the D-list;

步骤304,用户选择数据提交进入步骤306,用户选择数据回滚进入步骤305;Step 304, the user selects data submission to enter step 306, and the user selects data rollback to enter step 305;

步骤305,根据O表回滚E表的对应记录,进入步骤301;Step 305, roll back the corresponding record of E table according to O table, enter step 301;

步骤306,根据变化的E表记录提交到O表生效;Step 306, according to the changed E table records submitted to O table to take effect;

步骤307,数据提交成功进入步骤308,数据提交失败进入步骤310;Step 307, if the data submission is successful, go to step 308, if the data submission fails, go to step 310;

步骤308,对E表中增加和修改的数据记录清空操作用户及操作类型,对删除的数据记录进行删除,进入步骤309;Step 308, clear the operation user and operation type for the data records added and modified in the E table, delete the deleted data records, and enter step 309;

步骤309,清理D表当前操作用户的操作信息,结束本次配置流程;Step 309, clean up the operation information of the current operating user in table D, and end this configuration process;

步骤310,将数据提交失败原因提示用户,结束本次配置流程。Step 310, prompting the user of the reason for the failure of data submission, and ending the configuration process.

图4是本发明实施例的数据冲突检查的流程图,如图4所示,包括如下处理:Fig. 4 is the flow chart of the data conflict check of the embodiment of the present invention, as shown in Fig. 4, comprises following processing:

步骤401,USER A编辑数据;Step 401, USER A edits data;

步骤402,判断目标记录列的CURRENT_USER列的值,如果CURRENT_USER列为空,则执行步骤405,如果CURRENT_USER列为USERA,则执行步骤403,如果CURRENT_USER列为USERB则执行步骤404;Step 402, determine the value of the CURRENT_USER column of the target record column, if the CURRENT_USER column is empty, then perform step 405, if the CURRENT_USER column is USERA, then perform step 403, if the CURRENT_USER column is USERB, then perform step 404;

步骤403,根据先后操作符按算法归并,执行步骤405;Step 403, merge according to the algorithm according to the sequence operator, and execute step 405;

步骤404,对数据记录的引用关系进行检查,如果检查通过,则执行步骤405,否则,执行步骤406;Step 404, check the reference relationship of the data record, if the check is passed, then execute step 405, otherwise, execute step 406;

步骤405,提交修改到E表;Step 405, submit the modification to Form E;

步骤406,提示用户操作失败原因。In step 406, the user is prompted about the reason for the operation failure.

本发明实施例通过将数据库配置表设计为在线表和编辑表两套表,其中,在线表和现有的数据配置表完全一致,编辑表的表结构完全以现有的数据配置表的表结构为基础进行改造,根据在线表、编辑表以及增量表记录的信息来控制多用户配置数据的按用户生效和按用户回滚流程,解决了现有技术中在用户配置数据时多用户不能够同时配置同一个数据集合,在数据编辑时不能够进行实时的冲突检查,并且不能够以指定用户为单位进行独立的数据提交和独立的数据回滚的问题,能够在多用户配置数据时进行实时的数据冲突检查,同时,由于记录了每个用户的操作信息,可以支持按用户进行数据的独立生效和按用户进行数据的独立回滚,可以起到实时自动备份数据的功能。In the embodiment of the present invention, the database configuration table is designed as two sets of tables, the online table and the editing table, wherein the online table is completely consistent with the existing data configuration table, and the table structure of the editing table is completely based on the table structure of the existing data configuration table Based on the transformation, according to the information recorded in the online table, edit table and incremental table to control the user-by-user and user-by-user rollback process of multi-user configuration data, it solves the inability of multi-users to configure data in the prior art. Configure the same data set at the same time. Real-time conflict checking cannot be performed during data editing, and independent data submission and independent data rollback cannot be performed in units of specified users. At the same time, since the operation information of each user is recorded, it can support independent validation of data by user and independent rollback of data by user, and can play the function of real-time automatic data backup.

装置实施例Device embodiment

根据本发明的实施例,提供了一种用户配置数据的装置,以下首先对本发明实施例中数据库表结构的设计进行详细的说明:对于所有的数据配置表在数据库中设计为两套表:一套是存储真实生效的在线数据的在线表(O表),O表不提供给用户进行操作;一套是存储用户离线编辑过程数据的编辑表(E表),用户只能直接操作E表的数据。According to the embodiment of the present invention, a kind of device of user configuration data is provided, below at first the design of the database table structure in the embodiment of the present invention is described in detail: for all data configuration tables are designed as two sets of tables in the database: one One set is an online table (O table) that stores real and effective online data. The O table is not provided for users to operate; the other set is an edit table (E table) that stores the user's offline editing process data. Users can only directly operate the E table. data.

O表和E表的表结构差异在于每个E表中会增加两个属性列用来保存用户操作过程信息:一列是操作用户名(CURRENT_USER)属性列,用于存储操作该记录的用户名;另一列是操作类型(OP)属性列,用于存储用户对该记录所做的操作类型。对于OP属性列,只存在三种操作类型:增加(用A表示),修改(用M表示),删除(用D表示)。The table structure difference between the O table and the E table is that each E table will add two attribute columns to store user operation process information: one column is the operation user name (CURRENT_USER) attribute column, which is used to store the user name for operating the record; The other column is the operation type (OP) attribute column, which is used to store the type of operation the user has performed on the record. For the OP attribute column, there are only three operation types: add (represented by A), modify (represented by M), and delete (represented by D).

除了数据配置表外,还需要维护一张增量表(D表),来存储已经在E表中编辑而未提交生效的操作信息,包括操作用户名(CURRENT_USER)和E表的表名(TABLENAME)。In addition to the data configuration table, it is also necessary to maintain an incremental table (D table) to store the operation information that has been edited in the E table but not submitted to take effect, including the operating user name (CURRENT_USER) and the table name of the E table (TABLENAME).

图5是本发明实施例的用户配置数据的装置的结构示意图,如图5所示,根据本发明实施例的用户配置数据的装置包括:第一保存模块50、数据冲突模块52、第二保存模块54、以及数据提交模块56,以下对本发明实施例的各个模块进行详细的说明。Fig. 5 is a schematic structural diagram of a device for user configuration data according to an embodiment of the present invention. As shown in Fig. 5, the device for user configuration data according to an embodiment of the present invention includes: a first storage module 50, a data conflict module 52, a second storage module The module 54 and the data submitting module 56, each module of the embodiment of the present invention will be described in detail below.

具体地,第一保存模块50,用于根据用户对配置数据的操作,在E表中相应的配置数据条目下保存操作用户名和操作类型;其中,操作类型包括:增加、修改、以及删除;Specifically, the first saving module 50 is used to save the operating user name and operation type under the corresponding configuration data entry in the E table according to the user's operation on the configuration data; wherein, the operation type includes: adding, modifying, and deleting;

数据冲突模块52,用于在E表中的数据存在冲突的情况下,对E表中的冲突数据进行处理;A data conflict module 52, used for processing the conflicting data in the E table when the data in the E table conflicts;

数据冲突模块52具体包括:The data conflict module 52 specifically includes:

第一数据冲突子模块,用于在同一用户对用一条配置数据条目进行多次操作导致数据冲突的情况下,如果先对某一条配置数据条目执行增加操作,随后对该条配置数据条目进行修改操作,则将修改的属性同步到E表中相应的配置数据条目下,并将其操作类型设置为增加;如果先对某一条配置数据条目执行增加操作,随后对该条配置数据条目进行删除操作,则直接删除E表中相应的配置数据条目;如果先后对某一条配置数据条目执行修改操作,则将E表中相应的配置数据条目下的操作类型设置为修改;如果先对某一条配置数据条目执行修改操作,随后对该条配置数据条目进行删除操作,则将E表中相应的配置数据条目下的操作类型设置为删除;如果先对某一条配置数据条目执行删除操作,随后对该条配置数据条目进行增加操作,则比较已删除的配置数据条目与新增加的配置数据条目的不同并修改配置数据条目,将E表中相应的配置数据条目下的操作类型设置为修改;The first data conflict sub-module is used to perform multiple operations on a configuration data entry by the same user, resulting in data conflicts. If an add operation is first performed on a certain configuration data entry, and then the configuration data entry is modified operation, the modified attribute is synchronized to the corresponding configuration data entry in the E table, and its operation type is set to increase; if the addition operation is performed on a certain configuration data entry first, then the configuration data entry is deleted , then directly delete the corresponding configuration data entry in the E table; if modifying a certain configuration data entry successively, set the operation type under the corresponding configuration data entry in the E table to modify; If the entry is modified, and then the configuration data entry is deleted, the operation type under the corresponding configuration data entry in Table E is set to delete; if a configuration data entry is deleted first, then the Configure the data entry to increase the operation, then compare the difference between the deleted configuration data entry and the newly added configuration data entry and modify the configuration data entry, and the operation type under the corresponding configuration data entry in the E table is set to modify;

第二数据冲突子模块,用于在不同用户对用一条配置数据条目进行先后进行多次操作导致数据冲突的情况下,提示后一个操作用户该条配置数据条目已经被其他操作用户编辑并且未提交生效;The second data conflict sub-module is used to remind the next operating user that the configuration data item has been edited by other operating users and has not been submitted when different users perform multiple operations on a configuration data item, resulting in data conflicts take effect;

第三数据冲突子模块,用于在不同用户对多条配置数据条目进行操作导致数据冲突的情况下,如果用户所修改的配置数据条目所引用的配置数据条目已经被其他用户删除,则提示该用户操作失败;如果用户所修改的配置数据条目所引用的配置数据条目是被其他用户新增加的且未提交生效,则提示该用户操作失败;如果用户删除被其他配置数据条目所引用的配置数据条目,且其他配置数据条目下的操作用户名为该用户、操作类型为删除,则将E表中该配置数据条目下的操作类型设置为删除,如果用户删除被其他配置数据条目所引用的配置数据条目,且其他配置数据条目下的操作用户名为空或其他用户,则提示该用户操作失败。The third data conflict sub-module is used to prompt the user if the configuration data item referenced by the configuration data item modified by the user has been deleted by other users when different users operate on multiple configuration data items resulting in a data conflict. The user operation fails; if the configuration data entry referenced by the configuration data entry modified by the user is newly added by other users and has not been submitted to take effect, the user operation failure will be prompted; if the user deletes the configuration data referenced by other configuration data entries entry, and the operating user name under other configuration data entries is the user, and the operation type is delete, then set the operation type under the configuration data entry in E table to delete, if the user deletes the configuration referenced by other configuration data entries data entry, and the operation user name under other configuration data entries is empty or other users, the user will be prompted that the operation failed.

也就是说,数据配置时分为三种场景,无操作冲突、单用户操作冲突和多用户操作冲突。That is to say, data configuration is divided into three scenarios, no operation conflict, single user operation conflict and multi-user operation conflict.

1、数据冲突模块52对无操作冲突的处理1. The processing of no-operation conflicts by the data conflict module 52

对于用户USER A,增加了E表的一条记录RECORD 1,则将RECORD 1的CURRENT_USER列的值设置为USER A,OP列的值设置为A;修改了E表的一条记录RECORD 2,则将RECORD 2的CURRENT_USER列的值设置为USER A,OP列的值设置为M;删除了E表的一条记录RECORD 3,则将RECORD 3的CURRENT_USER列的值设置为USER A,OP列的值设置为D,而RECORD 3并不进行删除。For user USER A, if a record RECORD 1 in table E is added, the value of the CURRENT_USER column of RECORD 1 is set to USER A, and the value of the OP column is set to A; if a record RECORD 2 of E table is modified, RECORD The value of the CURRENT_USER column of 2 is set to USER A, and the value of the OP column is set to M; if a record RECORD 3 of the E table is deleted, the value of the CURRENT_USER column of RECORD 3 is set to USER A, and the value of the OP column is set to D , while RECORD 3 does not delete.

2、数据冲突模块52单用户操作冲突的处理2. The data conflict module 52 handles single-user operation conflicts

对于单用户而言,操作冲突是指对于同一个E表的同一条数据记录进行了多次的操作,包括如下几种场景:For a single user, an operation conflict refers to multiple operations on the same data record in the same E table, including the following scenarios:

先A后M,将M的属性同步修改到该条记录,OP操作符仍为A;First A and then M, modify the attributes of M to this record synchronously, and the OP operator is still A;

先A后D,直接将记录从E表中删除;First A and then D, directly delete the record from E table;

先M后M,OP操作符仍为M;First M and then M, the OP operator is still M;

先M后D,OP操作符为D;M first and then D, the OP operator is D;

先D后A,比较已经删除的记录和新增的记录的不同,把新创建的记录的属性作为M生效,OP修改为M。First D and then A, compare the difference between the deleted record and the newly added record, make the attribute of the newly created record effective as M, and modify the OP to M.

3、数据冲突模块52多用户操作冲突的处理3. The data conflict module 52 handles multi-user operation conflicts

对于多用户而言,操作冲突包括单条记录的操作冲突和多条记录的操作冲突。其中,单条记录的操作冲突是指USER A和USER B先后对同一个E表的同一条记录进行编辑。对于后一个数据记录的编辑申请需要提示错误。即如果发现E表中的该记录中的CURRENT_USER已经非空,就提示给要申请编辑这条记录的操作用户有其他用户已经编辑过该条数据记录,并且尚未提交生效,只能等该用户提交生效之后,才能对该条数据进行编辑,其他数据可以继续编辑。多条记录的操作冲突是指不同用户在增删记录时,引起了记录间的引用关系的变更。包括如下几种场景:For multiple users, operation conflicts include operation conflicts of a single record and operation conflicts of multiple records. Among them, the operation conflict of a single record means that USER A and USER B successively edit the same record of the same E table. For the editing application of the latter data record, an error should be prompted. That is, if it is found that the CURRENT_USER in the record in the E table is not empty, it will prompt the operating user who wants to apply to edit this record that other users have edited the data record and have not yet submitted it to take effect, and can only wait for the user to submit After it takes effect, the data can be edited, and other data can continue to be edited. The operation conflict of multiple records refers to the change of the reference relationship between records when different users add or delete records. Including the following scenarios:

USERA增加或修改一条记录RECORD 1,而该记录引用了RECORD 2,但是RECORD 2已经被USER B删除,因此在数据约束检查时除了查找RECORD 2是否存在之外,需要增加一个条件,就是查找RECORD 2的CURRENT_USER是否为空,如果非空且OP列是D,那么提示用户,引用的记录已经被USER B删除,RECORD 1修改失败。USERA adds or modifies a record RECORD 1, which refers to RECORD 2, but RECORD 2 has been deleted by USER B. Therefore, in addition to checking whether RECORD 2 exists, a condition needs to be added during the data constraint check, which is to find RECORD 2 Whether the CURRENT_USER is empty, if it is not empty and the OP column is D, then the user will be prompted that the referenced record has been deleted by USER B, and the modification of RECORD 1 failed.

USERA增加或修改一条记录RECORD 1,而该记录引用了RECORD 2,但是RECORD 2是被USER B增加的并且未提交生效的,因此在数据约束检查时除了查找RECORD 2是否存在之外,需要增加一个条件,就是查找RECORD2的CURRENT_USER是否为空,如果非空且OP列是A,那么提示用户,引用的记录是USER B增加且未提交生效的,RECORD 1修改失败。USERA adds or modifies a record RECORD 1, which references RECORD 2, but RECORD 2 is added by USER B and has not been submitted to take effect. Therefore, in addition to finding whether RECORD 2 exists during data constraint checking, it is necessary to add a The condition is to check whether the CURRENT_USER of RECORD2 is empty. If it is not empty and the OP column is A, then the user is prompted that the referenced record was added by USER B and has not been submitted to take effect, and the modification of RECORD 1 fails.

USER A删除了一条记录RECORD 1,但是RECORD 1是被RECORD 2引用的,如果RECORD 2的CURRENT_USER为USER A并且OP为D,则允许删除;如果CURRENT_USER为空或USERB则不允许删除,RECORD 1删除失败。USER A deletes a record RECORD 1, but RECORD 1 is referenced by RECORD 2. If the CURRENT_USER of RECORD 2 is USER A and OP is D, the deletion is allowed; if CURRENT_USER is empty or USERB is not allowed to delete, RECORD 1 is deleted fail.

第二保存模块54,用于在E表中的数据无冲突的情况下,将E表的表名和相应的操作用户名保存在预先设置的D表中;The second saving module 54 is used to save the table name of the E table and the corresponding operation user name in the preset D table under the condition that the data in the E table has no conflict;

数据提交模块56,用于在用户提交配置数据时,根据该用户的操作用户名以及D表获取相应的E表,并将该E表中记录的该用户修改后的配置数据提交到O表。The data submission module 56 is used to obtain the corresponding E table according to the user's operating user name and the D table when the user submits the configuration data, and submit the modified configuration data of the user recorded in the E table to the O table.

数据提交模块56具体用于:在用户提交配置数据时,获取发起数据提交请求的用户的操作用户名;根据操作用户名在D表中查找与操作用户名相对应的E表的表名;根据E表的表名获取相应的E表,在E表中获取操作用户名为该用户的配置数据条目,并根据O表中的记录获取操作用户名为其他用户的配置数据条目;根据E表中的操作类型所指示的操作,对获取的配置数据条目进行归并,并将归并后的配置数据提交到O表。The data submission module 56 is specifically used for: when the user submits the configuration data, obtains the operation user name of the user who initiates the data submission request; Searches the table name of the E table corresponding to the operation user name in the D table according to the operation user name; The table name of the E table obtains the corresponding E table, obtains the configuration data entry whose operating user name is the user in the E table, and obtains the configuration data entry whose operating user name is other users according to the records in the O table; The operation indicated by the operation type of , merges the obtained configuration data entries, and submits the merged configuration data to the O table.

也就是说,数据提交模块56在数据提交时,首先获取发起数据提交请求的操作用户USER A,根据用户名在D表中查找涉及到的E表列表。然后在这些变化的每个E表中寻找CURRENT_USER为USER A的数据库记录。对于CURRENT_USER不是USER A的记录,取对应的O表中的那些记录,按照OP所指示的操作,进行归并。归并的处理逻辑是,对于增加操作就是直接增加;修改操作就是直接修改;删除操作,就把O表中的对应记录删除。归并后的数据,提交到O表生效。That is to say, when submitting data, the data submission module 56 first obtains the operating user USER A who initiates the data submission request, and searches the D table for the related list of the E table according to the user name. Then look for the database record where CURRENT_USER is USER A in each E table of these changes. For the records whose CURRENT_USER is not USER A, take those records in the corresponding O table, and merge them according to the operation indicated by the OP. The processing logic of merging is that for adding operations, it is directly adding; for modifying operations, it is directly modifying; for deleting operations, the corresponding records in the O table are deleted. The merged data will be submitted to Form O to take effect.

优选地,上述装置还包括:数据回滚模块,用于在用户回滚配置数据时,根据该用户的操作用户名以及D表获取相应的E表,根据O表中的记录将该E表中相应的配置数据条目进行回滚,其中,O表用于保存生效的配置数据;Preferably, the above-mentioned device also includes: a data rollback module, used to obtain the corresponding E table according to the user's operating user name and D table when the user rolls back the configuration data, and the E table according to the records in the O table The corresponding configuration data entry is rolled back, and the O table is used to save the effective configuration data;

数据回滚模块具体用于:在用户回滚配置数据时,获取发起数据回滚请求的用户的操作用户名;根据操作用户名在D表中查找与操作用户名相对应的E表的表名;根据E表的表名获取相应的E表,在E表中获取操作用户名为该用户的配置数据条目,根据获取的配置数据条目下的操作类型所指示的操作以及O表中的记录,将E表中相应的配置数据条目进行回滚;The data rollback module is specifically used to: when the user rolls back the configuration data, obtain the operation user name of the user who initiates the data rollback request; find the table name of the E table corresponding to the operation user name in the D table according to the operation user name Obtain the corresponding E table according to the table name of the E table, obtain the configuration data entry of the user named the user in the E table, according to the operation indicated by the operation type under the configuration data entry obtained and the record in the O table, Roll back the corresponding configuration data entries in the E table;

也就是说,数据回滚模块在用户进行数据提交前,可以将该用户的操作回滚到编辑前状态。首先根据选择的要进行数据回滚的操作用户名,到D表中获取相应的E表列表,在这些E表中查找该用户的所有修改记录。根据这些记录的OP列的取值,分别处理:对于A操作,删除该记录;对于M操作,将O表的对应记录拷贝到E表;对于D操作,清空CURRENT USER和OP列的属性值。That is to say, the data rollback module can roll back the user's operation to the state before editing before the user submits the data. Firstly, according to the selected operating user name for data rollback, go to the D table to obtain the corresponding E table list, and find all the modification records of the user in these E tables. According to the value of the OP column of these records, process respectively: for A operation, delete the record; for M operation, copy the corresponding record of O table to E table; for D operation, clear the attribute values of CURRENT USER and OP column.

优选地,上述装置还包括:数据清空模块,用于清空D表中操作用户名为该用户的记录,删除相应的E表中操作用户名为该用户且操作类型为删除的记录,并清空该E表中操作用户名为该用户的配置数据条目下的操作用户名和操作类型。Preferably, the above-mentioned device also includes: a data clearing module, which is used to clear the record of the user whose operating user name is the user in the D table, delete the corresponding record in the E table whose operating user name is the user and whose operation type is delete, and clear the record. In Table E, the operating user name is the operating user name and operation type under the user's configuration data entry.

也就是说,如果USERA的操作数据提交成功,数据清空模块需要清空D表中CURRENT_USER为USER A的记录,删除相应的E表中CURRENT_USER为USERA且OP列为删除标记的记录,然后清空相应E表中的CURRENT_USER为USER A的属性列。如果USER A的操作数据提交失败,将失败原因提示给用户。That is to say, if the operation data of USERA is successfully submitted, the data clearing module needs to clear the records in table D where CURRENT_USER is USER A, delete the corresponding records in table E where CURRENT_USER is USERA and the OP column is a deletion mark, and then clear the corresponding table E CURRENT_USER in is the attribute column of USER A. If the operation data submission of USER A fails, the failure reason will be prompted to the user.

图2是本发明实施例的在线表编辑表增量表的关系示意图,如图2所示,O表中包括记录1和记录2,记录1的属性1的值为A2,记录2的属性1的值为B1,USER A对E表1进行操作,其中,记录1和记录2分别被USER A进行了修改和删除操作,记录3被USER B进行了添加操作,D表记录了USER A的操作用户名及其修改的E表1的表名、以及USER B的操作用户名及其修改的E表1的表名。USER A进行数据提交,首先,根据D表的记录获取USERA操作的E表1,并根据E表1中记录的USER A对记录1和记录2的操作,进行归并,提交到O表生效,最后,O表1中包括修改后的记录1,在提交生效后,将E表1中记录1的CURRENT_USER列和OP列清空,删除记录2,D表中删除USERA的记录。Fig. 2 is the schematic diagram of the relation of the online table editing table incremental table of the embodiment of the present invention, as shown in Fig. 2, comprise record 1 and record 2 in the O table, the value of the attribute 1 of record 1 is A2, the attribute 1 of record 2 The value is B1, USER A operates on E table 1, among which, record 1 and record 2 are respectively modified and deleted by USER A, record 3 is added by USER B, and table D records the operation of USER A The user name and its modified table name of E table 1, and the operating user name of USER B and its modified table name of E table 1. USER A submits data. First, obtain the E table 1 operated by USERA according to the records in D table, and merge the operations of record 1 and record 2 according to the records of USER A in E table 1, and submit them to O table to take effect, and finally , O table 1 includes the modified record 1. After the submission takes effect, clear the CURRENT_USER column and OP column of record 1 in E table 1, delete record 2, and delete the USERA record in D table.

以下结合附图,对本发明实施例的上述技术方案进行详细说明。The technical solutions of the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.

图3是本发明实施例的用户配置数据的方法的详细处理流程图,如图3所示,包括如下处理:Fig. 3 is a detailed processing flowchart of the method for user configuration data in an embodiment of the present invention, as shown in Fig. 3 , including the following processing:

步骤301,用户操作E表记录,保存操作用户及操作类型;Step 301, user operation E table record, save the operating user and operation type;

步骤302,数据冲突检查,检查通过进入步骤303;检查不通过进入步骤301;Step 302, data conflict check, if the check is passed, go to step 303; if the check is not passed, go to step 301;

步骤303,在D表中保存变化的E表及操作用户信息;Step 303, saving the changed E-list and operating user information in the D-list;

步骤304,用户选择数据提交进入步骤306,用户选择数据回滚进入步骤305;Step 304, the user selects data submission to enter step 306, and the user selects data rollback to enter step 305;

步骤305,根据O表回滚E表的对应记录,进入步骤301;Step 305, roll back the corresponding record of E table according to O table, enter step 301;

步骤306,根据变化的E表记录提交到O表生效;Step 306, according to the changed E table records submitted to O table to take effect;

步骤307,数据提交成功进入步骤308,数据提交失败进入步骤310;Step 307, if the data submission is successful, go to step 308, if the data submission fails, go to step 310;

步骤308,对E表中增加和修改的数据记录清空操作用户及操作类型,对删除的数据记录进行删除,进入步骤309;Step 308, clear the operation user and operation type for the data records added and modified in the E table, delete the deleted data records, and enter step 309;

步骤309,清理D表当前操作用户的操作信息,结束本次配置流程;Step 309, clean up the operation information of the current operating user in table D, and end this configuration process;

步骤310,将数据提交失败原因提示用户,结束本次配置流程。Step 310, prompting the user of the reason for the failure of data submission, and ending the configuration process.

图4是本发明实施例的数据冲突检查的流程图,如图4所示,包括如下处理:Fig. 4 is the flow chart of the data conflict check of the embodiment of the present invention, as shown in Fig. 4, comprises following processing:

步骤401,USER A编辑数据;Step 401, USER A edits data;

步骤402,判断目标记录列的CURRENT_USER列的值,如果CURRENT_USER列为空,则执行步骤405,如果CURRENT_USER列为USERA,则执行步骤403,如果CURRENT_USER列为USERB则执行步骤404;Step 402, determine the value of the CURRENT_USER column of the target record column, if the CURRENT_USER column is empty, then perform step 405, if the CURRENT_USER column is USERA, then perform step 403, if the CURRENT_USER column is USERB, then perform step 404;

步骤403,根据先后操作符按算法归并,执行步骤405;Step 403, merge according to the algorithm according to the sequence operator, and execute step 405;

步骤404,对数据记录的引用关系进行检查,如果检查通过,则执行步骤405,否则,执行步骤406;Step 404, check the reference relationship of the data record, if the check is passed, then execute step 405, otherwise, execute step 406;

步骤405,提交修改到E表;Step 405, submitting the modification to Form E;

步骤406,提示用户操作失败原因。In step 406, the user is prompted about the reason for the operation failure.

本发明实施例通过将数据库配置表设计为在线表和编辑表两套表,其中,在线表和现有的数据配置表完全一致,编辑表的表结构完全以现有的数据配置表的表结构为基础进行改造,根据在线表、编辑表以及增量表记录的信息来控制多用户配置数据的按用户生效和按用户回滚流程,解决了现有技术中在用户配置数据时多用户不能够同时配置同一个数据集合,在数据编辑时不能够进行实时的冲突检查,并且不能够以指定用户为单位进行独立的数据提交和独立的数据回滚的问题,能够在多用户配置数据时进行实时的数据冲突检查,同时,由于记录了每个用户的操作信息,可以支持按用户进行数据的独立生效和按用户进行数据的独立回滚,可以起到实时自动备份数据的功能。In the embodiment of the present invention, the database configuration table is designed as two sets of tables, the online table and the editing table, wherein the online table is completely consistent with the existing data configuration table, and the table structure of the editing table is completely based on the table structure of the existing data configuration table Based on the transformation, according to the information recorded in the online table, edit table and incremental table to control the user-by-user and user-by-user rollback process of multi-user configuration data, it solves the inability of multi-users to configure data in the prior art. Configure the same data set at the same time. Real-time conflict checking cannot be performed during data editing, and independent data submission and independent data rollback cannot be performed in units of specified users. At the same time, since the operation information of each user is recorded, it can support independent validation of data by user and independent rollback of data by user, and can play the function of real-time automatic data backup.

尽管为示例目的,已经公开了本发明的优选实施例,本领域的技术人员将意识到各种改进、增加和取代也是可能的,因此,本发明的范围应当不限于上述实施例。Although preferred embodiments of the present invention have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are possible, and therefore, the scope of the present invention should not be limited to the above-described embodiments.

Claims (9)

1.一种用户配置数据的方法,其特征在于,包括:1. A method for user configuration data, comprising: 根据用户对配置数据的操作,在编辑表中相应的配置数据条目下保存操作用户名和操作类型,在所述编辑表中的数据存在冲突的情况下,对所述编辑表中的冲突数据进行处理,在所述编辑表中的数据无冲突的情况下,将所述编辑表的表名和相应的操作用户名保存在预先设置的增量表中;According to the user's operation on the configuration data, save the operating user name and operation type under the corresponding configuration data entry in the editing table, and process the conflicting data in the editing table when there is a conflict in the data in the editing table , in the case that the data in the edit table has no conflict, save the table name of the edit table and the corresponding operation user name in the preset increment table; 所述操作类型包括:增加、修改和删除;The operation types include: adding, modifying and deleting; 所述编辑表中的数据存在冲突的情况下,对所述编辑表中的冲突数据进行处理具体包括:When the data in the editing table conflicts, processing the conflicting data in the editing table specifically includes: 在同一用户对用一条配置数据条目进行多次操作导致数据冲突的情况下,如果先对某一条配置数据条目执行增加操作,随后对该条配置数据条目进行修改操作,则将修改的属性同步到所述编辑表中相应的配置数据条目下,并将其操作类型设置为增加;如果先对某一条配置数据条目执行增加操作,随后对该条配置数据条目进行删除操作,则直接删除所述编辑表中相应的配置数据条目;如果先后对某一条配置数据条目执行修改操作,则将所述编辑表中相应的配置数据条目下的操作类型设置为修改;如果先对某一条配置数据条目执行修改操作,随后对该条配置数据条目进行删除操作,则将所述编辑表中相应的配置数据条目下的操作类型设置为删除;如果先对某一条配置数据条目执行删除操作,随后对该条配置数据条目进行增加操作,则比较已删除的配置数据条目与新增加的配置数据条目的不同并修改所述配置数据条目,将所述编辑表中相应的配置数据条目下的操作类型设置为修改;In the case that the same user performs multiple operations on a configuration data entry, resulting in data conflicts, if the add operation is performed on a configuration data entry first, and then the configuration data entry is modified, the modified attributes will be synchronized to Under the corresponding configuration data entry in the edit table, and set its operation type to add; if an add operation is performed on a certain configuration data entry first, and then a delete operation is performed on the configuration data entry, the edit will be directly deleted The corresponding configuration data entry in the table; if modifying a certain configuration data entry successively, set the operation type under the corresponding configuration data entry in the editing table to modify; if modifying a certain configuration data entry first operation, and then delete the configuration data entry, set the operation type under the corresponding configuration data entry in the edit table to delete; When the data entry is added, compare the difference between the deleted configuration data entry and the newly added configuration data entry and modify the configuration data entry, and set the operation type under the corresponding configuration data entry in the editing table to modify; 在不同用户对用一条配置数据条目进行先后进行多次操作导致数据冲突的情况下,提示后一个操作用户该条配置数据条目已经被其他操作用户编辑并且未提交生效;In the case that different users perform multiple operations on a configuration data entry, resulting in data conflicts, the next operating user is prompted that the configuration data entry has been edited by other operating users and has not been submitted to take effect; 在不同用户对多条配置数据条目进行操作导致数据冲突的情况下,如果用户所修改的配置数据条目所引用的配置数据条目已经被其他用户删除,则提示 该用户操作失败;如果用户所修改的配置数据条目所引用的配置数据条目是被其他用户新增加的且未提交生效,则提示该用户操作失败;如果用户删除被其他配置数据条目所引用的配置数据条目,且所述其他配置数据条目下的操作用户名为该用户、操作类型为删除,则将所述编辑表中该配置数据条目下的操作类型设置为删除,如果用户删除被其他配置数据条目所引用的配置数据条目,且所述其他配置数据条目下的操作用户名为空或其他用户,则提示该用户操作失败;In the case that different users operate on multiple configuration data entries, resulting in data conflicts, if the configuration data entry referenced by the configuration data entry modified by the user has been deleted by other users, the user will be prompted to fail the operation; The configuration data entry referenced by the configuration data entry is newly added by other users and has not been submitted to take effect, the user will be prompted that the operation failed; if the user deletes the configuration data entry referenced by other configuration data entries, and the other configuration data entries The operation user name under the user is the user, and the operation type is delete, then set the operation type under the configuration data entry in the edit table to delete, if the user deletes the configuration data entry referenced by other configuration data entries, and the If the operation user name under other configuration data items mentioned above is empty or other users, the user will be prompted that the operation failed; 在用户提交配置数据时,根据该用户的操作用户名以及所述增量表获取相应的编辑表,并将该编辑表中记录的该用户修改后的配置数据提交到在线表,其中,所述在线表用于保存生效的配置数据。When the user submits the configuration data, obtain the corresponding editing table according to the user's operating user name and the increment table, and submit the modified configuration data of the user recorded in the editing table to the online table, wherein the The online table is used to save the effective configuration data. 2.如权利要求1所述的方法,其特征在于,在用户提交配置数据之前,所述方法还包括:2. The method according to claim 1, wherein, before the user submits the configuration data, the method further comprises: 在用户回滚配置数据时,根据该用户的操作用户名以及所述增量表获取相应的编辑表,根据在线表中的记录将该编辑表中相应的配置数据条目进行回滚。When the user rolls back the configuration data, the corresponding editing table is obtained according to the operating user name of the user and the increment table, and the corresponding configuration data entry in the editing table is rolled back according to the records in the online table. 3.如权利要求2所述的方法,其特征在于,在用户回滚配置数据时,根据该用户的操作用户名以及所述增量表获取相应的编辑表,根据在线表中的记录将该编辑表中相应的配置数据条目进行回滚具体包括:3. The method according to claim 2, wherein, when the user rolls back configuration data, obtain the corresponding editing table according to the user's operating username and the incremental table, and according to the record in the online table, the Editing the corresponding configuration data entry in the table for rollback includes: 在用户回滚配置数据时,获取发起数据回滚请求的用户的操作用户名;When the user rolls back the configuration data, obtain the operating username of the user who initiated the data rollback request; 根据所述操作用户名在所述增量表中查找与所述操作用户名相对应的编辑表的表名;Searching the incremental table for the table name of the editing table corresponding to the operating user name according to the operating user name; 根据所述编辑表的表名获取相应的编辑表,在所述编辑表中获取操作用户名为该用户的配置数据条目,根据获取的所述配置数据条目下的操作类型所指示的操作以及所述在线表中的记录,将所述编辑表中相应的配置数据条目进行回滚。Obtain the corresponding edit table according to the table name of the edit table, obtain the configuration data entry whose operating user name is the user in the edit table, and obtain the operation indicated by the operation type under the obtained configuration data entry and the Records in the above-mentioned online table, and roll back the corresponding configuration data entry in the edit table. 4.如权利要求1所述的方法,其特征在于,在用户提交配置数据时,根 据该用户的操作用户名以及所述增量表获取相应的编辑表,并将该编辑表中记录的该用户修改后的配置数据提交到所述在线表具体包括:4. The method according to claim 1, wherein, when the user submits the configuration data, the corresponding editing table is obtained according to the user's operation user name and the increment table, and the data recorded in the editing table is The modified configuration data submitted by the user to the online form specifically includes: 在用户提交配置数据时,获取发起数据提交请求的用户的操作用户名;When the user submits the configuration data, obtain the operation user name of the user who initiates the data submission request; 根据所述操作用户名在所述增量表中查找与所述操作用户名相对应的编辑表的表名;Searching the incremental table for the table name of the editing table corresponding to the operating user name according to the operating user name; 根据所述编辑表的表名获取相应的编辑表,在所述编辑表中获取操作用户名为该用户的配置数据条目,并根据所述在线表中的记录获取操作用户名为其他用户的配置数据条目;Obtain the corresponding edit table according to the table name of the edit table, obtain the configuration data entry whose operation user name is the user in the edit table, and obtain the configuration data entry of the operation user name other users according to the records in the online table data entry; 根据所述编辑表中的所述操作类型所指示的操作,对获取的所述配置数据条目进行归并,并将归并后的配置数据提交到所述在线表。According to the operation indicated by the operation type in the editing table, merge the obtained configuration data entries, and submit the merged configuration data to the online table. 5.如权利要求1或2所述的方法,其特征在于,将该编辑表中记录的该用户修改后的配置数据提交到在线表之后,所述方法还包括:5. The method according to claim 1 or 2, wherein, after submitting the modified configuration data of the user recorded in the editing table to the online table, the method further comprises: 清空所述增量表中操作用户名为该用户的记录,删除相应的编辑表中操作用户名为该用户且操作类型为删除的记录,并清空该编辑表中操作用户名为该用户的配置数据条目下的操作用户名和操作类型。Clear the records in the incremental table with the user name as the user, delete the records in the corresponding editing table with the user name as the user and the operation type as delete, and clear the configuration in the edit table with the user name as the user Operation username and operation type under the data entry. 6.一种用户配置数据的装置,其特征在于,包括:6. A device for configuring user data, comprising: 第一保存模块,用于根据用户对配置数据的操作,在编辑表中相应的配置数据条目下保存操作用户名和操作类型;The first saving module is used to save the operating user name and operation type under the corresponding configuration data entry in the edit table according to the user's operation on the configuration data; 数据冲突模块,用于在所述编辑表中的数据存在冲突的情况下,对所述编辑表中的冲突数据进行处理;A data conflict module, configured to process the conflicting data in the editing table when there is a conflict in the data in the editing table; 第二保存模块,用于在所述编辑表中的数据无冲突的情况下,将所述编辑表的表名和相应的操作用户名保存在预先设置的增量表中;The second saving module is used to save the table name of the editing table and the corresponding operating user name in the preset increment table when the data in the editing table has no conflict; 数据提交模块,用于在用户提交配置数据时,根据该用户的操作用户名以及所述增量表获取相应的编辑表,并将该编辑表中记录的该用户修改后的配置数据提交到在线表,其中,所述在线表用于保存生效的配置数据;The data submission module is used to obtain the corresponding editing table according to the user's operating user name and the incremental table when the user submits the configuration data, and submit the modified configuration data of the user recorded in the editing table to the online table, wherein the online table is used to save effective configuration data; 所述操作类型包括:增加、修改、以及删除;The operation types include: add, modify, and delete; 所述数据冲突模块具体包括:The data conflict module specifically includes: 第一数据冲突子模块,用于在同一用户对用一条配置数据条目进行多次操作导致数据冲突的情况下,如果先对某一条配置数据条目执行增加操作,随后对该条配置数据条目进行修改操作,则将修改的属性同步到所述编辑表中相应的配置数据条目下,并将其操作类型设置为增加;如果先对某一条配置数据条目执行增加操作,随后对该条配置数据条目进行删除操作,则直接删除所述编辑表中相应的配置数据条目;如果先后对某一条配置数据条目执行修改操作,则将所述编辑表中相应的配置数据条目下的操作类型设置为修改;如果先对某一条配置数据条目执行修改操作,随后对该条配置数据条目进行删除操作,则将所述编辑表中相应的配置数据条目下的操作类型设置为删除;如果先对某一条配置数据条目执行删除操作,随后对该条配置数据条目进行增加操作,则比较已删除的配置数据条目与新增加的配置数据条目的不同并修改所述配置数据条目,将所述编辑表中相应的配置数据条目下的操作类型设置为修改;The first data conflict sub-module is used to perform multiple operations on a configuration data entry by the same user, resulting in data conflicts. If an add operation is first performed on a certain configuration data entry, and then the configuration data entry is modified operation, the modified attribute is synchronized to the corresponding configuration data entry in the edit table, and its operation type is set to increase; if the addition operation is performed on a certain configuration data entry first, then the configuration data entry is executed Delete operation, then directly delete the corresponding configuration data entry in the edit table; if a modification operation is performed on a certain configuration data entry successively, the operation type under the corresponding configuration data entry in the edit table is set to modify; if First perform a modification operation on a certain configuration data entry, and then perform a delete operation on the configuration data entry, then set the operation type under the corresponding configuration data entry in the edit table to delete; if a certain configuration data entry is first Execute the delete operation, then add the configuration data entry to the configuration data entry, then compare the difference between the deleted configuration data entry and the newly added configuration data entry and modify the configuration data entry, and add the corresponding configuration data in the edit table The operation type under the entry is set to Modify; 第二数据冲突子模块,用于在不同用户对用一条配置数据条目进行先后进行多次操作导致数据冲突的情况下,提示后一个操作用户该条配置数据条目已经被其他操作用户编辑并且未提交生效;The second data conflict sub-module is used to remind the next operating user that the configuration data item has been edited by other operating users and has not been submitted when different users perform multiple operations on a configuration data item, resulting in data conflicts take effect; 第三数据冲突子模块,用于在不同用户对多条配置数据条目进行操作导致数据冲突的情况下,如果用户所修改的配置数据条目所引用的配置数据条目已经被其他用户删除,则提示该用户操作失败;如果用户所修改的配置数据条目所引用的配置数据条目是被其他用户新增加的且未提交生效,则提示该用户操作失败;如果用户删除被其他配置数据条目所引用的配置数据条目,且所述其他配置数据条目下的操作用户名为该用户、操作类型为删除,则将所述编辑表中该配置数据条目下的操作类型设置为删除,如果用户删除被其他配置数据条目所引用的配置数据条目,且所述其他配置数据条目下的操作用户名为空或其他用户,则提示该用户操作失败。The third data conflict sub-module is used to prompt the user if the configuration data item referenced by the configuration data item modified by the user has been deleted by other users when different users operate on multiple configuration data items resulting in a data conflict. The user operation fails; if the configuration data entry referenced by the configuration data entry modified by the user is newly added by other users and has not been submitted to take effect, the user operation failure will be prompted; if the user deletes the configuration data referenced by other configuration data entries entry, and the operating user name under the other configuration data entry is the user, and the operation type is delete, then set the operation type under the configuration data entry in the edit table to delete, if the user deletes it by other configuration data entries The referenced configuration data entry, and the operation user name under the other configuration data entry is empty or other users, prompting that the operation failed for the user. 7.如权利要求6所述的装置,其特征在于,所述装置还包括:7. The device of claim 6, further comprising: 数据回滚模块,用于在用户回滚配置数据时,根据该用户的操作用户名以及所述增量表获取相应的编辑表,根据在线表中的记录将该编辑表中相应的配置数据条目进行回滚。The data rollback module is used to obtain the corresponding editing table according to the user's operating user name and the incremental table when the user rolls back the configuration data, and the corresponding configuration data entry in the editing table according to the records in the online table Do a rollback. 8.如权利要求7所述的装置,其特征在于,8. The apparatus of claim 7, wherein 所述数据回滚模块具体用于:在用户回滚配置数据时,获取发起数据回滚请求的用户的操作用户名;根据所述操作用户名在所述增量表中查找与所述操作用户名相对应的编辑表的表名;根据所述编辑表的表名获取相应的编辑表,在所述编辑表中获取操作用户名为该用户的配置数据条目,根据获取的所述配置数据条目下的操作类型所指示的操作以及所述在线表中的记录,将所述编辑表中相应的配置数据条目进行回滚;The data rollback module is specifically used for: when the user rolls back the configuration data, obtain the operating user name of the user who initiates the data rollback request; search the incremental table according to the operating user name and the operating user The table name of the editing table corresponding to the first name; according to the table name of the editing table, obtain the corresponding editing table, and obtain the configuration data entry of the user named the user in the editing table, according to the obtained configuration data entry The operation indicated by the operation type under and the records in the online table are rolled back to the corresponding configuration data entry in the edit table; 所述数据提交模块具体用于:在用户提交配置数据时,获取发起数据提交请求的用户的操作用户名;根据所述操作用户名在所述增量表中查找与所述操作用户名相对应的编辑表的表名;根据所述编辑表的表名获取相应的编辑表,在所述编辑表中获取操作用户名为该用户的配置数据条目,并根据所述在线表中的记录获取操作用户名为其他用户的配置数据条目;根据所述编辑表中的所述操作类型所指示的操作,对获取的所述配置数据条目进行归并,并将归并后的配置数据提交到所述在线表。The data submission module is specifically used for: when the user submits the configuration data, obtain the operation user name of the user who initiates the data submission request; according to the operation user name, search in the incremental table for the user name corresponding to the operation user name. The table name of the editing table; obtain the corresponding editing table according to the table name of the editing table, obtain the configuration data entry whose operating user name is the user in the editing table, and obtain the operation according to the record in the online table The user name is the configuration data entry of other users; according to the operation indicated by the operation type in the editing table, merge the obtained configuration data entries, and submit the merged configuration data to the online table . 9.如权利要求6或7所述的装置,其特征在于,所述装置还包括:9. The device according to claim 6 or 7, wherein the device further comprises: 数据清空模块,用于清空所述增量表中操作用户名为该用户的记录,删除相应的编辑表中操作用户名为该用户且操作类型为删除的记录,并清空该编辑表中操作用户名为该用户的配置数据条目下的操作用户名和操作类型。The data clearing module is used to clear the records in the incremental table whose operating user name is the user, delete the records in the corresponding editing table whose operating user name is the user and whose operation type is delete, and clear the operating user in the editing table The action user name and action type under the configuration data entry named for this user.
CN201110277579.2A 2011-09-19 2011-09-19 Method and device for configuring data by users Expired - Fee Related CN102999532B (en)

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 Expired - Fee Related 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 (7)

* Cited by examiner, † Cited by third party
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 贝壳技术有限公司 A data rollback method and device for configuration platform in real estate transaction system
CN112632024A (en) * 2019-10-08 2021-04-09 中兴通讯股份有限公司 Method and electronic equipment for managing data of telecommunication network
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8195621B2 (en) * 2007-11-14 2012-06-05 Moshe Elisha Database schema management system

Patent Citations (2)

* Cited by examiner, † Cited by third party
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
US11531648B2 (en) Maintaining and updating file system shadows on a local device by a synchronization client of a cloud-based platform
US10061795B2 (en) Graph-based data models for partitioned data
US9785693B2 (en) Intelligent conflict detection and semantic expression of document edits
JP5775973B2 (en) Merge playlists from multiple sources
CN102385611B (en) Reduce the locking during db transaction
US8805777B2 (en) Data record collapse and split functionality
KR102038529B1 (en) System for processing real-time data modification of in-memory database
JP2004532480A5 (en)
CN102110121A (en) Method and system for processing data
JP2012511773A (en) Method and system for efficient data synchronization
CN109299046B (en) A Collaborative Editing Method Based on TCP WebSocket Protocol
CN111708764A (en) A kind of control method and device for database change version
CN103294724A (en) Method for managing database structures and system for method
CN104504160A (en) Excel document online batch write-in method based on SSH frame
US10013315B2 (en) Reverse snapshot clone
CN104462497A (en) Crossing-base transaction processing method and system based on relational databases
CN106155838A (en) A kind of database back-up data restoration methods and device
CN103501339A (en) Metadata processing method and metadata server
US20060004877A1 (en) Method and system for data processing with data replication for the same
WO2025086860A1 (en) Data table processing method and apparatus, computer device, and readable storage medium
CN102289476A (en) Method for recording transaction log
CN118035200A (en) Distributed file system metadata management method, device and equipment
CN102369527B (en) Management method of link relation table and correlative device
CN110413617B (en) Method for dynamically adjusting hash table group according to size of data volume

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170510