Access control system, receiving device, receiving method and transmission system

By using a serial interface with two pins and direct memory access technology in the access control system, the complexity and compatibility issues of Wiegand signal reception and processing are solved, and efficient and flexible Wiegand data processing is achieved.

CN118823911BActive Publication Date: 2024-12-03HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411296695.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-12-03
Estimated Expiration
2044-09-14

AI Technical Summary

Technical Problem

The existing access control system increases the complexity and cost of hardware equipment when receiving and processing Wiigan signals, and the processor is burdened with heavy load and cannot be compatible with multiple Wiigan formats, limiting the flexibility and scalability of the system.

Method used

The processor burden is reduced by using a serial interface with two pins in the card reader and control device to sample Wiegand data and direct memory access, and parsing data in multiple Wiegand formats through preset protocols.

Benefits of technology

It realizes high-speed sampling and efficient processing of Wiegand data, reduces the complexity and cost of the system, and improves the flexibility and scalability of Wiegand data reception.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118823911B_ABST
    Figure CN118823911B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides an access control system, a receiving device, a receiving method and a transmission system, which receives Wiegand data through a serial interface with two pins, realizes high-speed sampling, significantly improves data processing efficiency, and uses direct memory access technology to realize data storage, thereby greatly reducing the burden on the processor. More importantly, the reception and processing of Wiegand data can be realized without modifying the hardware device or adding external circuits, reducing the cost and complexity of receiving and processing Wiegand data. In addition, the receiving device also has excellent compatibility, can receive and parse Wiegand data in various formats, accurately extract information according to the Wiegand protocol, and greatly improves the flexibility and scalability of Wiegand data reception.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of security systems, and in particular to an access control system, a receiving device, a receiving method and a transmission system. Background Art

[0002] In the existing access control system, the access control system includes a card reader, a processor and an access control device. The access control system receives the Wiegand signal from the card reader through the DATA0 and DATA1 signal lines. In order to enable the processor to receive and process the Wiegand signal, it is necessary to modify the hardware equipment of the access control system and add an external differential amplifier circuit and an external signal modulation circuit, thereby increasing the implementation cost and complexity of the access control system and increasing the difficulty of implementing the solution. In addition, the processor of the access control system not only needs to directly participate in the entire process of receiving and processing Wiegand data, but also needs to take into account other system tasks, thereby increasing the burden on the processor and reducing the efficiency of data processing. Secondly, since this technology requires the preset Wiegand format before implementation, it is not compatible with a variety of different Wiegand formats, which limits the flexibility and scalability of the system. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide an access control system, a receiving device, a receiving method and a transmission system to reduce the cost and complexity of receiving and processing Wiegand data, reduce the burden on the processor, and improve the flexibility and scalability of Wiegand data reception. The specific technical solution is as follows:

[0004] In a first aspect, an embodiment of the present application provides an access control system, the access control system comprising: a card reading device, a control device and an access control device;

[0005] The card reading device includes a processor and two pins;

[0006] The control device comprises a processor, a serial interface having two pins, the two pins and a memory;

[0007] The processor of the card reader device is used to obtain access card information of the access card that triggers the card reading operation in response to the card reading operation; and encapsulate the access card information into Wiegand data; and send the Wiegand data to the control device through the two pins of the card reader device;

[0008] The serial interface having two pins is used to periodically sample the two pins of the control device and store the sampled data in the memory through direct memory access;

[0009] The processor of the control device is used for reading the data stored in the memory by direct memory access in response to completing the reception of the Wiegand data as the first data; using the first combination data as a separator, separating the first data into a plurality of sub-data consisting of the second combination data and / or the third combination data; respectively determining the first Wiegand data corresponding to each sub-data, and combining each of the first Wiegand data to obtain the second data; parsing the second data according to a preset Wiegand protocol to obtain the access card information; authenticating the access card information, and if the authentication is successful, sending a pass instruction to the access control device;

[0010] The access control device is used to enter a passage-allowed state in response to the passage instruction.

[0011] The order of each first Wiegand data in the second data is the same as the order of the corresponding sub-data in the first data, the first combination data is a combination of the first unit data and the second unit data, the first unit data is the data sampled by the first pin when the two pins receive the Wiegand idle signal, and the second unit data is the data sampled by the second pin when the two pins receive the Wiegand idle signal;

[0012] The second combined data is a combination of the third unit data and the fourth unit data, the third unit data is data sampled by the first pin when the two pins receive the Wiegand data 0, and the fourth unit data is data sampled by the second pin when the two pins receive the Wiegand data 0;

[0013] The third combination data is a combination of the fifth unit data and the sixth unit data, the fifth unit data is the data obtained by sampling the first pin when the two pins receive the Wiegand data 1, and the sixth unit data is the data obtained by sampling the second pin when the two pins receive the Wiegand data 1.

[0014] In a possible implementation, the card reading device is a microcontroller, and the microcontroller includes a processor and two pins;

[0015] The control device includes a system-on-chip, which includes a processor, a serial interface with two pins, the two pins, and a memory.

[0016] In a possible implementation, the access control system includes a plurality of control devices.

[0017] The processor of the control device is also used to obtain access card information of the access card that triggers the card reading operation in response to the card reading operation; and encapsulate the access card information into Wiegand data; and send the Wiegand data to other control devices through the two pins of the control device.

[0018] In a second aspect, an embodiment of the present application provides a receiving device, the receiving device comprising a processor, a serial interface having two pins, the two pins, and a memory;

[0019] The serial interface having two pins is used to periodically sample the two pins and store the sampled data in the memory through direct memory access;

[0020] The processor is configured to, in response to completing the reception of the Wiegand data, read the data stored in the memory through direct memory access as the first data; separate the first data into a plurality of sub-data consisting of the second combined data and / or the third combined data using the first combined data as a separator; respectively determine the first Wiegand data corresponding to each sub-data, and combine each of the first Wiegand data to obtain the second data; and parse the second data according to a preset Wiegand protocol to obtain the first information;

[0021] The order of each first Wiegand data in the second data is the same as the order of the corresponding sub-data in the first data, the first combination data is a combination of the first unit data and the second unit data, the first unit data is the data sampled by the first pin when the two pins receive the Wiegand idle signal, and the second unit data is the data sampled by the second pin when the two pins receive the Wiegand idle signal;

[0022] The second combined data is a combination of the third unit data and the fourth unit data, the third unit data is data sampled by the first pin when the two pins receive the Wiegand data 0, and the fourth unit data is data sampled by the second pin when the two pins receive the Wiegand data 0;

[0023] The third combination data is a combination of the fifth unit data and the sixth unit data, the fifth unit data is the data obtained by sampling the first pin when the two pins receive the Wiegand data 1, and the sixth unit data is the data obtained by sampling the second pin when the two pins receive the Wiegand data 1.

[0024] In a possible implementation manner, the processor is further configured to periodically sample the two pins and parse the sampled data through a preset serial protocol to obtain the second information until a first level signal is sampled from any of the pins;

[0025] The processor is further configured to enable the direct memory access in response to sampling a first level signal from any of the pins, and send a collection instruction to the serial interface having two pins;

[0026] The serial interface having two pins is specifically used to periodically sample the two pins in response to the acquisition instruction, and store the sampled data in the memory through the direct memory access;

[0027] The first level signal is a level signal other than the second level signal, the second level signal is a level signal on the two pins when a Wiegand idle signal is received, and the total transmission length of the direct memory access is configured to be greater than a preset length threshold.

[0028] In a possible implementation, the serial interface having two pins includes a chip select pin;

[0029] The processor is further configured to maintain the level of the chip select pin at a first level;

[0030] The processor sends a collection instruction to the serial interface having two pins, including:

[0031] The processor adjusts the level of the chip selection pin to a second level;

[0032] The first level is one of a high level and a low level, and the second level is the other of a high level and a low level.

[0033] In a possible implementation manner, the processor is further configured to, in response to sampling the first level signal from any of the pins, record in the memory the pin from which the first level signal is sampled as a target pin;

[0034] The processor is further configured to read a recorded target pin if the first data starts with the first combination data, and determine a second Wiegand data corresponding to the target pin;

[0035] The processor combines the first Wiegand data to obtain second data, including:

[0036] If the first data starts with the first combined data, the first Wiegand data corresponding to each sub-data is sequentially arranged after the second Wiegand data according to the order in the first data to obtain the second data;

[0037] If the first data does not start with the first combined data, the first Wiegand data corresponding to each sub-data is arranged in sequence according to the order in the first data to obtain the second data;

[0038] Among them, the first pin corresponds to Wiegand data 0, the second pin corresponds to Wiegand data 1, the first pin is the pin at the first level signal when Wiegand data 0 is received, and the second pin is the pin at the first level signal when Wiegand data 1 is received.

[0039] In a possible implementation manner, the processor is further configured to periodically read data recorded in the memory in a most recent period as third data; if the third data includes first combination data that appears continuously, it is determined that the reception of the Wiegand data has been completed;

[0040] The period in which the processor reads the data recorded in the memory in the most recent period is greater than the maximum bit interval time of the Wiegand data.

[0041] In a third aspect, an embodiment of the present application provides a receiving method, the method comprising:

[0042] The two pins are periodically sampled via a serial interface having two pins, and the sampled data is stored in a memory via direct memory access;

[0043] In response to completing the reception of the Wiegand data, reading the data stored in the memory through direct memory access as the first data;

[0044] Using the first combined data as a separator, the first data is separated into a plurality of sub-data consisting of the second combined data and / or the third combined data;

[0045] Determine first Wiegand data corresponding to each sub-data respectively, and combine the first Wiegand data to obtain second data;

[0046] The second data is parsed according to a preset Wiegand protocol to obtain first information; wherein the order of each first Wiegand data in the second data is the same as the order of the corresponding sub-data in the first data, the first combination data is a combination of the first unit data and the second unit data, the first unit data is data sampled by the first pin when the two pins receive the Wiegand idle signal, and the second unit data is data sampled by the second pin when the two pins receive the Wiegand idle signal; the second combination data is a combination of the third unit data and the fourth unit data, the third unit data is data sampled by the first pin when the two pins receive the Wiegand data 0, and the fourth unit data is data sampled by the second pin when the two pins receive the Wiegand data 0; the third combination data is a combination of the fifth unit data and the sixth unit data, the fifth unit data is data sampled by the first pin when the two pins receive the Wiegand data 1, and the sixth unit data is data sampled by the second pin when the two pins receive the Wiegand data 1.

[0047] In a possible implementation, the method further includes:

[0048] The two pins are periodically sampled, and the sampled data are parsed through a preset serial protocol to obtain second information, until a first level signal is sampled from any of the pins;

[0049] In response to sampling a first level signal from any of the pins, enabling the direct memory access and sending a collection instruction to the serial interface having two pins;

[0050] In response to the acquisition instruction, periodically sampling the two pins through the serial interface having two pins, and storing the sampled data in the memory through the direct memory access;

[0051] The first level signal is a level signal other than the second level signal, the second level signal is a level signal on the two pins when a Wiegand idle signal is received, and the total transmission length of the direct memory access is configured to be greater than a preset length threshold.

[0052] In a possible implementation, the method further includes:

[0053] Maintaining the level of a chip select pin at a first level, wherein the chip select pin is provided on the serial interface having two pins;

[0054] The sending of the acquisition instruction to the serial interface having two pins comprises:

[0055] Adjusting the level of the chip select pin to a second level;

[0056] The first level is one of a high level and a low level, and the second level is the other of a high level and a low level.

[0057] In a possible implementation, the method further includes:

[0058] In response to sampling the first level signal from any of the pins, recording the pin where the first level signal is sampled in the memory as a target pin;

[0059] If the first data starts with the first combination data, reading the recorded target pin and determining the second Wiegand data corresponding to the target pin;

[0060] The combining the first Wiegand data to obtain second data comprises:

[0061] If the first data starts with the first combined data, the first Wiegand data corresponding to each sub-data is sequentially arranged after the second Wiegand data according to the order in the first data to obtain the second data;

[0062] If the first data does not start with the first combined data, the first Wiegand data corresponding to each sub-data is arranged in sequence according to the order in the first data to obtain the second data;

[0063] Among them, the first pin corresponds to Wiegand data 0, the second pin corresponds to Wiegand data 1, the first pin is the pin at the first level signal when Wiegand data 0 is received, and the second pin is the pin at the first level signal when Wiegand data 1 is received.

[0064] In a possible implementation, the method further includes:

[0065] Periodically reading the data recorded in the memory in the most recent period as the third data; if the third data includes the first combination data that appears continuously, determining that the reception of the Wiegand data has been completed;

[0066] The period for reading the data recorded in the memory in the most recent period is greater than the maximum bit interval time of the Wiegand data.

[0067] In a fourth aspect, an embodiment of the present application provides a receiving device, the device comprising:

[0068] A sampling module, used for periodically sampling the two pins through the serial interface having two pins, and storing the sampled data in the memory through direct memory access;

[0069] a reading module, configured to, in response to completing the reception of the Wiegand data, use the processor to read the data stored in the memory through direct memory access as the first data;

[0070] a separation module, configured to use the first combined data as a separator and separate the first data into a plurality of sub-data consisting of the second combined data and / or the third combined data through the processor;

[0071] A combining module, configured to determine the first Wiegand data corresponding to each sub-data through the processor, and combine the first Wiegand data to obtain the second data;

[0072] The parsing module is used to parse the second data according to the preset Wiegand protocol through the processor to obtain the first information; wherein the order of each first Wiegand data in the second data is the same as the order of the corresponding sub-data in the first data, the first combination data is a combination of the first unit data and the second unit data, the first unit data is the data sampled by the first pin when the two pins receive the Wiegand idle signal, and the second unit data is the data sampled by the second pin when the two pins receive the Wiegand idle signal; the second combination data is a combination of the third unit data and the fourth unit data, the third unit data is the data sampled by the first pin when the two pins receive the Wiegand data 0, and the fourth unit data is the data sampled by the second pin when the two pins receive the Wiegand data 0; the third combination data is a combination of the fifth unit data and the sixth unit data, the fifth unit data is the data sampled by the first pin when the two pins receive the Wiegand data 1, and the sixth unit data is the data sampled by the second pin when the two pins receive the Wiegand data 1.

[0073] In a fifth aspect, an embodiment of the present application provides a transmission system, the transmission system comprising: a sending device and a receiving device;

[0074] The sending device includes a processor and two pins;

[0075] The receiving device includes a processor, a serial interface having two pins, the two pins, and a memory;

[0076] The processor of the sending device is used to obtain a first message and encapsulate the first message into Wiegand data; and send the Wiegand data to the receiving device through the two pins of the sending device;

[0077] The serial interface having two pins is used to periodically sample the two pins of the receiving device and store the sampled data in the memory through direct memory access;

[0078] The processor of the receiving device is used for, in response to completing the reception of the Wiegand data, reading the data stored in the memory through direct memory access as the first data; using the first combined data as a separator, separating the first data into a plurality of sub-data consisting of the second combined data and / or the third combined data; respectively determining the first Wiegand data corresponding to each sub-data, and combining each of the first Wiegand data to obtain the second data; parsing the second data according to a preset Wiegand protocol to obtain the first information;

[0079] Among them, the order of each first Wiegand data in the second data is the same as the order of the corresponding sub-data in the first data, the first combination data is a combination of the first unit data and the second unit data, the first unit data is the data sampled by the first pin when the two pins receive the Wiegand idle signal, and the second unit data is the data sampled by the second pin when the two pins receive the Wiegand idle signal; the second combination data is a combination of the third unit data and the fourth unit data, the third unit data is the data sampled by the first pin when the two pins receive the Wiegand data 0, and the fourth unit data is the data sampled by the second pin when the two pins receive the Wiegand data 0; the third combination data is a combination of the fifth unit data and the sixth unit data, the fifth unit data is the data sampled by the first pin when the two pins receive the Wiegand data 1, and the sixth unit data is the data sampled by the second pin when the two pins receive the Wiegand data 1.

[0080] In a possible implementation, the sending device includes a microcontroller, and the microcontroller includes a processor and two pins;

[0081] The receiving device includes a system-on-chip, which includes a processor, a serial interface with two pins, the two pins, and a memory.

[0082] Beneficial effects of the embodiments of the present application:

[0083] The receiving device provided in the embodiment of the present application receives Wiegand data through a serial interface with two pins, realizes high-speed sampling, significantly improves data processing efficiency, and uses direct memory access technology to realize data storage, thereby greatly reducing the burden on the processor. More importantly, the reception and processing of Wiegand data can be realized without modifying the hardware device or adding external circuits, reducing the cost and complexity of receiving and processing Wiegand data. In addition, the receiving device also has excellent compatibility, can receive and parse Wiegand data in various formats, accurately extract information according to the Wiegand protocol, and greatly improves the flexibility and scalability of Wiegand data reception.

[0084] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0086] Figure 1 It is a schematic diagram of the Wiegand data representation method;

[0087] Figure 2 This is a schematic diagram of the meaning of each bit in the Wiegand 26 format;

[0088] Figure 3 This is a schematic diagram of the effective time of the Wiegand data bit;

[0089] Figure 4 This is a schematic diagram of the maximum bit interval time of Wiegand data;

[0090] Figure 5 This is a schematic diagram of Wiegand data sampling;

[0091] Figure 6 It is a schematic diagram of two-wire serial peripheral interface data transmission;

[0092] Figure 7a A first schematic diagram of the Wiegand data transmission level state provided in an embodiment of the present application;

[0093] Figure 7b A second schematic diagram of the Wiegand data transmission level state provided in an embodiment of the present application;

[0094] Figure 7c A third schematic diagram of the Wiegand data transmission level state provided in an embodiment of the present application;

[0095] Figure 7d A fourth schematic diagram of the Wiegand data transmission level state provided in an embodiment of the present application;

[0096] Figure 8 A schematic diagram of the structure of a receiving device provided in an embodiment of the present application;

[0097] Fig. 9 A flowchart of Wiegand data reception and processing provided in an embodiment of the present application;

[0098] Fig.10 A schematic diagram of the first structure of the transmission system provided in the embodiment of the present application;

[0099] Fig.11 A second structural diagram of the transmission system provided in an embodiment of the present application;

[0100] Fig.12 A schematic diagram of the structure of the access control system provided in the embodiment of the present application;

[0101] Fig.13 A flow chart of identity authentication for a door access control system provided in an embodiment of the present application;

[0102] Fig.14 A flowchart of a receiving method provided in an embodiment of the present application;

[0103] Fig.15 A schematic diagram of the structure of a receiving device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0104] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.

[0105] In order to more clearly explain the receiving device provided by the present application, the relevant terms involved in this article are explained below:

[0106] Wiegand (Wiegand protocol): Wiegand is an internationally unified standard and a communication protocol developed by Motorola. It is often used to transmit data between card readers (reading heads) and access control controllers. When the card reader recognizes a valid card, it sends the access card information to the controller in the form of the Wiegand protocol. The controller opens the door after verifying that the access card information is valid. The Wiegand protocol does not define the baud rate of communication or the data length. The main definition of the Wiegand protocol is the data transmission method: the two data lines data 0 (ie DATA0) and data 1 (ie DATA1) transmit 0 and 1 respectively. The Wiegand interface usually consists of three wires, namely: DATA0, DATA1 and GND (Ground, wire grounding terminal). The GND lines are not shown in the structural diagram provided in this application. Wiegand data only requires two data lines for data transmission, one is DATA0 and the other is DATA1. For an example of the representation method of Wiegand data, see Figure 1 , Figure 1 Schematic diagram of Wiegand data representation method.

[0107] Wiegand format: Wiegand protocol has multiple formats, commonly used are 26bit (Binary digit, referred to as "bit"), 34bit, 58bit, etc. Commonly used Wiegand 26 format see Figure 2 As shown, Figure 2 The following is a schematic diagram of the meaning of each bit in the Wiegand 26 format. The 0th bit is the even parity bit of bits 1-12, and the 25th bit is the odd parity bit of bits 13-24. Figure 2 E stands for even parity bit, D stands for data bit, and O stands for odd parity bit. Other formats are similar, and the differences mainly lie in the data length and parity bit length.

[0108] Wiegand data bit valid time: Wiegand data is represented by a low level. Bit valid time period 1 refers to the low level duration corresponding to a bit of data. Figure 3 shown.

[0109] Maximum bit interval time of Wiegand data: Bit interval time period 2 refers to the interval time between two bit data in the same Wiegand transmission, see Figure 4 shown.

[0110] SPI: SPI (Serial Peripheral interface) is mainly used as an interface protocol for the master chip to configure peripheral chips. It is commonly used in EEPROM (read-write memory), FLASH (flash memory), real-time clock, AD converter (Analog-to-Digital Converter), and between digital signal processors and digital signal decoders. Serial Peripheral Interface is a high-speed, full-duplex, synchronous, serial, master-slave structure communication bus.

[0111] Dual SPI: Dual SPI (Dual serial peripheral interface), the serial peripheral interface has four lines, including CS (Chip Select), CLK (Clock), MOSI (Master Output Slave Input), and MISO (Master Input Slave Output). The serial peripheral interface works in full-duplex mode. At the same time, MOSI and MISO are used as input and output respectively, that is, input and output are completed through only one line. MOSI and MISO lines work independently in any clock cycle and are used for sending and receiving respectively. The two-wire serial peripheral device interface changes the full-duplex serial peripheral device interface into a half-duplex one. The two-wire serial peripheral device interface also uses four wires, but MOSI becomes DATA0 and MISO becomes DATA1. Both DATA0 and DATA1 are used for data transmission during input and output. Therefore, the one-way data transmission speed is twice that of the serial peripheral device interface and is used for half-duplex communication. DATA0 and DATA1 here refer to the two data lines in the two-wire serial peripheral device interface, which are different from DATA0 and DATA1 in the Wiegand interface. For ease of understanding, the two data lines DATA0 and DATA1 in the two-wire serial peripheral device interface are referred to as D0 and D1 in the following text.

[0112] DMA: DMA (Direct Memory Access), direct memory access transmission copies data from one address space to another, providing high-speed data transmission between a two-wire serial peripheral interface and memory or between memory and memory. When the processor initializes this transmission action, the transmission action itself is implemented and completed by the direct memory access controller. The direct memory access transmission method does not require the processor to directly control the transmission, nor does it have the scene retention and recovery process like the interrupt processing method. It opens a direct data transmission channel for RAM (Random Access Memory) and IO (Input / Output) devices through hardware, which greatly improves the efficiency of the processor.

[0113] DMA buffer: (DMA buffer, direct memory access buffer) is a section of memory space allocated for direct memory access before it is enabled, used to cache data transmitted by direct memory access.

[0114] SOC: SOC (System On Chip), also known as system on chip, means that it is a product, an integrated circuit with a dedicated purpose, which contains all the contents of a complete system and embedded software.

[0115] CPU: CPU (Central Processing Unit, CPU for short) is the computing and control core of the computer system and is the final execution unit for information processing and program running.

[0116] MCU: MCU (Microcontroller Unit) is an integrated circuit chip that uses ultra-large-scale integrated circuit technology to integrate the computer's central processing unit (CPU) frequency and basic IO (input / output) interface circuits on the same chip. Microcontrollers are usually used as the core control components of embedded systems and are widely used in modern intelligent electronic devices such as smart meters, real-time industrial control, communication equipment, navigation systems, and household appliances.

[0117] Signal: In this application, signal refers to high and low level signals.

[0118] Data: In this application, after the high and low level signals are converted into the form represented by digital signals 0 and 1, they are called data.

[0119] Information: In this application, information refers to the specific meaning represented by the binary code composed of digital signals 0 and 1. For example, through coding technology, relevant information such as access card (such as card number, access card user information, etc.) can be converted into binary coded data. The content carried by these binary coded data is information.

[0120] Sampling: The process of collecting signals and converting them into data, see Figure 5 , Figure 5 The two lines shown in the figure are signals collected by the DATA0 signal line and the DATA1 signal line. Sampling is performed at time 3, the low level on DATA0 represents 1, and the low level on DATA1 represents 0, and the sampling obtains data 1. Sampling is performed at time 4, the low level on DATA0 represents 0, and the low level on DATA1 represents 1, and the sampling obtains data 0.

[0121] In the existing access control system, the access control system receives the initial Wiegand signal from the card reader through the DATA0 and DATA1 signal lines, and passes it to the external differential amplifier circuit for differential processing. Subsequently, the differentially processed signal enters the external signal modulation circuit for modulation to meet the transmission requirements. Finally, the system receives and parses the modulated Wiegand signal through the serial peripheral device interface or other communication protocols, restores the original data, and verifies whether it meets the requirements of the access control authority.

[0122] However, this processing technology has some problems. First, the differential amplifier circuit and signal modulation circuit are externally added parts, which increase the cost and complexity of the access control system and the difficulty of implementing the solution. In addition, the processor of the access control system not only needs to directly participate in the entire process of receiving and processing Wiegand data, but also needs to take into account other system tasks, which increases the burden on the processor and reduces the efficiency of data processing. Secondly, since this technology requires the Wiegand format to be preset before implementation, it is not compatible with a variety of different Wiegand formats, which limits the flexibility and scalability of the system.

[0123] Based on this, the present application provides a receiving device, which solves the above technical problems through the characteristics of a serial interface with two pins. In order to explain the present application more clearly, the principle of the serial interface with two pins will be explained first:

[0124] The serial interface with two pins can be a two-wire serial peripheral device interface, or other interfaces with the characteristics of a two-pin serial interface. Since a serial interface with two pins usually uses 8 bits or more to represent a byte of data, the pins in this article are IO pins, that is, input and output pins. Therefore, in this article, for the convenience of description, the serial interface with two pins is a two-wire serial peripheral device interface, the pins are input and output pins, and the two-wire serial peripheral device interface uses 8 bits to represent a byte of data. The Wiegand data transmission method is based on Figure 1 The method shown is used as an example for explanation.

[0125] As mentioned above, the two-wire serial peripheral device interface samples the Wiegand data through two input and output pins, that is, data 0 and 1 are transmitted through the two data lines D0 and D1 respectively. There is a cache space in the two-wire serial peripheral device interface. The transmitted Wiegand data is 8-bit data. There are 8 spaces in the corresponding cache space. The 0th to 7th spaces are numbered 0-7 respectively, and each space can store one bit of data. 8 consecutive bits of data are stored as follows Figure 6 The sequence shown is scattered on the two data lines D0 and D1. After receiving the Wiegand data, the two-wire serial peripheral device interface stores the data of D0 in the cache space numbered 0, 2, 4, and 6, and stores the data of D1 in the cache space numbered 1, 3, 5, and 7. After the data in the cache space of the two-wire serial peripheral device interface is moved to the memory by direct memory access, the storage method in the memory is the same as the storage method in the cache space of the two-wire serial peripheral device interface. When the processor reads data from the memory, it reads in order 0-7, so the two inputs are finally read out at once, thereby obtaining the combined data.

[0126] When the two-wire serial peripheral device interface performs Wiegand data transmission, the two input and output pins include the first input and output pin D0 and the second input and output pin D1. There are three possible situations, namely, transmitting Wiegand data 1, transmitting Wiegand data 0, and transmitting no valid data. Figure 7a , Figure 7a A schematic diagram of the Wiegand data transmission level state provided in an embodiment of the present application.

[0127] Specifically, when the Wiegand data is a Wiegand idle signal, that is, no valid data is transmitted, see Figure 7b, D0 level is high level, D1 level is high level, the data 1 obtained by sampling the first pin, that is, the data 1 obtained by sampling the D0 pin is recorded as the first unit data, the data 1 obtained by sampling the second pin, that is, the data 1 obtained by sampling the D1 pin is recorded as the second unit data, and the data obtained by combining the first unit data and the second unit data is 11. Since the data transmission will continue for a period of time, "11" will be continuously collected, so the data obtained by combining them is a repeated 0xFF (the binary value of this data is 1111 1111), and this form of data is recorded as the first combination data.

[0128] When transmitting Wiegand data 0, see Figure 7c , D0 level is low level, D1 level is high level, the data 1 obtained by sampling the first pin, that is, the data 1 obtained by sampling the D0 pin is recorded as the third unit data, the data 0 obtained by sampling the second pin, that is, the data 0 obtained by sampling the D1 pin is recorded as the fourth unit data, and the data obtained by combining the third unit data and the fourth unit data is 10. Based on the same principle as the above transmission of no valid data, "10" will be continuously collected, so the data obtained by combining them is repeated 0xAA (the binary value of this data is 1010 1010), and this form of data is recorded as the second combination data.

[0129] When transmitting Wiegand data 1, see Figure 7d , D0 level is high level, D1 level is low level, the data 0 obtained by sampling the first pin, that is, the data 0 obtained by sampling the D0 pin is recorded as the fifth unit data, the data 1 obtained by sampling the second pin, that is, the data 1 obtained by sampling the D1 pin is recorded as the sixth unit data, and the data obtained by combining the fifth unit data and the sixth unit data is 01. Based on the same principle as the above transmission of no valid data, "01" will be continuously collected, so the data obtained by combining them is a repeated 0x55 (the binary value of this data is 0101 0101), and this form of data is recorded as the third combination data.

[0130] It can be understood that when combining the unit data transmitted on the two data lines D0 and D1, they should be combined in the same order. For example, when no valid data is transmitted, the first combined data 1111 1111 is combined in the order of D0-D1-D0-D1-D0-D1-D0-D1; when Wiegand data 0 is transmitted, the second combined data 1010 1010 is combined in the order of D0-D1-D0-D1-D0-D1-D0-D1; when Wiegand data 1 is transmitted, the third combined data 0101 0101 is combined in the order of D0-D1-D0-D1-D0-D1-D0-D1.

[0131] See also Figure 8 , Figure 8 A schematic diagram of the structure of a receiving device provided in an embodiment of the present application includes a processor 801, a two-wire serial peripheral device interface 802, two input and output pins 803 and 804, a memory 805, and a common ground pin 806;

[0132] A two-wire serial peripheral device interface 802 for periodically sampling two input and output pins 803 and 804 and storing the sampled data in a memory 805 via direct memory access;

[0133] The processor 801 is used for, in response to completing the reception of the Wiegand data, reading the data stored in the memory 805 through direct memory access as the first data; using the first combined data as a separator, separating the first data into a plurality of sub-data; respectively determining the first Wiegand data corresponding to each sub-data, and combining each first Wiegand data to obtain the second data; parsing the second data according to the preset Wiegand protocol to obtain the first information;

[0134] Among them, the order of each first Wiegand data in the second data is the same as the order of the corresponding sub-data in the first data, the sub-data of the second combination data that appears repeatedly corresponds to Wiegand data 0, and the sub-data of the third combination data that appears repeatedly corresponds to Wiegand data 1; the first combination data, the second combination data and the third combination data are data obtained by sampling two input and output pins under different circumstances, and the first combination data is the case when the two input and output pins receive the Wiegand idle signal, the second combination data is the case when the two input and output pins 803 and 804 receive the Wiegand data 0, and the third combination data is the case when the two input and output pins 803 and 804 receive the Wiegand data 1.

[0135] Exemplarily, assuming that the first data is 0xAA 0xFF 0x55 0xFF 0x55 0xFF 0x55 0xFF 0xAA0xFF 0x55 0xFF 0xAA 0xFF 0x55 0xFF, and the first data starts with the second combined data 0xAA, then the first bit is collected, and the combined second data is 0xAA 0x55 0x55 0x55 0x55 0xAA 0x55 0xAA 0x55, that is, 01110101.

[0136] Assuming that the first data is 0xFF 0xAA 0xFF 0x55 0xFF 0x55 0xFF 0xAA 0xFF 0x55 0xFF0xAA 0xFF 0xAA 0xFF, and the first data starts with the second combined data 0xFF, the first bit is not collected. Assuming that the second Wiegand data is 0xAA, the combined second data is 0xAA 0xAA 0x55 0x55 0x55 0xAA 0x55 0xAA 0x55, that is, 00110100.

[0137] By applying the above embodiment, the receiving device receives Wiegand data through a two-wire serial peripheral device interface, realizes high-speed sampling, significantly improves data processing efficiency, and uses direct memory access technology to realize data storage, thereby greatly reducing the burden on the processor. More importantly, the reception and processing of Wiegand data can be realized without modifying the hardware device or adding external circuits, reducing the cost and complexity of receiving and processing Wiegand data. In addition, the receiving device also has excellent compatibility, can receive and parse Wiegand data in various formats, accurately extract information according to the Wiegand protocol, and greatly improves the flexibility and scalability of Wiegand data reception.

[0138] The following is an illustrative description of the receiving device provided by the present application using the entire process of Wiegand data reception and processing:

[0139] See also Fig. 9 , Fig. 9 The flowchart of Wiegand data reception and processing provided in the embodiment of the present application includes:

[0140] S901, set receiving trigger interrupt;

[0141] S9021, other threads execute normally;

[0142] S9022, receive trigger interrupt trigger;

[0143] S903, recording a trigger signal;

[0144] S904, opening a two-wire serial peripheral device interface;

[0145] S905, enable direct memory access;

[0146] S9061, direct memory access acquisition;

[0147] S9062, direct memory access completion interrupt trigger;

[0148] S9063, other threads execute normally;

[0149] S9064, determine whether the reception is completed, if so, execute S907, if not, execute S9063;

[0150] S907, determine whether the first bit (i.e., the first bit) is collected, if so, execute S909, if not, execute S908;

[0151] S908, reading the recorded trigger signal to identify the first bit of data;

[0152] S909, determine whether the data length is 26, if so, execute S9010, if not, execute S9011;

[0153] S9010, Wiegand 26 data analysis;

[0154] S9011, determine whether the data length is 34, if so, execute S9012, if not, execute S9013;

[0155] S9012, Wiegand 34 data analysis;

[0156] S9013, determine whether the data length is other lengths, if so, execute S9014;

[0157] S9014, analysis of other Wiegand length data.

[0158] The above steps S901-S9014 will be described below in conjunction with the receiving device:

[0159] In S901, since the sender of Wiegand data may initiate data transmission at any time, if the receiving device is continuously in the receiving state, the processor occupancy rate will increase, thereby affecting the performance of the receiving device. Based on this, the device can receive a triggered interrupt to reduce the processor occupancy rate, thereby improving the efficiency and reliability of Wiegand data transmission.

[0160] Before the interrupt is triggered, the processor is used to periodically sample the two input and output pins, and parse the sampled data through a preset serial protocol to obtain second information. The second information usually refers to information that is not transmitted in the form of Wiegand data, and its function is to monitor the status of the two input and output pins.

[0161] When a first level signal is sampled from any input / output pin, an interrupt is triggered, wherein the first level signal is a level signal other than the second level signal, and the second level signal is a level signal on the two input / output pins when a Wiegand idle signal is received, that is, the first level signal is a low level signal, and the second level signal is a high level signal.

[0162] By applying the above embodiment, the processor ensures the real-time acquisition of non-Wiegand data by periodically sampling the two input and output pins. When a specific first level signal is detected, the direct memory access (DMA) mechanism can be immediately triggered. Through the DMA technology, the data is directly transmitted from the two-wire serial peripheral device interface to the memory, reducing the CPU's involvement and interrupt times, thereby reducing the CPU load and improving the overall performance of the receiving device. In addition, the total DMA transmission length is configured to be greater than the preset length threshold, ensuring the integrity and continuity of data transmission, further improving the stability and reliability of the system, and then realizing fast data transmission and storage, thereby improving the response speed and data processing efficiency of the receiving device.

[0163] Setting the receive trigger interrupt can be achieved by the following method:

[0164] The two-wire serial peripheral device interface includes a chip select pin. When the processor receives non-Wiegand data, the level of the chip select pin of the two-wire serial peripheral device interface is maintained at a first level. After receiving the Wiegand data, the processor adjusts the level of the chip select pin to a second level. The first level is one of a high level and a low level, and the second level is the other of a high level and a low level.

[0165] The process of adjusting the level of the chip selection pin to the second level is the process of sending a collection instruction to the two-wire serial peripheral device interface, so that the two-wire serial peripheral device interface executes the step of sampling the two input and output pins.

[0166] By applying the above embodiment, the processor can receive non-Wiegand data by keeping the chip select pin level at the first level. When Wiegand data collection is required, the processor sends a collection instruction by adjusting the chip select pin to the second level, thereby improving the flexibility and response speed of the device and ensuring the accuracy and reliability of data collection. In addition, the design of the chip select pin also reduces the complexity of device design, reduces additional hardware and software overhead, and further reduces costs.

[0167] In S9021, other threads are executed normally, that is, the processor executes other tasks except receiving and processing Wiegand data, such as periodically checking whether the reception of Wiegand data has been completed according to the data stored in the memory, as described in S9063 below for details;

[0168] In S9022 , the processor executes step S903 , step S904 , and step S905 in response to the interrupt being triggered.

[0169] In S903, in response to the interrupt being triggered, the processor records the trigger signal in the memory, that is, records the input / output pin that samples the first level signal and uses it as the target input / output pin, and records the Wiegand data corresponding to the target input / output pin as the second Wiegand data.

[0170] In S904, in response to the interrupt being triggered, the processor enables the two-wire serial peripheral device interface, that is, sets the register to enable the two-wire serial peripheral device interface acquisition. After the two-wire serial peripheral device interface is enabled, it periodically samples two input and output pins.

[0171] In S905 , in response to the interrupt being triggered, the processor turns on direct memory access, that is, the processor enables direct memory access, and after turning on direct memory access, step S9061 is executed.

[0172] In S9061, after sampling the two input and output pins through the two-wire serial peripheral interface, the sampled data is stored in the memory by direct memory access.

[0173] S9062, direct memory access completion interrupt triggering, that is, after completing the reception of Wiegand data, the processor can stop the direct memory access, or the direct memory access control itself can stop. The specific method of stopping the direct memory access control itself is as follows:

[0174] During the Wiegand data transmission process, direct memory access will set the source address, destination address, total transmission length, whether to enable completion interrupt, etc. before it is turned on. Direct memory access automatically stops when the total transmission length is completed and generates a completion interrupt. Among them, the total transmission length can be calculated based on the length of the Wiegand data received by the receiving device. For example, assuming that the Wiegand protocol to be received supports Wiegand 58 at most, that is, the Wiegand data length is 58, then the total transmission length is: 58×(20ms)×1MB / 1000ms=1.16MB. Among them, 20ms is the maximum value of the bit interval time of Wiegand data. In practical applications, a larger value can be taken on this basis, and no specific limitation is made here.

[0175] In S9063, after the interrupt is triggered and the processor opens direct memory access, the processor periodically reads the data recorded in the memory in the most recent cycle as the third data, and then executes step S9064.

[0176] In S9064, in order to reduce the burden of the processor, improve the accuracy and reliability of Wiegand data reception, and ensure the integrity of Wiegand data, the processor can periodically check the data stored in the memory to determine whether the Wiegand data reception is complete. Specifically, if the third data read by the processor is the first combination data that appears repeatedly, it is determined that the Wiegand data reception has been completed. The period of the data recorded in the memory in the most recent period read by the processor is greater than the maximum bit interval time of the Wiegand data.

[0177] It can be understood that during the Wiegand data transmission process, the interval time between two bits in the same Wiegand transmission is fixed, that is, the bit interval time. If the data received within a time greater than the bit interval time is a Wiegand idle signal, it proves that the Wiegand data has been received.

[0178] After the Wiegand data reception is completed, step S907 is executed. If it is not completed yet, step S9063 is executed, that is, the Wiegand data is continued to be collected, and the processor periodically reads the data recorded in the memory in the most recent cycle.

[0179] In S907, before the interrupt is triggered, the two-wire serial peripheral interface does not sample the two input and output pins. Only after the interrupt is triggered, the two-wire serial peripheral interface will sample the two input and output pins, so before the interrupt is triggered, the Wiegand data transmitted through the two input and output pins cannot be collected. In addition, the two-wire serial peripheral interface does not have the function of directly writing Wiegand data into the memory, and can only write Wiegand data into the memory after enabling direct memory access. Therefore, before enabling direct memory access, even if the two-wire serial peripheral interface can collect Wiegand data, it cannot write the collected data into the memory, so there will be a situation where the first bit is not collected by direct memory access. And because the length of Wiegand data in different formats is also different, it is necessary to know the exact length of the received data when parsing in order to parse it according to the correct Wiegand format. In order to be compatible with different Wiegand formats, the flexibility and scalability of Wiegand data reception are improved, and the accuracy of Wiegand data processing is improved. After completing the Wiegand data reception, it can be determined whether the first bit is collected. Specifically, it can be achieved by determining whether the first data starts with the first combination data 0xFF (that is, invalid data):

[0180] If the first data does not start with the first combination data 0xFF, that is, the first data starts with the second combination data 0xAA or the third combination data 0x55, it proves that the first bit is collected. In this case, when the processor combines the first Wiegand data to obtain the second data, the first Wiegand data are arranged in sequence according to the order in the first data to obtain the second data. The order of the first Wiegand data in the second data is the same as the order of the first Wiegand data in the first data.

[0181] If the first data starts with the first combination data 0xFF, it proves that the first bit has not been collected. When the processor combines the first Wiegand data to obtain the second data, it arranges the first Wiegand data after the second Wiegand data in sequence according to the order in the first data to obtain the second data. This step is step S908.

[0182] By applying the above embodiment, the processor can accurately identify and record the input and output pins that receive the first level signal by real-time monitoring the level signal changes on the input and output pins, thereby quickly determining the target input and output pins, that is, the corresponding Wiegand data (0 or 1). This design effectively avoids data loss or misjudgment and ensures the integrity and accuracy of data collection. Furthermore, the processor can intelligently identify the starting combination mode of the first data and select the correct data processing method according to the mode, which not only ensures the correct combination of data, but also improves the speed and efficiency of data processing. This flexible data processing method enables the access control system to adapt to different data formats and transmission requirements, and improves the compatibility and scalability of the system.

[0183] In S909-S9014, the processor selects a corresponding Wiegand format to parse the second data according to the length of the second data.

[0184] Corresponding to the above-mentioned receiving device, the embodiment of the present application also provides a transmission system, see Fig.10 , the transmission system comprises a sending device 100, and the above-mentioned receiving device 101;

[0185] The transmitting device 100 includes a processor 1001, two input and output pins 1002, 1003 and a common ground pin 1004;

[0186] The receiving device 101 includes a processor 801, a two-wire serial peripheral device interface 802, two input and output pins 803, 804, a memory 805 and a common ground pin 806;

[0187] The processor 1001 of the sending device 100 is used to obtain the first message and encapsulate the first message into Wiegand data; send the Wiegand data to the receiving device 101 through the two input and output pins 1002 and 1003 of the sending device 100;

[0188] A two-wire serial peripheral device interface 802, used to periodically sample two input and output pins 803, 804 of the receiving device 101, and store the sampled data in a memory 805 via direct memory access;

[0189] The processor 801 of the receiving device 101 is configured to, in response to completing the reception of the Wiegand data, read the data stored in the memory 805 through direct memory access as the first data; separate the first data into a plurality of sub-data using the first combined data as a separator; respectively determine the first Wiegand data corresponding to each sub-data, and combine each first Wiegand data to obtain the second data; parse the second data according to a preset Wiegand protocol to obtain the first information;

[0190] Among them, the order of each first Wiegand data in the second data is the same as the order of the corresponding sub-data in the first data, the sub-data of the second combination data that appears repeatedly corresponds to Wiegand data 0, and the sub-data of the third combination data that appears repeatedly corresponds to Wiegand data 1; the first combination data, the second combination data and the third combination data are data obtained by sampling the two input and output pins 803, 804 of the receiving device 101 under different circumstances, and the first combination data is the case when the two input and output pins 803, 804 of the receiving device 101 receive the Wiegand idle signal, the second combination data is the case when the two input and output pins 803, 804 of the receiving device 101 receive the Wiegand data 0, and the third combination data is the case when the two input and output pins 803, 804 of the receiving device 101 receive the Wiegand data 1.

[0191] By applying the above embodiment, the transmission system obtains the first message through the sending device, and encapsulates the first message into Wiegand data and sends it to the receiving device. The receiving device receives the Wiegand data through the two-wire serial peripheral device interface, realizes high-speed sampling, significantly improves the data processing efficiency, and uses direct memory access technology to realize data storage, thereby greatly reducing the burden on the processor. More importantly, the reception and processing of Wiegand data can be realized without modifying the hardware device or adding external circuits, reducing the cost and complexity of the transmission system. In addition, the transmission system also has excellent compatibility, can receive and parse Wiegand data in various formats, and accurately extract information according to the Wiegand protocol, which greatly improves the flexibility and scalability of the transmission system.

[0192] For the detailed description of the steps executed by the above-mentioned processors and two-wire serial peripheral device interfaces, please refer to the above description of the steps executed by the processor and two-wire serial peripheral device interface in the receiving device, which will not be repeated here.

[0193] In a possible embodiment, the sending device may include a system-on-chip (ie, SOC) and the receiving device may include a microcontroller (ie, MCU). However, in actual applications, the receiving device also needs to process some complex services, such as network services, display, camera, etc.

[0194] Based on this, in order to enable the receiving device to easily cope with complex business scenarios, improve the resource utilization of the entire transmission system, and the efficiency and reliability of data transmission, in another possible embodiment, see Fig.11 The sending device may include a microcontroller (i.e., MCU), and the receiving device may include a system-on-chip (i.e., SOC). The microcontroller includes a processor 1001, two input and output pins 1002, 1003, and a common ground pin 1004. The system-on-chip includes a processor 801, a two-wire serial peripheral interface 802, two input and output pins 803, 804, a memory 805, and a common ground pin 806.

[0195] The transmission system provided in the embodiments of the present application can be applied to multiple scenarios, such as access control systems, parking management systems, elevator control systems, etc. The following only describes the application of the transmission system in the access control system as an example.

[0196] The present application provides a door access control system. Fig.12 , Fig.12 A schematic diagram of the structure of the access control system provided in the embodiment of the present application, including a card reader 120, a control device 121 and an access control device 122;

[0197] The card reader device 120 includes a processor 1201, two input and output pins 1202, 1203 and a common ground pin 1204;

[0198] The control device 121 includes a processor 1211 , a two-wire serial peripheral device interface 1212 , two input and output pins 1213 , 1214 , a memory 1215 and a common ground pin 1216 .

[0199] The following will explain the above access control system in detail in conjunction with the complete process of identity authentication in the access control system. Fig.13 , Fig.13 A flow chart of identity authentication of a door access control system provided in an embodiment of the present application, including step S130 executed by the card reader 120, step S131 executed by the control device 121, and step S132 executed by the door access control device 122;

[0200] Wherein, step S130 includes:

[0201] S1301, user swipes card;

[0202] S1302, card reading, that is, the processor 1201 of the card reading device 120 obtains the access card information of the access card that triggers the card reading operation in response to the card reading operation, and encapsulates the access card information into Wiegand data;

[0203] S1303, sending Wiegand data, that is, the processor 1201 of the card reader 120 sends the Wiegand data to the control device 121 through the two input and output pins 1202 and 1203 of the card reader.

[0204] Step S131 includes:

[0205] S1311, receiving Wiegand data, that is, the two-wire serial peripheral device interface 1212 of the control device 121 periodically samples the two input and output pins 1213 and 1214 of the control device 121, and stores the sampled data in the memory 1215 through direct memory access;

[0206] S1312, parsing Wiegand data, that is, the processor 1211 of the control device 121 reads data stored in the memory through direct memory access in response to completing the reception of the Wiegand data as the first data; separates the first data into a plurality of sub-data using the first combined data as a separator; respectively determines the first Wiegand data corresponding to each sub-data, and combines each first Wiegand data to obtain the second data; and parses the second data according to the preset Wiegand protocol to obtain the access card information;

[0207] S1313, verify whether the card information is passed, that is, the processor 1211 of the control device 121 authenticates the access card information, and if the authentication is passed, sends a pass instruction to the access control device 122. In order to provide users with timely feedback, avoid long waiting and uncertainty, and thus improve user experience, if the authentication is passed, the screen of the access control system can display the authentication success, that is, step S1314, if the authentication is not passed, the screen of the access control system can display the authentication failure, that is, step S1315;

[0208] Step S132 includes:

[0209] S1321, open the door, that is, when the authentication is passed, the access control device responds to the pass instruction and enters the pass-allowed state. For example, in the case where the access control device is a turnstile, the turnstile will open the door wings after responding to the pass instruction to allow the user to pass; in the case where the access control device is a revolving door, after responding to the pass instruction, the revolving door will automatically rotate at a corresponding speed according to the direction of user movement to allow the user to pass.

[0210] Among them, the order of each first Wiegand data in the second data is the same as the order of the corresponding sub-data in the first data, the sub-data of the second combination data that appears repeatedly corresponds to Wiegand data 0, and the sub-data of the third combination data that appears repeatedly corresponds to Wiegand data 1; the first combination data, the second combination data and the third combination data are data obtained by sampling two input and output pins of the control device under different circumstances, and the first combination data is when the two input and output pins of the control device receive a Wiegand idle signal, the second combination data is when the two input and output pins of the control device receive Wiegand data 0, and the third combination data is when the two input and output pins of the control device receive Wiegand data 1.

[0211] For the detailed description of the steps executed by the above-mentioned processors and two-wire serial peripheral device interfaces, please refer to the above description of the steps executed by the processor and two-wire serial peripheral device interface in the receiving device, which will not be repeated here.

[0212] In order to more clearly explain the identity authentication process in the access control system provided by this application, the following will take the access control card number as a 32-bit binary number (in Wiegand 34 format) as an example for explanation:

[0213] Assume that the user has an access card with the card number: 10101010 11110000 10101010 11110000 (for example only). After the user swipes the card, the card reader obtains the access card information and encapsulates the access card information into Wiegand data: 10101010 11110000 10101010 11110000 (in this example, the focus is on the transmission of Wiegand data, so for the sake of ease of description, the specific check digit calculation is not involved). The second combination data and the third combination data are used to represent the Wiegand data, and the Wiegand data is: 0x55 0xAA 0x55 0xAA 0x55 0xAA 0x55 0xAA 0x55 0x55 0x55 0x55 0x55 0x55 0xAA 0xAA 0xAA 0x55 0xAA 0x55 0xAA 0x55 0x55 0xAA 0x55 0x55 0xAA 0xAA 0xAA;

[0214] After obtaining the Wiegand data, the card reading device sends the Wiegand data to the control device. After receiving the Wiegand data, the control device stores the Wiegand data in a memory. The control device parses the Wiegand data, that is, the processor of the control device reads the data stored in the memory. Assume that the first data is 0x55 0xFF 0xAA 0xFF 0x55 0xFF 0xAA 0xFF 0x55 0xFF 0xAA 0xFF 0x55 0xFF 0x55 0xFF 0x55 0xFF 0x55 0xFF 0x55 0xFF 0x55 0xFF 0x55 0xFF 0xAA 0xFF 0xAA 0xFF 0x55 0xFF 0xAA 0xFF 0x55 0xFF 0x55 0xFF 0xAA 0xFF 0x55 0xFF 0x55 0xFF 0x550xFF 0x55 0xFF 0xAA 0xFF 0xAA 0xFF 0xAA 0xFF 0xAA 0xFF; the first data starts with the third combination data 0x55, and the first bit is collected, so the second data obtained by combination is: 0x55 0xAA 0x55 0xAA 0x55 0xAA 0x55 0xAA 0x55 0x55 0x55 0xAA 0xAA 0xAA 0xAA 0x55 0xAA 0x55 0xAA 0x55 0xAA 0x55 0xAA 0x55 0xAA 0x55 0xAA 0x55 0xAA 0x55 0xAA 0xAA 0xAA 0xAA, based on this, the access card number is 10101010 11110000 10101010 11110000, verify the access card number. If the authentication is successful, send a pass instruction to the access control device to allow the user to pass.

[0215] The access control system described above is applied. The access control system uses Wiegand data as the transmission format of the access control card information. The access control card information is encapsulated as Wiegand data through the processor of the card reader device and sent to the control device through the input and output pins. This data format has a high degree of security and stability, can ensure the accurate transmission of the access control card information, and effectively prevent information leakage and tampering. Secondly, the control device periodically samples the input and output pins through the two-wire serial peripheral device interface, and stores the sampled data in the memory through direct memory access. This sampling and storage method not only improves the efficiency and stability of data transmission, but also reduces the workload of the processor, so that the access control system can respond to the card reading operation more quickly. And without modifying the hardware device or adding external circuits, the access control system can receive and process Wiegand data, which reduces the cost and complexity of the access control system receiving and processing Wiegand data. Moreover, the access control system also has excellent compatibility, can receive and parse Wiegand data in various formats, and accurately extract information according to the Wiegand protocol, which greatly improves the flexibility and scalability of the access control system.

[0216] In a possible embodiment, the card reading device 120 may include a system-on-chip (ie, SOC), and the control device 121 may include a microcontroller (ie, MCU). However, in actual applications, the control device 121 also needs to process some complex businesses, such as network services, displays, cameras, etc.

[0217] Based on this, in order to enable the access control system to easily cope with complex business scenarios, improve the resource utilization of the entire access control system, and the efficiency and reliability of data transmission in the access control system, in another possible embodiment, the card reading device 120 may include a microcontroller (i.e., MCU), and the control device 121 may include a system-on-chip (i.e., SOC), the microcontroller includes a processor and two input and output pins, and the system-on-chip includes a processor, a two-wire serial peripheral interface, two input and output pins, and a memory.

[0218] In a possible embodiment, since the control device includes a system-on-chip (i.e., SOC), which itself has powerful processing capabilities, it can also be integrated into a card reading device. Based on this, the processor 1211 of the control device 121 is also used to respond to a card reading operation, obtain the access card information of the access card that triggers the card reading operation; and encapsulate the access card information into Wiegand data; and send the Wiegand data to other control devices through the two input and output pins of the control device.

[0219] By applying the above embodiments, the card reading function can be integrated into the control device based on the performance of the system-level chip, reducing the number of components of the access control system, improving the integration of the access control system, simplifying the structure and wiring of the access control system, and reducing the maintenance cost of the access control system.

[0220] Corresponding to the aforementioned receiving device, the embodiment of the present application also provides a receiving method, see Fig.14 , Fig.14 The flowchart of the receiving method provided in the embodiment of the present application includes:

[0221] S1401, periodically sampling two pins through a serial interface having two pins, and storing the sampled data in a memory through direct memory access;

[0222] S1402, in response to completing the reception of the Wiegand data, reading data stored in the memory through direct memory access as first data;

[0223] S1403, using the first combined data as a separator, separating the first data into a plurality of sub-data consisting of the second combined data and / or the third combined data;

[0224] S1404, respectively determining the first Wiegand data corresponding to each sub-data, and combining each first Wiegand data to obtain second data;

[0225] S1405, parsing the second data according to the preset Wiegand protocol to obtain the first information.

[0226] Among them, the order of each first Wiegand data in the second data is the same as the order of the corresponding sub-data in the first data, the first combination data is a combination of the first unit data and the second unit data, the first unit data is the data sampled by the first pin when the two pins receive the Wiegand idle signal, and the second unit data is the data sampled by the second pin when the two pins receive the Wiegand idle signal; the second combination data is a combination of the third unit data and the fourth unit data, the third unit data is the data sampled by the first pin when the two pins receive the Wiegand data 0, and the fourth unit data is the data sampled by the second pin when the two pins receive the Wiegand data 0; the third combination data is a combination of the fifth unit data and the sixth unit data, the fifth unit data is the data sampled by the first pin when the two pins receive the Wiegand data 1, and the sixth unit data is the data sampled by the second pin when the two pins receive the Wiegand data 1.

[0227] By applying the above embodiment, Wiegand data is received through a serial interface with two pins, high-speed sampling is achieved, data processing efficiency is significantly improved, and data storage is achieved using direct memory access technology, thereby greatly reducing the burden on the processor. More importantly, the reception and processing of Wiegand data can be achieved without modifying the hardware device or adding external circuits, reducing the cost and complexity of receiving and processing Wiegand data. In addition, the receiving device also has excellent compatibility, can receive and parse Wiegand data in various formats, and accurately extract information according to the Wiegand protocol, greatly improving the flexibility and extensibility of Wiegand data reception.

[0228] The above steps S1401 to S1405 are similar to the steps executed by the aforementioned receiving device. Please refer to the description of the steps executed by the aforementioned receiving device, and will not be repeated here.

[0229] Corresponding to the above receiving method, the embodiment of the present application also provides a receiving device, see Fig.15 , Fig.15 A schematic diagram of the structure of a receiving device provided in an embodiment of the present application includes:

[0230] A sampling module 1501, configured to periodically sample the two pins through the serial interface having the two pins, and store the sampled data in the memory through direct memory access;

[0231] A reading module 1502 is used for, in response to completing the reception of the Wiegand data, using the processor to read the data stored in the memory through direct memory access as the first data;

[0232] A separation module 1503, configured to use the first combined data as a separator and separate the first data into a plurality of sub-data consisting of the second combined data and / or the third combined data through the processor;

[0233] A combining module 1504, configured to determine the first Wiegand data corresponding to each sub-data through the processor, and combine the first Wiegand data to obtain second data;

[0234] The parsing module 1505 is used to parse the second data according to a preset Wiegand protocol through the processor to obtain the first information.

[0235] Among them, the order of each first Wiegand data in the second data is the same as the order of the corresponding sub-data in the first data, the first combination data is a combination of the first unit data and the second unit data, the first unit data is the data sampled by the first pin when the two pins receive the Wiegand idle signal, and the second unit data is the data sampled by the second pin when the two pins receive the Wiegand idle signal; the second combination data is a combination of the third unit data and the fourth unit data, the third unit data is the data sampled by the first pin when the two pins receive the Wiegand data 0, and the fourth unit data is the data sampled by the second pin when the two pins receive the Wiegand data 0; the third combination data is a combination of the fifth unit data and the sixth unit data, the fifth unit data is the data sampled by the first pin when the two pins receive the Wiegand data 1, and the sixth unit data is the data sampled by the second pin when the two pins receive the Wiegand data 1.

[0236] By applying the above embodiment, Wiegand data is received through a serial interface with two pins, high-speed sampling is achieved, data processing efficiency is significantly improved, and data storage is achieved using direct memory access technology, thereby greatly reducing the burden on the processor. More importantly, the reception and processing of Wiegand data can be achieved without modifying the hardware device or adding external circuits, reducing the cost and complexity of receiving and processing Wiegand data. In addition, the receiving device also has excellent compatibility, can receive and parse Wiegand data in various formats, and accurately extract information according to the Wiegand protocol, greatly improving the flexibility and extensibility of Wiegand data reception.

[0237] In a possible implementation, the device further includes:

[0238] An acquisition module, used for periodically sampling the two pins and parsing the sampled data through a preset serial protocol to obtain second information until a first level signal is sampled from any of the pins;

[0239] An enabling module, configured to enable the direct memory access in response to sampling a first level signal from any of the pins, and to send a collection instruction to the serial interface having two pins;

[0240] A storage module, configured to periodically sample the two pins through the serial interface having two pins in response to the acquisition instruction, and store the sampled data in the memory through the direct memory access;

[0241] The first level signal is a level signal other than the second level signal, the second level signal is a level signal on the two pins when a Wiegand idle signal is received, and the total transmission length of the direct memory access is configured to be greater than a preset length threshold.

[0242] In a possible implementation, the device further includes:

[0243] A holding module, used for keeping the level of a chip selection pin at a first level, wherein the chip selection pin is arranged on the serial interface having two pins;

[0244] The enabling module comprises:

[0245] Enable a first submodule, used for adjusting the level of the chip selection pin to a second level;

[0246] The first level is one of a high level and a low level, and the second level is the other of a high level and a low level.

[0247] In a possible implementation, the device further includes:

[0248] a recording module, configured to, in response to sampling the first level signal from any of the pins, record the pin from which the first level signal is sampled in the memory as a target pin;

[0249] a reading module, configured to read a recorded target pin if the first data starts with the first combined data, and determine a second Wiegand data corresponding to the target pin;

[0250] The combined module comprises:

[0251] A combination first submodule, for arranging the first Wiegand data corresponding to each sub-data after the second Wiegand data in sequence according to the order in the first data if the first data starts with the first combination data, to obtain second data;

[0252] A second combination submodule is used for arranging the first Wiegand data corresponding to each sub-data in sequence according to the order in the first data to obtain second data if the first data does not start with the first combination data;

[0253] Among them, the first pin corresponds to Wiegand data 0, the second pin corresponds to Wiegand data 1, the first pin is the pin at the first level signal when Wiegand data 0 is received, and the second pin is the pin at the first level signal when Wiegand data 1 is received.

[0254] In a possible implementation, the device further includes:

[0255] A confirmation module, used for periodically reading the data recorded in the memory in the most recent period as the third data; if the third data includes the first combination data that appears continuously, it is determined that the reception of the Wiegand data has been completed;

[0256] The period for reading the data recorded in the memory in the most recent period is greater than the maximum bit interval time of the Wiegand data.

[0257] In the technical solution of this application, the operations involved in obtaining, storing, using, processing, transmitting, providing and disclosing user personal information are all carried out with the user's authorization.

Claims

1. A door access control system, characterized in that: The access control system includes: a card reading device, a control device and an access control device; The card reading device includes a processor and two pins; The control device comprises a processor, a serial interface having two pins, the two pins and a memory; The processor of the card reader device is used to obtain access card information of the access card that triggers the card reading operation in response to the card reading operation; and encapsulate the access card information into Wiegand data; and send the Wiegand data to the control device through the two pins of the card reader device; The serial interface having two pins is used to periodically sample the two pins of the control device and store the sampled data in the memory through direct memory access; The processor of the control device is used for reading the data stored in the memory by direct memory access in response to completing the reception of the Wiegand data as the first data; using the first combination data as a separator, separating the first data into a plurality of sub-data consisting of the second combination data and / or the third combination data; respectively determining the first Wiegand data corresponding to each sub-data, and combining each of the first Wiegand data to obtain the second data; parsing the second data according to a preset Wiegand protocol to obtain the access card information; authenticating the access card information, and if the authentication is successful, sending a pass instruction to the access control device; The access control device is used to enter a passage-allowing state in response to the passage instruction; The order of each first Wiegand data in the second data is the same as the order of the corresponding sub-data in the first data, the first combination data is a combination of the first unit data and the second unit data, the first unit data is the data sampled by the first pin when the two pins receive the Wiegand idle signal, and the second unit data is the data sampled by the second pin when the two pins receive the Wiegand idle signal; The second combined data is a combination of the third unit data and the fourth unit data, the third unit data is data sampled by the first pin when the two pins receive the Wiegand data 0, and the fourth unit data is data sampled by the second pin when the two pins receive the Wiegand data 0; The third combination data is a combination of the fifth unit data and the sixth unit data, the fifth unit data is the data obtained by sampling the first pin when the two pins receive the Wiegand data 1, and the sixth unit data is the data obtained by sampling the second pin when the two pins receive the Wiegand data 1.

2. The access control system according to claim 1, characterized in that: The card reading device is a microcontroller, and the microcontroller includes a processor and two pins; The control device includes a system-on-chip, which includes a processor, a serial interface with two pins, the two pins, and a memory.

3. The access control system according to claim 1, characterized in that: The access control system includes a plurality of control devices. The processor of the control device is also used to obtain access card information of the access card that triggers the card reading operation in response to the card reading operation; and encapsulate the access card information into Wiegand data; and send the Wiegand data to other control devices through the two pins of the control device.

4. A receiving device, characterized in that: The receiving device includes a processor, a serial interface having two pins, two pins, and a memory; The serial interface having two pins is used to periodically sample the two pins and store the sampled data in the memory through direct memory access; The processor is configured to read the data stored in the memory by direct memory access as the first data in response to completing the reception of the Wiegand data; Using the first combined data as a separator, the first data is separated into a plurality of sub-data consisting of the second combined data and / or the third combined data; Determine the first Wiegand data corresponding to each sub-data respectively, and combine the first Wiegand data to obtain second data; parse the second data according to a preset Wiegand protocol to obtain first information; The order of each first Wiegand data in the second data is the same as the order of the corresponding sub-data in the first data, the first combination data is a combination of the first unit data and the second unit data, the first unit data is the data sampled by the first pin when the two pins receive the Wiegand idle signal, and the second unit data is the data sampled by the second pin when the two pins receive the Wiegand idle signal; The second combined data is a combination of the third unit data and the fourth unit data, the third unit data is data sampled by the first pin when the two pins receive the Wiegand data 0, and the fourth unit data is data sampled by the second pin when the two pins receive the Wiegand data 0; The third combination data is a combination of the fifth unit data and the sixth unit data, the fifth unit data is the data obtained by sampling the first pin when the two pins receive the Wiegand data 1, and the sixth unit data is the data obtained by sampling the second pin when the two pins receive the Wiegand data 1.

5. The receiving device according to claim 4, characterized in that The processor is further used to periodically sample the two pins and parse the sampled data through a preset serial protocol to obtain second information until a first level signal is sampled from any of the pins; The processor is further configured to enable the direct memory access in response to sampling a first level signal from any of the pins, and send a collection instruction to the serial interface having two pins; The serial interface having two pins is specifically used to periodically sample the two pins in response to the acquisition instruction, and store the sampled data in the memory through the direct memory access; The first level signal is a level signal other than the second level signal, the second level signal is a level signal on the two pins when a Wiegand idle signal is received, and the total transmission length of the direct memory access is configured to be greater than a preset length threshold.

6. The receiving device according to claim 5, characterized in that The two-pin serial interface includes a chip select pin; The processor is further configured to maintain the level of the chip select pin at a first level; The processor sends a collection instruction to the serial interface having two pins, including: The processor adjusts the level of the chip selection pin to a second level; The first level is one of a high level and a low level, and the second level is the other of a high level and a low level.

7. The receiving device according to claim 5, characterized in that The processor is further configured to, in response to sampling the first level signal from any of the pins, record the pin from which the first level signal is sampled in the memory as a target pin; The processor is further configured to read a recorded target pin if the first data starts with the first combination data, and determine a second Wiegand data corresponding to the target pin; The processor combines the first Wiegand data to obtain second data, including: If the first data starts with the first combined data, the first Wiegand data corresponding to each sub-data is sequentially arranged after the second Wiegand data according to the order in the first data to obtain the second data; If the first data does not start with the first combined data, the first Wiegand data corresponding to each sub-data is arranged in sequence according to the order in the first data to obtain the second data; Among them, the first pin corresponds to Wiegand data 0, the second pin corresponds to Wiegand data 1, the first pin is the pin at the first level signal when Wiegand data 0 is received, and the second pin is the pin at the first level signal when Wiegand data 1 is received.

8. The receiving device according to claim 4, characterized in that The processor is further used to periodically read the data recorded in the memory in a most recent period as the third data; if the third data includes the first combination data that appears continuously, it is determined that the reception of the Wiegand data has been completed; The period in which the processor reads the data recorded in the memory in the most recent period is greater than the maximum bit interval time of the Wiegand data.

9. A receiving method, characterized in that: The method comprises: The two pins are periodically sampled via a serial interface having two pins, and the sampled data are stored in a memory via direct memory access; In response to completing the reception of the Wiegand data, reading the data stored in the memory through direct memory access as the first data; Using the first combined data as a separator, the first data is separated into a plurality of sub-data consisting of the second combined data and / or the third combined data; Determine first Wiegand data corresponding to each sub-data respectively, and combine the first Wiegand data to obtain second data; The second data is parsed according to a preset Wiegand protocol to obtain the first information; wherein the order of each first Wiegand data in the second data is the same as the order of the corresponding sub-data in the first data, the first combination data is a combination of the first unit data and the second unit data, the first unit data is the data sampled by the first pin when the two pins receive the Wiegand idle signal, and the second unit data is the data sampled by the second pin when the two pins receive the Wiegand idle signal; the second combination data is a combination of the third unit data and the fourth unit data, the third unit data is the data sampled by the first pin when the two pins receive the Wiegand data 0, and the fourth unit data is the data sampled by the second pin when the two pins receive the Wiegand data 0; the third combination data is a combination of the fifth unit data and the sixth unit data, the fifth unit data is the data sampled by the first pin when the two pins receive the Wiegand data 1, and the sixth unit data is the data sampled by the second pin when the two pins receive the Wiegand data 1.

10. The method according to claim 9, characterized in that The method further comprises: The two pins are periodically sampled, and the sampled data are parsed through a preset serial protocol to obtain second information, until a first level signal is sampled from any of the pins; In response to sampling a first level signal from any of the pins, enabling the direct memory access and sending a collection instruction to the serial interface having two pins; In response to the acquisition instruction, periodically sampling the two pins through the serial interface having two pins, and storing the sampled data in the memory through the direct memory access; The first level signal is a level signal other than the second level signal, the second level signal is a level signal on the two pins when a Wiegand idle signal is received, and the total transmission length of the direct memory access is configured to be greater than a preset length threshold.

11. The method according to claim 10, characterized in that The method further comprises: Maintaining the level of a chip select pin at a first level, wherein the chip select pin is provided on the serial interface having two pins; The sending of the acquisition instruction to the serial interface having two pins comprises: Adjusting the level of the chip select pin to a second level; The first level is one of a high level and a low level, and the second level is the other of a high level and a low level.

12. The method according to claim 10, characterized in that The method further comprises: In response to sampling the first level signal from any of the pins, recording the pin where the first level signal is sampled in the memory as a target pin; If the first data starts with the first combination data, reading the recorded target pin and determining the second Wiegand data corresponding to the target pin; The combining the first Wiegand data to obtain second data comprises: If the first data starts with the first combined data, the first Wiegand data corresponding to each sub-data is sequentially arranged after the second Wiegand data according to the order in the first data to obtain the second data; If the first data does not start with the first combined data, the first Wiegand data corresponding to each sub-data is arranged in sequence according to the order in the first data to obtain the second data; Among them, the first pin corresponds to Wiegand data 0, the second pin corresponds to Wiegand data 1, the first pin is the pin at the first level signal when Wiegand data 0 is received, and the second pin is the pin at the first level signal when Wiegand data 1 is received.

13. The method according to claim 9, characterized in that The method further comprises: Periodically reading the data recorded in the memory in the most recent period as the third data; if the third data includes the first combination data that appears continuously, determining that the reception of the Wiegand data has been completed; The period for reading the data recorded in the memory in the most recent period is greater than the maximum bit interval time of the Wiegand data.

14. A receiving device, characterized in that: The device comprises: A sampling module, used for periodically sampling two pins through a serial interface having two pins, and storing the sampled data in a memory through direct memory access; a reading module, configured to, in response to completing the reception of the Wiegand data, use a processor to read the data stored in the memory through direct memory access as the first data; a separation module, configured to use the first combined data as a separator and separate the first data into a plurality of sub-data consisting of the second combined data and / or the third combined data through the processor; A combining module, configured to determine the first Wiegand data corresponding to each sub-data through the processor, and combine the first Wiegand data to obtain the second data; The parsing module is used to parse the second data according to the preset Wiegand protocol through the processor to obtain the first information; wherein the order of each first Wiegand data in the second data is the same as the order of the corresponding sub-data in the first data, the first combination data is a combination of the first unit data and the second unit data, the first unit data is the data sampled by the first pin when the two pins receive the Wiegand idle signal, and the second unit data is the data sampled by the second pin when the two pins receive the Wiegand idle signal; the second combination data is a combination of the third unit data and the fourth unit data, the third unit data is the data sampled by the first pin when the two pins receive the Wiegand data 0, and the fourth unit data is the data sampled by the second pin when the two pins receive the Wiegand data 0; the third combination data is a combination of the fifth unit data and the sixth unit data, the fifth unit data is the data sampled by the first pin when the two pins receive the Wiegand data 1, and the sixth unit data is the data sampled by the second pin when the two pins receive the Wiegand data 1.

15. A transmission system, characterized in that: The transmission system comprises: a sending device and a receiving device; The sending device includes a processor and two pins; The receiving device includes a processor, a serial interface having two pins, the two pins, and a memory; The processor of the sending device is used to obtain a first message and encapsulate the first message into Wiegand data; and send the Wiegand data to the receiving device through the two pins of the sending device; The serial interface having two pins is used to periodically sample the two pins of the receiving device and store the sampled data in the memory through direct memory access; The processor of the receiving device is used for, in response to completing the reception of the Wiegand data, reading the data stored in the memory through direct memory access as the first data; using the first combined data as a separator, separating the first data into a plurality of sub-data consisting of the second combined data and / or the third combined data; respectively determining the first Wiegand data corresponding to each sub-data, and combining each of the first Wiegand data to obtain the second data; parsing the second data according to a preset Wiegand protocol to obtain the first information; Among them, the order of each first Wiegand data in the second data is the same as the order of the corresponding sub-data in the first data, the first combination data is a combination of the first unit data and the second unit data, the first unit data is the data sampled by the first pin when the two pins receive the Wiegand idle signal, and the second unit data is the data sampled by the second pin when the two pins receive the Wiegand idle signal; the second combination data is a combination of the third unit data and the fourth unit data, the third unit data is the data sampled by the first pin when the two pins receive the Wiegand data 0, and the fourth unit data is the data sampled by the second pin when the two pins receive the Wiegand data 0; the third combination data is a combination of the fifth unit data and the sixth unit data, the fifth unit data is the data sampled by the first pin when the two pins receive the Wiegand data 1, and the sixth unit data is the data sampled by the second pin when the two pins receive the Wiegand data 1.

16. The system according to claim 15, characterized in that The sending device includes a microcontroller, and the microcontroller includes a processor and two pins; The receiving device includes a system-on-chip, which includes a processor, a serial interface with two pins, the two pins, and a memory.