CN102013029B - Safe card signing method for intelligent card database application system - Google Patents
Safe card signing method for intelligent card database application system Download PDFInfo
- Publication number
- CN102013029B CN102013029B CN 201010605011 CN201010605011A CN102013029B CN 102013029 B CN102013029 B CN 102013029B CN 201010605011 CN201010605011 CN 201010605011 CN 201010605011 A CN201010605011 A CN 201010605011A CN 102013029 B CN102013029 B CN 102013029B
- Authority
- CN
- China
- Prior art keywords
- card
- smart card
- database
- sign
- 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.)
- Expired - Fee Related
Links
Images
Abstract
The invention discloses a safe card signing method for an intelligent card database application system, which comprises the following steps: (1) reading intelligent card information and detecting a written mark in an intelligent card; (2) storing intelligent card original data into a database; (3) opening up a database transaction; (4) updating the database; (5) setting a written mark in the intelligent card; (6) updating the intelligent card; (7) changing an intelligent card original data state mark stored in the database into a processed mark; (8) submitting the database transaction; and (9) clearing the written mark in the intelligent card, and accomplishing the singing of the intelligent card. A database transaction processing mechanism is used to ensure that the processing state of the intelligent card original data stored in the database is consistent with the submission state of the transaction processing data in the database, and thus, intelligent cards storing dirty data are prevented from being used.
Description
Technical field
The present invention relates to the intelligent card database application system, specifically a kind of safety of intelligent card database application system is signed chucking method.
Background technology
In the database application system exploitation that comprises application of IC cards, exist the synchronous operation that db transaction and intelligent card data upgrade, only rely on transaction processing facility that data base management system (DBMS) provides can't the realization system in the consistance of database data and intelligent card data.In smart card operation, a certain record all as one independently affairs operate.When high-rise affairs are when the record more than two on the smart card is operated, owing to reasons such as power failure, system in case of system halt, program are made mistakes, artificial malice pumping cards, causing intelligent card data to be revised interrupts, thereby cause the imperfect of data on the smart card, finished data such as only revising, and another data do not have enough time also to revise.This moment, smart card was dirty data owing to there is misdata in the modification interruption.A kind of intelligent card database application system is signed safely the logical consistency that chucking method can guarantee database data and intelligent card data, and the smart card that has prevented from simultaneously comprising dirty data comes into operation.
Summary of the invention
Technical matters to be solved by this invention provides the simple of a kind of intelligent card database application system and effectively signs safely chucking method, fulfillment database data and intelligent card data logical consistency.
The present invention solves the problems of the technologies described above the technical scheme that adopts to be: a kind of safety of intelligent card database application system is signed chucking method, comprises the steps:
(1), read smart card information, the sign write in the smart card is detected;
As do not detect to have in the smart card and write the operation that sign then directly carries out step (2);
As detect and write sign in the smart card and then arrive first former label stuck point and carry out the smart card recovery operation, and then carry out the operation of step (1);
(2), in the situation of turn-on data storehouse affairs not, preserve the smart card raw data to database, the rollback point that smart card is the most original preserves;
(3), turn-on data storehouse affairs, follow-up data storehouse operation is protected;
(4), database is upgraded operation, if any one upgrade unsuccessfully, then rollback affairs, if system carries out unexpected the termination, then db transaction is automatically with these operation rollbacks;
(5), after database update finishes, in smart card, arrange one and write sign;
(6), the renewal result according to database upgrades operation to smart card; As upgrade failure and then sign the card termination, carry out the smart card recovery operation;
(7), after smart card upgrades and to finish, the smart card raw data Status Flag of preserving in the database is revised as being disposed;
(8), submit db transaction to, send request to data base management system (DBMS), so that the database manipulation that each step of front is carried out all comes into force; Submit unsuccessfully then label card termination to such as db transaction, carry out the smart card recovery operation;
(9), after db transaction submits to successfully, remove in the smart card and write sign, smart card label card is complete.
Described smart card recovery operation refers to the recovery operation that blocks according to the raw information of processing the card of preserving when beginning and removes smart card and write sign, re-starts after the recovery and signs card.
Described writing is masked as the data that this card of expression that stores on the smart card is carrying out write operation.
The former label stuck point that arrives first described in the step (1) carries out the smart card recovery operation, refers to the last place of signing card, and the recovery operation that the raw information of the card of preserving during with the label card is blocked is also removed smart card and write sign.
Db transaction described in the step (8) is submitted to unsuccessfully, the system that refers to carries out the unexpected database that stops causing and submits to unsuccessfully, the at this moment renewal of database guarantees whole rollbacks by the transaction processing facility of data base management system (DBMS), and the sign write on the smart card keeps automatically, must carry out Recovery processing.
The invention has the beneficial effects as follows: utilize the db transaction treatment mechanism, be kept at the treatment state of the smart card raw data in the database and the business processing data submit state of warehouse-in and be consistent; Introduce card and write sign mechanism, before the retouching operation of any secondary card, all will beat first and write sign; Require the operation of any secondary card in the application system all must write sign by first check card, forbid there being the card of writing sign to carry out normal running, thereby the smart card that has prevented from comprising dirty data comes into operation.In order to guarantee the enforcement of this point, the card bottom operation can be encapsulated as multiplexing assembly.Provide the restoration methods to smart card, to realize the upper raw data of recovery card and to remove the issued transaction of writing sign.
Description of drawings
Fig. 1 is database and smart card operation process flow diagram.
Fig. 2 is intelligent card state figure.
Fig. 3 is the data flow diagram of embodiment.
Embodiment
A kind of safety of intelligent card database application system is signed chucking method, comprises the steps:
(1), read smart card information, the sign write in the smart card is detected;
As do not detect to have in the smart card and write the operation that sign then directly carries out step (2);
As detect and write sign in the smart card and then forbid smart card is carried out normal running, must arrive first former label stuck point and carry out the smart card recovery operation, and then carry out the operation of step (1);
(2), in the situation of turn-on data storehouse affairs not, preserve the smart card raw data to database, the rollback point that smart card is the most original preserves;
(3), turn-on data storehouse affairs, follow-up data storehouse operation is protected;
(4), database is upgraded operation, should guarantee under this db transaction protection that operates in unlatching, if any one upgrades unsuccessfully, then rollback affairs, if system carries out unexpected termination, then db transaction operates rollback with these automatically;
(5), after database update finishes, in smart card, arrange one and write sign, represent that this card is carrying out write operation.One has the card of writing sign, can not carry out normal running, guarantees to process and will write sign and remove until carried out data consistency;
(6), according to the renewal result of database smart card is upgraded operation, the data on the card are made amendment; If the unexpected termination of system's execution causes upgrading unsuccessfully then signs the card termination, exist dirty data on the smart card this moment, and writing on the smart card indicates automatically and keep, must carry out the smart card recovery operation;
(7), after smart card upgrades and to finish, the smart card raw data Status Flag of preserving in the database is revised as being disposed; If system carries out unexpected the termination, smart card raw data Status Flag is and is untreated completely, must carry out the smart card recovery operation;
(8), submit db transaction to, send request to data base management system (DBMS), so that the database manipulation that each step of front is carried out all comes into force; If the unexpected termination of system's execution causes db transaction to be submitted to unsuccessfully then signs the card termination, writing on the smart card indicates automatically reservation, must carry out the smart card recovery operation; The at this moment renewal of database guarantees whole rollbacks by the transaction processing facility of data base management system (DBMS);
(9), after db transaction submits to successfully, remove in the smart card and write sign, smart card label card is complete.
Described smart card recovery operation refers to the recovery operation that blocks according to the raw information of processing the card of preserving when beginning and removes smart card and write sign, re-starts after the recovery and signs card.
Described writing is masked as the data that this card of expression that stores on the smart card is carrying out write operation.
The former label stuck point that arrives first described in the step (1) carries out the smart card recovery operation, refers to the last place of signing card, and the recovery operation that the raw information of the card of preserving during with the label card is blocked is also removed smart card and write sign.
Embodiment
The present invention thinks and many indexs refuels charging intelligent cards to be example make further instructions the enforcement of the method.The card data structure of many indexs oiling smart cards is as follows:
Recording mechanism pointer type index surplus
1 index 1 1000.12
2 indexs 2 2000.34
Suppose a secondary card the action need more index 1 on the neocaine and the index surplus of 2 two records of index, reduce simultaneously in the database surplus of index 1 and index 2 in the index account table.Data flow diagram as shown in Figure 3.
In smart card operation, a certain record all as one independently affairs operate.When high-rise affairs are when the record more than two on the smart card is operated, owing to reasons such as power failure, system in case of system halt, program are made mistakes, artificial malice pumping cards, causing intelligent card data to be revised interrupts, thereby cause the imperfect of data on the smart card, finished data such as only revising, and another data do not have enough time also to revise.Utilize method provided by the invention, just can guarantee the logical consistency of database data and intelligent card data.
Implementation method is as follows:
(1), Card Reader, the achievement data that obtains on the card is as follows:
Recording mechanism pointer type index surplus
1 index 1 1000.12
2 indexs 2 2000.34
At this moment, do not exist on the card and write sign;
(2), the smart card index raw information of reading is saved in the smart card operation log sheet of database, structure and the data structure on the card of smart card operation log sheet are similar, only need to increase a treatment state sign;
(3), turn-on data storehouse affairs;
(4), the more surplus of index 1 on the New Set account;
The more surplus of index 2 on the New Set account;
(5), sign is write in intelligent holding;
(6), upgrade the surplus of intelligent card records 1 index 1;
Upgrade the surplus of intelligent card records 2 indexs 2;
(7), revise the Status Flag of smart card operation log sheet for being disposed;
(8), submit db transaction to;
(9), remove smart card and write sign.
If in the card operating process, the unexpected termination causes writing sign on the card, and all are checked through operating in of card and write when indicating with regard to quiescing in the system.Then Qana is got back to and signed the recovery operation that stuck point blocks.
Recovery operation comprises two kinds of situations.
The first situation: the log recording in the smart card operation log sheet is the complete state that is untreated, and then utilizes the raw information of preserving that this card is recovered, and removes simultaneously and writes sign.
The second situation: the log recording in the smart card operation log sheet is the state of being disposed, and then explanation is db transaction is submitted successfully, and card operate successfully, does not also have enough time to remove to write sign and cause, and it is just passable that writing of only need to removing blocking indicates.
Claims (3)
1. the safety of an intelligent card database application system is signed chucking method, it is characterized in that, comprises the steps:
(1), read smart card information, the sign write in the smart card is detected;
As do not detect to have in the smart card and write the operation that sign then directly carries out step (2);
As detect and write sign in the smart card and then arrive first former label stuck point and carry out the smart card recovery operation, and then carry out the operation of step (1);
(2), in the situation of turn-on data storehouse affairs not, preserve the smart card raw data to database, the rollback point that smart card is the most original preserves;
(3), turn-on data storehouse affairs, utilize the transaction processing facility that data base management system (DBMS) provides that the operation of follow-up data storehouse is protected;
(4), database is upgraded operation, if any one upgrade unsuccessfully, then rollback affairs, if system carries out unexpected the termination, then db transaction is automatically with these operation rollbacks;
(5), after database update finishes, in smart card, arrange one and write sign;
(6), the renewal result according to database upgrades operation to smart card; As upgrade failure and then sign the card termination, carry out the smart card recovery operation;
(7), after smart card upgrades and to finish, the smart card raw data Status Flag of preserving in the database is revised as being disposed;
(8), submit db transaction to, send request to data base management system (DBMS), so that the database manipulation that each step of front is carried out all comes into force; Submit unsuccessfully then label card termination to such as db transaction, carry out the smart card recovery operation;
(9), after db transaction submits to successfully, remove in the smart card and write sign, smart card label card is complete;
Described smart card recovery operation refers to the recovery operation that blocks according to the raw information of processing the card of preserving when beginning and removes smart card and write sign, re-starts after the recovery and signs card;
The former label stuck point that arrives first described in the step (1) carries out the smart card recovery operation, refers to the last place of signing card, and the recovery operation that the raw information of the card of preserving during with the label card is blocked is also removed smart card and write sign.
2. the safety of a kind of intelligent card database application system as claimed in claim 1 is signed chucking method, it is characterized in that described writing is masked as the data that this card of expression that stores on the smart card is carrying out write operation.
3. the safety of a kind of intelligent card database application system as claimed in claim 1 is signed chucking method, it is characterized in that: the db transaction described in the step (8) is submitted to unsuccessfully, the system that refers to carries out the unexpected database that stops causing and submits to unsuccessfully, the at this moment renewal of database guarantees whole rollbacks by the transaction processing facility of data base management system (DBMS), the sign of writing on the smart card keeps automatically, must carry out Recovery processing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010605011 CN102013029B (en) | 2010-12-25 | 2010-12-25 | Safe card signing method for intelligent card database application system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010605011 CN102013029B (en) | 2010-12-25 | 2010-12-25 | Safe card signing method for intelligent card database application system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102013029A CN102013029A (en) | 2011-04-13 |
CN102013029B true CN102013029B (en) | 2013-01-23 |
Family
ID=43843201
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201010605011 Expired - Fee Related CN102013029B (en) | 2010-12-25 | 2010-12-25 | Safe card signing method for intelligent card database application system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102013029B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102340537B (en) * | 2011-06-30 | 2014-01-29 | 北京新媒传信科技有限公司 | Distributed business processing method and device |
CN102375892B (en) * | 2011-11-16 | 2014-07-02 | 北京握奇数据系统有限公司 | Large-capacity database card and office management method thereof, and system |
CN103927562A (en) * | 2013-01-11 | 2014-07-16 | 中国银联股份有限公司 | Method and device for modifying intelligent card data |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1983263A (en) * | 2006-05-16 | 2007-06-20 | 华为技术有限公司 | Method for correcting database |
CN101324856A (en) * | 2008-08-07 | 2008-12-17 | 金蝶软件(中国)有限公司 | Method and system for upgrading data |
WO2009001090A1 (en) * | 2007-06-26 | 2008-12-31 | The Royal Bank Of Scotland Plc | Method and system for controlling smartcards |
-
2010
- 2010-12-25 CN CN 201010605011 patent/CN102013029B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1983263A (en) * | 2006-05-16 | 2007-06-20 | 华为技术有限公司 | Method for correcting database |
WO2009001090A1 (en) * | 2007-06-26 | 2008-12-31 | The Royal Bank Of Scotland Plc | Method and system for controlling smartcards |
CN101324856A (en) * | 2008-08-07 | 2008-12-17 | 金蝶软件(中国)有限公司 | Method and system for upgrading data |
Also Published As
Publication number | Publication date |
---|---|
CN102013029A (en) | 2011-04-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102934114B (en) | For the checkpoint of file system | |
CN101089857B (en) | Internal store data base transaction method and system | |
CN100440214C (en) | Management of metadata in a storage subsystem, system and computer program | |
CN104166605B (en) | Data backup method and system based on incremental data files | |
CN107943414A (en) | The file partition of built-in Linux and data read-write method | |
CN101542483A (en) | Apparatus and method for resource reclamation in data storage systems | |
CN106227620B (en) | Recoverable Flash data storage method | |
CN103617097A (en) | File recovery method and file recovery device | |
JP2003513357A (en) | Method and apparatus for performing atomic updates using a logical flash memory device | |
CN103593257A (en) | Data backup method and device | |
CN102013029B (en) | Safe card signing method for intelligent card database application system | |
CN101894137A (en) | Method and device for restoring data in embedded database | |
US10268776B1 (en) | Graph store built on a distributed hash table | |
CN109947742B (en) | Multi-version database concurrency control method and system for two-stage lock | |
CN112612775B (en) | Data storage method, device, computer equipment and storage medium | |
EP2079022A1 (en) | A shadow-page deferred-update recovery technique integrating shadow page and deferred update techniques in a storage system | |
CN104503989B (en) | A method of it completing heterogeneous database and collects | |
CN105550029A (en) | Process scheduling method and device | |
CN104268097B (en) | A kind of metadata processing method and system | |
CN107643904B (en) | Method, device and medium for detecting code submission log and electronic equipment | |
US7617212B2 (en) | System and method for controlling access to a database | |
CN113821382B (en) | Real-time database data processing method, system and equipment | |
CN105653718A (en) | Method for ensuring data consistence of database after snapshot in disk snapshot storing environment | |
CN106372538A (en) | Firmware protection method based on SoC (System on Chip) | |
CN106610849A (en) | Upgrading processing method for complex programmable logic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20130123 Termination date: 20141225 |
|
EXPY | Termination of patent right or utility model |