CN104092675A - Reverse processing method and terminal based on main communication structure and auxiliary communication structure - Google Patents

Reverse processing method and terminal based on main communication structure and auxiliary communication structure Download PDF

Info

Publication number
CN104092675A
CN104092675A CN201410307067.XA CN201410307067A CN104092675A CN 104092675 A CN104092675 A CN 104092675A CN 201410307067 A CN201410307067 A CN 201410307067A CN 104092675 A CN104092675 A CN 104092675A
Authority
CN
China
Prior art keywords
data
terminal
instruction
server
rushing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410307067.XA
Other languages
Chinese (zh)
Other versions
CN104092675B (en
Inventor
陆舟
于华章
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Feitian Technologies Co Ltd
Original Assignee
Feitian Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Feitian Technologies Co Ltd filed Critical Feitian Technologies Co Ltd
Priority to CN201410307067.XA priority Critical patent/CN104092675B/en
Publication of CN104092675A publication Critical patent/CN104092675A/en
Application granted granted Critical
Publication of CN104092675B publication Critical patent/CN104092675B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a reverse processing method and terminal based on a main communication structure and an auxiliary communication structure. The method comprises the steps that the terminal receives an instruction; if the instruction is a first obtaining instruction, reverse data are eliminated, first data in the first obtaining instruction are obtained, data in an intelligent card are obtained, and first response data are generated and returned; if the instruction is a second obtaining instruction, reverse data and second response data are generated, and the second response data are returned; if the instruction is a first accomplishment instruction, the intelligent card is operated according to the first accomplishment instruction, the reverse data are processed according to the first accomplishment instruction and the second returning data returned by the intelligent card, and third response data are generated and returned; when the terminal receives a reverse data obtaining instruction, the reverse data are returned. The terminal included in the method serves as a passive communication device, reverse processing is carried out repeatedly in multiple instructions included in one complete operation, and a server can obtain the reverse data in the terminal in real time.

Description

Positive method and terminal are rushed in a kind of processing based on master-slave communication mechanism
Technical field
The present invention relates to information security field, relate in particular to a kind of processing based on master-slave communication mechanism and rush positive method and terminal.
Background technology
Terminal is connected with server by main frame, has functions such as supporting consumption, pre-authorization, circle are deposited, inquiry into balance.Traditional terminal has by the direct ability of networking of netting twine or telephone wire, can according to the response data of network whether success and server, just directly process punching at terminal inner; But for the novel terminal based on master-slave communication mechanism (for example, the terminal with USB interface, terminal is the equipment of passive communication), the instruction from server receiving disperses, once-through operation processing procedure must be distributed in many instructions and go to process, and therefore the terminal based on master-slave communication mechanism can not be used the method in traditional terminal just processing punching.
Summary of the invention
The object of the invention is in order to overcome the deficiencies in the prior art, provide a kind of processing based on master-slave communication mechanism to rush positive method and terminal, in terminal and server, carry out in information interactive process, in many instructions that terminal comprises a complete operation, just processing punching respectively, server can obtain the correction data of rushing in terminal immediately, guarantees that in server, canned data is consistent with the information in terminal.
Positive method is rushed in a kind of processing based on master-slave communication mechanism provided by the invention, comprising:
Step S1: terminal wait receives the instruction from server;
Step S2: the instruction type of the described instruction that described terminal judges receives, if first obtains instruction, perform step S3, if second obtains instruction, perform step S6, if first completes instruction, perform step S8, if other carry out corresponding operating, to described server, return to operating result, return to step S1;
Step S3: described terminal is just identifying reset by punching, removes the correction data of rushing in described terminal, obtains described first the first data of obtaining in instruction, obtains instruction obtain the data in described smart card according to described first;
Step S4: whether described terminal judges successfully obtains the data in described smart card, is to perform step S5, otherwise returns to error message to described server, returns to step S1;
Step S5: described terminal according to described the first data, set in advance the data in described terminal and the first return data of getting generates the first response data from described smart card, to described server, return to described the first response data, return to step S1;
Step S6: described terminal generates and to rush correction data according to described the first data and the first return data of getting from described smart card, and described punching is just being identified to set;
Step S7: described terminal generates the second response data according to described the first return data and the data that set in advance in described terminal, returns to described the second response data to described server, returns to step S1;
Step S8: described terminal completes instruction according to described first described smart card is operated, according to described first, completing the second return data that instruction and described smart card return processes the described correction data of rushing, according to the described second data of returning, generate the 3rd response data, to described server, return to described the 3rd response data, return to step S1;
When described terminal receives while rushing correction data instruction from obtaining of described server, carry out following steps:
Step S9: described in described terminal judges, punching is just identifying whether set, is to perform step S10, otherwise return without rushing positive information to described server;
Step S10: described terminal is returned to the described correction data of rushing to described server.
Between described step S1 and step S2, comprise: described in described terminal judges, whether the form of instruction is legal, be to perform step S2, otherwise return to error message to described server, return to step S1.
Described step S2 is specially:
Step S2-1: described terminal judges according to the command code byte of described instruction whether described instruction is the instruction just relevant with punching, is to perform step S2-3, otherwise execution step S2-2;
Step S2-2: described terminal is carried out corresponding operating according to described instruction, returns to operating result to described server, returns to step S1;
Step S2-3: described terminal judges the instruction type of described instruction according to the parameter in described instruction, if first obtain instruction and perform step S3, if second obtain instruction and perform step S6, if first complete instruction and perform step S8; If other, return to error message to described server, return to step S1.
Described step S3 also comprises: described terminal initialization command sequence sign;
Described step S5 also comprises: described terminal is the first preset value by described command sequence identification renewal;
Before described step S6, also comprise: described in described terminal judges, whether command sequence sign is the first preset value, is to perform step S6, otherwise command sequence sign described in initialization is returned to error message to described server, returns to step S1;
Described step S7 also comprises: described terminal is the second preset value by described command sequence identification renewal;
Before described step S8, also comprise: described in described terminal judges, whether command sequence sign is the second preset value, is to perform step S8, otherwise command sequence sign described in initialization is returned to error message to described server, returns to step S1;
Described step S8 also comprises: command sequence sign described in described terminal initialization.
Described terminal is rushed correction data according to described the first data and described the first return data generation, be specially: described terminal is according to processing date and processing time in described the first data, and the result in described the first return data, the second deal with data, processing type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, application are processed sequence number, cipher-text information data, application cryptogram and server application data and generated the described correction data of rushing.
Described terminal is according to processing date and processing time in described the first data, the result in described the first return data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram and server application data generate rushes correction data, be specially: described terminal is set to respectively processing date and the processing time in described the first data by described processing date and the processing time of rushing in correction data, by described result of rushing in correction data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram and server application data are set to respectively the result in described the first return data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram and server application data, by the described processing date of rushing in correction data, processing time, result, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, described in application cryptogram and server application data combination producing, rush correction data.
Described step S6 is specially: described terminal is according to described the first data, described the first return data and set in advance data in described terminal and generate and rush correction data, and described punching is just being identified to set.
Described terminal is according to described the first data, correction data is rushed in described the first return data and the data generation setting in advance in described terminal, be specially: described terminal is according to processing date and processing time in described the first data, result in described the first return data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code and unpredictable number, set in advance the processing serial number in described terminal, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification generate and rush correction data.
Described terminal is according to processing date and processing time in described the first data, the result in described the first return data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code and unpredictable number, set in advance the processing serial number in described terminal, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification generation are rushed correction data and are specially: described terminal is set to respectively processing date and the processing time in described the first data by described processing date and the processing time of rushing in correction data, by described result of rushing in correction data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code and unpredictable number are set to respectively the result in described the first return data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code and unpredictable number, by the described processing serial number rushing in correction data, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification are set to respectively the processing serial number in described terminal, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification, by the described processing date of rushing in correction data, processing time, result, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code, unpredictable number, process serial number, terminal serial number, terminal capabilities, terminal type, input mode code, described in terminal area code and terminal iidentification combination producing, rush correction data.
Described step S8 is specially:
Step S8-1: described terminal completes instruction according to described first described smart card is operated;
Step S8-2: whether described terminal judges successfully operates described smart card, is to obtain the second return data that described in operating process, smart card returns, execution step S8-3, otherwise execution step S8-4;
Step S8-3: described terminal completes instruction according to described first and described the second return data is processed the described correction data of rushing, according to described the second return data, generate the 3rd response data, to described server, return to described the 3rd response data, return to step S1;
Step S8-4: described terminal completes instruction according to described first the described correction data of rushing is processed, and returns to error message to described server, returns to step S1.
Described step S8-3 is specially:
Steps A 1: described terminal judges according to described the second return data whether described smart card ratifies operation, is to perform step A2, otherwise execution step A5;
Steps A 2: described terminal judges according to described the second return data whether described smart card correctly carries out the described first server script data that complete in instruction, is to perform step A3, otherwise execution step A4;
Steps A 3: described terminal is just identifying reset by described punching, removes the described correction data of rushing of preserving, and according to described the second return data, generates the 3rd response data, to described server, returns to described the 3rd response data, returns to step S1;
Steps A 4: described terminal is upgraded the described correction data of rushing according to described the second return data, generates the 3rd response data according to described the second return data, to described server, returns to described the 3rd response data, returns to step S1;
Steps A 5: described terminal completes instruction according to described first and judges whether normally onlinely, is to perform step A7, otherwise execution step A6;
Steps A 6: described terminal is upgraded the described correction data of rushing according to described the second return data, generates the 3rd response data according to described the second return data, to described server, returns to described the 3rd response data, returns to step S1;
Steps A 7: described terminal completes according to described first approval that instruction judges whether to obtain described server, is to perform step A8, otherwise execution step A9;
Steps A 8: described terminal is upgraded the described correction data of rushing according to described the second return data, generates the 3rd response data according to described the second return data, to described server, returns to described the 3rd response data, returns to step S1;
Steps A 9: described terminal is just identifying reset by described punching, removes the described correction data of rushing of preserving, and according to described the second return data, generates the 3rd response data, to described server, returns to described the 3rd response data, returns to step S1.
Described terminal is upgraded the described correction data of rushing according to described the second return data, be specially: described terminal is processed sequence number, cipher-text information type, application cryptogram and server application data according to the result in described the second return data, terminal the result, application and upgraded described result, terminal the result, application processing sequence number, cipher-text information type, application cryptogram and server application data of rushing in correction data, and the described script execution result rushing in correction data is set to the script execution result in described the second return data.
The described correction data of rushing of described renewal also comprises that according to described first, completing instruction upgrades the described correction data of rushing.
Describedly according to described first, complete instruction and upgrade the described correction data of rushing, be specially: described terminal is set to respectively the described first authorization response code, server authorizes data and server script data completing in instruction by described authorization response code, server authorizes data and the server script data rushing in correction data.
Described step S8-4 is specially:
Step B1: described terminal completes instruction according to described first and judges whether normally onlinely, is to perform step B3, otherwise execution step B2;
Step B2: described terminal completes instruction according to described first and upgrades the described correction data of rushing, and returns to error message to described server, returns to step S1;
Step B3: described terminal completes according to described first approval that instruction judges whether to obtain described server, is to perform step B4, otherwise execution step B5;
Step B4: described terminal completes instruction according to described first and upgrades the described correction data of rushing, and returns to error message to described server, returns to step S1;
Step B5: described terminal is just identifying reset by described punching, removes the described correction data of rushing of preserving, and to described server, returns to error message, returns to step S1.
Describedly according to described first, complete instruction and upgrade the described correction data of rushing, be specially: described terminal is upgraded described result of rushing in correction data.
Describedly according to described first, complete instruction and upgrade the described correction data of rushing, also comprise: described terminal is set to respectively the described first authorization response code, server authorizes data and server script data completing in instruction by described authorization response code, server authorizes data and the server script data rushing in correction data.
When described terminal receives while rushing correction data instruction from the removing of described server, described punching is just being identified to reset, remove the described correction data of rushing of preserving, to described server, return success.
A positive terminal is rushed in processing based on master-slave communication mechanism, comprising: receiver module, the first judge module, the first processing module, the second judge module, the first acquisition module, sending module, the first generation module, the second generation module, the 3rd generation module, the 4th generation module, the second processing module and the 3rd judge module;
Described receiver module, for receiving the instruction from server;
Described the first judge module, for judging the instruction type of the described instruction that described receiver module receives;
Described the first processing module, for the instruction type of judging described instruction when described the first judge module, be first to obtain after instruction, punching is just being identified to reset, remove the correction data of rushing in described terminal, obtain described first the first data of obtaining in instruction, according to described first, obtain instruction and obtain the data in described smart card;
Described the second judge module, for judging whether described the first processing module successfully obtains the data of described smart card;
Described the first acquisition module, for judging successfully to obtain after the data of described smart card at described the second judge module, obtains the first return data in described smart card;
Described sending module, for judging at described the second judge module after the unsuccessful data of obtaining described smart card, returns to error message to described server;
Described the first generation module, for described the first data of getting according to described the first processing module, set in advance described the first return data that data and described the first acquisition module in described terminal get and generate the first response data;
Described sending module, described the first response data also generating for return to described the first generation module to described server;
Described the second generation module, for the instruction type of judging described instruction when described the first judge module, be second to obtain after instruction, described the first return data that described the first data that get according to described the first processing module and described the first acquisition module get generates and rushes correction data, and described punching is just being identified to set;
Described the 3rd generation module, generates the second response data for described the first return data getting according to described the first acquisition module and the data that set in advance in described terminal;
Described sending module, described the second response data also generating for return to described the 3rd generation module to described server;
Described the 4th generation module, for the instruction type of judging described instruction when described the first judge module, be first to complete after instruction, according to described first, completing instruction operates described smart card, according to described first, complete the second return data that instruction and described smart card return the described correction data of rushing is processed, according to the described second data of returning, generate the 3rd response data;
Described sending module, described the 3rd response data also generating for return to described the 4th generation module to described server;
Described the second processing module, for after other, carries out corresponding operating for the instruction type of judging described instruction when described the first judge module;
Described sending module, also for returning to the operating result of described the second processing module to described server;
Described the 3rd judge module, obtains while rushing correction data instruction for receiving when described receiver module, judges that described punching is just identifying whether set;
Described sending module, also when judging described punching when described the 3rd judge module and just identifying set, returns to the described correction data of rushing to described server; When described the 3rd judge module is judged described punching and just identified not set, to described server, return without rushing positive information.
Described terminal also comprises the 4th judge module;
Described the 4th judge module, whether legal for judging the form of the described instruction that described receiver module receives;
Described the first processing module, carries out work when also legal for the form of judging described instruction when described the 4th judge module;
Described sending module, when also illegal for the form of judging described instruction when described the 4th judge module, returns to error message to described server.
Described the first judge module comprises: the first judging unit and the second judging unit;
Described the first judging unit, for judging according to the command code byte of described instruction whether described instruction is the instruction just relevant with punching;
Described the second judging unit, is and rushes after just relevant instruction for judge described instruction when described the first judging unit, judges the instruction type of described instruction according to the parameter in described instruction.
Described terminal also comprises:
Module is set, and is first to obtain after instruction for judge the instruction type of described instruction when described the first judge module, initialization directive sequence identifier; When described the first generation module generates described the first response data, by described command sequence identification renewal, be the first preset value;
The 5th judge module, is second to obtain after instruction for judge the instruction type of described instruction when described the first judge module, judges whether described command sequence sign is the first preset value;
Described the second generation module, also when judging described command sequence when described the 5th judge module and be designated the first preset value, carries out work;
The described module that arranges, also when judging described command sequence sign when described the 5th judge module and being not the first preset value, command sequence sign described in initialization;
Described sending module, also when judging described command sequence sign when described the 5th judge module and be not the first preset value, returns to error message to described server;
The described module that arranges, for when described the 3rd generation module generates described the second response data, is also the second preset value by described command sequence identification renewal;
Described terminal also comprises the 6th judge module, for judge the instruction type of described instruction when described the first judge module, is first to complete after instruction, judges whether described command sequence sign is the second preset value;
Described the 4th generation module, also when judging described command sequence when described the 6th judge module and be designated the second preset value, carries out work;
The described module that arranges, also when judging described command sequence sign when described the 6th judge module and being not the second preset value, command sequence sign described in initialization;
Described sending module, also when judging described command sequence sign when described the 6th judge module and be not the second preset value, returns to error message to described server;
The described module that arranges, also for when described the 4th generation module generates described the 3rd response data, command sequence sign described in initialization.
Described the second generation module is specifically for according to processing date and processing time in described the first data, result in described the first return data, the second deal with data, processing type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, application are processed sequence number, cipher-text information data, application cryptogram and server application data and are generated the described correction data of rushing, and punching is just being identified to set.
Described the second generation module is specifically for described processing date and the processing time of rushing in correction data is set to respectively to processing date and the processing time in described the first data, by described result of rushing in correction data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram and server application data are set to respectively the result in described the first return data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram and server application data, by the described processing date of rushing in correction data, processing time, result, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, described in application cryptogram and server application data combination producing, rush correction data, punching is just being identified to set.
Described the second generation module, specifically for according to described the first data, described the first return data with set in advance data in described terminal and generate and rush correction data, is just identifying set by described punching.
Described the second generation module is specifically for according to processing date and processing time in described the first data, result in described the first return data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code and unpredictable number, set in advance the processing serial number in described terminal, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification generate and rush correction data, punching is just being identified to set.
Described the second generation module is specifically for described processing date and the processing time of rushing in correction data is set to respectively to processing date and the processing time in described the first data, by described result of rushing in correction data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code and unpredictable number are set to respectively the result in described the first return data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code and unpredictable number, by the described processing serial number rushing in correction data, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification are set to respectively the processing serial number in described terminal, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification, by the described processing date of rushing in correction data, processing time, result, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code, unpredictable number, process serial number, terminal serial number, terminal capabilities, terminal type, input mode code, described in terminal area code and terminal iidentification combination producing, rush correction data, described punching is just being identified to set.
Described the 4th generation module comprises: operating unit, the 3rd judging unit, the first acquiring unit, the first processing unit and the second processing unit;
Described operating unit, operates described smart card for completing instruction according to described first;
Described the 3rd judging unit, for judging whether described operating unit successfully operates described smart card;
Described the first acquiring unit, for after judging when described the 3rd judging unit and successfully described smart card being operated, obtains the second return data that described in operating process, smart card returns;
Described the first processing unit, processes the described correction data of rushing for completing according to described first described the second return data that instruction and described the first acquiring unit get, and according to described the second return data, generates the 3rd response data;
Described sending module, described the 3rd response data also generating for return to described the first processing unit to described server;
Described the second processing unit, for after judging when described the 3rd judging unit and described smart card not being operated, completes instruction according to described first the described correction data of rushing is processed;
Described sending module, also, for after judging when described the 3rd judging unit and described smart card not being operated, returns to error message to described server.
Described the first processing unit comprises: the first judgment sub-unit, the second judgment sub-unit, the 3rd judgment sub-unit, the 4th judgment sub-unit, first are removed subelement, first and upgraded subelement and generate subelement;
Described the first judgment sub-unit, for judging according to described the second return data whether described smart card ratifies operation;
Described the second judgment sub-unit, for judging when described the first judgment sub-unit after described smart card approval operation, judges according to described the second return data whether described smart card correctly carries out the described first server script data that complete in instruction;
Described the 3rd judgment sub-unit, does not ratify, after operation, to complete instruction judge whether normally online according to described first for judge described smart card when described the first judgment sub-unit;
Described the 4th judgment sub-unit, for when described the 3rd judgment sub-unit, judge normally online after, according to described first, complete the approval that instruction judges whether to obtain described server;
Described first removes subelement, for judge described smart card when described the second judgment sub-unit, correctly carries out described first and completes after the server script data of instruction, and described punching is just being identified to reset, removes the described correction data of rushing of preservation; When described the 4th judgment sub-unit judgement does not obtain after the approval of described server, described punching is just being identified to reset, remove the described correction data of rushing of preserving;
Described first upgrades subelement, does not correctly carry out described first and completes after the server script data of instruction, according to the described correction data of rushing of described the second return data renewal for judge described smart card when described the second judgment sub-unit; When described the 3rd judgment sub-unit judgement normal online after, according to described the second return data, upgrade the described correction data of rushing; When described the 4th judgment sub-unit judgement has obtained after the approval of described server, according to described the second return data, upgrade the described correction data of rushing;
Described generation subelement, is just identifying reset for removing subelement described first by described punching, removes preserve described while rushing correction data, according to described the second return data, generates the 3rd response data; Described first, upgrade subelement and according to described the second return data, upgrade describedly while rushing correction data, according to described the second return data, generate the 3rd response data.
Described first upgrades subelement processes sequence number, cipher-text information type, application cryptogram and server application data specifically for process described result, terminal the result, the application of rushing in correction data of sequence number, cipher-text information type, application cryptogram and the renewal of server application data according to the result in described the second return data, terminal the result, application, and the described script execution result rushing in correction data is set to the script execution result in described the second return data.
Described first upgrades subelement upgrades the described correction data of rushing specifically for completing instruction according to described first.
Described first upgrades subelement specifically for described authorization response code, server authorizes data and the server script data rushing in correction data is set to respectively to the described first authorization response code, server authorizes data and server script data completing in instruction.
Described the second processing unit comprises: the 5th judgment sub-unit, the 6th judgment sub-unit, second are upgraded subelement and removed subelement;
Described the 5th judgment sub-unit, judges whether normally online for completing instruction according to described first;
Described the 6th judgment sub-unit, for when described the 5th judgment sub-unit, judge normally online after, according to described first, complete the approval that instruction judges whether to obtain described server;
Described second upgrades subelement, for when described the 5th judgment sub-unit, judge normal online after, according to described first, complete the described correction data of rushing of instruction renewal; When described the 6th judgment sub-unit is judged after the approval that obtains described server, according to described first, complete instruction and upgrade the described correction data of rushing;
Described removing subelement, for judging after the approval that does not obtain described server when described the 6th judgment sub-unit, is just identifying reset by described punching, removes the described correction data of rushing of preserving.
Described second upgrades subelement specifically for upgrading described result of rushing in correction data.
Described second upgrades subelement also for described authorization response code, server authorizes data and the server script data that rushes correction data is set to respectively to the described first authorization response code, server authorizes data and server script data completing in instruction.
Described terminal also comprises removing module, while rushing correction data instruction for receive removing when described receiver module, described punching is just being identified to reset, removes the described correction data of rushing of preserving;
Described sending module, also, for after completing in the work of described removing module, returns success to described server.
The present invention compared with prior art, has the following advantages:
Positive method and terminal are rushed in a kind of processing based on master-slave communication mechanism provided by the invention, in terminal and server, carry out in information interactive process, terminal is as the equipment of passive communication, in many instructions that comprise a complete operation, just processing punching respectively, server can obtain the correction data of rushing in terminal immediately, guarantees that in server, canned data is consistent with the information in terminal.
Accompanying drawing explanation
Fig. 1 is that the flow chart of positive method is rushed in a kind of processing based on master-slave communication mechanism that the embodiment of the present invention 1 provides;
Fig. 2 and Fig. 3 are that the flow chart of positive method is rushed in a kind of processing based on master-slave communication mechanism that the embodiment of the present invention 2 provides;
Fig. 4 is the module map that positive terminal is rushed in a kind of processing based on master-slave communication mechanism that the embodiment of the present invention 3 provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
In embodiments of the invention, rushing correction data is one group of data of preserving terminal processes state, server can judge whether that the data to preserving in server just rush according to rushing correction data, if desired rushes canonical according to rushing the data of preserving in correction data update server.
Embodiment 1
Embodiments of the invention 1 provide a kind of processing based on master-slave communication mechanism to rush positive method, as shown in Figure 1, comprising:
Step S1: terminal wait receives the instruction from server;
Step S2: the instruction type of the instruction that terminal judges receives, if first obtains instruction, perform step S3, if second obtains instruction, perform step S6, if first completes instruction, perform step S8, if other carry out corresponding operating, to server, return to operating result, return to step S1;
Step S3: terminal is just identifying reset by punching, removes the correction data of rushing in terminal, obtains first the first data of obtaining in instruction, obtains instruction obtain the data in smart card according to first;
Step S4: whether terminal judges successfully obtains the data in smart card, is to perform step S5, otherwise returns to error message to server, returns to step S1;
Step S5: terminal according to the first data, set in advance the data in terminal and the first return data of getting generates the first response data from smart card, to server, return to the first response data, return to step S1;
Step S6: terminal generates and to rush correction data according to the first data and the first return data of getting from smart card, and punching is just being identified to set;
Step S7: terminal generates the second response data according to the first return data and the data that set in advance in terminal, returns to the second response data to server, returns to step S1;
Step S8: terminal completes instruction according to first smart card is operated, according to first, completing the second return data that instruction and smart card return correction data that liquidates processes, according to the second data of returning, generate the 3rd response data, to server, return to the 3rd response data, return to step S1;
Step S8 is specially:
Step S8-1: terminal completes instruction according to first smart card is operated;
Step S8-2: whether terminal judges successfully operates smart card, is to obtain the second return data that in operating process, smart card returns, execution step S8-3, otherwise execution step S8-4;
Step S8-3: terminal completes instruction and the second return data correction data that liquidates according to first and processes, and generates the 3rd response data according to the second return data, returns to the 3rd response data to server, returns to step S1;
Step S8-4: terminal completes the instruction correction data that liquidates according to first and processes, and returns to error message to server, returns to step S1.
When terminal receives while rushing correction data instruction from obtaining of server, carry out following steps:
Step S9: terminal judges punching is just identifying whether set, is to perform step S10, otherwise returns without rushing positive information to server;
Step S10: terminal to server returns and rushes correction data.
Embodiment 2
Embodiments of the invention 2 provide a kind of processing based on master-slave communication mechanism to rush positive method, as shown in Figures 2 and 3, comprising:
Step 100: terminal powers on, initialization directive sequence identifier;
Particularly, command sequence sign initial value is 0;
Step 101: terminal receives the instruction from server;
Step 102: whether the form of terminal judges instruction is legal, is to perform step 103, otherwise returns to error message to server, returns to step 101;
Particularly, whether the classification byte in terminal judges instruction and command code byte are the first preset data, are to determine that the form of instruction is legal, otherwise determine that the form of instruction is illegal;
For example, the classification byte in terminal judges instruction be whether command code byte in 0x7E and instruction whether in the first preset range, be to determine that the form of instruction is legal, otherwise determine that the form of instruction is illegal;
Step 103: terminal judges according to the command code byte of instruction whether this instruction is the instruction just relevant with punching, is to perform step 105, otherwise execution step 104;
Particularly, whether the command code byte of terminal judges instruction is the 3rd preset value, is to determine that this instruction is for the instruction just relevant with punching, otherwise determines that this instruction is the instruction just irrelevant with punching; Preferably, the 3rd preset value is 0x40;
Step 104: terminal is carried out corresponding operating according to instruction, returns to operating result to server, returns to step 101;
Step 105: terminal is according to the parameter decision instruction type in instruction, if first obtain instruction and perform step 106, if second obtain instruction and perform step 111, if first complete instruction and perform step 114; If other, return to error message to server, return to step 101;
Particularly, if the parameter in instruction is the second preset data, determine that instruction type is first to obtain instruction; If the parameter in instruction is the 3rd preset data, determine that instruction type is second to obtain instruction; If the parameter in instruction is the 4th preset data, determine that instruction type is first to complete instruction; If the parameter in instruction is other data, determine that instruction type is other; Preferably, the second preset data is 0x0000, and the 3rd preset data is 0x0001, and the 4th preset data is 0x0101,
Step 106: terminal is just identifying reset by punching, removes the correction data of rushing in terminal, and initialization directive sequence identifier, obtains first the first data of obtaining in instruction;
Particularly, first the first data of obtaining in instruction that terminal is obtained comprise the first deal with data, process date and processing time;
For example, first to obtain instruction be 7E40000013000000000000140505210203; Wherein, 7E is the classification byte in instruction, and 40 is the command code byte in instruction, and 0000 is the parameter in instruction, 13 data lengths for data field in instruction, and 000000000000 is the first deal with data, and 140505 for processing the date, and 210203 is the processing time;
Step 107: terminal is obtained instruction according to first and obtained the data in smart card;
Particularly, terminal is obtained in the process of the data in smart card, and terminal receives the second deal with data and the PIN code of user's input, in subscriber authentication process, the PIN code of user's input is verified, be verified and rear PIN code be encrypted, obtain online PIN ciphertext;
Step 108: whether terminal judges successfully obtains the data in smart card, is to perform step 109, otherwise execution step 110;
Particularly, terminal judges obtains in the process of the data in smart card whether receive the error message that smart card returns, and is to determine the unsuccessful data of obtaining in smart card, otherwise determines the data of successfully obtaining in smart card;
For example, the first return data getting from smart card comprises: the second deal with data, result, application cryptogram, cipher-text information data, server application data, unpredictable number, sequence number is processed in application, terminal the result, authorize number, data type code, application interaction feature, other data, user authentication method result, interface equipment sequence number, private file title, application version number, process sequence counter, card Product Identifying information, the application Expiration Date, primary account number information, primary account number sequence number, two magnetic track equivalent datas and online PIN ciphertext,
Step 109: terminal according to the first data, set in advance the data in terminal and the first return data of getting generates the first response data from smart card, by command sequence identification renewal, it is the first preset value, to server, return to the first response data, return to step 101;
Particularly, the first preset value is 1, the first response data comprises: the second deal with data, result, terminal the result, process the date, unpredictable number, application interaction feature, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, user authentication method result, process sequence counter, private file title, application version number, process type, data type code, terminal area code, other data, terminal capabilities, terminal type, interface equipment sequence number, authorize number and card Product Identifying information, wherein, terminal area code, terminal capabilities and terminal type are the data that set in advance in terminal
For example, the first response data is:
00000000800002950580800000009A031405059F3704E24ADB8982025C009F3602000E9F2701809F26086B27FC1C4F2A064C9F100807010103A4B800019F34034103029F4104000000128407A00000033301019F0902008C5F2A0201569F1A0201569F03060000000000009F3303A0C8009F3501349F1E0830303030303030309F02060000000080009000
Wherein, 000000008000 is the second deal with data, 02 is result, 95058080000000 is terminal the result, 9A03140505 is for processing the date, 9F3704E24ADB89 is unpredictable number, 82025C00 is application interaction feature, 9F3602000E is application processing sequence number, 9F270180 is cipher-text information data, 9F26086B27FC1C4F2A064C is application cryptogram, 9F100807010103A4B80001 is server application data, 9F3403410302 is user authentication method result, 9F410400000012 is for processing sequence counter, 8407A0000003330101 is private file title, 9F0902008C is application version number, 5F2A020156 is data type code, 9F1A020156 is terminal area code, 9F0306000000000000 is other data, 9F3303A0C800 is terminal capabilities, 9F350134 is terminal type, 9F1E083030303030303030 is interface equipment sequence number, 9F02060000000080009000, for authorizing number,
Step 110: terminal to server returns to error message, returns to step 101;
Step 111: whether terminal judges command sequence sign is the first preset value, be to perform step 112, otherwise initialization directive sequence identifier is returned to error message to server, returns to step 101;
For example, second to obtain instruction be 7E40000100, and wherein, 7E is the classification byte in instruction, and 40 is the command code byte in instruction, and 0001 is the parameter in instruction, 00 data length for data field in instruction, i.e. and this instruction is without data field;
Step 112: terminal is according to the first data, the first return data and set in advance data in terminal and generate and rush correction data, is just identifying set by punching;
Particularly, punching is just identifying initial condition for resetting;
In the present embodiment, terminal is according to processing date and processing time in the first data, result in the first return data, the second deal with data, processing type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, application are processed sequence number, cipher-text information data, application cryptogram and the generation of server application data and are rushed correction data, are specially:
Processing date and the processing time of rushing in correction data are set to respectively to processing date and the processing time in the first data, by the result of rushing in correction data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram and server application data are set to respectively the result in the first return data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram and server application data, by the result of rushing in correction data, process the date, processing time, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram and server application data combination producing rush correction data, wherein, the result that terminal is rushed in correction data is set to " cannot be online ",
For example, the result that terminal is rushed in correction data is set to 0x02; Rushing correction data is:
029A031405059F212102030000000080005A0862280001000011175F34010157116228000100001117D30122010123456789950580800000009F3602000E9F2701809F26086B27FC1C4F2A064C9F100807010103A4B80001;
In addition, terminal can also be by the application interaction feature rushing in correction data, the application Expiration Date, data type code and unpredictable number are set to respectively the application interaction feature in the first return data, the application Expiration Date, data type code and unpredictable number, by the processing serial number rushing in correction data, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification are set to respectively be preset at the processing serial number in terminal, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification, by the result of rushing in correction data, process the date, processing time, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code, unpredictable number, process serial number, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification combination producing rush correction data,
Step 113: terminal generates the second response data according to the first data and the data that set in advance in terminal, is the second preset value by command sequence identification renewal, returns to the second response data to server, returns to step 101;
Particularly, the second preset value is 2; The second response data comprises: primary account number information, primary account number sequence number, two magnetic track equivalent datas, online PIN ciphertext and input mode code; Wherein, primary account number information, primary account number sequence number, two magnetic track equivalent datas and online PIN ciphertext are the data in the first data, input mode code is the data that set in advance in terminal;
For example, the second response data is:
5A0862280001000011175F34010157116228000100001117D301220101234567899980527010B34ACAFC02EA0FD538CA5EEB9FFC815CD50CA10B34B7E9F78D5A38EB8ACD02153D3D7A2BBC6CF6108EB0AA3716177B9DCE43DD071BE21117E3917595ED5D85FAD59A7328079E0A53E6ADC3A8108DDBB9478DC2EEBEEB1E6AC01D7D463E0EB87FA0D600051BC5C5EC5E9645CACA0D4FCCDC8758924D6FA4CB5C2C184208FF040205109000;
Wherein, 5A086228000100001117 is primary account number information, 5F340101 is primary account number sequence number, 57116228000100001117D30122010123456789 is two magnetic track equivalent datas, 9980527010B34ACAFC02EA0FD538CA5EEB9FFC815CD50CA10B34B7E9 F78D5A38EB8ACD02153D3D7A2BBC6CF6108EB0AA3716177B9DCE43DD 071BE21117E3917595ED5D85FAD59A7328079E0A53E6ADC3A8108DDB B9478DC2EEBEEB1E6AC01D7D463E0EB87FA0D600051BC5C5EC5E9645 CACA0D4FCCDC8758924D6FA4CB5C2C184208 is online PIN ciphertext, FF040205109000, for input mode code,
Step 114: whether terminal judges command sequence sign is the second preset value, be to perform step 115, otherwise initialization directive sequence identifier is returned to error message to server, returns to step 101;
Particularly, first complete instruction and comprise: online result, authorization response code, server authorizes data and server script data;
For example, first complete instruction and be:
7E4001002B008A023030910A0102030405060708303072189F180401 020304860F04DA9F790A000000009000AABBCCDD; Wherein, 7E is the classification byte in instruction, 40 is the command code byte in instruction, 0100 is the parameter in instruction, 2B is the data length of data field in instruction, and 00 is online result, and 8A023030 is authorization response code, 910A01020304050607083030 is server authorizes data, and 72189F180401020304860F04DA9F790A000000009000AABBC CDD is server script data;
Step 115: terminal completes instruction according to first smart card is operated;
Step 116: whether terminal judges successfully operates smart card, is to obtain the second return data that in operating process, smart card returns, execution step 122, otherwise execution step 117;
Particularly, whether receiving the error message that smart card returns in the process that terminal judges operates smart card, is to determine unsuccessful smart card to be operated, otherwise determines successfully smart card is operated;
Particularly, the second return data comprises result, script execution result, terminal the result, application processing sequence number, cipher-text information type, application cryptogram, server application data;
For example, the second return data is:
00950580800000009F3602000E9F2701409F260894ACA160C8B3835F 9F10080701010364BC0001DF310520010203049000; Wherein, 00 is result, 95058080000000 is terminal the result, 9F3602000E is application processing sequence number, 9F270140 is cipher-text information type, 9F260894ACA160C8B3835F is application cryptogram, and 9F10080701010364BC0001 is server application data, and DF31052001020304 is script execution result;
Step 117: terminal completes instruction according to first and judges whether normally onlinely, is to perform step 119, otherwise execution step 118;
Particularly, whether the online result that terminal judges first completes in instruction is the 4th preset value, is to determine that terminal is normally online, otherwise determines that terminal cannot be online; Preferably, the 4th preset value is 0x00;
Step 118: terminal completes instruction renewal according to first and rushes correction data, and initialization directive sequence identifier, returns to error message to server, returns to step 101;
Particularly, terminal is updated to " server refusal " by the result of rushing in correction data; In addition, also comprise: the first authorization response code, server authorizes data and server script data completing in instruction preserved as rushing correction data, and terminal is set to respectively the first authorization response code, server authorizes data and server script data completing in instruction by the authorization response code, server authorizes data and the server script data that rush in correction data;
For example, terminal is updated to 0x01 by the result of rushing in correction data; Rushing correction data is updated to:
019A031405059F212102030000000080005A0862280001000011175F34010157116228000100001117D30122010123456789950580800000009F3602000E9F2701809F26086B27FC1C4F2A064C9F100807010103A4B800018A023030910A0102030405060708303072189F180401020304860F04DA9F790A000000009000AABBCCDD;
Step 119: terminal completes according to first approval that instruction judges whether to obtain server, is to perform step 120, otherwise execution step 121;
Particularly, whether terminal judges first completes the authorization response code of instruction correct, is to determine the approval that obtains server, otherwise determines the approval that does not obtain server;
Step 120: terminal completes instruction renewal according to first and rushes correction data, and initialization directive sequence identifier, returns to error message to server, returns to step 101;
Particularly, terminal is updated to " server approval " by the result of rushing in correction data; In addition, also comprise: the first authorization response code, server authorizes data and server script data completing in instruction preserved as rushing correction data, and terminal is set to respectively the first authorization response code, server authorizes data and server script data completing in instruction by the authorization response code, server authorizes data and the server script data that rush in correction data;
For example, terminal is updated to 0x00 by the result of rushing in correction data; Rushing correction data is updated to:
009A031405059F212102030000000080005A0862280001000011175F34010157116228000100001117D30122010123456789950580800000009F3602000E9F2701809F26086B27FC1C4F2A064C9F100807010103A4B800018A023030910A0102030405060708303072189F180401020304860F04DA9F790A000000009000AABBCCDD;
Step 121: terminal is just identifying reset by punching, removes the correction data of rushing of preserving, and initialization directive sequence identifier, returns to error message to server, returns to step 101;
Step 122: terminal judges according to the second return data whether smart card ratifies operation, is to perform step 123, otherwise execution step 126;
Particularly, whether the cipher-text information type in terminal judges the second return data is correct, be to determine smart card approval operation, otherwise definite smart card do not ratified operation;
Step 123: terminal judges according to the second return data whether smart card correctly carries out server script data, is to perform step 124, otherwise execution step 125;
Particularly, whether the default byte of the script execution result of terminal judges the second return data is the 5th preset value, is to determine that the execution of server script data is correct, otherwise determines that the execution of server script data is incorrect; Preferably, default byte is the 4th byte, and the 5th preset value is 20;
Step 124: terminal is just identifying reset by punching, removes the correction data of rushing of preserving, and initialization directive sequence identifier, generates the 3rd response data according to the second return data, to server, returns to the 3rd response data, returns to step 101;
Step 125: terminal completes instruction according to first and correction data is rushed in the renewal of the second return data, and initialization directive sequence identifier, generates the 3rd response data according to the second return data, returns to the 3rd response data to server, returns to step 101;
Particularly, according to first, completing instruction and the second return data upgrades and rushes correction data and be: terminal is according to the result in the second return data, terminal the result, sequence number is processed in application, cipher-text information type, application cryptogram and server application data are upgraded and are rushed the result in correction data, terminal the result, sequence number is processed in application, cipher-text information type, application cryptogram and server application data, the script execution result rushing in correction data is set to the script execution result in the second return data, by the authorization response code rushing in correction data, server authorizes data and server script data are set to respectively the first authorization response code completing in instruction, server authorizes data and server script data, wherein, the result that terminal is rushed in correction data is set to " server approval ",
For example, the result that terminal is rushed in correction data is set to 0x00; Rushing correction data is:
009A031405059F212102030000000080005A0862280001000011175F34010157116228000100001117D30122010123456789950580800000009F3602000E9F2701409F260894ACA160C8B3835F9F10080701010364BC00018A023030910A0102030405060708303072189F180401020304860F04DA9F790A000000009000AABBCCDDDF31052001020304;
Step 126: terminal completes instruction according to first and judges whether normally onlinely, is to perform step 128, otherwise execution step 127;
Particularly, whether the online result that terminal judges first completes instruction is the 4th preset value, is to determine that terminal is normally online, otherwise determines that terminal cannot be online; Preferably, the 4th preset value is 0x00;
Step 127: terminal completes instruction according to first and correction data is rushed in the renewal of the second return data, and initialization directive sequence identifier, generates the 3rd response data according to the second return data, returns to the 3rd response data to server, returns to step 101;
Particularly, according to first, completing instruction and the second return data upgrades and rushes correction data and be: terminal is according to the result in the second return data, terminal the result, sequence number is processed in application, cipher-text information type, application cryptogram and server application data are upgraded and are rushed the result in correction data, terminal the result, sequence number is processed in application, cipher-text information type, application cryptogram and server application data, the script execution result rushing in correction data is set to the script execution result in the second return data, by the authorization response code rushing in correction data, server authorizes data and server script data are set to respectively the first authorization response code completing in instruction, server authorizes data and server script data, wherein, the result that terminal is rushed in correction data is set to " server refusal ",
For example, the result that terminal is rushed in correction data is set to 0x01; Rushing correction data is:
019A031405059F212102030000000080005A0862280001000011175F34010157116228000100001117D30122010123456789950580800000009F3602000E9F2701409F260894ACA160C8B3835F9F10080701010364BC00018A023030910A0102030405060708303072189F180401020304860F04DA9F790A000000009000AABBCCDD;
Step 128: terminal completes according to first approval that instruction judges whether to obtain server, is to perform step 129, otherwise execution step 130;
Particularly, whether terminal judges first completes the authorization response code of instruction correct, is to determine the approval that obtains server, otherwise determines the approval that does not obtain server;
Step 129: terminal completes instruction according to first and correction data is rushed in the renewal of the second return data, and initialization directive sequence identifier, generates the 3rd response data according to the second return data, returns to the 3rd response data to server, returns to step 101;
Particularly, according to first, completing instruction and the second return data upgrades and rushes correction data and be: terminal is according to the result in the second return data, terminal the result, sequence number is processed in application, cipher-text information type, application cryptogram and server application data are upgraded and are rushed the result in correction data, terminal the result, sequence number is processed in application, cipher-text information type, application cryptogram and server application data, the script execution result rushing in correction data is set to the script execution result in the second return data, by the authorization response code rushing in correction data, server authorizes data and server script data are set to respectively the first authorization response code completing in instruction, server authorizes data and server script data, wherein, the result that terminal is rushed in correction data is set to " server approval ",
For example, the result that terminal is rushed in correction data is set to 0x00; Rushing correction data is:
009A031405059F212102030000000080005A0862280001000011175F34010157116228000100001117D30122010123456789950580800000009F3602000E9F2701409F260894ACA160C8B3835F9F10080701010364BC00018A023030910A0102030405060708303072189F180401020304860F04DA9F790A000000009000AABBCCDDDF31052001020304;
Step 130: terminal is just identifying reset by punching, removes the correction data of rushing of preserving, and initialization directive sequence identifier, generates the 3rd response data according to the second return data, to server, returns to the 3rd response data, returns to step 101;
Particularly, the 3rd response data comprises: sequence number, cipher-text information type, application cryptogram, server application data are processed in result, script execution result, terminal the result, application;
In the present embodiment, server can send to obtain to terminal and rush correction data instruction to obtain the correction data of rushing of storing in terminal; Obtaining the classification byte of rushing correction data instruction is 0x7E, and command code byte is 0x46, and parameter is 0x0000;
When terminal receives while rushing correction data instruction from obtaining of server, carry out following steps:
Step 201: terminal judges punching is just identifying whether set, is to perform step 202, otherwise returns without rushing positive information to server;
Step 202: terminal to server returns to the correction data of rushing of preservation;
Particularly, server receives and rushes after correction data, according to rushing correction data, judges whether that the data to preserving in server just rush, and if desired rushes canonical according to rushing the data of preserving in correction data update server;
In the present embodiment, server can send to remove to terminal and rush correction data instruction to the correction data of rushing of storing in terminal is removed; The classification byte that correction data instruction is rushed in removing is 0x7E, and command code byte is 0x46, and parameter is 0x0001;
When terminal receives while rushing correction data instruction from the removing of server, punching is just being identified to reset, remove the correction data of rushing of preserving, to server, return success.
Positive method is rushed in a kind of processing based on master-slave communication mechanism providing in the present embodiment, in terminal and server, carry out in information interactive process, terminal is as the equipment of passive communication, in many instructions that comprise a complete operation, just processing punching respectively, server can obtain the correction data of rushing in terminal immediately, guarantees that in server, canned data is consistent with the information in terminal.
Embodiment 3
Embodiments of the invention 3 provide a kind of processing based on master-slave communication mechanism to rush positive terminal, as shown in Figure 4, comprising: receiver module 201, the first judge module 202, the first processing module 203, the second judge module 204, the first acquisition module 205, sending module 206, the first generation module 207, the second generation module 208, the 3rd generation module 209, the 4th generation module 210, the second processing module 211 and the 3rd judge module 212;
Receiver module 201, for receiving the instruction from server;
The first judge module 202, for judging the instruction type of the instruction that receiver module 201 receives;
The first processing module 203, for the instruction type of judging instruction when the first judge module 202, be first to obtain after instruction, punching is just being identified to reset, in removing terminal, rush correction data, obtain first the first data of obtaining in instruction, according to first, obtain instruction and obtain the data in smart card;
The second judge module 204, for judging whether the first processing module 203 successfully obtains the data of smart card;
The first acquisition module 205, for judging successfully to obtain after the data of smart card at the second judge module 204, obtains the first return data in smart card;
Sending module 206, for judging at the second judge module 204 after the unsuccessful data of obtaining smart card, returns to error message to server;
The first generation module 207, for the first data of getting according to the first processing module 203, set in advance the first return data that data and the first acquisition module 205 in terminal get and generate the first response data;
Sending module 206, also generates the first response data of 207 for return to the first generation module to server;
The second generation module 208, for the instruction type of judging instruction when the first judge module 202, be second to obtain after instruction, the first return data that the first data that get according to the first processing module 203 and the first acquisition module 205 get generates and rushes correction data, and punching is just being identified to set;
The 3rd generation module 209, generates the second response data for the first return data getting according to the first acquisition module 205 and the data that set in advance in terminal;
Sending module 206, the second response data also generating for return to the 3rd generation module 209 to server;
The 4th generation module 210, for the instruction type of judging instruction when the first judge module 202, be first to complete after instruction, according to first, completing instruction operates smart card, according to first, complete the second return data that instruction and smart card return correction data that liquidates and process, according to the second data of returning, generate the 3rd response data;
Sending module 206, the 3rd response data also generating for return to the 4th generation module 210 to server;
The second processing module 211, for after other, carries out corresponding operating for the instruction type of judging instruction when the first judge module 202;
Sending module 206, also for returning to the operating result of the second processing module 211 to server;
The 3rd judge module 212, obtains while rushing correction data instruction for receiving when receiver module 201, and judgement punching is just identifying whether set;
Sending module 206, also when judging punching when the 3rd judge module 212 and just identifying set, returns and rushes correction data to server; When the 3rd judge module 212 is judged punching and just identified not set, to server, return without rushing positive information.
Terminal also comprises the 4th judge module;
The 4th judge module, whether legal for judging the form of the instruction that receiver module 201 receives;
The first processing module 203, also carries out work when legal for judge the form of instruction when the 4th judge module;
Sending module 206, also, for judging the form of instruction when the 4th judge module when illegal, returns to error message to server.
The first judge module 202 comprises: the first judging unit and the second judging unit;
Whether the first judging unit, for being and rushing just relevant instruction according to the command code byte decision instruction of instruction;
The second judging unit, is and rushes after just relevant instruction, according to the instruction type of the parameter decision instruction in instruction for judge instruction when the first judging unit.
Terminal also comprises:
Module is set, and is first to obtain after instruction for judge the instruction type of instruction when the first judge module 202, initialization directive sequence identifier; When the first generation module 207 generates the first response data, by command sequence identification renewal, be the first preset value;
The 5th judge module, is second to obtain after instruction for judge the instruction type of instruction when the first judge module 202, and whether decision instruction sequence identifier is the first preset value;
The second generation module 208, also when judging command sequence when the 5th judge module and be designated the first preset value, carries out work;
Module is set, also when judging command sequence sign when the 5th judge module and being not the first preset value, initialization directive sequence identifier;
Sending module 206, also when judging command sequence sign when the 5th judge module and be not the first preset value, returns to error message to server;
Module is set, and, for when the 3rd generation module 209 generates the second response data, is also the second preset value by command sequence identification renewal;
Terminal also comprises the 6th judge module, for judge the instruction type of instruction when the first judge module 202, is first to complete after instruction, and whether decision instruction sequence identifier is the second preset value;
The 4th generation module 210, also when judging command sequence when the 6th judge module and be designated the second preset value, carries out work;
Module is set, also when judging command sequence sign when the 6th judge module and being not the second preset value, initialization directive sequence identifier;
Sending module 206, also when judging command sequence sign when the 6th judge module and be not the second preset value, returns to error message to server;
Module is set, also for when the 4th generation module 210 generates the 3rd response data, initialization directive sequence identifier.
The second generation module 208 is specifically for according to processing date and processing time in the first data, result in the first return data, the second deal with data, processing type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, application are processed sequence number, cipher-text information data, application cryptogram and the generation of server application data and are rushed correction data, and punching is just being identified to set.
The second generation module 208 is specifically for processing date and the processing time of rushing in correction data are set to respectively to processing date and the processing time in the first data, by the result of rushing in correction data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram and server application data are set to respectively the result in the first return data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram and server application data, by the processing date of rushing in correction data, processing time, result, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram and server application data combination producing rush correction data, and punching is just being identified to set.
The second generation module 208, specifically for according to the first data, the first return data with set in advance data in terminal and generate and rush correction data, is just identifying set by punching.
The second generation module 208 is specifically for according to processing date and processing time in the first data, result in the first return data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code and unpredictable number, set in advance the processing serial number in terminal, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification generate and rush correction data, punching is just being identified to set.
The second generation module 208 is specifically for processing date and the processing time of rushing in correction data are set to respectively to processing date and the processing time in the first data, by the result of rushing in correction data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code and unpredictable number are set to respectively the result in the first return data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code and unpredictable number, by the processing serial number rushing in correction data, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification are set to respectively the processing serial number in terminal, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification, by the processing date of rushing in correction data, processing time, result, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code, unpredictable number, process serial number, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification combination producing rush correction data, and punching is just being identified to set.
The 4th generation module 210 comprises: operating unit, the 3rd judging unit, the first acquiring unit, the first processing unit and the second processing unit;
Operating unit, operates smart card for completing instruction according to first;
Whether the 3rd judging unit, successfully operate smart card for decision operation unit;
The first acquiring unit, for after judging when the 3rd judging unit and successfully smart card being operated, obtains the second return data that in operating process, smart card returns;
The first processing unit, processes for completing the second return data that instruction and the first acquiring unit get correction data that liquidates according to first, and the second return data generates the 3rd response data;
Sending module 206, the 3rd response data also generating for return to the first processing unit to server;
The second processing unit, for after judging when the 3rd judging unit and smart card not being operated, completes the instruction correction data that liquidates according to first and processes;
Sending module 206, also, for after judging when the 3rd judging unit and smart card not being operated, returns to error message to server.
The first processing unit comprises: the first judgment sub-unit, the second judgment sub-unit, the 3rd judgment sub-unit, the 4th judgment sub-unit, first are removed subelement, first and upgraded subelement and generate subelement;
The first judgment sub-unit, for judging according to the second return data whether smart card ratifies operation;
The second judgment sub-unit, for judging when the first judgment sub-unit after smart card approval operation, judges according to the second return data whether smart card correctly carries out the first server script data that complete in instruction;
The 3rd judgment sub-unit, does not ratify, after operation, to complete instruction judge whether normally online according to first for judge smart card when the first judgment sub-unit;
The 4th judgment sub-unit, for when the 3rd judgment sub-unit, judge normally online after, according to first, complete the approval that instruction judges whether to obtain server;
First removes subelement, judges smart card correctly carry out first and complete after the server script data of instruction for the second judgment sub-unit, and punching is just being identified to reset, removes the correction data of rushing of preservation; When the 4th judgment sub-unit judgement does not obtain after the approval of server, punching is just being identified to reset, remove the correction data of rushing of preserving;
First upgrades subelement, for judge smart card when the second judgment sub-unit, does not correctly carry out first and completes after the server script data of instruction, according to the second return data renewal, rushes correction data; When the 3rd judgment sub-unit judgement normal online after, according to the second return data, upgrade and rush correction data; When the 4th judgment sub-unit judgement has obtained after the approval of server, according to the second return data, upgrade and rush correction data;
Generate subelement, at the first removing subelement, punching just being identified to reset, remove preserve rush correction data time, according to the second return data generation the 3rd response data; When the first renewal subelement rushes correction data according to the second return data renewal, according to the second return data, generate the 3rd response data.
First upgrades subelement processes sequence number, cipher-text information type, application cryptogram and server application data specifically for upgrading result, terminal the result, the application of rushing in correction data according to the result in the second return data, terminal the result, application processing sequence number, cipher-text information type, application cryptogram and server application data, and the script execution result rushing in correction data is set to the script execution result in the second return data.
First upgrades subelement rushes correction data specifically for completing instruction renewal according to first.
First upgrades subelement specifically for the authorization response code, server authorizes data and the server script data that rush in correction data are set to respectively to the first authorization response code, server authorizes data and server script data completing in instruction.
The second processing unit comprises: the 5th judgment sub-unit, the 6th judgment sub-unit, second are upgraded subelement and removed subelement;
The 5th judgment sub-unit, judges whether normally online for completing instruction according to first;
The 6th judgment sub-unit, for when the 5th judgment sub-unit, judge normally online after, according to first, complete the approval that instruction judges whether to obtain server;
Second upgrades subelement, for when the 5th judgment sub-unit, judge normal online after, according to first, complete instruction renewal and rush correction data; When the 6th judgment sub-unit is judged after the approval that obtains server, according to first, complete instruction renewal and rush correction data;
Remove subelement, for judging after the approval that does not obtain server when the 6th judgment sub-unit, punching is just being identified to reset, remove the correction data of rushing of preserving.
Second upgrades subelement rushes the result in correction data specifically for upgrading.
Second upgrades subelement also for the authorization response code, server authorizes data and the server script data that rush correction data being set to respectively to the first authorization response code, server authorizes data and server script data completing in instruction.
Terminal also comprises removing module, while rushing correction data instruction for receive removing when receiver module 201, punching is just being identified to reset, removes the correction data of rushing of preserving;
Sending module 206, also, for after completing in the work of removing module, returns success to server.
The above; be only the present invention's embodiment preferably, but protection scope of the present invention is not limited to this, is anyly familiar with those skilled in the art in technical scope disclosed by the invention; the variation that can expect easily or replacement, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.

Claims (36)

1. a positive method is rushed in the processing based on master-slave communication mechanism, it is characterized in that, described method comprises:
Step S1: terminal wait receives the instruction from server;
Step S2: the instruction type of the described instruction that described terminal judges receives, if first obtains instruction, perform step S3, if second obtains instruction, perform step S6, if first completes instruction, perform step S8, if other carry out corresponding operating, to described server, return to operating result, return to step S1;
Step S3: described terminal is just identifying reset by punching, removes the correction data of rushing in described terminal, obtains described first the first data of obtaining in instruction, obtains instruction obtain the data in described smart card according to described first;
Step S4: whether described terminal judges successfully obtains the data in described smart card, is to perform step S5, otherwise returns to error message to described server, returns to step S1;
Step S5: described terminal according to described the first data, set in advance the data in described terminal and the first return data of getting generates the first response data from described smart card, to described server, return to described the first response data, return to step S1;
Step S6: described terminal generates and to rush correction data according to described the first data and the first return data of getting from described smart card, and described punching is just being identified to set;
Step S7: described terminal generates the second response data according to described the first return data and the data that set in advance in described terminal, returns to described the second response data to described server, returns to step S1;
Step S8: described terminal completes instruction according to described first described smart card is operated, according to described first, completing the second return data that instruction and described smart card return processes the described correction data of rushing, according to the described second data of returning, generate the 3rd response data, to described server, return to described the 3rd response data, return to step S1;
When described terminal receives while rushing correction data instruction from obtaining of described server, carry out following steps:
Step S9: described in described terminal judges, punching is just identifying whether set, is to perform step S10, otherwise return without rushing positive information to described server;
Step S10: described terminal is returned to the described correction data of rushing to described server.
2. method according to claim 1, is characterized in that, comprises: described in described terminal judges, whether the form of instruction is legal between described step S1 and step S2, is to perform step S2, otherwise returns to error message to described server, returns to step S1.
3. method according to claim 1, is characterized in that, described step S2 is specially:
Step S2-1: described terminal judges according to the command code byte of described instruction whether described instruction is the instruction just relevant with punching, is to perform step S2-3, otherwise execution step S2-2;
Step S2-2: described terminal is carried out corresponding operating according to described instruction, returns to operating result to described server, returns to step S1;
Step S2-3: described terminal judges the instruction type of described instruction according to the parameter in described instruction, if first obtain instruction and perform step S3, if second obtain instruction and perform step S6, if first complete instruction and perform step S8; If other, return to error message to described server, return to step S1.
4. method according to claim 1, is characterized in that, described step S3 also comprises: described terminal initialization command sequence sign;
Described step S5 also comprises: described terminal is the first preset value by described command sequence identification renewal;
Before described step S6, also comprise: described in described terminal judges, whether command sequence sign is the first preset value, is to perform step S6, otherwise command sequence sign described in initialization is returned to error message to described server, returns to step S1;
Described step S7 also comprises: described terminal is the second preset value by described command sequence identification renewal;
Before described step S8, also comprise: described in described terminal judges, whether command sequence sign is the second preset value, is to perform step S8, otherwise command sequence sign described in initialization is returned to error message to described server, returns to step S1;
Described step S8 also comprises: command sequence sign described in described terminal initialization.
5. method according to claim 1, it is characterized in that, described terminal is rushed correction data according to described the first data and described the first return data generation, be specially: described terminal is according to processing date and processing time in described the first data, and the result in described the first return data, the second deal with data, processing type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, application are processed sequence number, cipher-text information data, application cryptogram and server application data and generated the described correction data of rushing.
6. method according to claim 5, is characterized in that, described terminal is according to processing date and processing time in described the first data, the result in described the first return data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram and server application data generate rushes correction data, be specially: described terminal is set to respectively processing date and the processing time in described the first data by described processing date and the processing time of rushing in correction data, by described result of rushing in correction data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram and server application data are set to respectively the result in described the first return data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram and server application data, by the described processing date of rushing in correction data, processing time, result, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, described in application cryptogram and server application data combination producing, rush correction data.
7. method according to claim 1, is characterized in that, described step S6 is specially: described terminal is according to described the first data, described the first return data and set in advance data in described terminal and generate and rush correction data, and punching is just being identified to set.
8. method according to claim 7, it is characterized in that, described terminal is according to described the first data, correction data is rushed in described the first return data and the data generation setting in advance in described terminal, be specially: described terminal is according to processing date and processing time in described the first data, result in described the first return data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code and unpredictable number, set in advance the processing serial number in described terminal, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification generate and rush correction data.
9. method according to claim 8, is characterized in that, described terminal is according to processing date and processing time in described the first data, the result in described the first return data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code and unpredictable number, set in advance the processing serial number in described terminal, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification generation are rushed correction data and are specially: described terminal is set to respectively processing date and the processing time in described the first data by described processing date and the processing time of rushing in correction data, by described result of rushing in correction data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code and unpredictable number are set to respectively the result in described the first return data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code and unpredictable number, by the described processing serial number rushing in correction data, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification are set to respectively the processing serial number in described terminal, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification, by the described processing date of rushing in correction data, processing time, result, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code, unpredictable number, process serial number, terminal serial number, terminal capabilities, terminal type, input mode code, described in terminal area code and terminal iidentification combination producing, rush correction data.
10. method according to claim 1, is characterized in that, described step S8 is specially:
Step S8-1: described terminal completes instruction according to described first described smart card is operated;
Step S8-2: whether described terminal judges successfully operates described smart card, is to obtain the second return data that described in operating process, smart card returns, execution step S8-3, otherwise execution step S8-4;
Step S8-3: described terminal completes instruction according to described first and described the second return data is processed the described correction data of rushing, according to described the second return data, generate the 3rd response data, to described server, return to described the 3rd response data, return to step S1;
Step S8-4: described terminal completes instruction according to described first the described correction data of rushing is processed, and returns to error message to described server, returns to step S1.
11. methods according to claim 10, is characterized in that, described step S8-3 is specially:
Steps A 1: described terminal judges according to described the second return data whether described smart card ratifies operation, is to perform step A2, otherwise execution step A5;
Steps A 2: described terminal judges according to described the second return data whether described smart card correctly carries out the described first server script data that complete in instruction, is to perform step A3, otherwise execution step A4;
Steps A 3: described terminal is just identifying reset by described punching, removes the described correction data of rushing of preserving, and according to described the second return data, generates the 3rd response data, to described server, returns to described the 3rd response data, returns to step S1;
Steps A 4: described terminal is upgraded the described correction data of rushing according to described the second return data, generates the 3rd response data according to described the second return data, to described server, returns to described the 3rd response data, returns to step S1;
Steps A 5: described terminal completes instruction according to described first and judges whether normally onlinely, is to perform step A7, otherwise execution step A6;
Steps A 6: described terminal is upgraded the described correction data of rushing according to described the second return data, generates the 3rd response data according to described the second return data, to described server, returns to described the 3rd response data, returns to step S1;
Steps A 7: described terminal completes according to described first approval that instruction judges whether to obtain described server, is to perform step A8, otherwise execution step A9;
Steps A 8: described terminal is upgraded the described correction data of rushing according to described the second return data, generates the 3rd response data according to described the second return data, to described server, returns to described the 3rd response data, returns to step S1;
Steps A 9: described terminal is just identifying reset by described punching, removes the described correction data of rushing of preserving, and according to described the second return data, generates the 3rd response data, to described server, returns to described the 3rd response data, returns to step S1.
12. methods according to claim 11, it is characterized in that, described terminal is upgraded the described correction data of rushing according to described the second return data, be specially: described terminal is according to the result in described the second return data, terminal the result, sequence number is processed in application, cipher-text information type, application cryptogram and server application data are upgraded described result of rushing in correction data, terminal the result, sequence number is processed in application, cipher-text information type, application cryptogram and server application data, the described script execution result rushing in correction data is set to the script execution result in described the second return data.
13. methods according to claim 11, is characterized in that, the described correction data of rushing of described renewal also comprises that according to described first, completing instruction upgrades the described correction data of rushing.
14. methods according to claim 13, it is characterized in that, describedly according to described first, complete instruction and upgrade the described correction data of rushing, be specially: described terminal is set to respectively the described first authorization response code, server authorizes data and server script data completing in instruction by described authorization response code, server authorizes data and the server script data rushing in correction data.
15. methods according to claim 10, is characterized in that, described step S8-4 is specially:
Step B1: described terminal completes instruction according to described first and judges whether normally onlinely, is to perform step B3, otherwise execution step B2;
Step B2: described terminal completes instruction according to described first and upgrades the described correction data of rushing, and returns to error message to described server, returns to step S1;
Step B3: described terminal completes according to described first approval that instruction judges whether to obtain described server, is to perform step B4, otherwise execution step B5;
Step B4: described terminal completes instruction according to described first and upgrades the described correction data of rushing, and returns to error message to described server, returns to step S1;
Step B5: described terminal is just identifying reset by described punching, removes the described correction data of rushing of preserving, and to described server, returns to error message, returns to step S1.
16. method according to claim 15, is characterized in that, describedly completes instruction according to described first and upgrades the described correction data of rushing, and is specially: described terminal is upgraded described result of rushing in correction data.
17. methods according to claim 16, it is characterized in that, describedly according to described first, complete instruction and upgrade the described correction data of rushing, also comprise: described terminal is set to respectively the described first authorization response code, server authorizes data and server script data completing in instruction by described authorization response code, server authorizes data and the server script data rushing in correction data.
18. method according to claim 1, is characterized in that, when described terminal receives while rushing correction data instruction from the removing of described server, described punching is just being identified to reset, removes the described correction data of rushing of preserving, and returns success to described server.
Positive terminal is rushed in 19. 1 kinds of processing based on master-slave communication mechanism, it is characterized in that, described terminal comprises: receiver module, the first judge module, the first processing module, the second judge module, the first acquisition module, sending module, the first generation module, the second generation module, the 3rd generation module, the 4th generation module, the second processing module and the 3rd judge module;
Described receiver module, for receiving the instruction from server;
Described the first judge module, for judging the instruction type of the described instruction that described receiver module receives;
Described the first processing module, for the instruction type of judging described instruction when described the first judge module, be first to obtain after instruction, punching is just being identified to reset, remove the correction data of rushing in described terminal, obtain described first the first data of obtaining in instruction, according to described first, obtain instruction and obtain the data in described smart card;
Described the second judge module, for judging whether described the first processing module successfully obtains the data of described smart card;
Described the first acquisition module, for judging successfully to obtain after the data of described smart card at described the second judge module, obtains the first return data in described smart card;
Described sending module, for judging at described the second judge module after the unsuccessful data of obtaining described smart card, returns to error message to described server;
Described the first generation module, for described the first data of getting according to described the first processing module, set in advance described the first return data that data and described the first acquisition module in described terminal get and generate the first response data;
Described sending module, described the first response data also generating for return to described the first generation module to described server;
Described the second generation module, for the instruction type of judging described instruction when described the first judge module, be second to obtain after instruction, described the first return data that described the first data that get according to described the first processing module and described the first acquisition module get generates and rushes correction data, and described punching is just being identified to set;
Described the 3rd generation module, generates the second response data for described the first return data getting according to described the first acquisition module and the data that set in advance in described terminal;
Described sending module, described the second response data also generating for return to described the 3rd generation module to described server;
Described the 4th generation module, for the instruction type of judging described instruction when described the first judge module, be first to complete after instruction, according to described first, completing instruction operates described smart card, according to described first, complete the second return data that instruction and described smart card return the described correction data of rushing is processed, according to the described second data of returning, generate the 3rd response data;
Described sending module, described the 3rd response data also generating for return to described the 4th generation module to described server;
Described the second processing module, for after other, carries out corresponding operating for the instruction type of judging described instruction when described the first judge module;
Described sending module, also for returning to the operating result of described the second processing module to described server;
Described the 3rd judge module, obtains while rushing correction data instruction for receiving when described receiver module, judges that described punching is just identifying whether set;
Described sending module, also when judging described punching when described the 3rd judge module and just identifying set, returns to the described correction data of rushing to described server; When described the 3rd judge module is judged described punching and just identified not set, to described server, return without rushing positive information.
20. terminals according to claim 19, is characterized in that, described terminal also comprises the 4th judge module;
Described the 4th judge module, whether legal for judging the form of the described instruction that described receiver module receives;
Described the first processing module, carries out work when also legal for the form of judging described instruction when described the 4th judge module;
Described sending module, when also illegal for the form of judging described instruction when described the 4th judge module, returns to error message to described server.
21. terminals according to claim 19, is characterized in that, described the first judge module comprises: the first judging unit and the second judging unit;
Described the first judging unit, for judging according to the command code byte of described instruction whether described instruction is the instruction just relevant with punching;
Described the second judging unit, is and rushes after just relevant instruction for judge described instruction when described the first judging unit, judges the instruction type of described instruction according to the parameter in described instruction.
22. terminals according to claim 19, is characterized in that, also comprise:
Module is set, and is first to obtain after instruction for judge the instruction type of described instruction when described the first judge module, initialization directive sequence identifier; When described the first generation module generates described the first response data, by described command sequence identification renewal, be the first preset value;
The 5th judge module, is second to obtain after instruction for judge the instruction type of described instruction when described the first judge module, judges whether described command sequence sign is the first preset value;
Described the second generation module, also when judging described command sequence when described the 5th judge module and be designated the first preset value, carries out work;
The described module that arranges, also when judging described command sequence sign when described the 5th judge module and being not the first preset value, command sequence sign described in initialization;
Described sending module, also when judging described command sequence sign when described the 5th judge module and be not the first preset value, returns to error message to described server;
The described module that arranges, for when described the 3rd generation module generates described the second response data, is also the second preset value by described command sequence identification renewal;
Described terminal also comprises the 6th judge module, for judge the instruction type of described instruction when described the first judge module, is first to complete after instruction, judges whether described command sequence sign is the second preset value;
Described the 4th generation module, also when judging described command sequence when described the 6th judge module and be designated the second preset value, carries out work;
The described module that arranges, also when judging described command sequence sign when described the 6th judge module and being not the second preset value, command sequence sign described in initialization;
Described sending module, also when judging described command sequence sign when described the 6th judge module and be not the second preset value, returns to error message to described server;
The described module that arranges, also for when described the 4th generation module generates described the 3rd response data, command sequence sign described in initialization.
23. terminals according to claim 19, it is characterized in that, described the second generation module is specifically for according to processing date and processing time in described the first data, result in described the first return data, the second deal with data, processing type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, application are processed sequence number, cipher-text information data, application cryptogram and server application data and are generated the described correction data of rushing, and punching is just being identified to set.
24. terminals according to claim 23, it is characterized in that, described the second generation module is specifically for described processing date and the processing time of rushing in correction data is set to respectively to processing date and the processing time in described the first data, by described result of rushing in correction data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram and server application data are set to respectively the result in described the first return data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram and server application data, by the described processing date of rushing in correction data, processing time, result, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, described in application cryptogram and server application data combination producing, rush correction data, punching is just being identified to set.
25. terminal according to claim 19, is characterized in that, described the second generation module, specifically for according to described the first data, described the first return data with set in advance data in described terminal and generate and rush correction data, is just identifying set by described punching.
26. terminals according to claim 25, it is characterized in that, described the second generation module is specifically for according to processing date and processing time in described the first data, result in described the first return data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code and unpredictable number, set in advance the processing serial number in described terminal, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification generate and rush correction data, punching is just being identified to set.
27. terminals according to claim 26, it is characterized in that, described the second generation module is specifically for described processing date and the processing time of rushing in correction data is set to respectively to processing date and the processing time in described the first data, by described result of rushing in correction data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code and unpredictable number are set to respectively the result in described the first return data, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code and unpredictable number, by the described processing serial number rushing in correction data, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification are set to respectively the processing serial number in described terminal, terminal serial number, terminal capabilities, terminal type, input mode code, terminal area code and terminal iidentification, by the described processing date of rushing in correction data, processing time, result, the second deal with data, process type, main account information, main account sequence number, two magnetic track equivalent datas, terminal the result, sequence number is processed in application, cipher-text information data, application cryptogram, server application data, application interaction feature, the application Expiration Date, data type code, unpredictable number, process serial number, terminal serial number, terminal capabilities, terminal type, input mode code, described in terminal area code and terminal iidentification combination producing, rush correction data, described punching is just being identified to set.
28. terminal according to claim 19, is characterized in that, described the 4th generation module comprises: operating unit, the 3rd judging unit, the first acquiring unit, the first processing unit and the second processing unit;
Described operating unit, operates described smart card for completing instruction according to described first;
Described the 3rd judging unit, for judging whether described operating unit successfully operates described smart card;
Described the first acquiring unit, for after judging when described the 3rd judging unit and successfully described smart card being operated, obtains the second return data that described in operating process, smart card returns;
Described the first processing unit, processes the described correction data of rushing for completing according to described first described the second return data that instruction and described the first acquiring unit get, and according to described the second return data, generates the 3rd response data;
Described sending module, described the 3rd response data also generating for return to described the first processing unit to described server;
Described the second processing unit, for after judging when described the 3rd judging unit and described smart card not being operated, completes instruction according to described first the described correction data of rushing is processed;
Described sending module, also, for after judging when described the 3rd judging unit and described smart card not being operated, returns to error message to described server.
29. terminals according to claim 28, it is characterized in that, described the first processing unit comprises: the first judgment sub-unit, the second judgment sub-unit, the 3rd judgment sub-unit, the 4th judgment sub-unit, first are removed subelement, first and upgraded subelement and generate subelement;
Described the first judgment sub-unit, for judging according to described the second return data whether described smart card ratifies operation;
Described the second judgment sub-unit, for judging when described the first judgment sub-unit after described smart card approval operation, judges according to described the second return data whether described smart card correctly carries out the described first server script data that complete in instruction;
Described the 3rd judgment sub-unit, does not ratify, after operation, to complete instruction judge whether normally online according to described first for judge described smart card when described the first judgment sub-unit;
Described the 4th judgment sub-unit, for when described the 3rd judgment sub-unit, judge normally online after, according to described first, complete the approval that instruction judges whether to obtain described server;
Described first removes subelement, for judge described smart card when described the second judgment sub-unit, correctly carries out described first and completes after the server script data of instruction, and described punching is just being identified to reset, removes the described correction data of rushing of preservation; When described the 4th judgment sub-unit judgement does not obtain after the approval of described server, described punching is just being identified to reset, remove the described correction data of rushing of preserving;
Described first upgrades subelement, does not correctly carry out described first and completes after the server script data of instruction, according to the described correction data of rushing of described the second return data renewal for judge described smart card when described the second judgment sub-unit; When described the 3rd judgment sub-unit judgement normal online after, according to described the second return data, upgrade the described correction data of rushing; When described the 4th judgment sub-unit judgement has obtained after the approval of described server, according to described the second return data, upgrade the described correction data of rushing;
Described generation subelement, is just identifying reset for removing subelement described first by described punching, removes preserve described while rushing correction data, according to described the second return data, generates the 3rd response data; Described first, upgrade subelement and according to described the second return data, upgrade describedly while rushing correction data, according to described the second return data, generate the 3rd response data.
30. terminals according to claim 29, it is characterized in that, described first upgrades subelement processes sequence number, cipher-text information type, application cryptogram and server application data specifically for process described result, terminal the result, the application of rushing in correction data of sequence number, cipher-text information type, application cryptogram and the renewal of server application data according to the result in described the second return data, terminal the result, application, and the described script execution result rushing in correction data is set to the script execution result in described the second return data.
31. terminal according to claim 29, is characterized in that, described first upgrades subelement upgrades the described correction data of rushing specifically for completing instruction according to described first.
32. terminals according to claim 31, it is characterized in that, described first upgrades subelement specifically for described authorization response code, server authorizes data and the server script data rushing in correction data is set to respectively to the described first authorization response code, server authorizes data and server script data completing in instruction.
33. terminals according to claim 28, is characterized in that, described the second processing unit comprises: the 5th judgment sub-unit, the 6th judgment sub-unit, second are upgraded subelement and removed subelement;
Described the 5th judgment sub-unit, judges whether normally online for completing instruction according to described first;
Described the 6th judgment sub-unit, for when described the 5th judgment sub-unit, judge normally online after, according to described first, complete the approval that instruction judges whether to obtain described server;
Described second upgrades subelement, for when described the 5th judgment sub-unit, judge normal online after, according to described first, complete the described correction data of rushing of instruction renewal; When described the 6th judgment sub-unit is judged after the approval that obtains described server, according to described first, complete instruction and upgrade the described correction data of rushing;
Described removing subelement, for judging after the approval that does not obtain described server when described the 6th judgment sub-unit, is just identifying reset by described punching, removes the described correction data of rushing of preserving.
34. terminal according to claim 33, is characterized in that, described second upgrades subelement specifically for upgrading described result of rushing in correction data.
35. terminals according to claim 34, it is characterized in that, described second upgrades subelement also for described authorization response code, server authorizes data and the server script data that rushes correction data is set to respectively to the described first authorization response code, server authorizes data and server script data completing in instruction.
36. terminal according to claim 19, is characterized in that, described terminal also comprises removing module, while rushing correction data instruction for receive removing when described receiver module, described punching is just being identified to reset, removes the described correction data of rushing of preserving;
Described sending module, also, for after completing in the work of described removing module, returns success to described server.
CN201410307067.XA 2014-06-30 2014-06-30 Positive method and terminal is rushed in a kind of processing based on master-slave communication mechanism Active CN104092675B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410307067.XA CN104092675B (en) 2014-06-30 2014-06-30 Positive method and terminal is rushed in a kind of processing based on master-slave communication mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410307067.XA CN104092675B (en) 2014-06-30 2014-06-30 Positive method and terminal is rushed in a kind of processing based on master-slave communication mechanism

Publications (2)

Publication Number Publication Date
CN104092675A true CN104092675A (en) 2014-10-08
CN104092675B CN104092675B (en) 2017-08-11

Family

ID=51640356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410307067.XA Active CN104092675B (en) 2014-06-30 2014-06-30 Positive method and terminal is rushed in a kind of processing based on master-slave communication mechanism

Country Status (1)

Country Link
CN (1) CN104092675B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106528053A (en) * 2017-01-04 2017-03-22 飞天诚信科技股份有限公司 Terminal device and efficient data processing method thereof
CN108804442A (en) * 2017-04-27 2018-11-13 北京京东尚科信息技术有限公司 Sequence number generation method and device
CN112583683A (en) * 2020-12-29 2021-03-30 中国科学院声学研究所 Master-slave CAN FD bus application layer communication method and system and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110694A (en) * 2006-07-19 2008-01-23 上海卡友信息服务有限公司 Method and device for software update using terminal unit in business system
US20090077346A1 (en) * 2007-09-14 2009-03-19 Infineon Technologies Ag Processing module, processor circuit, instruction set for processing data, and method for synchronizing the processing of codes
CN101447045A (en) * 2008-12-31 2009-06-03 中国建设银行股份有限公司 Method for processing transaction flow and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110694A (en) * 2006-07-19 2008-01-23 上海卡友信息服务有限公司 Method and device for software update using terminal unit in business system
US20090077346A1 (en) * 2007-09-14 2009-03-19 Infineon Technologies Ag Processing module, processor circuit, instruction set for processing data, and method for synchronizing the processing of codes
CN101447045A (en) * 2008-12-31 2009-06-03 中国建设银行股份有限公司 Method for processing transaction flow and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
朱鹏飞,于华章,陆舟: "《物联网信息完整性保护方案》", 《第27次全国计算机安全学术交流会》 *
朱鹏飞,于华章,陆舟等: "《一种对动态口令生成算法的量化评估方法》", 《第28次全国计算机安全学术交流会》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106528053A (en) * 2017-01-04 2017-03-22 飞天诚信科技股份有限公司 Terminal device and efficient data processing method thereof
CN106528053B (en) * 2017-01-04 2019-02-15 飞天诚信科技股份有限公司 A kind of terminal device high efficiency data processing method and its terminal device
CN108804442A (en) * 2017-04-27 2018-11-13 北京京东尚科信息技术有限公司 Sequence number generation method and device
CN108804442B (en) * 2017-04-27 2022-06-07 北京京东尚科信息技术有限公司 Serial number generation method and device
CN112583683A (en) * 2020-12-29 2021-03-30 中国科学院声学研究所 Master-slave CAN FD bus application layer communication method and system and electronic equipment

Also Published As

Publication number Publication date
CN104092675B (en) 2017-08-11

Similar Documents

Publication Publication Date Title
CN104380764B (en) For the method for the customer data base for the characteristic of vehicle being registered in Internet Server equipment
CN1127239C (en) Personal equipment, terminal servicing device and method for establishing reliable connecting
CN104966343B (en) Access control method Internet-based
CN105376203B (en) The processing method of interactive information, apparatus and system
CN105045085A (en) Control method of smart watch and the smart watch
CN104506914B (en) A kind of digital television program plays the method and Conditional Access Module of control
CN108648431A (en) Configuration method, device, terminal device and the readable storage medium storing program for executing of remote-controller function
CN105227321A (en) Information processing method, server and client
CN103793261A (en) Methods and devices for sending and receiving instruction information
CN105827438A (en) Method for setting APN automatically
CN105337974A (en) Account authorization method, account login method, account authorization device and client end
CN105187444A (en) Key information burning method and device
CN103810017A (en) Method and device for sending and receiving command information
CN104092675A (en) Reverse processing method and terminal based on main communication structure and auxiliary communication structure
CN107465649A (en) Control method of electronic device, terminal and control system
CN105809445A (en) Password verifying and processing method, apparatus and terminal
CN104076696B (en) Control terminal and applied program processing method, household appliance and its control system
CN110647734A (en) Equipment unlocking method and device based on Internet of things operating system
CN107295458A (en) Terminal, smart card and its between set up Bluetooth connecting method, device and server
CN106682899A (en) Method for confirming online transaction safety through mobile phone and system thereof
CN104794788A (en) Internet application system based on radio-frequency identification technology and realization method of internet application system
CN105141795A (en) Unlocking method and system for device to be unlocked
CN104572135A (en) Command processing method, command processing device and terminal
CN105828322A (en) User login method, mobile terminal and safety center
CN109587529B (en) Authorization method and authorization device for television function items

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant