CN105989503A - Method and system of on-line transaction system data consistency - Google Patents

Method and system of on-line transaction system data consistency Download PDF

Info

Publication number
CN105989503A
CN105989503A CN201510060800.7A CN201510060800A CN105989503A CN 105989503 A CN105989503 A CN 105989503A CN 201510060800 A CN201510060800 A CN 201510060800A CN 105989503 A CN105989503 A CN 105989503A
Authority
CN
China
Prior art keywords
subsystem
result
renewal
data base
local data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510060800.7A
Other languages
Chinese (zh)
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.)
China Mobile Group Yunnan Co Ltd
Original Assignee
China Mobile Group Yunnan 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 China Mobile Group Yunnan Co Ltd filed Critical China Mobile Group Yunnan Co Ltd
Priority to CN201510060800.7A priority Critical patent/CN105989503A/en
Publication of CN105989503A publication Critical patent/CN105989503A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the invention discloses a method and system of on-line transaction system data consistency. The method comprises the steps: when a first sub system receives a transaction request sent from an external system, the first sub system performs data processing to obtain a first processing result, updates the first processing result to a first local database and obtains a first update time; the first sub system sends a service processing request to a second sub system, wherein the service processing request carries the first processing result and the first update time; the second sub system performs data processing according to the service processing request to obtain a second processing result, updates the second processing result to a second local database, and obtains a second update time; and the second sub system calculates the difference value between the second update time and the first update time, determines whether the difference value exceeds a set threshold, and indicates the second local database to cancel updating of the second processing result to recover the original data when the difference value exceeds the set threshold.

Description

The method and system of online trading system data consistency
Technical field
The present invention relates to transaction data management technique, particularly relate to a kind of online trading system data consistency Method and system.
Background technology
Existing large-scale online trading system commonly uses the Technical Architecture foundation frame as system of JAVAEE Structure, resolves into the subsystem that some layer functions are relatively independent by application system, and these subsystems are distributed in identical On main frame or on different main frame, have the most independent process and data base connects session, each subsystem It is attached by equipment such as load equalizers between system.During once transaction, often through each son The business datum each having of calling mutually and process between system completes, and each singly completes subsystem Database manipulation in system.The data of each system are stored in identical data base or different data bases, It has not been entirely a transaction record, but there is certain logical relation.
Under normal conditions, each subsystem can complete each self-processing task the most in time and ensure same The concordance of db transaction in one process, or all submit the amendment result of all data atoms to, or with Time rollback recovery, in same process, data consistency is ensured by ripe database technology.But different In the case of Chang, the disposal ability of each subsystem can not be completed to process and the submission of data by the intended time Or rollback, when treated between exceed system configuration bear threshold values after, it is right that upper-layer subsystem will be interrupted automatically Calling of lower layer subsystem, carries out transaction rollback or submission processes failed record.But lower layer subsystem Still continuing the task of normal process oneself, continuing to submit result, the subsystems thus caused to The difference of data is then solved by periodic data comparison.
During comparing, needing to prepare sufficient hardware resource could complete on request, and comparison time takes Certainly in enough hardware resources and the most efficient programmed algorithm, this process generally requires a lot of artificial participations, Ceaselessly check comparison result and progress, according to data cases, program is optimized, re-executes, and New business datum is often had to compare, it tends to be difficult to realize the intelligent comparison of automatization.It addition, number Need to be from Production database extraction full dose or the mass data of increment, nothing for real-time transaction system according to comparison Doubting the processing load adding again system, the particularly disposal ability of data base, response performance will receive impact, New problem can be caused again unavoidably.
Summary of the invention
For solving above-mentioned technical problem, the embodiment of the present invention provides a kind of online trading system data consistency Method and system.
The technical scheme of the embodiment of the present invention is achieved in that
A kind of method of online trading system data consistency, including:
After first subsystem receives the transaction request that external system sends, carry out data process, obtain first Result;Described first result is updated to the first local data base, and obtained for the first renewal time;
Described first subsystem sends Business Processing request to the second subsystem, takes in the request of described Business Processing The time is updated with described first result and described first;
Described second subsystem carries out data process according to the request of described Business Processing, obtains the second result; Described second result is updated to the second local data base, and obtained for the second renewal time;
Described second subsystem calculates described second and updates the difference between time and described first renewal time, And judge that described difference, whether beyond setting threshold value, when described difference is beyond when setting threshold value, indicates described the The renewal of two local data bases described second results of cancellation, extensive restored data, and to described first subsystem System transmission data process and unsuccessfully indicate;When described difference is without departing from when setting threshold value, indicate described second this locality The renewal of the second result described in data base's persistence, and be processed into described first subsystem transmission data Merit indicates;
Described first subsystem receive data process unsuccessfully instruction after, indicate described first local data base to take The renewal of described first result that disappears, extensive restored data;
Described first subsystem receive data process successfully instruction after, indicate described first local data base to hold The renewal of described first result of longization.
Preferably, described method also includes:
Clock is periodically carried out between described external system, described first subsystem and described second subsystem Synchronize.
Preferably, the described first renewal time includes that described first result is updated to the described first local number According to the time behind storehouse, or after described first result is updated to the first local data base, from described first son The time that the main frame of system obtains;
After the described second renewal time includes that described second result is updated to described second local data base Time, or after described second result is updated to described second local data base, from described second subsystem Main frame obtain time.
Preferably, described first subsystem indicates described first local data base to hold by COMMIT command The renewal of described first result of longization;Described first subsystem indicates institute by ROLLBACK order State the first local data base and cancel the renewal of described first result;
Described second subsystem is indicated described in described second local data base persistence by COMMIT command The renewal of the second result;Described second subsystem indicates described second by ROLLBACK order Ground data base cancels the renewal of described second result.
Preferably, described data process and at least include the increasing newly of data, revise, delete.
The system of a kind of online trading system data consistency, including external system, the first subsystem and second Subsystem, it is characterised in that
External system, for sending transaction request to described first subsystem;
First subsystem, after receiving the transaction request that external system sends, carries out data process, To the first result;Described first result is updated to the first local data base, and obtains first more The new time;And,
Send Business Processing request to the second subsystem, the request of described Business Processing carries at described first Reason result and described first updates the time;
Described second subsystem, for carrying out data process according to the request of described Business Processing, obtains at second Reason result;Described second result is updated to the second local data base, and obtained for the second renewal time; And
Calculate the difference between described second renewal time and described first renewal time, and judge described difference Whether beyond setting threshold value, when described difference is beyond when setting threshold value, described second local data base is indicated to take The renewal of described second result that disappears, extensive restored data, and send data process to described first subsystem Failure instruction;When described difference is without departing from when setting threshold value, indicate described second local data base persistence institute State the renewal of the second result, and send data to described first subsystem and process and successfully indicate;
Described first subsystem, is additionally operable to receive after data process unsuccessfully instruction, indicates described first local Data base cancels the renewal of described first result, extensive restored data;And
Receive after data process successfully instruction, indicate described in described first local data base persistence at first The renewal of reason result.
Preferably, between described external system, described first subsystem and described second subsystem periodically Carry out clock synchronization.
Preferably, the described first renewal time includes that described first result is updated to the described first local number According to the time behind storehouse, or after described first result is updated to the first local data base, from described first son The time that the main frame of system obtains;
After the described second renewal time includes that described second result is updated to described second local data base Time, or after described second result is updated to described second local data base, from described second subsystem Main frame obtain time.
Preferably, described first subsystem, it is additionally operable to indicate described first this locality by COMMIT command The renewal of the first result described in data base's persistence, indicates described first by ROLLBACK order Local data base cancels the renewal of described first result;
Described second subsystem, is additionally operable to indicate described second local data base to hold by COMMIT command The renewal of described second result of longization, indicates described second local data by ROLLBACK order The renewal of described second result is cancelled in storehouse.
Preferably, described data process and at least include the increasing newly of data, revise, delete.
In the embodiment of the present invention, after the first subsystem receives the transaction request that external system sends, carry out Data process, and obtain the first result;First result is updated to the first local data base, and obtains Took for the first renewal time;First subsystem sends Business Processing request to the second subsystem, and Business Processing is asked In carry the first result and the first renewal time;Second subsystem counts according to Business Processing request According to process, obtain the second result;Second result is updated to the second local data base, and obtains Second updates the time;Second subsystem calculates the difference between the second renewal time and the first renewal time, and Judge that difference, whether beyond setting threshold value, when difference is beyond when setting threshold value, indicates the second local data base to take The renewal of second result that disappears, extensive restored data, and send data to the first subsystem and process and unsuccessfully indicate; When difference is without departing from when setting threshold value, indicate the renewal of second local data base persistence the second result, And send data to the first subsystem and process and successfully indicate;First subsystem receives data and processes and unsuccessfully indicate After, indicate the first local data base to cancel the renewal of the first result, extensive restored data;First subsystem Receive data process successfully instruction after, indicate the renewal of first local data base persistence the first result.
Compared with prior art, the technical scheme of the embodiment of the present invention efficiently solves each subsystem in transaction system The problem that between system, transaction data is inconsistent, the embodiment of the present invention is repaiied by subordinate's subsystem superior subsystem Change the mode of data validation, it is ensured that the confirmation step by step that between each subsystem, transaction data updates, to ensure each son Transaction data between system is completely the same, it is to avoid manpower comparing pair, has saved human cost, and ensure that The stability of transaction system.
Accompanying drawing explanation
Fig. 1 is the flow chart of the method for the online trading system data consistency of the embodiment of the present invention;
Fig. 2 is the composition structural representation of the system of the online trading system data consistency of the embodiment of the present invention Figure;
Fig. 3 is the application example flow process of the method for the online trading system data consistency of the embodiment of the present invention Figure.
Detailed description of the invention
Clear for making the object, technical solutions and advantages of the present invention more remove, also reference by the following examples Accompanying drawing, the present invention is described in more detail.
Fig. 1 is the flow chart of the method for the online trading system data consistency of the embodiment of the present invention, such as Fig. 1 Shown in, the method for the online trading system data consistency of the embodiment of the present invention comprises the following steps:
Step 101, after the first subsystem receives the transaction request that external system sends, carries out data process, Obtain the first result;Described first result is updated to the first local data base, and obtains first The renewal time.
After the first subsystem receives the transaction request that external system sends, by the transaction data asked Process, and after transaction data is processed, result is updated in local data base, and obtains First updates the time.In the embodiment of the present invention, when transaction data is processed, record is needed to be correlated with Operating time, in order to confirm that follow-up data update and whether operate beyond process limited threshold value, for exceeding The data in process limited, will carry out rollback operation, to avoid the inconsistent of data between each subsystem, and right In the data without departing from the process limited, will be updated between each subsystem confirm so that each subsystem it Between transaction data completely the same.
In the embodiment of the present invention, data process at least include the increasing newly of data, revise, deletion etc..
Step 102, described first subsystem sends Business Processing request to the second subsystem, at described business Reason request carries described first result and described first renewal time.
In the embodiment of the present invention, the first subsystem, when sending Business Processing request to the second subsystem, also exists Business Processing request carries described first result and described first renewal time, to facilitate the second son System carries out operation and processes the most overtime confirmation.
Step 103, described second subsystem carries out data process according to the request of described Business Processing, obtains the Two results;Described second result is updated to the second local data base, and when obtaining the second renewal Between.
After second subsystem receives Business Processing request, the service parameter in asking according to Business Processing, right Corresponding transaction data processes, and result is updated to the second local data base, and obtains second The renewal time.In the embodiment of the present invention, data process at least include the increasing newly of data, revise, deletion etc..
Step 104, described second subsystem calculate described second update the time with described first update the time it Between difference, and judge described difference whether beyond setting threshold value, when described difference is beyond when setting threshold value, Described second local data base is indicated to cancel the renewal of described second result, extensive restored data, and to institute State the first subsystem to send data and process and unsuccessfully indicate;When described difference is without departing from when setting threshold value, indicate institute State the renewal of the second result described in the second local data base persistence, and send to described first subsystem Data process and successfully indicate.
Second subsystem is after being updated to the second local data base by the second result, during record the second renewal Between, and calculate the second renewal time and the aforesaid first difference updating the time, determine whether this difference exceeds Setting threshold value, i.e. judges that data processing time is the most long, then carries out data-backoff operation time long, and Without departing from the confirmation operation then carrying out data renewal when processing time threshold.
In the embodiment of the present invention, for ensureing that data update the concordance of time, described external system, described the Clock synchronization is periodically carried out between one subsystem and described second subsystem.Synchronizing cycle can be 50 Millisecond, 100 milliseconds, 1 second or 10 seconds, 1 minute etc..Update cycle specifically can according to transaction system pair time Between require degree of accuracy depending on.
Step 105, described first subsystem receive data process unsuccessfully instruction after, indicate described first Ground data base cancels the renewal of described first result, extensive restored data;Described first subsystem receives After data process successfully instruction, indicate the first result described in described first local data base persistence more Newly.
Specifically, in the embodiment of the present invention, described first subsystem is described by COMMIT command instruction The renewal of the first result described in first local data base persistence;Described first subsystem passes through Described first local data base of ROLLBACK order instruction cancels the renewal of described first result;
Described second subsystem is indicated described in described second local data base persistence by COMMIT command The renewal of the second result;Described second subsystem indicates described second by ROLLBACK order Ground data base cancels the renewal of described second result.
Below by way of concrete example, it is further elucidated with the essence of technical solution of the present invention.
Fig. 2 is the composition structural representation of the system of the online trading system data consistency of the embodiment of the present invention Figure, as in figure 2 it is shown, the system of the online trading system data consistency of the embodiment of the present invention includes outside system System, the first subsystem (subsystem 1) and the second subsystem (subsystem 2), wherein,
External system, for sending transaction request to described first subsystem;
First subsystem, after receiving the transaction request that external system sends, carries out data process, To the first result;Described first result is updated to the first local data base, and obtains first more The new time;And,
Send Business Processing request to the second subsystem, the request of described Business Processing carries at described first Reason result and described first updates the time;
Described second subsystem, for carrying out data process according to the request of described Business Processing, obtains at second Reason result;Described second result is updated to the second local data base, and obtained for the second renewal time; And
Calculate the difference between described second renewal time and described first renewal time, and judge described difference Whether beyond setting threshold value, when described difference is beyond when setting threshold value, described second local data base is indicated to take The renewal of described second result that disappears, extensive restored data, and send data process to described first subsystem Failure instruction;When described difference is without departing from when setting threshold value, indicate described second local data base persistence institute State the renewal of the second result, and send data to described first subsystem and process and successfully indicate;
Described first subsystem, is additionally operable to receive after data process unsuccessfully instruction, indicates described first local Data base cancels the renewal of described first result, extensive restored data;And
Receive after data process successfully instruction, indicate described in described first local data base persistence at first The renewal of reason result.
In the embodiment of the present invention, between described external system, described first subsystem and described second subsystem Periodically carry out clock synchronization.
In the embodiment of the present invention, the described first renewal time includes that described first result is updated to described Time after one local data base, or after described first result is updated to the first local data base, from institute State the time that the main frame of the first subsystem obtains;
After the described second renewal time includes that described second result is updated to described second local data base Time, or after described second result is updated to described second local data base, from described second subsystem Main frame obtain time.
In the embodiment of the present invention, described first subsystem, it is additionally operable to by COMMIT command instruction described The renewal of the first result described in first local data base persistence, is indicated by ROLLBACK order Described first local data base cancels the renewal of described first result;Described second subsystem, is additionally operable to The renewal of the second result described in described second local data base persistence is indicated by COMMIT command, Described second result is cancelled more by described second local data base of ROLLBACK order instruction Newly.
In the embodiment of the present invention, described data process and at least include the increasing newly of data, revise, delete.
Specifically, as in figure 2 it is shown, the system of the online trading system data consistency of the embodiment of the present invention exists Subsystem database operation adds the judgement of process time before submitting to, the process time exceedes general after configuration threshold values Not submitting data to, and be by rolling back action, wherein, external system can be directly to contact with end user Client, or other do not have the intermediate system of shared service data with native system cluster.Can be such as The online trading system that user is installed by electronic equipment.Subsystem 1 is on one in group service system Layer subsystem.Subsystem 2 is an intermediate layer or lower layer subsystem in group service system.
Upper-layer subsystem (subsystem 1) from when submission processes request to lower layer subsystem from native system data The system time that storehouse obtains.
In subsystems, according to process need data are increased newly, revise, deletion etc. causes data to become The operation changed.
Data processed result is written in the session of data base, does not the most submit amendment result to, i.e. do not have Send and submit to instruction to complete the final amendment of data to data base.
Sending COMMIT command to data base, make data modification come into force, now data base will revise content It is persisted to disk.
Submit ROLLBACK order to data base, cancel the data modification in current sessions.
In the embodiment of the present invention, configurable clock generator synchronizing function on main frame, make each main frame in group system Time keeps consistent, and purposes is when obtaining the local host time to be equal to from the acquisition of other subsystem main frames Time, the difference of the Time Calculation obtained from different main frames after time synchronized is only unanimously.
After data have processed, formally send to data before submitting COMMIT command to, compare this Process the upper system that receives incoming start the time that processes and local data base main frame gets current time Between, check that whether this handling duration is beyond the time specified.
Below by way of concrete handling process, it is further elucidated with the essence of technical solution of the present invention.
Fig. 3 is the application example flow process of the method for the online trading system data consistency of the embodiment of the present invention Figure, as it is shown on figure 3, the method for the online trading system data consistency of this example comprises the following steps:
Step 1, external system initiates transaction request;
Step 2, upper system (subsystem 1) carries out data process after receiving request.
Step 3, subsystem 1 writes data into data base, does not submit COMMIT to;
Step 4, subsystem 1 obtains data base's current time stamp;
Step 5, service parameter and the current time got are encapsulated by subsystem 1 as processing the time started Rear transmission is to subsystem 2;
Step 6, subsystem 2 carries out data process after receiving service request;
Step 7, subsystem 2, by data processed result write into Databasce, does not submit COMMIT to;
Step 8, subsystem 2 obtains data base's current time.
Step 9, compares the process time started incoming with subsystem 1 for current time, if do not surpassed Crossing setting threshold value and then send data base's submiting command, return to subsystem 1 success afterwards, subsystem 1 is subsequently COMMIT command is sent to local data base;
In the embodiment of the present invention, data process the data processed result that the time started can be subsystem 1 and update Time to the local data base of subsystem 1, or it is updated to subsystem for the data processed result of subsystem 1 After the local data base of system 1, the time obtained from the main frame of subsystem 1.
In the embodiment of the present invention, the data process time started that subsystem 2 and subsystem 1 send compares Time, can be subsystem 2 data processed result is updated to after the local data base of subsystem 2 time Between, or after be updated to the local data base of subsystem 2 for the data processed result of subsystem 2, from subsystem The time that the main frame of 2 obtains.The time processed due to data is the shortest, so, the above-mentioned comparison time can To be the time of data processed result write local data base, it is also possible to be to obtain to main frame after write into Databasce Time.
Specifically, after the process time started incoming for subsystem 1 is compared by subsystem 2, confirm not surpass Go out to set threshold value, by sending COMMIT command to the local data base of subsystem 2, make subsystem 2 The trading processing result that local data base persistence is current, and to subsystem 1 send data process successfully disappear Breath;After subsystem 1 receives the data successful message of process that subsystem 2 sends, local to subsystem 1 Data base sends COMMIT command, after the local data base of subsystem 1 receives COMMIT command, The trading processing result that the local data base of persistence subsystem 1 is corresponding.
Step 10, compares current time with the process time started that subsystem 1 is incoming, if it exceeds Set threshold value then send rollback database order, return to subsystem 1 failed message afterwards, subsystem 1 with ROLLBACK order is sent afterwards to local data base;
Specifically, after the process time started incoming for subsystem 1 is compared by subsystem 2, confirm to exceed Setting threshold value, by sending ROLLBACK order to the local data base of subsystem 2, makes subsystem 2 Local data base cancel current trading processing result, and send data to subsystem 1 and process disappearing unsuccessfully Breath;After subsystem 1 receives the data process failure that subsystem 2 sends, local to subsystem 1 Data base sends ROLLBACK order, and the local data base of subsystem 1 receives ROLLBACK life After order, cancel the trading processing result that the local data base of subsystem 1 is corresponding, reply transaction results and update it Front data.
When the embodiment of the present invention carries out collaborative process between integration across database, cross-system, to response time requirement Higher, reach, in process limited the most disconnected group system, to use the method to can ensure that subsystems Data consistency.Using the method to solve, that data in most cases process that time-out causes is inconsistent Situation, decreases the resource input that later data batch comparison processes.
Between technical scheme described in the embodiment of the present invention, in the case of not conflicting, can be in any combination.
In several embodiments provided by the present invention, it should be understood that disclosed method, device and electricity Subset, can realize by another way.Apparatus embodiments described above is only schematically, Such as, the division of described unit, be only a kind of logic function and divide, actual can have when realizing other Dividing mode, such as: multiple unit or assembly can be in conjunction with, or are desirably integrated into another system, or some Feature can be ignored, or does not performs.It addition, the coupling each other of shown or discussed each ingredient, Or direct-coupling or communication connection can be the INDIRECT COUPLING by some interfaces, equipment or unit or communication Connect, can be electrical, machinery or other form.
The above-mentioned unit illustrated as separating component can be or may not be physically separate, as The parts that unit shows can be or may not be physical location, i.e. may be located at a place, it is possible to To be distributed on multiple NE;Part or all of unit therein can be selected according to the actual needs Realize the purpose of the present embodiment scheme.
It addition, each functional unit in various embodiments of the present invention can be fully integrated in a processing unit, Can also be that each unit is individually as a unit, it is also possible to two or more unit are integrated in one In individual unit;Above-mentioned integrated unit both can realize to use the form of hardware, it would however also be possible to employ hardware adds should Realize by the form of functional unit.
One of ordinary skill in the art will appreciate that: all or part of step realizing said method embodiment can Completing with the hardware relevant by programmed instruction, aforesaid program can be stored in an embodied on computer readable and deposit In storage media, this program upon execution, performs to include the step of said method embodiment;And aforesaid storage Medium includes: movable storage device, read only memory (ROM, Read-Only Memory), deposit at random Access to memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.
Or, if the above-mentioned integrated unit of the embodiment of the present invention realizes with the form of applied function module and makees During for independent production marketing or use, it is also possible to be stored in a computer read/write memory medium.Base In such understanding, prior art is contributed by the technical scheme of the embodiment of the present invention the most in other words Part can embody with the form of application product, and these computer application products are stored in a storage medium In, including some instructions with so that computer equipment (can be personal computer, server or Person's network equipment etc.) perform all or part of of method described in each embodiment of the present invention.And aforesaid storage Medium includes: movable storage device, read only memory (ROM, Read-Only Memory), deposit at random Access to memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.
Protection scope of the present invention is not limited thereto, and those familiar with the art takes off in the present invention In the technical scope of dew, change can be readily occurred in or replace, all should contain within protection scope of the present invention.

Claims (10)

1. the method for an online trading system data consistency, it is characterised in that described method includes:
After first subsystem receives the transaction request that external system sends, carry out data process, obtain first Result;Described first result is updated to the first local data base, and obtained for the first renewal time;
Described first subsystem sends Business Processing request to the second subsystem, takes in the request of described Business Processing The time is updated with described first result and described first;
Described second subsystem carries out data process according to the request of described Business Processing, obtains the second result; Described second result is updated to the second local data base, and obtained for the second renewal time;
Described second subsystem calculates described second and updates the difference between time and described first renewal time, And judge that described difference, whether beyond setting threshold value, when described difference is beyond when setting threshold value, indicates described the The renewal of two local data bases described second results of cancellation, extensive restored data, and to described first subsystem System transmission data process and unsuccessfully indicate;When described difference is without departing from when setting threshold value, indicate described second this locality The renewal of the second result described in data base's persistence, and be processed into described first subsystem transmission data Merit indicates;
Described first subsystem receive data process unsuccessfully instruction after, indicate described first local data base to take The renewal of described first result that disappears, extensive restored data;
Described first subsystem receive data process successfully instruction after, indicate described first local data base to hold The renewal of described first result of longization.
Method the most according to claim 1, it is characterised in that described method also includes:
Clock is periodically carried out between described external system, described first subsystem and described second subsystem Synchronize.
Method the most according to claim 1, it is characterised in that the described first renewal time includes described First result is updated to the time after described first local data base, or described first result updates To the first local data base, the time obtained from the main frame of described first subsystem;
After the described second renewal time includes that described second result is updated to described second local data base Time, or after described second result is updated to described second local data base, from described second subsystem Main frame obtain time.
Method the most according to claim 1, it is characterised in that described first subsystem passes through COMMIT Order indicates the renewal of the first result described in described first local data base persistence;Described first subsystem Unite and cancel described first result more by described first local data base of ROLLBACK order instruction Newly;
Described second subsystem is indicated described in described second local data base persistence by COMMIT command The renewal of the second result;Described second subsystem indicates described second by ROLLBACK order Ground data base cancels the renewal of described second result.
Method the most according to claim 1, it is characterised in that described data process and at least include data Increase newly, revise, delete.
6. a system for online trading system data consistency, described system includes external system, the first son System and the second subsystem, it is characterised in that
External system, for sending transaction request to described first subsystem;
First subsystem, after receiving the transaction request that external system sends, carries out data process, To the first result;Described first result is updated to the first local data base, and obtains first more The new time;And,
Send Business Processing request to the second subsystem, the request of described Business Processing carries at described first Reason result and described first updates the time;
Described second subsystem, for carrying out data process according to the request of described Business Processing, obtains at second Reason result;Described second result is updated to the second local data base, and obtained for the second renewal time; And
Calculate the difference between described second renewal time and described first renewal time, and judge described difference Whether beyond setting threshold value, when described difference is beyond when setting threshold value, described second local data base is indicated to take The renewal of described second result that disappears, extensive restored data, and send data process to described first subsystem Failure instruction;When described difference is without departing from when setting threshold value, indicate described second local data base persistence institute State the renewal of the second result, and send data to described first subsystem and process and successfully indicate;
Described first subsystem, is additionally operable to receive after data process unsuccessfully instruction, indicates described first local Data base cancels the renewal of described first result, extensive restored data;And
Receive after data process successfully instruction, indicate described in described first local data base persistence at first The renewal of reason result.
System the most according to claim 6, it is characterised in that described external system, described first son Clock synchronization is periodically carried out between system and described second subsystem.
System the most according to claim 6, it is characterised in that the described first renewal time includes described First result is updated to the time after described first local data base, or described first result updates To the first local data base, the time obtained from the main frame of described first subsystem;
After the described second renewal time includes that described second result is updated to described second local data base Time, or after described second result is updated to described second local data base, from described second subsystem Main frame obtain time.
System the most according to claim 6, it is characterised in that
Described first subsystem, is additionally operable to indicate described first local data base to hold by COMMIT command The renewal of described first result of longization, indicates described first local data by ROLLBACK order The renewal of described first result is cancelled in storehouse;
Described second subsystem, is additionally operable to indicate described second local data base to hold by COMMIT command The renewal of described second result of longization, indicates described second local data by ROLLBACK order The renewal of described second result is cancelled in storehouse.
System the most according to claim 6, it is characterised in that described data process and at least include number According to increase newly, revise, delete.
CN201510060800.7A 2015-02-05 2015-02-05 Method and system of on-line transaction system data consistency Pending CN105989503A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510060800.7A CN105989503A (en) 2015-02-05 2015-02-05 Method and system of on-line transaction system data consistency

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510060800.7A CN105989503A (en) 2015-02-05 2015-02-05 Method and system of on-line transaction system data consistency

Publications (1)

Publication Number Publication Date
CN105989503A true CN105989503A (en) 2016-10-05

Family

ID=57037601

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510060800.7A Pending CN105989503A (en) 2015-02-05 2015-02-05 Method and system of on-line transaction system data consistency

Country Status (1)

Country Link
CN (1) CN105989503A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106909660A (en) * 2017-02-27 2017-06-30 山东浪潮云服务信息科技有限公司 A kind of data are traced to the source device, method and system
CN109271443A (en) * 2018-08-02 2019-01-25 中国建设银行股份有限公司 Distributed data consistency processing method, system, device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521007A (en) * 2011-11-30 2012-06-27 烽火通信科技股份有限公司 Network management system object concurrency editing method based on affair scheduling
CN102891849A (en) * 2012-09-25 2013-01-23 北京星网锐捷网络技术有限公司 Service data synchronization method, data recovery method, data recovery device and network device
US20140089736A1 (en) * 2012-09-24 2014-03-27 Nec Corporation Distributed system, server computer, distributed management server, and failure prevention method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521007A (en) * 2011-11-30 2012-06-27 烽火通信科技股份有限公司 Network management system object concurrency editing method based on affair scheduling
US20140089736A1 (en) * 2012-09-24 2014-03-27 Nec Corporation Distributed system, server computer, distributed management server, and failure prevention method
CN102891849A (en) * 2012-09-25 2013-01-23 北京星网锐捷网络技术有限公司 Service data synchronization method, data recovery method, data recovery device and network device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106909660A (en) * 2017-02-27 2017-06-30 山东浪潮云服务信息科技有限公司 A kind of data are traced to the source device, method and system
CN109271443A (en) * 2018-08-02 2019-01-25 中国建设银行股份有限公司 Distributed data consistency processing method, system, device and storage medium

Similar Documents

Publication Publication Date Title
CN106775959B (en) distributed transaction processing method and system
CN102891849B (en) Service data synchronization method, data recovery method, data recovery device and network device
CN110807064B (en) Data recovery device in RAC distributed database cluster system
KR20210071942A (en) Transaction processing methods, devices and devices, and computer storage media
CN108932338A (en) Data-updating method, device, equipment and medium
CN102193991B (en) OLTP(on-line transaction processing)-based data modifying method and system as well as graphic database server
CN103885854A (en) Data backup method, data backup device and data backup system
CN104796445B (en) Server node carries out the method, apparatus of source synchronous
CN105630589A (en) Distributed process scheduling system and process scheduling and execution method
WO2021103499A1 (en) Multi-active data center-based traffic switching method and device
CN110221938A (en) The method and storage medium of electronic device, block chain common recognition
CN109710586B (en) A kind of clustered node configuration file synchronous method and device
CN107231400A (en) The synchronous method and device of a kind of data
CN112650812A (en) Data fragment storage method and device, computer equipment and storage medium
CN111352943A (en) Method and device for realizing data consistency, server and terminal
CN106331081A (en) Information synchronization method and device
EP4060514A1 (en) Distributed database system and data disaster backup drilling method
CN105989503A (en) Method and system of on-line transaction system data consistency
CN105323271B (en) Cloud computing system and processing method and device thereof
CN116185697B (en) Container cluster management method, device and system, electronic equipment and storage medium
CN112766455A (en) Learning model training method and system
KR101513943B1 (en) Method and system for operating management of real-time replicated database
CN115687019A (en) Database cluster fault processing method, intelligent monitoring platform, equipment and medium
CN111680040A (en) Data table processing method and device
CN106101275A (en) A kind of method of data synchronization and masters

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20161005