CN107133661B - Method for generating external identification code of active card - Google Patents

Method for generating external identification code of active card Download PDF

Info

Publication number
CN107133661B
CN107133661B CN201610112906.1A CN201610112906A CN107133661B CN 107133661 B CN107133661 B CN 107133661B CN 201610112906 A CN201610112906 A CN 201610112906A CN 107133661 B CN107133661 B CN 107133661B
Authority
CN
China
Prior art keywords
identification code
binary data
active card
data
generate
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
CN201610112906.1A
Other languages
Chinese (zh)
Other versions
CN107133661A (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.)
Aisino Corp
Original Assignee
Aisino Corp
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 Aisino Corp filed Critical Aisino Corp
Priority to CN201610112906.1A priority Critical patent/CN107133661B/en
Publication of CN107133661A publication Critical patent/CN107133661A/en
Application granted granted Critical
Publication of CN107133661B publication Critical patent/CN107133661B/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
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/067Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07BTICKET-ISSUING APPARATUS; FARE-REGISTERING APPARATUS; FRANKING APPARATUS
    • G07B15/00Arrangements or apparatus for collecting fares, tolls or entrance fees at one or more control points
    • G07B15/06Arrangements for road pricing or congestion charging of vehicles or vehicle users, e.g. automatic toll systems

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Storage Device Security (AREA)

Abstract

The invention relates to the technical field of communication, and discloses a method for generating an external identification code of an active card, which comprises the following steps: acquiring an internal identification code of the active card; and generating an external identification code of the active card according to the internal identification code and a predetermined mapping relation, wherein the predetermined mapping relation comprises logic transformation. The external identification code generated by the invention is formed by the internal identification code through logic transformation, and when the active card cannot read the card (for example, the active card is in failure or power failure), related technicians can acquire the corresponding relation between the internal identification code and the external identification code of the active card through the logic transformation and simultaneously ensure the safe use of the active card.

Description

Method for generating external identification code of active card
Technical Field
The invention relates to the technical field of communication, in particular to a method for generating an external identification code of an active card.
Background
An active card (e.g., an active highway toll card) includes an internal identification code (also referred to as an internal ID) and an external identification code (which is printed on the housing of the active card, also referred to as a housing number). For example, in a highway toll system, the internal ID is a main tag number used, and is commonly used in the processes of issuing cards at toll stations, identifying routes and receiving cards at toll stations. However, when some special conditions occur, a computer database record of a certain active card needs to be searched, and the internal ID of the active card is not displayed, so that the searching of the internal ID of the active card through the shell number becomes a necessary searching means.
In the prior art, the correspondence between the shell number and the internal ID of the active card is realized by a method of randomly generating and recording a correspondence relationship when the active card leaves a factory, and this method has the advantage that unspecified persons cannot obtain the internal ID information of the active card and modify database data by deciphering the shell number. It does have some significant disadvantages: when the internal ID and shell number corresponding relation table attached during factory shipment is lost, or the active card fails or is powered off, and the like, the situation that the active card cannot read the card is realized, and the situation that the corresponding relation between the shell number and the internal ID of the active card is required to be searched is almost impossible.
Disclosure of Invention
Aiming at the technical problem that the use of an active card is not ideal due to the fact that the corresponding relation between an internal identification code and an external identification code of the active card in the prior art is random, the invention provides a method for generating the external identification code of the active card, which comprises the following steps: acquiring an internal identification code of the active card; and generating an external identification code of the active card according to the internal identification code and a predetermined mapping relation, wherein the predetermined mapping relation comprises logic transformation.
By adopting the method for generating the external identification code of the active card, provided by the invention, the internal identification code of the active card is obtained, and then the external identification code of the active card is generated according to the internal identification code and the preset mapping relation. When the active card cannot read the card (for example, the active card fails or is out of power), the related technical personnel can know the corresponding relation between the internal identification code and the external identification code of the active card through the logic transformation and simultaneously ensure the safe use of the active card.
Additional features and advantages of the invention will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
fig. 1 is an exemplary flowchart of a method of generating an external identification code of an active card according to one embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the invention refers to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present invention, are given by way of illustration and explanation only, not limitation.
Fig. 1 is an exemplary flowchart of a method of generating an external identification code of an active card according to an embodiment of the present invention, which may include the steps of, as shown in fig. 1:
step 1001, acquiring an internal identification code of an active card, for example, acquiring an internal identification code of an active card randomly generated by a computer; and
step 1002, generating an external identification code of the active card according to the internal identification code and a predetermined mapping relation, wherein the predetermined mapping relation comprises logic transformation. Preferably, the logic transformation may include operations of subtracting, performing a binary conversion, shifting and/or exchanging data bits, performing a complement conversion on the internal identification code in sequence.
Since the setting of the numbers of the internal identification code and the external identification code is generally set according to the use situation, in order to more clearly illustrate the idea of the present invention, the identification code in the highway toll collection system is taken as an example, wherein the internal identification code is generally set to 8-bit 16-system data, and the external identification code is generally set to 8-bit 10-system data. It should be understood that the number of bits of the internal and external identification codes may be set by those skilled in the art according to the actual application, and the present invention is not limited to this exemplary number of bits. In this example, step 1002 may further perform the following steps:
and 11, subtracting the first N specific codes of the internal identification code to generate an internal identification code H-01 after code subtraction, wherein the N specific codes are used for identifying the area using the active card, N is a positive integer and is less than the digit of the internal identification code (for example, N is less than 8), characters with special meanings in the internal identification code can be extracted by the operation, and then the remaining identification codes are converted, kept secret and the like, so that the accurate conversion and the safety of data can be effectively ensured without changing the meanings of certain characters with special meanings. For example, the first two digits of the internal identification code may be used to identify the use area of the active card, and thus the first two digits of the identification code may be subtracted in step 11 before the operation of conversion is performed. For example, the first two digits of the 8-bit 16-ary internal identification code are subtracted, and the remaining 6-bit 16-ary internal identification code is H-01.
And step 12, converting the internal identification code H-01 after code subtraction into binary data H-02 so as to facilitate the operation of the computer. For example, the remaining 6-bit 16-ary internal identification code H-01 may be converted into 24-bit binary data H-02.
Step 13, shifting and/or exchanging one or more (for example, one data bit, two data bits … … or all data bits) data bits of the binary data H-02, and ensuring the uniqueness of the converted data during the operation to generate the shifted and/or exchanged binary data H-03.
And 14, performing complement operation on the shifted and/or exchanged binary data H-03 (namely adding a binary number with a specified number of digits before or after a specified position of the data) to generate binary data H-04 corresponding to the number of the external identification code digits of the active card, for example, performing 0 complement operation according to the number of digits required by 8-digit decimal to generate corresponding binary data H-04.
And step 15, converting binary data H-04 corresponding to the number of the external identification code of the active card into decimal data H-05 to generate the external identification code of the active card.
Wherein, the step 13 shifts and/or swaps one or more data bits of the binary data H-02, and generating the shifted and/or swaped binary data H-03 may include:
the binary data H-03 after shifting is generated by circularly shifting left or circularly shifting right the designated data bits of the binary data H-02 by a predetermined number of bits, for example, the binary data H-03 can be circularly shifted left or circularly shifted right by 1, 2 bits from the 1 st bit.
Alternatively, one or more data bits of the binary data H-02 are exchanged to generate the exchanged binary data H-03, for example, the 1 st bit and the 3 rd bit, and the 2 nd bit and the 5 th bit of the binary data H-02 may be exchanged.
Or, circularly left-shifting or circularly right-shifting the appointed data bit of the binary data H-02 by a predetermined bit number to generate shifted binary data H-02-01; and exchanging one or more data bits of the shifted binary data H-02-01 to generate exchanged binary data H-03. For example, the 1 st bit may be shifted to the left or right circularly by 1 bit, and the 1 st bit and the 3 rd bit of the binary number after shifting may be swapped, the 2 nd bit and the 5 th bit may be swapped, and so on.
Preferably, after step 15, it is also possible to perform:
step 16, adding an M-bit identification code to the external identification code of the active card, where the M-bit identification code is used to identify that the predetermined mapping relationship exists between the external identification code of the active card and the internal identification code, where M is a positive integer, for example, adding a two-bit identification code "01" to the external identification code of the active card, so as to identify the external identification code of the active card, which is generated according to logic transformation, and finally printing the external identification code (10-bit 10-system data) with the identification code added to an assigned position of the active card housing.
According to the embodiment of the invention, when the active card cannot read the card (for example, the active card fails or is out of power), a related technician can calculate the internal identification code of the active card according to the external identification code of the active card and the inverse mapping of the predetermined mapping relation, so that the problem that the internal identification code cannot be acquired in the prior art is solved:
step 21, the external identification code H-10 of the active card is converted into binary data H-20. For example, corresponding to the example described above, an 8 digit decimal number H-10 is converted to binary data H-20.
And 22, carrying out code reduction on the binary data H-20 to generate the binary data H-30 with predetermined bits, for example, the binary data is subjected to code reduction to 24 bits.
Step 23, shifting and/or exchanging one or more data bits for the binary data H-30 to generate shifted and/or exchanged binary data H-40.
Step 24, converting the shifted and/or exchanged binary data H-40 into 16-system data H-50, for example, into 6-bit 16-system data H-50;
and 25, adding the N-bit specific code to the front of the 16-bit 16-system data H-50 to generate the internal identification code of the active card, for example, adding the 2-bit specific code to the front of the 6-bit 16-system data H-50 to generate the internal identification code of the 8-bit 16-system active card.
Preferably, for an external identification code added with an M-digit identification code (i.e. corresponding to the 10-digit decimal external identification code of step 16), the method may also perform the following steps before step 21:
and 20, subtracting the front M-bit identification code to generate an external identification code H-10 of the active card. For example, the first 2 digits are subtracted to generate an 8-digit decimal external identification code H-10.
Wherein, the step 23 shifts and/or swaps one or more data bits of the binary data H-30, and generating the shifted and/or swaped binary data H-40 may include:
and circularly right-shifting or circularly left-shifting the appointed data bits of the binary data H-30 by a predetermined number of bits to generate shifted binary data H-40. For example, the bit may be shifted cyclically right or left by 1 bit starting from bit 1.
Or, one or more data bits of the binary data H-30 are exchanged to generate the exchanged binary data H-40. For example, bits 1 and 3, and bits 2 and 5 of binary data H-30 may be swapped.
Or, exchanging one or more data bits of the binary data H-30 to generate the exchanged binary data H-30-01, and circularly right-shifting or circularly left-shifting the appointed data bits of the exchanged binary data H-30-01 by a predetermined number of bits to generate the shifted binary data H-40. For example, the 1 st bit and the 3 rd bit may be swapped, the 2 nd bit and the 5 th bit may be swapped, and then the 1 st bit may be shifted to the right or left circularly by 1 bit.
It should be understood that the values of N and M, and the predetermined number of bits and the designated data bits can be selected by one skilled in the art according to practical circumstances, and the present invention is not limited thereto.
By adopting the method for generating the external identification code of the active card, provided by the invention, the internal identification code of the active card is obtained, and then the external identification code of the active card is generated according to the internal identification code and the preset mapping relation. When the active card cannot read the card (for example, the active card fails or is out of power), the related technical personnel can know the corresponding relation between the internal identification code and the external identification code of the active card through the logic transformation and simultaneously ensure the safe use of the active card.
The preferred embodiments of the present invention have been described in detail with reference to the accompanying drawings, however, the present invention is not limited to the specific details of the above embodiments, and various simple modifications can be made to the technical solution of the present invention within the technical idea of the present invention, and these simple modifications are within the protective scope of the present invention.
It should be noted that the various technical features described in the above embodiments can be combined in any suitable manner without contradiction, and the invention is not described in any way for the possible combinations in order to avoid unnecessary repetition.
In addition, any combination of the various embodiments of the present invention is also possible, and the same should be considered as the disclosure of the present invention as long as it does not depart from the spirit of the present invention.

Claims (8)

1. A method of generating an external identification code for an active card, the method comprising:
acquiring an internal identification code of the active card; and
generating an external identification code of the active card according to the internal identification code and a predetermined mapping relation, wherein the predetermined mapping relation comprises logic transformation;
the logic transformation comprises the operations of code reduction, system conversion, data bit shift and/or exchange, complement and system conversion of the internal identification code in sequence;
the internal identification code is 16-system data, and the generating of the external identification code of the active card according to the internal identification code and a predetermined mapping relation comprises:
step 11, subtracting the former N specific codes of the internal identification code to generate an internal identification code H-01 after code subtraction, wherein the N specific codes are used for identifying the area using the active card;
step 12, converting the internal identification code H-01 after code subtraction into binary data H-02;
step 13, shifting and/or exchanging one or more data bits of the binary data H-02 to generate shifted and/or exchanged binary data H-03;
step 14, performing complement operation on the shifted and/or exchanged binary data H-03 to generate binary data H-04 corresponding to the external identification code number of the active card; and
and step 15, converting binary data H-04 corresponding to the number of the external identification code of the active card into decimal data H-05 to generate the external identification code of the active card.
2. The method of claim 1, wherein the step 13 shifts and/or swaps one or more data bits of the binary data H-02, and wherein generating the shifted and/or swaped binary data H-03 comprises:
circularly left-shifting or circularly right-shifting the designated data bits of the binary data H-02 by a predetermined number of bits to generate shifted binary data H-03;
exchanging one or more data bits of the binary data H-02 to generate exchanged binary data H-03; or
Circularly left-shifting or circularly right-shifting the designated data bits of the binary data H-02 by a predetermined number of bits to generate shifted binary data H-02-01; and exchanging one or more data bits of the shifted binary data H-02-01 to generate exchanged binary data H-03.
3. The method of claim 2, further comprising calculating an internal identification code of the active card from an external identification code of the active card and from an inverse mapping of the predetermined mapping relationship:
step 21, converting the external identification code H-10 of the active card into binary data H-20;
step 22, carrying out code reduction on the binary data H-20 to generate binary data H-30 with predetermined bits;
step 23, shifting and/or exchanging one or more data bits for the binary data H-30 to generate shifted and/or exchanged binary data H-40;
step 24, converting the shifted and/or exchanged binary data H-40 into 16-system data H-50;
and 25, adding an N-bit specific code to the 16-system data H-50 to generate the internal identification code of the active card.
4. The method of claim 3, further comprising:
step 16, adding an M-bit identification code to the external identification code of the active card, where the M-bit identification code is used to identify that the predetermined mapping relationship exists between the external identification code and the internal identification code of the active card;
wherein said step 16 is performed after step 15.
5. The method of claim 4, further comprising:
step 20, subtracting the former M-bit identification code to generate an external identification code H-10 of the active card;
said step 20 is performed before said step 21.
6. The method of claim 3, 4 or 5, wherein the step 23 shifts and/or swaps one or more data bits of the binary data H-30, and wherein generating the shifted and/or swaped binary data H-40 comprises:
circularly right-shifting or circularly left-shifting the appointed data bit of the binary data H-30 by a predetermined bit number to generate shifted binary data H-40;
exchanging one or more data bits of the binary data H-30 to generate exchanged binary data H-40; or
And exchanging one or more data bits of the binary data H-30 to generate exchanged binary data H-30-01, and circularly right-shifting or circularly left-shifting the appointed data bits of the exchanged binary data H-30-01 by a preset number of bits to generate shifted binary data H-40.
7. The method of claim 3, 4 or 5, wherein the predetermined bit of binary data is 24-bit binary data.
8. The method of claim 1, wherein the active card has an 8-bit outsert code number.
CN201610112906.1A 2016-02-29 2016-02-29 Method for generating external identification code of active card Active CN107133661B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610112906.1A CN107133661B (en) 2016-02-29 2016-02-29 Method for generating external identification code of active card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610112906.1A CN107133661B (en) 2016-02-29 2016-02-29 Method for generating external identification code of active card

Publications (2)

Publication Number Publication Date
CN107133661A CN107133661A (en) 2017-09-05
CN107133661B true CN107133661B (en) 2020-06-02

Family

ID=59721910

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610112906.1A Active CN107133661B (en) 2016-02-29 2016-02-29 Method for generating external identification code of active card

Country Status (1)

Country Link
CN (1) CN107133661B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3885130A (en) * 1973-09-04 1975-05-20 Rusco Ind Inc Value/use control and identification system for magnetic cards
KR20070029336A (en) * 2005-09-09 2007-03-14 주식회사 에스원 Reader and rf card decoding method using the reader
CN102780999A (en) * 2011-05-11 2012-11-14 华为技术有限公司 Service communication method, service communication device and service communication system
CN102857908A (en) * 2011-06-30 2013-01-02 中兴通讯股份有限公司 Mapping method, device and system for terminal identifications
CN103714626A (en) * 2013-05-01 2014-04-09 汪风珍 Multi-password pre-warning type bank card capable of being controlled by different card
CN104125545A (en) * 2013-04-24 2014-10-29 中兴通讯股份有限公司 Information transmitting and forwarding methods and apparatuses
CN104166830A (en) * 2014-08-22 2014-11-26 深圳市兴通物联科技有限公司 Encryption method for chip communication and laser bar code scanning platform
CN104509132A (en) * 2012-05-18 2015-04-08 瑞典爱立信有限公司 Automatic transfer of machine-to-machine device identifier to network-external service providers
CN104778421A (en) * 2014-01-13 2015-07-15 全宏科技股份有限公司 Data securing encryption method, data securing system used for encryption or authentication, and data carrier
CN104868995A (en) * 2014-02-20 2015-08-26 陈麟华 Coding convention control transformation type information authentication method, and coding convention control transformation type information encryption/decryption method
CN105224852A (en) * 2014-06-04 2016-01-06 国民技术股份有限公司 A kind ofly protect smart card surface complete system and method thereof
CN105245543A (en) * 2015-10-28 2016-01-13 中国人民解放军国防科学技术大学 Operating system mandatory access control method based on security marker randomization

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3885130A (en) * 1973-09-04 1975-05-20 Rusco Ind Inc Value/use control and identification system for magnetic cards
KR20070029336A (en) * 2005-09-09 2007-03-14 주식회사 에스원 Reader and rf card decoding method using the reader
CN102780999A (en) * 2011-05-11 2012-11-14 华为技术有限公司 Service communication method, service communication device and service communication system
CN102857908A (en) * 2011-06-30 2013-01-02 中兴通讯股份有限公司 Mapping method, device and system for terminal identifications
CN104509132A (en) * 2012-05-18 2015-04-08 瑞典爱立信有限公司 Automatic transfer of machine-to-machine device identifier to network-external service providers
CN104125545A (en) * 2013-04-24 2014-10-29 中兴通讯股份有限公司 Information transmitting and forwarding methods and apparatuses
CN103714626A (en) * 2013-05-01 2014-04-09 汪风珍 Multi-password pre-warning type bank card capable of being controlled by different card
CN104778421A (en) * 2014-01-13 2015-07-15 全宏科技股份有限公司 Data securing encryption method, data securing system used for encryption or authentication, and data carrier
CN104868995A (en) * 2014-02-20 2015-08-26 陈麟华 Coding convention control transformation type information authentication method, and coding convention control transformation type information encryption/decryption method
CN105224852A (en) * 2014-06-04 2016-01-06 国民技术股份有限公司 A kind ofly protect smart card surface complete system and method thereof
CN104166830A (en) * 2014-08-22 2014-11-26 深圳市兴通物联科技有限公司 Encryption method for chip communication and laser bar code scanning platform
CN105245543A (en) * 2015-10-28 2016-01-13 中国人民解放军国防科学技术大学 Operating system mandatory access control method based on security marker randomization

Also Published As

Publication number Publication date
CN107133661A (en) 2017-09-05

Similar Documents

Publication Publication Date Title
US4498000A (en) Security method and device for communicating confidential data via an intermediate stage
HU213504B (en) Arrangement for transmitting data, electronic document or similar
EP3889866A1 (en) Methods and devices for providing and authenticating two-dimensional code
CN110489466B (en) Method and device for generating invitation code, terminal equipment and storage medium
CN116319100B (en) Port dangerous source safety admittance method and system based on GIS spatial data analysis
RU98123294A (en) TRANSFERRED INFORMATION CRYPTOGRAPHIC PROTECTION SYSTEM
CN102640448A (en) System and method for securely identifying and authenticating devices in a symmetric encryption system
TWI398153B (en) Certification methods, authentication systems and electronic tags
US11233830B2 (en) Systems and methods for point-to-point encryption compliance
CN101223531A (en) Verification of a product identifier
CN107133661B (en) Method for generating external identification code of active card
CN112218133B (en) Screen projection code generation method and device and terminal equipment
CN1437739A (en) Access control to data processing means
US9754134B2 (en) Creating mechanical stamps to produce machine-readable optical labels
CN115987512A (en) Data processing method, device, system and medium based on oblivious transmission protocol
CN101661546B (en) System and method for file encryption therein in hand-held mobile electronic device
US20030059048A9 (en) Method for secure data transmission in selling products
CN101981863A (en) Method of embedded generation of an identifier and of an associated key in a communicating portable object
EP3633570A1 (en) Systems and methods for point-to-point encryption compliance
CN110378457B (en) Code label generation method and device
KR20190089619A (en) Method and apparatus for transit of financial service
US20180089418A1 (en) Return material authorization fulfillment system for network devices with specific cryptographic credentials
CN110933661B (en) Mobile terminal addressing method, device, mobile terminal and medium with one card and multiple numbers
CN110753066B (en) Internet of things identification method based on cryptographic technology
EP0117931A1 (en) Personal indentification system

Legal Events

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