A kind of data processing method and smart cardTechnical field
The present invention relates to communication technical field, particularly relate to a kind of data processing method and smart card.
Background technology
At present, the most common IC (Integrated Circuit, integrated circuit) card is (such as water card, electricity card and combustionGas card etc.) pay charge way generally can be pre-pay charge way, concrete payment flow process can be:
1, user will be supplemented with money to business hall or payment on behalf point by the read-write card terminal being connected with the cloud server of card tableThe amount of money writes to IC-card;
2, after user goes home, IC-card is inserted in corresponding card table, so that the recharge amount in IC-card is write to accordinglyCard table in, now, the data in card table have also been written simultaneously in this IC-card.
Although this mode is capable of the purpose of payment, but is the necessity for user and goes to card table side (such as ammeter etc.) to specifyPlace pay the fees so that paying process is complex, Consumer's Experience is poor.
In view of this, it is proposed in the industry a kind of smart card traditional IC-card and communication apparatus being integrated together, wherein,IC-card part is responsible for the data interaction between described smart card and card table, and communication apparatus is responsible for described smart card and corresponding card tableData interaction between cloud server, so, user can realize the self-help payment of corresponding card table without going out, and is greatly simplifiedThe payment flow process of traditional IC-card, improves the experience of user, also saves hardware resource.
But, owing to producer's (or model) of current IC-card is more, and the IC-card of each producer (or model) all has it specialFixed read-write card rule so that the developer of smart card, also need to be for difference when carrying out integrated by IC-card with communication apparatusProducer's (or model) carry out the integrated of different modes.
For example, it is assumed that in the read-write card rule of A class IC-card (corresponding A company or A model), corresponding the depositing of Customs Assigned NumberStorage variable is N, and the N position that this storage variable is positioned in card chip, in the read-write card of B class IC-card (corresponding B company or Type B number)In rule, the storage variable that Customs Assigned Number is corresponding is M, and the M position that this storage variable is positioned in card chip.When needs are by A classWhen IC-card and communication apparatus carry out integrated, it is necessary to rely on the read-write rule of A class IC-card, when B class IC-card is set by needs with communicationFor when carrying out integrated, it is necessary to rely on the read-write rule of B class IC-card so that when the kind of IC-card is more, the data of smart cardRead-write rule and integration mode also can increase therewith, thus may exist owing to cannot use the integrated intelligence of unified integration modeCaused, the problem that integration mode is complex and cost of manufacture is higher of smart card can be blocked.
Summary of the invention
Embodiments provide a kind of data processing method and smart card, in order to solve present in prior art byIn integration mode that unified integration mode integrated smart card is caused, smart card being used complex and be fabricated toThis higher problem.
Embodiments provide a kind of data processing method, including:
What smart card received that communication apparatus sends fills card information for arbitrary card table;
According to the intelligent card data read-write rule set, determine described in fill in card information each data and described smart cardThe corresponding relation between each storage variable in card chip;
Right between each storage variable in card chip according to the described each data filled in card information and described smart cardShould be related to, by the described card chip filling card information write extremely described smart card.
Alternatively, according to each storage variable in the card chip of the described each data filled in card information and described smart card itBetween corresponding relation, by described fill card information write to described smart card card chip in, including:
Call the static database of described card table, and based on described static database by the described each number filled in card informationAccording in the storage variable corresponding with described data in the card chip of write to described smart card.
Alternatively, after by the described card chip filling card information write extremely described smart card, described method also includes:
When described smart card carries out contacting connection with described card table, the card information that fills in described card chip is write to instituteState in card table.
Alternatively, will fill card information write to after in described card table in described card chip, described method also includes:
Intelligent card data read-write rule according to described setting, determines that the storage corresponding to each data in card table data becomesAmount;Wherein, to be described card table complete after card table supplements with money, in write to described card chip according to filling card information described card table data's;
From each storage variable determined, obtain corresponding data to obtain described card table data, and described in obtainingIn card table write back data extremely described communication apparatus.
Alternatively, from each storage variable determined, the data of acquisition correspondence are to obtain described card table data, and will obtainDescribed card table write back data in described communication apparatus, including:
Call the static database of described card table, and based on described static database by each number in described card table dataAccording to being written back in described communication apparatus.
Alternatively, described communication apparatus at least includes bluetooth communication equipment, infrared communication equipment, NFC (Near FieldCommunication, wireless near field communication) communication apparatus, WiFi (Wireless Fidelity, Wireless Fidelity) communication setAny one or more in Bei.
Correspondingly, the embodiment of the present invention additionally provides a kind of smart card, including:
Receiver module, fills card information for receive that communication apparatus sends for arbitrary card table;
Determine module, for according to set intelligent card data read-write rule, determine described in fill in card information each dataAnd the corresponding relation between each storage variable in the card chip of described smart card;
Processing module, for filling each storage in the card chip with described smart card of each data in card information described in basisCorresponding relation between variable, by the described card chip filling card information write extremely described smart card.Specifically, described process mouldBlock, specifically for calling the static database of described card table, and based on described static database by described fill in card information everyIn the storage variable corresponding with described data in the card chip of one data write extremely described smart card.
Alternatively, described processing module, it is additionally operable to by the described card chip filling card information write extremely described smart cardAfterwards, when described smart card carries out contacting connection with described card table, the card information that fills in described card chip is write to the most describedIn card table.
Alternatively, described determine module, be additionally operable to described card chip to fill card information write in described card tableAfterwards, read and write rule according to the intelligent card data of described setting, determine the storage variable corresponding to each data in card table data;Wherein, to be described card table complete after card table supplements with money, in write to described card chip according to filling card information described card table data;
Described processing module, is additionally operable to from each storage variable determined, obtains corresponding data to obtain described card tableIn data, and the described card table write back data extremely described communication apparatus that will obtain.
Alternatively, described processing module, also particularly useful for calling the static database of described card table, and based on described static stateData base is by each write back data in described card table data to described communication apparatus.
Alternatively, described communication apparatus at least includes bluetooth communication equipment, infrared communication equipment, NFC communication apparatus, WiFiAny one or more in communication apparatus.
The present invention has the beneficial effect that:
Embodiments providing a kind of data processing method and smart card, smart card can receive what communication apparatus sentFor the card information that fills of arbitrary card table, and according to the intelligent card data read-write rule set, determine described in fill in card information eachThe corresponding relation between each storage variable in the card chip of data and described smart card, and can according to described corresponding relation,By in the described card chip filling card information write extremely described smart card.Compared to prior art, it is provided that a kind of unified intelligenceCard reading and writing data rule so that smart card developer can be directly based upon described unified intelligent card data read-write rule, carries outIC-card is integrated with communication apparatus, and without carrying out the integrated of different modes for different IC-cards.Solve in prior artExist due to cannot use integration mode that unified integration mode integrated smart card is caused, smart card complex withAnd the problem that cost of manufacture is higher.
Accompanying drawing explanation
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, in embodiment being described below required for makeAccompanying drawing briefly introduce, it should be apparent that, below describe in accompanying drawing be only some embodiments of the present invention, for thisFrom the point of view of the those of ordinary skill in field, on the premise of not paying creative work, it is also possible to obtain other according to these accompanying drawingsAccompanying drawing.
Fig. 1 show the system architecture figure that the embodiment of the present invention can be suitable for;
Fig. 2 show the schematic flow sheet of the data processing method in the embodiment of the present invention one;
Fig. 3 show a kind of concrete schematic flow sheet of the data processing method in the embodiment of the present invention one;
Fig. 4 show the structural representation of the smart card in the embodiment of the present invention two.
Detailed description of the invention
In order to make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing the present invention made intoOne step ground describes in detail, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole enforcementExample.Based on the embodiment in the present invention, those of ordinary skill in the art are obtained under not making creative work premiseAll other embodiments, broadly fall into the scope of protection of the invention.
Below, as a example by the system architecture diagram shown in Fig. 1, the system can being suitable for the embodiment of the present invention is carried out in detailIntroduction.Specifically, as it is shown in figure 1, described system can include terminal 101, communication apparatus 102, smart card 103 and card table 104,Wherein:
Described terminal 101 generally can be wireless terminal or catv terminal, described wireless terminal concretely mobile terminal (exampleSuch as mobile phone, panel computer) or there is the PC (Personal Computer, PC) of radio function, described catv terminalThe PC concretely communicated by wired mode or Set Top Box etc.;
Described communication apparatus 102 generally can be wireless telecommunications system, as bluetooth communication equipment, infrared communication equipment, NFC lead toNews equipment and WiFi communication equipment etc..And, described communication apparatus 102 can wirelessly and/or wired mode and terminal101 are attached, to realize data interaction between the two, described wireless mode specifically can include bluetooth approach, NFC mode,Infrared mode, WiFi mode etc. (specifically, when described communication apparatus is bluetooth communication equipment, described communication apparatus 102 and instituteState the connected mode between terminal 101 generally can be bluetooth approach, when described communication apparatus is infrared communication equipment, described logicalConnected mode between news equipment 102 and described terminal 101 generally can be infrared mode, when described communication apparatus be NFC communicationDuring equipment, the connected mode between described communication apparatus 102 and described terminal 101 generally can be NFC mode, sets when described communicationFor during for WiFi communication equipment, the connected mode between described communication apparatus 102 and described terminal 101 generally can be WiFi sideFormula), described wired mode specifically can include USB (Universal Serial Bus, USB (universal serial bus)) mode etc.;
Described smart card 103 generally can be the smart card of the read-write operation being capable of data, and described communication apparatus is alsoCan be the integrated equipment being integrated in described smart card 103, certainly, it is possible to for independent with described smart card 103 oneAutonomous device, does not repeats this;
Described card table 104 generally can be and is arbitrarily capable of Card Reader and writes the equipment of card, and described card table 104 is with describedAnnexation between smart card 103 can be that contact connects and/or contactless link (electromagnetic induction, photoelectric sensing etc.);
It should be noted that in embodiments of the present invention, between terminal 101 and cloud server (not shown in figure 1)Communication mode, it is possible to for above-described various communication modes, this is not restricted by the present embodiment.
It addition, in the present embodiment, described terminal 101 represented in described terminal 101 with connecting of described communication apparatus 102Certain application (such as wechat public number) in APP (Application, application program) or described terminal 101 is logical with describedThe connection of news equipment 102, does not repeats this.
Further, described smart card 103 can be specifically for supplementing with money for corresponding card table 104, such as, when user needsDuring electricity to be bought, described smart card 102 can be the Intelligent electric card for carrying out supplementing with money for ammeter 104A (as shown in Figure 1), whenWhen user needs to buy water, described smart card 102 can be for the intelligent water card for carrying out supplementing with money for water meter 104B, when user needsDuring combustion gas to be bought, described smart card 102 can carry out, for user, the intelligent gas card supplemented with money for gas meter, flow meter 104C.NamelySay, described smart card 102 can one card for multiple uses, as Intelligent electric card, intelligent water card, intelligent gas card etc., correspondingly, with described intelligence102 corresponding card tables can be blocked and may also comprise ammeter 104A, water meter 104B and gas meter, flow meter 104C etc..
It should be noted that each communication apparatus 102 generally can a corresponding smart card 103, a terminal 101 can be with oneIndividual or multiple communication apparatus 102 carry out binding (i.e. one terminal 101 can be bound) with one or more smart cards 103,Meanwhile, communication apparatus 102 also can carry out with one or more terminals binding (i.e. one sheet smart card 103 can with one orMultiple terminals 101 are bound), i.e. there is the binding of multi-to-multi between terminal 101 and communication apparatus 102 (i.e. smart card 103)Relation.
Filling card mode based on what the embodiment of the present invention provided, user can be supplemented with money by the carrying out that below scheme is card table 103(with card table as ammeter, as a example by smart card is Intelligent electric card):
1, user carries out lower single operation by terminal 101.
Wherein it is desired to explanation, after user carries out lower single operation by terminal 101, described terminal 101 can generateCorresponding sequence information, and described sequence information can be sent the cloud server (cloud service such as ammeter to corresponding card tableDevice), to be filled card information by described cloud server accordingly according to the generation of described sequence information, and the described card information that fills is sentTo described terminal 101.
In addition, it is necessary to explanation, the data interactive mode between the cloud server of affiliated terminal and described ammeter canCarried out by the Internet, this is not repeated.
2, terminal 101 and communication apparatus 102 are attached (wired connection mode and/or radio connection) by user,So that the described card information that fills can be sent to described communication apparatus 102 by described terminal.
Wherein, the described card information that fills can be sent extremely by terminal by the communication mode corresponding with described communication apparatus 102Described communication apparatus 102, such as the bluetooth approach corresponding with bluetooth communication equipment, the infrared side corresponding with infrared communication deviceThe NFC mode that formula is corresponding with NFC communication apparatus, the WiFi mode etc. corresponding with WiFi communication equipment.
3, the described card information that fills is sent to described smart card 103 by described communication apparatus 102.
Wherein it is desired to explanation, described communication apparatus 102 can be the autonomous device independent of described smart card 103, alsoIt can be integrated and in described smart card 103 integrated equipment.And, when described communication apparatus 102 is autonomous device, described communicationEquipment 102 is also by wired or wirelessly send to described smart card 103, the described card information that fills when described communicationWhen equipment 102 is integrated equipment, the CPU (Central Processing Unit, central processing unit) of described smart card 103 canCard information is filled described in directly obtaining.Certainly, it is possible to realize otherwise between communication apparatus 102 and described smart card 103Data interaction, this is not repeated.
4, smart card 103 according to set intelligent card data read-write rule, determine described in fill in card information each data withThe corresponding relation between each storage variable in the card chip of described smart card 103;
5, smart card 103 is according to respectively storing change in the card chip of the described each data filled in card information and described smart cardCorresponding relation between amount, by the described card chip filling card information write extremely described smart card 103;
6, when described smart card 103 carries out contacting connection with described ammeter 104A, smart card 103 is by described card chipFill card information write in described card table, meanwhile, ammeter 104A is by the card chip of card table write back data to described smart card 103In.
Knowable to above-mentioned recharge procedure, in embodiments of the present invention, user can directly pass through terminal 101 and communication apparatus102 purchases of realization electricity and supplementing with money of ammeter, and without going to corresponding business hall or payment point, thus greatly simplifieFill the flow process of card, save the time, improve the experience of efficiency and user;And owing to being connected with cloud server without usingRead-write card terminal, moreover it is possible to save hardware resource further.
2 (they are the schematic flow sheet of the data transmission method described in the embodiment of the present invention) are to this below in conjunction with the accompanying drawingsThe data processing method provided in bright embodiment explains.Specifically, as in figure 2 it is shown, described method can include followingStep:
Step 201: what smart card received that communication apparatus sends fills card information for arbitrary card table.
Alternatively, described communication apparatus at least can include bluetooth communication equipment, infrared communication equipment, NFC communication apparatus,Any one or more in WiFi communication equipment.Certainly, described communication apparatus can be also other communication apparatus, such as RFID(Radio Frequency Identification, radio frequency identification) communication apparatus etc., do not repeat this.
Wherein it is desired to explanation, a sheet smart card can bind multiple card table simultaneously, to realize filling multiple card tablesValue, does not repeats this.
Alternatively, to be that the cloud server according to described card table is executed order the described card information that fills for arbitrary card tableSingle information generates, i.e. after user carries out lower single operation by terminal, terminal can generate corresponding sequence information, and can be by instituteState sequence information and send the cloud server to described card table, with the cloud server by described card table according to described sequence informationGenerate and fill card information accordingly.
Wherein, described in fill the data included in card information and can be set flexibly according to business demand by described card table root, e.g.,Can include the card number of smart card, the number of times of login, O/No., the numbering of table card, dealing money, table card supplement quantity, end with moneyThe data relevant to order such as the user account that end logs in, here is omitted.
It should be noted that the described data that card information comprised of filling for arbitrary card table can be clear data.Certainly,In order to ensure the safety in data transmission procedure, the data that card information also comprises of filling of described card table are alternatively ciphertext numberAccording to.Wherein, described ciphertext data be the cloud server standard data structure based on described card table self of described card table (generallyNot external disclosure), (i.e. the described card information that fills being carried out business encryption) that generate according to the sequence information that receives, or instituteState the cloud server standard data structure based on described smart card self of smart card, the sequence information received is added(i.e. the described card information that fills being communicated encryption) of close generation, it is also possible to simultaneously carried out business encryption and communication encryptionCiphertext data, do not repeat this.
Step 202: according to set intelligent card data read-write rule, determine described in fill in card information each data with describedThe corresponding relation between each storage variable in the card chip of smart card.
It should be noted that the intelligent card data read-write rule of described setting can set flexibly according to the practical situation of userPutting, storage variable " DATA1 ", " card table numbering " in the card chip of smart card as described in can arrange " Customs Assigned Number " and be corresponding are correspondingStorage variable " DATA2 " in the card chip of described smart card, " purchase volume " corresponding described smart card card chip in storageVariable " DATA3 ", " purchase number of times " corresponding described smart card card chip in storage variable " DATA4 ", " type of card " rightAnswer the storage variable " DATA5 " etc. in the card chip of described smart card, it addition, " Watch Factory's numbering " corresponding described intelligence also can be arrangedStorage variable " DATA6 " etc. in the card chip of card, does not repeats this.
Such as, as a example by buying electricity, it is assumed that communication apparatus is to filling of sending of the smart card data that card information comprised successivelyCan be Customs Assigned Number 0001, ammeter numbering 3321, buy electricity 3000, buy number of times 3, type of card 102, then can be according to above-mentionedContent determine described in fill in card information each data and in the card chip of described smart card storage variable between corresponding closeSystem, as can determine that Customs Assigned Number 0001 corresponding storage variables D ATA1, card table numbering 3321 corresponding storage variables D ATA2, purchase volume3000 corresponding storage variables D ATA3, purchase number of times 3 corresponding storage variables D ATA4, type of card 102 corresponding storage variables D ATA5Deng.
It should be noted that if it is determined that smart card receive described in fill card information when being ciphertext data, also can be the most rightThe described card information that fills is decrypted, afterwards, further according to described setting intelligent card data read and write rule, determine described in fill card informationIn each data and described smart card card chip in each storage variable between corresponding relation.
For example, it is assumed that the ciphertext data of the business encryption that described ciphertext data are the cloud server that have passed through card table, thenThe Lib storehouse (static database) of described card table can be primarily based on, described ciphertext data are decrypted that (described Lib storehouse is based on instituteState the standard data structure that the cloud server of card table specifies in advance described fan's ciphertext data are decrypted), complete to obtainFill card information, wherein, the Lib storehouse of described card table is that the developer of card table is encapsulated in described smart card in advance.
In addition, it is necessary to explanation, smart card can only call deciphering after fill card information, fill in card information described in determiningEach data corresponding storage variable, and described in cannot knowing, fill the concrete source of each data in card information, also cannot be to instituteState and fill card information and carry out revising (filling card information described in i.e. is " read-only " file) anyly, it is thus possible to guarantee the peace that data are transmittedQuan Xing.
Further, assume business encryption and the cloud of smart card that described ciphertext data are the cloud server that have passed through card tableThe ciphertext data of the communication encryption of end server, then can be primarily based on the secret key pair institute that the cloud server of described smart card specifiesState ciphertext data and communicate deciphering, afterwards, then Lib storehouse based on described card table, described ciphertext data are decrypted,After, call and fill card information after deciphering, with fill in card information described in determining each data corresponding to store variable such that it is able to enterOne step improves the safety of data transmission.
Step 203: according to respectively storing variable in the card chip of the described each data filled in card information and described smart cardBetween corresponding relation, by described fill card information write to described smart card card chip in.
Specifically, according to each storage variable in the card chip of the described each data filled in card information and described smart card itBetween corresponding relation, by described fill card information write to described smart card card chip in, it may include:
Call the static database of described card table, and based on described static database by the described each number filled in card informationAccording in the storage variable corresponding with described data in the card chip of write to described smart card.
Such as, still as a example by power purchase, it is assumed that the storage variable of Customs Assigned Number 0001 correspondence is DATA1, card table numbering 3321Corresponding storage variable is DATA2, the storage variable of purchase volume 3000 correspondence is DATA3, the storage variable buying number of times 3 correspondenceStorage variable for DATA4, type of card 102 correspondence is DATA5, then can call the Lib storehouse of described card table, and based on describedData " 0001 " are write in the storage variable " DATA1 " to the card chip of described smart card (as to storage variable by Lib storehouseDATA1 assignment 0001 etc.);By data " 3321 " write to described smart card card chip in storage variable " DATA2 " in (asTo storage variables D ATA2 assignment 3321 etc.);By the storage variable in data " 3000 " write to the card chip of described smart card(as to storage variables D ATA3 assignment 3000 etc.) in " DATA3 ";By in data " 3 " write to the card chip of described smart card(as to storage variables D ATA4 assignment 3 etc.) in storage variable " DATA4 ";The core of the card by data " 102 " write to described smart card(as to storage variables D ATA5 assignment 102 etc.) in storage variable " DATA5 " in sheet, this is not repeated.
It should be noted that each smart card can be equipped with the Lib storehouse of one or more card table, special or one to realize single deck tape-recorderBlocking multiplex, here is omitted.
As shown in the above, owing in embodiments of the present invention, defining unified storage for different IC-cards and becomingAmount so that each storage variable in the card chip of each smart card all can be unified, and the most all of smart card all can be according to unificationIntelligent card data read-write rule carries out the mutual of data with communication equipment.Thus, different IC-cards and communication apparatus are being carried outTime integrated, it is not necessary to the producer and the model that rely on IC-card carry out integrated, and available unified standard storage variable carries out integrated so thatDifferent IC-cards all can be integrated according to identical integration mode, greatly simplifies the integration mode of smart card, reduces intelligenceThe cost of manufacture of card.
Further, after by the described card chip filling card information write extremely described smart card, described method is also wrappedInclude:
When described smart card carries out contacting connection with described card table, the card information that fills in described card chip is write to instituteState in card table.
Wherein, the connected mode between smart card and corresponding card table, in addition to can being contact connected mode, can be alsoContactless on-link mode (OLM), such as the mode such as photoelectric sensing, electromagnetic coupled, does not repeats this.
Alternatively, the card information that fills in described card chip is write to described card table, it may include:
Intelligent card data read-write rule according to described setting, determines each number in each storage variable in described card chipAccording to;
Obtain each data determined and fill card information described in obtaining, and rush card information write to described card table by describedIn.
Such as, still as a example by power purchase, it is assumed that the data in storage variable " DATA1 " are " 0001 ", storage variable " DATA2 "In data be the data in " 3321 ", storage variable " DATA3 " be " 3000 ", the data that store in variable " DATA4 " beData in " 3 ", storage variable " DATA5 " are " 102 ", then can obtain each data in each storage variable, corresponding to obtainFill card information, as now, described in fill the data included in card information can be Customs Assigned Number 0001, ammeter numbering 3321, buyElectricity 3000, purchase number of times 3, type of card 102 etc., do not repeat this.
Further, will fill card information write to after in described card table in described card chip, described method is also wrappedInclude:
Intelligent card data read-write rule according to described setting, determines that the storage corresponding to each data in card table data becomesAmount;Wherein, to be described card table complete after card table supplements with money, in write to described card chip according to filling card information described card table data's;
From each storage variable determined, obtain corresponding data to obtain described card table data, and described in obtainingIn card table write back data extremely described communication apparatus.
Such as, still as a example by power purchase, it is assumed that each data in described card table data are Customs Assigned Number 0001, ammeter numbering3321, buy electricity 3000, buy number of times 3, type of card 102, surplus 4500, then:
First, it may be determined that corresponding with each data in card table data respectively stores variable, as can determine that and Customs Assigned NumberThe storage variable that corresponding storage variable is corresponding with ammeter numbering for DATA1 is that DATA2 is corresponding with purchase electricityThe storage variable that storage variable is corresponding with buying number of times for DATA3 is storage variable corresponding with type of card for DATA4It is DATA7 for storage variable corresponding with surplus for DATA5;
Then, the data in above each storage variable can be obtained, as obtained the data in storage variable " DATA1 "" 0001 ", the data " 3321 " obtained in storage variable " DATA2 ", acquisition store the data " 3000 " in variable " DATA3 ", obtainTake the data " 3 " in storage variable " DATA4 ", the data " 102 " obtained in storage variable " DATA5 ", obtain storage variableData " 4500 " in " DATA7 ", and obtain corresponding card table data, now, the data that described card table data are comprised can beCustoms Assigned Number 0001, ammeter numbering 3321, purchase electricity 3000, purchase number of times 3, type of card 102, surplus 4500 etc.;
Finally, the described card table write back data extremely described communication apparatus that can will obtain, this is not repeated.
Certainly, it should be noted that the data interactive mode between smart card and card table is not limited to above-mentioned " write-then-read "Mode, it is possible to for the mode of " write-after-read ", this is not limited in any way by the present embodiment.
Specifically, from each storage variable determined, the data of acquisition correspondence are to obtain described card table data, and will obtainDescribed card table write back data in described communication apparatus, it may include:
Call the Lib storehouse of described card table, and based on described static database, each data in described card table data are returnedIt is written in described communication apparatus.
It is to say, when described smart card is connected with described card table, can complete described card table is supplemented with money, afterwards, instituteState Ka Biao also can card table data be back in the card chip of described smart card, with based on described card table by described smart cardLib storehouse, by described card table write back data to described communication apparatus.
In addition, it is necessary to explanation, after described communication apparatus receives described card table data, also can be further by instituteState card table data to send to described terminal, described card table data are sent the cloud service to described card table by described terminalDevice so that the cloud server of described card table can carry out a series of review operations (such as parsing, record to described card table dataDeng).
Further, the cloud server of described card table is after having performed a series of review operations, after also can resolvingCard table data are back to described terminal, so that the flow process that user can more be visually known whole purchase, supplement with money, the most notRepeat again.
Embodiment one:
As a example by buying electricity to use smart card below, the data processing method providing the embodiment of the present invention enters oneWalk to obtain explanation.Specifically, as it is shown on figure 3, the concrete steps that it is the data processing method described in the embodiment of the present invention one canAs follows:
Step 1: terminal, based on the log-on message bound, is numbered according to Customs Assigned Number, the card table of user's input, boughtAmount, buy number of times and type of card, generate this time supplement with money sequence information (e.g., Customs Assigned Number 0001, ammeter numbering 3321, purchaseBuy electricity 3000, buy number of times 3, type of card 102), and described sequence information is sent the cloud server to ammeter;
Step 2: the cloud server of described ammeter carries out record to the described sequence information received, and according to this orderInformation generates fills card information, and sends the described card information that fills to described terminal;
Step 3: fill card information described in the reception of described terminal, and by any communication that can communicate with communication apparatusThe described card information that fills is sent to described communication apparatus by mode;
It should be noted that wired communication mode can be included with the communication mode that described communication apparatus communicatesAnd/or communication, wherein, described wire communication mode can include usb communication mode etc., and described communication canIncluding bluetooth communication mode, infrared communication mode, NFC communication modes and WiFi communication mode, and, it is generally the case that if instituteStating communication apparatus is bluetooth communication equipment, and the most described communication modes can be bluetooth communication mode, if described communication apparatus is redOuter communication apparatus, the most described communication modes can be infrared communication mode, if described communication apparatus is NFC communication apparatus, then instituteStating communication modes can be for NFC communication modes, if described communication apparatus is WiFi communication equipment, the most described communication modes can beWiFi communication mode, does not repeats this.
Step 4: described communication apparatus will receive described in fill card information and send to described smart card.
It should be noted that described communication apparatus generally can be the integrated equipment being integrated in described smart card, and describedThe described card information that fills can be sent to described smart card by the way of wire communication by communication apparatus, does not repeats this.
Step 5: described smart card according to set intelligent card data read-write rule, determine with described fill in card information eachThe card chip of the described smart card that data are corresponding respectively stores variable;
Step 6: described smart card calls the static database of ammeter, and fills card letter based on described static database by describedIn the storage variable corresponding with described data in the card chip of each data write extremely described smart card in breath.
Wherein, after smart card is by the described card chip filling card information write extremely described smart card, described communication moduleAlso, so that described terminal notifying user carries out plug-in card operation this can not repeated to the corresponding message of described terminal feedback.
Step 7: when described smart card carries out contacting connection with ammeter, the card information that fills in described card chip is written toIn described ammeter;
Wherein, contact described herein connects can include contactless connection (such as photoelectric sensing type and electromagnetic coupled formula)And/or contact connects (plug-in card, swipe the card).
Step 8: after having supplemented with money, the card table data in described ammeter are write the core of the card to described smart card by described ammeterIn sheet;
It should be noted that now, approving the read-write rule according to the smart card set, determine with card table data is everyThe storage variable that one data are corresponding, and static database based on ammeter is by described card table data write extremely described smart cardIn card chip, this is not repeated.
Step 9: described smart card calls the static database of described ammeter, and based on described static database by described cardIn each write back data in table data extremely described communication apparatus;
Step 10: the described card table data received are back to described terminal by described communication apparatus;
Step 11: the described card table data received are sent to described ammeter cloud server by described terminal;
Step 12: the described card table data received are resolved, audit and remember by the cloud server of described ammeterRecord, confirm buy, supplement with money errorless after, will resolve after card table data be back to described terminal, with by described terminal by describedCard table data after parsing are shown to user so that user knows power purchase, the process supplemented with money is fully completed.
In addition, it is necessary to explanation, user (or is set by communication also by the respective keys pressed on described smart cardFor described smart card is carried out corresponding operating), described smart card is reverted to neocaine, or, connect also by corresponding dataMouth (as passed through communication apparatus) determines the main password of card etc. of shown smart card, does not repeats this.
The embodiment of the present invention one provides a kind of data processing method, smart card can receive that communication apparatus sends for appointingOne card table fill card information, and according to the intelligent card data read-write rule set, determine described in fill in card information each data withThe corresponding relation between each storage variable in the card chip of described smart card, and can be according to described corresponding relation, by describedFill in the card chip of card information write extremely described smart card.Compared to prior art, it is provided that a kind of unified intelligent card dataRead-write rule so that smart card developer can be directly based upon described unified intelligent card data read-write rule, carry out IC-card withCommunication apparatus integrated, and without carrying out the integrated of different modes for different IC-cards.Solve present in prior artOwing to integration mode that unified integration mode integrated smart card is caused, smart card cannot being used complex and makingRelatively costly problem.It addition, also can further improve the efficiency of exploitation, it is ensured that the popularization of smart card.
Embodiment two:
Based on the inventive concept identical with the embodiment of the present invention one, the embodiment of the present invention two provides a kind of smart card, asShown in Fig. 4, it is the structural representation of the smart card described in the embodiment of the present invention two.As shown in Figure 4, described smart card can wrapInclude:
Receiver module 41, can be used for receiving that communication apparatus sends fills card information for arbitrary card table;
Determine module 42, can be used for according to the intelligent card data read-write rule set, determine described in fill in card information eachThe corresponding relation between each storage variable in the card chip of data and described smart card;
Processing module 43, can be used for according to described in fill in card information each with the card chip of described smart card of each dataCorresponding relation between storage variable, by the described card chip filling card information write extremely described smart card.
Specifically, described processing module 43, it is particularly used in the static database calling described card table, and based on described quietIt is relative with described data that the described each data filled in card information are write to the card chip of described smart card by state data baseIn the storage variable answered.
Further, described processing module 43, it may also be used for by the described card filling card information write extremely described smart cardAfter in chip, when described smart card carries out contacting connection with described card table, the card information that fills in described card chip is writeTo described card table.
Further, described module 42 is determined, it may also be used for described card chip will fill card information write to the most describedAfter in card table, read and write rule according to the intelligent card data of described setting, determine depositing corresponding to each data in card table dataStorage variable;Wherein, described card table data are described card tables to be completed after card table supplements with money according to filling card information, write to described the core of the cardIn sheet;
Described processing module 43, it may also be used for from each storage variable determined, obtain corresponding data described to obtainIn card table data, and the described card table write back data extremely described communication apparatus that will obtain.
Specifically, described processing module 43, also it is particularly used in the static database calling described card table, and based on describedStatic database is by each write back data in described card table data to described communication apparatus.
Alternatively, described communication apparatus at least includes bluetooth communication equipment, infrared communication equipment, NFC communication apparatus, WiFiAny one or more in communication apparatus.
It should be noted that described communication apparatus can be the autonomous device independent of described smart card, it is possible to for being integrated inIntegrated equipment in described smart card, this is not limited in any way by the present embodiment.
It should be noted that described smart card may also include that
Reseting module, for when receiving the reset instruction that user sends, reverts to the card chip of described smart cardNeocaine, wherein, described reset instruction can be pressing respective keys, send corresponding signal etc., does not repeats this.
The embodiment of the present invention two provides a kind of smart card, smart card can receive that communication apparatus sends for arbitrary card tableFill card information, and according to the intelligent card data read-write rule set, determine described in fill in card information each data and described intelligenceThe corresponding relation between each storage variable in the card chip that can block, and card letter can be filled according to described corresponding relation by describedIn the card chip of breath write extremely described smart card.Compared to prior art, it is provided that a kind of unified intelligent card data read-write ruleThen so that smart card developer can be directly based upon described unified intelligent card data read-write rule, carries out IC-card and sets with communicationStandby is integrated, and without carrying out the integrated of different modes for different IC-cards.Solve present in prior art due to nothingMethod use that unified integration mode integrated smart card is caused, the integration mode of smart card is complex and cost of manufacture relativelyHigh problem.It addition, also can further improve the efficiency of exploitation, it is ensured that the popularization of smart card.
It will be understood by those skilled in the art that embodiments of the invention can be provided as method, device (equipment) or computer journeySequence product.Therefore, in terms of the present invention can use complete hardware embodiment, complete software implementation or combine software and hardwareThe form of embodiment.And, the present invention can use in one or more calculating wherein including computer usable program codeThe upper computer program implemented of machine usable storage medium (including but not limited to disk memory, CD-ROM, optical memory etc.)The form of product.
The present invention is with reference to method, device (equipment) and the flow chart of computer program according to embodiments of the present inventionAnd/or block diagram describes.It should be understood that can be by each flow process in computer program instructions flowchart and/or block diagramAnd/or the flow process in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided to refer toOrder arrives the processor of general purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produceOne machine so that the instruction performed by the processor of computer or other programmable data processing device is produced and is used for realizingThe device of the function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and computer or other programmable data processing device can be guided with spyDetermine in the computer-readable memory that mode works so that the instruction being stored in this computer-readable memory produces and includes referring toMake the manufacture of device, this command device realize at one flow process of flow chart or multiple flow process and/or one square frame of block diagram orThe function specified in multiple square frames.
These computer program instructions also can be loaded in computer or other programmable data processing device so that at meterPerform sequence of operations step on calculation machine or other programmable devices to produce computer implemented process, thus at computer orThe instruction performed on other programmable devices provides for realizing at one flow process of flow chart or multiple flow process and/or block diagram oneThe step of the function specified in individual square frame or multiple square frame.
Although preferred embodiments of the present invention have been described, but those skilled in the art once know basic creationProperty concept, then can make other change and amendment to these embodiments.So, claims are intended to be construed to include excellentSelect embodiment and fall into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and the modification essence without deviating from the present invention to the present inventionGod and scope.So, if these amendments of the present invention and modification belong to the scope of the claims in the present invention and equivalent technologies thereofWithin, then the present invention is also intended to comprise these change and modification.