ISAM card security application method for bus IC card wallet recharging and ISAM card
The ISAM card security application method with date-specific activation keys and PIN authentication improves the security and control of offline recharging for public transportation IC card wallets, addressing unauthorized use and financial risks.
Patent Information
- Application Number
- CN202411227565.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-12-24
AI Technical Summary
Current ISAM cards for offline recharging of public transportation IC card wallets have security risks, allowing unauthorized use and uncontrollable economic losses due to potential mismanagement or loss of AFC devices and ISAM cards.
Implementing an ISAM card security application method that uses activation keys valid for a specific date range, requiring activation and PIN authentication, and limiting recharge amounts within a validity period to ensure secure offline transactions.
Enhances security by restricting unauthorized use and controlling recharge amounts, thereby reducing financial risks and ensuring business continuity.
Smart Images

Figure CN119180653A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of public transportation IC card wallet recharging, and in particular to an ISAM card security application method and an ISAM card for public transportation IC card wallet recharging. Background Art
[0002] Currently, in the rail transit industry, AFC (Automatic Fare Collection) equipment, such as BOM (Booking Office Machine) and TVM (Ticket Vending Machine), can recharge the bus IC card wallet.
[0003] The AFC device recharges the public transportation IC card wallet in online recharge mode. However, online recharge sacrifices business continuity. Specifically, when the network is interrupted or stuck, recharge cannot be performed or the recharge transaction fails, resulting in a poor customer experience and even customer complaints. Therefore, in order to ensure business continuity, the ISAM (Identity Security Access Module) card is proposed. The AFC device can use the ISAM card to perform offline recharge of the public transportation IC card wallet.
[0004] However, the current ISAM card has certain recharge security risks. Specifically, if the AFC device and ISAM card are lost or mismanaged, they may be used by others to conduct unlimited malicious recharges, causing uncontrollable economic losses. Summary of the invention
[0005] In view of this, a secure application method of an ISAM card for recharging a public transportation IC card wallet and an ISAM card are provided to solve the problem of low security of offline recharging of existing ISAM cards.
[0006] The present invention adopts the following technical solution:
[0007] In a first aspect, the present invention provides an ISAM card security application method for recharging a public transportation IC card wallet, comprising:
[0008] The AFC device obtains a target activation key for a target offline recharge date; the target activation key is only valid within the target offline recharge date;
[0009] During the target offline recharge date, when the AFC device determines that the ISAM card needs to be activated, the AFC device sends an activation instruction to the ISAM card; the activation instruction carries the target offline recharge date and the target activation key;
[0010] The ISAM card performs a preset activation operation based on the activation instruction;
[0011] After the ISAM card is successfully activated, if the AFC device determines that the target user's IC card needs to be recharged offline, the AFC device uses the ISAM card to perform offline recharge on the IC card.
[0012] Optionally, the validity period of any activation key is one day;
[0013] The AFC device obtains activation keys for N consecutive days from the target system within the target day, where the starting day of the N consecutive days is the target day; the target system is a system maintained by the issuer of the ISAM card.
[0014] Optionally, N is equal to 3.
[0015] Optionally, the ISAM card performs a preset activation operation based on the activation instruction, specifically including:
[0016] The ISAM card parses the activation instruction to obtain the target offline recharge date and the target activation key;
[0017] The ISAM card determines whether the target offline recharge date is earlier than the offline recharge date stored in the ISAM card; the offline recharge date stored in the ISAM card is the date when the ISAM card was last activated;
[0018] If the target offline recharge date is earlier than the offline recharge date stored in the ISAM card, this process ends and the activation of the ISAM card fails.
[0019] Optionally, the ISAM card performs a preset activation operation based on the activation instruction, specifically including:
[0020] If the target offline recharge date is not earlier than the offline recharge date stored in the ISAM card, the ISAM card determines the value of the target variable; wherein, when the target offline recharge date is later than the offline recharge date stored in the ISAM card, the value of the target variable is a first value, and when the target offline recharge date is equal to the offline recharge date stored in the ISAM card, the value of the target variable is a second value;
[0021] The ISAM card verifies the target activation key using the target offline recharge date;
[0022] After the target activation key is verified, the ISAM card uses the target offline recharge date to update the offline recharge date stored internally;
[0023] The ISAM card uses its own UID to perform PIN authentication on the target directory of the ISAM card, and activates the target directory after the PIN authentication is passed; the target directory includes the directory that must be accessed when using the ISAM card for offline recharge;
[0024] When the target variable takes the first value, the ISAM card updates its remaining recharge amount to a preset recharge amount, where the preset recharge amount is the total available recharge amount of the ISAM card within the target offline recharge date.
[0025] Optionally, the AFC device uses the ISAM card to perform offline recharge on the IC card, specifically including:
[0026] The AFC device sends a start-load transaction instruction to the IC card, so that the IC card returns a first message authentication code to the AFC device according to the start-load transaction instruction; the first message authentication code carries the electronic wallet balance, transaction amount, transaction type identifier and AFC device code;
[0027] After receiving the first message authentication code, the AFC device sends an offline recharge request to the ISAM card, wherein the offline recharge request includes the first message authentication code;
[0028] After receiving the offline recharge request, the ISAM card determines whether the current transaction date is consistent with the offline recharge date stored in the ISAM card;
[0029] If the current transaction date is consistent with the offline recharge date stored in the ISAM card, the ISAM card determines whether the remaining recharge amount is greater than or equal to the transaction amount;
[0030] If the remaining recharge amount of the ISAM card is greater than or equal to the transaction amount, the ISAM card verifies whether the first message authentication code is valid;
[0031] If the first message authentication code is valid, the ISAM card performs a preset deduction and recharge amount operation on the target account of the target user, updates its own remaining recharge amount based on the transaction amount, and generates a second message authentication code; the second message authentication code carries the transaction amount, the transaction type identifier, the AFC device code, the transaction date and the transaction time;
[0032] The ISAM card sends a load-to-deposit transaction acceptance message to the AFC device; the load-to-deposit transaction acceptance message includes the second message authentication code, the transaction date and the transaction time;
[0033] The AFC device performs a preset recharging operation on the IC card according to the recharge transaction acceptance message.
[0034] Optionally, before the AFC device uses the ISAM card to perform offline recharge on the IC card, the ISAM card security application method for recharging a public transportation IC card wallet of the present invention further includes:
[0035] If the target server's response time to the request sent by the AFC device exceeds a preset response time threshold, or the AFC device cannot establish a communication connection with the target server, the AFC device switches to an offline recharge mode; the target server is the server used by the AFC device for online recharge;
[0036] When the AFC device is in the offline recharging mode, if the AFC device receives an IC card recharging request sent by the target user, the AFC device determines that offline recharging is required for the IC card of the target user.
[0037] Optionally, before the AFC device sends an activation instruction to the ISAM card, the ISAM card security application method for recharging a public transportation IC card wallet of the present invention further includes:
[0038] After the AFC device is restarted, or after the AFC device resets the ISAM card, or after the AFC device switches the system date, the AFC device determines that the ISAM card needs to be activated.
[0039] Optionally, the target offline recharge date is one day.
[0040] In a second aspect, the present invention further provides an ISAM card, which is applied to the ISAM card security application method for recharging a public transportation IC card wallet as described above, and the ISAM card comprises:
[0041] A receiving module, configured to receive an activation instruction sent by the AFC device; the activation instruction carries a target offline recharge date and a target activation key; the target activation key is valid only within the target offline recharge date;
[0042] An activation module, used to perform a preset activation operation based on the activation instruction;
[0043] The recharge module is used to perform offline recharge on the IC card of the target user through the AFC device when it is determined through the AFC device that offline recharge is required; and to control the cumulative recharge amount of the ISAM card during each activation validity period to not exceed the preset recharge amount.
[0044] The present invention adopts the above technical scheme, a safe application method of ISAM card for recharging a public transportation IC card wallet, comprising: an AFC device obtains a target activation key for a target offline recharging date; the target activation key is only valid within the target offline recharging date; within the target offline recharging date, when the AFC device determines that the ISAM card needs to be activated, the AFC device sends an activation instruction to the ISAM card; the activation instruction carries the target offline recharging date and the target activation key; the ISAM card executes a preset activation operation based on the activation instruction; after the ISAM card is successfully activated, if the AFC device determines that the target user's IC card needs to be recharged offline, the AFC device uses the ISAM card to recharge the IC card offline.
[0045] Based on this, by setting the activation key and the validity period of the activation key, and using the activation key within the validity period to activate the ISAM card, the ISAM card can be used for offline recharge only after the ISAM card is successfully activated. In this way, the present invention can improve the security of offline recharge of the ISAM card. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 It is a flow chart of a method for securely applying an ISAM card to recharge a public transportation IC card wallet provided by an embodiment of the present invention;
[0048] Figure 2 It is a structural diagram of an ISAM card provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0049] To make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described in detail below. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other implementation methods obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0050] At present, in the rail transit industry, AFC devices, such as BOM and TVM, can recharge the wallet of the bus IC card. The way that the AFC device recharges the wallet of the bus IC card includes online recharge, but the online recharge method sacrifices the continuity of the business. Specifically, when there is a network interruption or freeze, the recharge cannot be made or the recharge transaction fails, resulting in a poor customer experience and even customer complaints. Therefore, in order to ensure the continuity of the business, the ISAM card is proposed, and the AFC device can use the ISAM card to recharge the wallet of the bus IC card offline.
[0051] However, the current offline recharge method has certain security risks. Specifically, if the AFC device and ISAM card are lost or mismanaged, they may be used by others to perform unlimited malicious recharges, causing uncontrollable economic losses.
[0052] Based on this, in order to improve the security of offline recharge of ISAM card, the present invention provides an ISAM card security application method and ISAM card for recharging public transportation IC card wallet. The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings.
[0053] Figure 1 1 is a flow chart of a method for safely applying an ISAM card to recharge a public transportation IC card wallet provided by an embodiment of the present invention. Figure 1 As shown, the ISAM card security application method for recharging the public transportation IC card wallet includes:
[0054] Step 101: The AFC device obtains a target activation key for a target offline recharge date; the target activation key is only valid within the target offline recharge date.
[0055] Specifically, the activation key may be generated by a target system, which is a system maintained by the issuer of the ISAM card. The AFC device may specifically obtain the activation key from the target system.
[0056] The activation key can be designed as a set per day, which is valid on the same day and becomes invalid after expiration. That is, the validity period of any activation key is one day. The AFC device can only obtain activation keys for N consecutive days from the target system within the target day, and the starting day of the N consecutive days is the target day; the target system is the system maintained by the issuer of the ISAM card. N can be equal to 3, and N can also take other values.
[0057] In a specific example, assuming that N=3, the AFC device can only obtain activation keys for the three days from August 12, 2024 to August 14, 2024 from the target system on August 12, 2024.
[0058] Step 102: within the target offline recharge date, when the AFC device determines that the ISAM card needs to be activated, the AFC device sends an activation instruction to the ISAM card; the activation instruction carries the target offline recharge date and the target activation key.
[0059] Here, after the ISAM card is inserted into the AFC device for the first time, the AFC device needs to activate the ISAM card. Also, after the AFC device is restarted, the ISAM card is reset, or the AFC device performs a system date switch, even if the ISAM card has been successfully activated before, the ISAM card needs to be reactivated in the current scenario.
[0060] Based on this, before the AFC device sends an activation instruction to the ISAM card, the ISAM card security application method for recharging the public transportation IC card wallet of the present invention may also include:
[0061] When the ISAM card is inserted into the AFC device for the first time, or after the AFC device is restarted, or after the AFC device resets the ISAM card, or after the AFC device switches the system date, the AFC device determines that the ISAM card needs to be activated.
[0062] Step 103: The ISAM card executes a preset activation operation based on the activation instruction.
[0063] Here, the ISAM card performs a preset activation operation based on the activation instruction, which may specifically include:
[0064] (1) The ISAM card parses the activation instruction and obtains the target offline recharge date and target activation key.
[0065] (2) The ISAM card determines whether the target offline recharge date is earlier than the offline recharge date stored in the ISAM card.
[0066] The offline recharge date stored in the ISAM card is the date when the ISAM card was last activated. That is, the offline recharge date stored in the ISAM card is constantly updated, and each time the ISAM card is activated, the offline recharge date stored in the ISAM card is updated to the current activation date.
[0067] (3) If the target offline recharge date is earlier than the offline recharge date stored in the ISAM card, this process ends and the ISAM card activation fails.
[0068] In a specific example, assuming that the target offline recharge date is August 13, 2024, the offline recharge date stored in the ISAM card is August 14, 2024. This means that the latest activation of the ISAM card is August 14, 2024, so the activation key with an expiration date of August 13, 2024 is the previous activation key.
[0069] In order to prevent others from using the previous activation key to activate the ISAM card, in the present invention, if the target offline recharge date is earlier than the offline recharge date stored in the ISAM card, the process is terminated and the ISAM card activation fails. In this way, the present invention can further improve the offline recharge security of the ISAM card.
[0070] (4) If the target offline recharge date is not earlier than the offline recharge date stored in the ISAM card, the ISAM card determines the value of the target variable; wherein, when the target offline recharge date is later than the offline recharge date stored in the ISAM card, the value of the target variable is a first value, and when the target offline recharge date is equal to the offline recharge date stored in the ISAM card, the value of the target variable is a second value.
[0071] The first value may be 1, and the second value may be 0.
[0072] (5) The ISAM card uses the target offline recharge date to verify the target activation key.
[0073] Specifically, there is a connection between the target offline recharge date and the target activation key, so that the target offline recharge date can be used to verify the target activation key.
[0074] The specific verification process of the target activation key is: the ISAM card uses the first secret key stored in itself to perform 3DES (Triple Data Encryption Standard) algorithm on the target offline recharge date, and compares the encryption result with the target activation key. If the comparison passes, the target activation key passes the verification, otherwise, the target activation key fails the verification.
[0075] (6) After the target activation key is verified, the ISAM card uses the target offline recharge date to update the offline recharge date stored internally.
[0076] On the contrary, when the target activation key fails to pass the verification, the ISAM card returns a prompt indicating that the target activation key fails to pass the verification to the AFC device.
[0077] (7) The ISAM card uses its own UID (User Identification) to perform PIN authentication on the target directory of the ISAM card, and activates the target directory after the PIN authentication is passed; the target directory includes the directory that must be accessed when using the ISAM card for offline recharge.
[0078] Specifically, the ISAM card uses the second secret key stored in itself to disperse its own UID, and uses the dispersed result to perform PIN authentication on the target directory, and activates the target directory after the PIN authentication passes.
[0079] The target directory may include a recharge directory and a key calculation directory. The recharge directory includes an available credit file and a remaining recharge credit file. The available credit file includes an available credit, which is the total available recharge credit of the corresponding ISAM card within a validity period (for example, if the validity period of the activation key is 1 day, then the validity period is 1 day). The remaining recharge credit file includes a remaining recharge credit, which is the remaining available recharge credit of the corresponding ISAM card within the current validity period.
[0080] In a specific example, assume that the ISAM card is activated using an activation key with a validity period of August 13, 2024. The validity period of the activation key is one day, that is, the activation key is only valid on August 13, 2024. Therefore, if the above available credit limit is 10,000, it means that the total available recharge credit limit of the ISAM card on August 13, 2024 is 10,000. If the above remaining recharge credit limit is 5,000, it means that the remaining available recharge credit limit of the ISAM card on August 13, 2024 is 5,000.
[0081] (8) When the target variable takes the first value, the ISAM card updates its remaining recharge amount to a preset recharge amount, where the preset recharge amount is the total available recharge amount of the ISAM card within the target offline recharge date.
[0082] As can be seen from the above content, when the target offline recharge date is equal to the offline recharge date stored in the ISAM card, the value of the target variable is the second value. Therefore, when the value of the target variable is the second value, it indicates that the ISAM card has been activated within the target offline recharge date, and this time the ISAM card is activated again within the target offline recharge date. In this scenario, the recharge amount of the ISAM card is not updated.
[0083] When the target offline recharge date is later than the offline recharge date stored in the ISAM card, the target variable takes the first value. Therefore, when the target variable takes the first value, it indicates that the ISAM card has not been activated within the target offline recharge date, and this is the first time the ISAM card is activated within the target offline recharge date. In this scenario, the remaining recharge amount of the ISAM card is updated to the total available recharge amount (i.e., the ISAM card updates its remaining recharge amount to the preset recharge amount), so that the ISAM card can be recharged with the total available recharge amount within the target offline recharge date.
[0084] Step 104: After the ISAM card is successfully activated, if the AFC device determines that the target user's IC card needs to be recharged offline, the AFC device uses the ISAM card to recharge the IC card offline.
[0085] Here, the AFC device uses the ISAM card to perform offline recharge on the IC card, which may include:
[0086] (1) The AFC device sends a transaction instruction to start loading and unloading to the IC card, so that the IC card returns a first message authentication code to the AFC device according to the transaction instruction; the first message authentication code carries the balance of the electronic wallet, the transaction amount, the transaction type identifier and the AFC device code.
[0087] Specifically, after receiving the instruction to start the top-up transaction, the IC card performs the following operations:
[0088] (a) Check whether the key index number carried in the transaction instruction for starting the deposit transaction is supported.
[0089] (b) If the key index number carried in the transaction instruction for starting the top-up transaction is not supported, the IC card returns the unsupported key index number to the AFC device and ends the process.
[0090] If the key index number carried in the startup top-up transaction instruction is supported, the electronic wallet balance, transaction amount, transaction type identifier and AFC device code are encrypted in order to generate a first message authentication code, and the first message authentication code is returned to the AFC device.
[0091] Among them, the full English name of the message authentication code is Message Authentication Code, abbreviated as MAC.
[0092] (3) After receiving the first message authentication code, the AFC device sends an offline recharge request to the ISAM card, where the offline recharge request includes the first message authentication code.
[0093] (3) After receiving the offline recharge request, the ISAM card determines whether the current transaction date is consistent with the offline recharge date stored in the ISAM card.
[0094] (4) If the current transaction date is inconsistent with the offline recharge date stored in the ISAM card, the ISAM card returns a notification indicating that the offline recharge date does not match to the AFC device and ends the process.
[0095] If the current transaction date is consistent with the offline recharge date stored in the ISAM card, the ISAM card determines whether the remaining recharge amount is greater than or equal to the transaction amount.
[0096] (5) If the remaining recharge amount of the ISAM card is less than the transaction amount, the ISAM card returns an insufficient balance prompt to the AFC device and ends this process.
[0097] If the remaining recharge amount of the ISAM card is greater than or equal to the transaction amount, the ISAM card verifies whether the first message authentication code is valid.
[0098] In this way, when others use the ISAM card for offline recharge, they can only recharge up to the amount of the total available recharge limit, which is conducive to reducing the financial security risk of offline recharge, and thus improving the offline recharge security and risk controllability of the ISAM card.
[0099] The total available recharge amount can be set by relevant technical personnel according to actual needs. For example, the total available recharge amount can be set to RMB 10,000.
[0100] (6) If the first message authentication code is invalid, the ISAM card returns a prompt indicating that the first message authentication code is invalid to the AFC device, and ends this process.
[0101] If the first message authentication code is valid, the ISAM card performs the preset deduction and recharge amount operation on the target account of the target user, updates its own remaining recharge limit based on the transaction amount, and encrypts these data in the order of transaction amount, transaction type identifier, AFC device code, transaction date and transaction time to generate a second message authentication code.
[0102] The second message authentication code carries the transaction amount, transaction type identifier, AFC device code, transaction date and transaction time.
[0103] (7) The ISAM card sends a transfer transaction acceptance message to the AFC device; the transfer transaction acceptance message includes the second message authentication code, transaction date and transaction time.
[0104] Specifically, after the ISAM card successfully performs a loading transaction (i.e., performs a preset deduction of the loading amount operation on the target account of the target user, and updates its own remaining recharge amount based on the transaction amount), it will also perform a preset deduction of the loading amount operation on the target account of the target user The corresponding transaction number corresponding to the operation and the transaction number corresponding to the remaining recharge amount updated based on the transaction amount plus 1, and send a loading transaction acceptance message to the AFC device.
[0105] (8) The AFC device performs a preset recharge operation on the IC card based on the transfer transaction acceptance message.
[0106] Specifically, after receiving the load transaction acceptance message, the AFC device sends an account transfer command to the IC card, and the account transfer command carries the second message authentication code.
[0107] After receiving the account transfer command sent by the AFC device, the IC card verifies whether the second message authentication code is valid. If the second message authentication code is invalid, the IC card returns a prompt indicating that the second message authentication code is invalid to the AFC device. If the second message authentication code is valid, the IC card adds 1 to the transaction sequence number corresponding to the preset deduction and recharge amount operation on the target account of the target user and the transaction sequence number corresponding to the remaining recharge amount updated based on the transaction amount, and uses the sum of its electronic wallet balance and the transaction amount to update its electronic wallet balance. After updating its electronic wallet balance, the IC card feeds back an account transfer completion prompt to the AFC device, so that the AFC device determines that the IC card has successfully completed the account transfer operation based on the account transfer completion prompt.
[0108] In the embodiment of the present invention, before the AFC device uses the ISAM card to perform offline recharge on the IC card, the ISAM card security application method for recharging the public transportation IC card wallet of the present invention may also include:
[0109] (1) If the target server's response time to the request sent by the AFC device exceeds a preset response time threshold, or the AFC device cannot establish a communication connection with the target server, the AFC device switches to an offline recharge mode; the target server is the server used by the AFC device for online recharge.
[0110] (2) When the AFC device is in the offline recharge mode, if the AFC device receives an IC card recharge request sent by a target user, the AFC device determines that offline recharge is required for the target user's IC card.
[0111] In actual applications, after the AFC device is turned on, its recharge mode defaults to the online recharge mode. When the AFC device sends a request to the target server, if the target server's response time to the request exceeds the preset response time threshold (e.g., 8 seconds), it indicates that a network failure may have occurred. Therefore, in this scenario, the AFC device switches to the offline recharge mode. Also, when the AFC device cannot establish a communication connection with the target server, it also indicates that a network failure may have occurred. Therefore, in this scenario, the AFC device will also switch to the offline recharge mode.
[0112] In the offline recharge mode, the AFC device will send an online heartbeat message to the target server at a preset frequency. When there is no error response to the online heartbeat message, the AFC device switches its recharge mode to the online recharge mode. The preset frequency may be to send an online heartbeat message every 10 minutes. When the AFC device switches from the offline recharge mode to the online recharge mode, the AFC device will upload the offline recharge data performed in this offline recharge mode to the target server. Specifically, the relevant data of each offline recharge may be uploaded in sequence according to the transaction serial number.
[0113] In the embodiment of the present invention, the duration of the target offline recharge date may be one day.
[0114] Based on a general inventive concept, the present invention also provides an ISAM card, which is applied to the ISAM card security application method for recharging the public transportation IC card wallet described in the above embodiment.
[0115] Figure 2 FIG. 1 is a schematic diagram of the structure of an ISAM card provided by an embodiment of the present invention. Figure 2 As shown, this ISAM card includes:
[0116] The receiving module 21 is used to receive an activation instruction sent by the AFC device; the activation instruction carries a target offline recharge date and a target activation key; the target activation key is valid only within the target offline recharge date.
[0117] The activation module 22 is used to execute a preset activation operation based on the activation instruction.
[0118] The recharge module 23 is used to perform offline recharge on the IC card of the target user through the AFC device when it is determined through the AFC device that offline recharge is required, and to control the cumulative recharge amount of the ISAM card during each activation validity period to not exceed the preset recharge amount.
[0119] It should be noted that the ISAM card of this embodiment is applied to the ISAM card security application method for recharging the bus IC card wallet described in the aforementioned embodiment. The two are based on a general inventive concept. Therefore, the specific implementation details of each module of the ISAM card please refer to the relevant description of the aforementioned embodiment and will not be repeated here.
[0120] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.
[0121] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" refers to at least two.
[0122] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.
[0123] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0124] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0125] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0126] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0127] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0128] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A safe application method for ISAM card for recharging a public transportation IC card wallet, characterized in that: include: The AFC device obtains the target activation key for the target offline recharge date; The target activation key is only valid within the target offline recharge date; During the target offline recharge date, when the AFC device determines that the ISAM card needs to be activated, the AFC device sends an activation instruction to the ISAM card; the activation instruction carries the target offline recharge date and the target activation key; The ISAM card performs a preset activation operation based on the activation instruction; After the ISAM card is successfully activated, if the AFC device determines that the target user's IC card needs to be recharged offline, the AFC device uses the ISAM card to perform offline recharge on the IC card.
2. The ISAM card security application method for recharging a public transportation IC card wallet according to claim 1, characterized in that: The validity period of any activation key is one day; The AFC device obtains activation keys for N consecutive days from the target system within the target day, where the starting day of the N consecutive days is the target day; The target system is a system maintained by the issuer of the ISAM card.
3. The ISAM card security application method for recharging a public transportation IC card wallet according to claim 2 is characterized in that: The N is equal to 3.
4. The ISAM card security application method for recharging a public transportation IC card wallet according to claim 1, characterized in that: The ISAM card performs a preset activation operation based on the activation instruction, specifically including: The ISAM card parses the activation instruction to obtain the target offline recharge date and the target activation key; The ISAM card determines whether the target offline recharge date is earlier than the offline recharge date stored in the ISAM card; the offline recharge date stored in the ISAM card is the date when the ISAM card was last activated; If the target offline recharge date is earlier than the offline recharge date stored in the ISAM card, this process ends and the activation of the ISAM card fails.
5. The ISAM card security application method for recharging a public transportation IC card wallet according to claim 4 is characterized in that: The ISAM card performs a preset activation operation based on the activation instruction, specifically including: If the target offline recharge date is not earlier than the offline recharge date stored in the ISAM card, the ISAM card determines the value of the target variable; wherein, when the target offline recharge date is later than the offline recharge date stored in the ISAM card, the value of the target variable is a first value, and when the target offline recharge date is equal to the offline recharge date stored in the ISAM card, the value of the target variable is a second value; The ISAM card verifies the target activation key using the target offline recharge date; After the target activation key is verified, the ISAM card uses the target offline recharge date to update the offline recharge date stored internally; The ISAM card uses its own UID to perform PIN authentication on the target directory of the ISAM card, and activates the target directory after the PIN authentication is passed; the target directory includes the directory that must be accessed when using the ISAM card for offline recharge; When the target variable takes the first value, the ISAM card updates its remaining recharge amount to a preset recharge amount, where the preset recharge amount is the total available recharge amount of the ISAM card within the target offline recharge date.
6. The ISAM card security application method for recharging a public transportation IC card wallet according to claim 5 is characterized in that: The AFC device uses the ISAM card to perform offline recharge on the IC card, specifically including: The AFC device sends a start-load transaction instruction to the IC card, so that the IC card returns a first message authentication code to the AFC device according to the start-load transaction instruction; the first message authentication code carries the electronic wallet balance, transaction amount, transaction type identifier and AFC device code; After receiving the first message authentication code, the AFC device sends an offline recharge request to the ISAM card, wherein the offline recharge request includes the first message authentication code; After receiving the offline recharge request, the ISAM card determines whether the current transaction date is consistent with the offline recharge date stored in the ISAM card; If the current transaction date is consistent with the offline recharge date stored in the ISAM card, the ISAM card determines whether the remaining recharge amount is greater than or equal to the transaction amount; If the remaining recharge amount of the ISAM card is greater than or equal to the transaction amount, the ISAM card verifies whether the first message authentication code is valid; If the first message authentication code is valid, the ISAM card performs a preset deduction and recharge amount operation on the target account of the target user, updates its own remaining recharge amount based on the transaction amount, and generates a second message authentication code; the second message authentication code carries the transaction amount, the transaction type identifier, the AFC device code, the transaction date and the transaction time; The ISAM card sends a load-to-deposit transaction acceptance message to the AFC device; the load-to-deposit transaction acceptance message includes the second message authentication code, the transaction date and the transaction time; The AFC device performs a preset recharging operation on the IC card according to the recharge transaction acceptance message.
7. The ISAM card security application method for recharging a public transportation IC card wallet according to claim 1, characterized in that: Before the AFC device uses the ISAM card to perform offline recharge on the IC card, the method further includes: If the target server's response time to the request sent by the AFC device exceeds a preset response time threshold, or the AFC device cannot establish a communication connection with the target server, the AFC device switches to an offline recharge mode; the target server is the server used by the AFC device for online recharge; When the AFC device is in the offline recharging mode, if the AFC device receives an IC card recharging request sent by the target user, the AFC device determines that offline recharging is required for the IC card of the target user.
8. The ISAM card security application method for recharging a public transportation IC card wallet according to claim 1, characterized in that: Before the AFC device sends the activation instruction to the ISAM card, the method further includes: After the AFC device is restarted, or after the AFC device resets the ISAM card, or after the AFC device switches the system date, the AFC device determines that the ISAM card needs to be activated.
9. The ISAM card security application method for recharging a public transportation IC card wallet according to claim 1, characterized in that: The duration of the target offline recharge date is one day.
10. An ISAM card, characterized in that: The ISAM card security application method applied to the recharging of the public transportation IC card wallet according to any one of claims 1 to 9, wherein the ISAM card comprises: A receiving module, configured to receive an activation instruction sent by the AFC device; the activation instruction carries a target offline recharge date and a target activation key; the target activation key is valid only within the target offline recharge date; An activation module, used to perform a preset activation operation based on the activation instruction; The recharge module is used to perform offline recharge on the IC card of the target user through the AFC device when it is determined through the AFC device that offline recharge is required; and to control the cumulative recharge amount of the ISAM card during each activation validity period to not exceed the preset recharge amount.
