CN109658105B - Method and card capable of configuring log recording - Google Patents

Method and card capable of configuring log recording Download PDF

Info

Publication number
CN109658105B
CN109658105B CN201811607365.5A CN201811607365A CN109658105B CN 109658105 B CN109658105 B CN 109658105B CN 201811607365 A CN201811607365 A CN 201811607365A CN 109658105 B CN109658105 B CN 109658105B
Authority
CN
China
Prior art keywords
data
preset
transaction
module
card
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
CN201811607365.5A
Other languages
Chinese (zh)
Other versions
CN109658105A (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 CN201811607365.5A priority Critical patent/CN109658105B/en
Publication of CN109658105A publication Critical patent/CN109658105A/en
Application granted granted Critical
Publication of CN109658105B publication Critical patent/CN109658105B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/405Establishing or using transaction specific rules
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/407Cancellation of a transaction
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/409Device specific authentication in transaction processing
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/42Confirmation, e.g. check or permission by the legal debtor of payment

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Control Of Vending Devices And Auxiliary Devices For Vending Devices (AREA)

Abstract

The invention discloses a method and a card capable of configuring a log record, and relates to the field of communication; the method comprises the following steps: the card updates preset indicating data according to a first instruction sent by the terminal; judging the transaction type according to the indication data, and executing corresponding operation according to the judged transaction type result; when the judged transaction type result is online transaction, whether online is successful is judged according to an authorization code in a second instruction sent by the terminal, and when online is judged to be successful, corresponding operation is executed according to the judgment result; and when the online failure is judged, judging whether to reject the transaction according to the request data, the authorization code, the preset first data and the preset behavior data in the second instruction, and executing corresponding operation according to the judgment result of whether to reject the transaction. The invention provides a method and a card capable of configuring log recording, and an issuer can flexibly, variously and configurable log recording.

Description

Method and card capable of configuring log recording
Technical Field
The invention relates to the field of communication, in particular to a method and a card capable of configuring a log record.
Background
The bank card is a credit payment instrument issued by a commercial bank (including a postal financial institution) to the society and having all or part of functions of consuming credit, transferring account, depositing and withdrawing cash, and the like. Currently, when a transaction is performed, a bank card issued by the chinese union of bank records a transaction log including transaction time, transaction amount, payment receiving and paying unit, etc. only when the transaction is approved (the transaction log is a literal record of the relevant data of the transaction achieved in the exchange). However, with the development of economy and technology, the situation of recording transaction logs only when transaction is approved has failed to meet the requirements of card issuers for flexible, diversified and configurable recording of transaction logs.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a method and a card capable of configuring a log record.
The invention provides a method capable of configuring log recording, which comprises the following steps:
step S1: when a card receives a first instruction sent by a terminal, the card carries out risk management according to the first instruction and updates preset indicating data;
step S2: the card judges the transaction type according to the indication data, and when the transaction type is online transaction, returns a transaction response to the terminal, and executes the step S3; when the transaction type is offline rejection, performing step S6; when the transaction type is offline approval, performing step S7;
step S3: when the card receives a second instruction sent by the terminal, the card judges whether the online is successful according to the authorization code in the second instruction, if so, the step S4 is executed; otherwise, updating indication data according to the second instruction, judging the transaction type according to the indication data, and executing the step S6 when the transaction type is offline rejection; when the transaction type is offline approval, performing step S7;
step S4: the card judges whether to reject the transaction according to the request data, the authorization code, the preset first data and the preset behavior data in the second instruction, if yes, the step S6 is executed; otherwise, executing step S5;
step S5: the card judges whether an online approved transaction log needs to be recorded according to preset behavior data, if so, the online approved transaction log is recorded, a transaction response is returned to the terminal, and the process is finished; otherwise, directly returning a transaction response to the terminal, and ending;
step S6: the card judges whether a transaction log rejecting the transaction needs to be recorded according to preset behavior data, if so, the transaction log rejecting the transaction is recorded, a transaction response is returned to the terminal, and the process is finished; otherwise, directly returning a transaction response to the terminal, and ending;
step S7: the card judges whether an offline approved transaction log needs to be recorded or not according to preset behavior data, if so, the offline approved transaction log is recorded, a transaction response is returned to the terminal, and the process is finished; otherwise, directly returning the transaction response to the terminal, and ending.
The invention also provides a card capable of configuring a log record, which comprises a first receiving module, a first updating module, a first judging module, a second judging module, a first record returning module, a first returning module, a third judging module, a second record returning module, a second returning module, a third returning module, a second receiving module, a fourth judging module, a second updating module, a fifth judging module, a sixth judging module, a seventh judging module, a third record returning module and a fourth returning module;
the first receiving module is used for receiving a first instruction sent by the terminal;
the first updating module is used for carrying out risk management and updating preset indicating data according to the first instruction received by the first receiving module;
the first judging module is used for judging the transaction type according to the indication data updated by the first updating module;
the second judging module is used for judging whether a transaction log rejecting the transaction needs to be recorded according to preset behavior data when the first judging module judges that the transaction type is offline rejection;
the first record returning module is used for recording a transaction log rejecting the transaction when the second judging module judges that the transaction log is positive, returning a transaction response to the terminal and ending;
the first returning module is used for returning a transaction response to the terminal and ending when the second judging module judges that the transaction response is negative;
the third judging module is used for judging whether a transaction log needing to be recorded for offline approval or not according to preset behavior data when the first judging module judges that the transaction type is offline approval;
the second record returning module is used for recording the off-line approved transaction log when the third judging module judges that the transaction log is the off-line approved transaction log, returning a transaction response to the terminal and ending the transaction;
the second returning module is used for returning a transaction response to the terminal and ending when the third judging module judges that the transaction response is negative;
the third returning module is used for returning a transaction response to the terminal when the first judging module judges that the transaction type is online transaction;
the second receiving module is used for receiving a second instruction sent by the terminal after the third returning module returns the transaction response to the terminal;
the fourth judging module is configured to judge whether the online is successful according to the authorization code in the second instruction received by the second receiving module;
the second updating module is configured to update the indication data according to the second instruction received by the second receiving module when the fourth determining module determines that the second instruction is not received;
the fifth judging module is used for judging the transaction type according to the indication data updated by the second updating module;
the second judging module is further used for judging whether a transaction log rejecting the transaction needs to be recorded according to preset behavior data when the fifth judging module judges that the transaction type is offline rejection;
the third judging module is further used for judging whether a transaction log needing to be recorded for offline approval is required or not according to preset behavior data when the fifth judging module judges that the transaction type is offline approval;
the sixth judging module is configured to, when the fourth judging module judges that the transaction is rejected, judge whether the transaction is rejected according to the request data, the authorization code, the preset first data, and the preset behavior data in the second instruction received by the second receiving module;
the second judging module is further configured to, when the sixth judging module judges that the transaction log refuses the transaction is not recorded, judge whether the transaction log refuses to be recorded according to preset behavior data;
the seventh judging module is further configured to, when the sixth judging module judges that the transaction log is not approved, judge whether the transaction log is required to be recorded for online approval according to preset behavior data;
the third record returning module is used for recording the transaction log approved by online when the seventh judging module judges that the transaction log is positive, returning a transaction response to the terminal and ending;
and the fourth returning module is used for returning a transaction response to the terminal and ending when the seventh judging module judges that the transaction response is negative.
Compared with the prior art, the invention has the following advantages: the application provides a method and a card capable of configuring log recording, and an issuer can flexibly, variously and configurable log recording.
Drawings
Fig. 1 is a flowchart of a configurable logging method according to an embodiment of the present invention;
fig. 2 is a flowchart of a configurable logging method according to a second embodiment of the present invention;
fig. 3 is a flowchart of a method for configurable logging according to a third embodiment of the present invention;
fig. 4 is a block diagram of a card capable of configuring a log according to a fourth embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
An embodiment of the present invention provides a method capable of configuring a log, as shown in fig. 1, including the following steps:
step 101: when the card receives a first instruction sent by the terminal, the card carries out risk management according to the first instruction and updates preset indicating data;
step 102: the card judges the transaction type according to the indication data, and when the transaction type is online transaction, returns a transaction response to the terminal, and executes step 103; when the transaction type is offline declined, go to step 106; when the transaction type is offline approved, step 107 is executed;
optionally, step 101 specifically includes: when the card receives a first instruction sent by the terminal, the card carries out risk management according to the first instruction and updates a preset first indication position and a preset second indication position;
correspondingly, step 102 specifically includes: the card judges the transaction type according to the first indication position and the second indication position, when the first indication position is third preset data and the second indication position is second preset data, the transaction type is online transaction, and step 103 is executed; when the first indicator bit is the second preset data, the transaction type is offline rejection, and step 106 is executed; when the first indicator bit is the third preset data and the second indicator bit is the third preset data, the transaction type is an offline approval, and step 107 is performed.
Step 103: when the card receives a second instruction sent by the terminal, the card judges whether the online is successful according to an authorization code in the second instruction, if so, the step 104 is executed; otherwise, updating the indicating data according to the risk management according to the second instruction, judging the transaction type according to the indicating data, and executing the step 106 when the transaction type is offline rejection; when the transaction type is offline approved, step 107 is executed;
optionally, in step 103, the card determines whether the online is successful according to the authorization code in the second instruction, specifically: and the card acquires fifth preset byte data serving as an authorization response code from the second instruction, and judges whether the fifth preset byte data is seventh preset data or eighth preset data, if so, the online is failed, and otherwise, the online is successful.
Optionally, in step 103, performing risk management according to the second instruction to update the indication data, determining the transaction type according to the indication data, and executing step 106 when the transaction type is offline rejection; when the transaction type is offline approval, step 107 is executed, specifically: the card carries out risk management according to the second instruction to update the first indicating position, judges the transaction type according to the first indicating position, and executes step 106 if the transaction type is offline refused when the first indicating position is nineteenth preset data; when the first indicator bit is the twentieth preset data, the transaction type is an offline approval, and step 107 is performed.
Step 104: the card judges whether to reject the transaction according to the request data, the authorization code, the preset first data and the preset behavior data in the second instruction, if yes, the step 106 is executed; otherwise, executing step 105;
optionally, step 104 specifically includes:
step 104-1: the card acquires the request data from the second instruction, judges whether to reject the transaction according to the request data, and if so, executes step 106; otherwise, executing step 104-2;
further, step 104-1 specifically includes: the card acquires sixth preset byte data serving as request data from the second instruction, judges whether the sixth preset byte data is equal to the ninth preset data or not, and executes the step 106 if the sixth preset byte data is equal to the ninth preset data; otherwise step 104-2 is performed.
Step 104-2: the card acquires an authorization response code from the second instruction, judges whether the card issuer refuses the transaction or not according to the authorization response code, and if so, executes the step 106; otherwise, executing step 104-3;
further, step 104-2 is specifically: and the card acquires fifth preset byte data serving as an authorization response code from the second instruction, and judges whether the fifth preset byte data is eleventh preset data or twelfth preset data, if so, the card issuer does not reject the transaction, and otherwise, the card issuer rejects the transaction.
Step 104-3: the card judges whether to refuse the transaction according to the preset behavior data and the preset first data, if yes, step 106 is executed; otherwise step 105 is performed.
Further, the first data comprises execution data, alternative data and interaction data;
correspondingly, step 104-3 is specifically: the card judges whether to refuse the transaction according to the preset behavior data, the preset execution data, the optional data and the interactive data, if yes, step 106 is executed; otherwise, executing step 105;
still further, step 104-3 includes:
step 104-3-0: the card inquires interactive data, judges whether the interactive data is preset interactive data, if yes, the step 105 is executed; otherwise, step 104-3-1;
step 104-3-1: the card inquires the execution data, and when the execution data is thirteenth preset data, step 104-3-2 is executed; when the execution data is the fourteenth preset data, executing step 104-3-3;
step 104-3-2: the card judges whether the seventh preset byte data in the preset behavior data is the fifteenth preset data, if yes, the transaction is refused, and step 106 is executed; otherwise, executing step 105;
step 104-3-3: the card inquires the optional data, judges whether the optional data is preset optional data, if so, executes step 104-3-4; otherwise, executing step 105;
step 104-3-4: the card judges whether the seventh preset byte data in the preset behavior data is the sixteenth preset data, if so, the transaction is refused, and step 106 is executed; otherwise step 105 is performed.
Step 105: the card judges whether the transaction log of online approval needs to be recorded according to the preset behavior data, if so, the transaction log of online approval is recorded, a transaction response is returned to the terminal, and the operation is finished; otherwise, directly returning a transaction response to the terminal, and ending;
optionally, step 105 specifically includes: the card judges whether the eighth preset byte data in the preset behavior data is seventeenth preset data, if yes, the transaction log approved by online is recorded, a transaction response is returned to the terminal, and the process is finished; otherwise, directly returning the transaction response to the terminal, and ending.
Step 106: the card judges whether a transaction log rejecting the transaction needs to be recorded according to preset behavior data, if so, the transaction log rejecting the transaction is recorded, a transaction response is returned to the terminal, and the process is finished; otherwise, directly returning a transaction response to the terminal, and ending;
optionally, step 106 specifically includes: the card judges whether the ninth preset byte data in the preset behavior data is equal to the eighteenth preset data, if so, a transaction log rejecting the transaction needs to be recorded, the transaction log rejecting the transaction is recorded, a transaction response is returned to the terminal, and the operation is finished; otherwise, directly returning the transaction response to the terminal, and ending.
Step 107: the card judges whether an offline approved transaction log needs to be recorded or not according to preset behavior data, if so, the offline approved transaction log is recorded, a transaction response is returned to the terminal, and the process is finished; otherwise, directly returning the transaction response to the terminal, and ending.
Optionally, step 107 specifically includes: the card judges whether the tenth preset byte data in the preset behavior data is equal to the twenty-first preset data, if so, the card records an offline approved transaction log, returns a transaction response to the terminal and ends; otherwise, directly returning the transaction response to the terminal, and ending.
Optionally, the method in this embodiment further includes step D: when the card receives an updating instruction sent by the terminal, the card analyzes the updating instruction to obtain data to be updated and a first MAC value; judging whether the preset behavior data can be updated or not according to the data to be updated, the first MAC value and the preset second data, if so, updating the behavior data according to the data to be updated, returning a data updating success response to the terminal, and ending; otherwise, returning the warning information to the terminal, and ending.
Further, the second data in this embodiment includes a preset subkey, a count value of the current transaction counter, preset execution data, and current script data;
correspondingly, step D specifically is: when the card receives an updating instruction sent by the terminal, the card analyzes the updating instruction to obtain data to be updated and a first MAC value; judging whether the preset behavior data can be updated or not according to the data to be updated, the preset sub-key, the count value of the current transaction counter, the preset execution data, the current script data and the first MAC value, if so, updating the behavior data according to the data to be updated, returning a data updating success response to the terminal, and ending; otherwise, returning the warning information to the terminal, and ending;
further, step D in this embodiment specifically includes:
step A1: when the card receives an updating instruction sent by the terminal, the card analyzes the updating instruction to obtain data to be updated and a first MAC value; judging whether external authentication is performed according to preset execution data, if so, executing the step A2; otherwise, executing step A3;
further, step a1 specifically includes: when the card receives an updating instruction sent by the terminal, the card analyzes the updating instruction to obtain data to be updated; judging whether the thirty second preset byte data in the preset execution data is the thirty second preset data, if so, executing the step A2; otherwise, step a3 is performed.
Step A2: the card judges whether the external authentication fails according to preset execution data, if so, warning information is returned to the terminal, and the operation is finished; otherwise, executing step A3;
further, step a2 specifically includes: the card judges whether the thirty-third preset byte data in the preset execution data is the thirty-third preset data, if so, the card returns warning information to the terminal, and the operation is finished; otherwise, step a3 is performed.
Step A3: the card acquires current script data, judges whether a script command can be changed or not according to the script data, and if so, executes the step A4; otherwise, returning warning information to the terminal, and ending;
further, step a3 specifically includes: the card acquires a script failure indication bit, the script failure indication bit is used as current script data, whether the script failure indication bit is thirty-fourth preset data or not is judged, if yes, warning information is returned to the terminal, and the operation is finished; otherwise the script command can be modified and step a4 is performed.
Step A4: the card acquires the count value of the current transaction counter, and generates a second MAC value according to the preset sub-key, the count value and the data to be updated;
further, step a4 specifically includes: the card acquires the count value of the transaction counter, encrypts the count value by using a preset sub-key to generate a process key, and encrypts the data to be updated by using the process key to generate a second MAC value.
Step A5: the card judges whether the first MAC value is equal to the second MAC value, if so, the card returns a data updating success response to the terminal according to the data updating behavior data to be updated, and the operation is finished; otherwise, returning the warning information to the terminal, and ending;
further, before step a5, the method further includes: the card determines whether the first MAC value is not null, if so, step a5 is executed; otherwise, setting the script data as a script command which can not be changed, returning warning information to the terminal, and ending.
Further, step a5 specifically includes: the card acquires data after thirty-fifth preset byte data in the data to be updated as a first MAC value, judges whether the first MAC value is equal to a second MAC value, if so, returns a data updating success response to the terminal according to the data updating behavior data to be updated, and ends; otherwise, returning the warning information to the terminal, and ending.
Example two
An embodiment of the present invention provides a method capable of configuring a log, as shown in fig. 2, including the following steps:
step 201: when the card receives an updating instruction sent by the terminal, the card analyzes the updating instruction to obtain data to be updated and a first MAC value;
optionally, before step 201, the method further includes:
step 200-1: when the card receives a selection instruction sent by the terminal, the card executes selection operation according to the selection instruction and returns a selection response to the terminal;
for example, the select instruction includes 14 bytes, which is 0x00A4040008A 00000033301010100;
the selection response comprises 107 bytes, which are 0x6F698408a000000333010101a55D500B50424F43204372656469748701019F38219F66049F02069F03069F1a0295055F2a029a039C019F37049F33039F4E149F7a015F2D087a68656E667264659F1101019F120F4341524420494D4147452030303031BF0C059F4D020B 0A;
step 200-2: when the card receives a processing option acquisition instruction sent by the terminal, the card executes processing option acquisition operation according to the processing option acquisition instruction, and returns a processing option acquisition response to the terminal;
for example, the get processing options instruction includes 65 bytes, which is 0x80a800003B8339560000000000000000010000000000000156000000000001561601010001020304E0E 8C7ECB7E1B0FCD7D3C6CCD4C2CCB3B5EA 202020200000;
the get processing options response includes 20 bytes, which is 0x80125C 0008010200080505011003070020010100;
step 200-3: when the card receives a reading and recording instruction sent by the terminal, the card executes reading and recording operation according to the reading and recording instruction and returns a reading and recording response to the terminal;
for example, the read record command includes 5 bytes, which is 0x00B2010C 00;
the read record response comprises 45 bytes, which is 0x702C57116228000100001117D301220101234567899F1F 163031303230333033530363037303930413042;
step 200-4: when the card receives a third instruction sent by the terminal, the card executes operation of processing the third instruction according to the third instruction and returns a first generated ciphertext response to the terminal;
for example, the third instruction includes 38 bytes, which is 0x80AE 800020000000000001000000000000015600000000000156160101120000000102030400;
the first generated ciphertext response comprises 32 bytes, which is 0x801E8000011DFE9CFF1AEAA63707010103a41000010a010000000000B10B 8922;
step 200-5: when the card receives a fourth instruction sent by the terminal, the card executes fourth instruction processing operation according to the fourth instruction and returns a second generated ciphertext response to the terminal;
optionally, this step is preceded by: when the card receives a first authentication instruction sent by the terminal, the card executes operation of processing the first authentication instruction according to the first authentication instruction, and returns a first authentication response to the terminal;
for example, the first authentication response includes 15 bytes, which is 0x008200000ADF55EF2585E0680C 3030;
the fourth instruction comprises 40 bytes, which is 0x80AE 4000223030000000000000000100000000015600000000000156160101120000000102030400;
the second generated ciphertext response comprises 32 bytes, which is 0x801E400001C6F8F6D575CACF4807010103641000010a010000000000B10B 8922;
the update instruction comprises 13 bytes, which is 0x04DA9F5208424000015a16D 852;
the data to be updated comprises 4 bytes which are 0x 42400001;
step 202: the card judges whether external authentication is executed according to preset execution data, if so, step 203 is executed, otherwise, step 204 is executed;
optionally, the step specifically includes: the card judges whether external authentication is executed according to thirty-second preset byte data in preset execution data, if so, step 203 is executed, otherwise, step 204 is executed;
more specifically, the steps are as follows: the card judges whether the thirty second preset byte data in the preset execution data is judged to be the thirty second preset data, if so, the step 203 is executed, otherwise, the step 204 is executed;
for example, the thirty-second preset byte data includes 1 byte, which is 0x 01;
the thirty-second preset data includes 1 byte, which is 0x 01;
step 203: the card judges whether the external authentication fails according to the execution data, if so, step 205 is executed, otherwise, step 204 is executed;
optionally, the step specifically includes: the card judges whether the external authentication fails according to thirty-third preset byte data in preset execution data, if so, step 205 is executed, otherwise, step 204 is executed;
more specifically, the steps are as follows: the card judges whether the thirty-third preset byte data in the preset execution data is the thirty-third preset data, if so, the step 205 is executed, otherwise, the step 204 is executed;
for example, the thirty-third preset byte data includes 1 byte, which is 0x 01;
the thirty-third preset data includes 1 byte, which is 0x 01;
step 204: the card acquires current script data, judges whether a script command can be changed or not according to the script data, if so, executes step 206, otherwise, executes step 205;
optionally, the step specifically includes: the card judges and obtains the current script data, judges whether the script data is the thirty-fourth preset data, if yes, executes step 205, otherwise, the script command can be changed, and executes step 206;
more specifically, the steps are as follows: the card acquires a script failure indication bit, the script failure indication bit is used as current script data, whether the script failure indication bit is thirty-fourth preset data or not is judged, if yes, step 205 is executed, and if not, a script command can be changed, and step 206 is executed;
for example, the script data includes 1 byte, which is 0x 01;
the script failure indication bit comprises 1 byte, and is 0x 01;
the thirty-fourth preset data includes 1 byte, which is 0x 01;
step 205: the card returns warning information to the terminal, and the process is finished;
for example, the warning information includes 2 bytes, which is 0x 6985;
step 206: the card judges whether the data to be updated has a safety message, if so, the step 208 is executed, otherwise, the step 207 is executed;
optionally, the step specifically includes: the card judges whether the length of data after the thirty-fifth preset byte data in the data to be updated is equal to the first preset length, if so, the step 208 is executed, otherwise, the step 207 is executed;
for example, the thirty-fifth preset byte data includes 4 bytes, which is 0x5a16D 852;
the first preset length comprises 1 byte and is 0x 04;
step 207: setting the script data as script command incapable of being changed by the card, and executing step 205;
optionally, the step specifically includes: setting the script data to thirty-fourth preset data by the card, and returning to the step 205;
more specifically, the steps are as follows: the card sets a preset script failure indication bit as thirty-fourth preset data, and returns to step 205;
step 208: the card acquires the count value of the current transaction counter, and generates a second MAC value according to the preset sub-key, the acquired count value of the transaction counter and the data to be updated;
optionally, the step specifically includes: the card acquires the count value of the transaction counter, encrypts the count value of the transaction counter by using a preset sub-key to generate a process key, and encrypts the data to be updated by using the process key to generate a second MAC value;
in this embodiment, the count value of the transaction counter represents the number of the transaction counters initiated by the card receiving terminal, and the value of the transaction counter is increased by 1 every time the terminal initiates a transaction;
for example, the count value of the transaction counter includes 2 bytes, which is 0x 0001;
the subkey comprises 8 bytes, which is 0x8B4F854F0831FBF2635a212E4DDDB 92A;
the procedure key comprises 8 bytes, which is 0x7E4FB244a76D4DC23F773F939DB4D 299;
the second MAC value comprises 1 byte, which is 0x5a16D 852;
step 209: the card judges whether the first MAC value is equal to the second MAC value, if so, the step 210 is executed, otherwise, the step 207 is returned to;
optionally, the step specifically includes: the card acquires data after thirty-fifth preset byte data in the data to be updated as a first MAC value, judges whether the first MAC value is equal to a second MAC value, if so, executes the step 210, otherwise, returns to the step 207;
for example, the second MAC value comprises 4 bytes, which is 0x5a16D 852;
step 210: the card updates the behavior data according to the data to be updated, returns a data updating success response to the terminal, and ends;
optionally, the step specifically includes: the card acquires the front second preset length data in the data to be updated, updates the behavior data by using the second preset length data, returns a data updating success response to the terminal, and ends;
for example, the second preset-length data includes 4 bytes, which is 0x 42400001;
the data update success response includes 2 bytes, which is 0x 9000.
EXAMPLE III
An embodiment of the present invention provides a method capable of configuring a log, as shown in fig. 3, including the following steps:
step 301: when the card receives a first instruction sent by the terminal, the card acquires first state data from the first instruction, judges whether the format of the first instruction is correct or not according to the first state data, if so, executes the step 302, otherwise, returns warning information to the terminal;
optionally, the step specifically includes: when the card receives a first instruction sent by the terminal, the card acquires first preset byte data serving as first state data from the first instruction, judges whether the format of the first instruction is correct or not according to the first preset byte data, if so, executes the step 302, otherwise, returns warning information to the terminal;
more specifically, when the card receives a first instruction sent by the terminal, the card acquires first preset byte data serving as first state data from the first instruction, judges whether the first preset byte data is the first preset data, if so, the first instruction format is correct, and executes step 302, otherwise, the first instruction format is incorrect, and returns warning information to the terminal;
optionally, before step 301, further comprising:
step 300-1: when the card receives a selection instruction sent by the terminal, the card executes selection operation according to the selection instruction and returns a selection response to the terminal;
for example, the select instruction includes 14 bytes, which is 0x00A4040008A 00000033301010100;
the selection response comprises 107 bytes, which are 0x6F698408a000000333010101a55D500B50424F43204372656469748701019F38219F66049F02069F03069F1a0295055F2a029a039C019F37049F33039F4E149F7a015F2D087a68656E667264659F1101019F120F4341524420494D4147452030303031BF0C059F4D020B 0A;
step 300-2: when the card receives a processing option acquisition instruction sent by the terminal, the card executes processing option acquisition operation according to the processing option acquisition instruction, and returns a processing option acquisition response to the terminal;
for example, the get processing options instruction includes 65 bytes, which is 0x80a800003B8339560000000000000000010000000000000156000000000001561601010001020304E0E 8C7ECB7E1B0FCD7D3C6CCD4C2CCB3B5EA 202020200000;
the get processing options response includes 20 bytes, which is 0x80125C 0008010200080505011003070020010100;
step 300-3: when the card receives a reading and recording instruction sent by the terminal, the card executes reading and recording operation according to the reading and recording instruction and returns a reading and recording response to the terminal;
for example, the read record command includes 5 bytes, which is 0x00B2010C 00;
the read record response includes 46 bytes, which is 0x702C57116228000100001117D301220101234567899F1F 163031303230333033530363037303930413042;
step 302: the card carries out risk management according to the first instruction to update a preset first indicating bit and a preset second indicating bit, judges the transaction type according to the first indicating bit and the second indicating bit, and executes the step 303 when the transaction type is offline refused; when the transaction type is offline approved, go to step 304; when the transaction type is online, go to step 305;
optionally, the step specifically includes: the card carries out risk management according to the first instruction to update a first preset indicating bit and a second preset indicating bit, judges the transaction type according to the first indicating bit and the second indicating bit, and executes step 303 if the transaction type is offline refused when the first indicating bit is second preset data; when the first indicator bit is the third preset data and the second indicator bit is the third preset data, the transaction type is offline approval, and step 304 is executed; when the first indicator bit is the third preset data and the second indicator bit is the second preset data, the transaction type is an online transaction, and step 305 is executed;
for example, the second preset data includes 1 byte, which is 0x 01;
the third preset data includes 1 byte, which is 0x 00;
step 303: the card judges whether an offline rejected transaction log needs to be recorded or not according to preset behavior data, if so, the transaction log is recorded, and the step 303-1 is executed, otherwise, the step 303-1 is executed;
optionally, the step specifically includes: the card judges whether the transaction log rejected offline needs to be recorded or not according to second preset byte data in the preset behavior data, if so, the transaction log is recorded, and the step 303-1 is executed, otherwise, the step 303-1 is executed;
more specifically, the steps are as follows: the card judges whether the offline rejected transaction log needs to be recorded or not according to second preset byte data in the preset behavior data, when the second preset byte is fourth preset data, the offline rejected transaction log needs to be recorded, the transaction log is recorded, and the step 303-1 is executed, otherwise, the step 303-1 is executed;
step 303-1: the card returns an offline rejection response to the terminal, and the process is finished;
for example, the behavior data includes 4 bytes, which is 0x 42400001;
the second preset byte data includes 1 bit and is 00;
the fourth preset data includes 1 bit, which is 01;
the offline reject response consists of 32 bytes, which is 0x801E0000010D6832074D66603907010103801000010A010000000000B10B 8922;
step 304: the card judges whether an offline approved transaction log needs to be recorded or not according to preset behavior data, if so, the transaction log is recorded, and the step 304-1 is executed, otherwise, the step 304-1 is executed;
optionally, the step specifically includes: the card judges whether an offline approved transaction log needs to be recorded according to third preset byte data in the preset behavior data, if so, the transaction log is recorded, and the step 304-1 is executed, otherwise, the step 304-1 is executed;
more specifically, the steps are as follows: the card judges whether an offline approved transaction log needs to be recorded or not according to third preset byte data in the preset behavior data, when the third preset byte is fifth preset data, the offline approved transaction log needs to be recorded, the transaction log is recorded, and the step 303-1 is executed, otherwise, the step 303-1 is executed;
step 304-1: the card returns an offline approval response to the terminal, and the process is finished;
for example, the third preset byte data includes 1 bit, which is 0;
the fifth preset data includes 1 bit, which is 1;
the offline approval response includes 32 bytes, which is 0x801E4000020677813C8373C75F07010103940000010a010000000000B3D0a 203;
step 305: the card returns an online transaction response to the terminal, and step 306 is executed;
for example, the online transaction response includes 32 bytes, which is 0x801E8000011DFE9CFF1AEAA63707010103A41000010A010000000000B10B 8922;
optionally, after the card sends the online transaction response to the terminal, the method further includes: when the card receives a second authentication instruction sent by the terminal, the card authenticates the card issuing bank through the terminal, after the authentication is successful, an authentication success response is returned to the terminal, step 306 is executed, after the authentication is failed, an authentication failure response is returned to the terminal, and the process is finished;
for example, the second authentication instruction includes 15 bytes, which is 0x008200000ADF55EF2585E0680C 3030;
the authentication success response includes 2 bytes, which is 0x 9000;
the authentication failure response includes 2 bytes, which is 0x 6300;
step 306: when the card receives a second instruction sent by the terminal, the card acquires second state data from the second instruction, and judges whether the format of the second instruction is correct according to the second state data, if so, step 307 is executed, otherwise, warning information is returned to the terminal;
optionally, the step specifically includes: when the card receives a second instruction sent by the terminal, the card acquires second state data from the second instruction, judges whether the second state data is sixth preset data, if so, the second instruction format is correct, and executes step 302, otherwise, the second instruction format is incorrect, and returns warning information to the terminal;
more specifically, when the card receives a second instruction sent by the terminal, the card acquires fourth preset byte data from the second instruction and records the fourth preset byte data as first state data, whether the fourth preset byte data is sixth preset data is judged, if yes, the first instruction format is correct, step 308 is executed, and if not, the first instruction format is incorrect, warning information is returned to the terminal;
for example, the second instruction comprises 38 bytes, which is 0x80AE 400020000000000001000000000000015600000000000156160101120000000102030400;
step 307: the card acquires an authorization code from the second instruction, judges whether the online is successful according to the authorization code, if so, executes step 308, otherwise, executes step 313;
optionally, the step specifically includes: the card acquires fifth preset byte data serving as an authorization code from the second instruction, and judges whether the online is successful according to the fifth preset byte data, if so, the step 308 is executed, and if not, the step 313 is executed;
more specifically, the steps are as follows: the card acquires fifth preset byte data serving as an authorization code from the second instruction, judges whether the fifth preset byte data is seventh preset data or eighth preset data, if not, the online is successful, executes step 308, otherwise, the online is failed, and executes step 313;
for example, the authorization code includes 2 bytes, which is 0x 3030;
the fifth preset byte data includes 2 bytes, which is 0x 0000;
the seventh preset data includes 2 bytes, which is 0x 5933;
the eighth preset data includes 2 bytes, which is 0x5a 33;
step 308: the card acquires the request data from the second instruction, judges the transaction type according to the request data, and executes step 309 when the transaction type is an approval transaction, and executes step 312 when the transaction type is a rejection transaction;
optionally, the step specifically includes: the card acquires sixth preset byte data serving as request data from the second instruction, judges the transaction type according to the sixth preset byte data, and executes step 309 when the transaction type is approval transaction and executes step 312 when the transaction type is rejection transaction;
more specifically, the steps are as follows: the card acquires sixth preset byte data serving as request data from the second instruction, judges the transaction type according to the sixth preset byte data, and executes step 309 if the transaction type is approved transaction when the sixth preset byte data is ninth preset data, and executes step 312 if the transaction type is refused transaction when the sixth preset byte data is tenth preset data;
for example, the request data includes 1 byte, which is 0x 40;
the sixth preset byte data includes 1 byte, which is 0x 40;
the ninth preset data includes 1 byte, which is 0x 40;
the tenth preset data includes 1 byte, which is 0x 00;
step 309: the card acquires an authorization code from the second instruction, judges whether the card issuer refuses the transaction according to the authorization code, if so, executes step 312, otherwise, executes step 310;
optionally, the step specifically includes: the card acquires fifth preset byte data serving as an authorization code from the second instruction, judges whether the issuer rejects the transaction according to the fifth preset byte data, if so, executes step 312, otherwise, executes step 310;
more specifically, the steps are as follows: the card acquires fifth preset byte data serving as an authorization code from the second instruction, judges whether the fifth preset byte data is eleventh preset data or twelfth preset data, otherwise, the card issuer rejects the transaction, and executes step 312, and if yes, executes step 310;
for example, the authorization code includes 2 bytes, which is 0x 3030;
the fifth preset byte data comprises 2 bytes which are 0x 3030;
the eleventh preset data includes 2 bytes, which is 0x3030 or 0x3130 or 0x 3131;
the twelfth preset data includes 2 bytes, which is 0x3031 or 0x 3032;
optionally, step 307 is replaced by: the card acquires and stores the authorization code from the second instruction, and judges whether the online is successful according to the authorization code, if so, the step 308 is executed, otherwise, the step 313 is executed;
accordingly, step 309 is replaced with: the card judges whether the issuer rejects the transaction according to the stored authorization code, if yes, step 312 is executed, otherwise step 310 is executed;
optionally, step 306 is replaced with: when the card receives a second instruction sent by the terminal, the card acquires and stores second state data and an authorization code from the second instruction, and judges whether the format of the second instruction is correct according to the second state data, if so, step 307 is executed, otherwise, warning information is returned to the terminal;
accordingly, step 307 is replaced by: the card judges whether the online is successful according to the stored authorization code, if so, the step 308 is executed, otherwise, the step 313 is executed;
accordingly, step 309 is replaced with: the card judges whether the issuer rejects the transaction according to the stored authorization code, if yes, step 312 is executed, otherwise step 310 is executed;
step 310: the card inquires execution data, optional data and interactive data, judges whether to reject the transaction according to the execution data, the optional data, the interactive data and preset behavior data, if yes, step 312 is executed, and if not, step 311 is executed;
optionally, the step specifically includes the following steps:
step 310-0: the card inquires interactive data, judges whether the interactive data is preset interactive data, if so, executes step 311, otherwise, executes step 310-1;
step 310-1: the card inquires the execution data, and when the execution data is thirteenth preset data, step 310-2 is executed; when the execution data is the fourteenth preset data, performing step 310-3;
step 310-2: the card judges whether the seventh preset byte data in the preset behavior data is a fifteenth preset number, if so, the transaction is refused, and the step 312 is executed, otherwise, the step 311 is executed;
step 310-3: the card inquires the optional data, judges whether the optional data is preset optional data, refuses the transaction if the optional data is preset optional data, and executes the step 310-4, otherwise executes the step 311;
step 310-4: the card judges whether the seventh preset byte data in the preset behavior data is the sixteenth preset number, if so, the transaction is refused, and the step 312 is executed, otherwise, the step 311 is executed;
in this embodiment, the execution data is related to whether the card authenticates the issuer through the terminal, and the execution state includes three states, where the execution successful state is when the card successfully authenticates the issuer through the terminal, the execution failed state is when the card fails to authenticate the issuer through the terminal, and the execution failed state is when the card does not authenticate the issuer through the terminal;
for example, the authorization code includes 2 bytes, which is 0x 3030;
the seventh preset byte data includes 1 bit, which is 1;
the thirteenth preset data includes 1 byte, which is 0x 01;
the fourteenth preset data includes 1 byte, which is 0x 02;
the preset interactive data comprises 1 bit and is 1;
the preset option data includes 1 byte, which is 0x 80;
step 311: the card judges whether an online approved transaction log needs to be recorded according to preset behavior data, if so, the transaction log is recorded, and the step 311-1 is executed, otherwise, the step 311-1 is executed;
optionally, the step specifically includes: the card judges whether an online approved transaction log needs to be recorded according to eighth preset byte data in the preset behavior data, if so, the transaction log is recorded, and the step 311-1 is executed, otherwise, the step 311-1 is executed;
more specifically, the steps are as follows: the card judges whether an online approved transaction log needs to be recorded or not according to eighth preset byte data in the preset behavior data, when the eighth preset byte data is seventeenth preset data, the online approved transaction log needs to be recorded, the transaction log is recorded, and the step 311-1 is executed, otherwise, the step 311-1 is executed;
step 311-1: the card returns an online approval response to the terminal, and the operation is finished;
for example, the eighth preset byte data includes bits, which are 0;
the seventeenth preset data includes 1 bit, which is 1;
the online grant response includes 32 bytes, which is 0x801E4000020677813C8373C75F07010103940000010A010000000000B3D0A 203;
step 312: the card judges whether a transaction log rejecting the transaction needs to be recorded or not according to preset behavior data, if so, the transaction log is recorded, and step 312-1 is executed, otherwise, step 312-1 is executed;
optionally, the step specifically includes: the card judges whether a transaction log rejecting the transaction needs to be recorded according to ninth preset byte data in the preset behavior data, if so, the transaction log is recorded, and the step 312-1 is executed, otherwise, the step 312-1 is executed;
more specifically, the steps are as follows: the card judges whether a transaction log rejecting the transaction needs to be recorded or not according to ninth preset byte data in the preset behavior data, when the ninth preset byte data is eighteenth preset data, the transaction log rejecting the transaction needs to be recorded, the transaction log is recorded, and the step 311-1 is executed, otherwise, the step 311-1 is executed;
step 312-1: the card returns a transaction refusal response to the terminal, and the transaction refusal response is ended;
for example, the ninth preset byte data includes 1 bit, which is 0;
the eighteenth preset data includes 1 bit, which is 1;
the deny transaction response includes 32 bytes, which is 0x801E0000013000251ED6D798F707010103201400010A010000000000B10B 8922;
step 313: the card carries out risk management according to a second instruction to update a first indication position, judges the transaction type according to the first indication position, executes step 312 when the transaction type is offline rejection, and executes step 314 when the transaction type is offline approval;
optionally, the step specifically includes: the card carries out risk management according to a second instruction to update a first indicating position, judges the transaction type according to the first indicating position, refuses the transaction type offline when the first indicating position is nineteenth preset data, executes step 312, approves the transaction type offline when the first indicating position is twentieth preset data, and executes step 314;
for example, the nineteenth preset data includes 1 byte, which is 0x 01;
the twentieth preset data includes 1 byte, which is 0x 00;
step 314: the card judges whether an offline approved transaction log needs to be recorded or not according to preset behavior data, if so, the transaction log is recorded, and the step 314-1 is executed, otherwise, the step 314-1 is executed;
optionally, the step specifically includes: the card judges whether an offline approved transaction log needs to be recorded according to tenth preset byte data in the preset behavior data, if so, the transaction log is recorded, and the step 314-1 is executed, otherwise, the step 314-1 is executed;
more specifically, the steps are as follows: the card judges whether an offline approved transaction log needs to be recorded or not according to a tenth preset byte in the preset behavior data, when the tenth preset byte is twenty-first preset data, the offline approved transaction log needs to be recorded, the transaction log is recorded, and the step 314-1 is executed, otherwise, the step 314-1 is executed;
step 314-1: the card returns an offline approval response to the terminal, and the process is finished;
for example, the tenth preset byte data includes 1 bit, which is 0;
the twenty-first preset data includes 1 bit, which is 1;
the offline approval response includes 32 bytes, which is 0x801E400001E12D5FAE8D50EF3907010103601400010a010000000000B10B 8922;
the behavior data (Application Default Action) in this embodiment is preset in the card when the issuer issues the card;
the risk management in the present embodiment refers to a series of operations of updating the instruction data performed by the card in order to determine the transaction type, wherein one operation updates the instruction data individually or a plurality of operations update the instruction data together.
Example four
A card capable of configuring a log record is provided in the fourth embodiment of the present invention, as shown in fig. 4, and includes a first receiving module 401, a first updating module 402, a first determining module 403, a second determining module 404, a first record returning module 405, a first returning module 406, a third determining module 407, a second record returning module 408, a second returning module 409, a third returning module 410, a second receiving module 411, a fourth determining module 412, a second updating module 413, a fifth determining module 414, a sixth determining module 415, a seventh determining module 416, a third record returning module 417, and a fourth returning module 418;
a first receiving module 401, configured to receive a first instruction sent by a terminal;
a first updating module 402, configured to perform risk management updating on preset indication data according to the first instruction received by the first receiving module 401;
a first judging module 403, configured to judge a transaction type according to the indication data updated by the first updating module 402;
optionally, in this example, the first updating module 402 is specifically configured to perform risk management according to the first instruction received by the first receiving module 401 to update the preset first indication bit and the preset second indication bit;
correspondingly, the first determining module 403 is specifically configured to determine the transaction type according to the first indicator bit and the second indicator bit updated by the first updating module 402, and when the first indicator bit is the third preset data and the second indicator bit is the second preset data, the transaction type is an online transaction, and the third returning module 410 is triggered; when the first indicator bit is second preset data, the transaction type is offline rejection, and a second judgment module 404 is triggered; when the first indicator bit is the third preset data and the second indicator bit is the third preset data, the transaction type is offline approval, and the third determining module 407 is triggered.
A second judging module 404, configured to, when the first judging module 403 judges that the transaction type is offline rejection, judge whether a transaction log for rejecting the transaction needs to be recorded according to preset behavior data;
the first record returning module 405 is configured to, when the second determining module 404 determines that the transaction is rejected, record a transaction log of the rejected transaction, return a transaction response to the terminal, and end;
a first returning module 406, configured to, when the second determining module 404 determines that the transaction response is negative, return the transaction response to the terminal, and end;
a third judging module 407, configured to, when the first judging module 403 judges that the transaction type is offline approval, judge whether to record an offline approved transaction log according to preset behavior data;
the second record returning module 408 is configured to record the offline approved transaction log when the third determining module 407 determines that the transaction log is yes, return a transaction response to the terminal, and end the process;
a second returning module 409, configured to, when the third determining module 407 determines that the transaction response is negative, return the transaction response to the terminal, and end;
a third returning module 410, configured to return a transaction response to the terminal when the first determining module 403 determines that the transaction type is an online transaction;
the second receiving module 411 is configured to receive a second instruction sent by the terminal after the third returning module 410 returns the transaction response to the terminal;
a fourth determining module 412, configured to determine whether the online is successful according to the authorization code in the second instruction received by the second receiving module 411;
optionally, in this example, the fourth determining module 412 is specifically configured to obtain fifth preset byte data serving as an authorization response code from the second instruction received by the second receiving module 411, and determine whether the fifth preset byte data is seventh preset data or eighth preset data, if yes, the online connection fails, and otherwise, the online connection succeeds.
A second updating module 413, configured to update the indication data according to the second instruction received by the second receiving module 411 when the fourth determining module 412 determines that the second instruction is negative;
a fifth judging module 414, configured to judge the transaction type according to the indication data updated by the second updating module 413;
optionally, in this embodiment, the second updating module 413 is specifically configured to perform risk management according to the second instruction received by the second receiving module 411 to update the first indication bit;
correspondingly, the fifth judging module 414 is specifically configured to judge the transaction type according to the first indicator bit updated by the second updating module 413, and when the first indicator bit is nineteenth preset data, the transaction type is offline rejection, and the second judging module 404 is triggered; when the first indicator bit is the twentieth preset data, the transaction type is offline approved, triggering the third determination module 407.
The second judging module 404 is further configured to, when the fifth judging module 414 judges that the transaction type is offline rejection, judge whether a transaction log for rejecting the transaction needs to be recorded according to preset behavior data;
the third judging module 407 is further configured to, when the fifth judging module 414 judges that the transaction type is offline approval, judge whether to record an offline approved transaction log according to preset behavior data;
optionally, the third determining module 407 is specifically configured to determine whether a tenth preset byte data in the preset behavior data is equal to a twenty-first preset data, and if so, trigger the second record returning module 408; otherwise, the second return module 409 is triggered.
A sixth determining module 415, configured to determine whether to reject the transaction according to the request data, the authorization code, the preset first data, and the preset behavior data in the second instruction received by the second receiving module 411, when the fourth determining module 412 determines that the second instruction is yes;
optionally, in this embodiment, the sixth determining module 415 includes a first determining unit, a second determining unit, and a third determining unit;
correspondingly, the first determining unit is configured to obtain the request data from the second instruction received by the second receiving module 411, determine whether to reject the transaction according to the request data, and trigger the second determining module 404 if the transaction is rejected; otherwise, triggering a second judgment unit;
further, the first determining unit is specifically configured to obtain sixth preset byte data serving as request data from the second instruction received by the second receiving module 411, determine whether the sixth preset byte data is equal to the ninth preset data, and trigger the second determining module 404 if the sixth preset byte data is equal to the ninth preset data; otherwise, triggering a second judgment unit.
Correspondingly, the second judging unit is configured to obtain an authorization response code from the second instruction received by the second receiving module 411, judge whether the issuer rejects the transaction according to the authorization response code, and trigger the second judging module 404 if the issuer rejects the transaction; otherwise, triggering a third judging unit;
further, the second determining unit is specifically configured to obtain fifth preset byte data serving as an authorization response code from the second instruction received by the second receiving module 411, and determine whether the fifth preset byte data is eleventh preset data or twelfth preset data, if yes, the issuer does not reject the transaction, and otherwise, the issuer rejects the transaction.
Correspondingly, the third judging unit is configured to judge whether to reject the transaction according to the preset behavior data and the preset first data, and if yes, trigger the second judging module 404; otherwise, triggering a seventh judging module 416;
further, in this embodiment, the first data includes execution data, alternative data, and interaction data;
correspondingly, the third judging unit is specifically configured to judge whether to reject the transaction according to the preset behavior data and the preset execution data, option data, and interaction data, and if yes, trigger the second judging module 404; otherwise, triggering a seventh judging module 416;
furthermore, the third judging unit comprises a first judging subunit, an inquiring subunit, a second judging subunit, a third judging subunit and a fourth judging subunit;
correspondingly, the first judging subunit is configured to query the interactive data, judge whether the interactive data is preset interactive data, and trigger the seventh judging module 416 if the interactive data is preset interactive data; otherwise, triggering the query subunit;
correspondingly, the query subunit is configured to query the execution data, and trigger the second judgment subunit when the execution data is thirteenth preset data; when the execution data is fourteenth preset data, triggering a third judgment subunit;
correspondingly, the second judging subunit is configured to judge whether the seventh preset byte data in the preset behavior data is fifteenth preset data, reject the transaction if yes, and trigger the second judging module 404; otherwise, triggering a seventh judging module 416;
correspondingly, the third judging subunit is used for inquiring the optional data, judging whether the optional data is preset optional data or not, and triggering the fourth judging subunit if the optional data is preset optional data; otherwise, triggering a seventh judging module 416;
correspondingly, the fourth judging subunit is configured to judge whether the seventh preset byte data in the preset behavior data is sixteenth preset data, reject the transaction if the seventh preset byte data in the preset behavior data is sixteenth preset data, and trigger the second judging module 404; otherwise, the seventh determining module 416 is triggered.
The second judging module 404 is further configured to, when the sixth judging module 415 judges that the transaction log refuses to be recorded, judge whether to record the transaction log according to the preset behavior data;
optionally, the second determining module 404 is specifically configured to determine whether a ninth preset byte data in the preset behavior data is equal to an eighteenth preset data, and if so, trigger the first record returning module 405; otherwise the first return module 406 is triggered.
The seventh judging module 416, configured to, when the sixth judging module 415 judges that the transaction log needs to be recorded, judge whether to record an online approved transaction log according to preset behavior data;
optionally, the seventh determining module 416 is specifically configured to determine whether the eighth preset byte data in the preset behavior data is seventeenth preset data, and if so, trigger the third record returning module 417; otherwise, the fourth return module 418 is triggered.
A third record returning module 417, configured to record the transaction log approved by online when the seventh determining module 416 determines that the transaction log is yes, and return a transaction response to the terminal, and then end;
a fourth returning module 418, configured to, when the seventh determining module 416 determines that the transaction response is negative, return the transaction response to the terminal, and then end.
Optionally, the card in this embodiment further includes a third receiving module, an analyzing module, an eighth determining module, a third updating module, a fifth returning module, and a sixth returning module;
correspondingly, the third receiving module is used for receiving the updating instruction sent by the terminal;
correspondingly, the analysis module is used for analyzing the updating instruction received by the third receiving module to obtain the data to be updated and the first MAC value;
correspondingly, the eighth judging module is used for judging whether the preset behavior data can be updated according to the data to be updated obtained by analyzing by the analyzing module, the first MAC value obtained by analyzing by the analyzing module and the preset second data, and if so, triggering the third updating module; otherwise, triggering a fifth returning module;
further, the second data includes a preset subkey, a count value of a current transaction counter, preset execution data and current script data;
correspondingly, the eighth judging module is specifically configured to judge whether the preset behavior data can be updated according to the data to be updated, the preset sub-key, the count value of the current transaction counter, the preset execution data, the current script data, and the first MAC value analyzed by the analyzing module, which are analyzed by the analyzing module, and if yes, trigger the third updating module; otherwise, triggering a fifth returning module;
furthermore, the eighth judging module comprises a fourth judging unit, a fifth judging unit, a sixth judging unit, a generating unit and a seventh judging unit;
correspondingly, the fourth judging unit is used for judging whether external authentication is executed according to preset execution data, and if so, the fifth judging unit is triggered; otherwise, triggering a sixth judging unit;
further, the fourth judging unit is specifically configured to judge whether a thirty-second preset byte data in the preset execution data is a thirty-second preset data, and if so, trigger the fifth judging unit; otherwise, triggering a sixth judging unit.
Correspondingly, the fifth judging unit is used for judging whether the external authentication fails according to preset execution data, and if so, the sixth returning module is triggered; otherwise, triggering a sixth judging unit;
furthermore, the fifth judging unit is specifically configured to judge whether the thirty-third preset byte data in the preset execution data is the thirty-third preset data, and if so, trigger the sixth returning module; otherwise, triggering a sixth judging unit.
Correspondingly, the sixth judging unit is used for acquiring current script data, judging whether a script command can be changed or not according to the script data, and if so, triggering the generating unit; otherwise, triggering a sixth returning module;
correspondingly, the generating unit is used for acquiring the count value of the current transaction counter and generating a second MAC value according to the preset sub-key, the count value and the data to be updated;
further, the trigger generating unit is specifically configured to obtain a count value of the transaction counter, encrypt the count value using a preset sub-key to generate a process key, and encrypt the data to be updated using the process key to generate a second MAC value.
Correspondingly, the seventh judging unit is configured to judge whether the first MAC value analyzed by the analyzing module is equal to the second MAC value generated by the generating unit, and if so, trigger the third updating module; otherwise, triggering a sixth return module.
Furthermore, the seventh determining unit is specifically configured to acquire data after thirty-fifth preset byte data in the data to be updated as the first MAC value, determine whether the first MAC value is equal to the second MAC value, and trigger the third updating module if the first MAC value is equal to the second MAC value; otherwise, triggering a sixth return module.
Correspondingly, the fifth returning module is used for returning a successful response of data updating to the terminal and ending;
correspondingly, the third updating module is used for triggering the sixth returning module according to the behavior data to be updated, which is obtained by analyzing the data to be updated by the analyzing module;
correspondingly, the sixth returning module is used for returning the warning information to the terminal and ending.
Furthermore, a sixth judging unit is triggered, specifically configured to obtain a script failure indication bit, use the script failure indication bit as current script data, judge whether the script failure indication bit is thirty-fourth preset data, and trigger a sixth returning module if the script failure indication bit is the thirty-fourth preset data; otherwise, the script command can be changed to trigger the generation unit.
Optionally, the card in this embodiment further includes a ninth determining module;
correspondingly, the ninth judging module is configured to judge whether the first MAC value obtained by the analysis by the analyzing module is not null, and if so, trigger the seventh judging unit; otherwise, setting the script data as a script command which can not be changed, and triggering a sixth returning module.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (40)

1. A method of configurable logging, comprising the steps of:
step S1: when a card receives a first instruction sent by a terminal, the card carries out risk management according to the first instruction and updates preset indicating data;
step S2: the card judges the transaction type according to the indication data, and when the transaction type is online transaction, returns a transaction response to the terminal, and executes the step S3; when the transaction type is offline rejection, performing step S6; when the transaction type is offline approval, performing step S7;
step S3: when the card receives a second instruction sent by the terminal, the card judges whether the online is successful according to the authorization code in the second instruction, if so, the step S4 is executed; otherwise, updating indication data according to the second instruction, judging the transaction type according to the indication data, and executing the step S6 when the transaction type is offline rejection; when the transaction type is offline approval, performing step S7;
step S4: the card judges whether to reject the transaction according to the request data, the authorization code, the preset first data and the preset behavior data in the second instruction, if yes, the step S6 is executed; otherwise, executing step S5;
step S5: the card judges whether an online approved transaction log needs to be recorded according to preset behavior data, if so, the online approved transaction log is recorded, a transaction response is returned to the terminal, and the process is finished; otherwise, directly returning a transaction response to the terminal, and ending;
step S6: the card judges whether a transaction log rejecting the transaction needs to be recorded according to preset behavior data, if so, the transaction log rejecting the transaction is recorded, a transaction response is returned to the terminal, and the process is finished; otherwise, directly returning a transaction response to the terminal, and ending;
step S7: the card judges whether an offline approved transaction log needs to be recorded or not according to preset behavior data, if so, the offline approved transaction log is recorded, a transaction response is returned to the terminal, and the process is finished; otherwise, directly returning a transaction response to the terminal, and ending;
further comprising the step of D: when a card receives an updating instruction sent by a terminal, the card analyzes the updating instruction to obtain data to be updated and a first MAC value; judging whether preset behavior data can be updated or not according to the data to be updated, the first MAC value and preset second data, if so, updating the behavior data according to the data to be updated, returning a data updating success response to the terminal, and ending; otherwise, returning the warning information to the terminal, and ending.
2. The method according to claim 1, wherein the step S1 is specifically: when a card receives a first instruction sent by a terminal, the card carries out risk management according to the first instruction and updates a preset first indication bit and a preset second indication bit;
the step S2 specifically includes: the card judges the transaction type according to the first indication position and the second indication position, when the first indication position is third preset data and the second indication position is second preset data, the transaction type is online transaction, and step S3 is executed; when the first indicator bit is the second preset data, the transaction type is offline rejection, and step S6 is executed; when the first indicator bit is the third preset data and the second indicator bit is the third preset data, the transaction type is offline approval, and step S7 is performed.
3. The method according to claim 1, wherein in step S3, the card determines whether the online is successful according to the authorization code in the second instruction, specifically:
and the card acquires fifth preset byte data serving as an authorization response code from the second instruction, and judges whether the fifth preset byte data is seventh preset data or eighth preset data, if so, the online is failed, and otherwise, the online is successful.
4. The method according to claim 1, wherein in the step S3, the risk management is performed according to the second instruction to update the indication data, the transaction type is determined according to the indication data, and when the transaction type is offline rejection, the step S6 is performed; when the transaction type is offline approval, step S7 is executed, specifically:
the card carries out risk management according to the second instruction to update a first indicating position, judges the transaction type according to the first indicating position, refuses the transaction type offline when the first indicating position is nineteenth preset data, and executes the step S6; when the first indicator is the twentieth preset data, the transaction type is an offline approval, and step S7 is performed.
5. The method according to claim 1, wherein the step S4 is specifically:
step S4-1: the card acquires request data from the second instruction, judges whether to reject the transaction according to the request data, and if so, executes step S6; otherwise, executing step S4-2;
step S4-2: the card acquires an authorization response code from the second instruction, judges whether the card issuer refuses the transaction according to the authorization response code, and if so, executes the step S6; otherwise, executing step S4-3;
step S4-3: the card judges whether to reject the transaction according to the preset behavior data and the preset first data, if so, the step S6 is executed; otherwise, step S5 is executed.
6. The method according to claim 5, wherein the step S4-1 is specifically: the card acquires sixth preset byte data serving as request data from the second instruction, judges whether the sixth preset byte data is equal to ninth preset data or not, and if yes, executes step S6; otherwise, step S4-2 is executed.
7. The method according to claim 5, wherein the step S4-2 is specifically: and the card acquires fifth preset byte data serving as an authorization response code from the second instruction, and judges whether the fifth preset byte data is eleventh preset data or twelfth preset data, if so, the card issuer does not reject the transaction, and otherwise, the card issuer rejects the transaction.
8. The method of claim 5, wherein the first data comprises execution data, alternative data, and interaction data;
the step S4-3 specifically includes: the card judges whether to reject the transaction according to preset behavior data, preset execution data, optional data and interactive data, if yes, step S6 is executed; otherwise, step S5 is executed.
9. The method of claim 8, wherein the step S4-3 includes:
step S4-3-0: the card inquires interactive data, judges whether the interactive data is preset interactive data or not, and if so, executes step S5; otherwise, step S4-3-1;
step S4-3-1: the card inquires execution data, and when the execution data is thirteenth preset data, step S4-3-2 is executed; when the execution data is fourteenth preset data, performing step S4-3-3;
step S4-3-2: the card judges whether the seventh preset byte data in the preset behavior data is the fifteenth preset data, if so, the transaction is refused, and the step S6 is executed; otherwise, executing step S5;
step S4-3-3: the card inquires the optional data, judges whether the optional data is preset optional data or not, and if so, executes the step S4-3-4; otherwise, executing step S5;
step S4-3-4: the card judges whether the seventh preset byte data in the preset behavior data is the sixteenth preset data, if so, the transaction is refused, and the step S6 is executed; otherwise, step S5 is executed.
10. The method according to claim 1, wherein the step S5 is specifically: the card judges whether the eighth preset byte data in the preset behavior data is seventeenth preset data, if yes, a transaction log approved by online is recorded, a transaction response is returned to the terminal, and the operation is finished; otherwise, directly returning the transaction response to the terminal, and ending.
11. The method according to claim 1, wherein the step S6 is specifically: the card judges whether ninth preset byte data in the preset behavior data are equal to eighteenth preset data, if yes, a transaction log rejecting the transaction needs to be recorded, the transaction log rejecting the transaction is recorded, a transaction response is returned to the terminal, and the operation is finished; otherwise, directly returning the transaction response to the terminal, and ending.
12. The method according to claim 1, wherein the step S7 is specifically: the card judges whether the tenth preset byte data in the preset behavior data is equal to the twenty-first preset data, if so, records an off-line approved transaction log, returns a transaction response to the terminal, and ends; otherwise, directly returning the transaction response to the terminal, and ending.
13. The method of claim 1, wherein the second data includes a preset subkey, a count value of a current transaction counter, preset execution data, and current script data;
the step D is specifically as follows: when a card receives an updating instruction sent by a terminal, the card analyzes the updating instruction to obtain data to be updated and a first MAC value; judging whether the preset behavior data can be updated or not according to the data to be updated, a preset sub-key, the count value of the current transaction counter, preset execution data, current script data and the first MAC value, if so, updating the behavior data according to the data to be updated, returning a data updating success response to the terminal, and ending; otherwise, returning the warning information to the terminal, and ending.
14. The method according to claim 13, wherein step D is specifically:
step A1: when a card receives an updating instruction sent by a terminal, the card analyzes the updating instruction to obtain data to be updated and a first MAC value; judging whether external authentication is performed according to preset execution data, if so, executing the step A2; otherwise, executing step A3;
step A2: the card judges whether the external authentication fails according to preset execution data, if so, warning information is returned to the terminal, and the operation is finished; otherwise, executing step A3;
step A3: the card acquires current script data, judges whether a script command can be changed or not according to the script data, and if so, executes the step A4; otherwise, returning warning information to the terminal, and ending;
step A4: the card acquires the count value of the current transaction counter, and generates a second MAC value according to a preset sub-key, the count value and the data to be updated;
step A5: the card judges whether the first MAC value is equal to the second MAC value, if so, the card returns a data updating success response to the terminal according to the data updating behavior data to be updated, and the operation is finished; otherwise, returning the warning information to the terminal, and ending.
15. The method of claim 14, wherein step a5 is preceded by the steps of: the card judges whether the first MAC value is not null, if so, the step A5 is executed; otherwise, setting the script data as a script command which can not be changed, returning warning information to the terminal, and ending.
16. The method according to claim 14, wherein the step a1 is specifically: when a card receives an updating instruction sent by a terminal, the card analyzes the updating instruction to obtain data to be updated; judging whether the thirty second preset byte data in the preset execution data is the thirty second preset data, if so, executing the step A2; otherwise, step a3 is performed.
17. The method according to claim 14, wherein the step a2 is specifically: the card judges whether the thirty-third preset byte data in the preset execution data is the thirty-third preset data, if so, the card returns warning information to the terminal, and the operation is finished; otherwise, step a3 is performed.
18. The method according to claim 14, wherein the step a3 is specifically: the card acquires a script failure indication position, the script failure indication position is used as current script data, whether the script failure indication position is thirty-fourth preset data or not is judged, if yes, warning information is returned to the terminal, and the operation is finished; otherwise the script command can be modified and step a4 is performed.
19. The method according to claim 14, wherein the step a4 is specifically: the card obtains a count value of a transaction counter, encrypts the count value by using a preset sub-key to generate a process key, and encrypts the data to be updated by using the process key to generate a second MAC value.
20. The method according to claim 14, wherein the step a5 is specifically: the card acquires data after thirty-fifth preset byte data in the data to be updated as a first MAC value, judges whether the first MAC value is equal to the second MAC value, updates the behavior data according to the data to be updated if the first MAC value is equal to the second MAC value, returns a data updating success response to the terminal, and ends; otherwise, returning the warning information to the terminal, and ending.
21. A card capable of configuring a log record is characterized by comprising a first receiving module, a first updating module, a first judging module, a second judging module, a first log returning module, a first returning module, a third judging module, a second log returning module, a second returning module, a third returning module, a second receiving module, a fourth judging module, a second updating module, a fifth judging module, a sixth judging module, a seventh judging module, a third log returning module and a fourth returning module;
the first receiving module is used for receiving a first instruction sent by the terminal;
the first updating module is used for carrying out risk management and updating preset indicating data according to the first instruction received by the first receiving module;
the first judging module is used for judging the transaction type according to the indication data updated by the first updating module;
the second judging module is used for judging whether a transaction log rejecting the transaction needs to be recorded according to preset behavior data when the first judging module judges that the transaction type is offline rejection;
the first record returning module is used for recording a transaction log rejecting the transaction when the second judging module judges that the transaction log is positive, returning a transaction response to the terminal and ending;
the first returning module is used for returning a transaction response to the terminal and ending when the second judging module judges that the transaction response is negative;
the third judging module is used for judging whether a transaction log needing to be recorded for offline approval or not according to preset behavior data when the first judging module judges that the transaction type is offline approval;
the second record returning module is used for recording the off-line approved transaction log when the third judging module judges that the transaction log is the off-line approved transaction log, returning a transaction response to the terminal and ending the transaction;
the second returning module is used for returning a transaction response to the terminal and ending when the third judging module judges that the transaction response is negative;
the third returning module is used for returning a transaction response to the terminal when the first judging module judges that the transaction type is online transaction;
the second receiving module is used for receiving a second instruction sent by the terminal after the third returning module returns the transaction response to the terminal;
the fourth judging module is configured to judge whether the online is successful according to the authorization code in the second instruction received by the second receiving module;
the second updating module is configured to update the indication data according to the second instruction received by the second receiving module when the fourth determining module determines that the second instruction is not received;
the fifth judging module is used for judging the transaction type according to the indication data updated by the second updating module;
the second judging module is further used for judging whether a transaction log rejecting the transaction needs to be recorded according to preset behavior data when the fifth judging module judges that the transaction type is offline rejection;
the third judging module is further used for judging whether a transaction log needing to be recorded for offline approval is required or not according to preset behavior data when the fifth judging module judges that the transaction type is offline approval;
the sixth judging module is configured to, when the fourth judging module judges that the transaction is rejected, judge whether the transaction is rejected according to the request data, the authorization code, the preset first data, and the preset behavior data in the second instruction received by the second receiving module;
the second judging module is further configured to, when the sixth judging module judges that the transaction log refuses the transaction is not recorded, judge whether the transaction log refuses to be recorded according to preset behavior data;
the seventh judging module is further configured to, when the sixth judging module judges that the transaction log is not approved, judge whether the transaction log is required to be recorded for online approval according to preset behavior data;
the third record returning module is used for recording the transaction log approved by online when the seventh judging module judges that the transaction log is positive, returning a transaction response to the terminal and ending;
the fourth returning module is used for returning a transaction response to the terminal and ending when the seventh judging module judges that the transaction response is negative;
the system also comprises a third receiving module, an analysis module, an eighth judgment module, a third updating module, a fifth returning module and a sixth returning module;
the third receiving module is used for receiving an updating instruction sent by the terminal;
the analysis module is used for analyzing the updating instruction received by the third receiving module to obtain data to be updated and a first MAC value;
the eighth judging module is configured to judge whether preset behavior data can be updated according to the data to be updated obtained through analysis by the analyzing module, the first MAC value obtained through analysis by the analyzing module, and preset second data, and if so, trigger the third updating module; otherwise, triggering the fifth returning module;
the fifth returning module is used for returning a response of successful data updating to the terminal and ending;
the third updating module is configured to update the behavior data according to the data to be updated obtained by analyzing by the analyzing module, and trigger the sixth returning module;
and the sixth returning module is used for returning the warning information to the terminal and ending.
22. The card of claim 21, wherein the first updating module is specifically configured to update the preset first indicator bit and the second indicator bit for risk management according to the first instruction received by the first receiving module;
the first judging module is specifically configured to judge a transaction type according to the first indication bit and the second indication bit updated by the first updating module, and when the first indication bit is third preset data and the second indication bit is second preset data, the transaction type is an online transaction, and the third returning module is triggered; when the first indicating bit is second preset data, the transaction type is offline rejection, and the second judging module is triggered; and when the first indicating bit is third preset data and the second indicating bit is the third preset data, the transaction type is offline approval, and the third judging module is triggered.
23. The card of claim 21, wherein the fourth determining module is specifically configured to obtain a fifth preset byte data as an authorization response code from the second instruction received by the second receiving module, and determine whether the fifth preset byte data is a seventh preset data or an eighth preset data, if so, the connection fails, otherwise, the connection succeeds.
24. The card of claim 21, wherein the second updating module is specifically configured to update the first indicator bit according to the second instruction received by the second receiving module for risk management;
the fifth judging module is specifically configured to judge a transaction type according to the first indicator bit updated by the second updating module, and when the first indicator bit is nineteenth preset data, the transaction type is offline refused, and the second judging module is triggered; and when the first indicator bit is twentieth preset data, the transaction type is offline approval, and the third judgment module is triggered.
25. The card of claim 21, wherein the sixth determination module comprises a first determination unit, a second determination unit, and a third determination unit;
the first judging unit is used for acquiring request data from the second instruction received by the second receiving module, judging whether to reject the transaction according to the request data, and triggering the second judging module if the transaction is rejected; otherwise, triggering the second judgment unit;
the second judging unit is configured to obtain an authorization response code from the second instruction received by the second receiving module, judge whether an issuer rejects the transaction according to the authorization response code, and trigger the second judging module if the issuer rejects the transaction; otherwise, triggering the third judging unit;
the third judging unit is used for judging whether to reject the transaction according to the preset behavior data and the preset first data, and if yes, the second judging module is triggered; otherwise, triggering the seventh judging module.
26. The card of claim 25, wherein the first determining unit is specifically configured to obtain sixth preset byte data serving as request data from the second instruction received by the second receiving module, determine whether the sixth preset byte data is equal to ninth preset data, and trigger the second determining module if the sixth preset byte data is equal to the ninth preset data; otherwise, triggering the second judgment unit.
27. The card of claim 25, wherein the second determining unit is specifically configured to obtain fifth preset byte data serving as an authorization response code from the second instruction received by the second receiving module, and determine whether the fifth preset byte data is eleventh preset data or twelfth preset data, if so, the issuer does not reject the transaction, otherwise, the issuer rejects the transaction.
28. The card of claim 25, wherein the first data includes execution data, option data, and interaction data;
the third judging unit is specifically configured to judge whether to reject the transaction according to preset behavior data and preset execution data, option data, and interaction data, and if yes, trigger the second judging module; otherwise, triggering the seventh judging module.
29. The card of claim 28, wherein the third determination unit comprises a first determination subunit, an inquiry subunit, a second determination subunit, a third determination subunit, and a fourth determination subunit;
the first judging subunit is configured to query interactive data, judge whether the interactive data is preset interactive data, and trigger the seventh judging module if the interactive data is preset interactive data; otherwise, triggering the query subunit;
the query subunit is configured to query execution data, and trigger the second determining subunit when the execution data is thirteenth preset data; when the execution data is fourteenth preset data, triggering the third judgment subunit;
the second judging subunit is configured to judge whether a seventh preset byte data in the preset behavior data is a fifteenth preset data, reject the transaction if the seventh preset byte data is the fifteenth preset data, and trigger the second judging module; otherwise, triggering the seventh judging module;
the third judging subunit is configured to query optional data, judge whether the optional data is preset optional data, and trigger the fourth judging subunit if the optional data is preset optional data; otherwise, triggering the seventh judging module;
the fourth judging subunit is configured to judge whether a seventh preset byte data in the preset behavior data is a sixteenth preset data, reject the transaction if the seventh preset byte data is the sixteenth preset data, and trigger the second judging module; otherwise, triggering the seventh judging module.
30. The card of claim 21, wherein the seventh determining module is specifically configured to determine whether eighth preset byte data in the preset behavior data is seventeenth preset data, and if yes, trigger the third record returning module; otherwise, triggering the fourth returning module.
31. The card of claim 21, wherein the second determining module is specifically configured to determine whether ninth preset byte data in the preset behavior data is equal to eighteenth preset data, and if yes, trigger the first record returning module; otherwise, triggering the first returning module.
32. The card of claim 21, wherein the third determining module is specifically configured to determine whether a tenth preset byte data in the preset behavior data is equal to a twenty-first preset data, and if so, trigger the second record returning module; otherwise, triggering the second returning module.
33. The card of claim 21, wherein the second data includes a preset subkey, a count value of a current transaction counter, preset execution data, and current script data;
the eighth judging module is specifically configured to judge whether preset behavior data can be updated according to the data to be updated, a preset sub-key, a count value of a current transaction counter, preset execution data, current script data, and the first MAC value analyzed by the analyzing module, where the preset behavior data is obtained by updating, and if the preset behavior data is obtained by updating, trigger the third updating module; otherwise, triggering the fifth returning module.
34. The card of claim 33, wherein the eighth determining module comprises a fourth determining unit, a fifth determining unit, a sixth determining unit, a generating unit, and a seventh determining unit;
the fourth judging unit is used for judging whether external authentication is executed according to preset execution data, and if so, the fifth judging unit is triggered; otherwise, triggering the sixth judging unit;
the fifth judging unit is used for judging whether the external authentication fails according to preset execution data, and if so, the sixth returning module is triggered; otherwise, triggering the sixth judging unit;
the sixth judging unit is configured to acquire current script data, judge whether a script command can be changed according to the script data, and trigger the generating unit if the script command can be changed; otherwise, triggering the sixth returning module;
the generating unit is used for acquiring the count value of the current transaction counter and generating a second MAC value according to a preset sub-key, the count value and the data to be updated;
the seventh determining unit is configured to determine whether the first MAC value analyzed by the analyzing module is equal to the second MAC value generated by the generating unit, and if so, trigger the third updating module; otherwise, triggering the sixth returning module.
35. The card of claim 34, further comprising a ninth determination module;
the ninth judging module is configured to judge whether the first MAC value obtained through analysis by the analyzing module is not null, and if so, trigger the seventh judging unit; otherwise, setting the script data as a script command which can not be changed, and triggering the sixth returning module.
36. The card of claim 34, wherein the fourth determining unit is specifically configured to determine whether a thirty-second preset byte data in the preset execution data is a thirty-second preset data, and if so, trigger the fifth determining unit; otherwise, triggering the sixth judging unit.
37. The card of claim 34, wherein the fifth determining unit is specifically configured to determine whether data of a thirty-third preset byte in the preset execution data is determined to be the thirty-third preset data, and if so, trigger the sixth returning module; otherwise, triggering the sixth judging unit.
38. The card of claim 34, wherein the sixth determining unit is specifically configured to obtain a script failure indication bit, use the script failure indication bit as current script data, determine whether the script failure indication bit is thirty-fourth preset data, and if so, trigger the sixth returning module; otherwise, the script command can be changed to trigger the generating unit.
39. The card of claim 34, wherein the trigger generation unit is specifically configured to obtain a count value of a transaction counter, encrypt the count value using a preset subkey to generate a process key, and encrypt the data to be updated using the process key to generate a second MAC value.
40. The card of claim 34, wherein the seventh determining unit is specifically configured to obtain data after thirty-fifth preset byte data in the data to be updated as a first MAC value, determine whether the first MAC value is equal to the second MAC value, and trigger the third updating module if the first MAC value is equal to the second MAC value; otherwise, triggering the sixth returning module.
CN201811607365.5A 2018-12-27 2018-12-27 Method and card capable of configuring log recording Active CN109658105B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811607365.5A CN109658105B (en) 2018-12-27 2018-12-27 Method and card capable of configuring log recording

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811607365.5A CN109658105B (en) 2018-12-27 2018-12-27 Method and card capable of configuring log recording

Publications (2)

Publication Number Publication Date
CN109658105A CN109658105A (en) 2019-04-19
CN109658105B true CN109658105B (en) 2021-06-08

Family

ID=66117041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811607365.5A Active CN109658105B (en) 2018-12-27 2018-12-27 Method and card capable of configuring log recording

Country Status (1)

Country Link
CN (1) CN109658105B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111091379B (en) * 2019-12-25 2023-04-18 飞天诚信科技股份有限公司 Method and system for realizing segmented operation of smart card

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106603239A (en) * 2016-11-11 2017-04-26 飞天诚信科技股份有限公司 Main account balance enquiry method based on Bluetooth visual card, and Bluetooth visual card

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012037971A1 (en) * 2010-09-21 2012-03-29 Mastercard International Incorporated Financial transaction method and system having an update mechanism
CN102629355B (en) * 2012-02-27 2016-06-01 福建联迪商用设备有限公司 Phone-payment terminal transaction method and phone-payment terminal system
US9892438B1 (en) * 2012-05-03 2018-02-13 Stoplift, Inc. Notification system and methods for use in retail environments
CN106845995B (en) * 2017-01-19 2018-05-04 飞天诚信科技股份有限公司 A kind of Bluetooth intelligent card and its method for controlling transaction risk
CN107122822B (en) * 2017-04-28 2018-04-03 飞天诚信科技股份有限公司 A kind of visual financial IC card and the offline transaction method based on visual financial IC card
CN107563765A (en) * 2017-09-06 2018-01-09 飞天诚信科技股份有限公司 It is a kind of to support to force method of commerce and terminal online and that force approval
CN108764924A (en) * 2018-05-31 2018-11-06 飞天诚信科技股份有限公司 A kind of implementation method and device for exempting from close EMV contacts transaction
CN109064316B (en) * 2018-08-06 2020-10-13 飞天诚信科技股份有限公司 Method and device for recovering offline consumption limit by credit card

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106603239A (en) * 2016-11-11 2017-04-26 飞天诚信科技股份有限公司 Main account balance enquiry method based on Bluetooth visual card, and Bluetooth visual card

Also Published As

Publication number Publication date
CN109658105A (en) 2019-04-19

Similar Documents

Publication Publication Date Title
US6961587B1 (en) Storage media
KR102553831B1 (en) Back-end architectural method and system for aggregate payment, computer device and storage medium
KR101579214B1 (en) Method of performing a financial transaction via unsecured public telecommunication infrastructure and an apparatus for same
US7782176B2 (en) Method for information display, mobile information apparatus, and contactless communication device
CN101860835B (en) Value added service payment method and system
CN101916478A (en) Method for automatically acquiring, verifying and inputting dynamic password in normal short message by client
CN111833034A (en) Batch deduction method, payment server, computer equipment and storage medium
JP7541112B2 (en) Card linking method, terminal device, authentication server and storage medium
CN111932245B (en) Data processing method, device, equipment and medium
CN110163658A (en) Virtual resource data processing method, device, computer equipment and storage medium
US20170178121A1 (en) System and method for providing instructions to a payment device
US11212658B2 (en) Method for providing near filed communication device information for user and system therefor
CN109658105B (en) Method and card capable of configuring log recording
KR102292916B1 (en) Midrange Reader Interactions
CN111582868A (en) Transaction request processing method, device and equipment
CN113709740A (en) Method and system for displaying account information on authorized login page
CN109426961B (en) Card binding risk control method and device
KR100980467B1 (en) Method for Providing Card Information and Method for Approving Card Transaction
CN111930535B (en) Application function calling method and device, computer equipment and storage medium
KR102107454B1 (en) System for multiplication of financial payment networks, method for financial services using the same and computer program for the same
CN112188476B (en) Communication method, communication device, mobile terminal, and storage medium
CN109064316B (en) Method and device for recovering offline consumption limit by credit card
KR101135010B1 (en) Financial Gateway System for Exchanging Asynchronous Statement
CN108197690B (en) Payment card, billing system and billing method
CN114579985A (en) Remote card writing method, card writing terminal, server and storage medium

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