[go: up one dir, main page]

CN109741067B - Data processing method and device based on IC card unlocking - Google Patents

Data processing method and device based on IC card unlocking Download PDF

Info

Publication number
CN109741067B
CN109741067B CN201811558843.8A CN201811558843A CN109741067B CN 109741067 B CN109741067 B CN 109741067B CN 201811558843 A CN201811558843 A CN 201811558843A CN 109741067 B CN109741067 B CN 109741067B
Authority
CN
China
Prior art keywords
card
target
read
write device
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
CN201811558843.8A
Other languages
Chinese (zh)
Other versions
CN109741067A (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 CN201811558843.8A priority Critical patent/CN109741067B/en
Publication of CN109741067A publication Critical patent/CN109741067A/en
Application granted granted Critical
Publication of CN109741067B publication Critical patent/CN109741067B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Lock And Its Accessories (AREA)

Abstract

The invention discloses a data processing method and a device based on IC card unlocking, wherein the data processing method based on IC card unlocking comprises the steps that when a read-write device identifies a target IC card, the read-write device randomly generates a verification code and temporarily stores the verification 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 and the verification code; the read-write device receives the first MAC code sent by the target IC card; the read-write device verifies the first MAC code according to a preset verification rule and generates a verification result; and when the verification result is that the verification result is passed, the read-write device controls the lock device to be opened. The invention can improve the data security of the IC card in the digital transaction.

Description

Data processing method and device based on IC card unlocking
Technical Field
The invention relates to the technical field of Internet, in particular to a data processing method and device based on unlocking of an IC card.
Background
With the development of society, IC cards are widely used in digital transactions, for example, IC cards are used as bus cards for paying for taking public transportation. Because the IC card stores important transaction information, once the transaction information of the IC card is maliciously stolen or maliciously rewritten, serious economic loss is brought to the IC card holder or other related parties related to the IC card, so in the process of digital transaction, it is important to process the IC card by adopting an encryption means so as to improve the information security of the IC card.
Disclosure of Invention
The technical problem to be solved by the embodiment of the invention is to provide a data processing method and device based on unlocking of an IC card, which are used for solving the data security problem existing in the process of digital transaction of the IC card.
In order to solve the technical problem, a first aspect of the embodiment of the invention discloses a data processing method based on unlocking an IC card, which comprises the following steps:
when the read-write device identifies the target IC card, the read-write device randomly generates a verification code and temporarily stores the verification 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 and the verification code;
the read-write device receives the first MAC code sent by the target IC card;
the read-write device verifies the first MAC code according to a preset verification rule and generates a verification result;
and when the verification result is that the verification result is passed, the read-write device controls the lock device to be opened.
Optionally, the verifying, by the read-write device, the first MAC code according to a preset verification rule includes:
the read-write device generates a second MAC code according to the first preset generation mode and the verification code;
The read-write device compares the first MAC code with the second MAC code;
and when the first MAC code is the same as the second MAC code, the read-write device determines that the verification result is passed.
Optionally, before the read-write device randomly generates a verification code and temporarily stores the verification code, the data processing method further includes:
when the read-write device receives an unlocking request triggered by a user, the read-write device judges whether the target IC card exists in the wireless identification range of the read-write device, if yes, the read-write device identifies the target IC card and reads the related information of the target IC card;
the read-write apparatus determines that the target IC card is identified.
Optionally, the related information includes at least one of an 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;
and the read-write device generating a second MAC code according to the first preset generation mode and the verification code comprises the following steps:
the read-write device converts the ID of the target IC card, the use start time of the target IC card, the use end time of the target IC card and the verification code into a single byte binary data stream in sequence;
The read-write device sequentially carries out addition operation on the authentication master key pre-stored in the read-write device, the single-byte binary data stream corresponding to the ID of the target IC card, the single-byte binary data stream corresponding to the use start time of the target IC card and the single-byte binary data stream corresponding to the use end time of the target IC card according to a DES algorithm;
the read-write device sequentially splices the addition result of the target IC card, the addition result of the use start time of the target IC card, the addition result of the use end time of the target IC card and the addition result of the verification code;
the read-write device generates the second MAC code based on the splicing result.
Optionally, the related information further includes a first identity verification code pre-stored in the target IC card;
and after the read-write device randomly generates an authentication code and temporarily stores the authentication code, before the read-write device writes the authentication code into the target IC card, the data processing method further includes:
the read-write device acquires a second identity verification code input by a user;
the read-write device compares the second identity verification code with the first identity verification code;
And when the first identity code is consistent with the second identity code, writing the verification code into the target IC card.
Optionally, the related information may further include history usage information of the target IC card, where the history usage information includes area information of a last usage of the target IC card;
and when the verification result is passed, and before the read-write device controls the lock device to be opened, the method further comprises:
the read-write device acquires current geographic position information;
the read-write device judges whether the information of the area where the last use is located is the same as the information of the current geographic position;
when the read-write device judges that the information of the area where the last use is located is different from the current geographical position information, the read-write device generates abnormal login information and marks the state of the target IC card as an abnormal use state so as to limit unlocking of the user;
the read-write device displays the abnormal login information to the user so that the user inputs the password of the target IC card;
the read-write device receives the password of the target IC card input by the user;
the read-write device sends a password inquiry request to an operation server so that the operation server generates a password verification success prompt after the password verification is passed, wherein the password inquiry request comprises the ID of the target IC card and the password of the target IC card;
And the read-write device receives the password verification success prompt sent by the operation server and releases the abnormal use state of the target IC card.
Optionally, after the read-write device receives the password verification success prompt sent by the operation server and releases the abnormal use state of the target IC card, the data processing method further includes:
the read-write device generates an replacement confirmation prompt and displays the replacement confirmation prompt to the user so that the user inputs a replacement confirmation instruction according to the replacement confirmation prompt;
the read-write device receives the replacement confirmation instruction and replaces the area information of the last used area of the target IC card with the current geographic position information.
The second aspect of the present invention discloses a data processing device based on unlocking an IC card, the data processing device comprising:
the verification code generation module is used for randomly generating a verification code and temporarily storing the verification code when the target IC card is identified;
the writing module is used for writing the verification code into the target IC card after the verification code generation module 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 mode and the verification code;
A receiving module, configured to receive the first MAC code sent by the target IC card after the writing module writes the verification code into the target IC card;
the MAC code verification module is used for verifying the first MAC code according to a preset verification rule after the receiving module receives the first MAC code;
and the driving module is used for controlling the lock device to be opened when the MAC code verification module verifies that the first MAC code passes through according to a preset verification rule.
Optionally, the MAC code verification module may include a second MAC code generation sub-module, a MAC code comparison sub-module, and a first determination sub-module, where:
the second MAC code generation sub-module is used for generating a second MAC code according to the first preset generation mode and the verification code;
a MAC code comparing sub-module configured to compare the first MAC code with the second MAC code after the second MAC code generating sub-module generates the second MAC code;
and the first determining submodule is used for determining that the verification result is passed when the comparison result of the MAC code comparison submodule is that the first MAC code is identical to the second MAC code.
Optionally, the data processing device based on IC card unlocking disclosed in the second aspect of the present invention may further include an identification module, and the identification module may include a first judgment sub-module, a first reading sub-module, and a second determination sub-module, where:
The first judging sub-module is used for judging whether the target IC card exists in the wireless identification range of the read-write device when the read-write device receives an unlocking request triggered by a user;
the first reading submodule is used for executing the reading of the related information of the target IC card when the first judging submodule judges that the target IC card exists in the wireless identification range;
and the second determining sub-module is used for determining that the target IC card is identified after the first reading sub-module finishes reading the related information of the target IC card.
Optionally, the related information includes at least one of an 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;
and the specific mode of the second MAC code generation sub-module for generating the second MAC code according to the first preset generation mode and the verification code is as follows:
sequentially converting the ID of the target IC card, the use start time of the target IC card, the use end time of the target IC card and the verification code into a single byte binary data stream;
according to a DES algorithm, sequentially carrying out addition operation on an authentication master key pre-stored in the read-write device and a single-byte binary data stream corresponding to the ID of the target IC card, a single-byte binary data stream corresponding to the use start time of the target IC card and a single-byte binary data stream corresponding to the use end time of the target IC card;
And generating the second MAC code based on the splicing result.
Optionally, the related information further includes a first authentication code pre-stored in the target IC card, and the data processing apparatus based on IC card unlocking disclosed in the second aspect of the present invention further includes an authentication module, where the authentication module may include:
the first acquisition sub-module is used for a second identity verification code input by a user;
and the identity comparison sub-module is used for comparing the second identity verification code with the first identity verification code after the first acquisition sub-module acquires the second identity verification code, and triggering the writing module to start when the first identity code is consistent with the second identity code.
Optionally, the related information may further include history usage information of the target IC card, where the history usage information includes area information of a last usage of the target IC card;
and, the data processing device based on the IC card unlocking disclosed in the second aspect of the present invention may further include a login location determination module, and further optionally, the login location determination module may include:
the second acquisition sub-module is used for acquiring the current geographic position information;
The second judging sub-module is used for judging whether the information of the area where the last use is located is the same as the information of the current geographic position after the second obtaining sub-module obtains the information of the current geographic position;
the marking sub-module is used for generating abnormal login information and marking the state of the target IC card as an abnormal use state when the second judging sub-module judges that the information of the area where the read-write device is used last time is different from the current geographical position information so as to limit unlocking of the user;
the first display sub-module is used for displaying the abnormal login information to the user after the marking sub-module generates the abnormal login information so that the user inputs the password of the target IC card;
a password receiving sub-module for receiving a password of the target IC card input by a user;
a query request sending sub-module, configured to send a password query request to an operation server, so that the operation server generates a password verification success prompt after the password verification is passed, where the password query request includes an ID of the target IC card and a password of the target IC card;
the prompt receiving sub-module is used for receiving a prompt of successful password verification sent by the operation server;
And the abnormality removing sub-module is used for removing the abnormal use state of the target IC card after the prompt receiving sub-module receives the password verification success prompt sent by the operation server.
Optionally, the data processing device based on IC card unlocking disclosed in the second aspect of the present invention further includes a replacement module, where the replacement module may include:
the replacement prompt generation sub-module is used for generating a replacement confirmation prompt;
the second display sub-module is used for displaying the replacement confirmation prompt to the user after the replacement confirmation prompt is generated by the replacement prompt generation sub-module;
the confirmation instruction receiving sub-module is used for receiving the replacement confirmation instruction after the second display sub-module displays the replacement confirmation prompt to the user;
and the replacement sub-module is used for replacing the last used area information of the target IC card with the current geographic position information after the replacement confirmation instruction is received by the confirmation instruction receiving sub-module.
The third aspect of the present invention also discloses another data processing device based on unlocking an IC card, the device comprising:
a memory storing executable program code;
a processor coupled to the memory;
The processor calls the executable program codes stored in the memory to execute the data processing method based on the IC card unlocking disclosed in 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 data processing program, where the IC card-based data processing program, when executed by a processor, performs the data processing method for unlocking an IC card disclosed in the first aspect of the present invention.
Compared with the prior art, the invention has the following beneficial effects:
in the invention, when the target IC card is identified, the read-write device can randomly generate an authentication code and temporarily store the authentication code, and write the authentication code into the target IC card, so that the target IC card generates a first MAC code according to a first preset generation mode and the authentication code, and further the read-write device receives the first MAC code sent by the target IC card, verifies the first MAC code according to a preset verification rule and generates a verification result, and finally, after verification is passed, the read-write device controls the lock device to unlock. Therefore, the invention can verify the information in the IC card when the user uses the IC card to unlock, thereby providing an IC card unlocking mode with higher data security.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed 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 other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a data processing method based on unlocking an IC card according to an embodiment of the present invention;
fig. 2 is a flow chart of a data processing method based on unlocking an IC card according to the second embodiment of the present invention;
FIG. 3 is a schematic diagram of a data processing device based on an IC card unlocking according to a third embodiment of the present invention
Fig. 4 is a schematic structural diagram of a data processing device based on IC card unlocking according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a data processing device based on IC card unlocking according to a fifth embodiment of the present invention.
Detailed Description
For a better understanding and implementation, the technical solutions of 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 apparent that the described embodiments are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Referring to fig. 1, fig. 1 is a flow chart of a data processing method based on an IC card unlocking according to an embodiment of the present invention, wherein the data processing method based on the IC card unlocking can be applied to a read-write device of an IC card, which is not limited in this invention. As shown in fig. 1, the data processing method based on the IC card unlocking may include the following operation steps:
101. when the target IC card is identified, randomly generating a verification code and temporarily storing the verification code;
102. writing 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 and the verification code;
103. receiving a first MAC code sent by a target IC card;
104. verifying the first MAC code according to a preset verification rule and generating a verification result;
105. and when the verification result is passed, controlling the lock device to be opened.
In an embodiment of the present invention, optionally, the read-write device may be a radio frequency reader, where the radio frequency reader includes a radio frequency module, a network communication module, a SAM module, an antenna, a central controller, a driving motor, and an IO port. The antenna is used for receiving the radio frequency signal with the preset frequency. The SAM module comprises a SAM chip, optionally, the SAM chip can comprise a prestored authentication master key, the central controller can be a singlechip, and the driving motor is connected with a lock device arranged on the shared object, so that the read-write device can detect whether a target IC card exists in a wireless identification range of an antenna, when the target IC card is detected, the radio frequency module transmits radio frequency signals to realize communication with the target IC card, and 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 the object sharing is realized. Further optionally, the radio frequency reader/writer may further include a network communication module, where the network communication module may be a 2G communication module, or may be a 3G communication module, a 4G communication module, or other 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 invention, the radio frequency reader-writer can adopt a low frequency radio frequency reader-writer, and can also be one of a high frequency radio frequency reader-writer, an ultrahigh frequency radio frequency reader-writer or other frequency radio frequency reader-writers, and the invention is not limited to the above. The low-frequency radio frequency reader-writer is characterized in that the working frequency is 10 KHz-1 MHz in the frequency band range, and the common main specifications are 125KHz, 135KHz and the like. Generally, the electronic tag in the frequency band is passive, and energy supply and data transmission are performed through an inductive coupling mode. The greatest advantage of low frequency is that the tags are less affected by the tags on the articles close to the metal or liquid, and the low frequency system is very mature and the read-write equipment is low in cost. However, the disadvantage is that the read distance is short, multi-tag reading (anti-collision) cannot be performed simultaneously, and the information amount is low, and the general storage capacity is 128 bits to 512 bits. The method is mainly applied to access control systems, animal chips, automobile burglar alarms, toys and the like. Although the low-frequency system is mature and the read-write equipment is low in price, the tag needs to be manufactured with a winding inductance with a large inductance value due to low resonant frequency, and often needs to be packaged with an off-chip resonant capacitor, and the cost of the tag is higher than that of other frequency bands.
In the embodiment of the invention, the frequency band of the ultrahigh frequency radio frequency reader-writer is 868-950 MHz, the frequency band of the high frequency radio frequency reader-writer is 1-400 MHz, and the frequency band of the low frequency radio frequency reader-writer is 0-1 MHz.
In the embodiment of the invention, optionally, the read-write device may further include a display screen and a buzzer, where the display screen is used to display prompt information, for example, when the target IC card is identified by the read 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 the user can timely know the remaining use times of the target IC card, and further, the user can timely recharge the target IC card under the condition that the remaining use times of the target IC card are not too large.
In the embodiment of the invention, the read-write device can have two optional working states, wherein the first working state is a low-power-consumption state, the second working state is an operation state, and the default state of the read-write device is the low-power-consumption state. When a certain user needs to unlock or lock, the user can press the unlock key to enable the read-write device to be converted from a low power consumption state to an operation state, and at this time, the read-write device starts to identify the target IC card. When no user needs to unlock or lock, the read-write device can change 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 invention, the target IC card is a certain IC card which is being used for unlocking by a user and can be identified by a read-write device, wherein the target IC card can be a non-contact IC card or a contact IC card, and the invention is not limited to this. Preferably, the target IC card in 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 of 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 work under the drive of the working charge. Further alternatively, the control chip includes a central controller (e.g., EEPROM (Electrically Erasable Programmable read only memory, electrically erasable and programmable read-write memory)), and a memory, wherein a program executable by the central controller is stored in the memory in advance.
The read-write device can randomly generate an authentication code and temporarily store the authentication code when the target IC card is identified, the authentication code is written into the target IC card, so that the target IC card generates a first MAC code according to a first preset generation mode and the authentication code, the read-write device further receives the first MAC code sent by the target IC card, verifies the first MAC code according to a preset verification rule and generates a verification result, and finally the read-write device controls the lock device to unlock after verification is passed. Therefore, the invention can verify the information in the IC card when the user uses the IC card to unlock, thereby providing an IC card unlocking mode with higher data security.
Example two
Referring to fig. 2, fig. 2 is a flow chart of a data processing method based on an IC card unlocking according to a second embodiment of the present invention, wherein the data processing method based on the IC card unlocking can be applied to a read-write device of an IC card, which is not limited in this invention. As shown in fig. 2, the data processing method based on the IC card unlocking may include the following operation steps:
201. when an unlocking request triggered by a user is received, judging whether a target IC card exists in the wireless identification range of the target IC card, and if so, executing step 202;
202. the read-write device reads the related information of the target IC card;
203. determining that the target IC card is identified;
204. randomly generating a verification code and temporarily storing the verification code;
205. acquiring a second identity verification code input by a user; the related information also comprises a first identity verification code which is pre-stored in the target IC card;
206. comparing the second identity verification code with the first identity verification code, and executing step 207 when the first identity code is consistent with the second identity code;
207. writing 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 and the verification code;
208. receiving a first MAC code sent by a target IC card;
209. Verifying the first MAC code according to a preset verification rule, and executing step 210 when verification passes;
210. acquiring current geographic position information; the related information may further include history use information of the target IC card, wherein the history use information includes area information in which the target IC card was last used;
211. judging that the information of the area where the last use is located is the same as the current geographic position information, and executing step 212 if the information of the area where the last use is located is not the same as the current geographic position information;
212. generating abnormal login information and marking the state of the target IC card as an abnormal use state so as to limit unlocking of a user;
213. displaying the abnormal login information to a user so that the user inputs a password of the target IC card;
214. sending a password inquiry request to an operation server so that the operation server generates a password verification success prompt after the password verification is passed, wherein the password inquiry request comprises an ID of a target IC card and a password of the target IC card;
215. receiving a password verification success prompt sent by an operation server and relieving an abnormal use state of a target IC card;
216. generating an alternation confirmation prompt and displaying the alternation confirmation prompt to a user so that the user inputs an alternation confirmation instruction according to the alternation confirmation prompt;
217. Receiving an exchange confirmation instruction and exchanging the information of the area where the target IC card is used last time for the current geographic position information;
218. the control lock device is opened.
In an alternative embodiment, verifying the first MAC code according to a preset verification rule includes:
generating a second MAC code according to the first preset generation mode and the verification code;
comparing the first MAC code with the second MAC code;
when the first MAC code is the same as the second MAC code, the read-write device determines that the verification result is passed.
In still another alternative embodiment, the related information includes at least one of an 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; and generating the second MAC code according to the first preset generation manner and the verification code includes:
sequentially converting the ID of the target IC card, the use start time of the target IC card, the use end time of the target IC card and the verification code into a single byte binary data stream;
according to DES algorithm, sequentially adding the authentication master key pre-stored in the read-write device with the single byte binary data stream corresponding to the ID of the target IC card, the single byte binary data stream corresponding to the use start time of the target IC card and the single byte binary data stream corresponding to the use end time of the target IC card;
The read-write device sequentially splices the addition result of the target IC card, the addition result of the use start time of the target IC card, the addition result of the use end time of the target IC card and the addition result of the verification code;
the read-write device generates a second MAC code based on the splice result.
Therefore, the embodiment of the invention can judge whether the current target IC card is in the usual login place, and if the target IC card is not in the usual login place, the user is required to input the password of the target IC card, so that the use safety of the target IC card can be further improved. Meanwhile, the embodiment of the invention can also verify the identity information of the user so as to further improve the use safety of the target IC card.
Example III
Referring to fig. 3, fig. 3 is a schematic structural diagram of a data processing device based on an IC card unlock in accordance with a third embodiment of the present invention, wherein the data processing device based on the IC card unlock may be used to execute a data processing method based on the IC card. As shown in fig. 3, the data processing apparatus based on IC card unlocking may include:
the verification code generation module 301 is configured to randomly generate a verification code and temporarily store the verification code when the target IC card is identified;
The writing module 302 is configured to write the verification code into the target IC card after the verification code generating module 301 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 generating manner and the verification code;
a receiving module 303, configured to receive a first MAC code sent by the target IC card after the writing module 302 writes the verification code into the target IC card;
the MAC code verification module 304 is configured to verify the first MAC code according to a preset verification rule after the receiving module 303 receives the first MAC code;
the driving module 305 is configured to control the lock device to be opened when the MAC code verification module 304 verifies that the first MAC code passes according to a preset verification rule.
Therefore, the embodiment of the invention can judge whether the current target IC card is in the usual login place, and if the target IC card is not in the usual login place, the user is required to input the password of the target IC card, so that the use safety of the target IC card can be further improved. Meanwhile, the embodiment of the invention can also verify the identity information of the user so as to further improve the use safety of the target IC card.
Example IV
Referring to fig. 4, fig. 4 is a schematic structural diagram of a data processing device based on an IC card unlock, which is disclosed in a fourth embodiment of the present invention, wherein the data processing device based on the IC card unlock can be used to execute a data processing method based on the IC card. As shown in fig. 4, the data processing apparatus based on IC card unlocking may further include an identification module 306, a login location determination module 307, and an exchange module 308, in addition to the verification code generation module 301, the writing module 302, the receiving module 303, the MAC code verification module 304, and the driving module 305.
It should be noted that, the driving module 305 may trigger the identification module 306 to start.
The identification module 306 may include a first determination sub-module 3061, a first reading sub-module 3062, a second determination sub-module 3063, wherein:
the first judging sub-module 3061 is configured to judge whether a target IC card exists in a wireless identification range of the read-write device when the read-write device receives an unlocking request triggered by a user;
a first reading submodule 3062, configured to perform reading of relevant information of the target IC card when the first judging submodule 3061 judges that the target IC card exists in the wireless identification range;
the second determining submodule 3063 is configured to determine that the target IC card is identified after the first reading submodule 3062 finishes reading the relevant information of the target IC card.
In the embodiment of the present invention, the related information may further include history usage information of the target IC card, where the history usage information includes information of a region where the target IC card was last used, and the login location determining module 307 may include a second obtaining sub-module 3071, a second determining sub-module 3072, a marking sub-module 3073, a first displaying sub-module 3074, a password receiving sub-module 3075, a query request sending sub-module 3076, a prompt receiving sub-module 3077, and an anomaly relieving sub-module 3078, where:
A second acquiring sub-module 3071, configured to acquire current geographic location information;
a second judging sub-module 3072, configured to judge whether the last used area information is the same as the current geographical location information after the second obtaining sub-module 3071 obtains the current geographical location information;
a marking submodule 3073, configured to generate abnormal login information and mark a state of the target IC card as an abnormal use state when the second judging submodule 3072 judges that the information of the area where the read-write device was used last time is different from the current geographical position information, so as to limit unlocking of the user;
a first display sub-module 3074, configured to display the abnormal login information to the user after the abnormal login information is generated by the marking sub-module 3073, so that the user inputs the password of the target IC card;
a password receiving submodule 3075 for receiving a password of the target IC card input by the user;
it should be noted that, after the first presenting submodule 3074 presents the abnormal login information to the user, the password receiving submodule 3075 may be triggered to start.
The inquiry request sending submodule 3076 is used for sending a password inquiry request to the operation server so that the operation server generates a password verification success prompt after the password verification is passed, wherein the password inquiry request comprises the ID of the target IC card and the password of the target IC card;
After the password receiving submodule 3075 receives the password of the target IC card input by the user, the query request sending submodule 3076 may be triggered to start.
A prompt receiving sub-module 3077, configured to receive a prompt that the password authentication sent by the operation server is successful;
it should be noted that, after the query request sending submodule 3076 sends the password query request to the operation server, the prompt receiving submodule 3077 may be triggered to start.
The abnormality removal submodule 3078 is configured to remove an abnormal use state of the target IC card after the prompt receiving submodule 3077 receives the password verification success prompt sent by the operation server.
It should be noted that, after the execution of the MAC code verification module 304 is completed, the login location determination module 307 may be triggered to start, and after the execution of the login location determination module 307 is completed, the replacement module 308 may be triggered to start.
The replacement module 308 may include a replacement hint generation sub-module 3081, a second presentation sub-module 3082, a confirmation instruction reception sub-module 3083, a replacement sub-module 3084, wherein:
an alternation cue generation submodule 3081 for generating an alternation acknowledgement cue;
a second display sub-module 3082 for displaying the replacement confirmation prompt to the user after the replacement confirmation prompt is generated by the replacement prompt generation sub-module 3081;
The confirmation instruction receiving submodule 3083 is configured to receive the replacement confirmation instruction after the second display submodule 30843 displays the replacement confirmation prompt to the user;
the replacement sub-module 3084 is configured to replace the last-used area information of the target IC card with the current geographic location information after the replacement confirmation instruction is received by the confirmation instruction receiving sub-module 3083.
In an alternative embodiment, the MAC code verification module 304 may include a second MAC code generation sub-module 3041, a MAC code comparison sub-module 3042, a first determination sub-module 3043, wherein:
the second MAC code generating submodule 3041 is configured to generate a second MAC code according to the first preset generation mode and the verification code;
a MAC code comparison submodule 3042 configured to compare the first MAC code with the second MAC code after the second MAC code generation submodule 3041 generates the second MAC code;
the first determining submodule 3043 is configured to determine that the verification result is passed when the comparison result of the MAC code comparing submodule 3042 is that the first MAC code is identical to the second MAC code.
In this optional embodiment, optionally, the related information includes at least one of an 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 alternative embodiment, the specific manner of generating the second MAC code by the second MAC code generating submodule 3041 according to the first preset generating manner and the verification code may include the following operation steps:
Sequentially converting the ID of the target IC card, the use start time of the target IC card, the use end time of the target IC card and the verification code into a single byte binary data stream;
according to DES algorithm, sequentially adding the authentication master key pre-stored in the read-write device with the single byte binary data stream corresponding to the ID of the target IC card, the single byte binary data stream corresponding to the use start time of the target IC card and the single byte binary data stream corresponding to the use end time of the target IC card;
a second MAC code is generated based on the splice result.
In yet another alternative embodiment, the data processing device based on IC card unlocking may comprise an identity verification module 309, optionally the identity verification module 309 may comprise a first acquisition sub-module 3091, an identity comparison sub-module 3092, wherein:
a first acquisition submodule 3091 for a second authentication code input by a user;
the identity comparing sub-module 3092 is configured to compare the second identity verification code with the first identity verification code after the first obtaining sub-module 3091 obtains the second identity verification code, and trigger the writing module 302 to start when the first identity code is consistent with the second identity code.
Therefore, the embodiment of the invention can judge whether the current target IC card is in the usual login place, and if the target IC card is not in the usual login place, the user is required to input the password of the target IC card, so that the use safety of the target IC card can be further improved. Meanwhile, the embodiment of the invention can also verify the identity information of the user so as to further improve the use safety of the target IC card.
Example five
Referring to fig. 5, fig. 5 is a schematic structural diagram of a data processing device based on an IC card unlocking according to a fifth embodiment of the present invention, where the device may be used to execute a data processing method based on the IC card unlocking. As shown in fig. 5, the data processing apparatus based on IC card unlocking includes:
a memory 501 in which executable program codes are stored;
a processor 502 coupled to the memory 501;
the processor 502 invokes executable program codes stored in the memory 501 to execute the steps in the data processing method based on IC card unlocking described in any one of the first to second embodiments.
The embodiment of the invention can randomly generate an authentication code and temporarily store the authentication code by executing a data processing method based on the unlocking of the IC card, and write the authentication code into the target IC card so that the target IC card generates a first MAC code according to a first preset generation mode and the authentication code, a read-write device receives the first MAC code sent by the target IC card, and the read-write device verifies the first MAC code according to a preset verification rule and generates a verification result; when the verification result is passed, the read-write device controls the lock device to be opened, so that the embodiment of the invention can safely process the interactive data between the IC card and the read-write device.
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 data processing method based on IC card unlocking described in any one of the first to second embodiments.
The embodiment of the invention can randomly generate an authentication code and temporarily store the authentication code by executing a data processing method based on the unlocking of the IC card, and write the authentication code into the target IC card so that the target IC card generates a first MAC code according to a first preset generation mode and the authentication code, a read-write device receives the first MAC code sent by the target IC card, and the read-write device verifies the first MAC code according to a preset verification rule and generates a verification result; when the verification result is passed, the read-write device controls the lock device to be opened, so that the embodiment of the invention can safely process the interactive data between the IC card and the read-write device.
Example seven
An embodiment seven of the present invention discloses a computer program product including a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the steps in the data processing method based on IC card unlocking described in any one of the embodiment one to the embodiment two.
The embodiment of the invention can randomly generate an authentication code and temporarily store the authentication code by executing a data processing method based on the unlocking of the IC card, and write the authentication code into the target IC card so that the target IC card generates a first MAC code according to a first preset generation mode and the authentication code, a read-write device receives the first MAC code sent by the target IC card, and the read-write device verifies the first MAC code according to a preset verification rule and generates a verification result; when the verification result is passed, the read-write device controls the lock device to be opened, so that the embodiment of the invention can safely process the interactive data between the IC card and the read-write device.
The apparatus embodiments described above are merely illustrative, wherein elements illustrated as separate elements may or may not be physically separate, and elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above detailed description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course by means of hardware. Based on such understanding, the foregoing technical solutions may be embodied essentially or in part in the form of a software product that may be stored in a computer-readable storage medium including Read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), one-time programmable Read-Only Memory (OTPROM), electrically erasable programmable Read-Only Memory (EEPROM), compact disc Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM) or other optical disc Memory, magnetic disc Memory, tape Memory, or any other medium that can be used for computer-readable carrying or storing data.

Claims (7)

1. The data processing method based on the unlocking of the IC card is characterized by comprising the following steps of:
when a read-write device receives an unlocking request triggered by a user, the read-write device judges whether a target IC card exists in a wireless identification range of the read-write device, if yes, the read-write device reads relevant information of the target IC card;
the read-write device determines that the target IC card is identified;
when the read-write device identifies the target IC card, the read-write device randomly generates a verification code and temporarily stores the verification 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 and the verification code;
the read-write device receives the first MAC code sent by the target IC card;
the read-write device verifies the first MAC code according to a preset verification rule and generates a verification result; when the verification result is that the verification result is passed, the read-write device controls the lock device to be opened;
the verifying the first MAC code by the read-write device according to a preset verification rule includes:
the read-write device generates a second MAC code according to the first preset generation mode and the verification code;
The read-write device compares the first MAC code with the second MAC code;
when the first MAC code is the same as the second MAC code, the read-write device determines that the verification result is passed;
the related information includes at least one of an 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;
and the read-write device generating a second MAC code according to the first preset generation mode and the verification code comprises the following steps:
the read-write device converts the ID of the target IC card, the use start time of the target IC card, the use end time of the target IC card and the verification code into a single byte binary data stream in sequence;
the read-write device sequentially performs addition operation on the authentication master key pre-stored in the read-write device, the single-byte binary data stream corresponding to the ID of the target IC card, the single-byte binary data stream corresponding to the use start time of the target IC card and the single-byte binary data stream corresponding to the use end time of the target IC card according to a DES algorithm;
the read-write device sequentially splices the addition result of the target IC card, the addition result of the use start time of the target IC card, the addition result of the use end time of the target IC card and the addition result of the verification code;
The read-write device generates a second MAC code based on the splicing result.
2. The data processing method according to claim 1, wherein the related information further includes a first authentication code stored in advance in the target IC card;
and after the read-write device randomly generates an authentication code and temporarily stores the authentication code, before the read-write device writes the authentication code into the target IC card, the data processing method further includes:
the read-write device acquires a second identity verification code input by the user;
the read-write device compares the second identity verification code with the first identity verification code; and when the first identity verification code is consistent with the second identity verification code, writing the verification code into the target IC card.
3. The data processing method according to claim 2, wherein the related information further includes history use information of the target IC card, wherein the history use information includes area information in which the target IC card was last used;
and when the verification result is passed, and before the read-write device controls the lock device to be opened, the data processing method further comprises the following steps:
The read-write device acquires current geographic position information;
the read-write device judges whether the information of the area where the last use is located is the same as the information of the current geographic position;
when the read-write device judges that the information of the area where the last use is located is different from the current geographical position information, the read-write device generates abnormal login information and marks the state of the target IC card as an abnormal use state so as to limit unlocking of the user;
the read-write device displays the abnormal login information to the user so that the user inputs the password of the target IC card;
the read-write device receives the password of the target IC card input by the user;
the read-write device sends a password inquiry request to an operation server so that the operation server generates a password verification success prompt after the password verification is passed, wherein the password inquiry request comprises the ID of the target IC card and the password of the target IC card;
and the read-write device receives the password verification success prompt sent by the operation server and releases the abnormal use state of the target IC card.
4. The data processing method according to claim 3, wherein after the read-write apparatus receives the password authentication success prompt sent by the operation server and releases the abnormal use state of the target IC card, the data processing method further comprises:
The read-write device generates an replacement confirmation prompt and displays the replacement confirmation prompt to the user so that the user inputs a replacement confirmation instruction according to the replacement confirmation prompt;
the read-write device receives the replacement confirmation instruction and replaces the area information of the last used area of the target IC card with the current geographic position information.
5. A data processing apparatus based on IC card unlocking, characterized in that the data processing apparatus comprises:
the verification code generation module is used for randomly generating a verification code and temporarily storing the verification code when the target IC card is identified;
the writing module is used for writing the verification code into the target IC card after the verification code generation module 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 mode and the verification code;
a receiving module, configured to receive the first MAC code sent by the target IC card after the writing module writes the verification code into the target IC card;
the MAC code verification module is used for verifying the first MAC code according to a preset verification rule after the receiving module receives the first MAC code and generating a verification result;
The driving module is used for controlling the lock device to be opened when the MAC code verification module verifies that the first MAC code passes according to a preset verification rule;
the data processing apparatus is further configured to:
before a read-write device randomly generates an identifying code and temporarily stores the identifying code, and when the read-write device receives an unlocking request triggered by a user, the read-write device judges whether a target IC card exists in a wireless identification range of the read-write device, if so, the read-write device reads related information of the target IC card;
the read-write device determines that the target IC card is identified;
the verifying the first MAC code by the read-write device according to a preset verification rule includes:
the read-write device generates a second MAC code according to the first preset generation mode and the verification code;
the read-write device compares the first MAC code with the second MAC code;
when the first MAC code is the same as the second MAC code, the read-write device determines that the verification result is passed;
the related information includes at least one of an 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;
And the read-write device generating a second MAC code according to the first preset generation mode and the verification code comprises the following steps:
the read-write device converts the ID of the target IC card, the use start time of the target IC card, the use end time of the target IC card and the verification code into a single byte binary data stream in sequence;
the read-write device sequentially performs addition operation on the authentication master key pre-stored in the read-write device, the single-byte binary data stream corresponding to the ID of the target IC card, the single-byte binary data stream corresponding to the use start time of the target IC card and the single-byte binary data stream corresponding to the use end time of the target IC card according to a DES algorithm;
the read-write device sequentially splices the addition result of the target IC card, the addition result of the use start time of the target IC card, the addition result of the use end time of the target IC card and the addition result of the verification code;
the read-write device generates a second MAC code based on the splicing result.
6. An unlocking device, characterized in that the unlocking device comprises:
a memory storing executable program code;
A processor coupled to the memory;
the processor invokes the executable program code stored in the memory to perform the data processing method based on IC card unlocking as claimed in any one of claims 1 to 4.
7. A computer-readable storage medium, wherein an IC card-based unlocking program is included in the computer-readable storage medium, which when executed by a processor, performs the data processing method for IC card-based unlocking according to any one of claims 1 to 4.
CN201811558843.8A 2018-12-19 2018-12-19 Data processing method and device based on IC card unlocking Active CN109741067B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811558843.8A CN109741067B (en) 2018-12-19 2018-12-19 Data processing method and device based on IC card unlocking

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811558843.8A CN109741067B (en) 2018-12-19 2018-12-19 Data processing method and device based on IC card unlocking

Publications (2)

Publication Number Publication Date
CN109741067A CN109741067A (en) 2019-05-10
CN109741067B true CN109741067B (en) 2023-05-30

Family

ID=66360647

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811558843.8A Active CN109741067B (en) 2018-12-19 2018-12-19 Data processing method and device based on IC card unlocking

Country Status (1)

Country Link
CN (1) CN109741067B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104727658A (en) * 2015-01-26 2015-06-24 湖南银宝科技发展有限公司 Intelligent lock, intelligent key and control method and device thereof

Family Cites Families (11)

* 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
CN103338188B (en) * 2013-06-08 2016-02-10 北京大学 A kind of dynamic authentication method of client side being applicable to mobile cloud
CN103401880B (en) * 2013-08-15 2016-03-23 西南大学 The system and method that a kind of industrial control network logs in automatically
CN103685311B (en) * 2013-12-27 2017-06-13 网易(杭州)网络有限公司 A kind of login validation method and equipment
CN105099690A (en) * 2014-05-19 2015-11-25 江苏博智软件科技有限公司 OTP and user behavior-based certification and authorization method in mobile cloud computing environment
CN104869124B (en) * 2015-06-05 2018-03-09 飞天诚信科技股份有限公司 A kind of authentication method based on geographical location information
CN106936806A (en) * 2015-12-31 2017-07-07 阿里巴巴集团控股有限公司 A kind of recognition methods of account abnormal login and device
CN107135201B (en) * 2017-04-01 2021-07-13 网易(杭州)网络有限公司 Network server login authentication method, device and storage medium
CN107248212A (en) * 2017-06-08 2017-10-13 深圳消费物联科技有限公司 A kind of intelligent lock system and its method for unlocking based on NFC
CN107578511A (en) * 2017-09-15 2018-01-12 林海航 A kind of smart lock and its Intelligent key
CN108171831B (en) * 2017-12-22 2020-08-21 武汉瑞纳捷电子技术有限公司 Bidirectional security authentication method based on NFC mobile phone and intelligent lock

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104727658A (en) * 2015-01-26 2015-06-24 湖南银宝科技发展有限公司 Intelligent lock, intelligent key and control method and device thereof

Also Published As

Publication number Publication date
CN109741067A (en) 2019-05-10

Similar Documents

Publication Publication Date Title
US10916114B1 (en) Exit-code-based RFID loss-prevention system
US6435416B1 (en) Method of authenticating a personal code of a user of an integrated circuit card
US9813116B2 (en) Secure near field communication solutions and circuits
US6933848B1 (en) System and method for disabling data on radio frequency identification tags
EP1755061B1 (en) Protection of non-promiscuous data in an RFID transponder
JP2010527069A (en) Dynamically programmable RFID transponder
CA2529176A1 (en) Method and system for creating and operating biometrically enabled multi-purpose credential management devices
CN107689871A (en) The Internet of Things mobile terminal veritified with identity and testimony of a witness unification checking method
US8123136B2 (en) Processing apparatus of portable electronic devices, portable electronic device, and processing system of portable electronic devices
CN102289688B (en) Method and device for label processing and access
CN113361293A (en) Card swiping method, card controller, electronic device and storage medium
CN109754505B (en) Unlocking method and device based on IC card
CN104951819A (en) Method for checking information by radio frequency identification
EP2663106A1 (en) Secure near field communication solutions and circuits
CN101727683B (en) Bus IC card identification authentication system
CN109741067B (en) Data processing method and device based on IC card unlocking
CN102160062B (en) Safe initialization procedure for communication system
KR101112535B1 (en) Method for Authenticating RFID Readers by Using Flags in RFID Tag
CN115019453B (en) POS terminal, registration method and system thereof, and storage medium
JP4646332B2 (en) RFID tag, RFID tag system, and RFID tag operation check device
EP2495690B1 (en) Transponder and method for monitoring access to application data in the transponder
JP4004324B2 (en) RFID authentication system
CN106936536B (en) Method for anti-theft vehicle-mounted unit IC card and anti-theft vehicle-mounted unit
KR20190143345A (en) Tntegrated payment terminal apparatus and method of the same
CN118153126B (en) RFID smart card information interaction method, device and system with privacy protection

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