Data transmission method, device, system, computer device and computer program

The communication adapter facilitates secure data transmission between devices by authenticating and decrypting data using a work key, ensuring compatibility and efficiency without software adaptation, addressing security and versatility issues in wireless data transmission.

JP7552999B2Active Publication Date: 2024-09-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023519198
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-11-20
Filing Date
2021-10-12
Publication Date
2024-09-18
Estimated Expiration
2041-10-12

AI Technical Summary

Technical Problem

Existing data transmission methods between two devices using wireless communication, such as Bluetooth, face challenges in ensuring secure data transmission without the need for software adaptation on both devices, leading to potential security vulnerabilities and reduced versatility.

Method used

A communication adapter performs two-way authentication with a first interaction device, decrypts encrypted interaction data using a work key derived from an authentication key, and transmits the decoded data to a second interaction device via a communication protocol natively compatible with the device node, eliminating the need for software adaptation on both devices.

Benefits of technology

Ensures secure data transmission by avoiding encryption and decryption processes on individual devices, enhances versatility, and enables plug-and-play compatibility without additional software installation, thereby improving operational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007552999000004
    Figure 0007552999000004
  • Figure 0007552999000009
    Figure 0007552999000009
  • Figure 0007552999000010
    Figure 0007552999000010
Patent Text Reader

Abstract

The present application relates to a data transmission method, an apparatus, a system, a computer device, and a storage medium. The data transmission method includes the steps of: performing two-way authentication with a first interaction device (S202); receiving encrypted interaction data obtained by encrypting the interaction data based on a work key transmitted from the first interaction device after the two-way authentication is completed (S204), where the work key is obtained by mapping an authentication key used during the two-way authentication by the first interaction device (S204); decrypting the encrypted interaction data based on the work key obtained by mapping the authentication key in a communication adapter (S206); and transmitting the decrypted interaction data to the second interaction device by a simulated device node recognizable by the second interaction device based on a communication protocol natively adapted to the device node of the second interaction device (S208).
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application claims priority to a Chinese patent application filed with the State Intellectual Property Office of the People's Republic of China on November 20, 2020, bearing application number 202011308606.3 and titled "Data Transmission Method, Apparatus, System, Computer Equipment, and Storage Medium," the entire contents of which are incorporated herein by reference.

[0002] The present application relates to the technical field of wireless communication, and in particular to a data transmission method, apparatus, computer device and storage medium. [Background technology]

[0003] In some specific application scenarios, there are two different devices that transmit data, and these two different devices transmit data wirelessly, and in the process of transmitting data wirelessly, the communication link is usually encrypted to ensure the secure transmission of data. However, the adoption of communication link encryption during data transmission may not effectively guarantee the security of data, and the processes of data encryption and decryption are respectively performed in two different devices, which requires software adaptation in the two different devices, and when transmitting data in Bluetooth, the Bluetooth software needs to be adapted, which reduces the versatility of the software, so that the interaction effect between the devices cannot be guaranteed while ensuring the secure transmission of data. Summary of the Invention [Problem to be solved by the invention]

[0004] According to various embodiments of the present application, a data transmission method, apparatus, system, computer device, and storage medium are provided. [Means for solving the problem]

[0005] A data transmission method implemented by a communications adapter, the method comprising: performing two-way authentication with a first interaction device; receiving encrypted interaction data obtained by encrypting interaction data based on a work key transmitted from the first interaction device when the two-way authentication is completed, the work key being obtained by mapping an authentication key used during the two-way authentication by the first interaction device; decrypting the encrypted interaction data based on a work key obtained by mapping the authentication key in the communication adapter; and transmitting the decoded interaction data to the second interaction device by a simulated device node recognizable by the second interaction device based on a communication protocol of the second interaction device natively adapted to the device node.

[0006] A data transmission device, comprising: an authentication module for performing two-way authentication with the first interaction device; a receiving module for receiving encrypted interaction data obtained by encrypting the interaction data based on a work key transmitted from the first interaction device when the two-way authentication is completed, the work key being obtained by mapping an authentication key used during the two-way authentication by the first interaction device; a decryption module for decrypting the encrypted interaction data based on a work key obtained by mapping the authentication key in a communication adapter; and a transmission module for transmitting the decoded interaction data to the second interaction device by a simulated device node recognizable by the second interaction device based on a communication protocol of the second interaction device natively adapted to the device node.

[0007] A data transmission system, the system including: a first interaction device, a second interaction device, and a communication adapter wirelessly connected to the first interaction device and electrically connected to the second interaction device; The communication adapter authenticates the first interaction device; the first interaction device, when the communication adapter completes authentication, authenticates the communication adapter, and when authentication is completed, encrypts interaction data based on a work key obtained by mapping an authentication key used during two-way authentication, and obtains the encrypted interaction data; The communication adapter further receives encrypted interaction data obtained by encrypting the interaction data based on a work key transmitted from the first interaction device; The communication adapter further decrypts the encrypted interaction data based on a work key obtained by mapping the authentication key in the communication adapter; the second interaction device recognizes the device node simulated by the communication adapter; The communication adapter further transmits the decoded interaction data to the second interaction device through a simulated device node recognizable by the second interaction device based on a communication protocol of the second interaction device natively adapted to the device node.

[0008] A computing device including a memory having computer readable instructions stored thereon and a processor, the processor executing the computer readable instructions to: performing two-way authentication with a first interaction device; receiving encrypted interaction data obtained by encrypting interaction data based on a work key transmitted from the first interaction device when the two-way authentication is completed, the work key being obtained by mapping an authentication key used during the two-way authentication by the first interaction device; decrypting the encrypted interaction data based on a work key obtained by mapping the authentication key in the communication adapter; and transmitting the decoded interaction data to the second interaction device by a simulated device node recognizable by the second interaction device based on a communication protocol of the second interaction device natively adapted to the device node.

[0009] A computer-readable storage medium having computer-readable instructions stored thereon, the computer-readable instructions, when executed by a processor, performing two-way authentication with a first interaction device; receiving encrypted interaction data obtained by encrypting interaction data based on a work key transmitted from the first interaction device when the two-way authentication is completed, the work key being obtained by mapping an authentication key used during the two-way authentication by the first interaction device; decrypting the encrypted interaction data based on a work key obtained by mapping the authentication key in the communication adapter; and transmitting the decoded interaction data to the second interaction device by a simulated device node recognizable by the second interaction device based on a communication protocol of the second interaction device natively adapted to the device node.

[0010] A computer-readable instruction product, the computer-readable instruction product including computer-readable instructions, the computer-readable instructions being stored in a computer-readable storage medium, a processor of a computing device reading the computer-readable instructions from the computer-readable storage medium, and the processor executing the computer-readable instructions causes the computing device to perform the steps of the above-mentioned data transmission method.

[0011] The details of one or more embodiments of the application are set forth in the drawings and description below. Other features, objects, and advantages of the application will become apparent from the description, drawings, and claims. [Brief description of the drawings]

[0012] In order to more clearly explain the technical solutions in the embodiments of the present application, the drawings that need to be used in the description of the embodiments will be briefly described below. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings on the premise that they do not make efforts worthy of inventive step. [Figure 1] FIG. 2 is an application environment diagram of a data transmission method according to an embodiment. [Diagram 2] 1 is a flow diagram of a data transmission method according to an embodiment; [Diagram 3] FIG. 2 is a flow diagram of two-way authentication steps in one embodiment. [Figure 4] FIG. 4 is a flow diagram of a data transmission method according to another embodiment. [Diagram 5] FIG. 2 is a flow diagram of the steps of transmitting data from a second interaction device to a first interaction device in an embodiment; [Figure 6] 1 is a configuration block diagram of a data transmission system according to an embodiment. [Figure 7] FIG. 1 is a block diagram of a data transmission system in a face payment scenario according to an embodiment. [Figure 8a]FIG. 2 is a flow diagram of the key generation steps in one embodiment. [Figure 8b] FIG. 2 is a flow diagram of the key generation and two-way authentication steps in one embodiment. [Figure 9] 1 is a block diagram showing the configuration of a data transmission device according to an embodiment; [Figure 10] FIG. 11 is a block diagram showing the configuration of a data transmission device according to another embodiment. [Figure 11] FIG. 2 is a diagram showing the internal configuration of a computer device according to an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be described in more detail below in conjunction with the drawings and examples. The specific examples described herein do not limit the present application, but are only for the interpretation of the present application.

[0014] The data transmission method provided by the present application can be applied to an application environment as shown in Fig. 1. The application environment includes a communication adapter 102, a first interaction device 104 and a second interaction device 106. The communication adapter 102 and the first interaction device 104 are connected wirelessly, and the communication adapter 102 and the second interaction device 106 are connected electrically, for example, by wire. The communication adapter 102 performs two-way authentication with the first interaction device 104, and after the two-way authentication is completed, the communication adapter 102 receives encrypted interaction data sent from the first interaction device 104, which is obtained by encrypting the interaction data based on a work key. The work key is obtained by the first interaction device mapping an authentication key. The communication adapter 102 decrypts the encrypted interaction data based on a work key obtained by mapping the authentication key within the communication adapter 102 itself, and transmits the decrypted interaction data to the second interaction device 106 via a simulated device node recognizable by the second interaction device 106 based on a communication protocol natively adapted to the device node of the second interaction device 106.

[0015] The communication adapter 102 can bridge between the first interaction device 104 and the second interaction device 106, and realize data interaction between the first interaction device 104 and the second interaction device 106 as an intermediate bridge. Specifically, the communication adapter 102 can be a Bluetooth dongle, a ZigBee adapter, a short-range communication adapter, other wireless adapters, etc. It should be noted that the communication adapter 102 can be an independent device or a device integrated into the second interaction device 106.

[0016] The first interaction device 104 may be, for example, a scanning device, such as a face scanning device or a graphical code scanning device, which may be a bar code, a two-dimensional code, or any other type of graphical code with information attached to it.

[0017] In the process of interacting with the first interaction device 104, the second interaction device 106 may be a resource transfer device for performing an interaction operation based on the interaction data, including a resource transfer operation, and may also perform a control operation based on the control data sent from both.

[0018] In one embodiment, as shown in FIG. 2, a data transmission method is provided, and the method is described as being applied to the communication adapter 102 of FIG. 1 by way of example, where the communication adapter 102 is wirelessly connected to a first interaction device 104 and electrically connected to a second interaction device 106, and the method includes the following steps: S202: Perform two-way authentication with a first interaction device. Two-way authentication may mean that the first interaction device also authenticates the communication adapter, and then the communication adapter authenticates the first interaction device to ensure that both the communication adapter and the first interaction device are trusted devices.

[0019] In one embodiment, the communication adapter may use an authentication key to perform two-way authentication with the first interaction device, or may combine the authentication key with a random number to perform two-way authentication with the first interaction device. Therefore, S202 can be described according to the following two authentication methods: Method 1: An authentication key and a random number are combined to perform two-way authentication with a first interaction device.

[0020] In one embodiment, the communication adapter receives a first challenge code sent from a first interaction device, decrypts the first challenge code based on an authentication key to obtain a first random number which is a random number generated by the first interaction device, performs a hash operation on the first random number to obtain a first hash value, generates a second random number, encrypts the first hash value and the second random number based on the authentication key to obtain a second challenge code, and sends the second challenge code to the first interaction device, so that the first interaction device decrypts the second challenge code based on the authentication key to obtain the first hash value, and compares the first hash value with the second hash value obtained by the first interaction device encrypting the first random number based on the authentication key. If the first hash value and the second hash value are the same, a hash calculation is performed on a second random number obtained by decrypting the second challenge code, and the second hash value obtained by the hash calculation is returned, and the second hash value returned from the first interaction device is received, and the second hash value is compared with a third hash value obtained by performing a hash calculation on the second random number based on an authentication key at the locale of the communication adapter. If the second hash value and the third hash value are the same, bidirectional authentication between the communication adapter and the first interaction device is completed.

[0021] The authentication key in method 1 may be a key generated based on the device serial number of the communication adapter, and is combined with a random number to perform two-way authentication with the first interaction device.

[0022] The first challenge code is a challenge code obtained by the first interaction device encrypting a first random number generated by itself based on the authentication key. The first random number may be a true random number or a pseudo-random number generated by the first interaction device.

[0023] The second random number may be a true random number or a pseudo-random number generated by the communication adapter. The first random number and the second random number are two different random numbers. The second challenge code is a challenge code obtained by the communication adapter encrypting a combination of the first hash value and the second random number using an authentication key, or a challenge code obtained by encrypting the first hash value and the second random number using an authentication key and then combining the encrypted results.

[0024] In a solution of this method, the first interaction device does not directly send the first random number, but sends a first challenge code obtained by encrypting the first random number using an authentication key, and the communication adapter does not directly send the second random number, but sends a second challenge code obtained by encrypting the first hash value and the second random number using the authentication key, thereby avoiding information leakage and improving the accuracy of the authentication process.

[0025] The authentication key used by the communication adapter when encrypting the second random number is generated by the communication adapter based on its own device serial number. The authentication key used by the first interaction device when encrypting the first random number is generated by the first interaction device based on the device serial number of the communication adapter. The authentication key generated by the first interaction device is the same as the authentication key generated by the communication adapter. When generating the authentication key, the communication adapter and the first interaction device encrypt the device serial number of the communication adapter based on the serial number encryption key to obtain the authentication key.

[0026] A method for obtaining an authentication key may include a step of a communication adapter receiving a serial number obtainment request sent from the first interaction device, a step of obtaining a device serial number specified by the serial number obtainment request, a step of feeding back the obtained device serial number to the first interaction device so that the first interaction device generates an authentication key in the first interaction device based on the fed back device serial number, and a step of generating an authentication key in the communication adapter based on the obtained device serial number, wherein the authentication key of the first interaction device is the same as the authentication key of the communication adapter.

[0027] The authentication key in the first interaction device is obtained by encrypting the fed back device serial number based on the serial number encryption key stored in the first interaction device.

[0028] In one embodiment, the step of generating an authentication key in the communication adapter based on the acquired device serial number may specifically include a step in which the communication adapter acquires a serial number encryption key stored in the communication adapter, and a step in which the communication adapter encrypts the acquired device serial number based on the serial number encryption key to acquire an authentication key in the communication adapter.

[0029] In order to intuitively and clearly understand the above two-way authentication process, the two-way authentication process will be described with reference to Figure 3. As shown in Figure 3, the two-way authentication process includes the following steps: S302a: A first interaction device generates a random number A; S302b: The first interaction device encrypts the random number A using the authentication key to obtain a challenge code A; S304a: The communication adapter generates a random number B; S304b: The communication adapter performs a hash calculation using the random number B to obtain a hash value B; S306: The first interaction device transmits a challenge code A; S308: After receiving the challenge code A, the communication adapter uses the authentication key to decrypt the challenge code A to obtain the random number A; The authentication key used in S308 is generated by the communications adapter using its own device serial number. S310: The communication adapter performs a hash operation on the random number A to obtain a hash value A'; S312: The communication adapter encrypts the hash value A' and the random number B using the authentication key to obtain a challenge code B; S314: The communication adapter transmits a challenge code B; S316: After receiving the challenge code B, the first interaction device decrypts the challenge code B using the authentication key to obtain a hash value A′ and a random number B; The authentication key used in S316 is generated by the first interaction device using the device serial number of the communication adapter. S318: The first interaction device performs a hash operation on the random number A, and compares the obtained hash value A with the hash value A'; S320: If the hash value A and the hash value A' are the same, the first interaction device completes authentication of the communication adapter; S322: The first interaction device performs a hash operation on the random number B to obtain a hash value B'; S324: The first interaction device transmits the hash value B'; S326: The communication adapter compares the hash value B' with the hash value B; S328: If the hash value B' is the same as the hash value B, the two-way authentication between the communication adapter and the first interaction device is completed.

[0030] Method 2: Two-way authentication is performed with the first interaction device using an authentication key.

[0031] In one embodiment, the authentication key includes a first authentication key generated by the communication adapter based on its own device serial number, and a second authentication key generated by the first interaction device based on its own device serial number. When the communication adapter sends the first authentication key to the first interaction device, the first interaction device compares the received first authentication key with the authentication key stored in the first interaction device or with the authentication key stored in the authentication server, and if the stored authentication key is the same as the first authentication key, the communication adapter passes the authentication, and the first interaction device completes the authentication of the communication adapter, in this case the first interaction device sends the second authentication key to the communication adapter. After receiving the second authentication key sent from the first interaction device, the communication adapter compares the second authentication key with the authentication key stored in the communication adapter or with the authentication key stored in the authentication server. If the comparison results are consistent, the first interaction device passes the authentication, and the communication adapter completes the authentication of the first interaction device, in this case completing two-way authentication.

[0032] S204: Receive encrypted interaction data obtained by encrypting the interaction data based on the work key, the encrypted interaction data being transmitted from the first interaction device.

[0033] The interaction data is used for interaction between the first interaction device and the second interaction device, and the interaction data may be face image data, payment code data or control data. For example, if the interaction data is face image data, the first interaction device sends encrypted face image data to the second interaction device, so that the second interaction device recognizes the face image data, compares the recognition result with face features in the face feature base, searches for matching face features, and then returns and displays payment information related to the matching face features to the first interaction device, so that the user can confirm the payment.

[0034] The work key is obtained by the first interaction device mapping the authentication key, and is used to encrypt and decrypt the transmitted data. For example, the first interaction device encrypts the authentication key to obtain the work key, or performs a hash operation on the authentication key to obtain the work key. The authentication key used by the first interaction device may be a key generated by the first interaction device based on the device serial number of the communication adapter, for example, a key obtained by encrypting the device serial number of the communication adapter with a serial number encryption key. The authentication key used by the first interaction device may also be a key generated and transmitted by the authentication server based on the device serial number of the communication adapter.

[0035] In one embodiment, an authentication key is stored in both the communication adapter and the first interaction device, and the authentication key is generated according to the device serial number of the communication adapter, and S204 specifically includes the steps of the first interaction device obtaining a work key by mapping according to the authentication key stored in itself, encrypting interaction data by the obtained work key to obtain the encrypted interaction data, and then the communication adapter receiving the encrypted encrypted interaction data sent from the first interaction device. The authentication key stored in the first interaction device may be generated by the first interaction device according to the device serial number of the communication adapter, or the authentication key stored in the first interaction device may be generated and sent by the authentication server according to the device serial number of the communication adapter, and the authentication key generation method may be to use a serial number encryption key to encrypt the device serial number of the communication adapter to obtain the authentication key.

[0036] Specifically, the first interaction device obtains a work key by mapping based on the authentication key stored in itself, encrypts the interaction data with the obtained work key to obtain the encrypted interaction data, and then transmits the encrypted interaction data to the communication adapter, so that the communication adapter receives the encrypted interaction data obtained by encrypting the interaction data transmitted from the first interaction device.

[0037] S206: The encrypted interaction data is decrypted based on the work key obtained by mapping the authentication key in the communication adapter.

[0038] In one embodiment, an authentication key is stored in both the communication adapter and the first interaction device, and S206 specifically includes the steps of the communication adapter obtaining a work key by mapping based on the authentication key stored in itself, and decrypting the encrypted interaction data based on the obtained work key. The authentication key stored in the communication adapter may be generated based on its own device serial number, or the authentication key stored in the communication adapter may be generated and sent by an authentication server based on the device serial number of the communication adapter.

[0039] S208: The decoded interaction data is transmitted to the second interaction device by the simulated device node recognizable by the second interaction device based on a communication protocol of the second interaction device natively adapted to the device node.

[0040] The device node is a virtual node for communication between the communication adapter and the second interaction device. The device node is a simulated virtual node after the communication adapter is plugged into the hardware interface of the second interaction device, and may include a man-machine interaction keyboard node and a man-machine interaction controller node. The man-machine interaction keyboard node may be a USB-HID (Universal Serial Bus-Human Interface Device) keyboard node. The man-machine interaction controller node may be a USB-HID controller node.

[0041] The communication protocol may be a USB-HID protocol, which is a protocol for the communication adapter and the second interaction device to connect and communicate with each other, and the communication protocol is natively compatible with the operating system of the second interaction device, i.e., the operating system supports the protocol by default, so that when the user plugs the communication adapter into the second interaction device, the user does not need to install a driver and can directly use the communication adapter, thereby realizing the plug-and-play of the communication adapter.

[0042] A communication protocol natively adapted to an equipment node may mean that when a communication adapter is plugged into a corresponding hardware interface of a second interaction device, the communication protocol is used to generate the equipment node, so that the communication protocol is natively adapted to the equipment node.

[0043] In one embodiment, the communication adapter includes an HID interface chip, and when the communication adapter is plugged into a second interaction device, the communication adapter can simulate an equipment node through the HID interface chip.

[0044] In one embodiment, S208 specifically includes the steps of: a communication adapter converting the decoded interaction data into target interaction data matching a communication protocol natively adapted to the equipment node; and transmitting the format-converted target interaction data to the second interaction equipment by a simulated equipment node recognizable by the second interaction equipment.

[0045] The decoded interaction data may be in the form of a data packet. Specifically, the communication adapter analyzes the decoded interaction data to obtain a packet header portion and a body portion, and packages the body portion according to the communication protocol to obtain target interaction data in a target format that matches the communication protocol, or adds a corresponding packet header to the interaction data according to the communication protocol to obtain target interaction data in a target format that matches the communication protocol. Then, the target interaction data is transmitted to the second interaction device through a simulated device node that can be recognized by the second interaction device.

[0046] In one embodiment, the target interaction data may belong to control type data or transaction type data, and the interaction data also belong to control type data or transaction type data correspondingly. S208 specifically includes the steps of: if the target interaction data belongs to control type data, the communication adapter reports the target interaction data to the man-machine interaction controller node, so that the second interaction device obtains the target interaction data through the man-machine interaction controller node; if the target interaction data belongs to transaction type data, the communication adapter reports the target interaction data to the man-machine interaction keyboard node, so that the second interaction device obtains the target interaction data through the man-machine interaction keyboard node.

[0047] Specifically, the communication adapter reads the packet header of the target interaction data, and if it is determined based on the interface identifier in the packet header that the data belongs to control type data, it selects a man-machine interaction controller node to be the data report target based on the control type data, and then reports the target interaction data to the man-machine interaction controller node, or it selects a man-machine interaction controller node to be the data report target based on the interface identifier in the packet header, and then reports the target interaction data to the man-machine interaction controller node.If it is determined based on the interface identifier in the packet header that the data belongs to transaction type data, it selects a man-machine interaction keyboard node to be the data report target based on the transaction type data, and then reports the target interaction data to the man-machine interaction keyboard node, or it selects a man-machine interaction keyboard node to be the data report target based on the interface identifier in the packet header, and then reports the target interaction data to the man-machine interaction keyboard node.

[0048] In one embodiment, if the encrypted interaction data or the control data received from the second interaction device belongs to a malicious attack packet, or if the received network data packet from the network side terminal belongs to a malicious attack packet, a security event is triggered, and the security event is used to disable the communication adapter.

[0049] The security event is an event for changing the operational state of the communications adapter.

[0050] Specifically, the communication adapter further includes an anti-removal point, and when the anti-removal point in the communication adapter detects an attack from the first interaction device, or the second interaction device, or the network side terminal, indicating that the transmitted data is at risk of being stolen, in this case, the anti-removal point triggers a security event, and the security event triggers disabling of the communication adapter.

[0051] In order to make the above data transmission method more intuitive and clear, the data transmission method is taken as an example to be applied to a face payment scenario. In the face payment scenario, the above-mentioned first interaction device is a face scanning device that scans a face, the second interaction device is a POS (Point of Sales) machine, the communication adapter is a Bluetooth adapter, and the Bluetooth adapter is plugged into or integrated into the second interaction device. As shown in FIG. 4, the data transmission method specifically includes the following steps: S402: The face scanning device scans the face of the user to obtain face image data; S404: The face scanning device encrypts the face image data using the work key, and obtains the encrypted face image data; The facial scanning device contains a Secure Element (SE) chip, which encrypts the facial image data using a work key. S406: The face scanning device transmits the encrypted face image data to the Bluetooth adapter through a Bluetooth transparent transmission method; S408: The Bluetooth adapter uses the work key to decrypt the received encrypted face image data to obtain the face image data; The Bluetooth adapter includes a Bluetooth transparent transmission chip, an SE chip, a HID interface chip, a RTC (Real-Time Clock) battery and at least two anti-removal points. The SE chip of the Bluetooth adapter uses the work key to decrypt the received encrypted face image data and obtain the face image data. S410: The Bluetooth adapter converts the face image data into face image data that complies with the USB-HID protocol. S412: The Bluetooth adapter transmits the face image data conforming to the USB-HID protocol to the POS machine via the HID keyboard node. S414: The POS machine recognizes the facial image data and obtains payment information matching the recognition result, so that the user can confirm payment. The payment information includes a payment account associated with the user. The payment information is transmitted from the POS machine via the Bluetooth adapter to the facial scanning device, allowing the payment information to be displayed on a display of the facial scanning device for the user to confirm the payment.

[0052] In the above embodiment, before transmitting data, two-way authentication between the communication adapter and the first interaction device is first completed, thereby ensuring that both devices transmitting data are trustworthy, and avoiding information security problems caused by transmitting data to an unauthenticated device. After two-way authentication is completed, the communication adapter starts to receive encrypted interaction data sent from the first interaction device, and the encrypted interaction data is obtained by encrypting the interaction data with a work key obtained by mapping based on the authentication key used during two-way authentication, thereby effectively ensuring the safety during the transmission of the interaction data. In addition, the communication adapter decrypts the encrypted interaction data with the work key obtained by mapping based on the authentication key stored in itself, and transmits the decrypted interaction data to the second interaction device according to the communication protocol natively adapted to the device node of the second interaction device through the simulated device node recognizable by the second interaction device, thereby avoiding the process of encrypting and decrypting data in both the first interaction device and the second interaction device. There is no need to adapt the software in two different devices, which is favorable to improving the versatility of the software and the interaction effect between the first interaction device and the second interaction device. And since the device node simulated by the communication adapter can be recognized by the second interaction device, and the communication protocol used is natively adapted to the second interaction device, when the communication adapter is electrically connected to the second interaction device, there is no need to install a drive, and the adaptation between the communication adapter and the second interaction device can be realized, which is favorable to realizing the plug-and-play effect of the communication adapter, avoiding the preparation operation before data transmission, and improving the overall operation efficiency of data transmission.

[0053] In an embodiment, as shown in FIG. 5, the method may further include the following steps: S502: The man-machine interaction controller node receives control data sent from a second interaction device. The man-machine interaction controller node is a simulated equipment node after the communication adapter is plugged into the second interaction equipment, and the man-machine interaction controller node can be recognized by the second interaction equipment and control data can be transmitted to the node, so that the second interaction equipment and the communication adapter obtain the transmitted control data from the node. S504: The control data is converted into serial control data. S506: The serial control data is encrypted based on the work key obtained by mapping the authentication key in the communications adapter, to obtain encrypted control data. The SE chip in the communication adapter can map the authentication key to obtain a work key, and then encrypt the serial control data by the work key, and transmit the obtained encrypted control data to the wireless unit in the communication adapter, which can include a Bluetooth transparent transmission chip or other wireless chips. S508: Transmit the encrypted control data to the first interaction device, and the encrypted control data is used to decrypt the encrypted control data by a work key obtained by mapping the authentication key, and instruct the first interaction device to perform a control operation based on the decrypted control data.

[0054] The communication adapter transmits the encrypted control data to the first interaction device through the wireless unit, for example, the communication adapter transmits the encrypted control data to the first interaction device in a Bluetooth transparent transmission manner through a Bluetooth transparent transmission chip.

[0055] In the above embodiment, the control data from the second interaction device is encrypted using a work key, and the encrypted encrypted control data is transmitted to the first interaction device, and the first interaction device decrypts the encrypted control data by the work key obtained by mapping the authentication key, where the work key is the work key obtained by mapping the authentication key, thereby effectively ensuring the security during the transmission of the interaction data.

[0056] In one embodiment, as shown in FIG. 6, a data transmission system is provided, the system including: a first interaction device 602, a second interaction device 604, and a communication adapter 606 wirelessly connected to the first interaction device and electrically connected to the second interaction device; The communication adapter 606 authenticates the first interaction device 602; When the communication adapter 606 completes authentication, the first interaction device 602 authenticates the communication adapter 606, and when the authentication is completed, encrypts the interaction data based on a work key obtained by mapping an authentication key used during two-way authentication, and obtains the encrypted interaction data; The communication adapter 606 further receives encrypted interaction data transmitted from the first interaction device 602, the encrypted interaction data being obtained by encrypting the interaction data based on the work key; The communication adapter 606 receives the encrypted interaction data sent from the first interaction device 602 by the wireless unit. The communication adapter 606 further decrypts the encrypted interaction data based on a work key obtained by mapping the authentication key in the communication adapter 606; The communication adapter 606 decrypts the encrypted interaction data by the SE chip, specifically, the SE chip in the communication adapter 606 maps the authentication key to obtain a work key, and then decrypts the encrypted interaction data by the work key. The second interaction device 604 recognizes the simulated device node through the communication adapter 606; The communication adapter 606 further transmits the decoded interaction data to the second interaction device 604 via a simulated device node recognizable by the second interaction device 604 based on a communication protocol natively adapted to the device node of the second interaction device 604. The communication adapter 606 simulates a virtual equipment node through the HID interface chip. The SE chip transmits the decoded interaction data to the HID interface chip through a serial port, and the HID interface chip converts the interaction data into target interaction data conforming to the communication protocol, and then transmits the target interaction data to the second interaction equipment 604 through the equipment node.

[0057] In one embodiment, the communication adapter 606 further receives a first challenge code sent from the first interaction device 602, decrypts the first challenge code based on the authentication key to obtain a first random number, which is a random number generated by the first interaction device 602, generates a second random number, performs a hash operation on the first random number to obtain a first hash value, encrypts the first hash value and the second random number based on the authentication key to obtain a second challenge code, and sends the second challenge code to the first interaction device 602; The first interaction device 602 further decrypts the received second challenge code based on the authentication key to obtain a first hash value, compares the first hash value with a second hash value obtained by the first interaction device 602 encrypting the first random number based on the authentication key, and if the first hash value and the second hash value are the same, performs a hash calculation on the second random number obtained by decrypting the second challenge code, and returns the second hash value obtained by the hash calculation; The communication adapter 606 further receives a second hash value returned from the first interaction device 602, and compares the second hash value with a third hash value obtained by performing a hash operation on the second random number based on the authentication key in the local area of ​​the communication adapter 606. If the second hash value and the third hash value are the same, bidirectional authentication between the communication adapter 606 and the first interaction device 602 is completed. The above encryption and decryption operations and subsequent encryption and decryption operations may all be performed by the SE chip of the first interaction device 602 or the SE chip of the communication adapter 606. For example, the SE chip of the communication adapter 606 decrypts the first challenge code based on the authentication key to obtain a first random number.

[0058] In one embodiment, the communication adapter 606 further comprises: receiving a serial number acquisition request sent from the first interaction device 602, acquiring a device serial number specified by the serial number acquisition request, and feeding back the acquired device serial number to the first interaction device 602; The first interaction device 602 further generates an authentication key for the first interaction device 602 based on the fed back device serial number; The communication adapter 606 further generates an authentication key for the communication adapter 606 based on the obtained device serial number, and the authentication key of the first interaction device 602 is the same as the authentication key of the communication adapter 606 .

[0059] In one embodiment, the authentication key of the first interaction device 602 is obtained by encrypting the fed back device serial number based on a serial number encryption key stored in the first interaction device 602; The communications adapter 606 further obtains a serial number encryption key stored in the communications adapter 606 , and encrypts the obtained device serial number based on the serial number encryption key to obtain an authentication key for the communications adapter 606 .

[0060] In one embodiment, an authentication key is stored in both the communication adapter 606 and the first interaction device 602, and the authentication key is generated based on a device serial number of the communication adapter 606; The communication adapter 606 further obtains a work key by mapping based on an authentication key stored in the first interaction device 602 itself, encrypts the interaction data using the obtained work key to obtain the encrypted interaction data, and then receives the encrypted interaction data obtained by encrypting the interaction data transmitted from the first interaction device 602, obtains a work key by mapping based on the authentication key stored in the communication adapter 606, and decrypts the encrypted interaction data based on the obtained work key.

[0061] In one embodiment, the communication adapter 606 further converts the decoded interaction data into target interaction data matching a communication protocol natively adapted to the device node, and transmits the format-converted target interaction data to the second interaction device 604 via a simulated device node recognizable by the second interaction device 604.

[0062] In one embodiment, the device node includes a man-machine interaction keyboard node and a man-machine interaction controller node, and the communication adapter 606 further reports the target interaction data to the man-machine interaction controller node when the target interaction data belongs to control type data, so that the second interaction device 604 obtains the target interaction data through the man-machine interaction controller node; and reports the target interaction data to the man-machine interaction keyboard node when the target interaction data belongs to transaction type data; The second interaction device 604 obtains the target interaction data through the man-machine interaction keyboard node.

[0063] In one embodiment, the communication adapter 606 further triggers a security event if the encrypted interaction data or the control data received from the second interaction device 604 belongs to a malicious attack packet, or if the network data packet received from the network side terminal belongs to a malicious attack packet, and the security event is used to disable the communication adapter 606. If the anti-removal point in the communications adapter 606 determines that it has been subjected to a malicious attack, it triggers a security event to disable the communications adapter 606 .

[0064] In the above embodiment, before transmitting data, the communication adapter first completes two-way authentication between the communication adapter and the first interaction device, thereby ensuring that both devices transmitting data are trustworthy, and avoiding information security problems caused by transmitting data to an unauthenticated device. After completing the two-way authentication, the communication adapter starts to receive encrypted interaction data sent from the first interaction device, and the encrypted interaction data is obtained by encrypting the interaction data with a work key obtained by mapping based on the authentication key used during the two-way authentication, thereby effectively ensuring the safety during the transmission of the interaction data. In addition, the communication adapter decrypts the encrypted interaction data by a work key obtained by mapping based on the authentication key stored in the communication adapter, and transmits the decrypted interaction data to the second interaction device by a simulated device node recognizable by the second interaction device based on a communication protocol natively adapted to the device node of the second interaction device, thereby avoiding the process of encrypting and decrypting data in both the first interaction device and the second interaction device, which does not require adapting the software in the two different devices, and is favorable to improving the versatility of the software and the effect of the interaction between the first interaction device and the second interaction device. And the equipment node simulated by the communication adapter can be recognized by the second interaction equipment, and the communication protocol used is natively compatible with the second interaction equipment, so that when the communication adapter is electrically connected to the second interaction equipment, there is no need to install a drive, and the compatibility between the communication adapter and the second interaction equipment can be realized, which is advantageous to realize the plug-and-play effect of the communication adapter, avoid the preparation operation before data transmission, and improve the overall operation efficiency of data transmission.

[0065] In one embodiment, the equipment node includes a man-machine interaction controller node; The communication adapter 606 further receives control data sent from the second interaction device 604 by the man-machine interaction controller node, converts the control data into serial control data, encrypts the serial control data according to a work key obtained by mapping the authentication key in the communication adapter 606 to obtain encrypted control data, and transmits the encrypted control data to the first interaction device 602; The first interaction device 602 further decrypts the encrypted control data by the work key obtained by mapping the authentication key, and performs a control operation based on the decrypted control data.

[0066] In the above embodiment, the control data from the second interaction device is encrypted by the work key, and the encrypted control data is transmitted to the first interaction device, and the first interaction device uses the work key obtained by mapping the authentication key to decrypt the encrypted control data. The work key is obtained by mapping the authentication key, which can effectively ensure the safety of the interaction data during transmission.

[0067] When the data transmission system is applied to a face payment scenario, as shown in FIG. 7, the data transmission system includes a face scanning device, a Bluetooth adapter and a POS machine. A) face scanning device: includes an SE chip, which manages keys and performs encryption and decryption on data transmitted through Bluetooth, and the face scanning device further includes a Bluetooth function and can support Bluetooth 4.0 and above; B) Bluetooth adapter: including Bluetooth transparent transmission chip, SE chip, HID interface chip and anti-removal point; The HID interface chip is a serial to USB HID interface communication chip. C) POS machine: A POS register host on the store side.

[0068] Next, the devices included in the Bluetooth adapter will be specifically described. 1) Bluetooth transparent transmission chip The Bluetooth transparent transmission chip performs two-way data transmission, and is specifically described as follows: a) The serial data transmitted from the POS machine is encrypted by the SE chip and then transmitted to the face scanning device via the Bluetooth transparent transmission chip; b. The encrypted data transmitted from the face scanning device through the Bluetooth transparent transmission chip is decrypted through the SE security chip, and the decrypted data is transmitted to the POS machine. 2) HID interface chip After being inserted into a POS machine, the HID interface chip simulates two HID device nodes in the POS machine, including a HID keyboard node and a HID controller node, and converts data conforming to the transmission format of the HID interface chip into data conforming to the USB HID protocol standard, and then transmits the converted data to the POS machine through the simulated device nodes. Windows®, Android® and Linux® systems all support the USB HID protocol by default, enabling updates without the need for a drive on the POS machine, and also realizing plug-and-play. 3) SE chip The SE chip stores keys of the Bluetooth adapter, such as an authentication key and a work key, in the secure area. The SE chip can perform the following functions: a. Perform two-way authentication with face scanning devices; b. Encrypt data transmitted through Bluetooth. 4) Removal prevention point After the data is decrypted by the SE chip, the decrypted data is transmitted to the HID interface chip through the serial port. If the PCB is directly exposed, there is a risk that the data will be stolen. Therefore, an anti-removal point is arranged on the Bluetooth adapter. When there is an external attack, the anti-removal point can trigger a security event to disable the Bluetooth adapter device.

[0069] The above system can perform the following method steps: generating an authentication key, two-way authentication between the Bluetooth adapter and the face scanning device, and encrypting and transmitting data. (1) Generating authentication key The flow of generating an authentication key is shown in FIG. 8a and FIG. 8b, and the steps may specifically include: 1) Get the device serial number of the Bluetooth adapter; 2) The master key KEY_Main is used to encrypt the device serial number, and the encryption result is used as the authentication key. The encryption process is as follows: KEY_Auth=Encrypt(KEY_Main,SN); During data transmission, a work key that changes statically or dynamically is generated based on the authentication key, and the transmitted data is encrypted and decrypted using the work key. (2) Two-way authentication between face scanning device and Bluetooth adapter The flow of two-way authentication is shown in FIG. 8b, and the steps may specifically include: 1) The face scanning device requests the Bluetooth adapter to obtain the device serial number; 2) The face scanning device generates an authentication key KEY_Auth based on the device serial number of the Bluetooth adapter; 3) The face scanning device generates a true random number TRNG_A locally, and performs a hash operation on TRNG_A to generate a corresponding hash value HASH_A=Hash(TRNG_A); 4) The face scanning device encrypts the true random number TRNG_A using the authentication key in the locale to generate a challenge code CODE_A; CODE_A=Encrypt(KEY_Auth,TRNG_A); 5) The face scanning device sends the challenge code CODE_A to the Bluetooth adapter in the manner of Bluetooth transparent transmission; 6) The Bluetooth adapter uses the authentication key to decrypt CODE_A, and performs a hash operation on the decrypted true random number TRNG_A to obtain HASH_A1; 7) The Bluetooth adapter generates a true random number TRNG_B in locale; 8) The Bluetooth adapter encrypts HASH_A1 and TRNG_B using the authentication key to obtain a challenge code CODE_B; CODE_B=Encrypt(KEY_Auth,HASH_A1,TRNG_B); 9) The Bluetooth adapter sends the challenge code CODE_B to the face scanning device via Bluetooth transparent transmission; 10) The face scanning device decrypts CODE_B using the authentication key to obtain HASH_A1 and TRNG_B; 11) The face scanning device compares the HASH_A generated by itself with the HASH_A1 generated by the Bluetooth adapter, and if the comparison result indicates that HASH_A matches HASH_A1, the Bluetooth adapter passes the authentication of the face scanning device, otherwise the authentication fails and the flow ends; 12) The face scanning device performs a hash operation on the true random number TRNG_B of the Bluetooth adapter to obtain HASH_B1; 13) The face scanning device encrypts HASH_B1 using the authentication key and transmits it to the Bluetooth adapter in a Bluetooth transparent transmission manner; 14) The Bluetooth adapter uses the authentication key to decrypt the encrypted HASH_B1 to obtain HASH_B1; 15) The Bluetooth adapter compares HASH_B generated by itself with HASH_B1 generated by the face scanning device, and if the comparison result indicates that HASH_B matches HASH_B1, the face scanning device passes authentication of the Bluetooth adapter, otherwise the authentication fails and the flow ends. (3) After the face scanning device and the Bluetooth adapter complete two-way authentication, they complete pairing according to the Bluetooth standard protocol to establish a data communication link. (4) Data encryption for transmission 1) After establishing a Bluetooth transmission path between the face scanning device and the Bluetooth adapter, generate a work password based on an authentication key; 2) When performing two-way data transmission, the SE chip can use the work key to perform encryption and decryption calculations on the data, thereby realizing encryption and decryption of data transmitted through Bluetooth; Although the transmission processes of data of different types and services are similar, there are also differences, specifically, as follows: (1) Transmission of payment code data A) The face scanning device generates a payment code; B) The SE chip in the face scanning device uses the authentication key to encrypt the payment code data; C) transmitting the encrypted payment code data to a Bluetooth transparent transmission chip in the Bluetooth adapter through a Bluetooth transparent transmission method; D) the Bluetooth transparent transmission chip in the Bluetooth adapter receives the encrypted payment code data, and then transmits the encrypted payment code data to the SE chip of the Bluetooth adapter through a serial port; E) the SE chip uses an authentication key to decrypt the payment code data; F) The SE chip transmits the decrypted payment code data to the HID interface chip via a serial port; G) The HID interface chip converts the received payment code data into payment code data that complies with the HID protocol, and then reports it to the HID keyboard node; H) The POS machine obtains the payment code data through the HID keyboard node, and then retrieves the payment code data through the application layer. (2) Transmission of control data The control data can be communicated bidirectionally in the data transmission system. The flow of control data transmission by the face scanning device is similar to that of payment code data transmission, the main difference is that the device node corresponding to the POS machine is different, the control data is transmitted to the HID controller node, while the payment code data is transmitted to the HID keyboard node. Next, we will mainly introduce the flow of the POS machine transmitting control data to the face scanning device. A) The application layer ERP (Enterprise Resource Planning) system in the POS machine sends control data to the HID controller node; B) The drive layer transmits the control data received by the controller node to the corresponding hardware device CH9329 via USB; C) CH9329 converts the control data received by the USB interface into serial type control data and sends it to the SE security chip on the dongle; D) The security chip encrypts the control data by the authenticated key, and sends the encrypted control data to the Bluetooth transparent transmission chip through the serial port; E) The Bluetooth transparent transmission chip CH9141 transmits the received encrypted text to the face scanning device through Bluetooth; F) The face scanning device sends the control data received from Bluetooth to the SE chip inside the face scanning device; G) The SE chip decrypts the control data with the authenticated key; H) The application layer retrieves the decrypted control data. By implementing the solutions of the above embodiments, the following beneficial effects can be obtained. First, the use of wireless transmission has the advantages of low cost, no need for a drive, and two-way communication; Next, the data transmitted via Bluetooth is encrypted and decrypted to improve the security of data transmission.

[0070] Here, each step in the flowcharts of Figures 2 to 4 is shown in the order indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly described in this specification, the execution of these steps does not have strict order restrictions, and these steps may be executed in other orders. At least some of the steps in Figures 2 to 4 may include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but may be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but may be executed in order or alternately with other steps or at least some of the steps or stages in other steps.

[0071] In one embodiment, as shown in FIG. 9, a data transmission device is provided, which uses software modules or hardware modules, or a combination of both, as part of a computer device, and the device specifically includes an authentication module 902, a receiving module 904, a decryption module 906 and a transmitting module 908. The authentication module 902 performs two-way authentication with the first interaction device; After the two-way authentication is completed, the receiving module 904 receives encrypted interaction data sent from the first interaction device, the encrypted interaction data being obtained by encrypting the interaction data based on a work key, the work key being obtained by the first interaction device mapping an authentication key used during the two-way authentication; The decryption module 906 decrypts the encrypted interaction data based on a work key obtained by mapping the authentication key in the communication adapter; The transmission module 908 transmits the decoded interaction data to the second interaction device through a simulated device node recognizable by the second interaction device based on a communication protocol natively adapted to the device node of the second interaction device.

[0072] In one embodiment, the authentication module 902 further receives a first challenge code sent from the first interaction device, decrypts the first challenge code based on the authentication key to obtain a first random number, which is a random number generated by the first interaction device, generates a second random number, performs a hash operation on the first random number to obtain a first hash value, encrypts the first hash value and the second random number based on the authentication key to obtain a second challenge code, and sends the second challenge code to the first interaction device, whereby the first interaction device decrypts the second challenge code based on the authentication key to obtain a first hash value, compares the first hash value with a second hash value obtained by the first interaction device encrypting the first random number based on the authentication key, and if the first hash value and the second hash value are the same, performs a hash operation on the second random number obtained by decrypting the second challenge code, and returns the second hash value obtained by the hash operation. A second hash value returned from the first interaction device is received, and the second hash value is compared with a third hash value obtained by performing a hash operation on the second random number based on the authentication key in the local area of ​​the communication adapter, and if the second hash value and the third hash value are the same, bidirectional authentication between the communication adapter and the first interaction device is completed.

[0073] In one embodiment, as shown in FIG. a receiving module 904 for receiving a serial number acquisition request sent from the first interaction device; an acquisition module 910 for acquiring a device serial number designated by the serial number acquisition request; a sending module 908 for feeding back the obtained device serial number to the first interaction device, so that the first interaction device generates an authentication key on the first interaction device according to the fed back device serial number; The device further includes a generating module 912 for generating an authentication key in the communication adapter based on the obtained device serial number, where the authentication key in the first interaction device is the same as the authentication key in the communication adapter.

[0074] In one embodiment, the authentication key in the first interaction device is obtained by encrypting the fed back device serial number based on a serial number encryption key stored in the first interaction device; The generation module 912 further obtains a serial number encryption key stored in the communication adapter, and encrypts the obtained device serial number based on the serial number encryption key to obtain an authentication key in the communication adapter.

[0075] In one embodiment, an authentication key is stored in both the communication adapter and the first interaction device, the authentication key being generated based on a device serial number of the communication adapter; The receiving module 904 further includes: the first interaction device obtains a work key by mapping according to the authentication key stored in itself, encrypts interaction data by the obtained work key, obtains the encrypted interaction data, and then receives encrypted interaction data sent from the first interaction device, the encrypted interaction data being obtained by encrypting the interaction data; The decryption module 906 further obtains a work key by mapping based on the authentication key stored in the communication adapter, and decrypts the encrypted interaction data based on the obtained work key.

[0076] In one embodiment, the transmission module 908 further converts the decoded interaction data into target interaction data matching a communication protocol natively adapted to the device node and transmits the formatted target interaction data to the second interaction device via a simulated device node recognizable by the second interaction device.

[0077] In one embodiment, the equipment nodes include a man-machine interaction keyboard node and a man-machine interaction controller node; The sending module 908 further includes, if the target interaction data belongs to control type data, reporting the target interaction data to a man-machine interaction controller node, so that the second interaction equipment obtains the target interaction data through the man-machine interaction controller node, and if the target interaction data belongs to transaction type data, reporting the target interaction data to a man-machine interaction keyboard node, so that the second interaction equipment obtains the target interaction data through the man-machine interaction keyboard node.

[0078] In one embodiment, as shown in FIG. 10, the apparatus includes: The device further includes a trigger module 914 that triggers a security event to disable the communication adapter if the encrypted interaction data or the control data received from the second interaction device belongs to a malicious attack packet, or if the received network data packet from the network side terminal belongs to a malicious attack packet.

[0079] In the above embodiment, before transmitting data, two-way authentication between the communication adapter and the first interaction device is first completed, thereby ensuring that both devices transmitting data are reliable, and avoiding information security problems caused by data transmission to unauthenticated devices. After two-way authentication is completed, the communication adapter starts to receive encrypted interaction data sent from the first interaction device, and the encrypted interaction data is obtained by encrypting the interaction data with a work key obtained by mapping based on the authentication key used during two-way authentication, so that the safety in the process of transmitting the interaction data can be effectively ensured. In addition, the communication adapter decrypts the encrypted interaction data with a work key obtained by mapping based on the authentication key stored in itself, and transmits the decrypted interaction data to the second interaction device based on the communication protocol natively adapted to the device node of the second interaction device through a simulated device node recognizable by the second interaction device, thereby avoiding the process of encrypting and decrypting data in both the first interaction device and the second interaction device. There is no need to adapt the software in two different devices, which is favorable to improving the versatility of the software, and is favorable to improving the interaction effect between the first interaction device and the second interaction device. And since the device node simulated by the communication adapter can be recognized by the second interaction device, and the communication protocol used is natively adapted to the second interaction device, when the communication adapter is electrically connected to the second interaction device, there is no need to install a drive, and the adaptation between the communication adapter and the second interaction device can be realized, which is favorable to realizing the effect of plug-and-play of the communication adapter, avoiding the preparation operation before data transmission, and improving the overall operation efficiency of data transmission.

[0080] In one embodiment, the equipment node includes a man-machine interaction controller node, as shown in FIG. 10, the device includes: a receiving module 904 for receiving, by the man-machine interaction controller node, the control data transmitted from the second interaction device; a conversion module 916 for converting the control data into serial control data; an encryption module 918 for encrypting serial control data based on a work key obtained by mapping the authentication key in the communication adapter, and obtaining encrypted control data; The method further includes a sending module 908 for transmitting the encrypted control data to the first interaction device, the encrypted control data being sent to the first interaction device by a work key obtained by mapping the authentication key, and a sending module 908 for instructing the first interaction device to decrypt the encrypted control data by a work key obtained by mapping the authentication key, and to perform a control operation based on the decrypted control data.

[0081] In the above embodiment, the control data from the second interaction device is encrypted using a work key, and the encrypted encrypted control data is transmitted to the first interaction device. The first interaction device decrypts the encrypted control data using the work key obtained by mapping the authentication key, and the work key is the work key obtained by mapping the authentication key, so that the security during the transmission process of the interaction data can be effectively ensured.

[0082] For specific limitations of the data transmission device, please refer to the limitations of the data transmission method described above, and they will not be repeated here. All or part of each module in the above data transmission device may be realized by software, hardware, or a combination thereof. Each of the above modules may be built into a processor in a computer device in the form of hardware or may be independent, and may be stored in a memory in a computer device in the form of software so that the processor can call them to perform operations corresponding to each of the above modules.

[0083] In one embodiment, a computer device is provided, which may be a Bluetooth adapter, and its internal structure diagram can be seen in FIG. 11. The computer device includes a processor, a memory, and a network interface connected by a system bus. The processor of the computer device provides calculation and control functions. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer-readable instructions, and a database. The internal memory provides an environment for the execution of the operating system and the computer-readable instructions in the non-volatile storage medium. The database of the computer device stores interaction data, an authentication key, a work key, etc. The network interface of the computer device connects and communicates with an external terminal through a network. When the computer-readable instructions are executed by the processor, the data transmission method is realized.

[0084] As will be understood by those skilled in the art, the structure of FIG. 11 is merely a block diagram of a partial configuration related to the solution of the present application, and does not constitute a limitation on a computer device to which the solution of the present application is applied, and a specific computer device may include more or fewer components than those shown, or may combine some components or have a different component arrangement.

[0085] In one embodiment, there is further provided a computing device including a memory having computer readable instructions stored thereon and a processor, the processor performing the steps in each of the method embodiments described above when the computer readable instructions are executed.

[0086] In one embodiment, a computer readable storage medium is provided having computer readable instructions stored thereon which, when executed by a processor, perform the steps in each of the method embodiments described above.

[0087] In one embodiment, a computer program product is provided, the computer program product including computer instructions stored in a computer readable storage medium, a processor of a computing device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to cause the computing device to perform the steps of each of the method embodiments described above.

[0088] As can be understood by those skilled in the art, all or part of the flow of the above embodiment method may be realized by instructing relevant hardware with computer readable instructions, the computer readable instructions being stored in a non-volatile computer readable storage medium, and the computer readable instructions may include the flow of each embodiment of the above method when executed. Any reference to memory, storage, database, or other medium in each embodiment provided by this application includes at least one of non-volatile and volatile memory. Non-volatile memory includes Read-Only Memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, etc. Volatile memory includes Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM may be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0089] The technical features of the above embodiments can be combined in any manner. For the sake of brevity, all possible combinations of the technical features in the above embodiments have not been described; however, as long as there is no contradiction in the combination of these technical features, all fall within the scope of this specification.

[0090] The above examples only show some embodiments of the present application described in more detail and in more detail, but cannot be understood as limiting the scope of the claims of the present invention. However, those skilled in the art may make some modifications and improvements without departing from the concept of the present application, all of which belong to the scope of protection of the present application. Therefore, the scope of protection of the present application patent is based on the attached claims.

Claims

1. A data transmission method performed by a communications adapter, comprising: performing two-way authentication with a first interaction device, the two-way authentication using an authentication key generated based on at least a device serial number of the communication adapter; receiving encrypted interaction data obtained by encrypting interaction data based on a work key sent from the first interaction device when the two-way authentication is completed, the work key being obtained by the first interaction device mapping the authentication key; decrypting the encrypted interaction data based on the work key obtained by mapping the authentication key in the communication adapter; and transmitting, by a simulated equipment node recognizable by a second interaction equipment, the decoded interaction data to the second interaction equipment based on a communication protocol of the second interaction equipment natively adapted to the equipment node.

2. The step of performing two-way authentication with the first interaction device includes: receiving a first challenge code sent from the first interaction device; decrypting the first challenge code based on the authentication key to obtain a first random number, the first random number being a random number generated by the first interaction device; performing a hash operation on the first random number to obtain a first hash value; generating a second random number and encrypting the first hash value and the second random number based on the authentication key to obtain a second challenge code; a step of transmitting the second challenge code to the first interaction device, in which the first interaction device decrypts the second challenge code based on the authentication key to obtain the first hash value, compares the first hash value with a second hash value obtained by the first interaction device encrypting the first random number based on the authentication key, and if the first hash value and the second hash value are the same, performs a hash operation on the second random number obtained by decrypting the second challenge code, and returns the second hash value obtained by the hash operation; The method according to claim 1, further comprising the steps of: receiving the second hash value returned from the first interaction device; comparing the second hash value with a third hash value obtained by the communication adapter by performing a hash operation on the second random number based on the authentication key; and completing the two-way authentication between the communication adapter and the first interaction device if the second hash value and the third hash value are the same.

3. receiving a request to obtain a serial number sent from the first interaction device; acquiring the device serial number designated by the serial number acquisition request; feeding back the obtained device serial number to the first interaction device, so that the first interaction device generates an authentication key on the first interaction device based on the fed back device serial number; 3. The method of claim 2, further comprising: generating an authentication key in the communication adapter based on the obtained device serial number, wherein the authentication key on the first interaction device is the same as the authentication key in the communication adapter.

4. an authentication key on the first interaction device is obtained by encrypting the fed back device serial number based on a serial number encryption key stored on the first interaction device; generating an authentication key for the communication adapter based on the acquired device serial number, obtaining the serial number encryption key stored in the communications adapter; 4. The method according to claim 3, further comprising the step of: encrypting the obtained device serial number based on the serial number encryption key to obtain an authentication key in the communication adapter.

5. said authentication key being stored in both said communication adapter and said first interaction device; The step of receiving encrypted interaction data obtained by encrypting interaction data based on a work key and transmitted from the first interaction device includes: The first interaction device obtains a work key by mapping based on an authentication key stored in the first interaction device, encrypts interaction data by the obtained work key, obtains encrypted interaction data, and then receives the encrypted interaction data obtained by encrypting the interaction data transmitted from the first interaction device; 3. The method of claim 2, wherein the step of decrypting the encrypted interaction data based on a work key obtained by mapping the authentication key in the communication adapter includes the steps of: obtaining a work key by mapping based on an authentication key stored in the communication adapter; and decrypting the encrypted interaction data based on the obtained work key.

6. transmitting, by the simulated device node recognizable by the second interaction device, the decoded interaction data to the second interaction device according to a communication protocol of the second interaction device natively adapted to the device node, converting the decoded interaction data into target interaction data matching a communication protocol native to the device node; and transmitting the formatted target interaction data to the second interaction device by a simulated device node recognizable by the second interaction device.

7. The device nodes include a man-machine interaction keyboard node and a man-machine interaction controller node, and the step of transmitting the format-converted interaction data to the second interaction device by the simulated device node recognizable by the second interaction device includes: If the target interaction data belongs to control type data, reporting the target interaction data to the man-machine interaction controller node, so that the second interaction device obtains the target interaction data through the man-machine interaction controller node; The method according to claim 6, further comprising: if the target interaction data belongs to transaction type data, reporting the target interaction data to the man-machine interaction keyboard node so that the second interaction device obtains the target interaction data through the man-machine interaction keyboard node.

8. The equipment node includes a man-machine interaction controller node, and the method includes: receiving, by said man-machine interaction controller node, control data transmitted from said second interaction device; converting the control data into serial control data; encrypting the serial control data based on a work key obtained by mapping the authentication key in the communication adapter to obtain encrypted control data; The method according to any one of claims 1 to 7, further comprising: a step of transmitting the encrypted control data to the first interaction device, the encrypted control data being used to decrypt the encrypted control data by a work key obtained by mapping the authentication key, and to instruct the first interaction device to perform a control operation based on the decrypted control data.

9. The method according to any one of claims 1 to 7, further comprising a step of triggering a security event to disable the communication adapter if the encrypted interaction data or the control data received from the second interaction device belongs to a malicious attack packet, or if a network data packet received from a network side terminal belongs to the malicious attack packet.

10. A data transmission device, an authentication module for performing two-way authentication with a first interaction device, the two-way authentication using an authentication key generated based on at least a device serial number of the data transmission device; a receiving module for receiving encrypted interaction data sent from the first interaction device when the two-way authentication is completed, the encrypted interaction data being obtained by encrypting the interaction data based on a work key, the work key being obtained by the first interaction device mapping the authentication key; a decryption module for decrypting the encrypted interaction data based on the work key obtained by mapping the authentication key in a communication adapter; and a transmission module for transmitting the decoded interaction data to the second interaction device by a simulated device node recognizable by the second interaction device based on a communication protocol of the second interaction device natively adapted to the device node.

11. 1. A data transmission system, comprising: The system includes a first interaction device, a second interaction device, and a communications adapter wirelessly connected to the first interaction device and electrically connected to the second interaction device; the communication adapter performs two-way authentication with the first interaction device, the two-way authentication using an authentication key generated based on at least a device serial number of the communication adapter; when the two-way authentication with the communication adapter is completed, the first interaction device encrypts interaction data based on a work key obtained by mapping the authentication key, and obtains encrypted interaction data; The communication adapter further receives the encrypted interaction data transmitted from the first interaction device; The communication adapter further decrypts the encrypted interaction data based on a work key obtained by mapping the authentication key in the communication adapter, the second interaction device recognizes the device node simulated by the communication adapter, and the communication adapter further transmits the decrypted interaction data to the second interaction device via the simulated device node recognizable by the second interaction device based on a communication protocol of the second interaction device that is natively compatible with the device node.

12. The communication adapter further receives a first challenge code sent from the first interaction device, decrypts the first challenge code based on the authentication key to obtain a first random number, which is a random number generated by the first interaction device, performs a hash operation on the first random number to obtain a first hash value, generates a second random number, encrypts the first hash value and the second random number based on the authentication key to obtain a second challenge code, and sends the second challenge code to the first interaction device. the first interaction device further decrypts the received second challenge code based on the authentication key to obtain the first hash value, compares the first hash value with a second hash value obtained by the first interaction device encrypting the first random number based on the authentication key, and if the first hash value and the second hash value are the same, performs a hash calculation on the second random number obtained by decrypting the second challenge code, and returns the second hash value obtained by the hash calculation; The system of claim 11, wherein the communication adapter further receives the second hash value returned from the first interaction device, compares the second hash value with a third hash value obtained by the communication adapter by performing a hash operation on the second random number based on the authentication key, and completes the two-way authentication between the communication adapter and the first interaction device if the second hash value and the third hash value are the same.

13. 12. The system of claim 11, wherein the communications adapter further converts the decoded interaction data into target interaction data matching a communications protocol native to the device node and transmits the formatted target interaction data to the second interaction device by a simulated device node recognizable by the second interaction device.

14. A computing device comprising a memory having computer readable instructions stored therein and a processor, the processor performing the steps of the method according to any one of claims 1 to 9 when executing the computer readable instructions.

15. A computer program characterized in that, when executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method and system for establishing wireless communication connection

    CN111615096A

  • Authentication processing method, information processor, and computer program

    JP2003044436A

  • Wireless communication unit

    JP2007081889A

  • Communication system, terminal station, display device and communication method

    JP2008079133A