CN110377612A - A kind of pair of data, which update, operates the method for being ranked up recombination and corresponding device - Google Patents

A kind of pair of data, which update, operates the method for being ranked up recombination and corresponding device Download PDF

Info

Publication number
CN110377612A
CN110377612A CN201910645615.2A CN201910645615A CN110377612A CN 110377612 A CN110377612 A CN 110377612A CN 201910645615 A CN201910645615 A CN 201910645615A CN 110377612 A CN110377612 A CN 110377612A
Authority
CN
China
Prior art keywords
data
sequence
update
conflict
pseudo
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910645615.2A
Other languages
Chinese (zh)
Other versions
CN110377612B (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.)
Wuhan Dream Database Co ltd
Original Assignee
Wuhan Dameng Database Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Dameng Database Co Ltd filed Critical Wuhan Dameng Database Co Ltd
Priority to CN201910645615.2A priority Critical patent/CN110377612B/en
Publication of CN110377612A publication Critical patent/CN110377612A/en
Application granted granted Critical
Publication of CN110377612B publication Critical patent/CN110377612B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2315Optimistic concurrency control
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Abstract

It is updated the invention discloses a kind of pair of data and operates the method for being ranked up recombination and corresponding device, this method comprises: obtaining source table and referring to table, obtain increment list according to source table and referring to table;Operation is updated to the multi-group data in increment list to be sorted in advance, and primitive operation sequence is obtained;It parses each data in primitive operation sequence and updates the conflict situations between operating, the conflict situations between operation are updated according to each data, selectivity updates operation to the partial data in primitive operation sequence and is reordered and/or established pseudo-operation, obtains the purpose sequence of operation.Method of the invention is by being ranked up update operation, or legacy data is replaced with it is not possible that occurrence, after colliding data is completed to update, it would be impossible to occurrence again and be updated to target value, complete the recombination to operation is updated, it realizes and the one group of update operation for violating unique constraints is handled, guarantee synchronous according to the update sequence of operation progress data increment after sequence recombination.

Description

A kind of pair of data, which update, operates the method for being ranked up recombination and corresponding device
Technical field
The invention belongs to data field of synchronization, update operation more particularly, to a kind of pair of data and are ranked up recombination Method and corresponding device.
Background technique
The synchronization of incremental data can be extracted, is synchronized to by incremental data when progress additions and deletions change operation on the table of source In purpose table.After source table data full dose is drawn into purpose table by first time, it can be taken out by the way that incremental data is repeatedly carried out It takes, the additions and deletions on the table of source is changed into the delta data that operation generates, are synchronized to exhaustive in purpose table, to realize source table and mesh Table long-term synchronization, avoid synchronizing full dose data every time.It, can when full dose data are huge, and delta data is less every time The synchronous efficiency of data is substantially improved.
The incremental data of current main-stream extracts mode, and incrementally the inside producing method of data is divided into two classes: process note Producing method is recorded, including trigger increment and log parse increment;Compare producing method, including shadow table increment, MD5 increment and Timestamp increment.Process record generates the mode of increment, is the data by recording all generations in increment list on the table of source Additions and deletions change operating process, execute incremental data it is synchronous when, these process operation datas are repeated one time on purpose table, i.e., The variation generated in the table of source can be synchronized in purpose table.Compare the mode for generating increment, by establishing " referring to table " (example Such as, shadow table, MD5 table or timestamp table), " referring to table " includes unique column in the table of source;When execution incremental data is synchronous, it is based on Unique column are positioned, if certain data line in the table of source, without in " referring to table ", then the row data are what a line was newly inserted into Data;Conversely, then the row data are the deleted data of a line if certain data line is not in the table of source, and in " referring to table "; If certain data line is both in the table of source, also in " referring to table ", but the data of other column are inconsistent, then the row data are repaired for a line The data corrected one's mistakes.
When carrying out increment synchronization operation in such a way that process record generates increment, as long as the behaviour that can be smoothly completed in the table of source Make process, can be smoothly completed in purpose table;And when comparing the incremental mode progress increment synchronization operation for generating type, Due to the incremental data of the difference generation by comparing source table and " referring to table " can only reflect operation as a result, and can not reflect behaviour The process of work, this is resulted in when being related to data modification operation, can be suitable in the table of source if existence anduniquess index column in purpose table The sequence of operation that benefit is completed, it is different in purpose table surely to smoothly complete.
As depicted in figs. 1 and 2, wherein the data in " referring to table " are the old value before modification, and the data in the table of source are modification New value afterwards, D represent delete operation;UN, UO represent modification operation, and UN represents modified value (new value), before UO represents modification Value (old value), I represent delete.When executing incremental data simultaneously operating, purpose table is proceeded as follows, purpose can be made Table is synchronous with the holding of source table: (1) deleting this row data of ID=5;(2) it modifies in this row data of ID=7 operation: [7, ' small Army ', 1876666007, ' Zhongshan Road 7 ', ' male '] --- -> [7, ' small army ', 1876666007, ' Zhongshan Road 7 ', ' male ']; (3) data [11, ' Lao Liu ', 1876666011, ' Zhongshan Road 11 ', ' male '] are inserted into.Carry out incremental data it is synchronous when, can be The sequence of operation smoothly completed in the table of source can also smoothly complete in purpose table.
As shown in Figure 3 and Figure 4, when the PHONE (telephone number) of purpose table column are indexed there is no unique constraint, according to A-- > B-- > C-- > D-- > E-- > F-- > G-- > H-- > K sequence, which executes to update, operates achievable increment synchronization;When purpose table When PHONE column existence anduniquess constraint index, aforesaid operations sequence can not be successfully execution: (1) A exists with H and unidirectionally conflicts, when H elder generation It executes, when executing after A, conflict can be released;(2) there are circulating interferences by B and G, can not release punching by adjusting the two execution sequence It is prominent;(3) there are circulating interferences by C, D, E, can not release conflict by adjusting three's execution sequence.It is synchronous carrying out incremental data When, the sequence of operation that can be smoothly completed in the table of source cannot smoothly complete in purpose table.
In consideration of it, overcoming defect present in the prior art is the art urgent problem to be solved.
Summary of the invention
Aiming at the above defects or improvement requirements of the prior art, operation is updated the present invention provides a kind of pair of data to arrange The method of sequence recombination and corresponding device, its object is to methods of the invention to be ranked up by operating to update, or will be former There are data to replace with impossible occurrence, after colliding data is completed to update, then would be impossible to occurrence and be updated to target value, it is complete The recombination of operation is updated in pairs, and the one group of update operation for violating unique constraints is handled to realize, it can be suitable It is sharp to complete execution, guarantee, thus solution update synchronous according to the update sequence of operation progress data increment after recombination of sorting The sequence of operation generates the collision problem for violating unique constraints.
To achieve the above object, according to one aspect of the present invention, a kind of pair of data update operation is provided to be ranked up The method of recombination, which comprises
Acquisition source table and referring to table according to the source table and described obtains increment list referring to table, wherein in the increment list It updates and operates including multi-group data;
Operation is updated to the multi-group data in the increment list to be sorted in advance, and primitive operation sequence is obtained;
It parses each data in the primitive operation sequence and updates the conflict situations between operating, updated and operated according to each data Between conflict situations, selectivity in the primitive operation sequence partial data update operation is reordered and/or is built Vertical pseudo-operation, obtains the purpose sequence of operation, synchronous to carry out incremental data according to the purpose sequence of operation.
Preferably, each data in the primitive operation sequence are parsed and update the conflict situations between operating, according to each data The conflict situations between operation are updated, selectivity updates operation to the partial data in the primitive operation sequence and reorders And/or pseudo-operation is established, the purpose sequence of operation is obtained, includes: to be synchronized according to purpose sequence of operation progress incremental data
It parses each data in the primitive operation sequence and updates the conflict situations between operating;
When there is unidirectional conflict between the update operation of each data, adjusting the data for existing and unidirectionally conflicting and updating holding for operation Row sequence, to release unidirectional conflict;And/or
When there are when circulating interference, there are the data of circulating interference to update in operation, building between each data update operation A vertical data update the pseudo-operation of operation, and the pseudo-operation is added in the purpose sequence of operation, to release circulating interference.
Preferably, in the increment list, one group of data, which updates, operates a corresponding operation object, and the method is also wrapped It includes:
Obtain the old value of each operation object and new value in the increment list;
The old value of each operation object is updated operation foundation with corresponding data to be associated with, forms old value warehouse, it will be each The new value of operation object updates operation foundation with corresponding data and is associated with, and forms new value warehouse.
Preferably, each data in the primitive operation sequence are parsed and update the conflict situations between operating, according to each data The conflict situations between operation are updated, selectivity updates operation to the partial data in the primitive operation sequence and reorders And/or pseudo-operation is established, obtaining the purpose sequence of operation includes:
A data are taken out from the primitive operation sequence and update operation, are operated as updating target data;
Judge to determine that institute's target states the state that data update operation, when updating target data operation is untreated state When, the updating target data operation is nullified in the old value warehouse and the new value warehouse;
Updating target data operation is added to the tail portion of the purpose sequence of operation, updates the target update behaviour As head operation and tail operation, updates the target update and operate corresponding serial number head serial number;
Uniqueness conflict situations and the head between corresponding new value and the old value warehouse are operated according to the tail The uniqueness conflict situations between corresponding old value and the new value warehouse are operated, selectivity is in the primitive operation sequence Partial data updates operation and is reordered and/or established pseudo-operation, obtains the purpose sequence of operation.
Preferably, the uniqueness conflict situations between corresponding new value and the old value warehouse are operated according to the tail, with And the head operates the uniqueness conflict situations between corresponding old value and the new value warehouse, selectivity is to the primitive operation Partial data in sequence updates operation and is reordered and/or established pseudo-operation, and obtaining the purpose sequence of operation includes:
Judgement determines in the old value warehouse, if there is new value Existence and uniquenss conflict corresponding with tail operation The first data update operation;
If it exists, then first data are nullified in old value warehouse and update operation, in the primitive operation sequence, more The state that new first data update operation is processed;
First data are updated into operation addition at the end of the purpose sequence of operation, update first data more New operation is that tail operates.
Preferably, the uniqueness conflict situations between corresponding new value and the old value warehouse are operated according to the tail, with And the head operates the uniqueness conflict situations between corresponding old value and the new value warehouse, selectivity is to the primitive operation Partial data in sequence updates operation and is reordered and/or established pseudo-operation, obtains the purpose sequence of operation further include:
If it does not exist, then judge to determine in the new value warehouse, if there is old value corresponding with head operation and deposit Operation is updated in the second data of uniqueness conflict;
If it exists, then second data are nullified in the new value warehouse updates operation;
Judgement determines that the head operation updates the type that conflicts between operation with second data;
When the type that conflicts between head operation and second data update operation is circulating interference, described in foundation Second data, which update, operates corresponding first pseudo-operation and the second pseudo-operation, and second pseudo-operation is added to the purpose and is grasped Before making the corresponding data update operation of head serial number of sequence, tail in the purpose sequence of operation is replaced with first pseudo-operation The data at end update operation.
Preferably, it establishes corresponding first pseudo-operation of the second data update operation and the second pseudo-operation includes:
Second data are updated into the corresponding new value of operation and are changed to preset replacement values, obtain the first pseudo-operation;
Second data are updated into the corresponding old value of operation and are changed to preset replacement values, obtain the second pseudo-operation.
Preferably, the uniqueness conflict situations between corresponding new value and the old value warehouse are operated according to the tail, with And the head operates the uniqueness conflict situations between corresponding old value and the new value warehouse, selectivity is to the primitive operation Partial data in sequence updates operation and is reordered and/or established pseudo-operation, obtains the purpose sequence of operation further include:
When the type that conflicts between head operation and second data update operation is unidirectional conflict, in the original In the beginning sequence of operation, it is processed for updating second data and updating the state of operation;
The data to conflict with the new value Existence and uniquenss that second data update operation are nullified from the old value warehouse Update operation;
Second data are updated into the corresponding data update behaviour of head serial number that operation is added to the purpose sequence of operation Before work, updating second data and updating operation is that head operates.
Preferably, judge to determine that the head operation updates the type that conflicts between operation with second data and includes:
Judge to determine second data update operation it is whether existing in the purpose sequence of operation;
If it exists, then it is circulating interference that the head operation, which updates the type that conflicts between operation with second data,;
If it does not exist, then it is unidirectional conflict that the head operation, which updates the type that conflicts between operation with second data,.
It is another aspect of this invention to provide that providing a kind of device, including at least one processor;And with it is described extremely The memory of few processor communication connection;Wherein, the memory, which is stored with, to be executed by least one described processor Instruction, described instruction is arranged to carry out method of the present invention by program.
In general, through the invention it is contemplated above technical scheme is compared with the prior art, have following beneficial to effect Fruit: the present invention provides a kind of pair of data and updates the method that operation is ranked up recombination, this method comprises: obtaining source table and reference Table obtains increment list according to source table and referring to table, wherein includes that multi-group data updates operation in increment list;To in increment list Multi-group data updates operation and is sorted in advance, obtains primitive operation sequence;It parses each data in primitive operation sequence and updates operation Between conflict situations, according to each data update operation between conflict situations, selectivity to the part in primitive operation sequence Data update operation and are reordered and/or established pseudo-operation, obtain the purpose sequence of operation, to be carried out according to the purpose sequence of operation Incremental data is synchronous.Method of the invention is ranked up by operating to update, or legacy data is replaced with and can not be occurred Value after colliding data is completed to update, then would be impossible to occurrence and be updated to target value, completes the recombination to operation is updated, from And realize and the one group of update operation for violating unique constraints is handled, execution can be smoothly completed, root is guaranteed It is synchronous that data increment is carried out according to the update sequence of operation after sequence recombination.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, will make below to required in the embodiment of the present invention Attached drawing is briefly described.It should be evident that drawings described below is only some embodiments of the present invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is provenance table provided in an embodiment of the present invention and the structural schematic diagram referring to table;
Fig. 2 is that the embodiment of the present invention provides source table in Fig. 1 and the structural schematic diagram referring to the corresponding increment list of table;
Fig. 3 is another provenance table provided in an embodiment of the present invention and the structural schematic diagram referring to table;
Fig. 4 is source table and the structural schematic diagram referring to the corresponding increment list of table in Fig. 3 provided in an embodiment of the present invention;
Fig. 5 is the process signal that a kind of pair of data provided in an embodiment of the present invention update that operation is ranked up the method for recombination Figure;
Fig. 6 is the detailed process signal that a kind of pair of data provided in an embodiment of the present invention update that operation is ranked up recombination Figure;
Fig. 7 is the corresponding old value warehouse of increment list and new value warehouse in Fig. 4 provided in an embodiment of the present invention;
Fig. 8 a is the first procedure chart when being ranked up recombination to the primitive operation sequence in Fig. 4;
Fig. 8 b is the second procedure chart when being ranked up recombination to the primitive operation sequence in Fig. 4;
Fig. 8 c is third procedure chart when being ranked up recombination to the primitive operation sequence in Fig. 4;
Fig. 8 d is the 4th procedure chart when being ranked up recombination to the primitive operation sequence in Fig. 4;
Fig. 8 e is the 5th procedure chart when being ranked up recombination to the primitive operation sequence in Fig. 4;
Fig. 8 f is the 6th procedure chart when being ranked up recombination to the primitive operation sequence in Fig. 4;
Fig. 8 g is the 7th procedure chart when being ranked up recombination to the primitive operation sequence in Fig. 4;
Fig. 8 h is the 8th procedure chart when being ranked up recombination to the primitive operation sequence in Fig. 4;
Fig. 8 i is the 9th procedure chart when being ranked up recombination to the primitive operation sequence in Fig. 4;
Fig. 8 j is the tenth procedure chart when being ranked up recombination to the primitive operation sequence in Fig. 4;
Fig. 8 k is the 11st procedure chart when being ranked up recombination to the primitive operation sequence in Fig. 4;
Fig. 9 is the structural schematic diagram that the purpose sequence of operation after recombination is ranked up to original behaviour's sequence in Fig. 4;
Figure 10 is a kind of structural schematic diagram of device provided in an embodiment of the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
In addition, as long as technical characteristic involved in the various embodiments of the present invention described below is each other not Constituting conflict can be combined with each other.
Embodiment 1:
The present embodiment provides a kind of pair of data to update the method that operation is ranked up recombination, in this way, solving more The new sequence of operation generates the collision problem for violating unique constraints.
Refering to Fig. 5, the method for the present embodiment includes the following steps:
Step 10: obtaining source table and referring to table, according to the source table and described obtain increment list referring to table, wherein described It include that multi-group data updates operation in increment list.
Wherein, each operation object currently newest value is record in the table of source, shadow table is also referred to as referring to table, records Process values of each operation object in data updating process may be with source table referring to the value in table for same operation object In value it is equal, it is also possible to it is unequal, depending on specifically whether being updated by data.
Wherein, data update operation for modification operation, and each group of data update the new value of operation note corresponding operating object And old value.In the present embodiment, increment list be positioned by uniquely arranging, compare source table and referring to table data difference and obtain It arrives.Wherein, an operation is uniquely classified as to the unique identification of picture, it can be understood as ID number, for example, in figs. 3 and 4, " ID Corresponding number in column ", the unique identification of as each operation object, to distinguish different operation objects.
It is identical as the value in purpose table referring to table before carrying out incremental data and synchronizing, when carrying out data update, according to Data are updated referring to table and increment list, so that purpose table is identical with source table, realize that data are synchronous.
Step 11: operation being updated to the multi-group data in the increment list and is sorted in advance, primitive operation sequence is obtained.
Wherein, operation is updated comprising multi-group data in the increment list, operation is updated to each group of data and carries out assignment, is made Unique identification of the operation in primitive operation sequence is updated for the data, updates operation to distinguish different data.Wherein, every group Data update the new value that operation includes (UN) after the old value and modification of (UO) before modifying, specifically can be according to each operation object Unique column are associated.
Such as Fig. 4, primitive operation sequence includes that data update operation A~K, wherein A~K is that each data update operation Institute's assigned value, for each data update operate, including modification before (UO) old value and modification after (UN) new value.For example, The old value that data update before operation A, PHONE column modification is 1876666001, and modified new value is 1876666008.
Wherein it is possible to be carried out according to ID (unique column number) size that every group of data update the corresponding operation object of operation pre- Sequence, alternatively, being sorted in advance by other means, here, being not specifically limited.As the sequence of Fig. 4, primitive operation sequence are A->K。
In the present embodiment, in primitive operation sequence, there are data that front executes and update operation and execute below Data update the case where conflict is generated between operation, that is, the new value in previous action is identical as the old value in latter acts, and Old value is to arrange referring to already present value in table (purpose table), and with aforementioned new value in same unique constraint, when according to primitive operation Sequence carries out incremental data and synchronizes, and can generate data collision, lead to failure of data synchronization.
Step 12: parsing each data in the primitive operation sequence and update the conflict situations between operating, according to each data The conflict situations between operation are updated, selectivity updates operation to the partial data in the primitive operation sequence and reorders And/or pseudo-operation is established, and the purpose sequence of operation is obtained, it is synchronous to carry out incremental data according to the purpose sequence of operation.
Scheme for a clearer understanding of the present invention first explains unidirectional conflict and circulating interference.
Unidirectional conflict: it in existence anduniquess constraint index column, updates and operates for a certain data, which updates operation pair The new value answered and another data update that operate corresponding old value equal, and the data update operate corresponding old value with it is aforementioned another Data update the corresponding new value of operation it is unequal when, the two data update operation and there is unidirectional conflict.For example, in Fig. 4, data It is equal to update old value (187666008) and the data update operation new value (187666008) of A of operation H, and data update operation The old value (187666001) that new value (187666018) and the data of H update operation A is unequal, then data update operation H and number There is unidirectional conflict according to operation A is updated, first carries out data and update operation H, then execute data manipulation A to release unidirectional conflict.
Circulating interference: two data, which update, can generate circulating interference between operation, and three data update also can between operation Circulating interference is generated, even more data, which update, can also generate circulating interference between operation.
Two data update the circulating interference between operation: in existence anduniquess constraint index column, more for a certain data It newly operates, it is equal which updates the corresponding new value of operation old value corresponding with the update operation of another data, and the data update Operate corresponding old value and aforementioned another data update the corresponding new value of operation it is equal when, the two data update operation in the presence of following Ring conflict.For example, data update the old value (187666002) of operation B and data update the new value for operating G in Fig. 4 (187666002) equal, and data update the new old value for being worth (187666007) and updating operation G with data of operation B (187666007) equal, then data update operation B and data update operation G there are circulating interference, need to establish pseudo-operation, solve Except circulating interference.
Three data update the circulating interference between operation: in existence anduniquess constraint index column, more for a certain data It newly operates, the corresponding new value of data update operation old value corresponding with the update operation of another data is equal, data update behaviour Make corresponding old value and another data and update to operate that corresponding new value is equal, aforementioned another data update operation it is new be worth with it is aforementioned The old value that another data update operation is equal, then there are circulating interferences for these three data update operation.For example, data update operation The new value (187666004) of C is equal with data update operation old value (1876660004) of D, and data update the old value of operation C (187666003) equal with the data update operation new value (1876660003) of E, data update the new value of operation D (187666005) it is equal that operation old value (1876660005) of E is updated with data, data update operation C, data update operation D There are circulating interferences between data update operation E.In the present embodiment, during the data for Existence and uniquenss constraint update, Each data update between operation there may be conflict situations in primitive operation sequence, need to be updated between operation according to each data Conflict situations release each data and update the conflict between operating, and are synchronized with guaranteeing to carry out incremental data.In optional scheme In, when between the update operation of each data in the presence of unidirectionally conflict, it is suitable to adjust the execution that the data update for existing and unidirectionally conflicting operates Sequence obtains the purpose sequence of operation to release unidirectional conflict, and it is synchronous then to carry out incremental data according to the purpose sequence of operation.
For example, data update operation A and data update operation H and there is unidirectional conflict in Fig. 4, updated when first carrying out data When operating A, 1876666008 in unique constraint index column (PHONE) understand Existence and uniquenss conflicts, lead to data simultaneously operating It can not execute, for this solution it is required that adjustment data update operation A's and data update operation H executes sequence, first carry out Data update operation A, then execute data and update operation H, can release unidirectional conflict.
In another optional scheme, when there are when circulating interference, only adjust data to update behaviour in primitive operation sequence The sequence of work can not release conflict.Specifically, when there are when circulating interference, being recycled existing between each data update operation The data of conflict update in operation, establish the pseudo-operation that a data update operation, and the pseudo-operation is added to purpose operation In sequence, to release circulating interference.
Wherein, pseudo-operation refers to that the value that data are updated Existence and uniquenss conflict in operation replaces with and can not occur Value, for example, the corresponding value of telephone number is replaced with 0.
In the alternative, pseudo-operation includes the first pseudo-operation and the second pseudo-operation, wherein the first pseudo-operation is should Data update the corresponding new value of operation and are changed to preset replacement values, and obtaining the first pseudo-operation, (ID is 7 by such as Fig. 4 and Fig. 9 The new value of the telephone number of operation object is changed to 0, i.e. G puppet 1 in Fig. 9);Second pseudo-operation is that the data are updated operation pair The old value answered is changed to preset replacement values, obtains the second pseudo-operation (such as Fig. 4 and Fig. 9, by the phone of the ID operation object for being 7 The old value of number is changed to 0, i.e. G puppet 2 in Fig. 9).First pseudo-operation and the second pseudo-operation are added separately to corresponding position Preset replacement values are reduced to the data more by the second pseudo-operation so that releasing circulating interference by the first pseudo-operation by place The new value newly operated, so that the entire purpose sequence of operation be enable to smoothly complete execution.
Under practical application scene, in primitive operation sequence, may occur unidirectionally conflict and circulating interference simultaneously, this When need combine aforementioned two schemes primitive operation sequence is handled, obtain the purpose sequence of operation.The method of the present embodiment By to update operation be ranked up, or by legacy data be changed to can not occurrence, after colliding data complete update after, then It would be impossible to occurrence and be updated to target value (new value), complete to the recombination of operation is updated, to realize to violation uniqueness One group of update operation of constraint is handled, and execution can be smoothly completed, and is guaranteed according to the update behaviour after sequence recombination It is synchronous to make sequence progress data increment.
Method of the invention mainly has the advantage that (1) by carrying out in the presence of the update sequence of operation unidirectionally to conflict Sequence allows and other update operator precedences for smoothly executing of operation that update is hindered to execute, and enables entirely to update the sequence of operation smooth It completes to execute.(2) for there are the update sequence of operation of circulating interference, simple sequence can not be solved the problems, such as;At this point, by pair Related data updates operation and is recombinated, and it is (pseudo- that a certain data update operation in circulating interference is decomposed into two updates operations Operation), the data are first updated into the old value in operation and are revised as it is not possible that occurrence, avoids it to other numbers in circulating interference It causes to hinder according to operation is updated;Other data in conflict to be recycled update operation and are finished, then would be impossible to occurrence and repair It is changed to the data and updates new value in operation, smoothly complete execution to enable entirely to update the sequence of operation.
In conjunction with Fig. 6, one of achievable mode of the method for the present embodiment is specifically described below.
Firstly, constructing the purpose sequence of operation, old value warehouse and being newly worth warehouse, wherein in this step, the purpose sequence of operation For the empty sequence of operation.
The process in building old value warehouse and new value warehouse is as follows: obtaining in the increment list old value of each operation object and newly Value;The old value of each operation object is updated operation foundation with corresponding data to be associated with, forms old value warehouse, by each operation pair The new value of elephant updates operation foundation with corresponding data and is associated with, and forms new value warehouse.In the increment list, one group of data updates A corresponding operation object is operated, it includes the old value and modified new value before modification that one group of number, which updates operation,.
As shown in fig. 7, the chart in left side is in the corresponding increment list of Fig. 4, each data, which update, operates corresponding operation object Value (old value) before modification is updated operation for all data in primitive operation sequence, is updated with data in old value warehouse The hashCode value of the old value in unique constraint column in operation is key, updates operation with data for value, constitutes key-value pair, storage In old value warehouse.Wherein, the data structure in old value warehouse is shown in the right side chart of Fig. 7.
As shown in fig. 7, the chart on right side is in the corresponding increment list of Fig. 4, each data, which update, operates corresponding operation object Modified value (new value) is updated operation for all data in primitive operation sequence, is updated with data in newly value warehouse The hashCode value being newly worth in unique constraint column in operation is key, updates operation with data for value, constitutes key-value pair, storage In newly value warehouse.Wherein, the data structure in new value warehouse is shown in the right side chart of Fig. 7.
After the data structure in the data structure for creating old value warehouse and new value warehouse, by the institute in primitive operation sequence There are data to update operation to be registered in new value warehouse and old value warehouse.
In the present embodiment, step 13 specifically comprises the following steps:
Judge whether primitive operation sequence is empty, if primitive operation sequence is not sky, parses data and updates between operation Conflict relationship obtain object run sequence to be reordered and to be recombinated.Wherein, each pair of data update operation sequence After column are ranked up, the state that the data update operation will be updated, when all data in the primitive operation sequence update behaviour When work is processed state, the primitive operation sequence is sky, that is, all data update operation and are registered to purpose operation In sequence.In the present embodiment, if primitive operation sequence is sky, illustrate that sequence has been completed with regrouping process, all operations are all It is transferred into the purpose sequence of operation, then returns to the purpose sequence of operation, inverted order successively executes data from the purpose sequence of operation Operation is updated, it is synchronous to carry out data increment.
It is specifically described below, the conflict relationship that parsing data update between operation obtains to be reordered and to be recombinated The realization process of object run sequence.
When the primitive operation sequence is not sky, a data are taken out from the primitive operation sequence and update operation, are made For updating target data operation;Then, judge to determine that institute's target states the state that data update operation, when the updating target data When operation is untreated state, the updating target data operation is nullified in the old value warehouse and the new value warehouse.Its In, cancellation above-mentioned is referred to operating the updating target data and be deleted from the old value warehouse and the new value warehouse.When It is " processed " state that a certain data, which update operation, then illustrates that the operation has been transferred in the purpose sequence of operation and at work Reason removes directly from primitive operation sequence.
Then, updating target data operation is added to the tail portion of the purpose sequence of operation, updates the target Updating operation is head operation and tail operation, updates the target update and operates corresponding serial number head serial number.
Finally, the uniqueness conflict situations between corresponding new value and the old value warehouse are operated according to the tail, and The head operates the uniqueness conflict situations between corresponding old value and the new value warehouse, and selectivity is to the primitive operation sequence Partial data in column updates operation and is reordered and/or established pseudo-operation, obtains the purpose sequence of operation.
In the present embodiment, " operation to conflict with tail operation Existence and uniquenss is searched for from old value warehouse " is first carried out Judge branch, detailed process is as follows:
Judgement determines in the old value warehouse, if there is new value Existence and uniquenss conflict corresponding with tail operation The first data update operation;If it exists, illustrate that the new value of tail operation is identical as the old value that the first data update operation, tail operation If being executed before first data update operation, conflict can be generated, is handled.Institute is then nullified in old value warehouse It states the first data and updates operation, in the primitive operation sequence, updating first data and updating the state of operation is to have located Reason, and the data that cancellation conflicts with first data update operation Existence and uniquenss from new value warehouse are updated and are operated.
First data are updated into operation addition at the end of the purpose sequence of operation, update first data more New operation is that tail operates.It is right to then proceed to execution " operation to conflict with tail operation Existence and uniquenss is searched for from old value warehouse " institute The process answered forms circulation branch road, until there is no new values corresponding with tail operation to exist only in the old value warehouse First data of one property conflict update operation.
In the old value warehouse, there is no the first data that corresponding new value Existence and uniquenss conflict is operated with the tail When updating operation, illustrates that the tail operation will not generate conflict when being executed, then execute and " search for from new value warehouse and operated with head The corresponding judgement branch of the operation of Existence and uniquenss conflict ", the specific implementation process is as follows:
Judgement determines in the new value warehouse, if there is old value Existence and uniquenss conflict corresponding with head operation The second data update operation;If it does not exist, then at the step of coming back to " judging whether primitive operation sequence is empty ", according to Process shown in fig. 6 executes.
If it exists, then second data are nullified in the new value warehouse and update operation, judge to determine the head operation The type that conflicts between operation is updated with second data.
When the type that conflicts between head operation and second data update operation is circulating interference, described in foundation Second data, which update, operates corresponding first pseudo-operation and the second pseudo-operation, and second pseudo-operation is added to the purpose and is grasped Before making the corresponding data update operation of head serial number of sequence, tail in the purpose sequence of operation is replaced with first pseudo-operation The data at end update operation, then, continue to execute " operation that search conflicts with head operation Existence and uniquenss from new value warehouse " Corresponding judgement branch forms circulation branch road, until old value corresponding with head operation is not present in the new value warehouse Second data of Existence and uniquenss conflict update operation.
Wherein, establish second data update operate corresponding first pseudo-operation and the second pseudo-operation include: will be described Second data update the corresponding new value of operation and are changed to preset replacement values, obtain the first pseudo-operation;More by second data It newly operates corresponding old value and is changed to preset replacement values, obtain the second pseudo-operation.Wherein, preset replacement values are that impossible go out Value in present unique constraint column specifically can be according to for example, preset replacement values are 0 when unique constraint is classified as telephone number Depending on actual conditions, here, being not specifically limited.
When the type that conflicts between head operation and second data update operation is unidirectional conflict, in the original In the beginning sequence of operation, it is processed for updating second data and updating the state of operation;Cancellation and institute from the old value warehouse The data for stating the new value Existence and uniquenss conflict that the second data update operation update operation;Second data are updated operation to add It adds to before the corresponding data update operation of head serial number of the purpose sequence of operation, updating the second data update operation is Then head operation continues to execute " search for from new value warehouse and head operates the operation of Existence and uniquenss conflict " corresponding judgement Branch forms circulation branch road, until old value Existence and uniquenss corresponding with head operation is not present in the new value warehouse Second data of conflict update operation.
In the alternative, it can judge that determining that the head operation is updated with second data grasps as follows Conflict type between work.Specifically, judge to determine that second data update operation and the tail in the current purpose sequence of operation Whether operation is that same data update operation;If so, the head operation updates conflicting between operation with second data Type is circulating interference;If it is not, it is unidirectional that then the head operation, which updates the type that conflicts between operation with second data, Conflict.
Aforementioned schemes, for more complicated sequence, can have inaccuracy, preferred in actual use In scheme, it can judge to determine that the head operation updates the class that conflicts between operation with second data as follows Type.Specifically, judge to determine that second data update whether operation is present in the purpose sequence of operation;If it exists, It is circulating interference that then the head operation, which updates the type that conflicts between operation with second data,;If it does not exist, then the head Operating the type that conflicts updated between operation with second data is unidirectional conflict.
Herein, it should be noted that it is original that the first data above-mentioned, which update operation and second data update operation, Data in the beginning sequence of operation update operation, only to facilitate the operation of description Existence and uniquenss conflict, pass through just now " the One " and " second " differentiation.
Here, it is emphasized that the updating target data operation of the present embodiment, first count in process implementation procedure It can be changed according to the implementation procedure of process according to operation is updated well with the update operation of the second data, but, target data is more It is the operation being present in primitive operation sequence that new operation, the update of the first data, which operate good and the second data to update operation,.
Meanwhile the position of head operation, tail operation and head serial number can also change with the execution of process and dynamically, have Depending on body is by the method for the present embodiment and the primitive operation sequence of actual needs sequence recombination.
It is different from the prior art, method of the invention is ranked up by operating to update, or legacy data is replaced with It is not possible that occurrence, after colliding data is completed to update, then would be impossible to occurrence and is updated to target value, complete to update operation Recombination, thus realize to violate unique constraints one group of update operation handle, executions can be smoothly completed, guarantor It is synchronous that card can carry out data increment according to the update sequence of operation after sequence recombination.
Embodiment 2:
The aforementioned realization process for essentially describing method of the invention, in order to easier visualization explanation the present invention, below with Source table illustrated in fig. 3 and referring to table, increment list illustrated in fig. 4 and old value warehouse illustrated in fig. 7 and new value warehouse, citing Illustrate the realization process of above-described embodiment.Following operations refers to that data update operation, is abbreviated as operating for ease of description.
Process one: taking out operation A (updating target data operation) from primitive operation sequence, and operation A is not " processed ", Operation A is nullified in old value warehouse and in new value warehouse, label A is head operation, tail operation, and head serial number operates A and grasps in purpose Make the sequence number in sequence.The update figure of this process is as shown in Figure 8 a.
Process two: the operation to conflict with the new value Existence and uniquenss of tail operation A is searched in old value warehouse, finds operation H (the first data update operation) nullify operation H from old value warehouse, and marking operation H is processed in primitive operation sequence, from new The operation (operation A is canceled in aforementioned process) to conflict with operation H Existence and uniquenss is nullified in value warehouse, updating tail operation is H.The update figure of this process is as shown in Figure 8 b.
Process three: searching for the operation to conflict with the new value Existence and uniquenss of tail operation H in old value warehouse, do not find, The operation that search conflicts with the old value Existence and uniquenss of head operation A in newly value warehouse, does not find, takes from primitive operation sequence B (updating target data operation) is operated out, marking operation B is head operation, tail operation, and head serial number operates B and operates sequence in purpose Sequence number in column.The update figure of this process is as shown in Figure 8 c.
Process four: the operation to conflict with the new value Existence and uniquenss of tail operation B is searched in old value warehouse, finds operation G (the first data update operation) nullify operation G from old value warehouse, and marking operation G is processed in primitive operation sequence, from new The operation (operation B has been canceled in aforementioned process) to conflict with the old value Existence and uniquenss of operation G is nullified in value warehouse, more New tail operation is G.The update figure of this process such as Fig. 8 d's is shown.
Process five: searching for the operation to conflict with the new value Existence and uniquenss of tail operation G from old value warehouse, do not find, from The operation to conflict with the old value Existence and uniquenss of head operation B is searched in new value warehouse, finding operation G, (the second data update behaviour Make), operation G is nullified in new value warehouse, circulating interference creates pseudo-operation G1 (the first pseudo-operation) and pseudo-operation G2 (the second puppet Operation), pseudo-operation G2 is added at the head serial number of the purpose sequence of operation (be the equal of will operate G2 be added to operate B it Before), with the tail end of the pseudo-operation G1 replacement purpose sequence of operation.The update figure of this process is shown such as Fig. 8 e, wherein G puppet 1 is the One pseudo-operation (pseudo-operation G1), G puppet 2 are the second pseudo-operation (pseudo-operation G2).
Process six: the operation that search conflicts with the old value Existence and uniquenss of head operation B from new value warehouse is not found, From primitive operation sequence take out operation C (updating target data operation), operation C be not processed state, old value warehouse with Cancellation operates C in new value warehouse, and marking operation C is processed in primitive operation sequence, and updating operation C is that tail operates, head operates, Head serial number is updated to serial number of the operation C in the purpose sequence of operation, operation C is added to the tail end of the purpose sequence of operation.This The update figure of process such as Fig. 8 f's is shown.
Process seven: searched for from old value warehouse with the operation that conflicts of new value Existence and uniquenss of operation C, find and operate D (the One data update operation), operation D is nullified from old value warehouse, marking operation D is processed in primitive operation sequence, from new value The operation C to conflict with the old value Existence and uniquenss of operation D is nullified in operation library, and operation D is updated to tail operation.This process is more New figure such as Fig. 8 g's is shown.
Process eight: the operation to conflict with the new value Existence and uniquenss of tail operation D is searched for from old value warehouse, finds operation E (the first data update operation) nullify operation E from old value warehouse, and marking operation E is processed in primitive operation sequence, from new The operation D to conflict with the old value Existence and uniquenss of operation E is nullified in value warehouse, and operation E is updated to tail operation.This process is more New figure such as Fig. 8 h's is shown.
Process nine: searching for the operation to conflict with the new value Existence and uniquenss of tail operation E from old value warehouse, do not find, from The operation that search conflicts with the old value Existence and uniquenss of head operation C in new value warehouse, finding operation E, (the second data update behaviour Make), operation E, circulating interference, the pseudo-operation E1 (the first pseudo-operation) and pseudo-operation E2 of creation operation E are nullified from new value warehouse (the second pseudo-operation) replaces pseudo-operation E1 for the tail end of the purpose sequence of operation before pseudo-operation E2 is added to operation C.This The update figure of process such as Fig. 8 i's is shown, wherein E puppet 1 is the first pseudo-operation (pseudo-operation E1), and E puppet 2 is (pseudo- for the second pseudo-operation Operate E2).
Process ten: the operation that search conflicts with the old value Existence and uniquenss of head operation C from new value warehouse is not found, is taken F (updating target data operation) is operated out, operation F is nullified in old value warehouse and new value warehouse, operation F is added to object run The tail end of sequence, updating operation F is head operation, tail operation, and head serial number operates serial number of the F in purpose operation.This process Update the shown of figure such as Fig. 8 j.
Process 11: searching for the operation to conflict with the new value Existence and uniquenss of tail operation F from old value warehouse, do not find, The operation that search conflicts with the old value Existence and uniquenss of operation F from new value warehouse, finding operation K, (the second data update behaviour Make), operation K is nullified in newly value warehouse, unidirectional to conflict, marking operation K is processed, is nullified from old value warehouse with operation K's The operation of new value Existence and uniquenss conflict updates operation K by operation K addition before operating F for head operation.This process is more New figure such as Fig. 8 k's is shown.
Process 12: the operation that search conflicts with the old value Existence and uniquenss of head operation K from new value warehouse is not found, Judge whether primitive operation sequence is sky, it is that then the primitive operation sequence is sky that operation A~operation K, which is marked, is returned The purpose sequence of operation is returned, the purpose sequence of operation is successively executed into data according to inverted order and updates operation, to carry out data increment It is synchronous.
It is that the method according to the invention carries out the purpose sequence of operation after recombination sequence such as Fig. 9, is obtaining purpose operation sequence After column, executed according to the inverted order sequence of the purpose sequence of operation, it is synchronous to carry out incremental data.
The specific embodiment of 1 method and embodiment 2 in conjunction with the embodiments, the present invention are illustrated to update data and be operated The method for being ranked up recombination, method of the invention mainly have the advantage that (1) by grasping in the presence of the update unidirectionally to conflict It is ranked up as sequence, allows and hinder other update operator precedence execution for updating operation and smoothly executing, make entirely to update operation sequence Column can smoothly complete execution.(2) for there are the update sequence of operation of circulating interference, simple sequence can not be solved the problems, such as; At this point, being recombinated by updating operation to related data, a certain data in circulating interference are updated into operation and are decomposed into two Operation (pseudo-operation) is updated, the data are first updated into the old value in operation and are revised as it is not possible that occurrence, avoids it to circulating flushing Other data in prominent update operation and cause to hinder;Other data in conflict to be recycled update operation and are finished, then will not It is likely to occur value and is revised as the data and update new value in operation, held to enable entirely to update the sequence of operation to smoothly complete Row.
Embodiment 3:
Referring to Fig. 10, Figure 10 is a kind of structural schematic diagram of device provided in an embodiment of the present invention.The dress of the present embodiment It sets including one or more processors 41 and memory 42.Wherein, in Figure 10 by taking a processor 41 as an example.
Processor 41 can be connected with memory 42 by bus or other modes, to be connected as by bus in Figure 10 Example.
Memory 42 is as a kind of non-volatile computer based on the method for being ranked up recombination to data update operation Readable storage medium storing program for executing can be used for storing non-volatile software program, non-volatile computer executable program and module, strictly according to the facts It applies updating in example 1 to data and operates the method for being ranked up recombination and corresponding program instruction.Processor 41 passes through operation Non-volatile software program, instruction and the module being stored in memory 42 are arranged thereby executing operation is updated to data The various function application and data processing of the method for sequence recombination, that realizes embodiment 1 is ranked up weight to data update operation The function of the method for group.
Wherein, memory 42 may include high-speed random access memory, can also include nonvolatile memory, such as At least one disk memory, flush memory device or other non-volatile solid state memory parts.In some embodiments, it stores Optional device 42 includes the memory remotely located relative to processor 41, these remote memories can pass through network connection to place Manage device 41.The example of above-mentioned network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
About updating to data, the method that operation is ranked up recombination please refers to FIG. 1 to FIG. 3 and relevant verbal description exists This, repeats no more.
It is worth noting that in information exchange, implementation procedure between module, unit in above-mentioned apparatus and system etc. Hold, due to being based on same design with processing method embodiment of the invention, particular content be can be found in embodiment of the present invention method Narration, details are not described herein again.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of embodiment is can to lead to Program is crossed to instruct relevant hardware and complete, which can be stored in a computer readable storage medium, storage medium It may include: read-only memory (Read Only Memory, be abbreviated as ROM), random access memory (Random Access Memory is abbreviated as RAM), disk or CD etc..
As it will be easily appreciated by one skilled in the art that the foregoing is merely illustrative of the preferred embodiments of the present invention, not to The limitation present invention, any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should all include Within protection scope of the present invention.

Claims (10)

1. a kind of pair of data update the method that operation is ranked up recombination, which is characterized in that the described method includes:
Acquisition source table and referring to table according to the source table and described obtains increment list referring to table, wherein include in the increment list Multi-group data updates operation;
Operation is updated to the multi-group data in the increment list to be sorted in advance, and primitive operation sequence is obtained;
It parses each data in the primitive operation sequence and updates the conflict situations between operating, updated between operation according to each data Conflict situations, selectivity in the primitive operation sequence partial data update operation is reordered and/or is established puppet Operation, obtains the purpose sequence of operation, synchronous to carry out incremental data according to the purpose sequence of operation.
2. the method according to claim 1, wherein parsing each data in the primitive operation sequence updates operation Between conflict situations, according to each data update operation between conflict situations, selectivity in the primitive operation sequence Partial data updates operation and is reordered and/or established pseudo-operation, obtains the purpose sequence of operation, to be operated according to the purpose Sequence progress incremental data, which synchronizes, includes:
It parses each data in the primitive operation sequence and updates the conflict situations between operating;
When between the update operation of each data in the presence of unidirectionally conflict, it is suitable to adjust the execution that the data update for existing and unidirectionally conflicting operates Sequence, to release unidirectional conflict;And/or
When there are when circulating interference, there are the data of circulating interference to update in operation, establishing one between each data update operation Data update the pseudo-operation of operation, and the pseudo-operation is added in the purpose sequence of operation, to release circulating interference.
3. the method according to claim 1, wherein one group of data updates operation and corresponds in the increment list One operation object, the method also includes:
Obtain the old value of each operation object and new value in the increment list;
The old value of each operation object is updated operation foundation with corresponding data to be associated with, old value warehouse is formed, by each operation The new value of object updates operation foundation with corresponding data and is associated with, and forms new value warehouse.
4. according to the method described in claim 3, it is characterized in that, parsing each data in the primitive operation sequence updates operation Between conflict situations, according to each data update operation between conflict situations, selectivity in the primitive operation sequence Partial data updates operation and is reordered and/or established pseudo-operation, and obtaining the purpose sequence of operation includes:
A data are taken out from the primitive operation sequence and update operation, are operated as updating target data;
Judge to determine that institute's target states the state that data update operation, when updating target data operation is untreated state, The updating target data operation is nullified in the old value warehouse and the new value warehouse;
Updating target data operation is added to the tail portion of the purpose sequence of operation, updating the target update operation is Head operation and tail operation, update the target update and operate corresponding serial number head serial number;
The uniqueness conflict situations and head operation between corresponding new value and the old value warehouse are operated according to the tail Uniqueness conflict situations between corresponding old value and the new value warehouse, selectivity is to the part in the primitive operation sequence Data update operation and are reordered and/or established pseudo-operation, obtain the purpose sequence of operation.
5. according to the method described in claim 4, it is characterized in that, according to the corresponding new value of tail operation and the old value storehouse The uniqueness that uniqueness conflict situations and the head between library operate between corresponding old value and the new value warehouse conflicts Situation, selectivity update operation to the partial data in the primitive operation sequence and are reordered and/or established pseudo-operation, obtain Include: to the purpose sequence of operation
Judgement determines in the old value warehouse, if there is that corresponding new value Existence and uniquenss conflict is operated with the tail One data update operation;
If it exists, then first data are nullified in old value warehouse and update operation, in the primitive operation sequence, update institute It is processed for stating the first data to update the state of operation;
First data are updated into operation addition at the end of the purpose sequence of operation, first data is updated and updates behaviour It is operated as tail.
6. according to the method described in claim 5, it is characterized in that, according to the corresponding new value of tail operation and the old value storehouse The uniqueness that uniqueness conflict situations and the head between library operate between corresponding old value and the new value warehouse conflicts Situation, selectivity update operation to the partial data in the primitive operation sequence and are reordered and/or established pseudo-operation, obtain To the purpose sequence of operation further include:
If it does not exist, then judge to determine in the new value warehouse, if there is old value corresponding with head operation and exist only Second data of one property conflict update operation;
If it exists, then second data are nullified in the new value warehouse updates operation;
Judgement determines that the head operation updates the type that conflicts between operation with second data;
When the type that conflicts between head operation and second data update operation is circulating interference, described second is established Data, which update, operates corresponding first pseudo-operation and the second pseudo-operation, and second pseudo-operation is added to the purpose and operates sequence Before the corresponding data of the head serial number of column update operation, tail end in the purpose sequence of operation is replaced with first pseudo-operation Data update operation.
7. method according to claim 6, which is characterized in that establish second data and update the corresponding first pseudo- behaviour of operation Make and the second pseudo-operation includes:
Second data are updated into the corresponding new value of operation and are changed to preset replacement values, obtain the first pseudo-operation;
Second data are updated into the corresponding old value of operation and are changed to preset replacement values, obtain the second pseudo-operation.
8. according to the method described in claim 6, it is characterized in that, according to the corresponding new value of tail operation and the old value storehouse The uniqueness that uniqueness conflict situations and the head between library operate between corresponding old value and the new value warehouse conflicts Situation, selectivity update operation to the partial data in the primitive operation sequence and are reordered and/or established pseudo-operation, obtain To the purpose sequence of operation further include:
When the type that conflicts between head operation and second data update operation is unidirectional conflict, in the original behaviour Make in sequence, it is processed for updating second data and updating the state of operation;
The data to conflict with the new value Existence and uniquenss that second data update operation are nullified from the old value warehouse to update Operation;
Second data are updated and operate the corresponding data update operation of head serial number for being added to the purpose sequence of operation Before, updating second data and updating operation is that head operates.
9. according to the described in any item methods of claim 6~8, which is characterized in that judgement determines head operation and described the Two data update the conflict type between operating
Judge to determine that second data update whether operation is present in the purpose sequence of operation;
If it exists, then it is circulating interference that the head operation, which updates the type that conflicts between operation with second data,;
If it does not exist, then it is unidirectional conflict that the head operation, which updates the type that conflicts between operation with second data,.
10. a kind of device, which is characterized in that including at least one processor;And connect at least one described processor communication The memory connect;Wherein, the memory is stored with the instruction that can be executed by least one described processor, and described instruction is by journey Sequence is arranged to carry out method as described in any one of claims 1 to 9.
CN201910645615.2A 2019-07-17 2019-07-17 Method for sequencing and recombining data updating operation and corresponding device Active CN110377612B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910645615.2A CN110377612B (en) 2019-07-17 2019-07-17 Method for sequencing and recombining data updating operation and corresponding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910645615.2A CN110377612B (en) 2019-07-17 2019-07-17 Method for sequencing and recombining data updating operation and corresponding device

Publications (2)

Publication Number Publication Date
CN110377612A true CN110377612A (en) 2019-10-25
CN110377612B CN110377612B (en) 2020-12-22

Family

ID=68253645

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910645615.2A Active CN110377612B (en) 2019-07-17 2019-07-17 Method for sequencing and recombining data updating operation and corresponding device

Country Status (1)

Country Link
CN (1) CN110377612B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030088615A1 (en) * 2001-11-06 2003-05-08 Gordon Good Update resolution procedure for a directory server
CN102279873A (en) * 2010-06-11 2011-12-14 微软公司 Unified concurrent changes to data, schema, and application
CN103514031A (en) * 2012-11-26 2014-01-15 Tcl集团股份有限公司 Method and system for processing file name conflict in multi-terminal concurrent operation
CN105224527A (en) * 2014-05-27 2016-01-06 北京宸瑞科技有限公司 Be applicable to the general ETL method of multiple object table update mode
CN106648840A (en) * 2016-08-30 2017-05-10 周烜 Method and apparatus for determining time sequence between transactions
CN107665219A (en) * 2016-07-28 2018-02-06 华为技术有限公司 A kind of blog management method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030088615A1 (en) * 2001-11-06 2003-05-08 Gordon Good Update resolution procedure for a directory server
CN102279873A (en) * 2010-06-11 2011-12-14 微软公司 Unified concurrent changes to data, schema, and application
CN103514031A (en) * 2012-11-26 2014-01-15 Tcl集团股份有限公司 Method and system for processing file name conflict in multi-terminal concurrent operation
CN105224527A (en) * 2014-05-27 2016-01-06 北京宸瑞科技有限公司 Be applicable to the general ETL method of multiple object table update mode
CN107665219A (en) * 2016-07-28 2018-02-06 华为技术有限公司 A kind of blog management method and device
CN106648840A (en) * 2016-08-30 2017-05-10 周烜 Method and apparatus for determining time sequence between transactions

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JUSTINSTOLLE: "Updating database records with unique constraint", 《HTTPS://STACKOVERFLOW.COM/QUESTIONS/4798272》 *

Also Published As

Publication number Publication date
CN110377612B (en) 2020-12-22

Similar Documents

Publication Publication Date Title
CN109885581A (en) Synchronous method, device, equipment and the storage medium of database
CN109241175A (en) Method of data synchronization, device, storage medium and electronic equipment
CN110209728B (en) Distributed heterogeneous database synchronization method, electronic equipment and storage medium
CN105224527B (en) General ETL methods suitable for a variety of purpose table update modes
CN111008521B (en) Method, device and computer storage medium for generating wide table
CN112286941B (en) Big data synchronization method and device based on Binlog + HBase + Hive
CN104270424B (en) A kind of database synchronization method, server and system
CN103995854A (en) Equipment cross-version upgrading method and device
CN101944114A (en) Data synchronization method between memory database and physical database
CN112130891B (en) Method and equipment for continuously deploying database
CN112000649B (en) Method and device for synchronizing incremental data based on map reduce
CN109189798B (en) Spark-based data synchronous updating method
CN107067200B (en) Operation method and device for bill of material data
CN106777368A (en) Data base query language adaptation method and device, distributed data-storage system
CN111159020B (en) Method and device applied to synchronous software test
CN103593730A (en) Design parameter management system capable of backtracking
CN110377612A (en) A kind of pair of data, which update, operates the method for being ranked up recombination and corresponding device
US20090132473A1 (en) Apparatus, method, and computer program product for processing databases
CN109117173A (en) A kind of configuration file management method based on Item version exploitation
CN110196883A (en) A kind of method of data synchronization and device on business on line without influence
CN105912427A (en) Data disaster tolerance synchronization method and device
CN109726213A (en) A kind of program code conversion method, device, medium and calculate equipment
CN113792026B (en) Method and device for deploying database script and computer-readable storage medium
CN112260948B (en) Multi-core SDN switch flow table management method and system based on batch updating
CN114299764A (en) Linkage change consistency method for civil aviation flight time plan and advance flight plan

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 430000 High-tech Avenue 999, Donghu New Technology Development Zone, Wuhan City, Hubei Province

Applicant after: Wuhan dream database Co.,Ltd.

Address before: 430000 High-tech Avenue 999, Donghu New Technology Development Zone, Wuhan City, Hubei Province

Applicant before: WUHAN DAMENG DATABASE Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220913

Address after: 430073 16-19 / F, building C3, future science and technology building, 999 Gaoxin Avenue, Donghu New Technology Development Zone, Wuhan City, Hubei Province

Patentee after: Wuhan dream database Co.,Ltd.

Patentee after: HUAZHONG University OF SCIENCE AND TECHNOLOGY

Address before: 430000 16-19 / F, building C3, future technology building, 999 Gaoxin Avenue, Donghu New Technology Development Zone, Wuhan, Hubei Province

Patentee before: Wuhan dream database Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230803

Address after: 16-19/F, Building C3, Future Science and Technology Building, No. 999 Gaoxin Avenue, Donghu New Technology Development Zone, Wuhan City, Hubei Province, 430206

Patentee after: Wuhan dream database Co.,Ltd.

Address before: 430073 16-19 / F, building C3, future science and technology building, 999 Gaoxin Avenue, Donghu New Technology Development Zone, Wuhan City, Hubei Province

Patentee before: Wuhan dream database Co.,Ltd.

Patentee before: HUAZHONG University OF SCIENCE AND TECHNOLOGY