Device and method for connecting face-scanning payment device and cash register device
By designing a device that connects the face-scanning payment device and the cash register device, the MCU system circuit and the USB interface circuit are used to achieve full automatic linkage, which solves the problem of low efficiency of the existing face-scanning payment method and improves the cash register efficiency and shopping experience.
Patent Information
- Application Number
- CN202011026841.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-25
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2040-09-25
AI Technical Summary
The existing face-scan payment method is inefficient and requires manual participation in the linkage of the two devices, which leads to labor-intensive, high workload and low efficiency. Consumers need to queue up to wait for payment, which has a poor experience.
Design a device that connects face-scanning payment equipment and cash register equipment, adopts MCU system circuit, USB interface circuit and expansion circuit, and realizes data transmission and key code value conversion through serial port and HID circuit, realizing full automatic linkage between face-scanning payment equipment and cash register equipment.
It realizes the automatic linkage between face-scanning payment equipment and cash register equipment, without personnel participation, saves human resources, improves merchant cash register efficiency, reduces consumer waiting time, and improves shopping experience.
Smart Images

Figure CN112150741B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of contactless payment, and in particular relates to a device and method for connecting a face-swiping payment device and a cash register device. Background Art
[0002] With the rise of face-scanning payment, merchants have joined the face-scanning payment model one after another. However, the configured face-scanning payment devices and the merchants' existing cash register devices cannot be automatically linked, and manual participation is required in the linkage of the two devices. First, the goods are scanned and settled through the cash register system, and then the settlement amount is manually entered into the face-scanning payment device for face-scanning payment. After the payment is successful, the cash register system keyboard is manually operated again to confirm the success of the payment. This method consumes manpower, has a large workload, and is inefficient. Consumers need to queue up to wait for payment, which has a high time cost for customers and will bring consumers a poor shopping experience. Summary of the invention
[0003] In view of the above problems, the purpose of the present invention is to provide a device and method for connecting a face-scanning payment device and a cash register device, aiming to solve the technical problems of low efficiency and poor experience of existing face-scanning payment methods.
[0004] The present invention adopts the following technical solution:
[0005] On the one hand, the device for connecting the face-scanning payment device and the cash register device includes an MCU system circuit and a first USB interface circuit and a second USB interface circuit, wherein the first USB interface circuit is used to connect the face-scanning payment device, and the second USB interface circuit is used to connect the cash register device, a first USB-to-serial port circuit is connected between the first USB interface circuit and the MCU system circuit, and the second USB interface circuit is connected to a USB expansion circuit, and the USB expansion circuit is respectively connected to a second USB-to-serial port circuit and a serial port-to-HID circuit through two USB interfaces, and the second USB-to-serial port circuit and the serial port-to-HID circuit are both connected to the MCU system circuit.
[0006] Furthermore, the MCU system circuit is connected to the first USB-to-serial port circuit, the second USB-to-serial port circuit, and the serial port-to-HID circuit via a UART interface.
[0007] Furthermore, the first USB interface circuit is connected to the first USB-to-serial port circuit via a USB interface, and the second USB interface circuit is connected to the USB expansion circuit via a USB interface.
[0008] Furthermore, the device also includes a power management circuit for supplying power to the device.
[0009] On the other hand, the method for connecting the face-scanning payment device and the cash register device comprises the following steps:
[0010] Step S1: When the second USB interface circuit receives payment data from the cash register device, the payment data is sent to the MCU system circuit through the USB expansion circuit and the second USB to serial port circuit;
[0011] Step S2, the MCU system circuit saves the payment data, calculates the payment data length and characteristic value, and calculates the data length check value and data checksum value after framing, and frames the characteristic value, data length check value, data checksum value and the payment data to obtain framed data;
[0012] Step S3, sending the framed data to the face-scanning payment device through the first USB serial port circuit and the first USB interface circuit;
[0013] Step S4: When the first USB interface circuit receives payment success information from the face-scanning payment device, the payment success information is sent to the MCU system circuit through the first USB serial port circuit;
[0014] Step S5, the MCU system circuit intercepts the valid communication data in the payment success information through the characteristic quantity, determines the characteristics of the valid communication data, and then performs a table lookup operation on the valid communication data, and obtains the HID key code value that the cash register device can recognize after the operation;
[0015] Step S6: Send the HID key code value to the cash register device through the serial port to HID circuit, the USB expansion circuit, and the second USB interface circuit.
[0016] The beneficial effects of the present invention are as follows: the present invention provides a device and method for connecting a face-scanning payment device and a cash register device, the device intercepts the settlement amount payment data of the cash register system through the second USB interface circuit, the MCU system circuit converts the settlement amount payment data and sends it to the face-scanning payment device through the first USB interface circuit, the face-scanning payment device automatically identifies and starts the face-scanning payment, after the customer completes the face-scanning payment, the face-scanning payment device sends the payment success information to the device through the first USB interface circuit, the MCU system circuit converts the payment success information into the corresponding key code value and transmits it to the cash register system through the serial port to HID circuit and the second USB interface circuit, and the cash register system automatically confirms the cash register success; using the device to connect the face-scanning payment device to the cash register device can realize the fully automatic linkage between the face-scanning payment device and the cash register device, without the need for personnel participation, which can save human resources, and can improve the cash register efficiency of merchants, avoid consumers waiting in line for a long time, and bring consumers a better shopping experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic diagram of a device for connecting a face-scanning payment device and a cash register device provided in an embodiment of the present invention.
[0018] Figure 2 It is a flow chart of a method for connecting a face-scanning payment device and a cash register device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0020] In order to illustrate the technical solution of the present invention, a specific embodiment is provided below for illustration.
[0021] Figure 1 The principle of the device for connecting a face-scanning payment device and a cash register device provided in an embodiment of the present invention is shown. For the sake of convenience, only the parts related to the embodiment of the present invention are shown.
[0022] like Figure 1 As shown, the device for connecting the face-scanning payment device and the cash register device provided in this embodiment includes an MCU system circuit 1 and a first USB interface circuit 2 and a second USB interface circuit 3, wherein the first USB interface circuit 2 is used to connect the face-scanning payment device, and the second USB interface circuit 3 is used to connect the cash register device, and a first USB to serial port circuit 4 is connected between the first USB interface circuit 2 and the MCU system circuit 1, and the second USB interface circuit 3 is connected to a USB expansion circuit 5, and the USB expansion circuit 5 is respectively connected to a second USB to serial port circuit 6 and a serial port to HID circuit 7 through two USB interfaces, and the second USB to serial port circuit 6 and the serial port to HID (Human Interface Device) circuit 7 are both connected to the MCU system circuit 1.
[0023] The MCU system circuit 1 is connected to the first USB-to-serial port circuit 4 , the second USB-to-serial port circuit 6 , and the serial port-to-HID circuit 7 via a UART (Universal Asynchronous Receiver / Transmitter) interface.
[0024] The first USB interface circuit 2 is connected to the first USB-to-serial port circuit 4 via a USB interface, and the second USB interface circuit 3 is connected to the USB expansion circuit 5 via a USB interface.
[0025] The device further comprises a power management circuit 8 for powering the device.
[0026] When this device is working specifically, it first obtains payment data from the cash register device through the second USB interface circuit, and then sends the data to the MCU system circuit through the USB expansion circuit and the second USB to serial port circuit. The MCU system circuit processes the data and sends it to the face-scanning payment device through the first USB to serial port circuit and the first USB interface circuit. The face-scanning payment device starts the face-scanning payment after receiving the data. After the payment is successful, the payment success information is sent to the MCU system circuit through the first USB interface circuit and the first USB to serial port circuit. The MCU system circuit converts the payment success information into a HID key code value that the cash register device can recognize, and then sends it to the cash register device through the serial port to HID circuit, the USB expansion circuit and the second USB interface circuit. After the cash register device receives the correct HID key code value, it confirms that the payment is successful, and the cash register process is successfully completed.
[0027] Specifically, this embodiment also provides a method for connecting a face-scanning payment device and a cash register device, such as Figure 2 As shown, the method comprises the following steps:
[0028] Step S1, payment data receiving step: When the second USB interface circuit receives payment data from the cash register device, the payment data is sent to the MCU system circuit through the USB expansion circuit and the second USB to serial port circuit.
[0029] When in use, the second USB interface circuit of the device is connected to the cash register device, and the first USB interface circuit is connected to the face-scanning payment device. After the connection is completed, the device is automatically powered on, and the power management circuit is used to power each part. The serial port connecting the MCU system circuit and the peripheral circuit is started, and the serial port interrupt is monitored to see if it is triggered; that is, Figure 1 The serial ports UART1 and UART2 shown in the figure monitor interrupt triggering. When the serial port receives data input, the serial port interrupt starts to receive data.
[0030] Step S2, framing step: The MCU system circuit saves the payment data, calculates the payment data length and characteristic value, and calculates the data length check value and data checksum value after framing, and frames the characteristic value, data length check value, data checksum value and the payment data to obtain framed data.
[0031] The framed data is used to be sent to the face-scanning payment device through the serial port UART2. The framed data is data that complies with the format requirements of the face-scanning payment device and can be recognized. As a specific example, a framed data has 9 parts, as shown in the following table:
[0032]
[0033] The frame header is: DF 20 19 01 00 00 00;
[0034] Data characteristic value XX1: the length of all data from the first byte after XX1 to the first byte before XX3;
[0035] Fixed value 1: 20 64 2A;
[0036] Data length check value XX2: value of XX1-0x04;
[0037] Fixed value 2: 7B 22 74 61 72 67 65 74 22 3A 22 69 78 22 2C 22 63 6F 6E 7465 6E 74 22 3A 7B 22 52 53 32 33 32 22 3A 22;
[0038] Serial port data (i.e. payment data) XX: data received by serial port UART1;
[0039] Fixed value 3: 22 7D 7D;
[0040] Frame data Checksum value (i.e. data checksum value) XX3: sum and modulus of all data;
[0041] Fixed value 4: FD 91 02.
[0042] Step S3, data sending step. The framed data is sent to the face-scanning payment device through the first USB serial port circuit and the first USB interface circuit. The face-scanning payment device starts the face-scanning payment after receiving the framed data.
[0043] Step S4, payment success information receiving step. When the first USB interface circuit receives the payment success information from the face-scanning payment device, the payment success information is sent to the MCU system circuit through the first USB serial port circuit. After the face-scanning payment device pays successfully, the payment success information is sent to the first USB interface circuit and finally to the MCU system circuit.
[0044] Step S5, key code value conversion step: The MCU system circuit intercepts the valid communication data in the payment success information through the characteristic quantity, determines the characteristics of the valid communication data, and then performs a table lookup operation on the valid communication data to obtain the HID key code value that the cash register device can recognize.
[0045] The characteristic quantity is characteristic data used to find valid communication data. For example, in this embodiment, the serial port data characteristic quantity of the payment success information is: 52 53 32 33 32. When the serial port UART2 receives the data characteristic quantity 52 53 32 33 32, the fourth data is counted as the start bit of valid communication data. The valid communication data is two characters. The first character is used to determine the communication data characteristic, that is, whether the valid data is a single key value or a combination key value. The second character is an ordinary key value. Finally, the HID key code value that can be recognized by the cash register device can be obtained by looking up the table.
[0046] Step S6, key code value sending step. The HID key code value is sent to the cash register device through the serial port to HID circuit, the USB expansion circuit, and the second USB interface circuit. After receiving the correct HID key code value, the cash register device automatically confirms that the payment is successful, and the cash register process is successfully completed.
[0047] In summary, the device of the present invention can realize the fully automatic linkage between the face-swiping payment device and the cash register device, without the need for human participation, which can save human resources, and can improve the cash register efficiency of the merchant, avoid consumers waiting in line for a long time, and bring consumers a better shopping experience.
[0048] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A device for connecting a face-scanning payment device and a cash register device, characterized in that: The device includes an MCU system circuit and a first USB interface circuit and a second USB interface circuit, wherein the first USB interface circuit is used to connect a face-scanning payment device, and the second USB interface circuit is used to connect a cash register device, a first USB-to-serial port circuit is connected between the first USB interface circuit and the MCU system circuit, and the second USB interface circuit is connected to a USB expansion circuit, the USB expansion circuit is respectively connected to a second USB-to-serial port circuit and a serial port-to-HID circuit through two USB interfaces, and the second USB-to-serial port circuit and the serial port-to-HID circuit are both connected to the MCU system circuit; the MCU system circuit is connected to the first USB-to-serial port circuit, the second USB-to-serial port circuit, and the serial port-to-HID circuit through a UART interface; the first USB interface circuit is connected to the first USB-to-serial port circuit through a USB interface, and the second USB interface circuit is connected to the USB expansion circuit through a USB interface; The working method of the device comprises the following steps: Step S1: When the second USB interface circuit receives payment data from the cash register device, the payment data is sent to the MCU system circuit through the USB expansion circuit and the second USB to serial port circuit; Step S2, the MCU system circuit saves the payment data, calculates the payment data length and characteristic value, and calculates the data length check value and data checksum value after framing, and frames the characteristic value, data length check value, data checksum value and the payment data to obtain framed data; Step S3, sending the framed data to the face-scanning payment device through the first USB serial port circuit and the first USB interface circuit; Step S4: When the first USB interface circuit receives payment success information from the face-scanning payment device, the payment success information is sent to the MCU system circuit through the first USB serial port circuit; Step S5, the MCU system circuit intercepts the valid communication data in the payment success information through the characteristic quantity, determines the characteristics of the valid communication data, and then performs a table lookup operation on the valid communication data, and obtains the HID key code value that the cash register device can recognize after the operation; Step S6, sending the HID key code value to the cash register device through the serial port to HID circuit, the USB expansion circuit, and the second USB interface circuit; The characteristic quantity is used to find the characteristic data of valid communication data. The valid communication data is two characters. The first character is used to determine the characteristics of the communication data, that is, whether the valid data is a single key value or a combination key value. The second character is an ordinary key value. Finally, the HID key code value that the cash register device can recognize can be obtained by looking up the table.
2. The device for connecting a face-scanning payment device and a cash register device as claimed in claim 1, characterized in that: The device also includes a power management circuit for powering the device.
Citation Information
Patent Citations
Interface conversion equipment and method communicating with computing electronic payment secret code safety device
CN101231725A
Payment method, device and system
CN110610364A
HID data line and data conversion system
CN210350325U
Device for connecting face-brushing payment equipment with cashier equipment
CN212341995U