CN112016336B - Method, device, equipment and storage medium for detecting copy card - Google Patents

Method, device, equipment and storage medium for detecting copy card Download PDF

Info

Publication number
CN112016336B
CN112016336B CN202010837772.6A CN202010837772A CN112016336B CN 112016336 B CN112016336 B CN 112016336B CN 202010837772 A CN202010837772 A CN 202010837772A CN 112016336 B CN112016336 B CN 112016336B
Authority
CN
China
Prior art keywords
card
target
data
record address
swiping record
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
CN202010837772.6A
Other languages
Chinese (zh)
Other versions
CN112016336A (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.)
Hitachi Building Technology Guangzhou Co Ltd
Original Assignee
Hitachi Building Technology Guangzhou 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 Hitachi Building Technology Guangzhou Co Ltd filed Critical Hitachi Building Technology Guangzhou Co Ltd
Priority to CN202010837772.6A priority Critical patent/CN112016336B/en
Publication of CN112016336A publication Critical patent/CN112016336A/en
Application granted granted Critical
Publication of CN112016336B publication Critical patent/CN112016336B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10009Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves
    • G06K7/10257Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves arrangements for protecting the interrogation against piracy attacks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/34Payment architectures, schemes or protocols characterised by the use of specific devices or networks using cards, e.g. integrated circuit [IC] cards or magnetic cards
    • G06Q20/341Active cards, i.e. cards including their own processing means, e.g. including an IC or chip

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Electromagnetism (AREA)
  • General Engineering & Computer Science (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Accounting & Taxation (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a method, a device, equipment and a storage medium for detecting a copy card, wherein the method is applied to a card reader and comprises the following steps: reading target data stored in a target chip, wherein the target data comprises a reset code stored in the target chip; when the target data are inconsistent with the preset data, determining whether the stored data in the card reader comprise the target data or not; if the target card exists, determining that the target card to which the target chip belongs is a copy card. The technical scheme of the embodiment of the invention solves the technical problem that whether the card used by the user is the copy card cannot be determined because the reset codes in the copy card are all initial codes in the prior art, and realizes the technical effect of quickly, conveniently and accurately determining whether the IC card used currently is the copy card.

Description

Method, device, equipment and storage medium for detecting copy card
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method, a device, equipment and a storage medium for detecting a copy card.
Background
At present, when a user enters a certain cell or building, the user enters and exits through card swiping, and at the moment, the user copies a plurality of copy cards, so that other users enter and exit the cell based on the copy cards, and a certain security risk exists.
The card commonly used in the existing market is a GDM or GTU card, and the card has the characteristics that: the initial value of the rolling code is set in the new card, and the card reader can read the information in the card.
When the card reader reads information in the card, an initial rolling code in the card can be read, when the card reader determines that the card is a new card according to the initial rolling code, the next rolling code can be written into the card, and the reader can return to successfully write, but the rolling code is not updated successfully in practice, namely, the data in the card always keeps the initial rolling code, so that the card can be swiped through only by copying the card, and the technical problem that whether the card used by a user is a copied card cannot be determined exists.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for detecting a copy card, which are used for realizing the technical effects of quickly, accurately and conveniently determining whether a currently used card is the copy card.
In a first aspect, an embodiment of the present invention provides a method for detecting a duplicate card, where the method is applied to a card reader, including:
reading target data stored in a target chip, wherein the target data comprises a reset code stored in the target chip;
when the target data are inconsistent with the preset data, determining whether the stored data in the card reader comprise the target data or not;
if the target card exists, determining that the target card to which the target chip belongs is a copy card.
In a second aspect, an embodiment of the present invention further provides an apparatus for detecting a duplicate card, where the apparatus is configured in a card reader, including:
the target data reading module is used for reading target data stored in a target chip, wherein the target data comprises a reset code stored in the target chip;
the target data determining module is used for determining whether the target data is included in the data stored in the card reader or not when the target data is inconsistent with the preset data;
and the copy card determining module is used for determining that the target card to which the target chip belongs is a copy card if the copy card exists.
In a third aspect, an embodiment of the present invention further provides an apparatus, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement a method of detecting duplicate cards as described in any of the embodiments of the present invention.
In a fourth aspect, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method of detecting a duplicate card according to any of the embodiments of the present invention.
According to the technical scheme, when the reset code in the target data is read, whether the target card to which the target data belongs is the copy card can be determined according to the relation between the reset code and the preset data, so that the technical problem that whether the target card is the copy card or not can not be determined due to the fact that the data stored in each copy card are all initial rolling codes in the prior art can be solved, and the technical effect of quickly, conveniently and accurately determining whether the target card is the copy card is achieved.
Drawings
In order to more clearly illustrate the technical solution of the exemplary embodiments of the present invention, a brief description is given below of the drawings required for describing the embodiments. It is obvious that the drawings presented are only drawings of some of the embodiments of the invention to be described, and not all the drawings, and that other drawings can be made according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for detecting a duplicate card according to an embodiment of the invention;
FIG. 2 is a flowchart of a method for detecting a duplicate card according to a second embodiment of the present invention;
FIG. 3 is a schematic flow chart of storing data in a target card in advance according to a third embodiment of the present invention;
FIG. 4 is a flowchart of a method for detecting a duplicate card according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a device for detecting a copy card according to a fourth embodiment of the present invention;
fig. 6 is a schematic diagram of an apparatus structure according to a fifth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1 is a schematic flow chart of a method for detecting a duplicate card according to an embodiment of the present invention, where the method can be performed by a device for detecting a duplicate card, and the device can be implemented in software and/or hardware. The hardware may be an electronic device, optionally a card reader.
Before the technical scheme of the embodiment is introduced, the following application scenario is first introduced. At present, when a user accesses a cell, identity verification is required, and optionally, whether the user can access the cell or not is verified through a card sent in advance, for example, the method can be applied to a cell, an office building and the like where the user accesses by swiping a card, namely, the technical scheme provided by the embodiment can be adopted to determine whether the card currently used by the user is a copy card as long as the user accesses by swiping the card, so that the technical effect of card uniqueness is determined. Before verifying whether the card is a target card, corresponding target data can be stored in the target card, and optionally, a reset code, an initial card swiping record address and authority data when the target card is used for the first time. And processing the card issuing time, the card issuing machine number and the card issuing serial number by adopting a snowflake algorithm to obtain the reset code of the target card. In order to improve the security of the target data in the target card, an encryption algorithm can be adopted to encrypt the reset code, the initial card swiping record address and the authority data to obtain ciphertext data corresponding to the target data, so that when the card reader reads the data, a corresponding decryption algorithm can be adopted to decrypt the ciphertext data to obtain the target data.
As shown in fig. 1, the method of this embodiment includes:
s110, reading target data stored in a target chip, wherein the target data comprises a reset code stored in the target chip.
The target chip refers to a chip embedded in the target card for storing data. The data stored in the target chip may be regarded as target data. The target data may include a reset code therein. And determining whether the target card is the card for initial use according to the value corresponding to the reset code.
Specifically, when the user approaches the target card to the card reader, the card reader can read the target data in the target card and acquire the reset code in the target data.
It should be noted that, before the card issuing system issues each target card, the target data may be edited in advance, for example, the target data may include authority data, a reset code, and an initial card swiping record address, and the target data is stored in a target chip in the target card. In order to improve the security of the target data, an encryption algorithm may be used to encrypt the target data to obtain ciphertext data corresponding to the target data, and store the ciphertext data in a sector of the target chip. The reset code is uniquely determined, and a snowflake algorithm can be adopted to process the issued card time stamp, the sending machine ID and the issued serial number corresponding to the card, so as to obtain a 64-bit unique reset code corresponding to the target card.
Specifically, when the user approaches or approaches the target card to the card reader, the card reader can read ciphertext data stored in the target chip in the target card, and the card reader can decrypt the ciphertext data by adopting a corresponding decryption algorithm to obtain decrypted data corresponding to the ciphertext data, namely the target data, and can acquire a reset code in the target data.
And S120, when the target data are inconsistent with the preset data, determining whether the stored data in the card reader comprise the target data or not.
Wherein, the target data at this time mainly refers to the reset code determined when the card issuing system issues the card. The preset data is preset. The preset data may be data corresponding to a reset code, and is used for determining whether the target card is a copy card according to a relationship between the reset code in the target data and the preset data, and optionally, the preset data may be 0. Specifically, it is possible to detect whether the target card is an initially used card. Optionally, after the target data is acquired, a reset code in the target data may be acquired. When the reset code in the target data is different from the preset data, the target card is considered not to be used for the first time, and whether the data corresponding to the reset code in the target data is stored in the card reader or not can be acquired.
After the target card swipes through the card reader, the reset code in the target data can be set as preset data, and the 64-bit unique identifier reset code generated when the card issuing system issues the card is stored in the card reader, so that when the target data is read, whether the card is used for the first time or not is determined according to whether the reset code is stored in the card reader or not, and further whether the target card is a copy card is determined.
And S130, if the target card exists, determining that the target card to which the target chip belongs is a copy card.
Specifically, when the data stored in the card reader includes a reset code corresponding to the target card, which indicates that the target card has been swiped or that the same card as the target card has been already used, the target card is not reusable, and the target card can be determined to be a duplicate card.
That is, whether the target card is a duplicate card may be determined according to whether a reset code corresponding to the target card is stored in the card reader.
According to the technical scheme, when the reset code in the target data is read, whether the target card to which the target data belongs is the copy card can be determined according to the relation between the reset code and the preset data, so that the technical problem that whether the target card is the copy card or not can not be determined due to the fact that the data stored in each copy card are all initial rolling codes in the prior art can be solved, and the technical effect of quickly, conveniently and accurately determining whether the target card is the copy card is achieved.
On the basis of the technical scheme, if the stored data does not include the target data, the target data is stored in a cache in the card reader, and a reset code in the target card is updated to the preset data.
It can be understood that if the card reader does not store the data corresponding to the reset code in the target card, the target card is considered to be used for the first time, and the permission data in the target data can be acquired to perform permission verification, so that after the permission verification is passed, the reset code in the target data is stored in the cache of the card reader, and meanwhile, the reset code in the target card is updated to be preset data.
The method has the advantages that whether the target card is used for the first time can be quickly determined, and whether the target card is a copied card can be determined based on the copy code.
Example two
On the basis of the technical scheme, after the target card is determined not to be the copy card based on the copy code, the address data of the card swiping record in the target data can be further combined to determine whether the target card is the copy card or whether the copy card exists. Fig. 2 is a flowchart of a method for detecting a copy card according to a second embodiment of the present invention. Wherein, the technical terms identical to or corresponding to the above embodiments are not repeated herein.
As shown in fig. 2, the method includes:
s210, reading target data stored in a target chip, wherein the target data comprises a reset code stored in the target chip.
And S220, when the target data are consistent with preset data, acquiring current card swiping record address data stored in the target data and historical card swiping record address data stored in the card reader.
It can be understood that when the reset code in the target data is consistent with the preset data, that is, the target card is preliminarily determined to be not the copy card according to the reset code, the current card swiping record address data stored in the target data and the historical card swiping record address data stored in the card reader can be obtained.
It should be noted that, when the card is swiped, the address data recorded by the card may be marked, alternatively, when the card is swiped last time, the mark of the address data recorded by the card is 1, and when the card is swiped this time, the mark of the address data recorded by the card may be 2. The swipe recording address stored in the target data may be used as the current swipe recording address. The historical card swiping record address refers to card swiping record address data of a target card which can be marked after the target card is read by a card reader.
And S230, determining that the target card is a copy card according to the relation between the historical card swiping record address data and the current card swiping record address data.
Specifically, if it is detected that the historical card swiping record address data is not the current card swiping record address data but the historical card swiping record address data which is newly stored, the data is read by other cards through the card reader, and the target card can be determined to be the copy card; or if the latest data of the historical digital card recording address is inconsistent with the current digital card recording address data, the fact that other cards read the data through the card reader is indicated, and the target card can be determined to be the copy card.
Of course, if it is detected that the historical card-swiping record address data does not include data other than the current card-swiping record address data, permission information in the target data is acquired, so that whether the card-swiping can pass or not can be determined according to the permission information.
It is understood that the target data further includes permission data, and the permission data may be access permission and/or floor permission. It should be noted that the permission data may be specifically set according to a specific application scenario, which is not limited herein.
Specifically, when there is no other card-punching record address data in the history card-punching record address data other than the current card-punching record address data, or the latest history card-punching record address data in the history card-punching record address data is consistent with the current card-punching record address data, the target card is considered not to be a duplicate card. At this time, the authority data stored in the target card may be acquired to perform an operation corresponding to the authority data, and optionally, the card swiping pass or the elevator is operated to the corresponding floor.
That is, when the rights information is consistent with the rights information stored in the card reader, the swipe card passes.
On the basis of the technical scheme, after the card swiping is passed, updating the reset code of the target data in the target chip into preset data, and updating the card reader and the card swiping record address data in the target data into the current card swiping record address data so as to determine whether the target card is a copy card or not based on the card swiping record address data in the card reader and the card swiping record address data in the target data.
Illustratively, the current address data of the target card is 14, the address data of the historical address data of the target card is 14, and the card reader and the address data of the target card can be updated to 15 when the card passes. Meanwhile, the reset code in the target data can be updated to preset data, and optionally, the preset data is 0.
According to the technical scheme, when the reset code is determined to be consistent with the preset data, the historical card record address data in the card reader and the current card swiping record address data in the target data can be further obtained, whether the target card is a copy card or not is rapidly determined based on the historical card record address data and the current card swiping record address data, and the technical effects of convenience and accuracy in determining the copy card are improved.
Example III
As an alternative embodiment of the foregoing embodiment, fig. 3 is a schematic flow chart of storing data in a target card in advance according to a third embodiment of the present invention. Wherein, the technical terms identical to or corresponding to the above embodiments are not repeated herein.
As shown in fig. 3, the method includes:
s310, generating a unique reset code ID by adopting a snowflake algorithm.
The new card issued by the card issuing system comprises a chip for storing data, authority data corresponding to the card can be written in a sector of the chip, and information such as an address initial value, a card reset code and the like is recorded by swiping the card.
The snowflake algorithm refers to an algorithm for generating a unique identifier, and aims to solve the problem that a large amount of data is gushed in a high concurrency period, and the algorithm can be generated when each resource is required to be identified.
In this embodiment, the generation of the unique reset code ID using the snowflake algorithm may be: the method comprises the steps of obtaining a time stamp of a target card issued by a card issuing system, a machine ID of the target card and a serial number corresponding to the target card, processing the time stamp, the machine ID and the serial number by adopting a snowflake algorithm to obtain a unique identifier corresponding to the target card, and taking the determined unique identifier as a reset code ID of the target card.
S320, initializing a card swiping record address value.
Specifically, initializing the address value of the card-swiping record may be setting the address value of the card-swiping record to an initial value, and optionally, the initial value may be 0.
S330, determining the authority data corresponding to the card.
Where rights refer to the scope and extent to which something is decided.
It should be noted that, the permission data corresponding to different application scenarios may be different, for example, if the elevator enters the home after the application scenario is swiped, the permission data may be a floor permission; if the application scene is a card swiping access district, the permission data can be access permission and the like.
It can be specifically understood that corresponding permission data can be written in the target card according to a specific application scene, so that the user has corresponding permission when the user swipes the card and goes out.
S340, encrypting the authority data, the card swiping record address value and the reset code ID by adopting an encryption algorithm, and storing the ciphertext obtained by the encryption process into a sector in the target card.
It should be noted that, any encryption algorithm may be used to encrypt the mentioned data to obtain a ciphertext corresponding to the data, and the ciphertext is stored in a sector of the target card, so that when the card reader reads the ciphertext, a corresponding decryption algorithm may be used to decrypt the ciphertext to obtain corresponding data, and then the authority of the card and whether the card is a copy card are verified according to the decrypted data.
And after the authority data, the card-swiping recorded address value and the reset code ID are encrypted, a corresponding ciphertext is obtained. Accordingly, a sector may be a storage area for storing ciphertext.
Specifically, the entitlement data, the initial value of the swipe record address and the reset code ID are encrypted by adopting an encryption algorithm to obtain a ciphertext corresponding to the entitlement data, and the ciphertext can be stored in a sector of a target chip in the target card.
On the basis of the above, after the card issuing system sends the target card, the card reader may read the target data stored in the target card, and further determine whether the target card is a duplicate card based on the target data. As shown in fig. 4, the method includes:
s401, reading the ciphertext in the target card, and decrypting the ciphertext to obtain the reset code, the current card swiping record address and the authority data stored in the target card.
The ciphertext is obtained after the reset code, the card swiping record address value and the authority data are encrypted. The ciphertext data can be decrypted by adopting a decryption algorithm corresponding to the encryption algorithm, so as to obtain target data of the target card, namely a reset code, a card swiping record address value and authority data.
S402, judging whether the reset code is preset data or not, if so, executing S403; if not, S404 is performed.
The preset data may be a preset reset code, and optionally, the preset data may be 0.
Specifically, if the reset code in the target data is preset data, it indicates that the target card is not used for the first time, and S403 may be executed, that is, the current card-swiping record address value in the target data is further obtained to determine whether the target card is a copy card; if the reset code is not the preset data, it indicates that the target card is used for the first time, and it can acquire whether the reset code corresponding to the card is stored in the storage area of the card reader, and further determine whether the target card is a copy card, that is, execute S404.
S403, acquiring a current card swiping record address, judging whether a historical card swiping record address stored in a card reader comprises the current card swiping record address, and if yes, executing S405; if not, S406 is performed.
It should be noted that, when the card is swiped through, the address of the card swipe record may be recorded, for example, when the first card swipe is finished, the address of the card swipe record may be 1, when the second card swipe is finished, the address of the card swipe record may be 2, and when the card swipe is added, the address of the card swipe record may be increased by 1, and optionally, when the nth card swipe is finished, the address of the card swipe record may be N.
The current swipe recording address may be a swipe recording address recorded in the target data. A card reader refers to an instrument that reads data in a target chip. Of course, the card reader may store a history swipe record address value corresponding to the target card.
Specifically, when the reset code in the target data is consistent with the preset data, the target card is not used for the first time, and the card swiping record address in the target data and the historical card swiping record address stored in the card reader can be obtained. When the historical card swiping record address comprises a card swiping record address except the current card swiping record address, the existence of the copy card corresponding to the target card is indicated. If the historical card swiping record address does not include the card swiping record address except the current card swiping record address, the card is the target card and is not the copy card.
Illustratively, the current card-swiping record address in the target data is 10, the historical card-swiping record address is 1-11, and at this time, 11 other than 10 in the read historical card-swiping record address indicates that the card reader has read the copy card of the card, at this time, the card with the current card-swiping record address of 11 may be taken as the target card, at this time, the target card used is the copy card, and the use cannot be continued, i.e. S405 is executed. If the current card-swiping record in the target data is 10 and the historical card-swiping record address is 1-10, that is, the address in the historical card-swiping record is consistent with the current card-swiping record address, the target card is not considered to be a duplicate card, that is, S406 is executed.
S404, judging whether a reset code is stored in the card reader or not, if yes, executing S405; if not, then S407 is performed.
It can be understood that, when the reset code is different from the preset data, in order to determine whether the card is used for the first time, the reset code corresponding to the target card stored in the card reader can be obtained, if yes, it is indicated that the target card is not used for the first time, and the target card may be a duplicate card; if the reset code corresponding to the target card is not stored in the card reader, the target card is considered to be used for the first time, namely, the 64-bit unique ID generated by adopting a snowflake algorithm can be read, and the reset code is stored in the card reader to be used for detecting whether the target card is used for the first time.
Of course, after the reset code is stored in the card reader, the reset code in the target card may be set to preset data, so as to improve the technical effect of determining whether the target card is a duplicate card.
S405, determining the target card as a copy card.
That is, the target card can be determined to be the copy card based on the above manner.
S406, reading the authority data and confirming passing.
It can be understood that after the verification of the reset code and the address of the card swiping record is completed, the permission data stored in the target card can be further read after the target card is determined not to be a duplicate card, so as to determine whether the card swiping can pass according to the read permission data.
Specifically, the authority data in the target data is acquired, if the authority data is detected to be legal, and optionally, the authority data is selected from the cell, the card can be swiped through, otherwise, the card cannot be swiped through.
S407, storing the reset code into the card reader.
It will be appreciated that in order to increase the efficiency of determining whether the target card is a duplicate card, after determining that the target card is initially in use, the reset data in the target card may be stored in the card reader, and the reset code in the target data may be modified to preset data.
S408, updating target data in the card reader.
Namely, the reset code in the target data is modified into preset data, and the current card swiping record address in the target data is updated and stored.
According to the technical scheme, when the reset code in the target data is read, whether the target card to which the target data belongs is the copy card can be determined according to the relation between the reset code and the preset data, so that the technical problem that whether the target card is the copy card or not can not be determined due to the fact that the data stored in each copy card are all initial rolling codes in the prior art can be solved, and the technical effect of quickly, conveniently and accurately determining whether the target card is the copy card is achieved.
Example IV
Fig. 5 is a schematic structural diagram of a device for detecting a duplicate card according to a fourth embodiment of the present invention, where the device may be applied to a card reader, and the device includes: a target data reading module 510, a target data determination module 520, and a copy card determination module 530.
The target data reading module 510 is configured to read target data stored in a target chip, where the target data includes a reset code stored in the target chip; a target data determining module 520, configured to determine whether the target data is included in the data stored in the card reader when the target data is inconsistent with the preset data; the copy card determining module 530 is configured to determine that the target card to which the target chip belongs is a copy card if the copy card exists.
According to the technical scheme, when the reset code in the target data is read, whether the target card to which the target data belongs is the copy card can be determined according to the relation between the reset code and the preset data, so that the technical problem that whether the target card is the copy card or not can not be determined due to the fact that the data stored in each copy card are all initial rolling codes in the prior art can be solved, and the technical effect of quickly, conveniently and accurately determining whether the target card is the copy card is achieved.
On the basis of the technical scheme, the target data determining module is further configured to store the target data into the cache in the card reader and update the reset code in the target card to the preset data if the stored data does not include the target data.
On the basis of the above technical solutions, the target data reading module is further configured to: when the target data is consistent with preset data, acquiring current card swiping record address data stored in the target data and historical card swiping record address data stored in the card reader; and determining that the target card is a copy card according to the relation between the historical card swiping record address data and the current card swiping record address data.
On the basis of the technical scheme, the target data reading module is further used for: and if the historical card swiping record address data is detected to comprise the current card swiping record address data, determining that the target card is a copy card.
On the basis of the above technical solutions, the target data reading module is further configured to: if the historical card swiping record address data is detected not to include the current card swiping record address data, acquiring authority information in the target data, and determining whether the card swiping can pass or not according to the authority information.
On the basis of the technical schemes, the device further comprises: and the permission verification module is used for passing through the card swiping when the permission information is consistent with the permission information stored in the card reader.
On the basis of the technical schemes, the device further comprises: and the data updating module is used for updating the reset code of the target data in the target chip into preset data, and updating the card reader and the card swiping record address data in the target data into the current card swiping record address data so as to determine whether the target card is a copy card or not based on the card swiping record address data in the card reader and the card swiping record address data in the target data.
The device for detecting the duplicate card provided by the embodiment of the invention can execute the method for detecting the duplicate card provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the method.
It should be noted that each unit and module included in the above apparatus are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the embodiments of the present invention.
Example five
Fig. 6 is a schematic structural diagram of a device according to a fifth embodiment of the present invention. Fig. 6 shows a block diagram of an exemplary device 60 suitable for use in implementing the embodiments of the present invention. The device 60 shown in fig. 6 is only an example and should not be construed as limiting the functionality and scope of use of embodiments of the invention.
As shown in fig. 6, the device 60 is in the form of a general purpose computing device. The components of device 60 may include, but are not limited to: one or more processors or processing units 601, a system memory 602, and a bus 603 that connects the different system components (including the system memory 602 and the processing units 601).
Bus 603 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Device 60 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by device 60 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 602 may include computer system readable media in the form of volatile memory such as Random Access Memory (RAM) 604 and/or cache memory 605. The device 60 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 606 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard disk drive"). Although not shown in fig. 6, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 603 through one or more data medium interfaces. Memory 602 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
A program/utility 608 having a set (at least one) of program modules 607 may be stored in, for example, memory 602, such program modules 607 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 607 generally perform the functions and/or methods of the described embodiments of the invention.
The device 60 may also communicate with one or more external devices 609 (e.g., keyboard, pointing device, display 610, etc.), one or more devices that enable a user to interact with the device 60, and/or any device (e.g., network card, modem, etc.) that enables the device 60 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 611. Also, device 60 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through network adapter 612. As shown, the network adapter 612 communicates with other modules of the device 60 over the bus 603. It should be appreciated that although not shown in fig. 6, other hardware and/or software modules may be used in connection with device 60, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 601 executes various functional applications and data processing by running a program stored in the system memory 602, for example, implementing a method of detecting a copy card provided by an embodiment of the present invention.
Example six
A sixth embodiment of the present invention also provides a storage medium containing computer-executable instructions for performing a method of detecting duplicate cards when executed by a computer processor.
The method comprises the following steps:
reading target data stored in a target chip, wherein the target data comprises a reset code stored in the target chip;
when the target data are inconsistent with the preset data, determining whether the stored data in the card reader comprise the target data or not;
if the target card exists, determining that the target card to which the target chip belongs is a copy card.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (7)

1. A method of detecting a duplicate card, for use in a card reader, comprising:
reading target data stored in a target chip, wherein the target data comprises a reset code stored in the target chip;
when the target data are inconsistent with the preset data, determining whether the stored data in the card reader comprise the target data or not;
if so, determining that the target card to which the target chip belongs is a copy card;
the value corresponding to the reset code is used for determining whether the target card is a card for initial use;
the target data includes address data of card swiping record, and after the target data stored in the target chip is read, the method further includes:
when the target data is consistent with preset data, acquiring current card swiping record address data stored in the target data and historical card swiping record address data stored in the card reader;
determining that the target card is a copy card according to the relation between the historical card swiping record address data and the current card swiping record address data;
the determining that the target card is a copy card according to the relation between the historical card swiping record address data and the current card swiping record address data comprises the following steps:
if detecting that the history card swiping record address data comprises newly-added data except the current card swiping record address data, determining that the target card is a copy card;
if detecting that the historical card swiping record address data does not include data except the current card swiping record address data, acquiring authority information in the target data, and determining whether the card swiping can pass according to the authority information.
2. The method as recited in claim 1, further comprising:
if the stored data does not include the target data, the target data is stored in a cache of the card reader, and the reset code in the target card is updated to the preset data.
3. The method as recited in claim 1, further comprising:
and when the authority information is consistent with the authority information stored in the card reader, the card is swiped through.
4. A method according to any one of claims 1-3, further comprising:
and updating the reset code of the target data in the target chip into preset data, and updating the card reader and the card swiping record address data in the target data into the current card swiping record address data so as to determine whether the target card is a copy card or not based on the card swiping record address data in the card reader and the card swiping record address data in the target data.
5. An apparatus for detecting a duplicate card, the apparatus comprising:
the target data reading module is used for reading target data stored in a target chip, wherein the target data comprises a reset code stored in the target chip;
the target data determining module is used for determining whether the target data is included in the data stored in the card reader or not when the target data is inconsistent with the preset data;
the copy card determining module is used for determining that the target card to which the target chip belongs is a copy card if the copy card exists;
the value corresponding to the reset code is used for determining whether the target card is a card for initial use;
the target data reading module is further used for acquiring current card swiping record address data stored in the target data and historical card swiping record address data stored in the card reader when the target data are consistent with preset data;
determining that the target card is a copy card according to the relation between the historical card swiping record address data and the current card swiping record address data;
the determining that the target card is a copy card according to the relation between the historical card swiping record address data and the current card swiping record address data comprises the following steps:
if detecting that the history card swiping record address data comprises newly-added data except the current card swiping record address data, determining that the target card is a copy card;
if detecting that the historical card swiping record address data does not include data except the current card swiping record address data, acquiring authority information in the target data, and determining whether the card swiping can pass according to the authority information.
6. An electronic device, the device comprising:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of detecting duplicate cards of any of claims 1-4.
7. A storage medium containing computer executable instructions for performing the method of detecting duplicate cards of any one of claims 1-4 when executed by a computer processor.
CN202010837772.6A 2020-08-19 2020-08-19 Method, device, equipment and storage medium for detecting copy card Active CN112016336B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010837772.6A CN112016336B (en) 2020-08-19 2020-08-19 Method, device, equipment and storage medium for detecting copy card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010837772.6A CN112016336B (en) 2020-08-19 2020-08-19 Method, device, equipment and storage medium for detecting copy card

Publications (2)

Publication Number Publication Date
CN112016336A CN112016336A (en) 2020-12-01
CN112016336B true CN112016336B (en) 2024-01-02

Family

ID=73505095

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010837772.6A Active CN112016336B (en) 2020-08-19 2020-08-19 Method, device, equipment and storage medium for detecting copy card

Country Status (1)

Country Link
CN (1) CN112016336B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114648828B (en) * 2020-12-21 2023-11-21 京东方科技集团股份有限公司 Access control method, system, electronic equipment and non-transient storable medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002183706A (en) * 2000-12-18 2002-06-28 Gaia:Kk Card information protecting method
EP1258807A2 (en) * 2001-05-14 2002-11-20 Matsushita Electric Industrial Co., Ltd. Illegal access monitoring device, ic card, and illegal access monitoring method
CN107341534A (en) * 2017-07-18 2017-11-10 南京唯捷豪信息科技有限公司 A kind of electronic card copy prevention method, device and management server
CN109447653A (en) * 2018-11-08 2019-03-08 广东启正电子科技有限公司 A kind of IC card encryption method, device, terminal and storage medium
WO2020049951A1 (en) * 2018-09-04 2020-03-12 ソニー株式会社 Ic card, processing method, and information processing system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002183706A (en) * 2000-12-18 2002-06-28 Gaia:Kk Card information protecting method
EP1258807A2 (en) * 2001-05-14 2002-11-20 Matsushita Electric Industrial Co., Ltd. Illegal access monitoring device, ic card, and illegal access monitoring method
CN107341534A (en) * 2017-07-18 2017-11-10 南京唯捷豪信息科技有限公司 A kind of electronic card copy prevention method, device and management server
WO2020049951A1 (en) * 2018-09-04 2020-03-12 ソニー株式会社 Ic card, processing method, and information processing system
CN109447653A (en) * 2018-11-08 2019-03-08 广东启正电子科技有限公司 A kind of IC card encryption method, device, terminal and storage medium

Also Published As

Publication number Publication date
CN112016336A (en) 2020-12-01

Similar Documents

Publication Publication Date Title
CN110414268B (en) Access control method, device, equipment and storage medium
CN108681565B (en) Block chain data parallel processing method, device, equipment and storage medium
CN102171704B (en) External encryption and recovery management with hardware encrypted storage devices
US20160371495A1 (en) Controlled access to data in a sandboxed environment
WO2020192406A1 (en) Method and apparatus for data storage and verification
CN111291339B (en) Method, device, equipment and storage medium for processing blockchain data
CN103136468A (en) Facilitating system service request interactions for hardware-protected applications
US9678766B2 (en) Controlling the configuration of computer systems
CN110324358B (en) Video data management and control authentication method, module, equipment and platform
JP2011048661A (en) Virtual server encryption system
CN110324416B (en) Download path tracking method, device, server, terminal and medium
WO2021137769A1 (en) Method and apparatus for sending and verifying request, and device thereof
CN105283921A (en) Non-volatile memory operations
US20180173857A1 (en) Prevention of unauthorized resource updates
CN110545542B (en) Main control key downloading method and device based on asymmetric encryption algorithm and computer equipment
CN112016336B (en) Method, device, equipment and storage medium for detecting copy card
TW201738802A (en) A removable security device and a method to prevent unauthorized exploitation and control access to files
US11494219B2 (en) Encryption and remote attestation of containers
CN110830428A (en) Block chain financial big data processing method and system
CN111783119A (en) Form data security control method and device, electronic equipment and storage medium
WO2019184741A1 (en) Application program information storing method and apparatus, and application program information processing method and apparatus
CN112883397B (en) Data storage method, data reading method, device, equipment and storage medium
CN111062053B (en) Method, device, equipment and medium for processing biological characteristic data
CN110807640A (en) Method and device for recording copyright information
CN111639353B (en) Data management method and device, embedded equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant