CN112016336A - 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
CN112016336A
CN112016336A CN202010837772.6A CN202010837772A CN112016336A CN 112016336 A CN112016336 A CN 112016336A CN 202010837772 A CN202010837772 A CN 202010837772A CN 112016336 A CN112016336 A CN 112016336A
Authority
CN
China
Prior art keywords
card
target
data
record address
copy
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.)
Granted
Application number
CN202010837772.6A
Other languages
Chinese (zh)
Other versions
CN112016336B (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

Images

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 reset codes stored in the target chip; when the target data is inconsistent with preset data, determining whether the target data is included in the data stored in the card reader; and if so, 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 a user is the copy card cannot be determined because the reset codes in the copy card are all the 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 wants to enter a certain cell or building, the user mostly enters and exits through swiping a card, and at the moment, the user can copy a plurality of copy cards so that other users enter and exit the cell based on the copy cards, and certain safety risk exists.
The common card in the existing market is GDM or GTU card, and the card of the type is characterized in 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 the information in the card, the 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 that the writing is successful, but the rolling code is not updated successfully, that is, the data in the card always keeps the initial rolling code, so that the card can be swiped for passing through as long as the card is copied, and the technical problem that whether the card used by a user is the 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 effect of quickly, accurately and conveniently determining whether the currently used card is the copy card.
In a first aspect, an embodiment of the present invention provides a method for detecting a copy card, where the method, applied in a card reader, includes:
reading target data stored in a target chip, wherein the target data comprises reset codes stored in the target chip;
when the target data is inconsistent with preset data, determining whether the target data is included in the data stored in the card reader;
and if so, 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 copy card, where the apparatus is configured in a card reader, and the apparatus includes:
the target data reading module is used for reading target data stored in a target chip, and the target data comprises reset codes 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 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, where the apparatus includes:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method for detecting a copy card as in any of the embodiments of the invention.
In a fourth aspect, embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are used to perform the method for detecting a copy card according to any of the embodiments of the present invention.
According to the technical scheme of the embodiment of the invention, 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 cannot be determined due to the fact that the data stored in each copy card is the initial rolling code in the prior art is solved, and the technical effect of rapidly, conveniently and accurately determining whether the target card is the copy card is realized.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flowchart of a method for detecting a copy card according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for detecting a copy card according to a second embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating data pre-stored in a target card according to a third embodiment of the present invention;
fig. 4 is a schematic flowchart of a method for detecting a copy card according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus for detecting a copy card according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an apparatus according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart illustrating a method for detecting a duplicate card according to an embodiment of the present invention, where the method can be executed 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 scenarios are briefly introduced. At present, when a user accesses a cell, identity authentication is required, optionally, whether the user can access the cell 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 can access the cell by swiping a card, that is, in an application scene where the user needs to access the cell by swiping the card, the technical scheme provided by the embodiment can be adopted to determine whether the card currently used by the user is a duplicate card, and then the technical effect of determining the uniqueness of the card is achieved. Before the card is verified to be the 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 can be stored. The card issuing time, the card issuing machine number and the card issuing serial number can be processed 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, the reset code, the initial card swiping record address and the authority data can be encrypted by adopting an encryption algorithm to obtain ciphertext data corresponding to the target data, and when the card reader reads the data, the ciphertext data can be decrypted by adopting a corresponding decryption algorithm to obtain the target data.
As shown in fig. 1, the method of this embodiment includes:
and S110, reading target data stored in the 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 and used for storing data. The data stored in the target chip may be taken as the target data. The target data may include a reset code. And determining whether the target card is the card used for the first time according to the value corresponding to the reset code.
Specifically, when a user brings a target card close to the card reader, the card reader can read target data in the target card and acquire a reset code in the target data.
It should be noted that, before each target card is issued by the card issuing system, 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 the ciphertext data may be stored in a sector of the target chip. The reset code is uniquely determined, and the issuing card timestamp, the sending machine ID and the issuing serial number corresponding to the card can be processed by adopting a snowflake algorithm to obtain a 64-bit unique reset code corresponding to the target card.
Specifically, when a user approaches or approaches the target card to the card reader, the card reader may read ciphertext data stored in a target chip of the target card, and the card reader may decrypt the ciphertext data by using a corresponding decryption algorithm to obtain decryption data corresponding to the ciphertext data, that is, the target data, and at this time, may obtain a reset code in the target data.
And S120, when the target data is inconsistent with the preset data, determining whether the target data is included in the data stored in the card reader.
The target data at this time mainly refers to a reset code determined when the card issuing system issues a card. The preset data is preset. The preset data may be data corresponding to the reset code, and is used to determine 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, whether the target card is the initially used card may be detected first. Optionally, after the target data is acquired, the 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 not considered 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.
It should be noted that after the target card passes card swiping, the reset code in the target data may 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 is determined according to whether the reset code is stored in the card reader, and then whether the target card is a copied card is determined.
S130, if the target chip 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, it indicates that the target card has been used by swiping the card or has a card identical to the target card and has been used, and at this time, the target card is not reusable, and the target card may be determined as a copy card.
That is, whether the target card is a copy card may be determined according to whether the card reader stores a reset code corresponding to the target card.
According to the technical scheme of the embodiment of the invention, 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 cannot be determined due to the fact that the data stored in each copy card is the initial rolling code in the prior art is solved, and the technical effect of rapidly, conveniently and accurately determining whether the target card is the copy card is realized.
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 the reset code in the target card is updated to the preset data.
It can be understood that if the card reader does not store data corresponding to the reset code in the target card, the target card is considered to be used for the first time, the authority data in the target data can be acquired to perform authority verification, so that after the authority 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 preset data.
The method has the advantages that whether the target card is used for the first time or not can be quickly determined, and the technical effect that whether the target card is a copy card or not can be further determined based on the copy code is achieved.
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, whether the target card is the copy card or not can be determined by further combining the card swiping record address data in the target data, or whether the copy card exists or not can be determined. Fig. 2 is a flowchart illustrating a method for detecting a copy card according to a second embodiment of the present invention. The technical terms that are the same as 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.
S220, 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.
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 a duplicate 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 acquired.
It should be noted that, when the card is swiped through, the address data recorded by the card may be labeled, optionally, when the card is swiped for the last time, the label of the address data recorded by the card is 1, and when the card is swiped for this time, the label of the address data recorded by the card may be 2. The card-swiping record address stored in the target data can be used as the current card-swiping record address. The historical card swiping record address refers to card swiping record address data which can mark a target card after the target card is read by a card reader.
And S230, determining the target card as 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 other newly stored historical card swiping record address data besides the current card swiping record address data exist in the historical card swiping record address data, it is considered that other cards read data through the card reader, and the target card can be determined to be a duplicate card; or, if the latest data of the historical card recording address is inconsistent with the current card recording address data, the data is read by other cards through the card reader, and the target card can be determined to be a 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, the authority information in the target data is acquired, so as to determine whether the card swiping can pass through according to the authority information.
It is understood that the target data further includes authority data, and the authority data may be access authority and/or floor authority. It should be noted that the permission data may be specifically set according to a specific application scenario, and is not limited herein.
Specifically, when no other card swiping record address data exists in the historical card swiping record address data except the current card swiping record address data, or the latest historical card swiping record address data in the historical card swiping record address data is consistent with the current card swiping record address data, the target card is considered to be not a copy card. At this time, the authority data stored in the target card can be acquired to execute the operation corresponding to the authority data, and optionally, the card is swiped to pass through or the elevator runs to the corresponding floor.
That is, when the authority information coincides with the authority information stored in the card reader, the card is swiped through.
On the basis of the technical scheme, after the card swiping passes, the reset code of the target data in the target chip is updated to preset data, the card swiping record address data in the card reader and the target data is updated to the current card swiping record address data, and whether the target card is a copy card is determined 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 card swiping record address data of the target card is 14, the card swiping record address data of the historical card swiping record address data is 14, and the card swiping record address data in the card reader and the target data can be updated to 15 when the card is swiped. Meanwhile, the reset code in the target data may be updated to preset data, and optionally, the preset data is 0.
According to the technical scheme of the embodiment of the invention, when the reset code is determined to be consistent with the preset data, the historical card number recording address data in the card reader and the current card swiping recording address data in the target data can be further obtained, and whether the target card is the copy card or not can be rapidly determined on the basis, so that 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 illustrating data stored in a target card in advance according to a third embodiment of the present invention. The technical terms that are the same as or corresponding to the above embodiments are not repeated herein.
As shown in fig. 3, the method includes:
and S310, generating a unique reset code ID by adopting a snowflake algorithm.
It should be noted that the new card issued by the card issuing system includes a chip for storing data, and the authority data corresponding to the card may be written in a sector of the chip, and information such as an address initial value, a card reset code, and the like may be recorded by swiping the card.
The snowflake algorithm refers to an algorithm for generating a unique identifier, and aims to solve the problem that when a large amount of data is flooded in a high concurrency period and each resource needs to be identified, the algorithm can be generated.
In this embodiment, the generation of the unique reset code ID by 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 issued 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.
And S320, initializing card swiping record address values.
Specifically, the initializing of the card reading record address value may be to set the card reading record address value to an initial value, and optionally, the initial value may be 0.
And S330, determining the authority data corresponding to the card.
Where rights refer to the extent and degree to which a decision is made on an item.
It should be noted that the permission data corresponding to different application scenarios may be different, for example, if an elevator enters the home after the card is swiped in the application scenario, the permission data may be a floor permission; if the application scene is that the card is swiped to enter and exit the community, the authority data can be entrance guard authority and the like.
Specifically, it can be understood that, according to a specific application scenario, corresponding authority data can be written in the target card, so that the user has corresponding authority when swiping a card to enter and exit.
S340, encrypting the authority data, the card swiping record address value and the reset code ID by adopting an encryption algorithm, and storing a ciphertext obtained through encryption into a sector in the target card.
It should be noted that any encryption algorithm may be used to encrypt the 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, the 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 data obtained by decryption.
And encrypting the authority data, the card swiping record address value and the reset code ID to obtain a corresponding ciphertext. Accordingly, the sector may be a storage area for storing the ciphertext.
Specifically, the authority data, the initial value of the card swiping record address and the reset code ID are encrypted by an encryption algorithm to obtain a ciphertext corresponding to the data, and the ciphertext can be stored in a sector of a target chip in a target card.
On the basis, after the card issuing system sends the target card, the target data stored in the target card can be read based on the card reader, and whether the target card is a copy card can be determined 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 refers to a ciphertext obtained by encrypting the reset code, the card swiping record address value and the authority data. The ciphertext data can be decrypted by adopting a decryption algorithm corresponding to the encryption algorithm to obtain the target data of the target card, namely the reset code, the card swiping record address value and the authority data.
S402, judging whether the reset code is preset data or not, if so, executing S403; if not, go to S404.
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 may acquire whether the storage area of the card reader stores the reset code corresponding to the card, so as to determine whether the target card is a copy card, i.e., S404 is performed.
S403, acquiring a current card swiping record address, judging whether the historical card swiping record address stored in the card reader comprises the current card swiping record address, and if so, executing S405; if not, go to step S406.
It should be noted that, when the card is swiped through, the card swiping record address may be recorded, for example, when the first card swiping is finished, the card swiping record address may be 1, when the second card swiping is finished, the card swiping record address may be 2, and each time the card swiping is increased, the card swiping record address may be increased by 1, optionally, when the nth card swiping is finished, the card swiping record address may be N.
Wherein, the current card-swiping record address can be the card-swiping record 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 therein historical swipe record address values corresponding to the target card.
Specifically, when it is determined that the reset code in the target data is consistent with the preset data, it indicates that 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. And when the historical card swiping record address comprises a card swiping record address except the current card swiping record address, the existence of a copy card corresponding to the target card is indicated. If the card swiping record address except the current card swiping record address is not included in the historical 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 in addition to 10 is read from the historical card swiping record address, which indicates that the card reader has read a copy card of the card, and at this time, the card with the current card swiping record address of 11 may be used as the target card, and at this time, the used target card is the copy card, and cannot be used any more, that is, 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 considered not to be a copy card, and S406 is executed.
S404, judging whether a reset code is stored in the card reader or not, and executing S405 if the reset code is stored in the card reader; if not, go to S407.
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 may be acquired, and if the reset code is present, it indicates that the target card is not used for the first time, and the target card may be a copy 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, the reset code can be read, namely 64-bit unique ID generated by adopting a snowflake algorithm is adopted, 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 as 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 may be determined to be a duplicate card based on the above manner.
S406, reading the authority data and confirming the pass.
It can be understood that after the verification of the reset code and the card swiping record address is completed and the target card is determined not to be a copy card, the authority data stored in the target card can be further read, so as to determine whether the card swiping can pass or not according to the read authority data.
Specifically, the authority data in the target data is obtained, and if the authority data is detected to be legal, optionally, if the authority data is of the cell, the card can be swiped to pass through, and otherwise, the card cannot be swiped to pass through.
And S407, storing the reset code into the card reader.
It can be understood that, in order to improve the efficiency of determining whether the target card is a copy card, after determining that the target card is initially used, 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 into preset data.
And S408, updating the 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 of the embodiment of the invention, 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 cannot be determined due to the fact that the data stored in each copy card is the initial rolling code in the prior art is solved, and the technical effect of rapidly, conveniently and accurately determining whether the target card is the copy card is realized.
Example four
Fig. 5 is a schematic structural diagram of a device for detecting a copy 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 duplicate 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 preset data; a duplicate card determining module 530, configured to determine that the target card to which the target chip belongs is a duplicate card if the target chip exists.
According to the technical scheme of the embodiment of the invention, 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 cannot be determined due to the fact that the data stored in each copy card is the initial rolling code in the prior art is solved, and the technical effect of rapidly, conveniently and accurately determining whether the target card is the copy card is realized.
On the basis of the above technical solution, the target data determining module is further configured to store the target data in a cache in the card reader and update a 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 the target card as 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 above technical solution, the target data reading module is further configured to: and if the historical card swiping record address data comprises 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: and if the current card swiping record address data is not included in the historical card swiping record address data, acquiring the authority information in the target data to determine whether the card swiping can pass or not according to the authority information.
On the basis of the above technical solutions, the apparatus further includes: and the authority checking module is used for passing card swiping when the authority information is consistent with the authority information stored in the card reader.
On the basis of the above technical solutions, the apparatus further includes: and the data updating module is used for updating the reset code of the target data in the target chip into preset data, updating the card reader and the card swiping record address data in the target data into current card swiping record address data, and determining 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 copy card provided by the embodiment of the invention can execute the method for detecting the copy card provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
EXAMPLE five
Fig. 6 is a schematic structural diagram of an apparatus according to a fifth embodiment of the present invention. FIG. 6 illustrates a block diagram of an exemplary device 60 suitable for use in implementing embodiments of the present invention. The device 60 shown in fig. 6 is only an example and should not bring any limitation to the function and scope of use of the embodiments of the present invention.
As shown in FIG. 6, device 60 is embodied in a general purpose computing device. The components of the 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 couples various system components including the system memory 602 and the processing unit 601.
Bus 603 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, 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 may 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 drive"). Although not shown in FIG. 6, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 603 by one or more data media interfaces. Memory 602 may include at least one program product having a set (e.g., at least one) of program modules that are 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, for example, in 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 of which examples or some combination thereof may comprise an implementation of a network environment. The program modules 607 generally perform the functions and/or methods of the described embodiments of the invention.
Device 60 may also communicate with one or more external devices 609 (e.g., keyboard, pointing device, display 610, etc.), with one or more devices that enable a user to interact with device 60, and/or with any devices (e.g., network card, modem, etc.) that enable device 60 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 611. Also, device 60 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via network adapter 612. As shown, a network adapter 612 communicates with the other modules of device 60 via bus 603. It should be appreciated that although not shown in FIG. 6, other hardware and/or software modules may be used in conjunction with device 60, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 601 executes various functional applications and data processing by executing programs stored in the system memory 602, for example, implementing the method for detecting a copy card provided by the embodiment of the present invention.
EXAMPLE six
An embodiment of the present invention also provides a storage medium containing computer-executable instructions for performing a method of detecting a replica card when the computer-executable instructions are executed by a computer processor.
The method comprises the following steps:
reading target data stored in a target chip, wherein the target data comprises reset codes stored in the target chip;
when the target data is inconsistent with preset data, determining whether the target data is included in the data stored in the card reader;
and if so, determining that the target card to which the target chip belongs is a copy card.
Computer storage media for embodiments of the invention may employ 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. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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 the context of 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.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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 + + or the like 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 type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. 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, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for detecting a copy card, applied to a card reader, includes:
reading target data stored in a target chip, wherein the target data comprises reset codes stored in the target chip;
when the target data is inconsistent with preset data, determining whether the target data is included in the data stored in the card reader;
and if so, determining that the target card to which the target chip belongs is a copy card.
2. The method of claim 1, further comprising:
and if the stored data does not comprise the target data, storing the target data into a cache of the card reader, and updating the reset code in the target card into the preset data.
3. The method of claim 1, wherein the target data comprises address data for card reading, and after reading the target data stored in the target chip, the method further comprises:
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 the target card as a copy card according to the relation between the historical card swiping record address data and the current card swiping record address data.
4. The method according to claim 3, wherein the determining that the target card is a duplicate card according to the relationship between the historical card swiping record address data and the current card swiping record address data comprises:
and if the fact that the historical card swiping record address data comprises newly added data except the current card swiping record address data is detected, determining that the target card is a copy card.
5. The method of claim 3, further comprising:
and if the historical card swiping record address data does not comprise data except the current card swiping record address data, acquiring the authority information in the target data to determine whether the card swiping can pass or not according to the authority information.
6. The method of claim 5, further comprising:
and when the authority information is consistent with the authority information stored in the card reader, the card is swiped to pass.
7. The method according to any one of claims 1-6, further comprising:
updating the reset code of the target data in the target chip to preset data, updating the card reader and the card swiping record address data in the target data to the current card swiping record address data, and determining 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.
8. An apparatus for detecting a copy card, configured in a card reader, comprising:
the target data reading module is used for reading target data stored in a target chip, and the target data comprises reset codes 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 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.
9. An apparatus, characterized in that the apparatus comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of detecting a duplicate card as claimed in any one of claims 1 to 7.
10. A storage medium containing computer-executable instructions for performing the method of detecting a replica card as recited in any one of claims 1-7 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 true CN112016336A (en) 2020-12-01
CN112016336B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114648828A (en) * 2020-12-21 2022-06-21 京东方科技集团股份有限公司 Access control management method, system, electronic equipment and non-transient storage 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

Cited By (2)

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

Also Published As

Publication number Publication date
CN112016336B (en) 2024-01-02

Similar Documents

Publication Publication Date Title
CN110414268B (en) Access control method, device, equipment and storage medium
WO2020192406A1 (en) Method and apparatus for data storage and verification
CN111291339B (en) Method, device, equipment and storage medium for processing blockchain data
CN108429638B (en) Server operation and maintenance method, device and system and electronic equipment
US9678766B2 (en) Controlling the configuration of computer systems
CN110324416B (en) Download path tracking method, device, server, terminal and medium
JP2011048661A (en) Virtual server encryption system
TW201939337A (en) Behavior recognition, data processing method and apparatus
WO2021137769A1 (en) Method and apparatus for sending and verifying request, and device thereof
CN113050900A (en) Screen sharing method, device, equipment and storage medium
CN112967056A (en) Access information processing method and device, electronic equipment and medium
CN110545542B (en) Main control key downloading method and device based on asymmetric encryption algorithm and computer equipment
US20180173857A1 (en) Prevention of unauthorized resource updates
CN112016336B (en) Method, device, equipment and storage medium for detecting copy card
CN110601836B (en) Key acquisition method, device, server and medium
CN110830428A (en) Block chain financial big data processing method and system
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
CN115344889A (en) Console access method, device, equipment and medium for virtual machine
CN112825093B (en) Security baseline checking method, host, server, electronic device and storage medium
CN111639353B (en) Data management method and device, embedded equipment and storage medium
CN113989177A (en) Image data processing method, device, equipment and storage medium
CN113961970B (en) Cross-network-segment network disk login identity authentication method and device, network disk and storage medium
CN117522417B (en) Transaction security verification method and device based on quantum encryption

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