CN102708485B - Things protection method of mobile phone payment card transactions and mobile phone payment card - Google Patents

Things protection method of mobile phone payment card transactions and mobile phone payment card Download PDF

Info

Publication number
CN102708485B
CN102708485B CN201210153134.8A CN201210153134A CN102708485B CN 102708485 B CN102708485 B CN 102708485B CN 201210153134 A CN201210153134 A CN 201210153134A CN 102708485 B CN102708485 B CN 102708485B
Authority
CN
China
Prior art keywords
data
file
cache
content
length
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.)
Active
Application number
CN201210153134.8A
Other languages
Chinese (zh)
Other versions
CN102708485A (en
Inventor
杨梦飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Eastcompeace Technology Co Ltd
Original Assignee
Eastcompeace Technology 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 Eastcompeace Technology Co Ltd filed Critical Eastcompeace Technology Co Ltd
Priority to CN201210153134.8A priority Critical patent/CN102708485B/en
Publication of CN102708485A publication Critical patent/CN102708485A/en
Application granted granted Critical
Publication of CN102708485B publication Critical patent/CN102708485B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The invention provides a things protection method of mobile phone payment card transactions. The method comprises the following steps: receiving the trade commands; storing the content of files to be updated corresponding to the trade commands in a temporary cache; writing the content in the temporary cache to a trade data temporary cache file; respectively writing the content in the temporary cache to the file corresponding to the mobile phone payment card; and resetting the temporary cache and the trade data temporary cache files. The method further comprises a step of detecting the electrification after the mobile phone payment is electrified and before the trade commands are received. According to the invention, the operations of the files during the trade process is reduced, the procedures of the things protection is simplified, the code space of the card is saved, the efficiency of the process is improved, and the trade speed of the card during the trade process is improved.

Description

A kind of things guard method of mobile phone payment card transaction and mobile phone payment card
Technical field
The present invention relates to mobile communication technology field, especially a kind of things guard method and mobile phone payment card being applied to the mobile phone payment card transaction of mobile-phone payment function.
Background technology
Mobile-phone payment incorporates the modern life, this modes of payments be by mobile phone above mobile phone payment card realize the function of small amount payment.The one-time-consumption transaction that brush mobile phone is taken pubic transport, market shopping is exactly mobile phone payment card, needing by the subway to enter the station and set off, is the compound consumer sale of mobile phone payment card.In mobile phone payment card, Sorry, your ticket has not enough value needs to supplement with money card, is the recharging payment of mobile phone payment card.
In above-mentioned each process of exchange, mobile-phone payment calorie requirement is revised accordingly to the information be stored on card.
Information in mobile phone payment card exists with document form, such as transaction record file, personal information file, wallet file etc.
Mobile phone payment card transaction process in (comprise supplement with money, consume and compound consumption) in need to carry out renewal rewards theory to the file in card.And Data Update operation can be carried out to the several files in card in a process of exchange.Card in transaction processing in any case, or even when upgrading power down in EEPROM process, must keep the integrality of card data.
The transaction protection method of existing mobile phone payment card transaction needs to do data backup to the content of each file; when there occurs power-off in process of exchange; need according to file and the file content before backing up compare one by one; if the file content in backup is not identical with the content comparison on card; so prove that the renewal rewards theory of card to file is imperfect, needs to recover file content.Can affect the transactions velocity of card to the backup operation of file, things protection process CIMS is complicated, and backs up for each file, the space of waste card.
Summary of the invention
In view of this, being necessary the problem for mentioning in background technology, providing a kind of.
The present invention is achieved by the following technical solutions:
A things guard method for mobile phone payment card transaction, it comprises the following steps:
Receive trading instruction;
The content of the file upgraded by needs corresponding for described trading instruction is stored in temporal cache;
By the content write transaction data cache file in described temporal cache;
Content in described temporal cache is write respectively the file of the correspondence of described mobile phone payment card;
Described temporal cache and described transaction data cache file are reset.
The described file upgraded that needs comprises transaction record file and/or wallet balances file.
File memory format in described temporal cache and transaction record cache file is that data length adds data, described data comprise the address of file that described needs upgrade, data length and data content, described data length be described need the file upgraded address, data length and data content total length; Described by described temporal cache and the clearing of described transaction data cache file, comprising: the described data length byte that will record in described temporal cache resets, and the byte recording described data length in described transaction data cache file is reset.
After described mobile phone payment card powers on, before described reception trading instruction step, comprise the detecting step that powers on, it comprises following concrete steps:
Whether the data length judging described transaction data cache file is zero;
If judged result is no, the content of described transaction data cache file is read in described temporal cache;
Read data content identical with length with the data address in temporal cache in mobile phone payment card, compare with the data content of the identical data address in temporal cache and length, judge that whether data content is identical;
If judged result is no, the data content in described temporal cache is write in corresponding file according to its data address and data length;
Described temporal cache and described transaction data cache file are reset.
A kind of mobile phone payment card, it comprises:
One receiver module, for receiving trading instruction;
One memory module, for the content of file that upgraded by needs corresponding for described trading instruction stored in temporal cache;
One first writing module, for writing transaction data cache file by the content in described temporal cache;
One second writing module, for writing the file of the correspondence of described mobile phone payment card respectively by the content in described temporal cache;
One dump block, for resetting described temporal cache and described transaction data cache file.
The described file upgraded that needs comprises transaction record file and/or wallet balances file.
File memory format in described temporal cache and transaction record cache file is that data length adds data, described data comprise the address of file that described needs upgrade, data length and data content, described data length be described need the file upgraded address, data length and data content total length; Described dump block is specifically for resetting described temporal cache and described transaction data cache file, comprise: the described data length byte recorded in described temporal cache is reset, and the byte recording described data length in described transaction data cache file is reset.
Described mobile phone payment card also comprises one and to power on detection module, for after described mobile phone payment card powers on, before described receiver module receives trading instruction, carries out upper electro-detection to described mobile phone payment card, described in the detection module that powers on specifically comprise:
One judging unit, for judging whether the data length of described transaction data cache file is zero;
One reads in unit, for when described judging unit judged result is no, reads in described temporal cache by the content of described transaction data cache file;
One compares and judging unit, for reading data content identical with length with the data address in temporal cache in mobile phone payment card, comparing, judge that whether data content is identical with the data content of the identical data address in temporal cache and length;
One writing unit, for when described compare and judging unit judged result is no time, by the data content in described temporal cache according in its data address and file corresponding to data length write;
One resets unit, for described temporal cache and described transaction data cache file being reset.
Compared with prior art, The present invention reduces the operation to file in process of exchange, simplify the flow process of things protection, save card code space, improve the efficiency of program, improve the transactions velocity of card in process of exchange.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of the embodiment of the present invention one;
Fig. 2 is the detecting step schematic flow sheet that powers on of the embodiment of the present invention one;
Fig. 3 is the file memory format schematic diagram in temporal cache and transaction data cache file.
Embodiment
embodiment one:
The things guard method that the present embodiment provides a kind of mobile phone payment card to conclude the business, as depicted in figs. 1 and 2, it comprises the following steps:
Receive trading instruction;
The content of the file upgraded by needs corresponding for described trading instruction is stored in temporal cache: be described with consumer sale for common supplementing with money: the described file upgraded that needs comprises transaction record file and wallet balances file, and described transaction record file is circular file; Concrete, the definition of circular file is: circular file is made up of file header and file body, and its file header comprises the information such as current record pointer, record length, record number, and file body is the particular content of every bar record; Circular file is the log file stored with time sequencing, and when all records are occupied, new storage data will cover the oldest record; The file of loop structure is made up of the fixed-length record fixing record number; In this file structure, Article 1, between record and the last item record, there is a pointer link, when a record pointer in the end record, so next record is Article 1 record, equally, when record pointer record 1 so his a upper record be exactly record n, the recording mechanism of latest update is 1, and the oldest recording mechanism is n; Concrete every bar record of transaction record file comprises the information such as dealing money, type of transaction, terminating machine numbering, trade date, exchange hour, transaction record requires at least 10, if described transaction is the inbound transaction of subway, described transaction record file also comprises inbound communication, as inbound name of station information etc.; For recharging payment or public transport consumption, this step specifically comprises: by calculating the address of write transaction record file data, the length of data, and the data address of wallet balances file, data length, by the transaction record file data address, data length and the data content that calculate, and the data address of wallet balances file, data length, data content is stored in temporal cache; As shown in Figure 3, file memory format in described temporal cache is that data length adds data, described data comprise the address of file that described needs upgrade, data length and data content, described data length be described need the file upgraded address, data length and data content total length;
Content write transaction data cache file by described temporal cache: as shown in Figure 3, file memory format in described transaction record cache file is that data length adds data, file memory format in described transaction record cache file is that data length adds data, described data comprise the address of file that described needs upgrade, data length and data content, described data length be described need the file upgraded address, data length and data content total length;
Content in described temporal cache is write respectively the file of the correspondence of described mobile phone payment card;
The data length of the data length in described temporal cache and described transaction data cache file is reset: the described data length byte recorded in described temporal cache is reset, and the byte recording described data length in described transaction data cache file is reset.
After described mobile phone payment card powers on, before described reception trading instruction step, comprise the detecting step that powers on, it comprises following concrete steps:
Whether the data length judging described transaction data cache file is zero: the object of this step is whether the content judged in described temporal cache has write described transaction data cache file, that is, whether content when judging power-off last time in temporal cache has write described transaction data cache file;
If judged result is no, the content of described transaction data cache file is read in described temporal cache: if to be the data length of described transaction data cache file non-vanishing for judged result, illustrate that power-off last time is after occurring in the content write transaction data cache file success in temporal cache, so need the content of described transaction data cache file be read in described temporal cache, can be written in corresponding file to make the content in temporal cache; If judged result is the data length of described transaction data cache file is zero, before the data write transaction data cache file that power-off last time occurs in temporal cache is then described, renewal rewards theory is not had for file involved in transaction, transaction data keeps complete in the case, without the need to transaction protection;
Read data content identical with length with the data address in temporal cache in mobile phone payment card, compare with the data content of the identical data address in temporal cache and length, judge that whether data content is identical: the object of this step is when judging power-off last time, and whether the content in temporal cache successfully writes in corresponding file;
If judged result is no, data content in described temporal cache is write in corresponding file according to its data address and data length: if judged result is no, there occurs power-off before the content illustrating in temporal cache writes corresponding file or in ablation process, then need the data content in temporal cache according in its data address and file corresponding to data length write; If judged result is yes, then return previous step, continue relatively more remaining data, until all data have compared;
Described temporal cache and described transaction data cache file are reset: the described data length byte recorded in described temporal cache is reset, and the byte recording described data length in described transaction data cache file is reset.
In sum, the inventive concept of the present embodiment can be summarized as: mobile-phone payment is stuck in process of exchange, need to upgrade the information in card, information on card exists with document form, need in process of exchange to carry out renewal rewards theory to the file of two or more in card, by calculating the address of the file of Data Update, the length of Data Update, need the data upgraded stored in temporal cache, the cache file of assembled good temporal cache data write transaction data during transaction, again in each file of the real write of the data be stored in cache file after Transaction Success, reach the things protection of transaction data.
The method of the present invention just backs up for the data of the content revising file that need in process of exchange, the value of actual file is not revised in process of exchange, in process of exchange, the content needing to revise file is stored in transaction data cache file and goes, then just each file of the real write of data, both operating process is simplified like this, save card code space, turn improve the efficiency of card.
embodiment two:
The present embodiment provides a kind of mobile phone payment card of transaction things guard method of Application Example one, and it comprises:
One receiver module, for receiving trading instruction;
One memory module, for the content of file that needs corresponding for described trading instruction are upgraded stored in temporal cache, concrete, for recharging payment or public transport consumer sale, the described file upgraded that needs comprises transaction record file and wallet balances file, and described transaction record file is circular file; Concrete every bar record of transaction record file comprises the information such as dealing money, type of transaction, terminating machine numbering, trade date, exchange hour, transaction record requires at least 10, if described transaction is the inbound transaction of subway, Transaction Information when described transaction record file also comprises inbound, as inbound name of station information; Described memory module specifically for: by calculating the address of write transaction record file data, the length of data, and the data address of wallet balances file, data length, by the transaction record file data address, data length and the data content that calculate, and the data address of wallet balances file, data length, data content is stored in temporal cache; As shown in Figure 3, for recharging payment or public transport consumer sale, file memory format in described temporal cache is that data length adds data, described data comprise the address of described transaction record file, length and transaction record file data content, and the address of described wallet balances file, length and wallet balances file data content, described data length is the address of described transaction record file, length, transaction record file data content, and the address of described wallet balances file, length and wallet balances file data content total length;
One first writing module, for the content in described temporal cache is write transaction data cache file, file memory format in described transaction record cache file is that data length adds data, for recharging payment or public transport consumer sale, described data comprise the address of described transaction record file, length and transaction record file data content, and the address of described wallet balances file, length and wallet balances file data content, described data length is the address of described transaction record file, length, transaction record file data content, and the address of described wallet balances file, the total length of length and wallet balances file data content,
One second writing module, for writing the file of the correspondence of described mobile phone payment card respectively by the content in described temporal cache;
One dump block, for described temporal cache and described transaction data cache file are reset, specifically for the described data length byte recorded in described temporal cache is reset, and the byte recording described data length in described transaction data cache file is reset.
Described mobile phone payment card also comprises one and to power on detection module, for after described mobile phone payment card powers on, before described receiver module receives trading instruction, carries out upper electro-detection to described mobile phone payment card, described in the detection module that powers on specifically comprise:
One judging unit, for judging whether the data length of described transaction data cache file is zero, specifically for judging whether the content in described temporal cache has write described transaction data cache file, that is, whether content when judging power-off last time in temporal cache has write described transaction data cache file;
One reads in unit, for when described judging unit judged result is no, the content of described transaction data cache file is read in described temporal cache, data length specifically for when described judging unit judged result being described transaction data cache file is non-vanishing, illustrate that power-off last time is after occurring in the content write transaction data cache file success in temporal cache, so need the content of described transaction data cache file be read in described temporal cache, can be written in corresponding file to make the content in temporal cache; If judged result is the data length of described transaction data cache file is zero, before the data write transaction data cache file that power-off last time occurs in temporal cache is then described, renewal rewards theory is not had for file involved in transaction, transaction data keeps complete in the case, without the need to transaction protection;
One compares and judging unit, for reading data content identical with length with the data address in temporal cache in mobile phone payment card, compare with the data content of the identical data address in temporal cache and length, judge that whether data content is identical, during specifically for judging power-off last time, whether the content in temporal cache successfully writes in corresponding file;
One writing unit, for when described compare and judging unit judged result is no time, data content in described temporal cache is write in corresponding file according to its data address and data length, concrete, if judged result is no, there occurs power-off before the content illustrating in temporal cache writes corresponding file or in ablation process, then said write unit is used for the data content in temporal cache according in its data address and file corresponding to data length write; If judged result is yes, then describedly to compare and judging unit continues relatively remaining data, until all data have compared;
One resets unit, described temporal cache and described transaction data cache file are reset, specifically for the described data length byte recorded in described temporal cache is reset, and the byte recording described data length in described transaction data cache file is reset.
The above embodiment only have expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but therefore can not be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.

Claims (2)

1. a things guard method for mobile phone payment card transaction, is characterized in that, comprise the following steps:
Receive trading instruction;
The content of the file upgraded by needs corresponding for described trading instruction is stored in temporal cache;
By the content write transaction data cache file in described temporal cache;
Content in described temporal cache is write respectively the file of the correspondence of described mobile phone payment card;
Described temporal cache and described transaction data cache file are reset;
The described file upgraded that needs comprises transaction record file and/or wallet balances file;
File memory format in described temporal cache and transaction record cache file is that data length adds data, described data comprise the address of file that described needs upgrade, data length and data content, described data length be described need the file upgraded address, data length and data content total length; Described by described temporal cache and the clearing of described transaction data cache file, comprising: the described data length byte that will record in described temporal cache resets, and the byte recording described data length in described transaction data cache file is reset;
After described mobile phone payment card powers on, before described reception trading instruction step, comprise the detecting step that powers on, it comprises following concrete steps:
Whether the data length judging described transaction data cache file is zero;
If judged result is no, the content of described transaction data cache file is read in described temporal cache;
Read data content identical with length with the data address in temporal cache in mobile phone payment card, compare with the data content of the identical data address in temporal cache and length, judge that whether data content is identical;
If judged result is no, the data content in described temporal cache is write in corresponding file according to its data address and data length;
Described temporal cache and described transaction data cache file are reset.
2. a mobile phone payment card, is characterized in that, comprising:
One receiver module, for receiving trading instruction;
One memory module, for the content of file that upgraded by needs corresponding for described trading instruction stored in temporal cache;
One first writing module, for writing transaction data cache file by the content in described temporal cache;
One second writing module, for writing the file of the correspondence of described mobile phone payment card respectively by the content in described temporal cache;
One dump block, for resetting described temporal cache and described transaction data cache file;
The described file upgraded that needs comprises transaction record file and/or wallet balances file;
File memory format in described temporal cache and transaction record cache file is that data length adds data, described data comprise the address of file that described needs upgrade, data length and data content, described data length be described need the file upgraded address, data length and data content total length; Described dump block is specifically for resetting described temporal cache and described transaction data cache file, comprise: the described data length byte recorded in described temporal cache is reset, and the byte recording described data length in described transaction data cache file is reset;
It also comprises one and to power on detection module, for after described mobile phone payment card powers on, before described receiver module receives trading instruction, carries out upper electro-detection to described mobile phone payment card, described in the detection module that powers on specifically comprise:
One judging unit, for judging whether the data length of described transaction data cache file is zero;
One reads in unit, for when described judging unit judged result is no, reads in described temporal cache by the content of described transaction data cache file;
One compares and judging unit, for reading data content identical with length with the data address in temporal cache in mobile phone payment card, comparing, judge that whether data content is identical with the data content of the identical data address in temporal cache and length;
One writing unit, for when described compare and judging unit judged result is no time, by the data content in described temporal cache according in its data address and file corresponding to data length write;
One resets unit, for described temporal cache and described transaction data cache file being reset.
CN201210153134.8A 2012-05-17 2012-05-17 Things protection method of mobile phone payment card transactions and mobile phone payment card Active CN102708485B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210153134.8A CN102708485B (en) 2012-05-17 2012-05-17 Things protection method of mobile phone payment card transactions and mobile phone payment card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210153134.8A CN102708485B (en) 2012-05-17 2012-05-17 Things protection method of mobile phone payment card transactions and mobile phone payment card

Publications (2)

Publication Number Publication Date
CN102708485A CN102708485A (en) 2012-10-03
CN102708485B true CN102708485B (en) 2015-07-22

Family

ID=46901215

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210153134.8A Active CN102708485B (en) 2012-05-17 2012-05-17 Things protection method of mobile phone payment card transactions and mobile phone payment card

Country Status (1)

Country Link
CN (1) CN102708485B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104267975B (en) * 2014-06-11 2018-10-09 大唐微电子技术有限公司 A kind of processing method and device of expanded application data, card
CN109685508B (en) * 2018-12-27 2020-06-30 北京微播视界科技有限公司 Transaction data processing method and device, electronic equipment and readable storage medium
CN109741069B (en) * 2018-12-27 2020-12-18 北京微播视界科技有限公司 Transaction data processing method and device, electronic equipment and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102013132A (en) * 2010-06-29 2011-04-13 北京飞天诚信科技有限公司 Method for performing complex application load on electronic purse
CN102147846A (en) * 2010-12-29 2011-08-10 北京握奇数据***有限公司 Method for writing data in intelligent card and intelligent card

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102013132A (en) * 2010-06-29 2011-04-13 北京飞天诚信科技有限公司 Method for performing complex application load on electronic purse
CN102147846A (en) * 2010-12-29 2011-08-10 北京握奇数据***有限公司 Method for writing data in intelligent card and intelligent card

Also Published As

Publication number Publication date
CN102708485A (en) 2012-10-03

Similar Documents

Publication Publication Date Title
CN103761649A (en) Network recharging system and method for IC card
WO2009028205A1 (en) Electronic advertizing display and information renewal method of electronic advertizing display
CN103794000A (en) Method for processing in case of non-contact IC card data reading failure and device for implementing method
CN101661565B (en) Power-off protection method of intelligent card with Mifare simulation function, device and system
CN102708485B (en) Things protection method of mobile phone payment card transactions and mobile phone payment card
CN111026769B (en) Working method of dual-core front-end system and related equipment thereof
CN102103770B (en) Processing method for transaction abnormity in electronic wallet application, and device and system thereof
CN101770670B (en) Mobile payment device and method for utilizing mobile payment device to distribute card and realize mobile payment
CN103607694A (en) Method using transaction record information recorded by smart card to provide mobile Internet services
CN102799931A (en) Data protection method of radio frequency smart card
WO2006101787A1 (en) Walkaway crediting
JP2015038692A (en) Reception device, method for controlling reception device, and program
CN101354802B (en) Method and system for processing consumption recording information
CN102147846A (en) Method for writing data in intelligent card and intelligent card
US8733645B2 (en) Unified transportation payment system
CN102103774B (en) Composite application realization method and system, and smart card
CN102446323A (en) Method for electronizing invoices
CN1963854A (en) Method for shortening exchanging time of electron money
CN103914773A (en) Transaction method and system integrating multiple kinds of membership card information
CN208654859U (en) A kind of integrated monolithic formula mobile unit
CN102592154B (en) Intelligent card and data processing method and device therefor
JP4362736B2 (en) Mobile phone
CN101674679A (en) Mobile terminal, consumption information storage method and device thereof
CN105488557A (en) Non-contact IC card and application system thereof
CN101795312B (en) Security management method, security management system and security management mobile terminal for mail data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: 519060 Guangdong province science and Technology Park in Zhuhai Nanping Ping Gong Road No. 8

Applicant after: Eastcompeace Technology Co., Ltd.

Address before: 519060 Guangdong province science and Technology Park in Zhuhai Nanping Ping Gong Road No. 8

Applicant before: Eastcompeace Smart Card Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: EASTCOMPEACE SMART CARD CO., LTD. TO: EASTCOMPEACE TECHNOLOGY CO., LTD.

C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant