Card reader data output format adaptation method, device, equipment and storage medium

By obtaining and converting the card number of the access control card and adapting the card reader data output format, the problem of complex operations of the card reader adapting to access control cards with different data output formats is solved, achieving a more user-friendly experience and a simplified adaptation process.

CN114492305BActive Publication Date: 2024-09-17SHENZHEN MINGTE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210094805.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-26
Publication Date
2024-09-17
Estimated Expiration
2042-01-26

AI Technical Summary

Technical Problem

When the card reader adapts to access control cards with different data output formats, the operation process is too professional and complicated, making it unfriendly to ordinary users.

Method used

By obtaining the hexadecimal physical card number and decimal serial card number of the access control card, and converting the hexadecimal physical card number into the decimal value of the output format of the preset decimal type according to the preset decimal type and its corresponding data output format Convert the card number and then adapt it to the decimal serial card number to determine the data output format of the access card.

Benefits of technology

It simplifies the process of adapting the card reader to access cards with different data output formats, making it easier to operate, more friendly to ordinary users, and shielding the underlying processing logic and professional parameter settings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114492305B
    Figure CN114492305B
Patent Text Reader

Abstract

The present application discloses a card reader data output format adaptation method, device, equipment and storage medium, and relates to the technical field of access control systems. The method comprises: obtaining a hexadecimal physical card number and a decimal serial card number of an access control card; according to a preset base type and its corresponding data output format, converting the hexadecimal physical card number into a decimal conversion card number of an output format of the preset base type, and obtaining a decimal conversion card number of an output format of the preset base type; adapting the decimal serial card number of the access control card to the obtained decimal conversion card number, and determining the data output format of the access control card. Through the embodiments of the present application, the adaptation process of the card reader to access control cards with different data output formats can be simplified, making the adaptation process of the card reader to access control cards with different data output formats more convenient and easy to operate, and more user-friendly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of access control systems, and in particular to a method, device, equipment and storage medium for adapting a card reader data output format. Background Art

[0002] At present, access control equipment has become the choice of more and more people in security because of its characteristics of both safety and convenience. The functional technology of access control equipment is also changing with each passing day, which has greatly developed access control technology.

[0003] At present, general access control devices are integrated with a card reader, and the card reader is connected to the access control device inside the access control device.

[0004] The card reader is generally used to read the access card and obtain the hexadecimal physical card number and / or decimal serial card number stored in the access card. The access card is generally an IC (Integrated Circuit) card, which generally stores the hexadecimal physical card number and / or decimal serial card number.

[0005] Due to different card reader manufacturers, different card types and different application scenarios, after the card reader reads the physical card number in the access card, the data output format of the card physical card number is different. For example: 10-bit decimal, 10-bit decimal reverse output, 8-bit hexadecimal reverse output, etc. For ordinary users, when using the card reader to replace the access card with different data output format types, the adaptation operation process is too professional and complicated, which is not user-friendly because it involves the underlying related processing logic and professional parameter setting process. Summary of the invention

[0006] The embodiments of the present application aim to provide a method, device, equipment and storage medium for adapting the data output format of a card reader, aiming to solve the problem that the current adaptation process of the card reader in replacing access control cards with different data output formats is too professional and complicated, and is not friendly to ordinary users.

[0007] In order to solve the above technical problems, the embodiment of the present application provides the following technical solutions: a method for adapting the data output format of a card reader, the method comprising:

[0008] Get the hexadecimal physical card number and decimal serial card number of the access card;

[0009] According to the preset base type and its corresponding data output format, the hexadecimal physical card number is converted into a decimal conversion card number in the output format of the preset base type, to obtain the decimal conversion card number in the output format of the preset base type;

[0010] The decimal serial card number of the access control card is adapted to the obtained decimal conversion card number to determine the data output format of the access control card.

[0011] Optionally, obtaining the hexadecimal physical card number and the decimal serial card number of the access card includes:

[0012] Read the access card data to obtain the hexadecimal physical card number and decimal serial card number of the access card;

[0013] The obtained hexadecimal physical card number is input into the access control device.

[0014] Optionally, the converting of the hexadecimal physical card number into a decimal conversion card number in an output format of the preset base type according to the preset base type and its corresponding data output format, to obtain the decimal conversion card number in an output format of the preset base type comprises:

[0015] Determine the storage data format of the access control device;

[0016] Storing the hexadecimal physical card number according to the storage data format of the access control device;

[0017] According to the preset base type and its corresponding data output format, the stored hexadecimal physical card number is converted into a decimal conversion card number in the output format of the preset base type, and the decimal conversion card number in the output format of the preset base type is obtained.

[0018] Optionally, storing the hexadecimal physical card number according to a storage data format of a door access control device includes:

[0019] The access control device stores the input hexadecimal physical card number in big-endian and big-endian byte order according to the storage data format of the big-endian and big-endian byte order determined by the access control device.

[0020] Optionally, the access control device stores the input hexadecimal physical card number in big-endian and big-endian byte order according to a storage data format of big-endian and big-endian byte order determined by the access control device, including:

[0021] The access control device stores the input hexadecimal physical card number in an array consisting of four one-byte length variables, and determines the specific data stored in each array element according to the big-endian and little-endian byte order obtained according to the storage data format determined by the access control device.

[0022] Optionally, the preset base type and its corresponding data output format include at least one of the following: 10-bit decimal, 10-bit decimal reverse output, 8-bit decimal ID followed by 3 bytes conversion, 00 plus 8-bit decimal ID followed by 3 bytes conversion, 5-bit decimal, 8-bit hexadecimal, and 8-bit hexadecimal reverse output.

[0023] Optionally, the step of adapting the decimal serial card number of the access card to the obtained decimal conversion card number to determine the data output format of the access card includes:

[0024] The decimal serial card number of the access control card is matched and compared with the obtained decimal conversion card number to determine whether there is a decimal conversion card number in the obtained decimal conversion card number that is consistent with the decimal serial card number of the access control card. If there is a decimal conversion card number that is consistent with the decimal serial card number of the access control card, the adaptation is successful, and the base type and output format parameters corresponding to the successfully adapted conversion card number are determined as the base type and output format parameters of the access control card.

[0025] In order to solve the above technical problems, the embodiments of the present application also provide the following technical solutions: an adaptation device for card reader data output format, applied to a card reader data output format adaptation method described in any embodiment of the present application, the adaptation device comprising: an acquisition module, a conversion module and an adaptation module; wherein:

[0026] The acquisition module acquires the hexadecimal physical card number and the decimal serial card number of the access control card;

[0027] The conversion module is used to convert the hexadecimal physical card number into a decimal conversion card number in an output format of the preset base type according to the preset base type and its corresponding data output format, and obtain the decimal conversion card number in the output format of the preset base type;

[0028] The adaptation module is used to adapt the decimal serial card number of the access control card with the obtained decimal conversion card number to determine the data output format of the access control card.

[0029] To solve the above technical problems, the embodiments of the present application also provide the following technical solutions: a card reader data output format adaptation device, comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of a card reader data output format adaptation method described in any embodiment of the present application.

[0030] To solve the above technical problems, the embodiments of the present application also provide the following technical solutions: a storage medium, on which is stored a program for a method for adapting the data output format of a card reader, and when the program for the method for adapting the data output format of a card reader is executed by a processor, the steps of the method for adapting the data output format of a card reader described in any embodiment of the present application are implemented.

[0031] Compared with the prior art, the embodiment of the present application provides a card reader data output format adaptation method, device, equipment and storage medium, by obtaining the hexadecimal physical card number and decimal serial card number of the access control card; according to the preset base type and its data output format, the hexadecimal physical card number is converted into a decimal conversion card number of the output format of the preset base type, and the decimal conversion card number of the output format of the preset base type is obtained; the decimal serial card number of the access control card is adapted to the obtained decimal conversion card number to determine the data output format of the access control card. Thus, the relevant processing logic and professional parameter setting process involved in the bottom layer are shielded, and the adaptation process of the card reader to adapt to access control cards with different data output formats is simplified, so that the adaptation process of the card reader to adapt to access control cards with different data output formats is simpler and easier to operate, and more user-friendly. Thus, the problem that the current card reader is too professional and complicated in the adaptation process of replacing access control cards with different data output formats, and is not user-friendly. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0033] Figure 1 It is a flowchart of a method for adapting a card reader data output format provided in an embodiment of the present application;

[0034] Figure 2 It is a structural schematic diagram of a card reader data output format adaptation device provided in an embodiment of the present application;

[0035] Figure 3 It is a specific flow chart of a method for adapting a card reader data output format provided in an embodiment of the present application;

[0036] Figure 4 It is a structural schematic diagram of a card reader data output format adaptation device provided by the present application. DETAILED DESCRIPTION

[0037] In order to facilitate the understanding of the present application, the present application is described in more detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that when an element is described as "fixed to" another element, it can be directly on another element or there can be one or more centered elements therebetween. When an element is described as "connected" to another element, it can be directly connected to another element or there can be one or more centered elements therebetween. The orientation or positional relationship indicated by the terms "upper", "lower", "inner", "outer", "bottom" and the like used in this specification is based on the orientation or positional relationship shown in the accompanying drawings, only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second", "third" and the like are used only for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0038] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used in this specification and in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used in this specification includes any and all combinations of one or more of the related listed items.

[0039] In addition, the technical features involved in the different embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.

[0040] At present, general access control devices are integrated with a card reader, and the card reader is connected to the access control device inside the access control device.

[0041] The card reader is generally used to read the access card and obtain the hexadecimal physical card number and / or decimal serial card number stored in the access card. The access card is generally an IC (Integrated Circuit) card, in which the hexadecimal physical card number and / or decimal serial card number are generally stored. Due to different card reader manufacturers, different card types and different application scenarios, after the card reader reads the physical card number in the access card, the data output format of the output card physical card number is different. For example: 10-bit decimal (4 bytes after ID conversion), 10-bit decimal reverse output (4 bytes after ID conversion), 8-bit hexadecimal reverse output, etc. For ordinary users, when using the card reader to replace the access card with different data output format types, due to the underlying related processing logic and professional parameter setting process, the adaptation operation process is too professional and complicated, and is not friendly to ordinary users.

[0042] In view of this, the present application proposes a method for adapting the data output format of a card reader, by obtaining the hexadecimal physical card number and the decimal serial card number of an access control card; according to a preset base type and its data output format, the hexadecimal physical card number is converted into a decimal conversion card number of the output format of the preset base type, and the decimal conversion card number of the output format of the preset base type is obtained; the decimal serial card number of the access control card is adapted to the obtained decimal conversion card number to determine the data output format of the access control card. Thus, the relevant processing logic and professional parameter setting process involved in the bottom layer are shielded, and the adaptation process of the card reader to adapt to access control cards with different data output formats is simplified, making the adaptation process of the card reader to adapt to access control cards with different data output formats more simple and easy to operate, and more user-friendly. Thus, the problem that the adaptation process of the current card reader in replacing access control cards adapted to different data output formats is too professional and complicated, and unfriendly to ordinary users is solved.

[0043] Based on the above-mentioned adaptation method of the card reader data output format, the present application proposes the following embodiments. It should be noted that the technical features involved in the different embodiments of the present application described below can be combined with each other as long as they do not conflict with each other, and are not limited to the embodiments proposed below.

[0044] In one embodiment, Figure 1 As shown, the present application provides a method for adapting a card reader data output format, the method comprising:

[0045] S1. Obtain the hexadecimal physical card number and decimal serial card number of the access control card;

[0046] S2. According to a preset base type and its corresponding data output format, the hexadecimal physical card number is converted into a decimal conversion card number in an output format of the preset base type, to obtain a decimal conversion card number in an output format of the preset base type;

[0047] S3. Match the decimal serial card number of the access control card with the obtained decimal conversion card number to determine the data output format of the access control card.

[0048] In this embodiment, the hexadecimal physical card number and the decimal serial card number of the access control card are obtained; according to the preset base type and its corresponding data output format, the hexadecimal physical card number is converted into a decimal conversion card number of the output format of the preset base type, and the decimal conversion card number of the output format of the preset base type is obtained; the decimal serial card number of the access control card is adapted to the obtained decimal conversion card number to determine the data output format of the access control card. Thus, the relevant processing logic and professional parameter setting process involved in the bottom layer are shielded, and the adaptation process of the card reader to the access control card with different data output formats is simplified, so that the adaptation process of the card reader to the access control card with different data output formats is simpler and easier to operate, and more user-friendly. Thus, the problem that the adaptation process of the current card reader in replacing the access control card with different data output formats is too professional and complicated, and is not user-friendly.

[0049] In one embodiment, in step S1, obtaining the hexadecimal physical card number and the decimal serial card number of the access control card includes:

[0050] S11, the card reader reads the access card data to obtain the hexadecimal physical card number and the decimal serial card number of the access card; wherein the card reader is set in the access control device and connected to the access control device. The access control card is generally an IC (Integrated Circuit) card, which stores the hexadecimal physical card number and the decimal serial card number.

[0051] In this embodiment, the decimal serial card number of the access control card comes from the data stored in the access control card, and may also come from the decimal serial card number printed on the card surface of the access control card.

[0052] S12: The card reader inputs the acquired hexadecimal physical card number into the access control device.

[0053] In one embodiment, in step S2, converting the hexadecimal physical card number into a decimal conversion card number in an output format of the preset base type according to the preset base type and its corresponding data output format, and obtaining the decimal conversion card number in an output format of the preset base type; comprises:

[0054] S21. Determine the storage data format of the access control device.

[0055] Generally speaking, devices have two storage data formats: big endian and little endian.

[0056] Big-endian byte order: high-order byte first, low-order byte last.

[0057] Little-endian byte order: low-order byte first, high-order byte last.

[0058] For example, the value 0x4321 is stored using two bytes: the high-order byte is 0x43 and the low-order byte is 0x21.

[0059] If the data is stored in big-endian format, it is stored as 0x4321.

[0060] If the data is stored in the little-endian format, it is stored as 0x2143.

[0061] Every device has a specific storage data format, and access control devices are no exception.

[0062] When determining whether the storage data format of the access control device is big-endian or little-endian, you can first define a variable a with a data type of four bytes and assign a fixed hexadecimal value (for example: 0x87654321); then define a variable b with a length of one byte; assign variable a to variable b, and compare variable b with the high-order byte (0x87) and low-order byte (0x21) of the fixed hexadecimal data. If variable b is equal to the high-order byte (0x87), the storage data format of the access control device is big-endian; if variable b is equal to the low-order byte (0x21), the storage data format of the access control device is little-endian.

[0063] In this embodiment, the storage data format of the access control device is determined, that is, whether the storage data format of the access control device is big endian or little endian. Only when the storage data format of the access control device is determined can subsequent data processing be performed.

[0064] S22. Store the hexadecimal physical card number according to the storage data format of the access control device.

[0065] The card reader reads and obtains the hexadecimal physical card number of the access control card, and inputs the hexadecimal physical card number into the access control device.

[0066] The access control device stores the input hexadecimal physical card number in big-endian and big-endian byte order according to the storage data format of the big-endian and big-endian byte order determined by the access control device. Specifically, it includes:

[0067] The access control device stores the above hexadecimal physical card number in an array consisting of four one-byte length variables, and determines the specific data stored in each array element according to the big-endian and little-endian byte order obtained according to the storage data format determined by the access control device.

[0068] For example: the card reader reads and obtains the hexadecimal physical card number of the access control card as a four-byte hexadecimal number 0x87654321, and inputs the hexadecimal physical card number 0x87654321 into the access control device, which will store the hexadecimal physical card number 0x87654321 in an array consisting of four one-byte length variables. If the storage data format of the access control device is determined to be big-endian, the specific data stored in each array element is determined to be [0x87][0x65][0x43][0x21]. If the storage data format of the access control device is determined to be little-endian, the specific data stored in each array element is determined to be [0x21][0x43][0x65][0x87].

[0069] S23. According to the preset base type and its corresponding data output format, the stored hexadecimal physical card number is converted into a decimal conversion card number in the output format of the preset base type, so as to obtain the decimal conversion card number in the output format of the preset base type.

[0070] Specifically, the hexadecimal physical card number stored in big-endian and small-endian byte order is converted into a decimal conversion card number in the output format of the preset base type according to the preset base type and its corresponding data output format, thereby obtaining the decimal conversion card number in the output format of the preset base type.

[0071] Among them, the preset base type and its corresponding data output format include at least one of the following: 10-bit decimal, 10-bit decimal reverse output, 8-bit decimal ID followed by 3 bytes conversion, 00 plus 8-bit decimal ID followed by 3 bytes conversion, 5-bit decimal, 8-bit hexadecimal, and 8-bit hexadecimal reverse output.

[0072] For example, the decimal serial card number of the access card is 87654321. The card reader reads and obtains the hexadecimal physical card number of the access card, which is a four-byte hexadecimal number 0x87654321.

[0073] Make sure that the storage data format of the access control device is little-endian byte order, and the specific data stored in each array element is [0x21][0x43][0x65][0x87].

[0074] The hexadecimal physical card number stored in big-endian byte order is converted into a decimal conversion card number in an output format of the preset base type according to the preset base type and its corresponding data output format described in Table 1 below, and a decimal conversion card number in an output format of the preset base type is obtained, as shown in Table 1 below:

[0075] Table 1

[0076] Serial number Base Type Obtained decimal conversion card number 1 10-digit decimal 2271560481 2 10-bit decimal reverse output 558065031 3 8-digit decimal ID last 3 bytes conversion 6636321 4 00 plus 8-digit decimal ID and the following 3 bytes conversion 006636321 5 5-digit decimal 22715 6 8-bit hexadecimal 87654321 7 8-bit hexadecimal reverse output 21436587

[0077] In this embodiment, the hexadecimal physical card number of the access control card is read, and the hexadecimal physical card number is converted into a decimal conversion card number of the output format of the preset base type according to the preset base type and its data output format, so as to obtain the decimal conversion card number of the output format of the preset base type. Thus, the related processing logic and professional parameter setting process involved in the bottom layer are shielded, and the adaptation process of the card reader to the access control card with different data output formats is simplified, so that the adaptation process of the card reader to the access control card with different data output formats is more simple and easy to operate, and more user-friendly.

[0078] In one embodiment, in step S3, the step of adapting the decimal serial card number of the access card to the obtained decimal conversion card number to determine the data output format of the access card includes:

[0079] The decimal serial card number of the access control card is matched and compared with the obtained decimal conversion card number, and it is determined whether there is a decimal conversion card number in the obtained decimal conversion card number that is consistent with the decimal serial card number of the access control card;

[0080] If there is a decimal conversion card number that is consistent with the decimal serial card number of the access control card, the adaptation is successful, and the base type and output format parameters corresponding to the successfully adapted conversion card number are determined as the base type and output format parameters of the access control card, and the base type and output format parameters corresponding to the successfully adapted conversion card number are saved in the card reader of the access control device.

[0081] If there is no decimal conversion card number that is consistent with the decimal serial card number of the access control card, the adaptation fails.

[0082] For example, the decimal serial card number of the access card is 87654321. The card reader reads and obtains the hexadecimal physical card number of the access card, which is a four-byte hexadecimal number 0x87654321.

[0083] Make sure that the storage data format of the access control device is little-endian byte order, and the specific data stored in each array element is [0x21][0x43][0x65][0x87].

[0084] The hexadecimal physical card number stored in big-endian byte order is converted into a decimal conversion card number in the output format of the preset base type according to the preset base type and its corresponding data output format, and the decimal conversion card number in the output format of the preset base type is obtained. The adapted output format is shown in Table 1 above.

[0085] In Table 1 above, if the obtained decimal conversion card number contains a decimal conversion card number (serial number 6: 87654321) that is consistent with the decimal serial card number (87654321) of the access control card, then the adaptation is successful, and the base type (serial number 6: 8-bit hexadecimal) and output format parameters corresponding to the successfully adapted conversion card number are determined as the base type and output format parameters of the access control card, and the base type (serial number 6: 8-bit hexadecimal) and output format parameters corresponding to the successfully adapted conversion card number are saved in the card reader of the access control device.

[0086] In this embodiment, by adapting the decimal serial card number of the access control card with the obtained decimal conversion card number, it is determined whether there is a decimal conversion card number consistent with the decimal serial card number of the access control card in the obtained decimal conversion card number, and the base type and output format parameters corresponding to the decimal conversion card number consistent with the decimal serial card number of the access control card are determined as the base type and output format parameters of the access control card, and the base type and output format parameters corresponding to the successfully adapted conversion card number are saved in the card reader of the access control device. Therefore, the data output format of the access control card can be determined through a simple adaptation and comparison operation, making the adaptation process of the card reader to access control cards with different data output formats more simple and easy to operate, and more user-friendly.

[0087] Based on the same concept, in one embodiment, Figure 2 As shown, the present application provides a card reader data output format adaptation device, which is applied to a card reader data output format adaptation method described in any of the above embodiments, and the adaptation device includes: an acquisition module 10, a conversion module 20 and an adaptation module 30; wherein:

[0088] The acquisition module 10 acquires the hexadecimal physical card number and the decimal serial card number of the access control card;

[0089] The conversion module 20 is used to convert the hexadecimal physical card number into a decimal conversion card number in an output format of the preset base type according to the preset base type and its corresponding data output format, and obtain the decimal conversion card number in an output format of the preset base type;

[0090] The adapting module 30 is used to adapt the decimal serial card number of the access control card with the obtained decimal conversion card number to determine the data output format of the access control card.

[0091] In this embodiment, the hexadecimal physical card number and the decimal serial card number of the access control card are obtained by the acquisition module; the conversion module converts the hexadecimal physical card number into a decimal conversion card number of the output format of the preset system type according to the preset system type and its data output format, and obtains the decimal conversion card number of the output format of the preset system type; the adaptation module adapts the decimal serial card number of the access control card with the obtained decimal conversion card number to determine the data output format of the access control card. Thus, the relevant processing logic and professional parameter setting process involved in the bottom layer are shielded, and the adaptation process of the card reader to adapt to the access control card with different data output formats is simplified, so that the adaptation process of the card reader to adapt to the access control card with different data output formats is simpler and easier to operate, and more user-friendly. Thus, the problem that the adaptation process of the current card reader in replacing the access control card with different data output formats is too professional and complicated, and unfriendly to ordinary users is solved.

[0092] It should be noted that the above-mentioned device embodiment and method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, and the technical features in the method embodiment are correspondingly applicable in the device embodiment, which will not be repeated here.

[0093] In order to facilitate the understanding of the above application concept of the present application, the above application concept of the present application is explained in more detail below in conjunction with the accompanying drawings and specific embodiments.

[0094] In this embodiment, if Figure 3 As shown, the present application provides a method for adapting a card reader data output format, the method comprising:

[0095] S501. Obtain the hexadecimal physical card number and decimal serial card number of the access control card.

[0096] S502: Input the obtained hexadecimal physical card number into the access control device.

[0097] S503: Determine the storage data format of the access control device in big-endian and little-endian byte order.

[0098] S504: Store the hexadecimal physical card number according to the determined storage data format of the big-endian and little-endian byte order of the access control device.

[0099] S505. According to the preset base type and its corresponding data output format, the stored hexadecimal physical card number is converted into a decimal conversion card number in the output format of the preset base type, and the decimal conversion card number in the output format of the preset base type is obtained.

[0100] S506: Match and compare the decimal serial card number of the access control card with the obtained decimal conversion card number to determine whether there is a decimal conversion card number in the obtained decimal conversion card number that is consistent with the decimal serial card number of the access control card.

[0101] S507. Does the obtained decimal conversion card number contain a decimal conversion card number that is consistent with the decimal serial card number of the access card? If the obtained decimal conversion card number contains a decimal conversion card number that is consistent with the decimal serial card number of the access card, proceed to step S508; otherwise, proceed to step S509.

[0102] S508: If the obtained decimal conversion card number contains a decimal conversion card number that is consistent with the decimal serial card number of the access control card, the adaptation is successful, and the base type and output format parameters corresponding to the successfully adapted conversion card number are determined as the base type and output format parameters of the access control card, and the base type and output format parameters corresponding to the successfully adapted conversion card number are saved in the card reader of the access control device. Go to step S510.

[0103] S509: If there is no decimal conversion card number obtained that is consistent with the decimal serial card number of the access control card, the adaptation fails and the process goes to step S510.

[0104] S510: Adaptation ends.

[0105] In this embodiment, the hexadecimal physical card number and the decimal serial card number of the access control card are obtained; according to the preset base type and its corresponding data output format, the hexadecimal physical card number is converted into a decimal conversion card number of the output format of the preset base type, and the decimal conversion card number of the output format of the preset base type is obtained; the decimal serial card number of the access control card is adapted to the obtained decimal conversion card number to determine the data output format of the access control card. Thus, the relevant processing logic and professional parameter setting process involved in the bottom layer are shielded, and the adaptation process of the card reader to the access control card with different data output formats is simplified, so that the adaptation process of the card reader to the access control card with different data output formats is simpler and easier to operate, and more user-friendly. Thus, the problem that the adaptation process of the current card reader in replacing the access control card with different data output formats is too professional and complicated, and is not user-friendly.

[0106] Based on the same concept, in one embodiment, Figure 4As shown, the present application provides an adaptation device for a card reader data output format, the adaptation device 900 includes: a memory 902, a processor 901, and one or more computer programs stored in the memory 902 and executable on the processor 901, the memory 902 and the processor 901 are coupled together via a bus system 903, and when the one or more computer programs are executed by the processor 901, the following steps of a card reader data output format adaptation method provided in an embodiment of the present application are implemented:

[0107] S1. Obtain the hexadecimal physical card number and decimal serial card number of the access control card;

[0108] S2. According to a preset base type and its corresponding data output format, the hexadecimal physical card number is converted into a decimal conversion card number in an output format of the preset base type, to obtain a decimal conversion card number in an output format of the preset base type;

[0109] S3. Match the decimal serial card number of the access control card with the obtained decimal conversion card number to determine the data output format of the access control card.

[0110] The method disclosed in the above embodiment of the present application can be applied to the processor 901, or implemented by the processor 901. The processor 901 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware or software instructions in the processor 901. The processor 901 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 901 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the memory 902, and the processor 901 reads the information in the memory 902 and completes the steps of the above method in combination with its hardware.

[0111] It can be understood that the memory 902 in the embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory or other memory technology, a compact disk read-only memory (CD-ROM), a digital versatile disk (DVD) or other optical disk storage, a magnetic cassette, a magnetic tape, a magnetic disk storage or other magnetic storage device; the volatile memory can be a random access memory (RAM), and by way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM Memory), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), Direct Rambus Random Access Memory (DRRAM).The memories described in the embodiments of the present application are intended to include, but are not limited to, these and any other suitable types of memories.

[0112] It should be noted that the above-mentioned adaptation device embodiment and method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, and the technical features in the method embodiment are correspondingly applicable in the adaptation device embodiment, which will not be repeated here.

[0113] In addition, in an exemplary embodiment, the embodiment of the present application further provides a computer storage medium, specifically a computer-readable storage medium, for example, including a memory 902 storing a computer program, wherein the computer storage medium stores one or more programs of a method for adapting a card reader data output format, and when the one or more programs of the method for adapting a card reader data output format are executed by the processor 901, the following steps of the method for adapting a card reader data output format provided in the embodiment of the present application are implemented:

[0114] S1. Obtain the hexadecimal physical card number and decimal serial card number of the access control card;

[0115] S2. According to a preset base type and its corresponding data output format, the hexadecimal physical card number is converted into a decimal conversion card number in an output format of the preset base type, to obtain a decimal conversion card number in an output format of the preset base type;

[0116] S3. Match the decimal serial card number of the access control card with the obtained decimal conversion card number to determine the data output format of the access control card.

[0117] It should be noted that the program embodiment of the adaptation method for the data output format of a card reader on the above-mentioned computer-readable storage medium and the method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, and the technical features in the method embodiment are correspondingly applicable in the embodiment of the above-mentioned computer-readable storage medium, which will not be repeated here.

[0118] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0119] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the present application as described above, which are not provided in detail for the sake of simplicity. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for adapting a card reader data output format, characterized in that: The method comprises: Get the hexadecimal physical card number and decimal serial card number of the access card; According to the preset base type and its corresponding data output format, the hexadecimal physical card number is converted into a decimal conversion card number in the output format of the preset base type, to obtain the decimal conversion card number in the output format of the preset base type; The decimal serial card number of the access control card is adapted to the obtained decimal conversion card number to determine the data output format of the access control card, including: adapting and comparing the decimal serial card number of the access control card with the obtained decimal conversion card number, judging whether there is a decimal conversion card number consistent with the decimal serial card number of the access control card in the obtained decimal conversion card number, if there is a decimal conversion card number consistent with the decimal serial card number of the access control card, the adaptation is successful, and the base type and output format parameters corresponding to the successfully adapted conversion card number are determined as the base type and output format parameters of the access control card.

2. The method according to claim 1, characterized in that The method of obtaining the hexadecimal physical card number and the decimal serial card number of the access control card includes: Read the access card data to obtain the hexadecimal physical card number and decimal serial card number of the access card; The obtained hexadecimal physical card number is input into the access control device.

3. The method according to claim 1, characterized in that The method of converting the hexadecimal physical card number into a decimal conversion card number in the output format of the preset base type according to the preset base type and its corresponding data output format, and obtaining the decimal conversion card number in the output format of the preset base type; comprises: Determine the storage data format of the access control device; Storing the hexadecimal physical card number according to the storage data format of the access control device; According to the preset base type and its corresponding data output format, the stored hexadecimal physical card number is converted into a decimal conversion card number in the output format of the preset base type, and the decimal conversion card number in the output format of the preset base type is obtained.

4. The method according to claim 3, characterized in that The storing of the hexadecimal physical card number according to the storage data format of the access control device comprises: the access control device stores the input hexadecimal physical card number in big-endian and big-endian byte order according to the storage data format of the big-endian and big-endian byte order determined by the access control device.

5. The method according to claim 4, characterized in that The access control device stores the input hexadecimal physical card number in big-endian byte order according to the storage data format of the big-endian byte order determined by the access control device, including: the access control device stores the input hexadecimal physical card number in an array composed of four one-byte length variables, and determines the specific data stored in each array element according to the big-endian byte order obtained according to the storage data format determined by the access control device.

6. The method according to claim 3, characterized in that The preset base type and its corresponding data output format include at least one of the following: 10-bit decimal, 10-bit decimal reverse output, 8-bit decimal ID followed by 3 bytes conversion, 00 plus 8-bit decimal ID followed by 3 bytes conversion, 5-bit decimal, 8-bit hexadecimal, and 8-bit hexadecimal reverse output.

7. A card reader data output format adaptation device, applied to a card reader data output format adaptation method as described in any one of claims 1 to 6, characterized in that: The adapting device comprises: an acquisition module, a conversion module and an adapting module; wherein: The acquisition module acquires the hexadecimal physical card number and the decimal serial card number of the access control card; The conversion module is used to convert the hexadecimal physical card number into a decimal conversion card number in an output format of the preset base type according to the preset base type and its corresponding data output format, and obtain the decimal conversion card number in the output format of the preset base type; The adaptation module is used to adapt the decimal serial card number of the access control card with the obtained decimal conversion card number to determine the data output format of the access control card.

8. A card reader data output format adaptation device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of a method for adapting the data output format of a card reader as described in any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium stores a program for a method for adapting the data output format of a card reader, and when the program for the method for adapting the data output format of a card reader is executed by a processor, the steps of the method for adapting the data output format of a card reader described in any one of claims 1 to 6 are implemented.