Background technology
Electronic wallet application is a kind ofly to use for financial integrated circuit (IC, the Integrate Circuit) card that makes things convenient for the on-the-spot small amount consumption of holder design, and various functions such as support is strivied for survival, inquiry into balance and transaction detail query.
Described financial IC card typically refers to contact or contact type intelligent card, comprise the subscriber identification card (SIM that is applied in the mobile phone, Subscriber Identity Module) or global subscriber identification card (USIM, Universal Subscriber Identity Module) etc.The holder can deposit certain amount of money (being placed in the on-the-spot off line payment account of smart card) in advance in smart card, when carrying out consumer sale, directly off line is deducted corresponding dealing money and got final product from the account at every turn.
Application of composite is on the basis of electronic wallet application, a kind of new application model of introducing according to the characteristics of part sector application.Different with the dealing money that the each deduction of electronic wallet application is fixing, multiplexing application has increased the ability that writes down non-finance data, and data write with consumer sale and finish simultaneously, and non-finance data is mainly used in the basis as dealing money.Such as, when the user took subway, the information that enters the station of recording user was as the website that enters the station, when the user sets off, according to the website that enters the station of record, in conjunction with the set off difference of website of active user, the different dealing money of deduction from user account.Application of composite mainly is applicable to and has the records of distance by the log, the financial consumption field of timing or metering.
Table one is an Application of composite private file form:
Table one Application of composite private file
Table two is the formation situation of every record in the Application of composite private file:
| Byte | Data element | Length | |
| 1 | The Application ofcomposite type identifier | 1 |
| 2 | Record length | 1 |
| 3 | The application lock calibration is known | 1 |
| 4-n | The Application of composite data | n-3 |
Record in the table two Application of composite private file
The variable-length of the 4th byte in every record is defined voluntarily by the card issuer.
The Application of composite private file is subjected to the applicating maintenance cryptographic key protection, under nontransaction state, need to use process applicating maintenance key authentication or utilize the applicating maintenance key to generate Message Authentication Code (MAC, MessageAuthentication Code) safe packet is safeguarded the private file of Application of composite; Under stateful transaction, need to come the Application of composite private file is made amendment by Application of composite transaction flow shown in Figure 1.
Fig. 1 is existing Application of composite transaction flow synoptic diagram.As shown in Figure 1, may further comprise the steps:
Step 11: the smart card that point of sale (POS, Point of sales) machine uses to the user sends Application of composite initialization (INITIALIZE FOR CAPP PURCHASE) order, starts the Application of composite consumer sale.
Step 12: smart card carries out a series of inspection according to the INITIALIZE FOR CAPP PURCHASE order that receives, and after inspection is passed through, generates a pseudo-random key and a process key, returns to the POS machine.
Step 13:POS machine generates MAC1 according to the pseudo-random key that receives and process key, and is carried to upgrade in Application of composite (the UPDATE CAPP DATA CACHE) order and sends to smart card.
Step 14: smart card is according to a series of inspection of UPDATE CAPP DATA CACHE order carrying out that receives, pass through if check, then keep in file identification, recording mechanism, Application of composite type identifier and the data field etc. that carry in the order, and return response message to POS.
Step 15:POS machine sends Application of composite to smart card and rewrites (DEBIT FOR CAPPPURCHASE) order.
Step 16: the validity of smart card checking MAC1, checking is passed through, according to temporary information, this dealing money of deduction from payment of balance, and upgrade Application of composite private file etc.
The specific implementation of above steps does not describe in detail.
But also there is certain problem in above-mentioned Application of composite when bringing advantage to the user, such as, use when can't satisfy a plurality of users a sheet smart card.For instance, user A holds smart card and takes subway, on the gate of inlet, carried out the operation of swiping the card when entering the station, like this, to record the information that enters the station of user A on the smart card, during departures, user A has carried out the operation of swiping the card on the gate of outlet, gate will be according to the information and executing that enters the station that writes down on the smart card operation of deducting fees, and this process is no problem; If but two good friends of user A and user B take subway simultaneously, and user B leaves behind card, user A may wish to utilize the smart card of oneself to come to swipe the card with user B for own simultaneously so, but prior art also can't satisfy this demand of user, thereby has brought inconvenience for user's use.
Summary of the invention
In view of this, fundamental purpose of the present invention is to provide a kind of implementation method of Application of composite, can be user-friendly.
Another object of the present invention is to provide a kind of realization system of Application of composite, can be user-friendly.
Another purpose of the present invention is to provide a kind of smart card, can be user-friendly.
For achieving the above object, technical scheme of the present invention is achieved in that
A kind of implementation method of Application of composite comprises:
Point of sale POS machine determines that the user carries out the operation of swiping the card that enters the toll zone, generates one and enters the toll zone record, sends to the smart card that the user uses; Described smart card will receive enters the toll zone record and is written to by pre-defined rule and enters in the record set of toll zone;
Described POS machine determines that the user carries out the operation of swiping the card of leaving the toll zone, and enters the toll zone record to described smart card request; Described smart card is pressed pre-defined rule, reads out one the record set of toll zone and enters the toll zone record from described entering, and sends to described POS machine;
Described POS machine is finished this transaction according to the toll zone record that enters that receives.
A kind of realization system of Application of composite comprises:
Point of sale POS machine, be used for entering the swiping the card during operation of toll zone when determining that the user carries out, generate one and enter the toll zone record, send to the smart card that the user uses, leave the swiping the card during operation of toll zone when determining that the user carries out, enter the toll zone record to described smart card request, and finish this transaction according to the toll zone record that enters that receives;
Described smart card, the toll zone record that enters that is used for being received from the POS machine is written to by pre-defined rule and enters the toll zone record set, and after the request that receives from described POS machine, press pre-defined rule, read out one the record set of toll zone and enter the toll zone record from described entering, send to described POS machine.
A kind of smart card comprises:
Writing unit, the toll zone record of entering that is used for being received from point of sale POS machine is written to by pre-defined rule and enters the toll zone record set;
Reading unit is used for pressing pre-defined rule after the request that receives from described POS machine, reads out one the record set of toll zone and enters the toll zone record from described entering, and sends to described POS machine.
As seen, adopt technical scheme of the present invention, in smart card, be provided with and enter the toll zone record set, what be used to preserve a plurality of user's correspondences enters the toll zone record, when each user leaves the toll zone, reads out the corresponding toll zone record that enters according to pre-defined rule, and finish this transaction according to the toll zone record of entering that reads out, like this, can realize that a plurality of users use a sheet smart card simultaneously, thus convenient for users to use.
Embodiment
At problems of the prior art, a kind of Application of composite implementation is proposed among the present invention, in smart card, be provided with and enter the toll zone record set, what be used to preserve a plurality of user's correspondences enters the toll zone record, when each user leaves the toll zone, read out the corresponding toll zone record that enters according to pre-defined rule, and finish this transaction according to the toll zone record that enters that reads out; Like this, can realize that a plurality of users use a sheet smart card simultaneously, thus convenient for users to use.
Based on above-mentioned introduction, Fig. 2 is the process flow diagram of Application of composite implementation method embodiment of the present invention.As shown in Figure 2, may further comprise the steps:
Step 21:POS machine determines that the user carries out the operation of swiping the card that enters the toll zone, generates one and enters the toll zone record, sends to the smart card that the user uses; Smart card will receive enters the toll zone record and is written to by pre-defined rule and enters in the record set of toll zone.
How to generate and enter the toll zone and be recorded as prior art, repeat no more.
Step 22:POS machine determines that the user carries out the operation of swiping the card of leaving the toll zone, and enters the toll zone record to the smart card request; Smart card is pressed pre-defined rule, reads out one and enter the toll zone record from enter the toll zone record set, sends to the POS machine.
In thestep 21, smart card whenever receive one enter toll zone record after, can be written into the end that enters the toll zone record set, like this, the toll zone that respectively enters that enters in the record set of toll zone is write down and will be arranged by the order after arriving first according to the rise time; Correspondingly, in thestep 22, smart card reads when entering the toll zone record, can be by first in first out (FIFO, First In First Out) order, read out being written to the toll zone record that enters that enters in the record set of toll zone at first, promptly read and enter the toll zone record from the team's head that respectively enters the formation that toll zone record formed, as shown in Figure 3, perhaps, also can be by last in, first out (LIFO, Last In First Out) order, the up-to-date toll zone record of entering that enters in the record set of toll zone that is written to is read out, promptly read out and enter the toll zone record, as shown in Figure 4 from the tail of the queue of formation.In addition, in thestep 21, smart card can also then according to priority order from high to low, be written to the relevant position that enters in the record set of toll zone with the toll zone record that enters that receives for the different different priority of toll zone recording setting that enter; Correspondingly, instep 22, read out at every turn be priority the highest enter the toll zone record.
Above-mentioned only for illustrating, in actual applications, can be provided with arbitrarily as required enter toll zone record write and read mode.Which kind of no matter adopts write and read mode, all be not influence concerning operator, taking subway with the user is example, three user A, B, C, enter the station when swiping the card according to user A, user B, the order of user C, during departures, still according to user A, user B, the order of user C, if but adopt the above-mentioned mode that reads that last in, first out, when calculating the dealing money of user A, what be based on user C enters the consumption area record, but not influence for operator, as long as finally three usefulness have correctly been charged per family, because three users' dealing money sum can not become.
Step 23:POS machine is finished this transaction according to the toll zone record that enters that receives.
The specific implementation of this step is a prior art, repeats no more.
In addition, in actual applications, the user might occur does not swipe the card and promptly leaves the situation of toll zone, when taking bus the last time such as the user, normally swipe the card when getting on the bus, but forget when getting off and swipe the card, in the scheme so of the present invention, carry out this user and get on the bus and swipe the card when operation, the POS machine can be before generation enters the toll zone record, at first the smart card that uses to the user sends the reading and recording order, and receive the information that smart card returns, whether exist not swipe the card according to the definite user of this smart card before of the information that receives and promptly leave the situation of toll zone, if, then handle according to the acquiescence mode, such as execution deduct fees the operation etc.
Wherein, whether the user of this smart card exists the specific implementation of the situation of promptly leaving the toll zone of not swiping the card to be before determining according to the information that receives: if the information that receives is for entering the toll zone record, and this difference that enters rise time of toll zone record and current time is greater than predefined first threshold, perhaps, this enters toll zone record and does not belong in the record of toll zone one of entering who self has preserved, and the user of this smart card exists not swipe the card and promptly leaves the situation of toll zone before then determining; Described preserved enter that toll zone record is meant from the fixed time to the current time this section the POS machine is generated in the period all enter the toll zone record.The specific implementation back can be described further by preferred embodiment.
In addition, in the scheme of the present invention, also can limit the number that allows to use simultaneously a sheet smart card by the enter the station size of record set of restriction.Specifically, smart card can will be received from the POS machine enter toll zone record be written to enter in the record set of toll zone before, judge that at first whether enter the toll zone that enters that has existed in the record set of toll zone writes down number more than or equal to predefined second threshold value, if, then notify the POS machine, the POS machine enters the toll zone with refusing user's, otherwise, the toll zone record of entering that receives is written to by pre-defined rule and enters in the record set of toll zone.
The concrete value of above-mentioned each threshold value can be decided according to the actual requirements.
Taking subway with the user below is example, and scheme of the present invention is described in further detail:
Fig. 5 is the process flow diagram of Application of composite implementation method of the present invention preferred embodiment.Specific in this preferred embodiment, described POS machine refers to gate, described record set fingering station, the toll zone record set that enters.As shown in Figure 5, may further comprise the steps:
Step 51: the user is entered the station and is swiped the card, and gate sends reading and recording (Read Record) order to smart card.
Step 52: after smart card receives order, from the record set that enters the station, read the record that enters the station, and return to gate.
Step 53: whether the user of this smart card existed the i.e. situation of departures of not swiping the card before the information that gate returns according to smart card was determined, if then execution instep 54, otherwise, execution instep 55.
In actual applications, three kinds of situations may appear in the information that smart card returns to gate, the information of promptly returning for empty, return non-this record that enters the station, or return this record that enters the station.
Because according to normal flow, after the correct departures of user are swiped the card, smart card can be from the record set that enters the station with the record deletion that enters the station of this user's correspondence, so suppose that Monday, three users used a sheet smart card A simultaneously, smart card A goes up correspondence is preserved three records that enter the station so, when these three usefulness per family correctly departures swipe the card after, three corresponding records that enter the station will be all deleted, like this, if some day subsequently, as Wednesday, these three users have used smart card A again simultaneously, so when first user enter the station swipe the card after, smart card will read less than the record that enters the station, the information that promptly returns to gate is for empty; And the user of entering the station and swiping the card for the next one, what smart card read will be the record that enters the station that generates behind the user card punching that enters the station before this user, i.e. this record that enters the station; In addition, also might be that some among these three users forgotten during departures when using smart card A Monday and swiped the card, so in this day on Wednesday, smart card reads just may be the generation of this day on Monday but the also not deleted record that enters the station, promptly non-this record that enters the station.
If the information that smart card returns is for empty, then think the situation that does not exist departures not swipe the card, follow-up execution in step 55 gets final product, for back two kinds of situations, since return be the record that enters the station (mode that returning enters the station writes down can with subsequent step 59 in identical), so also need to distinguish by certain strategy, such as: if the difference of the rise time of the record that enters the station that smart card returns and current time is greater than predefined first threshold, perhaps, smart card returns, and the record that enters the station does not belong in the record of having preserved in the POS machine that enters the station one, the situation of then determining to exist the user to set off and not swiping the card.For instance, preserve all records that enter the station that generate within nearest 24 hours in the POS machine at the different intelligent card, and the information of preserving carried out real-time update, if the record that enters the station that smart card returns does not belong to one in the record of self preserving that enters the station, illustrate that then this record that enters the station generated before 24 hours, and under the normal condition, the user can not stay in the subway in 24 hours always, thus can determine this be because the user takes subway the last time time departures do not swipe the card cause.
Certainly, above-mentioned only for illustrating, in actual applications, can be each POS machine different strategies is set, as long as can effectively identify the situation that whether exists the user to set off and do not swipe the card.
Step 54: handle by the acquiescence mode.
Such as, carry out the operation of deducting fees, continue execution instep 55 then, or refusing user's enters the station, or ignore clearance, direct execution instep 55 etc., specific implementation is not limit.
Step 55: gate and smart card carry out compound consumer sale.
Step 56: after compound consumer sale was finished, gate generated the record that enters the station, and sends to smart card.
Step 57: smart card is written to the record that enters the station that receives in the record set that enters the station according to predetermined way.
Described predetermined way comprises the mode that the record that enters the station that receives is written to the end of the record set that enters the station, and according to the difference that the sets in advance corresponding different priorities of record that enters the station, according to priority order from high to low, the record that enters the station that receives is written to modes such as relevant position in the record set that enters the station.
Step 58: user's departures are swiped the card, and gate sends Read Record order to smart card.
Step 59: after smart card receives order, press predetermined way, from the record set that enters the station, read out the record that enters the station, and return to gate.
Described predetermined way comprise read out be written at first enter in the record set of toll zone enter toll zone record, read out up-to-date be written to enter enter the toll zone record in the record set of toll zone, and read out the highest mode such as toll zone record that enters of priority.
Step 510: the information that gate returns according to smart card, carry out compound consumer sale with smart card.
Step 511: after compound consumer sale was finished, the record that enters the station that smart card will read out was deleted from the record set that enters the station.
So far, promptly finished flow process shown in the inventive method preferred embodiment.
Based on said method, Fig. 6 realizes the composition structural representation of system embodiment for Application of composite of the present invention.As shown in Figure 6, comprising:
POS machine 61, be used for entering the swiping the card during operation of toll zone when determining that the user carries out, generate one and enter the toll zone record, send to thesmart card 62 that the user uses, leave the swiping the card during operation of toll zone when determining that the user carries out, enter the toll zone record tosmart card 62 requests, and finish this transaction according to the toll zone record that enters that receives;
Smart card 62, the toll zone record that enters that is used for being received fromPOS machine 61 is written to by pre-defined rule and enters the toll zone record set, and after the request that receives fromPOS machine 61, press pre-defined rule, from enter the toll zone record set, read out one and enter the toll zone record, send toPOS machine 61.
POS machine 61 can be further used for, send the reading and recording order tosmart card 62, and receive the information thatsmart card 62 returns, if the information that receives is for entering the toll zone record, and this difference that enters rise time of toll zone record and current time is greater than predefined first threshold, perhaps, this enters toll zone record and does not belong in the record of toll zone one of entering who self has preserved, user's existence ofsmart card 62 is not swiped the card and is promptly left the situation of toll zone before then determining, handles according to the acquiescence mode; Described preserved enter that toll zone record is meant from the fixed time to the current time thissection POS machine 61 is generated in the period all enter the toll zone record.
Fig. 7 is the composition structural representation of smart card embodiment of the present invention.As shown in Figure 7, comprising:
Writing unit 71, the toll zone record of entering that is used for being received from the POS machine is written to by pre-defined rule and enters the toll zone record set;
Readingunit 72 is used for pressing pre-defined rule after the request that receives from the POS machine, reads out one and enter the toll zone record from enter the toll zone record set, sends to the POS machine.
Wherein, can specifically comprise in the writing unit 71: receivesubelement 711, be used to receive and enter the toll zone record from the POS machine; Writesubelement 712, the toll zone record that enters that is used for receiving is written to the end that enters the toll zone record set;
Can specifically comprise in the reading unit 72: read subelement 721, be used for after the request that receives from the POS machine, read out and be written to of entering in the record set of toll zone at first and enter the toll zone record, or read out and up-to-dately be written to of entering in the record set of toll zone and enter the toll zone record; Sendsubelement 722, the toll zone record that enters that is used for reading out sends to the POS machine.
Perhaps, receivesubelement 711, be used to receive and enter the toll zone record from the POS machine; Writesubelement 712, be used for entering the corresponding different priorities of toll zone record,, the toll zone record that enters that receives is written to the relevant position that enters in the record set of toll zone according to priority order from high to low according to the difference that sets in advance; Readsubelement 721, be used for after the request that receives from the POS machine, read out the highest one of priority and enter the toll zone record; Sendsubelement 722, the toll zone record that enters that is used for reading out sends to the POS machine.
In addition, also can further comprise in thewriting unit 71 shown in Figure 7:judgment sub-unit 713, be used for when receivesubelement 711 receive from the POS machine enter the toll zone record after, judge that whether enter the toll zone that enters that has existed in the record set of toll zone writes down number more than or equal to predefined second threshold value, if, then notify the POS machine, otherwise notice writessubelement 712 and carries out self function.
The concrete workflow of system shown in Fig. 6 and 7 and device embodiment please refer to the respective description among the method embodiment shown in Fig. 2 and 5, repeats no more herein.
In a word, adopt technical scheme of the present invention, can realize that a plurality of users use a sheet smart card simultaneously, thus convenient for users; And what scheme of the present invention can be provided with smart card flexibly writes and reads mode; Have, scheme of the present invention need not the interface between existing smart card and the POS machine etc. is made any change, and has good compatibility again.
In sum, more than be preferred embodiment of the present invention only, be not to be used to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.