A kind of automatic batch processing method based on NFC chip anti-fake certificate
Technical field
The present invention relates to a kind of automatic batch processing method based on NFC chip anti-fake certificate.
Background technology
For current, NFC function does not also show in our real life completely, current city
It is weak that technology relevant for NFC on face writes card function, and efficiency is low, and data there is no guarantee that safely, writes card the most too processing batch
Crossing simple, concurrent problem is not considered, and easily causes and writes card data corruption.Except can be in addition to short range transmission file, it is possible to right
The APP answering multiple support NFC carries out other functions, such as inquires about the consumer record etc. of Bus Card.And another compares
Practical NFC function, then be use NFC label to specify smart mobile phone to change to specific pattern, such as when company has a meeting,
Have only to gently NFC label is touched mobile phone, it is possible to mobile phone is converted to silent mode.
Typical case: NFC supplements with money in the air
NFC supplements with money in the air and refers to that user utilizes the mobile 4G network will be with bag disbursement account or by the in NFC mobile phone client
Tripartite's payment channel realizes the money of bank account to Bus Card account charging, between business platform and card, can make
Realize mutual with unified message structure.NFC public transport Service Processing Module, according to concrete application demand, completes the industry with application platform
Business processes, and docks with payment platform, completes to withhold, rushes the work such as just.Client provide subscription authentication, inquiry into balance,
The User Interfaces such as transaction record inquiry, mutual with card application public transit system by mobile phone and bag client message transparent transmission interface
Complete corresponding function.
Existing drawback is: it is weak that card function write by current mobile phone, and efficiency is low, and data there is no guarantee that safely;Current criticizes
Amount is write card function and cannot be realized concurrently.
Summary of the invention
For overcoming the defect of prior art, the present invention provides a kind of automatic batch based on NFC chip anti-fake certificate to process
Method, the technical scheme is that
A kind of automatic batch processing method based on NFC chip anti-fake certificate, comprises the following steps:
Step 1, manufacturer manager adds merchandise news, then pin under commerical batches operation interface by background operating system
A certain commodity add batch information, and after commodity interpolation batch information completes, background operating system is criticized according to the commodity added
Sub-quantity directly generates commodity serial number, is stored in cloud data base by the commodity serial number of generation simultaneously, writes for writer App
Card function is prepared;Should be noted the batch size of interpolation when wherein adding commerical batches, once generate commodity serial number, this batch
Information can not be revised;
Step 2, after background operating system generates commodity serial number, is logging in laggard row write with mobile phone for carrier writer APP
Card operation;After user starts to write card with the click of writer APP, writer App request cloud database interface, return commodity pair
Answer the commodity list of sequence numbers information of batch, the most beyond the clouds data base locks these commodity sequence number information, it is to avoid occur
Concurrency conflict;
Step 3, is placed on NFC label the trigger point of mobile phone NFC, when this NFC label has been written into commodity sequence number information,
Writer APP can prompt the user whether to need to cover NFC tag information, and user clicks on when determining, can carry out writing operation, write card
Asking cloud database interface after completing, this commodity sequence number information is unlocked and revised commodity serial number writes card state,
Successfully modified rear writer App prompting user writes card success, and puts into the NFC label that next needs is write.
In described step 3, when user click on writing operation ask commodity list of sequence numbers to carry out writing card time, now
If writer APP reads in 20 seconds less than NFC tag information, default user is abandoned this time operating, and request cloud database connects
Mouthful, the commodity serial number this locked unlocks.
When the different user under same manufacturer logs into writer APP, if that asks under same commodity is same
When batch carries out writing card:
A, when there being the data of non-locking, cloud database interface can return the sequence remaining unlocked state under present lot number
Row information, locks this sequence number information, and updates the data interlock time in cloud database;
B, when all sequences number under this batch number is all in lock-out state, and cloud database contact accountant calculates cloud database
The data interlock time of serial number storage and the time interval of current writer APP display time, if interval was more than 5 minutes,
Cloud database can these part data of automatic unlocking, and take 10 sequence number information and return to writer App, lock this part number
According to when inadequate 10 of data, how many are had then to return how many.
C, when all sequences number under this batch number all completes writing operation, write card App and can pass through cloud database interface
Return parameters value carries out user and points out accordingly, and this time batch is fully completed.
When automatically writing card, when abnormal shutdown or suspension fortuitous event occurring such as mobile phone, this of now current user operation
Commodity serial number under batch number is still in lock-out state, when the different user under same manufacturer logs into writer App
Time, if currently without when returning commodity serial number data, cloud database contact accountant calculates cloud database commodity serial number
The data interlock time of storage and the time interval of current writer APP display time, be more than 5 minutes if be spaced, high in the clouds number
According to storehouse meeting these part data of automatic unlocking, and take 10 return writer App at random, lock this part data, when data are inadequate
Article 10, time, there are how many then to return how many;
When writer App end writes card crash, directly card crash is write in prompting, not at request high in the clouds data-interface.
When writer App end writes card success, failure during the data-interface amendment cloud database information of request high in the clouds, then give tacit consent to
This writes card and records unsuccessfully.
The invention have the advantage that
1, card speed is write in raising, it is achieved Xie Ka automatization and batch processing, improves work efficiency.
2, solve automatic batch to process when writing card, that multi-user operates multiple serial numbers under same batch simultaneously and ask a question
Topic.
Detailed description of the invention
Below in conjunction with specific embodiment further describe the present invention, advantages of the present invention and feature will be with describe and
Apparent.But these embodiments are only exemplary, the scope of the present invention is not constituted any restriction.People in the art
Member it should be understood that to enter the details of technical solution of the present invention and form lower without departing from the spirit and scope of the present invention
Row amendment or replacement, but these amendments and replacement each fall within protection scope of the present invention.
The present invention relates to a kind of automatic batch processing method based on NFC chip anti-fake certificate, it is characterised in that include with
Lower step:
A kind of automatic batch processing method based on NFC chip anti-fake certificate, comprises the following steps:
Step 1, manufacturer manager adds merchandise news, then pin under commerical batches operation interface by background operating system
A certain commodity add batch information, and after commodity interpolation batch information completes, background operating system is criticized according to the commodity added
Sub-quantity directly generates commodity serial number, is stored in cloud data base by the commodity serial number of generation simultaneously, writes for writer App
Card function is prepared;Should be noted the batch size of interpolation when wherein adding commerical batches, once generate commodity serial number, this batch
Information can not be revised;
Step 2, after background operating system generates commodity serial number, is logging in laggard row write with mobile phone for carrier writer APP
Card operation;After user starts to write card with the click of writer APP, writer App request cloud database interface, return commodity pair
Answer the commodity list of sequence numbers information of batch, the most beyond the clouds data base locks these commodity sequence number information, it is to avoid occur
Concurrency conflict;
Step 3, is placed on NFC label the trigger point of mobile phone NFC, when this NFC label has been written into commodity sequence number information,
Writer APP can prompt the user whether to need to cover NFC tag information, and user clicks on when determining, can carry out writing operation, write card
Asking cloud database interface after completing, this commodity sequence number information is unlocked and revised commodity serial number writes card state,
Successfully modified rear writer App prompting user writes card success, and puts into the NFC label that next needs is write.
In described step 3, when user click on writing operation ask commodity list of sequence numbers to carry out writing card time, now
If writer APP reads in 20 seconds less than NFC tag information, default user is abandoned this time operating, and request cloud database connects
Mouthful, the commodity serial number this locked unlocks.
When the different user under same manufacturer logs into writer APP, if that asks under same commodity is same
When batch carries out writing card:
A, when there being the data of non-locking, cloud database interface can return the sequence remaining unlocked state under present lot number
Row information, locks this sequence number information, and updates the data interlock time in cloud database;
B, when all sequences number under this batch number is all in lock-out state, and cloud database contact accountant calculates cloud database
The data interlock time of serial number storage and the time interval of current writer APP display time, if interval was more than 5 minutes,
Cloud database can these part data of automatic unlocking, and take 10 sequence number information and return to writer App, lock this part number
According to when inadequate 10 of data, how many are had then to return how many.
C, when all sequences number under this batch number all completes writing operation, write card App and can pass through cloud database interface
Return parameters value carries out user and points out accordingly, and this time batch is fully completed.
When automatically writing card, when abnormal shutdown or suspension fortuitous event occurring such as mobile phone, this of now current user operation
Commodity serial number under batch number is still in lock-out state, when the different user under same manufacturer logs into writer App
Time, if currently without when returning commodity serial number data, cloud database contact accountant calculates cloud database commodity serial number
The data interlock time of storage and the time interval of current writer APP display time, be more than 5 minutes if be spaced, high in the clouds number
According to storehouse meeting these part data of automatic unlocking, and take 10 return writer App at random, lock this part data, when data are inadequate
Article 10, time, there are how many then to return how many;
When writer App end writes card crash, directly card crash is write in prompting, not at request high in the clouds data-interface.
When writer App end writes card success, failure during the data-interface amendment cloud database information of request high in the clouds, then give tacit consent to
This writes card and records unsuccessfully.