The content of the invention
To solve the problems of above-mentioned prior art, the present invention proposes a kind of label immediate processing method, including:
Multiple smart cards are scanned using NFC function module, are communicated by infrared NEC agreements with mobile terminal
Letter, and by scanning information storage in the terminal, be identified when mobile terminal is using smart card by matching algorithm, with
Activate the smart card specified.
Preferably, the NFC function module includes NFC chip, micro-control unit, infrared module and auxiliary circuit and electricity
Source, wherein, the NFC chip and infrared module are by SPI interface into row information transmission, and installation is corresponding in advance for mobile terminal
Driving and library file;
Micro-control unit is used for the conversion and order forwarding of data format, real by the functional authorization of the hardware kit
Automatic matching between existing infrared module, the automatic matching process of the infrared module further comprise:
1) infrared module in NFC function module is set into pass code first;
2) infrared module is registered as into receiver in infrared opening in the application of mobile terminal, is at waiting and rings
Answer state;
3) when the infrared module of mobile terminal receives broadcast, pass code infrared in NFC function module is set to red
In outer mold piece;
4) the correlation function methods such as infrared pairing, binding state verification are realized.Thereby realize infrared automatic matching.
Preferably, it is described to be identified when mobile terminal is using smart card by matching algorithm, to activate the intelligence specified
It can block, further comprise:
The support of NFC and api interface are encapsulated in the android.nfc and android.nfc.tech of android system
In two bags, detected defined in android.nfc and the method for discovery NFC objects, a NFC chip correspond to a NFC and fit
Orchestration, wherein the detection and discovery procedure are:
1) a NFC manager object is constructed when NFC is initialized, by calling getDefaultAdapater methods to obtain
To the control of NFC chip, while complete the initial work to NFC chip.
2) NFC adapters automatically create an Intent comprising NFC label by message distributing system and are broadcasted, and lead to
NFC label in news field carries out response after receiving the broadcast, and the discovery procedure of label is completed if response success;
The Intent of different priorities is defined, NFC adapters establish communication connection according to the priority and the Intent,
Label data is packaged into NFC data and handed over by the correlation technique of the digital independent defined in android.nfc.tech, NFC adapters
The data packet of form is changed, the reading and transmission of data is carried out afterwards, is finally converted to all data messages of smart card specified
Form stored.
The present invention compared with prior art, has the following advantages:
The present invention proposes a kind of label immediate processing method, by the simple and quick scanning of smart card, and is stored in mobile whole
In end, it is not necessary to the infrastructure of existing radio frequency identification class is replaced, substantial amounts of artificial and equipment cost can be saved,
The integrated management of personal smart card is realized, is brought convenience for daily life, efficiently application of IC cards and good experience.
Embodiment
Retouching in detail to one or more embodiment of the invention is hereafter provided together with the attached drawing for illustrating the principle of the invention
State.The present invention is described with reference to such embodiment, but the invention is not restricted to any embodiment.The scope of the present invention is only by right
Claim limits, and the present invention covers many replacements, modification and equivalent.Illustrate in the following description many details with
Just provide a thorough understanding of the present invention.These details are provided for exemplary purposes, and without in these details
Some or all details can also realize the present invention according to claims.
Fig. 1 is label immediate processing method flow chart according to embodiments of the present invention.The present invention proposes a kind of smart card collection
Into system model, with reference to existing mobile terminal and NFC technique, by the simple and quick scanning of various smart cards, and it is stored in mobile whole
In end, intelligent recognition can be carried out by matching algorithm during use and activate the smart card specified.
NFC function module by NFC chip, micro-control unit, infrared module and other auxiliary circuits and electric power generating composition, its
In, NFC chip and infrared module are standardized information transmission by SPI interface.The present invention passes through NFC function module infrared
NEC agreements with do not support the terminal device of NFC function to communicate, realize order and data interaction and transmission;Phase is installed
After the driving answered and library file, possesses NFC function not the terminal device for supporting NFC.So equipment can pass through extension
NFC function module carries out NFC communication with other NFC devices or label, realizes that quick access to content and reading and writing data etc. are grasped
Make.
Micro-control unit is mainly responsible for the conversion and order forwarding of data format.The present invention has carried out the work(of the hardware kit
Energy property verification, realizes the automatic matching link between infrared module, is not required to manually enter pass code progress authentication
Connection is matched in success, and can realize the basic functions such as conversion and the communication of infrared data form and NFC data form.
Here is that infrared module realizes process without input automatic matching function:
1) infrared module in NFC function module is set into pass code, such as 0000 first.
2) infrared module is registered as into receiver in infrared opening in mobile terminal application, is at wait-for-response shape
State.
3) when mobile terminal infrared module receives broadcast, pass code infrared in NFC function module is set to infrared
In module.
4) the correlation function methods such as infrared pairing, binding state verification are realized.Thereby realize infrared automatic matching.
In the Software for Design of mobile terminal, developed based on Android platform, pass through identifying processing and simulation activation two
Subsystem realizes the concrete function of the parts such as smartcard identification, data scanning and reading, card storage and smart card simulation activation.
The function that identifying processing subsystem is realized mainly includes the parts such as card identification, information reading and information storage.To NFC
Support and api interface predominant package in the bag of android.nfc and android.nfc.tech two of android system.
Wherein, detected in the subsystem and find the methods of NFC objects defined in android.nfc, a NFC chip corresponds to one
NFC adapters.The present invention detection and discovery procedure be:
1) a NFC manager object is constructed when NFC is initialized, by calling getDefaultAdapater methods to obtain
To the control of NFC chip, while complete the initial work to hardware such as NFC chips.
2) NFC adapters automatically create one by message distributing system (label DSPIatchSystem) and are marked comprising NFC
The Intent of label is broadcasted, and is communicated after the NFC label in field receives the broadcast and is carried out response, response success then completes label
Discovery procedure.
The Intent of 3 kinds of different priorities is defined, priority is higher, then NFC adapters are more preferential and the Intent is established
Communication connection.Defined in android.nfc.tech, label data is packaged into the correlation technique of digital independent by NFC adapters
The data packet of NFC data exchange format, can carry out the reading and transmission of data afterwards, finally by all of a sheet smart card
Data message is converted to the form specified and is stored.
By scanning smart card getter information, and the data for converting information into specific format are stored in mobile phone, this
Just complete the integrated of a sheet smart card;As long as more sheet smart cards are scanned one by one, it is possible to are integrated in more sheet smart cards
Smart machine suffers.
The smart card reader equipment that simulation activation subsystem is embodied as specifying, which is found, matches corresponding NFC its datas,
Smart card is simulated to carry out swiping card and carry out the function of corresponding operation log recording.
The pairing of smart card NFC its datas, can by UID, SAK, HASH with opposite entity smart card and
The information such as RFTechnology establish information contrast table, are made choice, are realized to smart card reader by certain pairing algorithm
The Weigh sensor of equipment.In the case of multiple NFC its datas are paired to, can also by error calculation and poll come
Secondary pairing is carried out, improves the effective percentage and success rate of pairing algorithm.
At present, the pairing algorithm that smart card integrated system uses can be simply expressed as:The discovery of NFC targets card reader →
If radio type, which obtains → according to all records in radio-frequency queries card data →, to be had SAK data, is filtered according to SAK values
The card data record inquired → poll activation is attempted and NFC card readers communication → smart card confirms, should by card data addition
The UID marks of card reader, and update HASH → establish communication linkage and exchange data.
The bottom layer driving of NFC chip has been supported to simulate the function of passive label by NFC, by nfclib class libraries
Function Extension is carried out, and writes corresponding java class and is supplied to android system to call as middleware, equally realizes NFC
Card analog functuion.At present using the method for software simulation, i.e., resource is divided for NFC chip by the processor of mobile terminal,
And provide the function of information processing, communication response and part SE safe units.This scheme is increased without special hardware, realizes
It is relatively convenient to get up, while also substantially increases the applicability of the solution.
In conclusion the present invention proposes a kind of label immediate processing method, by the simple and quick scanning of smart card, and store
In the terminal, it is not necessary to the infrastructure of existing radio frequency identification class is replaced, can save it is substantial amounts of manually and
Equipment cost, realizes the integrated management of personal smart card, brings convenience for daily life, efficiently application of IC cards and high-quality
Experience.
Obviously, can be with general it should be appreciated by those skilled in the art, above-mentioned each module of the invention or each step
Computing system realize that they can be concentrated in single computing system, or be distributed in multiple computing systems and formed
Network on, alternatively, they can be realized with the program code that computing system can perform, it is thus possible to which they are stored
Performed within the storage system by computing system.Combined in this way, the present invention is not restricted to any specific hardware and software.
It should be appreciated that the above-mentioned embodiment of the present invention is used only for exemplary illustration or explains the present invention's
Principle, without being construed as limiting the invention.Therefore, that is done without departing from the spirit and scope of the present invention is any
Modification, equivalent substitution, improvement etc., should all be included in the protection scope of the present invention.In addition, appended claims purport of the present invention
Covering the whole changes fallen into scope and border or this scope and the equivalents on border and repairing
Change example.