CN113469678B - Transaction reminding method, card swiping method and DESFire card - Google Patents
Transaction reminding method, card swiping method and DESFire card Download PDFInfo
- Publication number
- CN113469678B CN113469678B CN202110688127.7A CN202110688127A CN113469678B CN 113469678 B CN113469678 B CN 113469678B CN 202110688127 A CN202110688127 A CN 202110688127A CN 113469678 B CN113469678 B CN 113469678B
- Authority
- CN
- China
- Prior art keywords
- instruction
- transaction
- data
- card
- information
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/30—Payment architectures, schemes or protocols characterised by the use of specific devices or networks
- G06Q20/34—Payment architectures, schemes or protocols characterised by the use of specific devices or networks using cards, e.g. integrated circuit [IC] cards or magnetic cards
-
- G—PHYSICS
- G08—SIGNALLING
- G08B—SIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
- G08B21/00—Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
- G08B21/18—Status alarms
- G08B21/24—Reminder alarms, e.g. anti-loss alarms
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
The invention relates to the technical field of DESFire cards, in particular to a transaction reminding method, a card swiping method and a DESFire card. If yes, determining data configuration to be sent corresponding to the transaction instruction; determining transaction reminding information according to the data configuration to be sent; so that the user terminal outputs the transaction reminding information. The invention presets the trigger condition and the data to be sent into the DESFire card application, and can achieve the effect of accurately informing the transaction type and the transaction information by analyzing and judging the trigger condition carried by the transaction instruction, thereby meeting the requirement of transaction event notification in the transaction process carried out by the DESFire card, and the modification of the DESFire card application is fixed and only needs to change the trigger condition and the configuration of the data to be sent.
Description
Technical Field
The invention relates to the technical field of DESFire cards, in particular to a transaction reminding method, a card swiping method and a DESFire card.
Background
The DESFire card is a virtual card which can be realized in a mobile phone, and is generally widely applied in the fields of public transportation and retail. The fund data of the user can be stored in the DESFire card, and transactions such as paying for riding or shopping can be realized through swiping the card.
The user will sometimes know the result of the card swipe, e.g., whether the card swipe was successful, what the amount was deducted, what the balance was, etc., when using the mobile phone to swipe the card. In the prior art, the transaction event is generally sent by writing codes, and the scheme can meet the requirements of product definition and user experience under the conditions of domestic unified bus card application specification, unified recharging and consumption logic.
The bus Card based on the DESFire Card specification is preset in the OS when the Java Card OS manufacturer leaves the factory, and the DESFire Card is a universal data storage system, the self data read-write logic of the DESFire Card cannot correspond to the recharging or consumption transaction type, and the Java Card OS manufacturer cannot customize transaction event notification logic according to the bus Card specification of a certain country/region. Therefore, when the DESFire card carries out the transaction, the type of the transaction and the information related to the transaction can not be accurately prompted, and the transaction carried out by the DESFire card can not meet the requirement of the transaction event notification in the transaction process.
Disclosure of Invention
Accordingly, the present invention is directed to a transaction reminding method, a card swiping method and a deffire card, so as to solve the problem that the current transaction performed by the deffire card cannot meet the requirement of transaction event notification in the transaction process.
In order to achieve the above purpose, the invention adopts the following technical scheme:
a transaction reminding method is applied to a DESFire card;
the method comprises the following steps:
acquiring a transaction instruction;
judging whether the triggering condition carried by the transaction instruction meets a preset triggering condition or not;
if the triggering condition carried by the transaction instruction meets the preset triggering condition, judging whether data configuration to be sent corresponding to the transaction instruction exists or not;
if the data configuration to be sent corresponding to the transaction instruction exists, generating transaction reminding information according to the data configuration to be sent;
and sending the transaction reminding information to a using terminal so that the using terminal outputs the transaction reminding information.
Further, in the transaction reminding method described above, the transaction instruction includes an application selection instruction;
the judging whether the triggering condition carried by the transaction instruction meets the preset triggering condition comprises the following steps:
judging whether the triggering condition carried by the application selection instruction comprises an application name or not;
and if the triggering condition carried by the application selection instruction comprises an application name, the triggering condition carried by the application selection instruction is indicated to meet the preset triggering condition.
Further, in the transaction reminding method described above, the transaction instruction includes a data operation instruction;
the judging whether the triggering condition carried by the transaction instruction meets the preset triggering condition comprises the following steps:
judging whether the triggering condition carried by the data operation instruction comprises instruction operation information or not; the instruction operation information comprises an instruction operation target file number, a starting offset of the instruction operation target file and a minimum data length;
if the triggering condition carried by the data operation instruction comprises the instruction operation information, judging whether the initial offset and the minimum data length of the instruction operation target file are contained in the target range of the data operation instruction;
and if the initial offset and the minimum data length of the instruction operation target file are contained in the target range of the data operation instruction, the trigger condition carried by the data operation instruction is indicated to meet the preset trigger condition.
Further, in the transaction reminding method, the data operation instruction includes a data reading instruction and a data writing instruction;
the data reading instruction comprises at least one of a data reading instruction, a reading value instruction and a reading record instruction; the data writing instruction comprises at least one of a data writing instruction, a value adding instruction, a value subtracting instruction and a writing recording instruction.
Further, in the transaction reminding method described above, the generating transaction reminding information according to the data configuration to be sent includes:
reading data parameters according to the data configuration to be transmitted;
processing the data parameters according to a preset format, and taking the processed data parameters and the triggering conditions carried by the transaction instruction as the transaction reminding information;
the data configuration to be sent comprises a target file number, and a starting offset and a data length of the target file.
Further, the transaction reminding method described above, the method further includes:
and if the data configuration to be transmitted corresponding to the transaction instruction does not exist, generating the transaction reminding information according to the type of the transaction instruction.
Further, in the transaction reminding method described above, the transaction instruction includes a data update instruction;
the sending the transaction reminding information to the using terminal comprises the following steps:
if the preset sending configuration is that sending configuration information is sent immediately or not detected, the transaction reminding information is sent to an operating system of the using terminal through a transaction event notification interface provided by a Java Card OS;
if the preset sending configuration is that the data updating instruction and/or the Card departure information are sent, after the data updating instruction and/or the Card departure information are detected, the transaction reminding information is sent to the operating system of the using terminal through a transaction event notification interface provided by a Java Card OS.
Further, in the transaction reminding method described above, before the transaction instruction is obtained, the method further includes:
and acquiring and storing the preset triggering condition, the data configuration to be transmitted and the preset transmission configuration to realize the configuration of the DESFire card.
In another aspect, the present invention further provides a DESFire card, including a processor and a memory, where the processor is connected to the memory:
the processor is used for calling and executing the program stored in the memory;
the memory is configured to store the program, and the program is at least configured to execute the transaction reminding method according to any one of the above.
On the other hand, the invention also provides a card swiping method which is applied to the card swiping terminal;
the method comprises the following steps:
when the card swiping information is detected, an application selection instruction and a data reading instruction are generated;
the application selection instruction and the data reading instruction are sent to the DESFire card, so that the DESFire card starts corresponding applications according to the application selection instruction, and information in the card is read according to the data reading instruction;
acquiring the information in the card fed back by the DESFire card;
judging whether the information in the card meets the current card swiping condition or not;
if the information in the card meets the current card swiping condition, generating a data writing instruction;
the data writing instruction is sent to the DESFire card, so that the DESFire card writes data according to the data writing instruction;
generating a data updating instruction;
and sending the data updating instruction to the DESFire card so that the DESFire card updates the writing data according to the data updating instruction to complete the transaction.
The invention relates to a transaction reminding method, a card swiping method and a DESFire card, wherein the method comprises the steps of obtaining a transaction instruction; judging whether a triggering condition carried by a transaction instruction meets a preset triggering condition or not; if the triggering condition carried by the transaction instruction meets the preset triggering condition, determining the data configuration to be transmitted corresponding to the transaction instruction; determining transaction reminding information according to the data configuration to be sent; and sending the transaction reminding information to the using terminal so that the using terminal outputs the transaction reminding information. The invention presets the trigger condition and the data to be sent into the DESFire card application, can achieve the effect of accurately informing the transaction type and the transaction information by analyzing and judging the trigger condition carried by the transaction instruction, meets the requirement of transaction event notification in the transaction process carried out by the DESFire card, and the modification of the DESFire card application is fixed without changing according to different countries/regions, and only needs to change the trigger condition and the configuration of the data to be sent.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of the structure of a DESFire card;
FIG. 2 is a flow chart of a transaction reminding method according to an embodiment of the invention;
FIG. 3 is a schematic diagram of the structure provided by one embodiment of a DESFire card of the present invention;
FIG. 4 is a flow chart of an embodiment of a method for swiping cards according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, based on the examples herein, which are within the scope of the invention as defined by the claims, will be within the scope of the invention as defined by the claims.
The DESFire card is a virtual card that can be implemented in a cell phone, and the card specification of the DESFire card is defined by the encarpium company. DESFire cards are commonly used in the public transportation and retail areas to store the user's funds data in the card for riding or shopping by swipe transactions.
The security module (eSE; embedded Secure Element) in the mobile phone is an embedded security chip, which is internally provided with a Java Card OS to support the downloading and running of the application. When the application is programmed, the method can call the appointed API to actively send the appointed data to the mobile phone operating system when the application is operated under a certain condition, thereby achieving the purpose of informing the operating system of related information. At present, the bus Card application on the domestic mobile phone is Java application developed by a software development company based on Java Card OS, and can send transaction related information to a mobile phone operating system in the process of Card swiping transaction, so that information such as transaction amount of a user is actively prompted.
The Java Card application used by the domestic mobile phone bus Card is compiled by an intelligent Card application development company, and when a Card swiping terminal initiates recharging or consumption transaction, the information such as transaction amount and balance after the transaction is actively notified to a mobile phone operating system, so that the information can be actively displayed to a user. The domestic bus card application specification defines the instructions and flow of recharging and consuming, and the bus card application is customized and developed according to the specification requirements, so that the transaction information notification can be easily realized.
The bus Card based on the DESFire Card specification is preset in the OS when the Java Card OS manufacturer leaves the factory, and the DESFire Card is a universal data storage system, the self data read-write logic of the DESFire Card cannot correspond to the recharging or consumption transaction type, and the Java Card OS manufacturer cannot customize transaction event notification logic according to the bus Card specification of a certain country/region. Thus, the DESFire card does not accurately indicate the type of transaction that occurred and the information associated with the transaction when the transaction occurred. Fig. 1 is a schematic diagram of the structure of a DESFire card. As shown in fig. 1, the number of application directories of the DESFire card and files thereunder can be changed, the files also distinguish various types, and the number of keys stored in the key files can be changed. Thus, there may be a great difference between countries/regions when data is stored using the DESFire card.
Based on the above, the present invention provides a transaction reminding method to solve the above problems.
Examples
FIG. 2 is a flow chart of a transaction reminding method according to an embodiment of the invention.
The transaction reminding method of the embodiment is applied to the DESFire card. As shown in fig. 2, the transaction reminding method of the present embodiment may include the following steps:
s11, acquiring a transaction instruction.
In this step, a transaction instruction may be obtained. In general, when a user contacts a card swiping terminal with a use terminal provided with a desfiire card, a card swiping action is realized, and the card swiping terminal generates and transmits a transaction instruction to the desfiire card in the use terminal.
In some alternative embodiments, the user terminal may be a terminal device such as a mobile phone or a tablet computer, which is not limited in this embodiment.
In some alternative embodiments, the card swiping terminal may be a terminal device such as a card swiping machine, a card reader, etc., which is not limited in this embodiment.
In this embodiment, the transaction instruction may be obtained.
In some alternative embodiments, the transaction instructions may include data manipulation instructions, application selection instructions, and data update instructions.
In some alternative embodiments, the data manipulation instructions comprise data read instructions and data write instructions, the data read instructions comprising at least one of read data instructions, read value instructions, and read record instructions; the data write instruction includes at least one of a write data instruction, a value-added instruction, a value-subtracted instruction, and a write record instruction.
Specifically, the DESFire card defines several file types:
1)Standard Data Files
2)Backup Data Files
3)Value Files with Backup
4)Linear Record Files with Backup
5)Cyclic Record Files with Backup
wherein, for both file types Standard Data Files and Backup Data Files, read data, write data instruction operations can be used; for Value Files with Backup, a read value, a value-added value, and a value-subtracted instruction operation may be used; for both types Linear Record Files with Backup and Cyclic Record Files with Backup, a read record, write record instruction operation may be used.
In a specific application scenario, standard Data Files and Backup Data Files can store a lot of data, the content of the data can be freely defined by an application manufacturer, and the analysis rule is realized by a card reader end. Value Files with Backup stores the value of the available add-subtract, typically storing balance information. Cyclic Record Files with Backup and Cyclic Record Files with Backup are used for recording history information or fixed-length recorded information, and the content format is customized by the application manufacturer and analyzed by the card reading terminal. The file types mentioned above may be implemented in several ways according to the data plan of the application manufacturer.
In some alternative embodiments, the currently operating application is validated by an application selection instruction.
In some alternative embodiments, the data update instruction (Commit Transaction) means that updated data for the write operation is committed to be validated. Therefore, successful execution of this command means successful transaction.
S12, judging whether the triggering condition carried by the transaction instruction meets the preset triggering condition.
In this embodiment, the DESFire card is configured in advance, so that the DESFire card supports a preset trigger condition. The preset triggering conditions may include the following elements:
first, instruction type: namely an application selection instruction, a data reading instruction, a data writing instruction or a data updating instruction; second, the instruction operation target file number: specific files under a certain application are specified, and the element of the instruction operation target file number only exists when the data operation instruction type is specified; third, the instruction operates the initial offset and minimum data length of the target file: the element of the start offset and the minimum data length of the instruction manipulation object file also exists only when the data manipulation instruction type is satisfied when the data fragment specified by these two parameters is contained within the target range of the data manipulation instruction; fourth, application name: this element exists only when an application instruction is selected.
The above elements constitute a set of trigger conditions. In some alternative embodiments, multiple sets of trigger conditions may be configured for the DESFire card to trigger when different applications and files are operated in different scenarios.
Based on this, in some alternative embodiments, if the transaction instructions include application selection instructions; judging whether the triggering condition carried by the transaction instruction meets the preset triggering condition or not comprises the following steps:
judging whether the triggering condition carried by the application selection instruction comprises an application name or not, and if the triggering condition carried by the application selection instruction comprises the application name, indicating that the triggering condition carried by the application selection instruction meets the preset triggering condition.
In some alternative embodiments, if the transaction instructions include data manipulation instructions; judging whether the triggering condition carried by the transaction instruction meets the preset triggering condition or not comprises the following steps:
judging whether a triggering condition carried by the data operation instruction comprises instruction operation information or not; the instruction operation information comprises an instruction operation target file number, a starting offset of the instruction operation target file and a minimum data length;
if the trigger condition carried by the data operation instruction comprises instruction operation information, judging whether the initial offset and the minimum data length of the instruction operation target file are contained in the target range of the data operation instruction;
if the initial offset and the minimum data length of the instruction operation target file are contained in the target range of the data operation instruction, the trigger condition carried by the data operation instruction is indicated to meet the preset trigger condition.
In some alternative embodiments, the predetermined trigger condition is satisfied if the transaction instruction includes a data update instruction.
And S13, if the triggering condition carried by the transaction instruction meets the preset triggering condition, judging whether the data configuration to be transmitted corresponding to the transaction instruction exists.
Each set of trigger conditions also corresponds to 0-n sets of data configuration to be transmitted. In some optional embodiments, if the trigger condition carried by the transaction instruction meets the preset trigger condition, it may further be determined whether there is a data configuration to be sent corresponding to the transaction instruction.
The configuration of the data to be transmitted is also input into the DESFire card in advance.
S14, if the data configuration to be transmitted corresponding to the transaction instruction exists, generating transaction reminding information according to the data configuration to be transmitted.
The data configuration to be transmitted of the data to be transmitted includes the following elements: the number of the target file, and the starting offset and data length of the target file. The target file number designates a specific file under a certain application; the starting offset and data length of the destination file specify the source and length of the data to be sent.
In some alternative embodiments, if there is a data configuration to be sent corresponding to the transaction instruction, reading data parameters according to the data configuration to be sent;
and processing the data parameters according to a preset format, and taking the processed data parameters and the triggering conditions carried by the transaction instruction as transaction reminding information.
Specifically, when the transaction reminding information is sent, the sent data content comprises the triggering condition carried by the transaction instruction and the processed data parameter. The triggering condition carried by the transaction instruction can help the application software on the terminal to judge the type of the currently executed service; the processed data parameters may then help determine specific transaction information for the service type. If the trigger condition carried by the transaction instruction matches one or more groups of data parameters, when the trigger condition is satisfied, all data to be transmitted are read according to a stipulated format and then assembled and transmitted.
In some alternative embodiments, if there is no data configuration to be sent corresponding to the transaction instruction, generating transaction reminding information according to the type of the transaction instruction.
Specifically, if the trigger condition carried by the transaction instruction does not match the data parameter, only a basic notification is sent and no designated data is sent when the trigger condition is satisfied.
S15, sending the transaction reminding information to the using terminal.
In this step, the transaction reminding information may be sent to the operating system of the user terminal through a transaction event notification interface provided by the Java Card OS.
It should be noted that, each set of trigger conditions also corresponds to a transmission opportunity configuration of a transaction event. The configuration defines a point in time when the transaction event is sent when the trigger condition is met. The transmission opportunity optional case includes: immediate transmission, transmission when the "submit data update" instruction is executed successfully, and/or transmission when the card leaves the field (away from the reader field area).
If the preset sending configuration is immediately sent or the sending configuration information is not detected, the transaction reminding information can be sent to the operating system of the using terminal through a transaction event notification interface provided by the Java Card OS immediately after the triggering condition is met; if the preset sending configuration is that the transaction reminding information is sent according to the data updating instruction and/or the Card departure information, the transaction reminding information can be cached first, and after the data updating instruction and/or the Card departure information is detected, the transaction reminding information is sent to the operating system of the using terminal through a transaction event notification interface provided by the Java Card OS.
The transaction reminding method comprises the steps of obtaining a transaction instruction; judging whether a triggering condition carried by a transaction instruction meets a preset triggering condition or not; if the triggering condition carried by the transaction instruction meets the preset triggering condition, determining the data configuration to be transmitted corresponding to the transaction instruction; determining transaction reminding information according to the data configuration to be sent; and sending the transaction reminding information to the using terminal so that the using terminal outputs the transaction reminding information. The invention presets the trigger condition and the data to be sent into the DESFire card application, can achieve the effect of accurately informing the transaction type and the transaction information by analyzing and judging the trigger condition carried by the transaction instruction, meets the requirement of transaction event notification in the transaction process carried out by the DESFire card, and the modification of the DESFire card application is fixed without changing according to different countries/regions, and only needs to change the trigger condition and the configuration of the data to be sent.
In some alternative embodiments, prior to obtaining the transaction instructions, the method further comprises the steps of:
and acquiring and storing preset trigger conditions, data configuration to be transmitted and preset transmission configuration to realize the configuration of the DESFire card.
The preset trigger condition, the data configuration to be sent and the preset sending configuration need to be configured into the DESFire card application before the user can swipe the card, so that the data configuration to be sent can be sent to the mobile phone operating system according to the related parameters when the DESFire card application is executed.
In this embodiment, the virtual bus card is taken as an example to further describe this step.
After the user selects to open the virtual bus card and pay the related fee, the user terminal for installing the DESFire card initiates an application to the server, acquires the script of creating the virtual bus card and writing the data and operates the script. The script can be implemented to create a blank DESFire card application in the eSE and write the user's card data into the DESFire card application. And after the data writing is completed, the card is successfully downloaded (opened), and the user can swipe the card for use. The preset trigger condition and the writing of parameters such as data configuration to be sent can be completed together with the installation process of the DESFire card application or together with the card data writing process of the DESFire card application.
In summary, before acquiring the transaction command, the method mainly comprises the following two steps: firstly, reforming a DESFire card application to support a transaction event triggering condition, and configuring and analyzing data to be transmitted and sending the transaction event; and secondly, when the DESFire card application is initialized in the eSE, or after the initialization of the DESFire card application, configuring preset triggering conditions, data configuration to be transmitted and preset transmission configuration before use.
If the related sending configuration is not performed, the transaction reminding information is directly sent after the triggering condition is met.
Based on a general inventive concept, the embodiment also provides a transaction reminding device. The transaction reminding device of the embodiment comprises:
the acquisition module is used for acquiring a transaction instruction;
the judging module is used for judging whether the triggering condition carried by the transaction instruction meets the preset triggering condition or not;
the judging module is further used for judging whether the data configuration to be transmitted corresponding to the transaction instruction exists or not if the triggering condition carried by the transaction instruction meets the preset triggering condition;
the generation module is used for generating transaction reminding information according to the data configuration to be transmitted if the data configuration to be transmitted corresponding to the transaction instruction exists;
and the sending module is used for sending the transaction reminding information to the using terminal so that the using terminal outputs the transaction reminding information.
In some alternative embodiments, the transaction instructions include application selection instructions;
the judging module is specifically used for judging whether the triggering condition carried by the application selection instruction comprises an application name or not; if the trigger condition carried by the application selection instruction comprises an application name, the trigger condition carried by the application selection instruction is indicated to meet the preset trigger condition.
In some alternative embodiments, the transaction instructions include data manipulation instructions;
the judging module is specifically used for judging whether the triggering condition carried by the data operation instruction comprises instruction operation information or not; the instruction operation information comprises an instruction operation target file number, a starting offset of the instruction operation target file and a minimum data length; if the trigger condition carried by the data operation instruction comprises instruction operation information, judging whether the initial offset and the minimum data length of the instruction operation target file are contained in the target range of the data operation instruction; if the initial offset and the minimum data length of the instruction operation target file are contained in the target range of the data operation instruction, the trigger condition carried by the data operation instruction is indicated to meet the preset trigger condition.
In some alternative embodiments, the data manipulation instructions include data read instructions and data write instructions; the data reading instruction comprises at least one of a data reading instruction, a reading value instruction and a reading record instruction; the data write instruction includes at least one of a write data instruction, a value-added instruction, a value-subtracted instruction, and a write record instruction.
In some optional embodiments, the generating module is specifically configured to read data parameters according to the data configuration to be sent; processing the data parameters according to a preset format, and taking the processed data parameters and the triggering conditions carried by the transaction instruction as transaction reminding information; the configuration of the data to be transmitted comprises a target file number, and a starting offset and a data length of the target file.
In some optional embodiments, the generating module is specifically further configured to generate the transaction reminding information according to the type of the transaction instruction if the data configuration to be sent corresponding to the transaction instruction does not exist.
In some optional embodiments, the sending module is specifically configured to send the transaction reminding information to the operating system of the user terminal through a transaction event notification interface provided by the Java Card OS if the preset sending configuration is that sending configuration information is sent immediately or not detected; if the preset sending configuration is that the sending is performed according to the data updating instruction and/or the Card departure information, after the data updating instruction and/or the Card departure information is detected, the transaction reminding information is sent to an operating system of the using terminal through a transaction event notification interface provided by the Java Card OS.
In some alternative embodiments, the system further comprises a configuration module;
the configuration module is used for acquiring and storing preset trigger conditions, data configuration to be sent and preset sending configuration so as to realize the configuration of the DESFire card.
Based on a general inventive concept, the invention also provides a DESFire card for realizing the method embodiment.
Fig. 3 is a schematic diagram of a structure provided by an embodiment of a DESFire card of the present invention.
As shown in fig. 3, the DESFire card of the present embodiment includes a processor 21 and a memory 22, and the processor 21 is connected to the memory 22. Wherein the processor 21 is used for calling and executing the program stored in the memory 22; the memory 22 is used for storing a program for executing at least the transaction reminding method in the above embodiment.
Based on one general inventive concept, the embodiment also provides a card swiping method.
FIG. 4 is a flow chart of an embodiment of a method for swiping cards according to the present invention.
The card swiping method of the embodiment is applied to a card swiping terminal. As shown in fig. 4, the card swiping method of the present embodiment includes the following steps:
s31, when the card swiping information is detected, an application selection instruction and a data reading instruction are generated.
In general, when a user contacts a card swiping terminal by using a use terminal provided with a DESFire card, a card swiping action is realized, and the card swiping terminal detects card swiping information to generate an application selection instruction and a data reading instruction.
S32, sending the application selection instruction and the data reading instruction to the DESFire card.
And sending the application selection instruction and the data reading instruction to the DESFire card so that the DESFire card starts the corresponding application according to the application selection instruction and reads the information in the card according to the data reading instruction.
S33, acquiring the information in the card fed back by the DESFire card.
S34, judging whether the information in the card meets the current card swiping condition.
S35, if the information in the card meets the current card swiping condition, generating a data writing instruction.
S36, sending the data writing instruction to the DESFire card.
And sending the data writing instruction to the DESFire card so that the DESFire card writes data according to the data writing instruction.
S37, generating a data updating instruction.
S38, sending the data updating instruction to the DESFire card.
And sending the data updating instruction to the DESFire card so that the DESFire card executes updating writing data according to the data updating instruction to complete the transaction.
Specifically, when a user swipes a card, the card swiping terminal sends an application selection instruction to the DESFire card application, and instructions such as data reading, record reading or reading value reading are obtained, the current card state of the user is obtained, whether the card swiping condition is met is judged, whether the balance is enough is judged, and the like. If all the condition checks pass, the card swiping terminal sends instructions of writing data, writing records or value adding/subtracting and the like, updates the data in the card, sends a data updating instruction, and submits the updated data of the writing operation according to the data updating instruction to be effective. Therefore, successful execution of this command means successful transaction.
The transaction command is generated for a plurality of times in the whole transaction process. When the application software running on the mobile phone receives the transaction instruction, the judgment can be correspondingly made, the current transaction type and the transaction information are determined, and the information concerned by the user is displayed. For example, when the application selection instruction is executed, the application software may find that a transaction is currently occurring; when receiving the data reading instruction, the application software can judge that the transaction is likely to be a query transaction; when a data writing instruction is received, whether the transaction is recharging or consuming can be judged according to the information such as the written data position, the written data content and the like, and more details of the transaction, including the occurrence of the transaction, the place, the amount, the entering and exiting of the transaction and the like; when a data updating instruction is received, the completion of a transaction can be judged, and transaction information can be prompted to a user at the moment; if a data write command is received but a data update command is not received after a certain time interval, it may be determined that there may be an incomplete transaction.
According to the embodiment, the state and the details of the transaction are judged according to the transaction instruction, so that better use experience can be provided for the user.
It is to be understood that the same or similar parts in the above embodiments may be referred to each other, and that in some embodiments, the same or similar parts in other embodiments may be referred to.
It should be noted that in the description of the present invention, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Furthermore, in the description of the present invention, unless otherwise indicated, the meaning of "plurality" means at least two.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the invention, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the invention.
Claims (9)
1. The transaction reminding method is characterized by being applied to a DESFire card; the method comprises the following steps:
acquiring a transaction instruction;
judging whether the triggering condition carried by the transaction instruction meets a preset triggering condition or not;
if the triggering condition carried by the transaction instruction meets the preset triggering condition, judging whether data configuration to be sent corresponding to the transaction instruction exists or not;
if the data configuration to be sent corresponding to the transaction instruction exists, generating transaction reminding information according to the data configuration to be sent;
the transaction reminding information is sent to a using terminal, so that the using terminal outputs the transaction reminding information;
the generating transaction reminding information according to the data configuration to be sent comprises the following steps:
reading data parameters according to the data configuration to be transmitted;
processing the data parameters according to a preset format, and taking the processed data parameters and the triggering conditions carried by the transaction instruction as the transaction reminding information;
the data configuration to be sent comprises a target file number, and a starting offset and a data length of the target file.
2. The transaction alert method according to claim 1, wherein the transaction instructions include application selection instructions;
the judging whether the triggering condition carried by the transaction instruction meets the preset triggering condition comprises the following steps:
judging whether the triggering condition carried by the application selection instruction comprises an application name or not;
and if the triggering condition carried by the application selection instruction comprises an application name, the triggering condition carried by the application selection instruction is indicated to meet the preset triggering condition.
3. The transaction alert method according to claim 1, wherein the transaction instructions include data manipulation instructions;
the judging whether the triggering condition carried by the transaction instruction meets the preset triggering condition comprises the following steps:
judging whether the triggering condition carried by the data operation instruction comprises instruction operation information or not; the instruction operation information comprises an instruction operation target file number, a starting offset of the instruction operation target file and a minimum data length;
if the triggering condition carried by the data operation instruction comprises the instruction operation information, judging whether the initial offset and the minimum data length of the instruction operation target file are contained in the target range of the data operation instruction;
and if the initial offset and the minimum data length of the instruction operation target file are contained in the target range of the data operation instruction, the trigger condition carried by the data operation instruction is indicated to meet the preset trigger condition.
4. The transaction alert method according to claim 3, wherein the data manipulation instructions include data read instructions and data write instructions;
the data reading instruction comprises at least one of a data reading instruction, a reading value instruction and a reading record instruction; the data writing instruction comprises at least one of a data writing instruction, a value adding instruction, a value subtracting instruction and a writing recording instruction.
5. The transaction reminding method according to claim 1, wherein the method further comprises:
and if the data configuration to be transmitted corresponding to the transaction instruction does not exist, generating the transaction reminding information according to the type of the transaction instruction.
6. The transaction alert method according to claim 1, wherein the transaction instructions include data update instructions; the sending the transaction reminding information to the using terminal comprises the following steps:
if the preset sending configuration is that sending configuration information is sent immediately or not detected, the transaction reminding information is sent to the operating system of the using terminal through a transaction event notification interface provided by the JavaCardOS;
if the preset sending configuration is that the data updating instruction and/or the card departure information are sent, after the data updating instruction and/or the card departure information are detected, the transaction reminding information is sent to the operating system of the using terminal through a transaction event notification interface provided by the Javacard OS.
7. The transaction reminding method according to claim 6, further comprising, prior to the obtaining the transaction instruction:
and acquiring and storing the preset triggering condition, the data configuration to be transmitted and the preset transmission configuration to realize the configuration of the DESFire card.
8. A DESFire card comprising a processor and a memory, the processor being coupled to the memory:
the processor is used for calling and executing the program stored in the memory;
the memory is used for storing the program, and the program is at least used for executing the transaction reminding method according to any one of claims 1-7.
9. The card swiping method is characterized by being applied to a card swiping terminal;
the method comprises the following steps:
when the card swiping information is detected, an application selection instruction and a data reading instruction are generated;
the application selection instruction and the data reading instruction are sent to the DESFire card in claim 8, so that the DESFire card starts corresponding applications according to the application selection instruction, and information in the card is read according to the data reading instruction;
acquiring the information in the card fed back by the DESFire card;
judging whether the information in the card meets the current card swiping condition or not;
if the information in the card meets the current card swiping condition, generating a data writing instruction;
the data writing instruction is sent to the DESFire card, so that the DESFire card writes data according to the data writing instruction;
generating a data updating instruction;
and sending the data updating instruction to the DESFire card so that the DESFire card updates the writing data according to the data updating instruction to complete the transaction.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110688127.7A CN113469678B (en) | 2021-06-21 | 2021-06-21 | Transaction reminding method, card swiping method and DESFire card |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110688127.7A CN113469678B (en) | 2021-06-21 | 2021-06-21 | Transaction reminding method, card swiping method and DESFire card |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113469678A CN113469678A (en) | 2021-10-01 |
CN113469678B true CN113469678B (en) | 2023-08-04 |
Family
ID=77869098
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110688127.7A Active CN113469678B (en) | 2021-06-21 | 2021-06-21 | Transaction reminding method, card swiping method and DESFire card |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113469678B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006164194A (en) * | 2004-12-10 | 2006-06-22 | Fujitsu Ltd | Commercial transaction information display program and commercial transaction information display system |
EP2854087A1 (en) * | 2013-09-11 | 2015-04-01 | Chien-Kang Yang | Method for processing a payment |
CN105488678A (en) * | 2015-11-23 | 2016-04-13 | 上海银生宝电子支付服务有限公司 | Payment behavior information acquisition method and system |
CN106469081A (en) * | 2016-09-29 | 2017-03-01 | 北京小米移动软件有限公司 | Based reminding method and device |
CN106503782A (en) * | 2015-09-06 | 2017-03-15 | 上海复旦微电子集团股份有限公司 | NFC smart cards analogy method and device |
CN107977416A (en) * | 2017-11-22 | 2018-05-01 | 北京百度网讯科技有限公司 | A kind of information prompting method, device and server |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8401894B2 (en) * | 2008-05-02 | 2013-03-19 | Ebay Inc. | Online incentive management |
WO2014000257A1 (en) * | 2012-06-29 | 2014-01-03 | France Telecom | Mobile payment method and system for scheduled payments |
US9378497B2 (en) * | 2013-09-03 | 2016-06-28 | Smart Approach Co., Ltd. | Card transaction device and card transaction method |
US20160189135A1 (en) * | 2013-11-27 | 2016-06-30 | Ca, Inc. | Virtual chip card payment |
US9367871B2 (en) * | 2014-10-01 | 2016-06-14 | Mastercard International Incorporated | Predicting account holder travel without transaction data |
US11488164B2 (en) * | 2017-12-13 | 2022-11-01 | Mastercard International Incorporated | Computerized methods and computer systems for verification of transactions |
US20200184451A1 (en) * | 2018-12-05 | 2020-06-11 | Mastercard International Incorporated | Systems and methods for account event notification |
-
2021
- 2021-06-21 CN CN202110688127.7A patent/CN113469678B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006164194A (en) * | 2004-12-10 | 2006-06-22 | Fujitsu Ltd | Commercial transaction information display program and commercial transaction information display system |
EP2854087A1 (en) * | 2013-09-11 | 2015-04-01 | Chien-Kang Yang | Method for processing a payment |
CN106503782A (en) * | 2015-09-06 | 2017-03-15 | 上海复旦微电子集团股份有限公司 | NFC smart cards analogy method and device |
CN105488678A (en) * | 2015-11-23 | 2016-04-13 | 上海银生宝电子支付服务有限公司 | Payment behavior information acquisition method and system |
CN106469081A (en) * | 2016-09-29 | 2017-03-01 | 北京小米移动软件有限公司 | Based reminding method and device |
CN107977416A (en) * | 2017-11-22 | 2018-05-01 | 北京百度网讯科技有限公司 | A kind of information prompting method, device and server |
Non-Patent Citations (1)
Title |
---|
基于银行账户联机与脱机交易兼容的公交终端设计;易叔贤;;金融科技时代(第04期);46-49 * |
Also Published As
Publication number | Publication date |
---|---|
CN113469678A (en) | 2021-10-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6390374B1 (en) | System and method for installing/de-installing an application on a smart card | |
US6338435B1 (en) | Smart card patch manager | |
US7861238B2 (en) | Configuration tool and method of updating an archive file property relating to at least one point-of-sale peripheral | |
CN107329741A (en) | A kind of software distribution upgrade method and device based on fingerprint recognition | |
US20080295087A1 (en) | Firmware upgrade system and control method thereof | |
CN109376811B (en) | Intelligent card changing method, device, terminal and computer readable medium | |
CN111427596B (en) | Software upgrading method and device and terminal equipment | |
EP3516511A1 (en) | Update migration system and method | |
US20140236697A1 (en) | Managing digital coupons | |
US20230333840A1 (en) | Systems and methods for updating automatic teller machines | |
CN102999349A (en) | Software upgrading method | |
CN113469678B (en) | Transaction reminding method, card swiping method and DESFire card | |
CN114780019A (en) | Electronic device management method and device, electronic device and storage medium | |
CN108346095B (en) | Management and control method, device and equipment of combined system and computer readable storage medium | |
US20180018307A1 (en) | Method of recording operations and method of automatically executing operations | |
CN103365678A (en) | Updating method of vehicle-mounted system | |
CN112068895B (en) | Code configuration method, device, video playing equipment and storage medium | |
KR20070025252A (en) | Method for copying installed card data at mobile phone and mobile phone thereof | |
CN116009969A (en) | Application program control method, device, electronic equipment, chip and storage medium | |
JP6473527B1 (en) | Software update method for closed storage device | |
WO2001016873A1 (en) | Smart card patch manager | |
WO2001016865A1 (en) | System and method for installing/de-installing an application on a smart card | |
EP4187335A1 (en) | Program, computer-readable recording medium, method, and system | |
CN113656517B (en) | Account checking file processing method and device, electronic equipment and storage medium | |
CN113434211B (en) | Application program function dynamic configuration method, device, equipment 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 |