CN109754505B - Unlocking method and device based on IC card - Google Patents

Unlocking method and device based on IC card Download PDF

Info

Publication number
CN109754505B
CN109754505B CN201811558799.0A CN201811558799A CN109754505B CN 109754505 B CN109754505 B CN 109754505B CN 201811558799 A CN201811558799 A CN 201811558799A CN 109754505 B CN109754505 B CN 109754505B
Authority
CN
China
Prior art keywords
card
target
read
unlocking
code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811558799.0A
Other languages
Chinese (zh)
Other versions
CN109754505A (en
Inventor
苏浩伟
谢振东
顾裕波
温晓丽
袁勇
邹大毕
李靖凯
李泽城
叶少华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Yang Cheng Tong Co ltd
Original Assignee
Guangzhou Yang Cheng Tong Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Yang Cheng Tong Co ltd filed Critical Guangzhou Yang Cheng Tong Co ltd
Priority to CN201811558799.0A priority Critical patent/CN109754505B/en
Publication of CN109754505A publication Critical patent/CN109754505A/en
Application granted granted Critical
Publication of CN109754505B publication Critical patent/CN109754505B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Lock And Its Accessories (AREA)

Abstract

The invention discloses an unlocking method and device based on an IC card, wherein the unlocking method based on the IC card comprises the following steps: when an unlocking request triggered by a user is detected, the read-write device identifies a target IC card according to the unlocking request; the read-write device verifies the target IC card according to a preset verification rule, and when the verification is successful, the read-write device verifies the target IC card according to a preset service rule; and when the verification is successful, the reading and writing device controls the locking device to be unlocked. The invention can simplify the unlocking process of the user based on the IC card, thereby facilitating the unlocking of the user, and simultaneously, the problem of carrier privatization of the unlocking device caused by the damage of the two-dimensional code because the IC card is relatively private is avoided.

Description

Unlocking method and device based on IC card
Technical Field
The invention relates to the technical field of internet, in particular to an unlocking method and device based on an IC card.
Background
With the development of society, a series of shared articles appear, and the shared articles are usually provided with a lock device and an unlocking code of the lock device, and when a user needs to use the shared articles, the user needs to scan the unlocking code of the lock device and then open a reading and writing device. However, in actual use, the user finds that the unlocking mode is not simple enough and needs to spend a long time, for example, when the network signal of the mobile phone of the user is poor, the use of the unlocking mode can cause the user to spend a long time waiting for the lock device to unlock. On the other hand, the unlocking mode depends on the unlocking code, once the unlocking code is maliciously damaged, the locking device cannot be normally opened, and then the user cannot use the shared object, even the shared object is privatized.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide an unlocking method and device based on an IC card, which are used to realize that a lock device is not privatized while realizing convenient unlocking by a user by using the IC card.
In order to solve the technical problem, a first aspect of the embodiments of the present invention discloses an unlocking method based on an IC card, including:
when an unlocking request triggered by a user is detected, the read-write device identifies a target IC card according to the unlocking request;
the read-write device verifies the target IC card according to a preset verification rule, and when the verification is successful, the read-write device verifies the target IC card according to a preset service rule;
and when the verification is successful, the reading and writing device controls the locking device to be unlocked.
Optionally, the identifying the target IC card by the read-write device may include:
the read-write device judges whether the target IC card exists in the wireless identification range of the read-write device according to the unlocking request;
and when the target IC card is judged to exist, the read-write device reads the relevant information of the target IC card, wherein the relevant information comprises the identification ID of the target IC card, the use starting time of the target IC card and the use ending time of the target IC card.
Optionally, the verifying the target IC card by the read/write device according to a preset verification rule may include the following steps:
the read-write device randomly generates an identifying code and temporarily stores the identifying code;
the read-write device writes the verification code into the target IC card so that the target IC card generates a first MAC code according to a first preset generation mode, the related information and the verification code;
the read-write device generates a second MAC code according to the first preset generation mode, the verification code and the related information;
the read-write device receives the first MAC code sent by the target IC card and judges whether the first MAC code is consistent with the second MAC code;
and when the first MAC code is judged to be consistent with the second MAC code, the read-write device determines that the target IC card is successfully verified.
Optionally, the verifying, by the read-write apparatus, the target IC card according to a preset service rule may include the following operations:
the read-write device takes the identification ID of the target IC card as an inquiry condition, and inquires whether the list of the unlocking forbidding ID contains the identification ID or not in the list of the unlocking forbidding ID;
when the inquiry result shows that the unlocking prohibition ID form does not contain the identification ID, the read-write device judges whether the service life of the target IC card is due according to the use starting time of the target IC card, the use ending time of the target IC card and a preset service life judgment rule, if the judgment result shows that the service life of the target IC card is due, the target IC card is determined to be checked to be passed, and if the judgment result shows that the service life of the target IC card is not to be passed, the target IC card is determined to be checked to be not to be passed.
Optionally, the method further includes:
and when the inquiry result shows that the unlocking prohibition ID form contains the identification ID, the read-write device generates unlocking refusal information.
Optionally, the method further includes:
when the read-write device determines that the target IC card fails to be verified, the read-write device initiates a renewal operation on the target IC card, where the initiation of the renewal operation on the target IC card by the read-write device may include:
the read-write device acquires a first renewal code randomly generated by the target IC card and acquires a third MAC code generated by the target IC card according to a second preset generation mode, the related information and the first renewal code;
the read-write device sends the first renewal code, the third MAC code and the related information to an operation server, so that the operation server generates a fourth MAC code and a second renewal code, and generates a fifth MAC code when judging that the third MAC code is the same as the fourth MAC code;
the read-write device receives the renewal information, the fifth MAC code and the second renewal code sent by the operation server;
the read-write device writes the second renewal code, the fifth MAC code and the renewal information into the target IC card, so that the target IC card generates a sixth MAC code and enables the renewal information when the sixth MAC code is the same as the fifth MAC code, and the renewal information comprises new use starting time and new use ending time.
Optionally, the method further includes:
and the read-write device receives the renewal success prompt message sent by the target IC card and sends the renewal success prompt message to the operation server.
Optionally, the related information of the target IC card further includes an authentication subkey;
before the read-write device identifies the target IC card and reads the relevant information of the target IC card, the unlocking method also comprises the step that the read-write device executes initialization operation.
Optionally, the performing, by the read/write device, an initialization operation includes:
and the read-write device receives an authentication master key which is sent by a write-in terminal and generated according to a preset key generation rule, wherein the relationship between the authentication master key and the authentication sub-keys in the related information is a dispersed relationship.
Optionally, after the read-write device controls the lock device to be unlocked, the unlocking method further includes:
the read-write device records unlocking information, wherein the unlocking information comprises at least one of user ID, unlocking time and unlocking position which are in binding relationship with the identification ID of the target IC card.
Optionally, the unlocking method further includes:
when a locking request triggered by the user is detected, the read-write device controls the locking device to lock and records locking information of the read-write device, wherein the locking information comprises at least one of locking time, locking position information and the user ID;
and the read-write device sends the locking information and the unlocking information to an operation server, so that the operation server calculates the use cost required to be paid by the user according to the locking information and the unlocking information and sends the use cost to the user terminal.
Optionally, the unlocking method further includes:
the read-write device sends an updating request aiming at the unlocking prohibition ID form to an operation server according to a preset access frequency, so that the operation server returns an updated unlocking prohibition ID form to the read-write device after receiving the updating request;
and the read-write device receives the updated unlocking prohibition ID table and replaces the unlocking prohibition ID table with the updated unlocking prohibition ID table.
The second aspect of the present invention also discloses an unlocking device based on an IC card, the device comprising:
the system comprises an identification module, a verification module and a verification module, wherein the identification module is used for identifying a target IC card and reading related information of the target IC card when a user triggers an unlocking request, and the related information comprises an identification ID of the target IC card;
the verification module is used for verifying the relevant information according to a preset verification rule after the identification module identifies the target IC card and reads the relevant information of the target IC card;
the verification module is used for verifying the relevant information according to a preset verification rule and verifying the relevant information according to a preset service rule after the relevant information is successfully verified;
and the driving module is used for controlling the locking device to be unlocked after the verification module successfully verifies the related information.
Optionally, the identification module may include:
the first judgment submodule is used for judging whether the target IC card exists in the wireless identification range of the unlocking request according to the unlocking request;
and the reading sub-module is used for reading the related information of the target IC card when the first judging sub-module judges that the target IC card exists, wherein the related information comprises the identification ID of the target IC card, the use starting time of the target IC card and the use ending time of the target IC card.
Optionally, the verification module may include:
the verification code generation submodule is used for randomly generating a verification code and temporarily storing the verification code;
the writing submodule is used for writing a verification code into the target IC card after the verification code generation submodule randomly generates the verification code and temporarily stores the verification code so as to enable the target IC card to generate a first MAC according to a first preset generation mode, the related information and the verification code;
the MAC generation submodule is used for generating a second MAC code according to the first preset generation mode, the verification code and the related information;
the first receiving submodule is used for receiving the first MAC code sent by the target IC card;
and the second judging submodule is used for judging whether the first MAC code is consistent with the second MAC code after the first receiving submodule receives the first MAC code sent by the target IC card, and the read-write device determines that the target IC card is successfully verified when the first MAC code is judged to be consistent with the second MAC code.
Optionally, the verification module may include:
the query submodule is used for querying in an unlocking prohibition ID form by taking the identification ID of the target IC card as a query condition so as to judge whether the unlocking prohibition ID form contains the identification ID and generate a query result;
a third judging submodule, configured to, when the query result indicates that the unlocking prohibition ID form does not include the identification ID, judge whether a lifetime of the target IC card expires according to the start time of use of the target IC card, the end time of use of the target IC card, and a preset lifetime judgment rule, if the judgment result is negative, determine that the target IC card passes verification, and if the judgment result is positive, determine that the target IC card does not pass verification;
the renewal submodule is used for initiating renewal operation on the target IC card when the third judgment submodule determines that the target IC card cannot be verified;
and the first prompting module is used for generating unlocking refusing information when the query result of the query submodule indicates that the unlocking forbidding ID list contains the identification ID.
Optionally, the specific manner of initiating the renewal operation on the target IC card by the renewal sub-module may be as follows:
acquiring a first renewal code randomly generated by the target IC card and acquiring a third MAC code generated by the target IC card according to a second preset generation mode, the related information and the first renewal code;
sending the first renewal code, the third MAC code and the related information to an operation server so that the operation server generates a fourth MAC code and a second renewal code, and generates a fifth MAC code when judging that the third MAC code is the same as the fourth MAC code
Receiving the renewal information, the fifth MAC code and the second renewal code sent by the operation server;
writing the second renewal code, the fifth MAC code and the renewal information into the target IC card, so that the target IC card generates a sixth MAC code and enables the renewal information when the sixth MAC code is the same as the fifth MAC code, wherein the renewal information comprises a new use starting time and a new use ending time;
and receiving the renewal success prompt message sent by the target IC card, and sending the renewal success prompt message to the operation server.
Optionally, an unlocking device based on an IC card disclosed in the second aspect of the present invention further includes:
an initialization module, configured to perform an initialization operation before the identification module identifies the target IC card and reads the related information of the target IC card, where the initialization operation may include the steps of:
and the read-write device receives an authentication master key which is sent by a write-in terminal and generated according to a preset key generation rule, wherein the relationship between the authentication master key and the authentication sub-keys in the related information is a dispersed relationship.
Optionally, the unlocking device based on an IC card disclosed in the second aspect of the present invention further includes:
and the recording module is used for recording unlocking information after the driving module controls the locking device to be unlocked, wherein the unlocking information can comprise at least one of a user ID, unlocking time and unlocking position which have binding relationship with the identification ID of the target IC card.
Optionally, the recording module is further configured to record locking information when a locking request triggered by the user is detected, where the locking information may include at least one of locking time, locking position, and user ID with a binding relationship between identification IDs of the target IC card.
Optionally, an unlocking device based on an IC card disclosed in the second aspect of the present invention further includes:
and the settlement module is used for sending the locking information and the unlocking information to the operation server after the recording module records the locking information of the reading-writing device, so that the operation server calculates the use cost required to be paid by the user according to the locking information and the unlocking information and sends the use cost to the user terminal.
Optionally, the initialization module is further configured to send an update request for the unlocking prohibition ID table to an operation server according to a preset access frequency, so that the operation server returns the updated unlocking prohibition ID table to the read-write device after receiving the update request;
and the read-write device receives the updated unlocking prohibition ID table and replaces the unlocking prohibition ID table with the updated unlocking prohibition ID table.
The third aspect of the present invention also discloses another unlocking device based on an IC card, the unlocking device comprising:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program codes stored in the memory to execute the IC card-based unlocking method disclosed by the first aspect of the invention.
The fourth aspect of the present invention also discloses a computer-readable storage medium, which includes an IC card-based unlocking program, and when the IC card-based unlocking program is executed by a processor, the IC card-based unlocking method according to the first aspect of the present invention is executed.
Therefore, the invention can simplify the unlocking process of the user based on the IC card, thereby facilitating the unlocking of the user, and meanwhile, the problem of carrier privatization of the unlocking device caused by the damage of the two-dimensional code is avoided because the IC card is relatively private.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic flow chart of an IC card-based unlocking method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of an IC card-based unlocking method disclosed in the second embodiment of the present invention;
fig. 3 is a schematic structural view of an unlocking device based on an IC card according to a third embodiment of the present invention;
fig. 4 is a schematic structural view of an IC card-based unlocking device disclosed in the fourth embodiment of the present invention;
fig. 5 is a schematic structural view of an IC card-based unlocking device according to a fifth embodiment of the present invention.
Detailed Description
For better understanding and implementation, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
With the development of economy in China, a large number of shared articles, such as a shared bicycle, a shared induction cooker and the like, emerge on the market, and generally, in order to realize the sharing of the shared articles, the shared articles are provided with a lock device and two-dimensional codes or serial numbers. When the user needs practical shared article, the user need scan the two-dimensional code or serial number and acquire the password of unblanking, then inputs the password of unblanking on the locking device to make the locking device verify that the password of unblanking unblanks through the back, and then realize shared article's practicality. In such a scenario, when the user uses the shared article, a series of relatively complicated actions such as scanning the two-dimensional code and inputting the two-dimensional code by using the mobile terminal need to be executed, which further results in poor user experience. Meanwhile, the existing unlocking method for the shared goods depends on the two-dimension code or the number, and when the two-dimension code or the number is maliciously damaged by one user, other users cannot obtain the unlocking password, and the shared goods cannot be shared and are privatized. Aiming at the scene, the embodiment of the invention discloses an unlocking method and device based on an IC card. The IC card-based unlocking method and apparatus will be described in detail with reference to the following embodiments.
Example one
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating an unlocking method based on an IC card according to an embodiment of the present invention. As shown in fig. 1, the unlocking method based on the IC card may include the following steps:
101. when an unlocking request triggered by a user is detected, the read-write device identifies a target IC card according to the unlocking request;
102. the read-write device verifies the target IC card according to a preset verification rule, and when the verification is successful, the read-write device verifies the target IC card according to a preset service rule;
103. and when the verification is successful, the reading and writing device controls the lock device to be opened.
In the embodiment of the present invention, optionally, the read-write device may be a radio frequency reader-writer, where the radio frequency reader-writer includes a radio frequency module, a network communication module, an SAM module, an antenna, a central controller, a driving motor, and an IO port. The radio frequency module is used for sending a radio frequency signal with a preset frequency, and the antenna is used for receiving the radio frequency signal with the preset frequency. The SAM module comprises an SAM chip, and is optional, the SAM chip can comprise a pre-stored authentication master key, the central controller can be a single chip microcomputer, the driving motor is connected with a lock device arranged on a shared article, and therefore, the read-write device can detect whether a target IC card exists in a wireless identification range of the antenna, when the target IC card is detected, the radio frequency module transmits a radio frequency signal to realize communication with the target IC card, and then the central controller controls the driving module according to data of the SAM chip and data of the target IC card, so that the driving motor drives the lock device to unlock, and finally article sharing is realized. Further optionally, the radio frequency reader may further include a network communication module, where the network communication module may be a 2G communication module, a 3G communication module, a 4G communication module, or another communication module capable of implementing remote communication, and the network communication module may communicate with a remote server, for example, communicate with an operation server.
In the embodiment of the present invention, optionally, the read-write device may further include a display screen and a buzzer, where the display screen is configured to display prompt information, for example, when the target IC card is identified by the radio frequency module and the service life of the target IC card is read, the display screen may display the service life information, so that a user may know the remaining number of times of use of the target IC card in time, and further, the user may recharge the target IC card in time when the remaining number of times of use of the target IC card is small.
In the embodiment of the present invention, optionally, the read/write device may have two working states, a first working state is a low power consumption state, a second working state is an operating state, and a default state of the read/write device is a low power consumption state. When a certain user needs to unlock or lock, the user can press the unlock button to make the read-write device convert from the low power consumption state to the running state, and at the moment, the read-write device starts to identify the target IC card. When no user needs to unlock or lock, the read-write device can convert the state from the running state to the low power consumption state within the preset time limit so as to reduce the power consumption. It should be noted that the read/write device may have three or more operating states, which is not limited in the present invention.
In the embodiment of the present invention, the target IC card is an IC card that is being used by the user for unlocking and can be recognized by the read/write device, wherein the target IC card may be a contactless IC card or a contact IC card, and the present invention is not limited to this. Preferably, the target IC card according to the embodiment of the present invention is a non-contact IC card, where the non-contact IC card may include an antenna, a resonant circuit, and a control chip, where the antenna of the IC card may receive a radio frequency signal with a preset frequency, the resonant circuit may generate a working charge according to the radio frequency signal received by the antenna of the IC card, and the control chip may operate under the driving of the working charge. Further alternatively, the control chip includes a central controller (e.g., an EEPROM (Electrically Erasable and Programmable read only memory)), and a memory, where the memory stores a program executable by the central controller in advance.
The unlocking method based on the IC card can be used in the field of shared bicycles. For example, in the field of sharing single cars, each sharing single car is provided with a read-write device capable of identifying a target IC card and reading the target IC card, when a certain user brings the target IC card close to the read-write device and the read-write device identifies the target IC card in a wireless identification range, the read-write device is provided with preset verification rules and verification rules to verify and verify information in the target IC card, when the verification and verification are passed, a central controller sends a driving signal to a driving motor to drive a lock device of the read-write device to unlock so as to realize sharing of the single car in the form of swiping the IC card, while the existing unlocking method of the sharing single car generally comprises the steps that the user obtains an unlocking password of the single car by scanning a two-dimensional code, then inputs the unlocking password on the lock device of the sharing single car, and then the lock device unlocks after the unlocking password is verified successfully, and the unlocking method for realizing sharing relies on the two-dimensional code or the single car number, therefore, when the two-dimension code or the bicycle number is maliciously damaged, other users cannot unlock the lock, and the bicycle cannot be shared, so that the shared bicycle is privatized. The unlocking method based on the IC card does not depend on the two-dimensional code or the single car number, and the IC card bound with the user account is used as the unlocking tool, so that the problems in the prior art are avoided.
The unlocking device based on the IC card can also be applied to the field of shared kitchenware, for example, in order to realize kitchenware sharing, the IC card can be placed on an identification device of the shared kitchenware, the identification device reads information in the IC card and verifies the information in the IC card, when the verification is passed, a user can share the kitchenware, and the existing kitchenware sharing method also needs to scan a two-dimensional code, acquire the information of the kitchenware and then input a password to use the shared kitchenware. Thus, the operation steps for realizing the kitchen ware sharing are relatively complicated.
It should be noted that the embodiment of the present invention only exemplifies some application occasions of the unlocking method of the basic IC card, and the unlocking method of the basic IC card of the embodiment of the present invention may be applied to other application scenarios without departing from the inventive concept of the present invention, and the present invention is not limited to this.
Therefore, the unlocking device based on the IC card can store unlocking related information in the target IC card and/or the read-write device, so that the unlocking information of the lock device is not exposed, and the problems that shared objects are privatized due to the fact that the unlocking information is exposed and the unlocking information is maliciously damaged are avoided, for example, the problem that a shared bicycle is privatized due to the fact that a two-dimensional code of the shared bicycle is damaged is avoided. Meanwhile, the IC card can pre-select and store unlocking information, and the read-write device can directly read the information in the IC card, so that when a user uses a shared article, a series of operations of scanning a two-dimensional code to obtain an unlocking password and inputting the unlocking password to unlock the shared article are not needed, and the unlocking device based on the IC card has the advantages of simplicity and convenience in operation and high user experience.
Example two
Referring to fig. 2, fig. 2 is a schematic flow chart of an IC card-based unlocking method according to a second embodiment of the present invention. As shown in fig. 2, the unlocking method based on the IC card may include the following steps:
201. the read-write device executes initialization operation;
202. when an unlocking request triggered by a user is detected, the read-write device identifies a target IC card according to the unlocking request;
203. the read-write device verifies the target IC card according to a preset verification rule;
204. when the verification is successful, the read-write device verifies the target IC card according to a preset service rule;
205. and when the verification is successful, the reading and writing device controls the lock device to be opened.
206. The read-write device records unlocking information, wherein the unlocking information comprises at least one of a user ID, unlocking time and an unlocking position which are in binding relationship with the identification ID of the target IC card;
207. when a locking request triggered by a user is detected, the read-write device controls the locking device to lock and records current use information of the read-write device, wherein the current use information comprises at least one of locking time, locking position information, unlocking time and user ID;
208. and the read-write device sends the current use information and the unlocking information to the operation server, so that the operation server calculates the use cost of the read-write device according to the current use information and the unlocking information and sends the use cost to the user terminal.
In the embodiment of the present invention, when each of the read/write devices is installed on a shared article, an initialization operation is performed to initialize operation parameters of the read/write device and other data items, optionally, the operation parameters of the read/write device include at least one of a system time item of the read/write device, an identification ID item of the read/write device, a self-triggered access network frequency item of the read/write device, a sleep latency item of the read/write device, and an access address item of an operation server, where the sleep latency of the read/write device represents a latency time for the read/write device to be converted from an operating state to a low power consumption state in the case of no human operation, and the self-triggered access network frequency item of the read/write device represents a frequency for the read/write device to autonomously access the operation server.
In an optional embodiment, a user may register a user account through a user terminal, where each user account is associated with a user password and a unique ID of the user, and the user may also log in the user account through the user terminal and bind an IC card, in the optional embodiment, optionally, each user ID may bind one IC card, or may bind two or more IC cards, further optionally, binding the IC card may include operations of:
the user terminal obtains a password of the IC card to be bound, which is input by a user, wherein the password of the IC card to be bound is arranged in a coating area of the IC card to be bound.
The user terminal sends the password of the IC card to be bound and the user ID to the operation server, so that the operation server binds the ID of the IC card to be bound according to the password of the IC card to be bound and a preset matching rule, and binds the ID of the IC card to be bound with the user ID.
In yet another optional embodiment, the user may add value to the IC card associated with the user account through the user terminal, and optionally, adding value to the IC card associated with the user account may include the following operations:
when a user triggers a charging operation aiming at an IC card to be charged on a user terminal, the user terminal sends a charging request to an operation server, wherein the charging request comprises an ID (identity) of the IC card to be charged, a charging amount and first charging verification information;
the operation server receives a recharging request;
the operation server verifies the first recharging verification information according to the recharging information verification rule;
after the recharging verification information passes verification, the operation server queries the ID of the IC card to be recharged in an IC card database according to the ID of the IC card to be recharged;
the operation server modifies the amount of money associated with the ID of the IC card to be recharged;
the operation server returns recharging success information to the user terminal, and the recharging success information comprises second recharging verification information;
the user terminal receives the recharging success information and verifies the second recharging verification information according to the recharging information verification rule, and when the second recharging verification information passes the verification, the user terminal generates new use start time and new use end time according to the recharging amount;
and the user terminal writes the new use start time and the new use end time into the IC card to be recharged.
In the embodiment of the present invention, in order to ensure the security of data in the target IC card, the communication between the target IC card and the read/write device may be encrypted, for example, each target IC card stores an authentication sub-key, and each read/write device stores an authentication main key, and optionally, the writing of the authentication main key into the read/write device and the writing of the authentication sub-key into the IC card may further include the following operations:
the write-in terminal generates an authentication master key according to a preset key generation rule;
the write-in terminal calculates an authentication sub-key according to the authentication main key and a dispersion algorithm;
the write-in terminal writes the authentication master key into the read-write device and stores the authentication sub-key;
the write terminal writes the authentication sub-key into the IC card.
In the embodiment of the present invention, optionally, when the user brings the target IC card close to the wireless identification range of the read/write device, the read/write device may automatically start to identify the target IC card, and optionally, the operation of identifying the target IC card by the read/write device may include:
the read-write device judges whether a target IC card exists in the wireless identification range of the read-write device according to the unlocking request;
when the target IC card is judged to exist, the reading and writing device reads the relevant information of the target IC card, wherein the relevant information comprises the identification ID of the target IC card, the use starting time of the target IC card and the use ending time of the target IC card.
In the embodiment of the present invention, the information related to the target IC card may further include at least one of a user name, a user password, a binding time, and a user ID.
In the embodiment of the present invention, optionally, the verifying the target IC card by the read-write device according to the preset verification rule may include the following operations:
the read-write device randomly generates an identifying code and temporarily stores the identifying code;
the read-write device writes the verification code into the target IC card so that the target IC card generates a first MAC code according to a first preset generation mode, the related information and the verification code;
the read-write device generates a second MAC code according to the first preset generation mode, the verification code and the related information;
the read-write device receives a first MAC code sent by a target IC card and judges whether the first MAC code is consistent with a second MAC code;
and when the first MAC code is judged to be consistent with the second MAC code, the read-write device determines that the target IC card is successfully verified.
In the embodiment of the present invention, further optionally, the generating, by the target IC card, the first MAC code according to the first preset generation manner, the related information, and the verification code may include:
processing the related information and the verification code in sequence and generating a plurality of sub data blocks with the length of one byte;
sequentially processing a plurality of sub-data blocks according to a DES algorithm, and splicing the processing result of each sub-data block to generate a total data block with the length of 8 bytes;
and taking the authentication master key as an encryption parameter, processing the total data block according to a DES algorithm and generating a first MAC code.
In the embodiment of the present invention, optionally, the verifying the target IC card by the read/write device according to the preset service rule includes:
the read-write device queries in the unlocking prohibition ID form by taking the identification ID of the target IC card as a query condition so as to judge whether the unlocking prohibition ID form contains the identification ID and generate a query result;
and when the inquiry result shows that the unlocking prohibition ID form does not contain the identification ID, the read-write device judges whether the service life of the target IC card is due according to the use starting time of the target IC card, the use ending time of the target IC card and a preset service life judgment rule, and if the judgment result shows that the service life of the target IC card is due, the target IC card is determined to be verified. Further optionally, when the query result is that the unlocking prohibition ID form contains the identification ID, the read-write device generates unlocking rejection information.
In the embodiment of the present invention, further optionally, when the read/write device determines that the lifetime of the target IC card has expired according to the start of use of the target IC card, the end time of use of the target IC card, and the preset lifetime judgment rule, the read/write device determines that the verification of the target IC card fails. Further optionally, when the read-write device determines that the target IC card fails to be verified, the read-write device initiates a renewal operation on the target IC card, where the read-write device initiates the renewal operation on the target IC card includes:
the read-write device acquires a first renewal code randomly generated by the target IC card and acquires a third MAC code generated by the target IC card according to a second preset generation mode, related information and the first renewal code;
the read-write device sends the first renewal code, the third MAC code and the related information to the operation server, so that the operation server generates a fourth MAC code and a second renewal code, and generates a fifth MAC code when judging that the third MAC code is the same as the fourth MAC code;
the read-write device receives the renewal information, the fifth MAC code and the second renewal code sent by the operation server;
the read-write device writes the second renewal code, the fifth MAC code and the renewal information into the target IC card so that the target IC card generates a sixth MAC code and starts the renewal information when the sixth MAC code is the same as the fifth MAC code, and the renewal information comprises new use starting time and new use ending time;
and the read-write device receives the renewal success prompt message sent by the target IC card and sends the renewal success prompt message to the operation server.
In this embodiment of the present invention, further optionally, the generating, by the target IC card, the third MAC code according to the second preset generation manner, the related information, and the first renewal code may include the following operations:
processing the related information and the first duration code in sequence and generating a plurality of sub data blocks with the length of one byte;
processing a plurality of sub-data blocks in sequence according to a DES algorithm, and splicing the processing result of each sub-data block to generate a total data block with the length of 8 bytes;
and taking the authentication master key as an encryption parameter, processing the total data block according to a DES algorithm and generating a third MAC code.
In the embodiment of the invention, because the identification ID and the verification code of each IC card are randomly generated, the MAC code generated each time is different, so the MAC can not be reused, and because the data between the target IC card and the read-write device can be received only under the condition that the MAC codes generated by the target IC card and the read-write device are consistent, the authentication security of the IC card is improved.
In still another optional embodiment, the IC card-based unlocking method according to the embodiment of the present invention may further include the following operations:
the read-write device sends an updating request aiming at the forbidden unlocking ID form to the operation server according to the preset access frequency, so that the operation server returns an updated forbidden unlocking ID form to the read-write device after receiving the updating request;
and the read-write device receives the updated unlocking prohibition ID table and replaces the unlocking prohibition ID table with the updated unlocking prohibition ID table.
In this optional embodiment, the read-write device stores an unlocking prohibition ID table, where the unlocking prohibition ID table stores records of a plurality of users who are prohibited from using the IC card, and each record may include a user ID. Meanwhile, the unlocking prohibition ID table can be generated in various occasions and can be shared by a plurality of terminals or a plurality of platforms, for example, when a certain user swipes an IC card to enter a subway station, but does not swipe the IC card when the user goes out of the subway station, under the condition, a ticket checking terminal of the subway station adds the ID of the IC card into the unlocking prohibition ID table and updates the ID into an operation server, so that the read-write device can acquire the unlocking prohibition ID table from the operation server, and the unlocking prohibition ID table can be shared. In this optional embodiment, optionally, the access may be performed once per hour or once per day according to the preset access frequency, which is not limited in the present invention.
In this optional embodiment, when a certain user loses the IC card bound to the certain user, the user may submit an IC card freezing application to the operation server, so that the operation server adds the ID of the IC card that needs to be frozen to the ID card prohibited from being unlocked, and then other users cannot take the frozen IC card to realize the unlocking operation, further optionally, the operation server freezing the IC card may include the following operations:
the operation server receives a freezing application triggered by a user and aiming at a certain IC card to be frozen, wherein the freezing application comprises an identification ID (identity) of the IC card to be frozen and user information;
the operation server queries the authentication information of the IC card to be frozen by taking the identification ID of the IC card to be frozen as a query condition;
the operation server judges whether the authentication information is consistent with the user information, if so, the ID of the IC card to be frozen is identified, and if not, the operation server returns user information verification failure information to the user terminal where the user is located.
Therefore, in the optional embodiment, the unlocking prohibition ID table can be updated through the network, and after the ID of one IC card is read, whether the IC card can be used or not is determined according to the unlocking prohibition IC table, so that the use of the shared goods by the user who is not normally used can be restricted, and the risk that the shared goods are privately owned is further reduced. Meanwhile, the alternative embodiment can limit the use of the frozen IC card, thereby improving the use safety of the IC card.
EXAMPLE III
Referring to fig. 3, fig. 3 is a schematic structural diagram of an unlocking device based on an IC card according to an embodiment of the present invention. As shown in fig. 3, the IC card-based unlocking device may include:
the identification module 301 is configured to identify a target IC card and read relevant information of the target IC card when a user triggers an unlock request, where the relevant information includes an identifier ID of the target IC card;
the verification module 302 is configured to verify relevant information according to a preset verification rule after the identification module 301 identifies the target IC card and reads the relevant information of the target IC card;
the verification module 303 is configured to verify the relevant information according to a preset verification rule at the verification module 302, and verify the relevant information according to a preset service rule after the relevant information is successfully verified;
the driving module 304 controls the lock device to open after the verification module 303 successfully verifies the relevant information.
In the embodiment of the present invention, the identification module 301, the verification module 302, the verification module 303, and the driving module 304 are all program function modules, and the program function modules may be implemented in hardware such as a read/write device and an IC card. Optionally, the read-write device may be a radio frequency reader-writer, where the radio frequency reader-writer includes a radio frequency module, a network communication module, an SAM module, an antenna, a central controller, a driving motor, and an IO port. The radio frequency module is used for sending a radio frequency signal with a preset frequency, and the antenna is used for receiving the radio frequency signal with the preset frequency. The SAM module comprises an SAM chip, and is optional, the SAM chip can comprise a pre-stored authentication master key, the central controller can be a single chip microcomputer, the driving motor is connected with a lock device arranged on a shared article, and therefore, the read-write device can detect whether a target IC card exists in a wireless identification range of the antenna, when the target IC card is detected, the radio frequency module transmits a radio frequency signal to realize communication with the target IC card, and then the central controller controls the driving module according to data of the SAM chip and data of the target IC card, so that the driving motor drives the lock device to unlock, and finally article sharing is realized. Further optionally, the radio frequency reader may further include a network communication module, where the network communication module may be a 2G communication module, a 3G communication module, a 4G communication module, or another communication module capable of implementing remote communication, and the network communication module may communicate with a remote server, for example, communicate with an operation server.
In the embodiment of the present invention, optionally, the read-write device may further include a display screen and a buzzer, where the display screen is configured to display prompt information, for example, when the target IC card is identified by the radio frequency module and the service life of the target IC card is read, the display screen may display the service life information, so that a user may know the remaining number of times of use of the target IC card in time, and further, the user may recharge the target IC card in time when the remaining number of times of use of the target IC card is small.
In the embodiment of the present invention, optionally, the read/write device may have two working states, a first working state is a low power consumption state, a second working state is an operating state, and a default state of the read/write device is a low power consumption state. When a user needs to unlock or lock, the user can press the unlock button to make the read-write device convert from the low power consumption state to the running state, and at the moment, the read-write device starts to identify the target IC card. When no user needs to unlock or lock, the read-write device can convert the state from the running state to the low power consumption state within the preset time limit so as to reduce the power consumption. It should be noted that the read/write device may have three or more operating states, which is not limited in the present invention.
In the embodiment of the present invention, the target IC card is an IC card that is being unlocked by the user and can be identified by the read/write device, where the IC card may be a contactless IC card or a contact IC card, and the present invention is not limited to this. Preferably, the IC card according to the embodiment of the present invention is a contactless IC card, where the contactless IC card may include an antenna, a resonant circuit, and a control chip, where the antenna of the IC card may receive a radio frequency signal with a preset frequency, the resonant circuit may generate a working charge according to the radio frequency signal received by the antenna of the IC card, and the control chip may operate under the driving of the working charge. Further alternatively, the control chip includes a central controller (e.g., an EEPROM (Electrically Erasable and Programmable read only memory)), and a memory, where the memory stores a program executable by the central controller in advance.
The unlocking device based on the IC card can be used in the field of shared bicycles. For example, in the field of shared bicycles, each shared bicycle is provided with a read-write device capable of identifying a target IC card and reading the target IC card, when a certain user brings the target IC card close to the read-write device and the read-write device identifies the target IC card within a wireless identification range, the read-write device is provided with preset verification rules and verification rules to verify and verify information in the target IC card, when the verification and verification are passed, a central controller sends a driving signal to a driving motor to drive a lock device of the read-write device to unlock so as to realize sharing of the bicycle in the form of swiping the IC card, while the existing unlocking method of the shared bicycle is that the user obtains an unlocking password of the bicycle by scanning a two-dimensional code, then inputs the unlocking password on the lock device of the shared bicycle, and the lock device verifies the unlocking password successfully and then unlocks, and the unlocking method for realizing sharing by unlocking relies on the two-dimensional code or the bicycle number, therefore, when the two-dimension code or the bicycle number is maliciously damaged, other users cannot unlock the lock, and the bicycle cannot be shared, so that the shared bicycle is privatized. The unlocking method based on the IC card does not depend on the two-dimensional code or the single car number, and the IC card bound with the user account is used as the unlocking tool, so that the problems in the prior art are avoided.
The unlocking device based on the IC card can also be applied to the field of shared kitchenware, for example, in order to realize kitchenware sharing, the IC card can be placed on an identification device of the shared kitchenware, the identification device reads information in the IC card and verifies the information in the IC card, when the verification is passed, a user can share the kitchenware, and the existing kitchenware sharing method also needs to scan a two-dimensional code, acquire the information of the kitchenware and then input a password to use the shared kitchenware. Thus, the operation steps for realizing the kitchen ware sharing are relatively complicated.
It should be noted that the embodiment of the present invention only exemplifies some application occasions of the unlocking method of the basic IC card, and the unlocking method of the basic IC card of the embodiment of the present invention can be applied to other application scenarios without departing from the inventive concept of the present invention, and the present invention is not limited to this.
Therefore, the unlocking device based on the IC card can store unlocking related information in the target IC card and/or the reading-writing device, so that the unlocking information of the lock device is not exposed, and the problems that shared objects are privatized due to the fact that the unlocking information is exposed and the unlocking information is maliciously damaged are further avoided, for example, the problem that a shared bicycle is privatized due to the fact that a two-dimensional code of the shared bicycle is damaged is avoided. Meanwhile, the unlocking information can be stored in the IC card in a preselection mode, the read-write device can directly read the information in the IC card, and then when a user uses the shared object, a series of operations such as scanning a two-dimensional code to obtain an unlocking password and inputting the unlocking password are not needed, so that the unlocking device based on the IC card has the advantages of being simple and convenient to operate and high in user experience.
Example four
Referring to fig. 4, fig. 4 is a schematic structural diagram of an unlocking device based on an IC card according to an embodiment of the present invention. As shown in fig. 4, the IC card-based unlocking device may further include an initialization module 305, a recording module 306, and a settlement module 307, in addition to the identification module 301, the verification module 302, the verification module 303, and the driving module 304.
In the embodiment of the present invention, the initialization module 305 is configured to perform an initialization operation before the identification module 301 identifies the target IC card and reads the relevant information of the target IC card, where the initialization operation may include initializing the operating parameters according to a preset initialization rule by the read-write apparatus. When each read-write device is installed on the shared object, initialization operation is executed to initialize the operation parameter data of the read-write device. Optionally, the operating parameter of the read/write device includes at least one of a system time item of the read/write device, an identifier ID item of the read/write device, a self-triggered access network frequency item of the read/write device, a sleep latency item of the read/write device, and an access address item of the operation server, where the sleep latency of the read/write device represents a latency time for the read/write device to be converted from an operating state to a low power consumption state under the condition of unmanned operation, and the self-triggered access network frequency item of the read/write device represents a frequency for the read/write device to autonomously access the operation server.
In this embodiment of the present invention, further optionally, the initialization operation may further include the step of receiving, by the read/write device, an authentication master key that is sent by the write terminal and generated according to a preset key generation rule, where the authentication master key and the authentication subkeys of the target IC card are in a distributed relationship. Still further optionally, the information related to the target IC card further includes an authentication subkey.
In this embodiment of the present invention, the recording module 306 is configured to record unlocking information after the driving module 304 controls the lock device to be unlocked, where the unlocking information may include at least one of a user ID, an unlocking time, and an unlocking position that have a binding relationship with the identification ID of the target IC card.
The recording module 306 is further configured to record locking information when a locking request triggered by a user is detected, where the locking information may include at least one of locking time, locking position, and user ID of the target IC card with a binding relationship.
In the embodiment of the present invention, the settlement module 307 is configured to send the locking information and the unlocking information to the operation server after the recording module 306 records the locking information of the read/write device, so that the operation server calculates the usage cost that needs to be paid by the user according to the locking information and the unlocking information, and sends the usage cost to the user terminal.
In this embodiment of the present invention, the identification module 301 may include a first determining sub-module 3011 and a reading sub-module 3012, where:
a first judgment sub-module 3011, configured to judge whether a target IC card exists in a wireless identification range of the terminal according to an unlocking request;
the reading sub-module 3012 is configured to, when the first determining sub-module 3011 determines that the target IC card exists, read related information of the target IC card, where the related information includes an identification ID of the target IC card, a use start time of the target IC card, and a use end time of the target IC card.
In this embodiment of the present invention, the verification module 302 may include a verification code generation sub-module 3021, a writing sub-module 3022, a MAC code generation sub-module 3023, a first receiving sub-module 3024, and a second determining sub-module 3025, where:
the verification code generation submodule 3021 is configured to randomly generate a verification code and temporarily store the verification code;
a write-in sub-module 3022, configured to write the verification code into the target IC card after the verification code generation sub-module 3021 randomly generates a verification code and temporarily stores the verification code, so that the target IC card generates a first MAC code according to a first preset generation manner, the related information, and the verification code;
the MAC code generation submodule 3023 is configured to generate a second MAC code according to the first preset generation manner, the verification code, and the related information;
a first receiving submodule 3024 configured to receive a first MAC code sent by the target IC card;
the second determining submodule 3025 is configured to, after the first receiving submodule 3024 receives the first MAC code sent by the target IC card, determine whether the first MAC code is consistent with the second MAC code, and determine that the target IC card is successfully verified when the first MAC code is consistent with the second MAC code.
In the embodiment of the present invention, further optionally, the generating, by the target IC card, the first MAC code according to the first preset generation manner, the related information, and the verification code may include:
processing the related information and the verification code in sequence and generating a plurality of subdata blocks with the length of one byte;
sequentially processing a plurality of sub-data blocks according to a DES algorithm, and splicing the processing result of each sub-data block to generate a total data block with the length of 8 bytes;
and taking the authentication master key as an encryption parameter, processing the total data block according to a DES algorithm and generating a first MAC code.
It should be noted that, in the embodiment of the present invention, after the writing sub-module 3022 writes the verification code into the target IC card, the MAC code generation sub-module 3023 may be triggered to start; the MAC code generation submodule 3023 may trigger the first receiving submodule 3024 to execute the second MAC code after generating the second MAC code according to the first preset generation manner, the verification code, and the related information.
In this embodiment of the present invention, the checking module 303 may include a query submodule 3031, a third determining submodule 3032, a duration submodule 3033, and a first prompting module 3034, where:
the query submodule 3031 is configured to query the unlocking prohibition ID form by using the identifier ID of the target IC card as a query condition, to query whether the unlocking prohibition ID form includes the identifier ID, and if the query result is that the unlocking prohibition ID form does not include the identifier ID, trigger the third determining submodule 3032 to execute the query.
A third determining submodule 3032, configured to, when the querying submodule 3031 determines that the unlocking prohibition ID table does not contain the identification ID, determine whether the service life of the target IC card expires according to the service start time of the target IC card, the service end time of the target IC card, and the preset service life determining rule, and if the determination result is negative, determine that the target IC card passes verification; and if the judgment result is yes, determining that the target IC card fails to be verified.
A renewal submodule 3033, configured to initiate a renewal operation on the target IC card when the third determining submodule 3032 determines that the target IC card fails to be verified;
the first prompt module 3034 is configured to generate unlocking refusal information when the query result of the query submodule 3031 is that the unlocking forbidding ID form contains the identification ID.
In this embodiment of the present invention, a specific manner of initiating the renewal operation of the target IC card by the renewal submodule 3033 may include the following steps:
acquiring a first renewal code randomly generated by the target IC card and acquiring a third MAC code generated by the target IC card according to a second preset generation mode, related information and the first renewal code;
sending the first and third MAC codes and related information to an operation server, so that the operation server generates a fourth MAC code and a second renewal code, and generates a fifth MAC code when judging that the third MAC code is the same as the fourth MAC code
Receiving the duration information, the fifth MAC code and the second duration code sent by the operation server;
writing the second renewal code, the fifth MAC code and the renewal information into the target IC card so that the target IC card generates a sixth MAC code and enables the renewal information when the sixth MAC code is the same as the fifth MAC code, wherein the renewal information comprises new use starting time and new use ending time;
and receiving the renewal success prompt message sent by the target IC card, and sending the renewal success prompt message to the operation server.
In this embodiment of the present invention, further optionally, the generating, by the target IC card, the third MAC code according to the second preset generation manner, the related information, and the first renewal code may include the following operations:
processing the related information and the first duration code in sequence and generating a plurality of sub data blocks with the length of one byte;
sequentially processing a plurality of sub-data blocks according to a DES algorithm, and splicing the processing result of each sub-data block to generate a total data block with the length of 8 bytes;
and taking the authentication master key as an encryption parameter, processing the total data block according to a DES algorithm and generating a third MAC code.
In the embodiment of the present invention, the initialization module 305 is further configured to send an update request for the unlocking prohibition ID form to the operation server according to the preset access frequency, so that the operation server returns the updated unlocking prohibition ID table to the read-write device after receiving the update request;
and the read-write device receives the updated unlocking prohibition ID table and replaces the unlocking prohibition ID table with the updated unlocking prohibition ID table.
The unlocking forbidding device based on the IC card stores an unlocking forbidding ID table, wherein the unlocking forbidding ID table stores a plurality of records of users who forbid using the IC card, and the records can include user IDs every day. Meanwhile, the unlocking prohibition ID table can be generated in various occasions and can be shared by a plurality of terminals or a plurality of platforms, for example, when a certain user swipes an IC card to enter a subway station, but does not swipe the IC card when the user goes out of the subway station, under the condition, a ticket checking terminal of the subway station adds the ID of the IC card into the unlocking prohibition ID table and updates the ID into an operation server, so that the read-write device can acquire the unlocking prohibition ID table from the operation server, and the unlocking prohibition ID table can be shared. In this optional embodiment, optionally, the access may be performed once per hour or once per day according to the preset access frequency, which is not limited in the present invention.
In an alternative embodiment, the IC card-based unlocking device may communicate with a user terminal, an operation server, and a write terminal to complete data interaction, where the user terminal may be a PC terminal or a mobile terminal, which is not limited in the present invention.
In this optional embodiment, when a certain user loses the IC card bound to the user, the user may submit an IC card freezing application to the operation server, so that the operation server adds the ID of the IC card that needs to be frozen to the unlocking-prohibited ID card, and then other users cannot take the frozen IC card to realize the unlocking operation, further optionally, the operation server freezing the IC card may include the following operations:
the operation server receives a freezing application triggered by a user and aiming at a certain IC card to be frozen, wherein the freezing application comprises an identification ID (identity) of the IC card to be frozen and user information;
the operation server queries the authentication information of the IC card to be frozen by taking the identification ID of the IC card to be frozen as a query condition;
the operation server judges whether the authentication information is consistent with the user information, if so, the ID of the IC card to be frozen is identified, and if not, the operation server returns user information verification failure information to the user terminal where the user is located.
In an optional embodiment, a user may register a user account through a user terminal, where each user account is associated with a user password and a unique ID of the user, and the user may also log in the user account through the user terminal and bind an IC card, in the optional embodiment, optionally, each user ID may bind one IC card, or may bind two or more IC cards, further optionally, binding the IC card may include operations of:
the user terminal obtains a password of the IC card to be bound, which is input by a user, wherein the password of the IC card to be bound is arranged in a coating area of the IC card to be bound.
The user terminal sends the password of the IC card to be bound and the user ID to the operation server, so that the operation server binds the ID of the IC card to be bound according to the password of the IC card to be bound and a preset matching rule, and binds the ID of the IC card to be bound with the user ID.
In this optional embodiment, optionally, the user may recharge the IC card associated with the user account through the user terminal, and optionally, recharging the IC card associated with the user account may include the following operations:
when a user triggers a charging operation aiming at an IC card to be charged on a user terminal, the user terminal sends a charging request to an operation server, wherein the charging request comprises an ID (identity) of the IC card to be charged, a charging amount and first charging verification information;
the operation server receives a recharging request;
the operation server verifies the first recharging verification information according to the recharging information verification rule;
after the recharging verification information passes verification, the operation server queries the ID of the IC card to be recharged in an IC card database according to the ID of the IC card to be recharged;
the operation server modifies the amount of money associated with the ID of the IC card to be recharged;
the operation server returns recharging success information to the user terminal, and the recharging success information comprises second recharging verification information;
the user terminal receives the recharging success information and verifies the second recharging verification information according to the recharging information verification rule, and when the second recharging verification information passes the verification, the user terminal generates new use start time and new use end time according to the recharging amount;
and the user terminal writes the new use start time and the new use end time into the IC card to be recharged.
In this alternative embodiment, in order to ensure the data security in the target IC card, the communication between the target IC card and the read/write device may be encrypted, for example, each target IC card stores an authentication sub-key, and each read/write device stores an authentication main key, and optionally, the writing of the authentication main key to the read/write device and the writing of the authentication sub-key to the IC card may include the following operations:
the write-in terminal generates an authentication master key according to a preset key generation rule;
the write-in terminal calculates an authentication sub-key according to the authentication main key and a dispersion algorithm;
the write-in terminal writes the authentication master key into the read-write device and stores the authentication sub-key;
the write terminal writes the authentication subkey into the IC card.
Therefore, in the optional embodiment, the unlocking prohibition ID table can be updated through the network, and after the ID of one IC card is read, whether the IC card can be used or not is determined according to the unlocking prohibition IC table, so that the use of the shared goods by the user who is not normally used can be restricted, and the risk that the shared goods are privately owned is further reduced. Meanwhile, the alternative embodiment can limit the use of the frozen IC card, thereby improving the use safety of the IC card.
EXAMPLE five
Referring to fig. 5, fig. 5 is a schematic structural diagram of another unlocking device based on an IC card according to a fifth embodiment of the present invention. As shown in fig. 5, the IC card-based unlocking device may include:
a memory 501 in which executable program code is stored;
a processor 502 coupled to a memory 501;
the processor 502 calls the executable program code stored in the memory 501 to execute the steps in the IC card-based unlocking method described in any one of the first to second embodiments.
The unlocking device of the embodiment of the invention can provide an unlocking mode with simple operation and less unlocking steps for a user by executing the unlocking method based on the IC card, and meanwhile, the problem that shared objects are maliciously privatized can be reduced by executing the unlocking method based on the IC card.
EXAMPLE six
The sixth embodiment of the present invention discloses a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program causes a computer to execute the steps in the IC card-based unlocking method described in any one of the first to second embodiments.
The computer-readable storage medium of the embodiment of the invention can provide an unlocking mode with simple operation and less unlocking steps for a user by executing the unlocking method based on the IC card, and meanwhile, the problem that shared articles are maliciously privatized can be reduced by executing the unlocking method based on the IC card.
EXAMPLE seven
The embodiment of the invention discloses a computer program product, which comprises a non-transitory computer readable storage medium storing a computer program, wherein the computer program is operable to make a computer execute the steps in the unlocking method based on an IC card described in any one of the first embodiment to the second embodiment.
The computer program product of the embodiment of the invention can provide an unlocking mode with simple operation and less unlocking steps for a user by executing the unlocking method based on the IC card, and meanwhile, the problem that shared articles are maliciously privatized can be reduced by executing the unlocking method based on the IC card.
The above-described embodiments of the apparatus are merely illustrative, and units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above detailed description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a necessary general hardware platform, and may also be implemented by hardware. Based on such understanding, the above technical solutions may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, where the storage medium includes a Read-Only Memory (ROM), a Random Access Memory (RAM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), a One-time Programmable Read-Only Memory (OTPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc-Read-Only Memory (CD-ROM), or other magnetic disk memories, magnetic tape memories, magnetic disk drives, and so as to implement the magnetic disk drives, and so as to implement the magnetic disk drives, and so that the Read-drive, and so that the magnetic disk drives the Read and the magnetic disk drives the Read-disk drives of the Read-write-Read-, Or any other medium which can be used to carry or store data and which can be read by a computer.

Claims (8)

1. An unlocking method based on an IC card is characterized by comprising the following steps:
when an unlocking request triggered by a user is detected, the read-write device identifies a target IC card according to the unlocking request;
the read-write device verifies the target IC card according to a preset verification rule, and when the verification is successful, the read-write device verifies the target IC card according to a preset service rule;
when the verification is successful, the reading and writing device controls the locking device to be unlocked;
wherein, the read-write device identifies the target IC card, including:
the read-write device judges whether the target IC card exists in the wireless identification range of the read-write device according to the unlocking request;
when the target IC card is judged to exist, the read-write device reads the relevant information of the target IC card, wherein the relevant information comprises the identification ID of the target IC card, the use starting time of the target IC card, the use ending time of the target IC card and an authentication sub-key;
the read-write device verifies the target IC card according to a preset verification rule, and the verification comprises the following steps:
the read-write device randomly generates an identifying code and temporarily stores the identifying code;
the read-write device writes the verification code into the target IC card so that the target IC card generates a first MAC code according to a first preset generation mode, the verification code and the related information;
the read-write device generates a second MAC code according to the first preset generation mode, the verification code and the related information;
the read-write device receives the first MAC code sent by the target IC card and judges whether the first MAC code is consistent with the second MAC code;
when the first MAC code is judged to be consistent with the second MAC code, the read-write device determines that the target IC card is successfully verified;
the verifying the target IC card by the read-write device according to the preset service rule comprises the following steps:
the read-write device takes the identification ID of the target IC card as a query condition, and queries whether the list of the unlocking prohibition ID contains the identification ID or not in the list of the unlocking prohibition ID and generates a query result;
when the query result shows that the unlocking prohibition ID form does not contain the identification ID time, the read-write device judges whether the service life of the target IC card is due according to the use starting time of the target IC card, the use ending time of the target IC card and a preset service life judgment rule, and if the judgment result shows that the service life of the target IC card is due, the target IC card is determined to pass the verification;
before the read-write device identifies the target IC card and reads the relevant information of the target IC card, the unlocking method further comprises the following steps:
the read-write device executes initialization operation, wherein the execution of the initialization operation by the read-write device comprises the following steps:
the read-write device receives an authentication master key which is sent by a write-in terminal and generated according to a preset key generation rule, and the relationship between the authentication master key and the authentication sub-keys in the related information is a dispersion relationship;
the method further comprises the following steps:
when the read-write device determines that the target IC card fails to be verified, the read-write device initiates a renewal operation on the target IC card, wherein the initiation of the renewal operation on the target IC card by the read-write device comprises the following steps:
the read-write device acquires a first renewal code randomly generated by the target IC card and acquires a third MAC code generated by the target IC card according to a second preset generation mode, the related information and the first renewal code;
the read-write device sends the first renewal code, the third MAC code and the related information to an operation server, so that the operation server generates a fourth MAC code and a second renewal code, and generates a fifth MAC code when judging that the third MAC code is the same as the fourth MAC code;
the read-write device receives the renewal information, the fifth MAC code and the second renewal code sent by the operation server;
the read-write device writes the second renewal code, the fifth MAC code and the renewal information into the target IC card, so that the target IC card generates a sixth MAC code and enables the renewal information when the sixth MAC code is the same as the fifth MAC code, and the renewal information comprises new use starting time and new use ending time.
2. The method of unlocking a lock as defined in claim 1, wherein the method further comprises:
when the query result shows that the unlocking prohibition ID form contains the identification ID time, the read-write device generates unlocking refusal information;
and, the method further comprises:
and when the read-write device judges that the service life of the target IC card is expired according to the use starting time of the target IC card, the use ending time of the target IC card and a preset service life judgment rule, the read-write device determines that the verification of the target IC card is not passed.
3. The method of unlocking a lock as defined in claim 2, wherein the method further comprises:
and the read-write device receives the renewal success prompt message sent by the target IC card and sends the renewal success prompt message to the operation server.
4. The unlocking method according to claim 1, wherein after the reader/writer device controls the lock device to be unlocked, the unlocking method further comprises:
the read-write device records unlocking information, wherein the unlocking information comprises at least one of a user ID, unlocking time and an unlocking position which have binding relationship with the identification ID of the target IC card;
and, the unlocking method further comprises:
when a locking request triggered by the user is detected, the read-write device controls the locking device to lock and records locking information of the read-write device, wherein the locking information comprises at least one of locking time, locking position information and the user ID;
and the read-write device sends the locking information and the unlocking information to an operation server, so that the operation server calculates the use cost required to be paid by the user according to the locking information and the unlocking information and sends the use cost to the user terminal.
5. The method of unlocking a lock according to claim 1, further comprising:
the read-write device sends an updating request aiming at the unlocking prohibition ID form to an operation server according to a preset access frequency, so that the operation server returns an updated unlocking prohibition ID form to the read-write device after receiving the updating request;
and the read-write device receives the updated unlocking prohibition ID table and replaces the unlocking prohibition ID table with the updated unlocking prohibition ID table.
6. A read-write apparatus based on an IC card, characterized in that the read-write apparatus comprises:
the system comprises an identification module, a verification module and a verification module, wherein the identification module is used for identifying a target IC card and reading related information of the target IC card when a user triggers an unlocking request, and the related information comprises an identification ID of the target IC card;
the verification module is used for verifying the relevant information according to a preset verification rule after the identification module identifies the target IC card and reads the relevant information of the target IC card;
the verification module is used for verifying the relevant information according to a preset verification rule and verifying the relevant information according to a preset service rule after the relevant information is successfully verified;
the driving module is used for controlling the locking device to be unlocked after the verification module successfully verifies the related information;
the identification module specifically identifies the target IC card by:
the read-write device judges whether the target IC card exists in the wireless identification range of the read-write device according to the unlocking request;
when the target IC card time is judged to exist, the read-write device reads the relevant information of the target IC card, wherein the relevant information comprises the identification ID of the target IC card, the use starting time of the target IC card, the use ending time of the target IC card and an authentication sub-key;
the verification module may include:
the verification code generation submodule is used for randomly generating a verification code and temporarily storing the verification code;
the writing sub-module is used for writing a verification code into the target IC card after the verification code is randomly generated and temporarily stored in the verification code generating sub-module, so that the target IC card generates a first MAC according to a first preset generating mode, the related information and the verification code;
the MAC generation submodule is used for generating a second MAC code according to the first preset generation mode, the verification code and the related information;
the first receiving submodule is used for receiving the first MAC code sent by the target IC card;
the second judging sub-module is used for judging whether the first MAC code is consistent with the second MAC code after the first receiving sub-module receives the first MAC code sent by the target IC card, and when the first MAC code is judged to be consistent with the second MAC code, the read-write device determines that the target IC card is successfully verified;
the verification module may include:
the query submodule is used for querying in an unlocking prohibition ID form by taking the identification ID of the target IC card as a query condition so as to judge whether the unlocking prohibition ID form contains the identification ID and generate a query result;
a third judging submodule, configured to, when the query result indicates that the unlocking prohibition ID form does not include the identification ID, judge whether the lifetime of the target IC card expires according to the usage start time of the target IC card, the usage end time of the target IC card, and a preset lifetime judgment rule, and if the judgment result indicates that the target IC card passes the verification, determine that the target IC card passes the verification;
and, the unlocking means based on the IC card further includes:
an initialization module, configured to perform an initialization operation before the identification module identifies the target IC card and reads the related information of the target IC card, where the initialization operation may include the steps of:
the read-write device receives an authentication master key which is sent by a write-in terminal and generated according to a preset key generation rule, and the relationship between the authentication master key and the authentication sub-keys in the related information is a dispersion relationship;
the read-write device is further configured to initiate a renewal operation on the target IC card when the read-write device determines that the target IC card fails to be verified, where a manner in which the read-write device initiates the renewal operation on the target IC card specifically includes:
acquiring a first renewal code randomly generated by the target IC card and acquiring a third MAC code generated by the target IC card according to a second preset generation mode, the related information and the first renewal code;
sending the first renewal code, the third MAC code and the related information to an operation server, so that the operation server generates a fourth MAC code and a second renewal code, and generates a fifth MAC code when judging that the third MAC code is the same as the fourth MAC code;
receiving renewal information, the fifth MAC code and the second renewal code sent by the operation server;
writing the second renewal code, the fifth MAC code and the renewal information into the target IC card, so that the target IC card generates a sixth MAC code and enables the renewal information when the sixth MAC code is the same as the fifth MAC code, wherein the renewal information comprises a new use starting time and a new use ending time.
7. A read-write apparatus based on an IC card, characterized in that the read-write apparatus comprises:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to execute the IC card-based unlocking method according to any one of claims 1 to 5.
8. A computer-readable storage medium, wherein an IC card-based unlocking program is included in the computer-readable storage medium, and when the IC card-based unlocking program is executed by a processor, the IC card-based unlocking method according to any one of claims 1 to 5 is executed.
CN201811558799.0A 2018-12-19 2018-12-19 Unlocking method and device based on IC card Active CN109754505B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811558799.0A CN109754505B (en) 2018-12-19 2018-12-19 Unlocking method and device based on IC card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811558799.0A CN109754505B (en) 2018-12-19 2018-12-19 Unlocking method and device based on IC card

Publications (2)

Publication Number Publication Date
CN109754505A CN109754505A (en) 2019-05-14
CN109754505B true CN109754505B (en) 2022-07-12

Family

ID=66403739

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811558799.0A Active CN109754505B (en) 2018-12-19 2018-12-19 Unlocking method and device based on IC card

Country Status (1)

Country Link
CN (1) CN109754505B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110473329B (en) * 2019-09-25 2021-08-20 永安行科技股份有限公司 Access control card information management method, management system and intelligent terminal
CN111383371B (en) * 2020-04-29 2021-09-14 珠海格力电器股份有限公司 Unlocking method, door lock, server, system, storage medium and electronic device
CN113470224A (en) * 2021-06-16 2021-10-01 支付宝(杭州)信息技术有限公司 Unlocking method and system
CN114743294A (en) * 2022-03-29 2022-07-12 中汽创智科技有限公司 Unlocking device, shared device unlocking method, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000046955A1 (en) * 1999-02-05 2000-08-10 Australian Arrow Pty Ltd. Bi-directional coding system for remote control device security
EP2584541A1 (en) * 2011-10-18 2013-04-24 EVVA Sicherheitstechnologie GmbH Method for access control
CN103136819A (en) * 2011-12-01 2013-06-05 联想(北京)有限公司 Unlocking method for door control system based on mobile terminal and mobile terminal
CN104851169A (en) * 2015-05-25 2015-08-19 惠州Tcl移动通信有限公司 Wireless smart lock and unlocking control method thereof
CN105827577A (en) * 2015-01-08 2016-08-03 阿里巴巴集团控股有限公司 Method and device for information verification

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101667308B (en) * 2008-09-04 2013-02-27 日电(中国)有限公司 Access control system, access control devices, access card and access control method
CN102118250A (en) * 2011-01-10 2011-07-06 上海众人网络安全技术有限公司 System and method for indentifying dynamic password based on double-interface intelligent card
JP6009783B2 (en) * 2012-03-07 2016-10-19 美和ロック株式会社 Access control system
CN106850235A (en) * 2017-04-08 2017-06-13 普拉斯旺(深圳)商贸有限公司 A kind of identity identifying method
CN108320152A (en) * 2018-01-17 2018-07-24 深圳喆行科技有限公司 A kind of recharge method and system of stored value card

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000046955A1 (en) * 1999-02-05 2000-08-10 Australian Arrow Pty Ltd. Bi-directional coding system for remote control device security
EP2584541A1 (en) * 2011-10-18 2013-04-24 EVVA Sicherheitstechnologie GmbH Method for access control
CN103136819A (en) * 2011-12-01 2013-06-05 联想(北京)有限公司 Unlocking method for door control system based on mobile terminal and mobile terminal
CN105827577A (en) * 2015-01-08 2016-08-03 阿里巴巴集团控股有限公司 Method and device for information verification
CN104851169A (en) * 2015-05-25 2015-08-19 惠州Tcl移动通信有限公司 Wireless smart lock and unlocking control method thereof

Also Published As

Publication number Publication date
CN109754505A (en) 2019-05-14

Similar Documents

Publication Publication Date Title
CN109754505B (en) Unlocking method and device based on IC card
US9704312B2 (en) Apparatus and methods for identity verification
US9740847B2 (en) Method and system for authenticating a user by means of an application
US20190050610A9 (en) Smart card systems comprising a card and a carrier
KR101330867B1 (en) Authentication method for payment device
CN104182874B (en) Multi-use card device, system and card information loading method
EP3885205B1 (en) Car key control method and apparatus
CN104903925A (en) System and method for securely loading, storing and transmitting magnetic stripe data in a device working with a mobile wallet system
CN108475372B (en) Access control bypass on mobile devices for public transportation
CN111038445B (en) Mobile terminal device and vehicle control system
CN108701383A (en) Attack resistance bio-identification authorization device
CN101714216B (en) Semiconductor element, biometric authentication method, biometric authentication system and mobile terminal
US8931080B2 (en) Method and system for controlling the execution of a function protected by authentification of a user, in particular for the access to a resource
CN101727683B (en) Public transport IC card identity identifying and authenticating system
US20110121072A1 (en) Authorization system with a card and a reader
CN110942537B (en) Intelligent door lock unlocking system, method, device and medium
CN110610564A (en) Key management device, key management method, key management system, and readable storage medium
CN114531679A (en) Mobile terminal permission interaction system and method based on user identification card
JP2016115098A (en) Smart card with fingerprint authentication and settlement method using the same
CN104134025B (en) Mobile terminal locking method, device and mobile terminal based on SIM card
CN110070014A (en) Recognition methods and its device, equipment and storage medium based on biometric feature
CN109741067B (en) Data processing method and device based on IC card unlocking
CN113836512A (en) Function control method, system and controller based on identity recognition
US20090262939A1 (en) Authentication Apparatus, System and Method
CN113888789A (en) Data processing method and device based on visitor management system

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