CN112990402B - Vehicle-mounted terminal exception handling method and vehicle-mounted terminal - Google Patents

Vehicle-mounted terminal exception handling method and vehicle-mounted terminal Download PDF

Info

Publication number
CN112990402B
CN112990402B CN202110469683.5A CN202110469683A CN112990402B CN 112990402 B CN112990402 B CN 112990402B CN 202110469683 A CN202110469683 A CN 202110469683A CN 112990402 B CN112990402 B CN 112990402B
Authority
CN
China
Prior art keywords
interaction
record
card
vehicle
mounted terminal
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.)
Active
Application number
CN202110469683.5A
Other languages
Chinese (zh)
Other versions
CN112990402A (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 CN202110469683.5A priority Critical patent/CN112990402B/en
Publication of CN112990402A publication Critical patent/CN112990402A/en
Application granted granted Critical
Publication of CN112990402B publication Critical patent/CN112990402B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
    • G06K17/0022Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisions for transferring data to distant stations, e.g. from a sensing device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/40Business processes related to the transportation industry

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Economics (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Traffic Control Systems (AREA)
  • Devices For Checking Fares Or Tickets At Control Points (AREA)

Abstract

The invention discloses a vehicle-mounted terminal exception handling method and a vehicle-mounted terminal, and relates to the field of exception handling. When the vehicle-mounted terminal detects that the interaction timeout occurs to the cards entering the field, acquiring a card value and a card interaction detail record library from the cards; judging whether the card numerical value is consistent with the post-interaction numerical value in the interaction timeout record, if so, storing the interaction verification code in the card into the interaction timeout record, changing the interaction timeout record into a normal interaction record and ending the current interaction with the card when the card interaction detail record library is matched with the interaction timeout record and the interaction timeout record is effective; otherwise, when the card interaction detail record library is matched with the interaction timeout record, the interaction verification code is obtained from the safety control module and stored in the interaction timeout record, the interaction timeout record is changed into the normal interaction record, and the current interaction with the card is ended. According to the invention, by comparing the interactive verification codes, the last interactive result can be recovered when the card leaves the field and enters the field again, and the user experience is improved.

Description

Vehicle-mounted terminal exception handling method and vehicle-mounted terminal
Technical Field
The invention relates to the field of exception handling, in particular to a vehicle-mounted terminal exception handling method and a vehicle-mounted terminal.
Background
When a bus is taken, the situation that the card leaves the field after the vehicle-mounted terminal sends an interaction command is very easy to occur due to crowdedness of people or instability in the running process of the bus, and the vehicle-mounted terminal does not receive response data returned by the card, so that the interaction overtime phenomenon is generated. In the prior art, the vehicle-mounted terminal can prompt the user to swipe the card again, but under the condition that people are crowded, other cards possibly exist in the middle for normal interaction, the interaction timeout processing flow is terminated at the moment, and when the card leaves the field and enters the field again, the last interaction result cannot be recovered, so that the user experience is influenced.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a vehicle-mounted terminal exception handling method and a vehicle-mounted terminal.
In one aspect, an embodiment of the present invention provides a method for processing an exception of a vehicle-mounted terminal, including:
step S1: when the vehicle-mounted terminal detects that the interaction timeout of an incoming card occurs, a card value and a card interaction detail record library are obtained from the card;
step S2: the vehicle-mounted terminal judges whether the card value is consistent with the value after interaction in the stored interaction timeout record corresponding to the card, if so, the step S3 is executed, otherwise, the step S5 is executed;
step S3: the vehicle-mounted terminal judges whether the card interaction detail record library is matched with the interaction timeout record, if so, the step S4 is executed, otherwise, the interaction timeout record is changed into an abnormal interaction record, and the current interaction with the card is executed;
step S4: the vehicle-mounted terminal acquires interactive authentication response data from the card, judges whether the interactive overtime record is valid or not according to the interactive authentication response data, if so, stores an interactive verification code in the interactive authentication response data into the interactive overtime record, changes the interactive overtime record into a normal interactive record, ends the current interaction with the card, otherwise, changes the interactive overtime record into an abnormal interactive record, and executes the current interaction with the card;
step S5: the vehicle-mounted terminal judges whether the card interaction detail record library is matched with the interaction timeout record or not, if so, an interaction verification code is obtained from a safety control module, the interaction verification code is stored in the interaction timeout record, the interaction timeout record is changed into a normal interaction record, and the current interaction with the card is finished; otherwise, changing the interaction overtime record into an abnormal interaction record, and executing the current interaction with the card.
Further, before the step S1, the method further includes:
step A1: when the vehicle-mounted terminal detects that a card enters a field, judging whether the card is legal or not, if so, executing the step A2, otherwise, terminating the current interaction with the card;
step A2: and the vehicle-mounted terminal judges whether the application in the card is available, if so, the step S1 is executed, and if not, the current interaction with the card is terminated.
Further, the step a1 includes:
step A11: when the vehicle-mounted terminal detects that a card enters the field, sending an application selection instruction to the card;
step A12: when the vehicle-mounted terminal receives application selection response data returned by the card, analyzing the application selection response data to obtain information file data;
step A13: and the vehicle-mounted terminal judges whether the card issuing mechanism code in the information file data is correct or not, judges whether the card issuing mechanism code in the information file data is in a white list or not, judges whether the application type identifier in the information file data is a first preset value or not, judges whether the card issuing mechanism application version in the information file data is a second preset value or not, if yes, step A2 is executed, and if not, the current interaction with the card is terminated.
Further, the step a2 includes: and the vehicle-mounted terminal judges whether the application starting date in the information file data is earlier than the local date and whether the application effective date in the information file data is later than the local date, if so, the step S1 is executed, otherwise, the operation is finished.
Further, between the step a2 and the step S1, the method further includes: and the vehicle-mounted terminal judges whether the interaction timeout occurs to the card, if so, the step S1 is executed, and if not, the current interaction with the card is executed.
Further, the step of judging whether the interaction timeout occurs on the card by the vehicle-mounted terminal includes: and the vehicle-mounted terminal judges whether an interaction overtime record of the card is stored or not and judges whether a card application serial number in the information file data is matched with a card application serial number in the interaction overtime record or not, if so, the card is subjected to interaction overtime, otherwise, the card is not subjected to interaction overtime.
Further, the performing the current interaction with the card includes:
step B1: the vehicle-mounted terminal sends an initialization interaction instruction to the card, and when initialization interaction response data returned by the card are received, the initialization interaction response data are analyzed to obtain a card numerical value, a random number and a card interaction serial number;
step B2: the vehicle-mounted terminal sends the random number and the card interaction serial number to a safety control module, and receives the MAC1 returned by the safety control module and the vehicle-mounted terminal interaction serial number;
step B3: the vehicle-mounted terminal takes the current date and time as the interaction date and the interaction time, generates an interaction instruction according to the MAC1, the interaction date and the interaction time, and sends the interaction instruction to the card;
step B4: the vehicle-mounted terminal judges whether interaction response data returned by the card is received or not, if so, the interaction response data is analyzed to obtain MAC2, the MAC2 is sent to the safety control module for verification, the current interaction with the card is terminated, otherwise, the card interaction serial number is updated, an interaction timeout record corresponding to the card is generated according to the updated card interaction serial number and is stored in a temporary storage area, interaction failure is reminded, and the current interaction with the card is ended;
the interaction timeout record includes: the card application serial number, the preset interaction type, the card interaction serial number, the interaction numerical value, the pre-interaction numerical value, the post-interaction numerical value, the preset vehicle-mounted terminal number, the vehicle-mounted terminal interaction serial number returned by the safety control module, the interaction state, and the interaction date and the interaction time in the interaction instruction in the information file data;
the updating of the card interaction sequence number specifically comprises: and adding 1 to the card interaction serial number in the initialization interaction response data.
Further, the step B2 and the step B3 comprise:
step C1: the vehicle-mounted terminal judges the interaction type, if the interaction type is composite interaction, the step C2 is executed, and if the interaction type is common interaction, the step B3 is executed;
step C2: the vehicle-mounted terminal sends a file updating command to the card, and step B3 is executed when receiving the file updating success response data returned by the card;
the update file command specifically includes: the command of updating the public transport variable-length recording file and the command of updating the card public transport process cyclic recording file, wherein the successful response data of the updated file comprises the following data: the method comprises the following steps of (1) recording a public transportation variable length file and a card public transportation process cycle record file;
the interaction timeout record further comprises: the system comprises a preset city code, a card issuing organization code in the information file data, a random number in the initialization interactive response data, the current driving direction of the vehicle-mounted terminal, the current station number and the driving mileage of the vehicle-mounted terminal.
Further, the obtaining a card value and a card interaction detail record library from the card includes:
step D1: the vehicle-mounted terminal respectively sends a card value acquisition instruction and an interaction detail record acquisition instruction to the card;
step D2: and the vehicle-mounted terminal respectively analyzes the acquired card numerical value response data and the acquired interaction detail record response data returned by the card to obtain a card numerical value and an interaction detail record library.
Further, the step S3 includes:
and the vehicle-mounted terminal judges whether the card interaction serial number in the interaction timeout record stored in the temporary storage area is consistent with the card interaction serial number in the latest interaction detail record in the interaction detail record library and judges whether the vehicle-mounted terminal number in the interaction timeout record is consistent with the vehicle-mounted terminal number in the latest interaction detail record in the interaction detail record library, if so, the step S4 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction timeout record in the temporary storage area is cleared, and the current interaction with the card is executed.
Further, the step S4 includes:
step S41: the vehicle-mounted terminal acquires an interactive authentication instruction according to the card interactive sequence number in the interactive overtime record stored in the temporary storage area and sends the interactive authentication instruction to the card;
step S42: the vehicle-mounted terminal judges whether the acquired interactive authentication response data returned by the card is received, if so, the step S43 is executed, otherwise, the step S47 is executed;
step S43: the vehicle-mounted terminal analyzes the acquired interactive authentication response data to obtain MAC2 and an interactive verification code, sends the MAC2 to a safety control module, judges whether verification success response data returned by the safety control module are received or not, if yes, executes a step S44, otherwise executes a step S45;
step S44: the vehicle-mounted terminal stores the interaction verification code into an interaction timeout record in the temporary storage area, modifies the interaction timeout record in the temporary storage area into a normal interaction record and stores the normal interaction record into a formal storage area, clears the interaction timeout record in the temporary storage area and finishes the current interaction with the card;
step S45: the vehicle-mounted terminal calculates an interactive verification code instruction according to the interactive numerical value, the interactive type, the vehicle-mounted terminal number, the vehicle-mounted terminal interactive serial number, the interactive date and the interactive time in the interactive overtime record, sends the interactive verification code instruction to the safety control module, and receives and stores the interactive verification code returned by the safety control module;
step S46: the vehicle-mounted terminal judges whether the received interactive verification code is consistent with the interactive verification code obtained by analyzing the acquired interactive authentication response data, if so, the interactive verification code is stored into an interactive overtime record in the temporary storage area, the interactive overtime record in the temporary storage area is modified into a normal interactive record and is stored into a formal storage area, the interactive overtime record in the temporary storage area is cleared, the current interaction with the card is ended, otherwise, the interactive overtime record in the temporary storage area is modified into an abnormal interactive record and is stored into the formal storage area, the interactive overtime record in the temporary storage area is cleared, and the current interaction with the card is executed;
step S47: and the vehicle-mounted terminal calculates an interactive verification code instruction according to the interactive numerical value, the interactive type, the vehicle-mounted terminal number, the vehicle-mounted terminal interactive serial number, the interactive date and the interactive time in the interactive overtime record and sends the interactive verification code instruction to a safety control module, receives and stores the interactive verification code returned by the safety control module, stores the interactive verification code into the interactive overtime record in the temporary storage area, modifies the interactive overtime record in the temporary storage area into a normal interactive record and stores the normal interactive record into a formal storage area, clears the interactive overtime record in the temporary storage area, and ends the current interaction with the card.
Further, the step S5 of determining, by the vehicle-mounted terminal, whether the card interaction detail record library matches the interaction timeout record includes:
step S51: the vehicle-mounted terminal judges whether a card interaction serial number in an interaction timeout record stored in a temporary storage area is in the interaction detail record library, if so, an interaction detail record corresponding to the card interaction serial number is obtained from the interaction detail record library, and a step S52 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction timeout record in the temporary storage area is cleared, and the current interaction with the card is executed;
step S52: and the vehicle-mounted terminal judges whether the vehicle-mounted terminal number in the interaction timeout record is consistent with the vehicle-mounted terminal number in the acquired interaction detail record or not and judges whether the interaction time in the interaction timeout record is consistent with the interaction time in the acquired interaction detail record or not, if so, the step S53 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into the abnormal interaction record and is stored in the formal storage area, the interaction timeout record in the temporary storage area is cleared, and the current interaction with the card is executed.
Further, the acquiring the interactive verification code from the security control module in step S5 includes: and the vehicle-mounted terminal calculates an interactive verification code instruction according to the interactive numerical value, the interactive type, the vehicle-mounted terminal number, the vehicle-mounted terminal interactive sequence number, the interactive date and the interactive time in the interactive overtime record, sends the interactive verification code instruction to the safety control module, and receives and stores the interactive verification code returned by the safety control module.
Further, between the step S1 and the step S2, the method further includes: the vehicle-mounted terminal judges the interaction type in the stored interaction timeout record, if the interaction type is common interaction, the step S2 is executed, and if the interaction type is composite interaction, the step T1 is executed;
step T1: the vehicle-mounted terminal sends a command for acquiring a variable length record file in the public transportation process to the card; when the response data of the public transportation process variable length recording file returned by the card is received, analyzing the response data of the public transportation process variable length recording file to obtain a public transportation process variable length recording file, and executing the step S2;
the step S3 includes:
step S31: the vehicle-mounted terminal judges whether the card interaction serial number in the interaction timeout record stored in the temporary storage area is consistent with the card interaction serial number in the latest interaction detail record in the interaction detail record library, if so, the step S32 is executed, otherwise, the step S51 is executed;
step S32: the vehicle-mounted terminal judges whether the vehicle-mounted terminal number in the interaction timeout record is consistent with the vehicle-mounted terminal number in the latest interaction detail record in the interaction detail record library or not and judges whether the interaction state in the interaction timeout record is consistent with the interaction state in the public transport variable length record file or not, if yes, step S4 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction timeout record in the temporary storage area is cleared, and the current interaction with the card is executed;
between the step S53 and the step S54:
step F1: the vehicle-mounted terminal sends an instruction for acquiring a loop record file of the public transportation process to the card;
step F2: when the vehicle-mounted terminal receives the response data of the public transportation process circulation record file returned by the card, analyzing the response data of the public transportation process circulation file to obtain a public transportation process circulation file;
step F3: the vehicle-mounted terminal judges whether a record matched with both the interaction time in the interaction overtime record and the vehicle-mounted terminal number is found in the public process traffic cycle record file, if so, the found public process traffic cycle record is obtained, and the step F4 is executed, otherwise, the interaction overtime record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction overtime record in the temporary storage area is cleared, and the current interaction with the card is executed;
step F4: and the vehicle-mounted terminal judges whether the acquired interaction state in the public process traffic cycle record is consistent with the interaction state in the interaction overtime record or not and judges whether the post-interaction numerical value in the public process traffic cycle record is consistent with the post-interaction numerical value in the interaction overtime record or not, if so, the step S54 is executed, otherwise, the interaction overtime record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction overtime record in the temporary storage area is cleared, and the current interaction with the card is executed.
In another aspect, an embodiment of the present invention further provides an in-vehicle terminal, where the in-vehicle terminal includes at least one processor, a memory, and instructions stored on the memory and executable by the at least one processor, and the at least one processor executes the instructions to implement any one of the above-mentioned vehicle terminal exception handling methods.
In another aspect, an embodiment of the present invention provides a computer-readable storage medium, where the computer-readable storage medium includes a computer program, and when the computer program runs on a vehicle-mounted terminal, the vehicle-mounted terminal is caused to execute any one of the foregoing vehicle-mounted terminal exception handling methods.
In a fourth aspect, an embodiment of the present invention further provides a chip, where the chip is coupled to a memory, and is configured to execute a computer program stored in the memory to execute any one of the foregoing exception handling methods for the vehicle-mounted terminal.
Compared with the prior art, the invention has the following advantages:
the invention provides a vehicle-mounted terminal exception handling method and a vehicle-mounted terminal.
Drawings
Fig. 1 is a flowchart of a vehicle-mounted terminal exception handling method according to an embodiment of the present invention;
fig. 2 to fig. 4 are flowcharts of a vehicle-mounted terminal based exception handling method according to a second embodiment of the present invention.
Detailed Description
The present application provides a vehicle-mounted terminal exception handling method and a vehicle-mounted terminal, and the following describes in detail a specific embodiment of the present application with reference to the accompanying drawings. Examples of which are illustrated in the accompanying drawings. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
It will be understood by those within the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention are described in further detail below with reference to the accompanying drawings.
Example one
An embodiment of the present invention provides a method for processing an exception of a vehicle-mounted terminal, as shown in fig. 1, including:
step S1: when the vehicle-mounted terminal detects that the interaction timeout occurs to the cards entering the field, acquiring a card value and a card interaction detail record library from the cards;
step S2: the vehicle-mounted terminal judges whether the card value is consistent with the value after interaction in the stored interaction timeout record corresponding to the card, if so, the step S3 is executed, otherwise, the step S5 is executed;
step S3: the vehicle-mounted terminal judges whether the card interaction detail record library is matched with the interaction overtime record, if so, the step S4 is executed, otherwise, the interaction overtime record is changed into an abnormal interaction record, and the current interaction with the card is executed;
step S4: the vehicle-mounted terminal acquires the interactive authentication response data from the card, judges whether the interactive overtime record is valid or not according to the interactive authentication response data, if so, stores the interactive verification code in the interactive authentication response data into the interactive overtime record, changes the interactive overtime record into a normal interactive record, ends the current interaction with the card, otherwise, changes the interactive overtime record into an abnormal interactive record, and executes the current interaction with the card;
step S5: the vehicle-mounted terminal judges whether the card interaction detail record library is matched with the interaction timeout record or not, if yes, the vehicle-mounted terminal acquires the interaction verification code from the safety control module, stores the interaction verification code into the interaction timeout record, changes the interaction timeout record into the normal interaction record and ends the current interaction with the card; otherwise, the interaction overtime record is changed into an abnormal interaction record, and the current interaction with the card is executed.
Preferably, in this embodiment, before step S1, the method further includes:
step A1: when the vehicle-mounted terminal detects that the card enters the field, judging whether the card is legal or not, if so, executing the step A2, otherwise, terminating the current interaction with the card;
specifically, in this embodiment, step a1 includes:
step A11: when the vehicle-mounted terminal detects that the card enters the field, sending an application selection instruction to the card;
step A12: when the vehicle-mounted terminal receives application selection response data returned by the card, analyzing the application selection response data to obtain information file data;
step A13: the vehicle-mounted terminal judges whether the card issuing mechanism code in the information file data is correct or not, judges whether the card issuing mechanism code in the information file data is in a white list or not, judges whether the application type identifier in the information file data is a first preset value or not, judges whether the card issuing mechanism application version in the information file data is a second preset value or not, if yes, step A2 is executed, otherwise, the current interaction with the card is terminated;
step A2: and the vehicle-mounted terminal judges whether the application in the card is available or not, if so, the step S1 is executed, and if not, the current interaction with the card is terminated.
Specifically, in this embodiment, step a2 includes: the in-vehicle terminal determines whether the application activation date in the information file data is earlier than the local date and determines whether the application effective date in the information file data is later than the local date, if yes, step S1 is executed, otherwise, the process is ended.
Optionally, the step a2 and the step S1 in this embodiment further include: and the vehicle-mounted terminal judges whether the interaction timeout occurs to the card, if so, the step S1 is executed, otherwise, the current interaction with the card is executed.
Specifically, the step of judging whether the interaction timeout occurs on the card by the vehicle-mounted terminal comprises the following steps: and the vehicle-mounted terminal judges whether the interaction overtime record of the card is stored or not and judges whether the card application serial number in the information file data is matched with the card application serial number in the interaction overtime record or not, if so, the interaction overtime of the card occurs, otherwise, the interaction overtime of the card does not occur.
Specifically, the current interaction between the execution and the card in this embodiment includes:
step B1: the vehicle-mounted terminal sends an initialization interaction instruction to the card, and when initialization interaction response data returned by the card are received, the initialization interaction response data are analyzed to obtain a card value, a random number and a card interaction serial number;
step B2: the vehicle-mounted terminal sends the random number and the card interaction serial number to the safety control module and receives the MAC1 returned by the safety control module and the vehicle-mounted terminal interaction serial number;
step B3: the vehicle-mounted terminal takes the current date and time as the interaction date and the interaction time, generates an interaction instruction according to the MAC1, the interaction date and the interaction time, and sends the interaction instruction to the card;
step B4: the vehicle-mounted terminal judges whether the interactive response data returned by the card is received or not, if so, the interactive response data is analyzed to obtain MAC2, the MAC2 is sent to the safety control module for verification, the current interaction with the card is terminated, otherwise, the card interaction serial number is updated, the interaction timeout record corresponding to the card is generated according to the updated card interaction serial number and is stored in the temporary storage area, the interaction failure is reminded, and the current interaction with the card is ended;
the interaction timeout recording includes: the method comprises the steps that card application serial numbers, preset interaction types, card interaction serial numbers, interaction numerical values, pre-interaction numerical values, post-interaction numerical values, preset vehicle-mounted terminal numbers, vehicle-mounted terminal interaction serial numbers returned by a safety control module, interaction states, and interaction dates and interaction times in interaction instructions in information file data;
the updating of the card interaction sequence number specifically comprises the following steps: and adding 1 to the card interaction serial number in the initialization interaction response data.
Optionally, the step B2 and the step B3 include:
step C1: the vehicle-mounted terminal judges the interaction type, if the interaction type is composite interaction, the step C2 is executed, and if the interaction type is common interaction, the step B3 is executed;
step C2: the vehicle-mounted terminal sends an update file command to the card, and step B3 is executed when the successful response data of the update file returned by the card is received;
the file update command specifically includes: the command of updating the public transport variable-length recording file and the command of updating the card public transport process cyclic recording file, wherein the successful response data of the updated file comprises the following data: the method comprises the following steps of (1) recording a public transportation variable length file and a card public transportation process cycle record file;
the interaction timeout recording further comprises: the system comprises a preset city code, a card issuing organization code in information file data, a random number in initialization interactive response data, the current driving direction of the vehicle-mounted terminal, the current station number and the driving mileage of the vehicle-mounted terminal.
Specifically, in this embodiment, obtaining the card value and the card interaction detail record library from the card includes:
step D1: the vehicle-mounted terminal respectively sends a card value acquisition instruction and an interaction detail record acquisition instruction to the card;
step D2: and the vehicle-mounted terminal respectively analyzes the acquired card numerical value response data and the acquired interaction detail record response data returned by the card to obtain a card numerical value and an interaction detail record library.
Specifically, step S3 in this embodiment includes:
and the vehicle-mounted terminal judges whether the card interaction serial number in the interaction timeout record stored in the temporary storage area is consistent with the card interaction serial number in the latest interaction detail record in the interaction detail record library or not and judges whether the vehicle-mounted terminal number in the interaction timeout record is consistent with the vehicle-mounted terminal number in the latest interaction detail record in the interaction detail record library or not, if yes, step S4 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction timeout record in the temporary storage area is cleared, and the current interaction with the card is executed.
Specifically, step S4 in this embodiment includes:
step S41: the vehicle-mounted terminal acquires an interactive authentication instruction according to the card interactive sequence number in the interactive overtime record stored in the temporary storage area and sends the interactive authentication instruction to the card;
step S42: the vehicle-mounted terminal judges whether the acquired interactive authentication response data returned by the card is received, if so, the step S43 is executed, and if not, the step S47 is executed;
step S43: the vehicle-mounted terminal analyzes and acquires the interactive authentication response data to obtain the MAC2 and the interactive verification code, sends the MAC2 to the safety control module, judges whether verification success response data returned by the safety control module are received or not, if yes, executes the step S44, otherwise executes the step S45;
step S44: the vehicle-mounted terminal stores the interaction verification code into an interaction timeout record in the temporary storage area, modifies the interaction timeout record in the temporary storage area into a normal interaction record and stores the normal interaction record into a formal storage area, clears the interaction timeout record in the temporary storage area and finishes the current interaction with the card;
step S45: the vehicle-mounted terminal calculates an interactive verification code instruction according to the interactive numerical value, the interactive type, the vehicle-mounted terminal number, the vehicle-mounted terminal interactive serial number, the interactive date and the interactive time in the interactive overtime record, sends the interactive verification code instruction to the safety control module, and receives and stores the interactive verification code returned by the safety control module;
step S46: the vehicle-mounted terminal judges whether the received interactive verification code is consistent with the interactive verification code obtained by analyzing and obtaining the interactive authentication response data, if so, the interactive verification code is stored into an interactive overtime record in a temporary storage area, the interactive overtime record in the temporary storage area is modified into a normal interactive record and is stored into a formal storage area, the interactive overtime record in the temporary storage area is cleared, the current interaction with the card is ended, otherwise, the interactive overtime record in the temporary storage area is modified into an abnormal interactive record and is stored into the formal storage area, the interactive overtime record in the temporary storage area is cleared, and the current interaction with the card is executed;
step S47: and the vehicle-mounted terminal calculates an interactive verification code instruction according to the interactive numerical value, the interactive type, the vehicle-mounted terminal number, the vehicle-mounted terminal interactive serial number, the interactive date and the interactive time in the interactive timeout record and sends the interactive verification code instruction to the safety control module, receives and stores the interactive verification code returned by the safety control module, stores the interactive verification code into the interactive timeout record in the temporary storage area, modifies the interactive timeout record in the temporary storage area into a normal interactive record and stores the normal interactive record into a formal storage area, clears the interactive timeout record in the temporary storage area, and ends the current interaction with the card.
Specifically, the step of determining, by the vehicle-mounted terminal in this embodiment, whether the card interaction detail record library matches the interaction timeout record includes:
step S51: the vehicle-mounted terminal judges whether the card interaction serial number in the interaction timeout record stored in the temporary storage area is in the interaction detail record library, if so, the interaction detail record corresponding to the card interaction serial number is obtained from the interaction detail record library, and step S52 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction timeout record in the temporary storage area is cleared, and the current interaction with the card is executed;
step S52: the vehicle-mounted terminal judges whether the vehicle-mounted terminal number in the interaction timeout record is consistent with the vehicle-mounted terminal number in the acquired interaction detail record or not and judges whether the interaction time in the interaction timeout record is consistent with the interaction time in the acquired interaction detail record or not, if yes, step S53 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction timeout record in the temporary storage area is cleared, and the current interaction with the card is executed;
the acquiring of the interactive verification code from the security control module in step S5 in this embodiment includes: and the vehicle-mounted terminal calculates an interactive verification code instruction according to the interactive numerical value, the interactive type, the vehicle-mounted terminal number, the vehicle-mounted terminal interactive sequence number, the interactive date and the interactive time in the interactive overtime record, sends the interactive verification code instruction to the safety control module, and receives and stores the interactive verification code returned by the safety control module.
Optionally, in this embodiment, between step S1 and step S2, the method further includes: the vehicle-mounted terminal judges the interaction type in the stored interaction timeout record, if the interaction type is common interaction, the step S2 is executed, and if the interaction type is composite interaction, the step T1 is executed;
step T1: the vehicle-mounted terminal sends an instruction for acquiring the variable length record file in the public transportation process to the card; when the response data of the variable length recording file in the public transportation process returned by the card is received, analyzing the response data of the variable length recording file in the public transportation process to obtain a variable length recording file in the public transportation process, and executing the step S2;
step S3 includes:
step S31: the vehicle-mounted terminal judges whether the card interaction serial number in the interaction timeout record stored in the temporary storage area is consistent with the card interaction serial number in the latest interaction detail record in the interaction detail record library, if so, the step S32 is executed, otherwise, the step S51 is executed;
step S32: the vehicle-mounted terminal judges whether the vehicle-mounted terminal number in the interaction timeout record is consistent with the vehicle-mounted terminal number in the latest interaction detail record in the interaction detail record library or not and judges whether the interaction state in the interaction timeout record is consistent with the interaction state in the public transport variable length record file or not, if yes, step S4 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction timeout record in the temporary storage area is cleared, and the current interaction with the card is executed;
the steps between the step S53 and the step S54 include:
step F1: the vehicle-mounted terminal sends an instruction for acquiring a loop record file of the public transportation process to the card;
step F2: when the vehicle-mounted terminal receives the public transportation process cycle record file response data returned by the card, analyzing the public transportation process cycle file response data to obtain a public transportation process cycle file;
step F3: the vehicle-mounted terminal judges whether a record matched with both the interaction time in the interaction overtime record and the vehicle-mounted terminal number is found in the public process traffic cycle record file, if so, the found public process traffic cycle record is obtained, and the step F4 is executed, otherwise, the interaction overtime record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction overtime record in the temporary storage area is cleared, and the current interaction with the card is executed;
step F4: and the vehicle-mounted terminal judges whether the interaction state in the acquired public process traffic cycle record is consistent with the interaction state in the interaction overtime record or not and judges whether the post-interaction numerical value in the public process traffic cycle record is consistent with the post-interaction numerical value in the interaction overtime record or not, if so, the step S54 is executed, otherwise, the interaction overtime record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction overtime record in the temporary storage area is cleared, and the current interaction with the card is executed.
The embodiment of the invention provides a vehicle-mounted terminal exception handling method, when a vehicle-mounted terminal is normally interacted with other cards and a previous off-site card enters the vehicle again, the vehicle-mounted terminal compares an interaction verification code, and when the comparison is successful, a last interaction result can be restored, so that the user experience is improved.
Example two
An embodiment of the present invention provides a method for processing an exception of a vehicle-mounted terminal, as shown in fig. 2 to 4, including:
step 201: when the vehicle-mounted terminal detects that the card enters the field, sending an application selection instruction to the card;
for example, the application selection instruction is 00 a 4040008 a 000000632010105;
step 202: the vehicle-mounted terminal judges whether application selection response data returned by the card is received, if so, step 203 is executed, otherwise, the current interaction with the card is terminated;
step 203: the vehicle-mounted terminal analyzes the application selection response data returned by the card to obtain information file data, judges whether the card issuing mechanism code in the information file data is correct or not, if so, executes the step 204, otherwise, terminates the current interaction with the card;
in this embodiment, the information file data includes: card issuing organization code, application type identification, card issuing organization application version, card application serial number, application enabling date and application effective date;
specifically, judging whether the card issuing mechanism code in the information file data correctly includes: judging whether the card issuing mechanism code length accords with the preset length and judging whether the last 4 bytes of the card issuing mechanism code are a third preset value, if so, judging that the card issuing mechanism code is correct, otherwise, judging that the card issuing mechanism code is incorrect;
specifically, the preset length is 8 bytes, and the third preset value is FFFFFFFF;
for example, the information file data is
01131121FFFFFFFF02010310491020000000705720160816204012310000;
Wherein 01131121FFFFFFFF is an issuer code; 02 is application type identification; 01 is the application version of the card issuing organization; 03104910200000007057 is the card application serial number; 20160816 is application launch date; 20401231 is the effective date of application;
step 204: the vehicle-mounted terminal judges whether the card issuing mechanism code in the information file data is in a white list, if so, the step 205 is executed, otherwise, the current interaction with the card is terminated;
step 205: the vehicle-mounted terminal judges whether the application type identifier in the information file data is a first preset value, if so, step 206 is executed, otherwise, the current interaction with the card is terminated;
specifically, the first preset value is 0x 02;
step 206: the vehicle-mounted terminal judges whether the card issuing mechanism application version in the information file data is a second preset value, if so, step 207 is executed, otherwise, the current interaction with the card is terminated;
specifically, the second preset value is 0x 01;
step 207: the vehicle-mounted terminal judges whether the card application serial number in the information file data is in a blacklist, if so, the current interaction with the card is terminated, and if not, the step 208 is executed;
step 208: the vehicle-mounted terminal judges whether the application is available, if so, step 209 is executed, otherwise, the current interaction with the card is terminated;
specifically, in this embodiment, step 208 specifically includes:
the vehicle-mounted terminal judges whether the application starting date in the information file data is earlier than the local date and judges whether the application effective date in the information file data is later than the local date; if yes, the application is available, step 209 is executed, otherwise, the application is unavailable, and the current interaction with the card is terminated;
step 209: the vehicle-mounted terminal judges whether the interaction timeout occurs to the card, if so, step 216 is executed, otherwise, step 210 is executed;
optionally, in this embodiment, the step of determining, by the vehicle-mounted terminal, whether the interaction timeout occurs to the card specifically includes: the vehicle-mounted terminal judges whether an interaction overtime record of the card is stored or not and judges whether the card application serial number of the card is matched with the card application serial number in the interaction overtime record or not, if yes, the card is subjected to interaction overtime, otherwise, the card is not subjected to interaction overtime;
optionally, in this embodiment, the number of the interaction timeout records may be one or more;
step 210: the vehicle-mounted terminal sends an initialization interaction instruction to the card;
for example, the initialize Interactive instruction is 805003020B 01000000C 84131000000010F;
step 211: the vehicle-mounted terminal judges whether the initialized interactive response data returned by the card is received, if so, the initialized interactive response data is analyzed to obtain a card value, a random number and a card interactive serial number, the random number and the card interactive serial number are sent to the safety control module, the MAC1 returned by the safety control module and the vehicle-mounted terminal interactive serial number are received, the step 212 is executed, and if not, the current interaction with the card is finished;
for example, when the vehicle-mounted terminal receives the initialization interactive response data returned by the card, the initialization interactive response data is analyzed to obtain 0000FE7F215A0000000100BBE32DB0, wherein 0000FE7F is a card value; 215A is the card interaction number; 000000 is overdraft limit; 01 is the cipher algorithm version number; 00 is a key identification; BBE32DB0 is a random number;
for example, sending the random number and the card interaction serial number to the security control module is 8070000024 BB E32D B0215A 000000C 8092021012613252401910200000007701131121 FF FF FF FF FF FF FF 08; wherein, the 6 th to 9 th bytes BBE32DB0 are random numbers; bytes 10-11, 215A, are card interaction serial numbers;
for example, the interaction sequence number of the MAC1 and the vehicle-mounted terminal returned by the receiving security control module is 000015786CCAB570, where 6CCAB570 is MAC1, and 00001578 is the interaction sequence number of the vehicle-mounted terminal;
step 212: the vehicle-mounted terminal judges the interaction type, if the interaction type is composite interaction, step 213 is executed, and if the interaction type is common interaction, step 214 is executed;
specifically, in this embodiment, the vehicle-mounted terminal determines the interaction type according to a preset identifier, if the preset identifier is a first identifier, the interaction is a composite interaction (i.e., the card needs to be swiped twice for one interaction, i.e., the card needs to be swiped for both getting on and getting off), and if the preset identifier is a second identifier, the interaction is a normal interaction (i.e., the card needs to be swiped for one interaction, i.e., the card needs to be swiped for only getting on the vehicle);
step 213: the vehicle-mounted terminal sends a file updating command to the card, and when receiving the successful response data of the file updating returned by the card, the vehicle-mounted terminal executes step 214;
optionally, in this embodiment, the file update command in step 213 specifically includes: updating a public transport variable-length recording file command and a card public transport process cyclic recording file command;
for example, the command of updating the public transportation variable length recording file is 80 DC 02D 08027027D 010100000000000000157802100103412710 FF 1234035512F 256334567543234000041310000000000012021010414245000001388 AB 100103412710 FF 1234035512F 25633456754323400000000413100000001202101261324000000C 80008000000000000000000000000000000000000000000000000000000000000;
for example, the update card public transportation process cycle record file command is 80 DC 00F 03004000031000000010203550012100000000C 80000 FD B720126132524100103412710 FF 000000000000;
step 214: the vehicle-mounted terminal takes the current date and time as the interaction date and the interaction time, generates an interaction instruction according to the MAC1, the interaction date and the interaction time, and sends the interaction instruction to the card;
for example, the MAC1 is 6C CA B570, the current date and time of the vehicle-mounted terminal is 20210126132524, and an interaction instruction generated according to the MAC1, the interaction date and the interaction time is 805401000F 00001578202101261325246C CA B57008;
step 215: the vehicle-mounted terminal judges whether the interactive response data returned by the card is received or not, if so, the interactive response data is analyzed to obtain MAC2, the MAC2 is sent to the safety control module for verification, the current interaction with the card is ended, otherwise, an interactive overtime record corresponding to the current card is generated and stored in a temporary storage area, the interaction failure is reminded, and the current interaction with the card is ended;
specifically, when the vehicle-mounted terminal does not receive the interactive response data returned by the card, generating and storing an interactive overtime record corresponding to the current card; the interaction timeout recording includes: the method comprises the steps that card application serial numbers, preset interaction types, card interaction serial numbers (obtained by adding one to the card interaction serial numbers obtained by analyzing and initializing interaction response data), interaction numerical values, pre-interaction numerical values, post-interaction numerical values, preset vehicle-mounted terminal numbers, vehicle-mounted terminal interaction serial numbers returned by a safety control module, interaction states, interaction verification codes, and interaction dates and interaction times in interaction instructions in information file data;
the card value obtained by analyzing the initialized interactive response data is used as a pre-interactive value;
if the interaction type is normal interaction, the interaction value is a fixed value, for example, 3 or 5; the interaction state is fixed as 00;
if the interaction type is composite interaction, acquiring an interaction state according to the public transportation variable length record file, and if the interaction state is 01, setting the interaction value to be 0; when the interaction state is 02, calculating an interaction value according to the public transportation variable length record file;
subtracting the interaction value from the pre-interaction value to serve as a post-interaction value;
further, if the interaction type is a composite interaction, the interaction timeout record further includes: the method comprises the steps of presetting a city code, a card issuing organization code in information file data, analyzing a random number obtained by initializing interactive response data, the current driving direction of the vehicle-mounted terminal, the current station number and the driving mileage of the vehicle-mounted terminal;
if the interaction type is common interaction, the driving mileage is 00;
if the interaction type is composite interaction, when the interaction state is 01, the driving mileage is 00; when the interaction state is 02, calculating the driving mileage according to the public transportation variable length record file;
for example, the interaction timeout is recorded as 100101131121 FF FF 0310491020000000705709000000C 80000 FE7F 0000 FD B720210126 BB E32D B0215B 000000004131000000010000157813252402 AB 120008;
where 1001 is a city code; 01131121FF FF FF is an issuer code; 03104910200000007057 is the card application serial number; 09 is an interaction type, representing a composite interaction; 000000C8 is interactive numerical value; 0000FE7F pre-interaction value; 0000 FD B7 post interaction value; 20210126 is the date of interaction; BB E32D B0 is a random number; 215B is the card interaction number; 00000000 is an interactive verification code; 413100000001 is the serial number of the vehicle-mounted terminal; 00001578 is the interactive serial number of the vehicle terminal; 132524 is the interaction time; 02 is an interactive state; AB is the driving direction; 12 is the site number; 0008 is the mileage traveled;
step 216: the vehicle-mounted terminal acquires the corresponding interaction timeout record and executes step 217;
step 217: the vehicle-mounted terminal sends a card value acquisition instruction to the card;
for example, the get card value command is 805C 030204;
step 218: the vehicle-mounted terminal judges whether card value response data returned by the card is received or not, if yes, step 219 is executed, and if not, the current interaction with the card is finished;
step 219: the vehicle-mounted terminal analyzes the acquired card numerical value response data to obtain a card numerical value, and step 220 is executed;
for example, the vehicle-mounted terminal analyzes and acquires card numerical value response data to obtain a card numerical value of 0000 FD B7;
step 220: the vehicle-mounted terminal sends an instruction for acquiring the interaction detail record to the card;
specifically, in this embodiment, the vehicle-mounted terminal obtains the latest ten interaction detail records of the card;
for example, when the instruction to acquire the interaction detail record is 00B 201C 400; the representative obtains a latest interaction detail record; when the acquired interaction detail recording instruction is 00B 202C 400; representing when the instruction for obtaining the interaction detail record is 00B 210C 400 by obtaining the penultimate interaction detail record … …; representing to obtain a tenth reciprocal interaction detail record;
step 221: the vehicle-mounted terminal judges whether the response data of the interaction detail record returned by the card is received, if so, step 222 is executed, otherwise, the current interaction with the card is finished;
step 222: the vehicle-mounted terminal analyzes and obtains the interactive detail record response data to obtain an interactive detail record;
specifically, the interaction detail record in this embodiment includes:
wherein, the latest interaction detail record is a card interaction serial number, overdraft limit, interaction value, interaction type (including common and composite interactions), vehicle-mounted terminal number, interaction date and interaction time;
215B000000000000C80941310000000120210126132524;
wherein 215B is a card interaction serial number; 000000 is overdraft limit; 000000C8 is interactive numerical value; 09 is an interaction type, representing a composite interaction; 413100000001 is the serial number of the vehicle-mounted terminal; 20210126 is the date of interaction, 132524 is the time of interaction;
step 223: the vehicle-mounted terminal judges the interaction type in the interaction timeout record, if the interaction type is common interaction, step 224 is executed, and if the interaction type is composite interaction, step 238 is executed;
step 224: the vehicle-mounted terminal judges whether the card value is equal to the post-interaction value in the interaction timeout record, if so, step 225 is executed, otherwise, step 234 is executed;
step 225: the vehicle-mounted terminal judges whether the card interaction serial number in the interaction timeout record is consistent with the card interaction serial number in the latest one of the interaction detail records, if so, step 226 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction timeout record in the temporary storage area is cleared, and step 210 is executed;
step 226: the vehicle-mounted terminal judges whether the vehicle-mounted terminal number in the interaction timeout record is consistent with the vehicle-mounted terminal number in the latest one of the interaction detail records, if so, the step 227 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction timeout record in the temporary storage area is cleared, and the step 210 is executed;
step 227: the vehicle-mounted terminal acquires an interactive authentication instruction according to the card interactive sequence number in the interactive overtime record and sends the interactive authentication instruction to the card;
in this embodiment, the card performs corresponding operations after receiving the instruction for obtaining the interactive authentication, and returns response data for successfully obtaining the interactive authentication to the vehicle-mounted terminal;
step 228: the vehicle-mounted terminal judges whether the acquired interactive authentication response data returned by the card is received, if so, step 229 is executed, and if not, step 233 is executed;
step 229: the vehicle-mounted terminal analyzes and acquires the interactive authentication response data to obtain MAC2 and an interactive verification code, sends MAC2 to the safety control module, judges whether verification success response data returned by the safety control module are received, if yes, executes step 230, otherwise executes step 231;
specifically, the security module in this embodiment may be a security chip disposed in the vehicle-mounted terminal;
optionally, in this embodiment, after sending the MAC2 to the security control module, the method further includes: the security module verifies MAC 2:
step A1: the safety control module calculates to obtain MAC2 according to the stored interaction numerical value, interaction type, vehicle-mounted terminal number, interaction date and interaction time;
step A2: the safety control module judges whether the calculated MAC2 is equal to the MAC2 in the acquired interactive authentication response data, if so, the safety control module returns verification success response data to the vehicle-mounted terminal, and otherwise, the safety control module returns verification failure response data to the vehicle-mounted terminal;
step 230: the vehicle-mounted terminal stores the interaction verification code into an interaction timeout record in the temporary storage area, modifies the interaction timeout record in the temporary storage area into a normal interaction record and stores the normal interaction record into a formal storage area, clears the interaction timeout record in the temporary storage area and finishes the current interaction with the card;
step 231: the vehicle-mounted terminal calculates an interactive verification code instruction according to the interactive numerical value, the interactive type, the vehicle-mounted terminal number, the vehicle-mounted terminal interactive serial number, the interactive date and the interactive time in the interactive overtime record, sends the interactive verification code instruction to the safety control module, and receives and stores the interactive verification code returned by the safety control module;
step 232: the vehicle-mounted terminal judges whether the received interactive verification code is consistent with the interactive verification code obtained by analyzing and obtaining the interactive authentication response data, if so, the interactive verification code is stored into an interactive overtime record in a temporary storage area, the interactive overtime record in the temporary storage area is modified into a normal interactive record and is stored into a formal storage area, the interactive overtime record in the temporary storage area is cleared, the current interaction with the card is ended, otherwise, the interactive overtime record in the temporary storage area is modified into an abnormal interactive record and is stored into the formal storage area, the interactive overtime record in the temporary storage area is cleared, and the step 210 is executed;
specifically, in this embodiment, the security control module receives an interactive verification code calculation instruction, calculates an interactive verification code according to the stored secret key, the interactive numerical value, the interactive type, the vehicle-mounted terminal number, the vehicle-mounted terminal interactive sequence number, the interactive date and the interactive time in the interactive verification code calculation instruction, and returns the calculated interactive verification code to the vehicle-mounted terminal;
step 233: the vehicle-mounted terminal calculates an interactive verification code instruction according to the interactive numerical value, the interactive type, the vehicle-mounted terminal number, the vehicle-mounted terminal interactive serial number, the interactive date and the interactive time in the interactive timeout record and sends the interactive verification code instruction to the safety control module, receives and stores the interactive verification code returned by the safety control module, stores the interactive verification code into the interactive timeout record in the temporary storage area, modifies the interactive timeout record in the temporary storage area into a normal interactive record and stores the normal interactive record into a formal storage area, clears the interactive timeout record in the temporary storage area, and ends the current interaction with the card;
step 234: the vehicle-mounted terminal judges whether the card interaction serial number in the interaction timeout record is in the interaction detail record table, if so, the interaction detail record corresponding to the card interaction serial number is obtained, step 235 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction timeout record in the temporary storage area is cleared, and step 210 is executed;
step 235: the vehicle-mounted terminal judges whether the vehicle-mounted terminal number in the interaction timeout record is consistent with the vehicle-mounted terminal number in the acquired interaction detail record, if so, step 236 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction timeout record in the temporary storage area is cleared, and step 210 is executed;
step 236: the vehicle-mounted terminal judges whether the interaction time in the interaction timeout record is consistent with the interaction time in the acquired interaction detail record, if so, the step 237 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction timeout record in the temporary storage area is cleared, and the step 210 is executed;
step 237: the vehicle-mounted terminal calculates an interactive verification code instruction according to the interactive numerical value, the interactive type, the vehicle-mounted terminal number, the vehicle-mounted terminal interactive serial number, the interactive date and the interactive time in the interactive timeout record and sends the interactive verification code instruction to the safety control module, receives and stores the interactive verification code returned by the safety control module, stores the interactive verification code into the interactive timeout record in the temporary storage area, modifies the interactive timeout record in the temporary storage area into a normal interactive record and stores the normal interactive record into a formal storage area, clears the interactive timeout record in the temporary storage area, and ends the current interaction with the card;
step 238: the vehicle-mounted terminal sends an instruction for acquiring the variable length record file in the public transportation process to the card;
for example, the instruction for obtaining the variable length record file in the public transportation process is 00B 202D 400;
step 239: the vehicle-mounted terminal judges whether the response data of the variable length recording file in the public transportation process returned by the card is received, if so, the step 240 is executed, otherwise, the current interaction with the card is ended;
step 240: the vehicle-mounted terminal analyzes the response data of the public transportation process variable length recording file to obtain a public transportation process variable length recording file, and a step 241 is executed;
for example, the public transportation process variable length recording file is
27 02 7D 01 01 00 00 00 00 00 00 00 15 78 02 10 01 03 41 27 10 FF FF FF FF 12 34 03 55 12 F2 56 33 45 67 54 32 34 00 00 41 31 00 00 00 01 20 21 01 04 14 24 50 00 00 13 88 AB 10 01 03 41 27 10 FF FF FF FF 12 34 03 55 12 F2 56 33 45 67 54 32 34 00 00 41 31 00 00 00 01 20 21 01 26 13 25 24 00 00 00 C8 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00;
Wherein, the 15 th byte 02 is an interactive state;
step 241: the vehicle-mounted terminal judges whether the card value is equal to the post-interaction value in the interaction timeout record, if so, step 242 is executed, otherwise, step 252 is executed;
step 242: the vehicle-mounted terminal judges whether the card interaction serial number in the interaction timeout record is consistent with the card interaction serial number in the latest interaction detail record, if so, the step 243 is executed, and if not, the step 252 is executed;
step 243: the vehicle-mounted terminal judges whether the vehicle-mounted terminal number in the interaction timeout record is consistent with the vehicle-mounted terminal number in the latest interaction detail record, if so, step 244 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction timeout record in the temporary storage area is cleared, and step 210 is executed;
step 244: the vehicle-mounted terminal judges whether the interaction state in the interaction timeout record is consistent with the interaction state in the public transportation variable length record file, if so, step 245 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction timeout record in the temporary storage area is cleared, and step 210 is executed;
step 245: the vehicle-mounted terminal acquires an interactive authentication instruction according to the card interactive sequence number in the interactive overtime record and sends the interactive authentication instruction to the card;
for example, the card interaction serial number in the interaction timeout record is 215B, and the acquisition interaction authentication instruction composed of the card interaction serial number in the interaction timeout record is 805 a 000602215B 08;
step 246: the vehicle-mounted terminal judges whether the acquired interactive authentication response data returned by the card is received, if so, step 247 is executed, and if not, step 251 is executed;
step 247: the vehicle-mounted terminal analyzes and acquires the interactive authentication response data to obtain MAC2 and an interactive verification code, sends MAC2 to the safety control module, judges whether verification success response data returned by the safety control module are received, if yes, executes step 248, otherwise executes step 249;
for example, the vehicle-mounted terminal analyzes and acquires the interactive authentication response data to obtain DC1BEA8DA6177B 5E; wherein DC1BEA8D is MAC2, A6177B5E is mutual authentication code;
optionally, in this embodiment, after sending the MAC2 to the security control module, the method further includes: the security module verifies MAC 2:
step A1: the safety control module calculates to obtain MAC2 according to the stored interaction numerical value, interaction type, vehicle-mounted terminal number, interaction date and interaction time;
for example, the safety control module calculates to obtain that the MAC2 is DC1BEA8D according to the saved interaction value 000000C8, the interaction type 09, the vehicle-mounted terminal number 413100000001, the interaction date 20210126 and the interaction time 132524;
step A2: the safety control module judges whether the calculated MAC2 is equal to the MAC2 in the acquired interactive authentication response data, if so, the safety control module returns verification success response data to the vehicle-mounted terminal, and otherwise, the safety control module returns verification failure response data to the vehicle-mounted terminal;
step 248: the vehicle-mounted terminal stores the interaction verification code into an interaction timeout record in the temporary storage area, modifies the interaction timeout record in the temporary storage area into a normal interaction record and stores the normal interaction record into a formal storage area, clears the interaction timeout record in the temporary storage area and finishes the current interaction with the card;
step 249: the vehicle-mounted terminal calculates an interactive verification code instruction according to the interactive numerical value, the interactive type, the vehicle-mounted terminal number, the vehicle-mounted terminal interactive serial number, the interactive date and the interactive time in the interactive overtime record, sends the interactive verification code instruction to the safety control module, and receives the interactive verification code returned by the safety control module;
step 250: the vehicle-mounted terminal judges whether the received interactive verification code is consistent with the interactive verification code obtained by analyzing and obtaining the interactive authentication response data, if so, the interactive verification code is stored into an interactive overtime record in a temporary storage area, the interactive overtime record in the temporary storage area is modified into a normal interactive record and is stored into a formal storage area, the interactive overtime record in the temporary storage area is cleared, the current interaction with the card is ended, otherwise, the interactive overtime record in the temporary storage area is modified into an abnormal interactive record and is stored into the formal storage area, the interactive overtime record in the temporary storage area is cleared, and the step 210 is executed;
for example, the instruction of the vehicle-mounted terminal for calculating the interactive verification code according to the interaction value 000000C8, the interaction type 09, the vehicle-mounted terminal number 413100000001, the vehicle-mounted terminal interaction serial number 00001578, the interaction date 20210126 and the interaction time 132524 in the interaction timeout record is 80 FA 0500200000000000000000000000C 809413100000001000082021012615248000;
specifically, in this embodiment, the security control module receives an interactive verification code calculation instruction, calculates an interactive verification code according to the stored secret key, the interactive numerical value, the interactive type, the vehicle-mounted terminal number, the vehicle-mounted terminal interactive sequence number, the interactive date and the interactive time in the interactive verification code calculation instruction, and returns the calculated interactive verification code to the vehicle-mounted terminal;
step 251: the vehicle-mounted terminal calculates an interactive verification code instruction according to the interactive numerical value, the interactive type, the vehicle-mounted terminal number, the vehicle-mounted terminal interactive serial number, the interactive date and the interactive time in the interactive timeout record and sends the interactive verification code instruction to the safety control module, receives the interactive verification code returned by the safety control module, stores the interactive verification code into the interactive timeout record in the temporary storage area, modifies the interactive timeout record in the temporary storage area into a normal interactive record and stores the normal interactive record into a formal storage area, clears the interactive timeout record in the temporary storage area, and ends the current interaction with the card;
step 252: the vehicle-mounted terminal judges whether the card interaction serial number in the interaction timeout record is in the interaction detail record table, if so, the interaction detail record corresponding to the card interaction serial number is obtained, step 253 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction timeout record in the temporary storage area is cleared, and step 210 is executed;
step 253: the vehicle-mounted terminal judges whether the vehicle-mounted terminal number in the interaction timeout record is consistent with the vehicle-mounted terminal number in the acquired interaction detail record, if so, the step 254 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction timeout record in the temporary storage area is cleared, and the step 210 is executed;
step 254: the vehicle-mounted terminal judges whether the interaction time in the interaction timeout record is consistent with the interaction time in the acquired interaction detail record, if so, the step 255 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction timeout record in the temporary storage area is cleared, and the step 210 is executed;
step 255: the vehicle-mounted terminal sends an instruction for acquiring a loop record file of the public transportation process to the card;
specifically, in this embodiment, the vehicle-mounted terminal acquires the latest thirty public transportation process circulation files of the card;
for example, when the instruction for obtaining the loop record file of the public transportation process is 00B 201F 400; a representative obtains a latest circulation record file of the public transportation process; when the command of the public transportation process circulation record file is 00B 202F 400; representing the time when the instruction of obtaining the penultimate public transportation process circulation record file … … is 00B 230F 400; representing to obtain a thirty-third-from-last public transportation process cycle record file;
step 256: the vehicle-mounted terminal judges whether public transport process cycle record file response data returned by the card is received, if so, step 257 is executed, otherwise, the current interaction with the card is ended;
step 257: the vehicle-mounted terminal analyzes the response data of the public transportation process cycle file to obtain a public transportation process cycle file, and step 258 is executed;
wherein, the latest public transportation process circulation file is
0300004131000000010203550012123400000000000000005D20210104142450100103412710FFFFFFFF000000000000;
Wherein, the 1 st byte 03 is in an interactive state; the 2 nd to 9 th bytes 0000413100000001 are vehicle-mounted terminal numbers; bytes 22-25 0000005D are post-interaction values; bytes 26-32 20210104142450 are the interaction date and time;
step 258: the vehicle-mounted terminal judges whether a record matched with both the interaction time in the interaction overtime record and the vehicle-mounted terminal number is found in the public process traffic cycle record file, if so, the found public process traffic cycle record is obtained, step 259 is executed, otherwise, the interaction overtime record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction overtime record in the temporary storage area is cleared, and step 210 is executed;
step 259: the vehicle-mounted terminal judges whether the interaction state in the acquired public process traffic cycle record is consistent with the interaction state in the interaction overtime record, if so, step 260 is executed, otherwise, the interaction overtime record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction overtime record in the temporary storage area is cleared, and step 210 is executed;
step 260: the vehicle-mounted terminal judges whether the acquired post-interaction numerical value in the public process traffic cycle record is consistent with the post-interaction numerical value in the interaction overtime record, if so, step 261 is executed, otherwise, the interaction overtime record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction overtime record in the temporary storage area is cleared, and step 210 is executed;
step 261: the vehicle-mounted terminal calculates an interactive verification code instruction according to the interactive numerical value, the interactive type, the vehicle-mounted terminal number, the vehicle-mounted terminal interactive serial number, the interactive date and the interactive time in the interactive timeout record and sends the interactive verification code instruction to the safety control module, receives the interactive verification code returned by the safety control module, stores the interactive verification code into the interactive timeout record in the temporary storage area, modifies the interactive timeout record in the temporary storage area into a normal interactive record and stores the normal interactive record into a formal storage area, clears the interactive timeout record in the temporary storage area, and ends the current interaction with the card;
specifically, in this embodiment, the security control module receives an interactive verification code calculation instruction, calculates an interactive verification code according to the stored secret key, the interactive numerical value, the interactive type, the vehicle-mounted terminal number, the vehicle-mounted terminal interactive sequence number, the interactive date and the interactive time in the interactive verification code calculation instruction, and returns the calculated interactive verification code to the vehicle-mounted terminal;
optionally, in this embodiment, when the vehicle-mounted terminal receives the station switching instruction, if the interaction timeout record exists, the interaction timeout record in the temporary storage area is modified into the abnormal interaction record and is stored in the formal storage area, and the interaction timeout record in the temporary storage area is cleared.
According to the vehicle-mounted terminal exception handling method provided by the embodiment of the invention, after the vehicle-mounted terminal is normally interacted with other cards, when the card leaves the field and enters the field again, the vehicle-mounted terminal compares the interaction verification codes, and when the comparison is successful, the last interaction result can be restored, so that the user experience is improved.
Optionally, an embodiment of the present application further provides a vehicle-mounted terminal, where the vehicle-mounted terminal includes at least one processor, a memory, and an instruction stored on the memory and executable by the at least one processor, and the at least one processor executes the instruction to implement the vehicle-mounted terminal exception handling method in the foregoing embodiment. When the vehicle-mounted terminal is a chip system, the vehicle-mounted terminal may be composed of a chip, and may also include a chip and other discrete devices, which is not specifically limited in this embodiment of the present application; the chip is coupled with the memory and is used for executing the computer program stored in the memory so as to execute the vehicle-mounted terminal exception handling method disclosed in the above embodiment.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented using a software program, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs. When the computer program is loaded and run on the vehicle-mounted terminal, the vehicle-mounted terminal is enabled to execute the vehicle-mounted terminal exception handling method disclosed by the embodiment. The computer program may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one base station, vehicle-mounted terminal, server or data center to another base station, vehicle-mounted terminal, server or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by the in-vehicle terminal or may comprise one or more data storage devices such as a server, a data center, etc. that may be integrated with the medium. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others. In the embodiment of the present application, the vehicle-mounted terminal may include the foregoing device.
While the present application has been described in connection with various embodiments, other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed application, from a review of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the word "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
Although the present application has been described in conjunction with specific features and embodiments thereof, it will be evident that various modifications and combinations can be made thereto without departing from the spirit and scope of the application. Accordingly, the specification and figures are merely exemplary of the present application as defined in the appended claims and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of the present application. It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (17)

1. A vehicle-mounted terminal exception handling method is characterized by comprising the following steps:
step S1: when the vehicle-mounted terminal detects that the interaction timeout of an incoming card occurs, a card value and a card interaction detail record library are obtained from the card;
step S2: the vehicle-mounted terminal judges whether the card value is consistent with the value after interaction in the stored interaction timeout record corresponding to the card, if so, the step S3 is executed, otherwise, the step S5 is executed;
step S3: the vehicle-mounted terminal judges whether the card interaction detail record library is matched with the interaction timeout record, if so, the step S4 is executed, otherwise, the interaction timeout record is changed into an abnormal interaction record, and the current interaction with the card is executed;
step S4: the vehicle-mounted terminal acquires interactive authentication response data from the card, judges whether the interactive overtime record is valid or not according to the interactive authentication response data, if so, stores an interactive verification code in the interactive authentication response data into the interactive overtime record, changes the interactive overtime record into a normal interactive record, ends the current interaction with the card, otherwise, changes the interactive overtime record into an abnormal interactive record, and executes the current interaction with the card;
step S5: the vehicle-mounted terminal judges whether the card interaction detail record library is matched with the interaction timeout record or not, if so, an interaction verification code is obtained from a safety control module, the interaction verification code is stored in the interaction timeout record, the interaction timeout record is changed into a normal interaction record, and the current interaction with the card is finished; otherwise, changing the interaction overtime record into an abnormal interaction record, and executing the current interaction with the card.
2. The method of claim 1, further comprising, before the step S1:
step A1: when the vehicle-mounted terminal detects that a card enters a field, judging whether the card is legal or not, if so, executing the step A2, otherwise, terminating the current interaction with the card;
step A2: and the vehicle-mounted terminal judges whether the application in the card is available, if so, the step S1 is executed, and if not, the current interaction with the card is terminated.
3. The method of claim 2, wherein said step a1 comprises:
step A11: when the vehicle-mounted terminal detects that a card enters the field, sending an application selection instruction to the card;
step A12: when the vehicle-mounted terminal receives application selection response data returned by the card, analyzing the application selection response data to obtain information file data;
step A13: and the vehicle-mounted terminal judges whether the card issuing mechanism code in the information file data is correct or not, judges whether the card issuing mechanism code in the information file data is in a white list or not, judges whether the application type identifier in the information file data is a first preset value or not, judges whether the card issuing mechanism application version in the information file data is a second preset value or not, if yes, step A2 is executed, and if not, the current interaction with the card is terminated.
4. The method of claim 3, wherein said step A2 comprises: and the vehicle-mounted terminal judges whether the application starting date in the information file data is earlier than the local date and whether the application effective date in the information file data is later than the local date, if so, the step S1 is executed, otherwise, the operation is finished.
5. The method of claim 3, wherein between the step A2 and the step S1 further comprises: and the vehicle-mounted terminal judges whether the interaction timeout occurs to the card, if so, the step S1 is executed, and if not, the current interaction with the card is executed.
6. The method of claim 5, wherein the determining by the vehicle terminal whether the interaction timeout occurred for the card comprises: and the vehicle-mounted terminal judges whether an interaction overtime record of the card is stored or not and judges whether a card application serial number in the information file data is matched with a card application serial number in the interaction overtime record or not, if so, the card is subjected to interaction overtime, otherwise, the card is not subjected to interaction overtime.
7. The method of claim 3, wherein said performing a current interaction with the card comprises:
step B1: the vehicle-mounted terminal sends an initialization interaction instruction to the card, and when initialization interaction response data returned by the card are received, the initialization interaction response data are analyzed to obtain a card numerical value, a random number and a card interaction serial number;
step B2: the vehicle-mounted terminal sends the random number and the card interaction serial number to a safety control module, and receives the MAC1 returned by the safety control module and the vehicle-mounted terminal interaction serial number;
step B3: the vehicle-mounted terminal takes the current date and time as the interaction date and the interaction time, generates an interaction instruction according to the MAC1, the interaction date and the interaction time, and sends the interaction instruction to the card;
step B4: the vehicle-mounted terminal judges whether interaction response data returned by the card is received or not, if so, the interaction response data is analyzed to obtain MAC2, the MAC2 is sent to the safety control module for verification, the current interaction with the card is terminated, otherwise, the card interaction serial number is updated, an interaction timeout record corresponding to the card is generated according to the updated card interaction serial number and is stored in a temporary storage area, interaction failure is reminded, and the current interaction with the card is ended;
the interaction timeout record includes: the card application serial number, the preset interaction type, the card interaction serial number, the interaction numerical value, the pre-interaction numerical value, the post-interaction numerical value, the preset vehicle-mounted terminal number, the vehicle-mounted terminal interaction serial number returned by the safety control module, the interaction state, and the interaction date and the interaction time in the interaction instruction in the information file data;
the updating of the card interaction sequence number specifically comprises: and automatically adding 1 to the card interaction serial number in the initialization interaction response data.
8. The method of claim 7, wherein between the step B2 and the step B3 comprises:
step C1: the vehicle-mounted terminal judges the interaction type, if the interaction type is composite interaction, the step C2 is executed, and if the interaction type is common interaction, the step B3 is executed;
step C2: the vehicle-mounted terminal sends a file updating command to the card, and step B3 is executed when receiving the file updating success response data returned by the card;
the update file command specifically includes: the command of updating the public transport variable-length recording file and the command of updating the card public transport process cyclic recording file, wherein the successful response data of the updated file comprises the following data: the method comprises the following steps of (1) recording a public transportation variable length file and a card public transportation process cycle record file;
the interaction timeout record further comprises: the system comprises a preset city code, a card issuing organization code in the information file data, a random number in the initialization interactive response data, the current driving direction of the vehicle-mounted terminal, the current station number and the driving mileage of the vehicle-mounted terminal.
9. The method of claim 1, wherein said obtaining a library of card values and card interaction details from said card comprises:
step D1: the vehicle-mounted terminal respectively sends a card value acquisition instruction and an interaction detail record acquisition instruction to the card;
step D2: and the vehicle-mounted terminal respectively analyzes the acquired card numerical value response data and the acquired interaction detail record response data returned by the card to obtain a card numerical value and an interaction detail record library.
10. The method of claim 1, wherein the step S3 includes:
and the vehicle-mounted terminal judges whether the card interaction serial number in the interaction timeout record stored in the temporary storage area is consistent with the card interaction serial number in the latest interaction detail record in the interaction detail record library and judges whether the vehicle-mounted terminal number in the interaction timeout record is consistent with the vehicle-mounted terminal number in the latest interaction detail record in the interaction detail record library, if so, the step S4 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction timeout record in the temporary storage area is cleared, and the current interaction with the card is executed.
11. The method of claim 1, wherein the step S4 includes:
step S41: the vehicle-mounted terminal acquires an interactive authentication instruction according to the card interactive sequence number in the interactive overtime record stored in the temporary storage area and sends the interactive authentication instruction to the card;
step S42: the vehicle-mounted terminal judges whether the acquired interactive authentication response data returned by the card is received, if so, the step S43 is executed, otherwise, the step S47 is executed;
step S43: the vehicle-mounted terminal analyzes the acquired interactive authentication response data to obtain MAC2 and an interactive verification code, sends the MAC2 to a safety control module, judges whether verification success response data returned by the safety control module are received or not, if yes, executes a step S44, otherwise executes a step S45;
step S44: the vehicle-mounted terminal stores the interaction verification code into an interaction timeout record in the temporary storage area, modifies the interaction timeout record in the temporary storage area into a normal interaction record and stores the normal interaction record into a formal storage area, clears the interaction timeout record in the temporary storage area and finishes the current interaction with the card;
step S45: the vehicle-mounted terminal calculates an interactive verification code instruction according to the interactive numerical value, the interactive type, the vehicle-mounted terminal number, the vehicle-mounted terminal interactive serial number, the interactive date and the interactive time in the interactive overtime record, sends the interactive verification code instruction to the safety control module, and receives and stores the interactive verification code returned by the safety control module;
step S46: the vehicle-mounted terminal judges whether the received interactive verification code is consistent with the interactive verification code obtained by analyzing the acquired interactive authentication response data, if so, the interactive verification code is stored into an interactive overtime record in the temporary storage area, the interactive overtime record in the temporary storage area is modified into a normal interactive record and is stored into a formal storage area, the interactive overtime record in the temporary storage area is cleared, the current interaction with the card is ended, otherwise, the interactive overtime record in the temporary storage area is modified into an abnormal interactive record and is stored into the formal storage area, the interactive overtime record in the temporary storage area is cleared, and the current interaction with the card is executed;
step S47: and the vehicle-mounted terminal calculates an interactive verification code instruction according to the interactive numerical value, the interactive type, the vehicle-mounted terminal number, the vehicle-mounted terminal interactive serial number, the interactive date and the interactive time in the interactive overtime record and sends the interactive verification code instruction to a safety control module, receives and stores the interactive verification code returned by the safety control module, stores the interactive verification code into the interactive overtime record in the temporary storage area, modifies the interactive overtime record in the temporary storage area into a normal interactive record and stores the normal interactive record into a formal storage area, clears the interactive overtime record in the temporary storage area, and ends the current interaction with the card.
12. The method according to claim 1, wherein the step S5 of the vehicle-mounted terminal determining whether the card interaction detail record library matches with the interaction timeout record comprises:
step S51: the vehicle-mounted terminal judges whether a card interaction serial number in an interaction timeout record stored in a temporary storage area is in the interaction detail record library, if so, an interaction detail record corresponding to the card interaction serial number is obtained from the interaction detail record library, and a step S52 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction timeout record in the temporary storage area is cleared, and the current interaction with the card is executed;
step S52: and the vehicle-mounted terminal judges whether the vehicle-mounted terminal number in the interaction timeout record is consistent with the vehicle-mounted terminal number in the acquired interaction detail record or not and judges whether the interaction time in the interaction timeout record is consistent with the interaction time in the acquired interaction detail record or not, if so, the step S53 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into the abnormal interaction record and is stored in the formal storage area, the interaction timeout record in the temporary storage area is cleared, and the current interaction with the card is executed.
13. The method of claim 1, wherein the step S5 of obtaining the mutual authentication code from the security control module comprises: and the vehicle-mounted terminal calculates an interactive verification code instruction according to the interactive numerical value, the interactive type, the vehicle-mounted terminal number, the vehicle-mounted terminal interactive sequence number, the interactive date and the interactive time in the interactive overtime record, sends the interactive verification code instruction to the safety control module, and receives and stores the interactive verification code returned by the safety control module.
14. The method of claim 12, wherein between the step S1 and the step S2 further comprising: the vehicle-mounted terminal judges the interaction type in the stored interaction timeout record, if the interaction type is common interaction, the step S2 is executed, and if the interaction type is composite interaction, the step T1 is executed;
step T1: the vehicle-mounted terminal sends a command for acquiring a variable length record file in the public transportation process to the card; when the response data of the public transportation process variable length recording file returned by the card is received, analyzing the response data of the public transportation process variable length recording file to obtain a public transportation process variable length recording file, and executing the step S2;
the step S3 includes:
step S31: the vehicle-mounted terminal judges whether the card interaction serial number in the interaction timeout record stored in the temporary storage area is consistent with the card interaction serial number in the latest interaction detail record in the interaction detail record library, if so, the step S32 is executed, otherwise, the step S51 is executed;
step S32: the vehicle-mounted terminal judges whether the vehicle-mounted terminal number in the interaction timeout record is consistent with the vehicle-mounted terminal number in the latest interaction detail record in the interaction detail record library or not and judges whether the interaction state in the interaction timeout record is consistent with the interaction state in the public transport variable length record file or not, if yes, step S4 is executed, otherwise, the interaction timeout record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction timeout record in the temporary storage area is cleared, and the current interaction with the card is executed;
between the step S53 and the step S54:
step F1: the vehicle-mounted terminal sends an instruction for acquiring a loop record file of the public transportation process to the card;
step F2: when the vehicle-mounted terminal receives the response data of the public transportation process circulation record file returned by the card, analyzing the response data of the public transportation process circulation file to obtain a public transportation process circulation file;
step F3: the vehicle-mounted terminal judges whether a record matched with both the interaction time in the interaction overtime record and the vehicle-mounted terminal number is found in the public process traffic cycle record file, if so, the found public process traffic cycle record is obtained, and the step F4 is executed, otherwise, the interaction overtime record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction overtime record in the temporary storage area is cleared, and the current interaction with the card is executed;
step F4: and the vehicle-mounted terminal judges whether the acquired interaction state in the public process traffic cycle record is consistent with the interaction state in the interaction overtime record or not and judges whether the post-interaction numerical value in the public process traffic cycle record is consistent with the post-interaction numerical value in the interaction overtime record or not, if so, the step S54 is executed, otherwise, the interaction overtime record in the temporary storage area is modified into an abnormal interaction record and is stored in a formal storage area, the interaction overtime record in the temporary storage area is cleared, and the current interaction with the card is executed.
15. An in-vehicle terminal, characterized in that the in-vehicle terminal comprises at least one processor, a memory and instructions stored on the memory and executable by the at least one processor, and the at least one processor executes the instructions to implement the in-vehicle terminal exception handling method according to any one of claims 1 to 14.
16. A computer-readable storage medium, characterized in that the computer-readable storage medium includes a computer program that, when run on a vehicle-mounted terminal, causes the vehicle-mounted terminal to execute the vehicle-mounted terminal abnormality processing method according to any one of claims 1 to 14.
17. A chip, wherein the chip is coupled with a memory, and is configured to execute a computer program stored in the memory to perform the vehicle-mounted terminal exception handling method according to any one of claims 1 to 14.
CN202110469683.5A 2021-04-29 2021-04-29 Vehicle-mounted terminal exception handling method and vehicle-mounted terminal Active CN112990402B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110469683.5A CN112990402B (en) 2021-04-29 2021-04-29 Vehicle-mounted terminal exception handling method and vehicle-mounted terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110469683.5A CN112990402B (en) 2021-04-29 2021-04-29 Vehicle-mounted terminal exception handling method and vehicle-mounted terminal

Publications (2)

Publication Number Publication Date
CN112990402A CN112990402A (en) 2021-06-18
CN112990402B true CN112990402B (en) 2021-08-31

Family

ID=76340579

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110469683.5A Active CN112990402B (en) 2021-04-29 2021-04-29 Vehicle-mounted terminal exception handling method and vehicle-mounted terminal

Country Status (1)

Country Link
CN (1) CN112990402B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105022976A (en) * 2015-07-27 2015-11-04 飞天诚信科技股份有限公司 Method and device for reading record in smart card

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103794000B (en) * 2012-10-31 2017-04-19 中国银联股份有限公司 Method for processing in case of non-contact IC card data reading failure and device for implementing method
CN105590367B (en) * 2015-05-11 2019-12-24 中国银联股份有限公司 Processing method for transaction abnormity of IC card and acceptance terminal for realizing processing method
CN106780994A (en) * 2016-11-24 2017-05-31 深圳市久通物联科技股份有限公司 The compatible design system and method for all-purpose card and Unionpay's IC-card in bus card-reading terminal
CN108846469A (en) * 2018-06-28 2018-11-20 中国建设银行股份有限公司 Financial IC card exchange method, device and readable storage medium storing program for executing
CN109598502A (en) * 2018-11-28 2019-04-09 珠海市珠海通科技有限公司 A kind of bus card settlement of transactions management system and its method
CN112037416A (en) * 2020-09-04 2020-12-04 海南海岛聚讯科技有限公司 Bus payment method, system, bus charging equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105022976A (en) * 2015-07-27 2015-11-04 飞天诚信科技股份有限公司 Method and device for reading record in smart card

Also Published As

Publication number Publication date
CN112990402A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
JP6929496B2 (en) Identity registration method and device
CN109561085B (en) Identity verification method based on equipment identification code, server and medium
US8959606B2 (en) Key updating method and system thereof
US6839840B1 (en) Authenticating method between a smart card and a terminal
JPH11506560A (en) How to safely put commands on a smart card
US20040230810A1 (en) Method, system and computer program product for multiple biometric template screening
EP1223565A1 (en) Transaction system, portable device, terminal and methods of transaction
JPH11506240A (en) How to securely change smart card data
US20220327192A1 (en) Secure password entry method and system
JP4815912B2 (en) IC card, IC card program
KR20110033119A (en) Method for providing a service based on tag information, and corresponding tag and tag reading device
CN111130602B (en) Near field communication card data writing system, method, device and medium
EP2175428A2 (en) Semiconductor element, biometric authentication method, biometric authentication system and mobile terminal
WO2018233314A1 (en) Electronic device, ivr voice payment method, and computer-readable storage medium
CN112990402B (en) Vehicle-mounted terminal exception handling method and vehicle-mounted terminal
KR101077975B1 (en) Method of generating fuzzy vault based on biometric information and verifying user's indentification using fuzzy vault
CN111314322A (en) Account encryption method and account authentication method
US7415615B2 (en) Method and system for user authentication in a digital communication system
CN113207105B (en) V2X anonymous communication method, device, electronic equipment and storage medium
US11640597B2 (en) Method of managing an emergency mode transaction procedure, and an associated device
JP2007141113A (en) Ic card having biometrics authentication function and ic card program
CN110740043B (en) Intelligent key device and verification method thereof
CN109741492B (en) IC card unlocking-based duration method and device
CN110059474B (en) PIN code modification method and device
JP2004234041A (en) Fingerprint matching device

Legal Events

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