Specific implementation mode
In order to make those skilled in the art better understand the technical solutions in the application, below in conjunction with the application reality
The attached drawing in example is applied, technical solutions in the embodiments of the present application is clearly and completely described, it is clear that described implementation
Example is merely a part but not all of the embodiments of the present application.Based on the embodiment in the application, this field is common
The every other embodiment that technical staff is obtained without creative efforts should all belong to the application protection
Range.
The embodiment of the present application provides a kind of method of data backup, realizes issued transaction and the parallel of data backup is held
Row, i.e., carry out data backup while handle affairs, will not additionally increase the time-consuming of issued transaction in this way, avoid due into
Row data backup and additionally increase taking for issued transaction, generation the case where to reduce issued transaction efficiency.
Fig. 1 is the first method flow chart of the method for data backup provided by the embodiments of the present application, and this method is applied to
Transaction facility, method shown in FIG. 1 include at least following steps:
Step S102 is handled pending affairs by first thread.
Wherein, above-mentioned pending affairs can be distributed transaction, and so-called distributed transaction refers to the participant of affairs, branch
The server, Resource Server and task manager for holding affairs are located on the different nodes of transaction facility.
For example, above-mentioned pending affairs can be transfer accounts affairs distribution, billing matters etc..
Wherein, above-mentioned transaction facility is for handling pending affairs.
Step S104, generated Backup Data when being handled pending affairs by the acquisition of the second thread, by this
Backup Data writing backup data library;Wherein, first thread and the second thread parallel execute.
The executive agent of the embodiment of the present application is transaction facility, and in the embodiment of the present application, transaction facility exists
While processing pending affairs by first thread, by the second thread carry out Backup Data backup, i.e., first
Thread and the second thread execute parallel.
Specifically, obtaining generated Backup Data when handling pending affairs in above-mentioned steps S104, at least
Include the following steps (1) and (2);
The log information of step (1), acquisition when handling pending affairs;
Step (2) extracts keyword message from above-mentioned log information, using the keyword message as above-mentioned backup number
According to.
Wherein, by first thread to pending affairs in the process of processing, will produce and pending affairs phase
The log information of pass.It transfers accounts 100 yuan to user B for example, pending affairs are user A, transfers accounts handling this by first thread
When affairs, it will produce and the relevant log information of affairs of transferring accounts.For example, the log information can be, the account of user A subtracts
100 yuan, the account of user B increases by 100 yuan etc..
In addition, when by the second thread by Backup Data writing backup data library, it is necessary first to transmit Backup Data
To backup database, then write operation is executed, this process needs to consume the regular hour, if Backup Data content is more
When, it may be necessary to Backup Data could be transferred to backup database by carrying out repeatedly communication, and the time of communication is longer, also, writes
The time for entering backup database consuming is also grown.Therefore, disappeared to reduce this event by Backup Data writing backup data library
The time of consumption can complete by the operation in Backup Data writing backup data library, that is, to need as far as possible by individual instructions as possible
The content for reducing the Backup Data in writing backup data library.Therefore, in the embodiment of the present application, in above-mentioned steps (2),
The keyword message in log information is extracted, using the keyword message as Backup Data writing backup data library.
In the embodiment of the present application, when carrying out data backup, be not will carry out generating in transaction process it is whole
A log information is used as Backup Data to be written, but the keyword message extracted in log information is backed up, wherein
The keyword message extracted can restore the pending affairs.In this way, it is possible to reduce the Backup Data backed up it is interior
Hold, data backup is completed by an instruction as far as possible, reduces the time that data backup is consumed.
For example, in a specific embodiment, above-mentioned pending affairs are that user A is transferred accounts using Alipay to user B
100 yuan, the keyword message of said extracted can be " A is to B ", " transferring accounts ", " 100 ", " Alipay ".
In addition, in above-mentioned steps S104, Backup Data writing backup data library can specifically be passed through into following process reality
It is existing:
Generate the corresponding structured query language of above-mentioned Backup Data (Structured Query Language, SQL) language
Sentence, and the corresponding write operation of above-mentioned SQL statement is executed in backup database.
In the embodiment of the present application, the operation in Backup Data writing backup data library is realized by SQL statement.Therefore, really
After making the Backup Data for needing to back up, need to generate the corresponding SQL statement of the Backup Data, and the SQL statement is transferred to
Backup database executes the corresponding write operation of the SQL statement in backup database, to realize Backup Data is written it is standby
Part database.
Wherein, in the embodiment of the present application, above-mentioned backup database can be arranged same with transaction facility
Region is managed, for example, above-mentioned transaction facility and backup database are arranged in the mansions XX of Haidian District, Beijing City;It can also be
Geographic area where backup database is different from the geographic area where the corresponding transaction facility of pending affairs, example
Such as, transaction facility is arranged in Beijing, and Backup Data lab setting is in Shijiazhuang.
When the geographic area where backup database be different from transaction facility where geographic area when, it is possible to reduce
Due to regional disasters such as geographic area where transaction facility and backup database simultaneously shakes, tsunamis, and cause
The case where transaction facility and backup database are damaged simultaneously, in this way, when transaction facility is due to by regional disaster
When damaging, the reduction of data can also be carried out from backup database.
In general, geographic area where geographic area and transaction facility where backup database is at a distance of remoter,
The safety of data is higher.For example, the setting of above-mentioned transaction facility is in Baoding, above-mentioned Backup Data lab setting in Shijiazhuang,
If Baoding generation area property disaster, then backup database is safe, if Hebei Province generation area property disaster, then back up
Database also can be destroyed, if transaction facility setting, in Baoding, Backup Data lab setting is in Tianjin, then the safety of data
Property can higher.
But the distance between transaction facility and backup database are remoter, carry out data transmission when data backup
Time is longer, and communication link expense is also bigger, and uses method provided by the embodiments of the present application, issued transaction and data backup
It is parallel to execute, it is possible to reduce issued transaction takes.
In a specific embodiment, when the geographic area of Backup Data lab setting is different from residing for transaction facility
When geographic area, the deployment schematic diagram of backup database is as shown in Figure 2.In fig. 2, transaction facility is set to issued transaction
Computer room, backup database is set to backup computer room, and master library is provided in issued transaction computer room, and master library is applied for storing
Program (Application, APP) handles the log information generated when pending affairs, and backup number is provided on backup computer room
According to library, the Backup Data that APP is generated when handling pending affairs is transferred to backup database, in the backup database only
Simply store some keyword messages that can characterize pending affairs.
In addition, being additionally provided with standby library in backup computer room, this is for library for being recorded in Backup Data writing backup data
The accounting log information generated when in library.
In the embodiment of the present application, when transaction facility breaks down or is destroyed due to regional disaster,
The Backup Data in backup database can be obtained, and broken down according to the Backup Data and transaction facility of acquisition or
Pending affairs current processing state when person damages carries out data recovery.Due to issued transaction sum number in the embodiment of the present application
It is the synchronous backup for carrying out, not needing to carry out Backup Data again after the success of pending issued transaction according to backup, also,
Transaction facility need not also receive the successful receipt of backup and just think that pending issued transaction finishes.Therefore, in affairs
Processing equipment breaks down or property disaster in generation area causes transaction facility to be damaged, may when switching to backup computer room
It will appear following several situations:
Situation one, pending issued transaction success, data backup success;
Situation two, pending issued transaction success, data backup are failed;
Situation three, pending issued transaction failure, data backup success;
Situation four, pending issued transaction failure, data backup are failed.
Following will be to transfer accounts for affairs by above-mentioned pending affairs, and it is each how introduction carries out at above-mentioned four kinds
The recovery of account residual amount.
For the above situation one, data backup success then illustrates that Backup Data has been written into backup database, at this moment, detection
Whether synchronous accounting log is consistent with the Backup Data being written in backup database in standby library, if unanimously, then explanation is standby
The book keeping operation instruction corresponding to Backup Data is synchronized in library, it is determined that the amount of money in current standby library is accurate;
If the corresponding accounting log of Backup Data is not present in standby library, then illustrate not being synchronized to the backup also in standby library
The corresponding book keeping operation instruction of data, therefore, it is desirable to calculate accurate remaining sum in conjunction with the Backup Data in backup database.
It is directed to the above situation one, data recovery operation can be carried out by the Backup Data in backup database.
For the above situation two, data backup illustrates that Backup Data has not been written to backup database, at this moment, master library not successfully
In part reserve fund it is unavailable, will to pending affairs carry out rollback.
For the above situation three, data backup successfully illustrates that Backup Data has been written into backup database, but office
Reason failure, in that case, backup computer room can not learn disposition of the issued transaction computer room to affairs, therefore, can incite somebody to action
It is used as unavailable fund under processing funds reservation in Backup Data, in that case, in order to realize the extensive of data
It is multiple, it is also desirable to which that rolling back action is carried out to affairs.
For the above situation four, issued transaction failure, data backup is failed, at this moment, the backup number in backup database
According to being exactly accurate data, it can directly use, i.e., data directly can be realized according to the Backup Data in backup database
Recovery is handled.
The method of data backup provided by the embodiments of the present application is handled pending affairs by first thread, is led to
Generated Backup Data when the acquisition of the second thread handles pending affairs is crossed, and backup number is written into the Backup Data
According to library;Wherein, first thread and the second thread parallel execute.In the embodiment of the present application, issued transaction and data backup are realized
Parallel execution, that is, realize and carry out data backup while handling affairs, will not additionally increase the consumption of issued transaction in this way
When, it avoids due to carrying out data backup and additionally increases taking for issued transaction, the case where to reduce issued transaction efficiency
Generation.
Method based on Fig. 1 and data backup shown in Fig. 2, the embodiment of the present application also provides a kind of sides of data backup
Method, this method are applied to the transaction facility in distributing real time system system, and Fig. 3 shows one kind of transaction facility
Structural schematic diagram.
In transaction facility shown in Fig. 3,3 three node 1, node 2 and node nodes are only enumerated, when
So, the node of transaction facility is not limited thereto.In the case of shown in Fig. 3, data backup is as transaction facility
A node, node 1 and node 2 are for handling distributed transaction, and node 3 is for carrying out data backup.Implement in the application
In example, transaction facility driving node 1 and node 2 handle distributed transaction by first thread, meanwhile, transaction facility
Driving node 3 carries out data backup.
Fig. 4 shows that the second method flow chart of the method for data backup provided by the embodiments of the present application, this method are answered
For transaction facility shown in Fig. 3, for method shown in Fig. 4, introduce here and above-mentioned method shown in FIG. 1
Difference, something in common can refer to the description of the method for the data backup of above-described embodiment offer, and which is not described herein again, Fig. 4
Shown in method include at least following steps:
Step S202 is handled distributed transaction by the first thread of transaction facility.
Wherein, transaction facility shown in Fig. 3, node 1 and node 2 may be used for locating in above-mentioned transaction facility
Distributed transaction is managed, i.e. node 1 in the transaction facility and node 2 handles distributed transaction by first thread.
For example, above-mentioned distributed transaction can be transferred accounts, in that case, node 1 is the account corresponding to user A
Library, node 2 are the account library corresponding to user B, and transaction facility driving node 1 and node 2 are remembered by first thread
Account.
Step S204, it is generated when being handled distributed transaction by the second thread acquisition of transaction facility
Backup Data, and by above-mentioned Backup Data writing backup data library;Wherein, first thread and the second thread parallel execute.
In transaction facility shown in Fig. 3, node 3 for carrying out data backup, by first thread to distribution
While formula affairs are handled, generated Backup Data when being handled distributed transaction by the acquisition of the second thread,
And by the Backup Data writing backup data library.
In addition, in the embodiment of the present application, above-mentioned backup database may be at identical geography with transaction facility
The band of position can also be that the geographic area where backup database is different from the geographic area where transaction facility.
Specifically, in above-mentioned steps S204, acquisition generated Backup Data when handling distributed transaction, specifically
Include the following steps (A) and step (B);
The log information of step (A), acquisition when handling distributed transaction;
Step (B) extracts keyword message from above-mentioned log information, using the keyword message as Backup Data.
Wherein, by first thread to pending affairs in the process of processing, will produce and pending affairs phase
The log information of pass.It transfers accounts 100 yuan to user B for example, pending affairs are user A, transfers accounts handling this by first thread
When affairs, it will produce and the relevant log information of affairs of transferring accounts.For example, the log information can be, the account of user A subtracts
100 yuan, the account of user B increases by 100 yuan etc..
In addition, when by the second thread by Backup Data writing backup data library, it is necessary first to transmit Backup Data
To backup database, then write operation is executed, this process needs to consume the regular hour, if Backup Data content is more
When, it may be necessary to Backup Data could be transferred to backup database by carrying out repeatedly communication, and the time of communication is longer, also, writes
The time for entering backup database consuming is also grown.Therefore, disappeared to reduce this event by Backup Data writing backup data library
The time of consumption can complete by the operation in Backup Data writing backup data library, that is, to need as far as possible by individual instructions as possible
The content for reducing the Backup Data in writing backup data library.Therefore, in the embodiment of the present application, in above-mentioned steps (2),
The keyword message in log information is extracted, using the keyword message as Backup Data writing backup data library.
In the embodiment of the present application, when carrying out data backup, be not will carry out generating in transaction process it is whole
A log information is used as Backup Data to be written, but the keyword message extracted in log information is backed up, wherein
The keyword message extracted can restore the pending affairs.In this way, it is possible to reduce the Backup Data backed up it is interior
Hold, data backup is completed by an instruction as far as possible, reduces the time that data backup is consumed.
For example, in a specific embodiment, above-mentioned pending affairs are that user A is transferred accounts using Alipay to user B
100 yuan, the keyword message of said extracted can be " A is to B ", " transferring accounts ", " 100 ", " Alipay ".
In addition, Backup Data writing backup data library is realized particular by following process in above-mentioned steps S204:
Generate the corresponding structured query language of above-mentioned Backup Data (Structured Query Language, SQL) language
Sentence, and the corresponding write operation of above-mentioned SQL statement is executed in backup database.
Method for the ease of understanding data backup provided by the embodiments of the present application, it is following will be to handle user A to user B
It transfers accounts 100 yuan, and for carrying out remote backup, the method that data backup provided by the embodiments of the present application is discussed in detail.Fig. 5 is shown
The third method flow diagram of the method for data backup provided by the embodiments of the present application, method shown in fig. 5 include at least such as
Lower step:
Step S302, user send transfer request by client to transaction facility.
Wherein, if user is transferred accounts by Alipay, then user opens the Alipay application program in client, leads to
It crosses Alipay application program and initiates transfer request to transaction facility, transfer amounts, beneficiary are carried in the transfer request
Account information etc..
In the embodiment of the present application, if distributed transaction is affairs of transferring accounts, above-mentioned transaction facility can be transaction
Equipment.
Step S304, transaction facility driving issued transaction node handle above-mentioned affairs of transferring accounts by first thread.
Wherein, above-mentioned issued transaction node can be the corresponding account libraries user A and user B.
Step S306, transaction facility driving data backup node obtain Backup Data by the second thread, and will be standby
Part data writing backup data library.
Wherein, a node of the above-mentioned data backup node as transaction facility.Also, first thread and the second line
Cheng Binghang is executed.
Step S308, issued transaction node complete transfer accounts affairs processing after, transaction facility to client return
Transfer result.
The method of data backup provided by the embodiments of the present application is handled distributed transaction by first thread, is led to
Generated Backup Data when the acquisition of the second thread handles distributed transaction is crossed, and backup number is written into the Backup Data
According to library;Wherein, first thread and the second thread parallel execute.In the embodiment of the present application, issued transaction and data backup are realized
Parallel execution, that is, realize and carry out data backup while handling affairs, will not additionally increase the consumption of issued transaction in this way
When, it avoids due to carrying out data backup and additionally increases taking for issued transaction, the case where to reduce issued transaction efficiency
Generation.
The method of corresponding data backup shown in FIG. 1, is based on identical thinking, the embodiment of the present application also provides a kind of numbers
According to the device of backup, which is applied to transaction facility, and Fig. 6 is the device of data backup provided by the embodiments of the present application
The first module composition schematic diagram, in device shown in Fig. 6, including:
First processing module 41 is handled pending affairs for passing through first thread;
First acquisition module 42, for passing through generated backup when the acquisition of the second thread handles pending affairs
Data;
First writing module 43 is used for above-mentioned Backup Data writing backup data library;Wherein, first thread and the second line
Cheng Binghang is executed.
Optionally, above-mentioned first acquisition module 42, including:
First acquisition unit, for obtaining log information when handling above-mentioned pending affairs;
First extraction unit, for extracting keyword message from above-mentioned log information;
First determination unit, for using above-mentioned keyword message as Backup Data.
Optionally, above-mentioned first writing module 43, including:
First generation unit, for generating the corresponding structured query language SQL statement of above-mentioned Backup Data;
First execution unit, for executing the corresponding write operation of above-mentioned SQL statement in backup database.
Optionally, the geographic area where backup database is different from the geographic area where transaction facility.
The device of data backup provided by the embodiments of the present application is handled pending affairs by first thread, is led to
Generated Backup Data when the acquisition of the second thread handles pending affairs is crossed, and backup number is written into the Backup Data
According to library;Wherein, first thread and the second thread parallel execute.In the embodiment of the present application, issued transaction and data backup are realized
Parallel execution, that is, realize and carry out data backup while handling affairs, will not additionally increase the consumption of issued transaction in this way
When, it avoids due to carrying out data backup and additionally increases taking for issued transaction, the case where to reduce issued transaction efficiency
Generation.
Corresponding to the method for data backup shown in Fig. 4, it is based on identical thinking, the embodiment of the present application also provides one kind
The device of data backup, the device of the data backup are applied to the transaction facility in distributing real time system system, and Fig. 7 is
Second of module composition schematic diagram of the device of data backup provided by the embodiments of the present application, device shown in Fig. 7, including:
Second processing module 51, for being handled distributed transaction by the first thread of transaction facility;
Second acquisition module 52 is handled distributed transaction for the second thread acquisition by transaction facility
When generated Backup Data;
Second writing module 53 is used for above-mentioned Backup Data writing backup data library;Wherein, first thread and the second line
Cheng Binghang is executed.
Optionally, the geographic area where above-mentioned backup database is different from the geographic area where transaction facility.
Optionally, above-mentioned second acquisition module 52, including:
Second acquisition unit, for obtaining log information when handling distributed transaction;
Second extraction unit, for extracting keyword message from above-mentioned log information;
Second determination unit, for using above-mentioned keyword message as Backup Data.
The device of data backup provided by the embodiments of the present application is handled distributed transaction by first thread, is led to
Generated Backup Data when the acquisition of the second thread handles distributed transaction is crossed, and backup number is written into the Backup Data
According to library;Wherein, first thread and the second thread parallel execute.In the embodiment of the present application, issued transaction and data backup are realized
Parallel execution, that is, realize and carry out data backup while handling affairs, will not additionally increase the consumption of issued transaction in this way
When, it avoids due to carrying out data backup and additionally increases taking for issued transaction, the case where to reduce issued transaction efficiency
Generation.
The method of data backup based on shown in Fig. 4, the embodiment of the present application also provides a kind of distributing real time system systems
System, as shown in figure 8, the system includes transaction facility 61 and calamity for equipment 62, calamity includes backup database 63 for equipment 62;
Above-mentioned transaction facility 61 is handled distributed transaction for passing through first thread, and, pass through second
Thread acquisition generated Backup Data when handling distributed transaction, and by the Backup Data writing backup data library;
Wherein, first thread and the second thread parallel execute.
Above-mentioned distributed transaction can be transferred accounts;In the embodiment of the present application, data backup is as transaction facility
61 node.
Specifically, above-mentioned calamity for equipment 62, is used to, when executing calamity for restoring, extract the backup number in backup database
According to;If the transaction daily record and transaction result in Backup Data match, data are executed according to Backup Data and are restored
Processing;If the transaction daily record and transaction result in Backup Data do not match that, things is executed according to Backup Data
Rollback is handled.
Wherein, the transaction journal in above-mentioned Backup Data and transaction processing results match, and refer to issued transaction
Daily record is consistent with transaction processing results, i.e., Backup Data is successfully written backup database, and issued transaction success;Alternatively, standby
The failed writing backup data library of part data, and issued transaction fails.During Backup Data writing backup data library, meeting
Generate corresponding transaction journal.
Transaction journal and transaction processing results in above-mentioned Backup Data do not match that, refer to transaction journal
Inconsistent with transaction processing results, i.e., Backup Data is successfully written backup database, and issued transaction fails;Alternatively, backup number
According to failed writing backup data library, but issued transaction is successful.
In the embodiment of the present application, for the transaction journal and the feelings that match of transaction processing results in Backup Data
Condition, the data in backup database are accurate, directly carry out data recovery according to the Backup Data in backup database;
For in Backup Data transaction journal and transaction processing results do not match that the case where, therefore, it is desirable to entire affairs
Rollback is carried out, to realize the recovery of data.
Distributing real time system system provided by the embodiments of the present application, including transaction facility and calamity are for equipment, affairs
Processing equipment is handled distributed transaction by first thread, is handled distributed transaction by the acquisition of the second thread
When generated Backup Data, and by the Backup Data writing backup data library;Wherein, first thread and the second thread parallel are held
Row.In the embodiment of the present application, the parallel execution of issued transaction and data backup is realized, that is, is realized while handling affairs
Data backup is carried out, will not additionally increase taking for issued transaction in this way, avoid due to carrying out data backup and additionally increase
Issued transaction takes, generation the case where to reduce issued transaction efficiency.
Further, above-mentioned Fig. 1 is based on to method shown in fig. 5, and the embodiment of the present application also provides a kind of data backups
Equipment, as shown in Figure 9.
The equipment of data backup can generate bigger difference because configuration or performance are different, may include one or one
Above processor 701 and memory 702, can be stored in memory 702 one or more storage application programs or
Data.Wherein, memory 702 can be of short duration storage or persistent storage.The application program for being stored in memory 702 may include
One or more modules (diagram is not shown), each module may include the series of computation in the equipment to data backup
Machine executable instruction.Further, processor 701 could be provided as communicating with memory 702, in the equipment of data backup
Execute the series of computation machine executable instruction in memory 702.The equipment of data backup can also include one or one with
Upper power supply 703, one or more wired or wireless network interfaces 704, one or more input/output interfaces 705,
One or more keyboards 706 etc..
In a specific embodiment, the equipment application of the data backup is set in transaction facility, data backup
Standby includes memory and one or more program, one of them or more than one program is stored in memory
In, and one or more than one program may include one or more modules, and each module may include to data
Series of computation machine executable instruction in the equipment of backup, and be configured to be executed by one or more than one processor and be somebody's turn to do
One or more than one program include for carrying out following computer executable instructions:
Pending affairs are handled by first thread;
Generated Backup Data when being handled the pending affairs by the acquisition of the second thread, by the backup
Data writing backup data library;
Wherein, the first thread and second thread parallel execute.
Optionally, when executed, the acquisition is when handling the pending affairs for computer executable instructions
Generated Backup Data, including:
Obtain log information when handling the pending affairs;
Keyword message is extracted from the log information, using the keyword message as the Backup Data.
Optionally, computer executable instructions are when executed, described by Backup Data writing backup data library, packet
It includes:
The corresponding structured query language SQL statement of the Backup Data is generated, and is executed in the backup database
The corresponding write operation of the SQL statement.
Optionally, when executed, the geographic area where the backup database is different from computer executable instructions
Geographic area where the corresponding transaction facility of the pending affairs.
The equipment of data backup provided by the embodiments of the present application is handled pending affairs by first thread, is led to
Generated Backup Data when the acquisition of the second thread handles pending affairs is crossed, and backup number is written into the Backup Data
According to library;Wherein, first thread and the second thread parallel execute.In the embodiment of the present application, issued transaction and data backup are realized
Parallel execution, that is, realize and carry out data backup while handling affairs, will not additionally increase the consumption of issued transaction in this way
When, it avoids due to carrying out data backup and additionally increases taking for issued transaction, the case where to reduce issued transaction efficiency
Generation.
In a specific embodiment, affairs of the equipment application of the data backup in distributing real time system system
Processing equipment, the equipment of the data backup include memory and one or more program, one of them or one
A procedure above is stored in memory, and one or more than one program may include one or more modules, and
Each module may include the series of computation machine executable instruction in the equipment to data backup, and be configured to by one or
It includes for carrying out following computer executable instructions that more than one processor of person, which executes this or more than one program,:
Distributed transaction is handled by the first thread of transaction facility;
Generated backup when being handled the distributed transaction by the second thread acquisition of transaction facility
Data, and by Backup Data writing backup data library;
Wherein, the first thread and second thread parallel execute.
Optionally, when executed, the geographic area where the backup database is different from computer executable instructions
Geographic area where the transaction facility.
Optionally, when executed, the acquisition is when handling the distributed transaction for computer executable instructions
Generated Backup Data, including:
Obtain log information when handling the distributed transaction;
Keyword message is extracted from the log information, using the keyword message as the Backup Data.
The equipment of data backup provided by the embodiments of the present application is handled distributed transaction by first thread, is led to
Generated Backup Data when the acquisition of the second thread handles distributed transaction is crossed, and backup number is written into the Backup Data
According to library;Wherein, first thread and the second thread parallel execute.In the embodiment of the present application, issued transaction and data backup are realized
Parallel execution, that is, realize and carry out data backup while handling affairs, will not additionally increase the consumption of issued transaction in this way
When, it avoids due to carrying out data backup and additionally increases taking for issued transaction, the case where to reduce issued transaction efficiency
Generation.
Further, it is based on above-mentioned Fig. 1 to method shown in fig. 5, the embodiment of the present application also provides a kind of storage medium,
Applied to transaction facility, the storage medium is for storing computer executable instructions, and in a kind of specific embodiment, this is deposited
Storage media can be USB flash disk, CD, hard disk etc., the computer executable instructions of storage medium storage when being executed by processor,
It can realize following below scheme:
Pending affairs are handled by first thread;
Generated Backup Data when being handled the pending affairs by the acquisition of the second thread, by the backup
Data writing backup data library;
Wherein, the first thread and second thread parallel execute.
Optionally, for the computer executable instructions of storage medium storage when being executed by processor, the acquisition is to institute
Generated Backup Data when pending affairs are handled is stated, including:
Obtain log information when handling the pending affairs;
Keyword message is extracted from the log information, using the keyword message as the Backup Data.
Optionally, the storage medium storage computer executable instructions when being executed by processor, it is described will be described standby
Part data writing backup data library, including:
The corresponding structured query language SQL statement of the Backup Data is generated, and is executed in the backup database
The corresponding write operation of the SQL statement.
Optionally, the computer executable instructions of storage medium storage are when being executed by processor, the Backup Data
Geographic area where library is different from the geographic area where the corresponding transaction facility of the pending affairs.
The computer executable instructions of storage medium storage provided by the embodiments of the present application pass through when being executed by processor
First thread handles pending affairs, generated standby when being handled pending affairs by the acquisition of the second thread
Part data, and by the Backup Data writing backup data library;Wherein, first thread and the second thread parallel execute.The application is real
It applies in example, realizes the parallel execution of issued transaction and data backup, that is, it is standby to realize progress data while handling affairs
Part, it will not additionally increase taking for issued transaction in this way, avoid due to carrying out data backup and additionally increase issued transaction
It takes, generation the case where to reduce issued transaction efficiency.
Further, it is based on above-mentioned Fig. 1 to method shown in fig. 5, the embodiment of the present application also provides a kind of storage medium,
Applied to the transaction facility in distributing real time system system, for storing, computer is executable to be referred to above-mentioned storage medium
It enables, in a kind of specific embodiment, which can be USB flash disk, CD, hard disk etc., the computer of storage medium storage
Executable instruction can realize following below scheme when being executed by processor:
Distributed transaction is handled by the first thread of the transaction facility;
It is generated when being handled the distributed transaction by the second thread acquisition of the transaction facility
Backup Data, and by Backup Data writing backup data library;
Wherein, the first thread and second thread parallel execute.
Optionally, the computer executable instructions of storage medium storage are when being executed by processor, the Backup Data
Geographic area where library is different from the geographic area where the transaction facility.
Optionally, for the computer executable instructions of storage medium storage when being executed by processor, the acquisition is to institute
Generated Backup Data when distributed transaction is handled is stated, including:
Obtain log information when handling the distributed transaction;
Keyword message is extracted from the log information, using the keyword message as the Backup Data.
The computer executable instructions of storage medium storage provided by the embodiments of the present application pass through when being executed by processor
First thread handles distributed transaction, generated standby when being handled distributed transaction by the acquisition of the second thread
Part data, and by the Backup Data writing backup data library;Wherein, first thread and the second thread parallel execute.The application is real
It applies in example, realizes the parallel execution of issued transaction and data backup, that is, it is standby to realize progress data while handling affairs
Part, it will not additionally increase taking for issued transaction in this way, avoid due to carrying out data backup and additionally increase issued transaction
It takes, generation the case where to reduce issued transaction efficiency.
In the 1990s, the improvement of a technology can be distinguished clearly be on hardware improvement (for example,
Improvement to circuit structures such as diode, transistor, switches) or software on improvement (improvement for method flow).So
And with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit.
Designer nearly all obtains corresponding hardware circuit by the way that improved method flow to be programmed into hardware circuit.Cause
This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, programmable logic device
(Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate
Array, FPGA)) it is exactly such a integrated circuit, logic function determines device programming by user.By designer
Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, designs and makes without asking chip maker
Dedicated IC chip.Moreover, nowadays, substitution manually makes IC chip, this programming is also used instead mostly " patrols
Volume compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development,
And the source code before compiling also write by handy specific programming language, this is referred to as hardware description language
(Hardware Description Language, HDL), and HDL is also not only a kind of, but there are many kind, such as ABEL
(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description
Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL
(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby
Hardware Description Language) etc., VHDL (Very-High-Speed are most generally used at present
Integrated Circuit Hardware Description Language) and Verilog.Those skilled in the art also answer
This understands, it is only necessary to method flow slightly programming in logic and is programmed into integrated circuit with above-mentioned several hardware description languages,
The hardware circuit for realizing the logical method flow can be readily available.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing
The computer for the computer readable program code (such as software or firmware) that device and storage can be executed by (micro-) processor can
Read medium, logic gate, switch, application-specific integrated circuit (Application Specific Integrated Circuit,
ASIC), the form of programmable logic controller (PLC) and embedded microcontroller, the example of controller includes but not limited to following microcontroller
Device:ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, are deposited
Memory controller is also implemented as a part for the control logic of memory.It is also known in the art that in addition to
Pure computer readable program code mode is realized other than controller, can be made completely by the way that method and step is carried out programming in logic
Controller is obtained in the form of logic gate, switch, application-specific integrated circuit, programmable logic controller (PLC) and embedded microcontroller etc. to come in fact
Existing identical function.Therefore this controller is considered a kind of hardware component, and to including for realizing various in it
The device of function can also be considered as the structure in hardware component.Or even, it can will be regarded for realizing the device of various functions
For either the software module of implementation method can be the structure in hardware component again.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used
Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment
The combination of equipment.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this
The function of each unit is realized can in the same or multiple software and or hardware when application.
It should be understood by those skilled in the art that, embodiments herein can be provided as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application
Apply the form of example.Moreover, the application can be used in one or more wherein include computer usable program code computer
The computer program production implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The application is with reference to method, the flow of equipment (system) and computer program product according to the embodiment of the present application
Figure and/or block diagram describe.It should be understood that can be realized by computer program instructions every first-class in flowchart and/or the block diagram
The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided
Instruct the processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine so that the instruction executed by computer or the processor of other programmable data processing devices is generated for real
The device for the function of being specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that instruction generation stored in the computer readable memory includes referring to
Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device so that count
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, in computer or
The instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology realizes information storage.Information can be computer-readable instruction, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storages, magnetic tape cassette, tape magnetic disk storage or other magnetic storage apparatus
Or any other non-transmission medium, it can be used for storage and can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
Including so that process, method, commodity or equipment including a series of elements include not only those elements, but also wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that wanted including described
There is also other identical elements in the process of element, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The application can describe in the general context of computer-executable instructions executed by a computer, such as program
Module.Usually, program module includes routines performing specific tasks or implementing specific abstract data types, program, object, group
Part, data structure etc..The application can also be put into practice in a distributed computing environment, in these distributed computing environments, by
Task is executed by the connected remote processing devices of communication network.In a distributed computing environment, program module can be with
In the local and remote computer storage media including storage device.
Each embodiment in this specification is described in a progressive manner, identical similar portion between each embodiment
Point just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality
For applying example, since it is substantially similar to the method embodiment, so description is fairly simple, related place is referring to embodiment of the method
Part explanation.
Above is only an example of the present application, it is not intended to limit this application.For those skilled in the art
For, the application can have various modifications and variations.It is all within spirit herein and principle made by any modification, equivalent
Replace, improve etc., it should be included within the scope of claims hereof.