Equipment control method and equipment, storage medium and chip
By integrating NFC, Bluetooth and target connection modules in terminal devices, and using NFC and Bluetooth for information interaction and connection, efficient data transmission and bidirectional communication between devices are achieved, solving the problems of low data transmission efficiency and one-way transmission mode in the prior art.
Patent Information
- Application Number
- CN202411626349.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-02-25
AI Technical Summary
The data transmission efficiency between devices is low, especially in short-distance wireless communication technology, the transmission rate and distance limitation are large, and the transmission method is unidirectional, so bidirectional communication cannot be achieved.
By integrating NFC module, Bluetooth module and target connection module in terminal devices, NFC is used to interact with Bluetooth information, establish Bluetooth connection, and realize data transmission through target connection module, supporting two-way communication.
It improves the data transmission efficiency between terminal devices, supports the rapid transmission of large data volumes, realizes two-way communication between devices, and solves the problems of transmission rate and distance limitation.
Smart Images

Figure CN119521182A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to device control technology, and in particular to a device control method and device, storage medium, and chip. Background Art
[0002] Near Field Communication (NFC) is an integration of RFID (Radio Frequency Identification) and interconnection technology. It combines the functions of inductive card reader, inductive card and point-to-point on a single chip, and can identify and exchange data with compatible devices within a short distance. Unlike RFID, NFC has the characteristics of two-way connection and identification, operates in the 13.56MHz frequency range, and has an effective distance of about 10 cm. Summary of the invention
[0003] The embodiments of the present application provide a device control method and device, a storage medium, and a chip, which can improve the data transmission efficiency between terminal devices.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] The present application embodiment provides a device control method, which is applied to a first terminal device, wherein the first terminal device includes a first near field communication NFC module, and the device control method includes:
[0006] Interacting Bluetooth information with a second terminal device through the first NFC module;
[0007] Based on the interacted Bluetooth information, establish a Bluetooth connection with the second terminal device, and interact with the target information through the Bluetooth connection;
[0008] A target connection is established with the second terminal device based on the interacted target information, and data is transmitted through the target connection.
[0009] The present application embodiment provides a first terminal device, wherein the first terminal device includes:
[0010] A first near field communication NFC module, configured to interact with a second terminal device through Bluetooth information;
[0011] A first Bluetooth module is configured to establish a Bluetooth connection with the second terminal device based on the interacted Bluetooth information, and interact with the target information through the Bluetooth connection;
[0012] The target connection module is configured to establish a target connection with the second terminal device based on the interactive target information and perform data transmission through the target connection.
[0013] An embodiment of the present application provides an electronic device, including a processor and a first NFC module, wherein the processor is configured to:
[0014] Interacting Bluetooth information with a second terminal device through the first NFC module;
[0015] Based on the interacted Bluetooth information, establish a Bluetooth connection with the second terminal device, and interact with the target information through the Bluetooth connection;
[0016] A target connection is established with the second terminal device based on the interacted target information, and data is transmitted through the target connection.
[0017] An embodiment of the present application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps in the above-mentioned device control method are implemented.
[0018] An embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned device control method is implemented.
[0019] The chip provided in the embodiment of the present application is used to implement the above-mentioned device control method. The chip includes: a processor, which is used to call and run a computer program from a memory so that a device equipped with the chip executes the above-mentioned device control method.
[0020] The device control method and device, storage medium, and chip provided in the embodiments of the present application perform the following processing between two terminal devices: interact with Bluetooth data based on NFC, establish a Bluetooth connection based on the interacted Bluetooth data, interact with target data based on the established Bluetooth connection, and then establish a target connection based on the interacted target data, thereby enabling rapid transmission of large amounts of data between the two terminal devices based on short-range touch. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is an optional structural diagram of a terminal device provided in an embodiment of the present application;
[0022] Figure 2 It is an optional flow chart of the device control method provided in the embodiment of the present application;
[0023] Figure 3 It is an optional flow chart of the device control method provided in the embodiment of the present application;
[0024] Figure 4 It is an optional flow chart of the device control method provided in the embodiment of the present application;
[0025] Figure 5 It is an optional flow chart of the device control method provided in the embodiment of the present application;
[0026] Figure 6 It is an optional flow chart of the device control method provided in the embodiment of the present application;
[0027] Figure 7 It is an optional flow chart of the device control method provided in the embodiment of the present application;
[0028] Figure 8 It is an optional flow chart of the device control method provided in the embodiment of the present application;
[0029] Fig. 9 It is an optional flow chart of the device control method provided in the embodiment of the present application;
[0030] Fig.10 It is an optional flow chart of the device control method provided in the embodiment of the present application;
[0031] Fig.11 It is an optional flow chart of the device control method provided in the embodiment of the present application;
[0032] Fig.12 It is an optional flow chart of the device control method provided in the embodiment of the present application;
[0033] Fig.13 is an optional schematic structural diagram of a first terminal device provided in an embodiment of the present application;
[0034] Fig.14 is an optional schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0035] Fig.15 is an optional schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0036] Fig.16 It is an optional schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0038] The embodiments of the present application can be provided as a device control method, device, and storage medium. In practical applications, the device control method can be implemented by an electronic device, and each functional entity in the electronic device can be collaboratively implemented by hardware resources of computer devices (such as terminal devices, network devices, etc.), such as computing resources such as processors, and communication resources (such as for supporting various communication methods such as optical cables and cellular).
[0039] The following describes various embodiments of the device control method provided in the embodiments of the present application.
[0040] The terminal device provided in the embodiment of the present application can be Figure 1 As shown, it includes: an NFC module 101, a Bluetooth module 102 and a target connection module 103;
[0041] NFC module 101, configured to interact with the second terminal device through Bluetooth information;
[0042] The Bluetooth module 102 is configured to establish a Bluetooth connection with the second terminal device based on the interactive Bluetooth information, and to interact with the target information through the Bluetooth connection;
[0043] The target connection module 103 is configured to establish a target connection with the second terminal device based on the interactive target information and transmit data through the target connection. The maximum data transmission rate supported by the target connection is greater than the maximum data transmission rate supported by the Bluetooth connection.
[0044] The NFC module 101 may be an NFC chip capable of performing information exchange based on NFC.
[0045] The Bluetooth module 102 may be a Bluetooth chip for performing information exchange based on a Bluetooth connection.
[0046] The target connection module 103 may be a P2P communication module for information exchange based on the target connection, wherein the target connection module is used to establish the target connection. The target connection may be a P2P connection. In one example, the target connection is a P2P socket connection. In one example, the target connection is a wifi connection.
[0047] In an embodiment of the present application, data can be transmitted between a first terminal device and a second terminal device, wherein the NFC module, the Bluetooth module and the target connection module in the first terminal device can be respectively referred to as a first NFC module, a first Bluetooth module and a first target connection module; the NFC module, the Bluetooth module and the target connection module in the second terminal device can be respectively referred to as a second NFC module, a second Bluetooth module and a second target connection module.
[0048] based on Figure 1The terminal device described above, the present application embodiment provides a device control method, such as Figure 2 As shown, including:
[0049] S201. Interacting Bluetooth information with a second terminal device through the first NFC module.
[0050] The first terminal device exchanges Bluetooth information with the second NFC module in the second terminal device through the first NFC module. The first terminal device may include a first application registered for the HCE service, the second terminal device may include a second application registered for the HCE service, and the first application and the second application exchange Bluetooth information through the first NFC module and the second NFC module. The Bluetooth information may include a MAC address and a Bluetooth identifier for establishing a Bluetooth connection.
[0051] In the first NFC module in the first terminal device and the second NFC module in the second terminal device, one plays the role of a card reader and the other plays the role of a simulated card. In one example, the role of the first NFC module is the card reader and the role of the second NFC module is the simulated card. In one example, the role of the first NFC module is the simulated card and the role of the second NFC module is the card reader.
[0052] In an embodiment of the present application, the distance between the first terminal device and the second terminal device is less than the first distance, the first distance is the maximum distance supported by NFC, the role of the first NFC module is switched between the card reader end and the simulated card end, and the role of the second NFC is switched between the card reader end and the simulated card end. If one of the first NFC module and the second NFC module is a card reader end and the other is a simulated card end, the first terminal device and the second terminal device interact with Bluetooth information based on the first NFC module and the second NFC module.
[0053] In the embodiment of the present application, the NFC module whose role is to simulate the card end may support the transmission of the application AID or may not support the transmission of the AID.
[0054] The NFC module whose role is to simulate the card end supports the transmission of AID, which can be understood as the protocol between the first NFC module and the second NFC module supports the transmission of AID. Then, AID can be transmitted between the first NFC module and the second NFC module. At this time, the NFC module whose role is to simulate the card end in the first NFC module and the second NFC module may include: NFC modules of cards such as bus cards, car keys, etc. that support APDU transmission of ISO / IEC 14443A or 14443B, MIFARE Classic, and MIFARE Ultralight.
[0055] The fact that the NFC module with the role of simulating the card end does not support the transmission of AID can be understood as the protocol between the first NFC module and the second NFC module does not support the transmission of AID, and the transmission of AID cannot be performed between the first NFC module and the second NFC module. At this time, the NFC module with the role of simulating the card end in the first NFC module and the second NFC module may include: NFC modules of cards such as access control cards that do not support ISO / IEC 14443A or 14443B, MIFARE Classic, and MIFARE Ultralight and cannot perform APDU transmission.
[0056] S202: Establish a Bluetooth connection with the second terminal device based on the interacted Bluetooth information, and interact with target information through the Bluetooth connection.
[0057] The first terminal device and the second terminal device establish a Bluetooth connection based on the exchanged Bluetooth information, and exchange target information through the established Bluetooth connection, where the target information includes information for establishing the target connection. In one example, the target information includes device type, account information, transmission confirmation information, a key for data encryption, etc.
[0058] In a possible implementation, after the first terminal device and the second terminal device interact with each other in terms of device type and account information, the first terminal device and the second terminal device may respectively display dynamic effects, which prompt the user that data is about to be transmitted and the data sending end, data receiving end, etc. After the dynamic effect display is completed, a receiving prompt card may be displayed at the data receiving end, and based on the user's confirmation operation received on the receiving prompt card, transmission confirmation information is generated and sent to the data sending end, and the transmission confirmation indication information is used to indicate confirmation of data transmission, thereby establishing the target connection.
[0059] Before the target connection is established and after the transmission confirmation information is transmitted, a key for data encryption may be exchanged between the first terminal device and the second terminal device, thereby encrypting the transmitted data.
[0060] In the embodiment of the present application, the maximum data transmission rate supported by the target connection is greater than the maximum data transmission rate supported by the Bluetooth connection.
[0061] In one example, the target connection is a WLAN direct link (WiFi Direct) / WiFi P2P connection.
[0062] S203: Establish a target connection with the second terminal device based on the interacted target information, and transmit data through the target connection.
[0063] After the first terminal device and the second terminal device interact with each other on target information, a target connection is established, and data is transmitted through the established target connection.
[0064] In an embodiment of the present application, the maximum data transmission rate supported by the target connection is greater than the maximum data transmission rate supported by the Bluetooth connection. Data transmitted based on the target connection can be transmitted based on a first speed, wherein the first speed is greater than the maximum data transmission rate supported by Bluetooth and less than or equal to the maximum data transmission rate supported by the target connection.
[0065] In the embodiment of the present application, the first terminal device and the second terminal device can perform data transmission of large amounts of data such as images, audio, video, and files based on the target connection.
[0066] In the embodiment of the present application, the following processing is performed between two terminal devices: based on NFC, Bluetooth data is exchanged, a Bluetooth connection is established based on the exchanged Bluetooth data, and based on the establishment of the Bluetooth connection, target data is exchanged, and then a target connection is established based on the exchanged target data, so that the two terminal devices can achieve rapid transmission of large amounts of data based on short-range touch. In this process, on the one hand, when the amount of data to be transmitted is relatively large, the data transmission can be completed in a shorter time based on the target connection, thereby reducing the time required for data transmission and improving the user's data transmission experience. On the other hand, the data transmission rate supported by the target connection is relatively large (which may be greater than the data transmission rate supported by the Bluetooth connection), which can ensure the stability of the data transmission process.
[0067] Next, the interaction process of S201 is described.
[0068] In a possible implementation, the first terminal device sends the first Bluetooth information to the second terminal device through the first NFC module, where the first Bluetooth information is the Bluetooth information of the first terminal device.
[0069] In a possible implementation, the first terminal device receives second Bluetooth information sent by the second terminal device through the first NFC module, where the second Bluetooth information is Bluetooth information of the second terminal device.
[0070] In a possible implementation, S201 interacts with the second terminal device via the first NFC module via Bluetooth information, including:
[0071] S2011. Send first Bluetooth information and receive second Bluetooth information through the first NFC module, where the first Bluetooth information is Bluetooth information of the first terminal device and the second Bluetooth information is Bluetooth information of the second terminal device;
[0072] The first Bluetooth information and / or the second Bluetooth information is used to establish the Bluetooth connection.
[0073] Here, the first terminal device sends the first Bluetooth information to the second terminal device through the first NFC module. The first Bluetooth information is the Bluetooth information of the first terminal device. The first terminal device and the second terminal device respectively send their own Bluetooth information to the other end, thereby ensuring that the first terminal device and the second terminal device can establish an accurate Bluetooth connection based on each other's information, avoiding the occurrence of failure to establish the Bluetooth connection.
[0074] For scenarios where the first NFC module is used as a card emulator and the second NFC module is used as a card reader
[0075] In some embodiments, when the first NFC module is a card reader, the first terminal device further implements the following steps:
[0076] Sending a card selection instruction to the second terminal device through the first NFC module;
[0077] A selection confirmation parameter returned by the second terminal device in response to the selection instruction is received through the first NFC module, where the selection confirmation parameter is used to determine whether the second NFC module supports transmission of the application AID.
[0078] In the first terminal device and the second terminal device, the terminal device (card reading device) where the NFC module that plays the role of the card reader is located, that is, the first terminal device, sends a card selection instruction to the terminal device (simulated card device) where the NFC module that plays the role of the simulated card end is located, that is, the second terminal device. The card selection instruction is used to obtain SAK information, and the second terminal device returns the SAK parameters to the card reading device based on the received card selection instruction.
[0079] The SAK parameter, i.e., SAN information, is used to distinguish different types of NFC modules based on different values.
[0080] In one example, the value of the SAK information is 0x20, which can identify the type of the NFC module as a bus or car key. The NFC module will enter the AID Select process to interact with the private AID. At this time, the SAK parameter indicates the transmission of the AID of the application supported by the simulated card side.
[0081] In one example, the value of the SAK information is 0x08, which indicates that the type of the NFC module is an access control card. It does not support communication protocols such as ISO 14443-4 and APDU (Application Protocol Data Unit) for sending commands and data to a specific AID. At this time, the SAK parameter indicates that the simulated card end does not support the transmission of the application's AID.
[0082] In the embodiment of the present application, when the first NFC module plays the role of a card reader, the interaction process of the first Bluetooth information and the second Bluetooth information is different based on whether the second NFC module, which serves as a simulated card terminal, supports the transmission of the AID.
[0083] For the case where the first NFC module plays the role of a card reader and the simulated card terminal supports the transmission of AID
[0084] In some embodiments, the second NFC module in the second terminal device supports transmission of the application AID, and S2011 sends the first Bluetooth information and receives the second Bluetooth information through the first NFC module, including:
[0085] Sending a first instruction to the second terminal device through the first NFC module, where the first instruction includes the first Bluetooth information and first indication information, where the first indication information is used to indicate whether the first terminal device is in a scenario where the data transmission is allowed;
[0086] receiving, through the first NFC module, a second instruction sent by the second terminal device in response to the first instruction, where the second instruction includes the second Bluetooth information and second indication information, where the second indication information is used to indicate whether the second terminal device is in a scenario where the data transmission is allowed;
[0087] Among them, if the first terminal device is in a scenario where the data transmission is allowed, and the second terminal device is in a scenario where the data transmission is allowed, the Bluetooth connection is established with the second terminal device based on the first Bluetooth information and the second Bluetooth information.
[0088] The first NFC module is a card reader, the second NFC module is a simulated card, and the second NFC module supports the transmission of the application AID. The first terminal device and the second terminal device implement NFC protocol interaction based on the type A method, such as Figure 3 As shown, including:
[0089] S301. A first terminal device sends a first instruction to a second terminal device.
[0090] S302: In response to the received first instruction, the second terminal device sends a second instruction to the first terminal device.
[0091] The first instruction in S301 includes first Bluetooth information and first indication information, and the first indication information is used to indicate whether the first terminal device is in a scenario where the data transmission is allowed. The second instruction in S302 includes second Bluetooth information and second indication information, and the second indication information is used to indicate whether the second terminal device is in a scenario where the data transmission is allowed.
[0092] When the simulated card end receives the first instruction sent by the card reader end, it determines that the first instruction carries the first Bluetooth information, and determines that it needs to respond to the card reader end with its own second Bluetooth information, then sends a second instruction to the first terminal device through the second NFC module, and the second instruction carries the second Bluetooth information and the second indication information.
[0093] In an embodiment of the present application, the first indication information can be understood as indication information sent by the first terminal device for the first terminal device, and the second indication information can be understood as indication information sent by the second terminal device for the second terminal device. The indication information is used to indicate whether the scenario in which the terminal device is located is suitable for data transmission, that is, whether the terminal device currently allows the establishment of a target connection based on NFC triggering and the transmission of data or one-touch exchange function based on the established target connection. In one example, the indication information includes scenario information of the scenario in which the terminal device is located. In one example, the indication information indicates whether the terminal device allows the use of the one-touch transfer function based on different values.
[0094] In the embodiment of the present application, the scenarios suitable for data transmission include at least one of the following: picture sharing page, file sharing page, application page, desktop, etc. Among them, the terminal device whose scenario is picture sharing page or file sharing page is the data sending end, and the terminal device whose scenario is application page or desktop is the data receiving end.
[0095] In an embodiment of the present application, when the indication information includes scene information of the scene in which the terminal device is located, when the first terminal device and the second terminal device display dynamic effects, the corresponding dynamic effects can be displayed based on the scene information, wherein different scene information corresponds to different dynamic effects, and the scene of data transmission is clearly indicated based on the dynamic effect, thereby improving the user's perception of data transmission.
[0096] In an embodiment of the present application, before the Bluetooth connection is established, whether the scenario of the two terminal devices is suitable for data transmission, i.e., one-touch retransmission, is determined based on the interaction of the first indication information and the second indication information, i.e., the transmission of the two-way indication information, so as to ensure the reliability of data transmission.
[0097] In some embodiments, the first instruction includes a setting sequence, and sending the first instruction to the second terminal device through the first NFC module includes:
[0098] The first NFC module sends a first instruction of a set format to the second terminal device based on the set sequence.
[0099] The role of the first NFC module is the card reader, and the role of the second NFC module is the card emulation terminal. The first terminal device is the card reader, and the second terminal device is the card emulation device. The first terminal device can read the second Bluetooth information and the second indication information of the second terminal device from the second terminal device based on the NFC protocol in the relevant technology. However, based on the NFC protocol in the relevant technology, the first terminal device cannot write the first Bluetooth information and the first indication information of the first terminal device to the second terminal device.
[0100] In an embodiment of the present application, the first terminal device writes the first Bluetooth information and the first indication information to the second terminal device in a set format, wherein, when the first instruction sent by the first terminal device includes a setting sequence, it can be considered that the first instruction sent by the first terminal device is an instruction that can be parsed or recognized by the second terminal device, and the second terminal device can read the data carried by the first instruction. Here, the data carried by the first instruction includes the first Bluetooth information and the first indication information. The setting sequence is used to instruct the card reader to write data to the analog card end. In one example, the setting sequence is 00CA0101. In one example, the setting sequence is 0000.
[0101] In the embodiment of the present application, based on the existence of the set sequence, the writing of data from the card reader to the analog card end is realized, thereby realizing two-way data transmission between the analog card end and the card reader end.
[0102] For the case where the first NFC module is a card reader and the simulated card terminal does not support the transmission of AID
[0103] In some embodiments, the second NFC module in the second terminal device does not support the transmission of the application AID, and the sending of the first Bluetooth information through the first NFC module and the receiving of the second Bluetooth information in S2011 include:
[0104] Sending a third instruction to the second terminal device through the first NFC module, where the third instruction includes the first Bluetooth information and the NFC identifier of the second NFC module;
[0105] A fourth instruction sent by the second terminal device is received through the first NFC module, where the fourth instruction includes the second Bluetooth information and the NFC identifier of the second NFC module.
[0106] The second NFC module serving as the simulated card end does not support the transmission of the application AID, and the NFC protocol interaction between the first terminal device and the second terminal device is implemented based on the type F method.
[0107] The first terminal device writes data to the second terminal device through the third instruction, and reads data from the second terminal device through the fourth instruction. Here, the third instruction can be understood as a data writing instruction, and the fourth instruction can be understood as a data reading instruction. The first instruction includes the NFC identifier of the second NFC module as the simulated card end; the second instruction includes the NFC identifier of the second NFC module as the simulated card end. In other words, the instruction for the interaction between the first terminal device and the second terminal device includes the NFC identifier of the simulated card end.
[0108] The first terminal device sends a third instruction to the second terminal device through the first NFC module, and the third instruction includes the first Bluetooth information and the NFC identifier of the second NFC module; the first terminal device receives a fourth instruction sent by the second terminal device through the first NFC module, and the fourth instruction includes the second Bluetooth information and the NFC identifier of the second NFC module.
[0109] In the case that the second NFC module does not support the transmission of the AID, the first terminal device and the second terminal device cannot execute the process of selecting the AID, let alone the process after selecting the AID.
[0110] In the embodiment of the present application, the first terminal device and the second terminal device transmit Bluetooth information based on the NFC identifier of the simulated card end.
[0111] When the first NFC module is a card reader and the second NFC module is a simulated card terminal, the NFC identifier of the simulated card terminal is the NFC identifier of the second NFC module.
[0112] In the embodiment of the present application, the sequence of the third instruction and the fourth instruction is not limited. That is, the card reader can first write its own data to the simulated card end and then read the data of the simulated card end, or first read the data of the simulated card end and then write its own data to the simulated card end.
[0113] In some embodiments, S2011 sends the first Bluetooth information through the first NFC module and receives the second Bluetooth information, and further includes:
[0114] receiving, through the first NFC module, a fifth instruction sent by the second terminal device in response to the third instruction, wherein the fifth instruction includes the NFC identifier of the second NFC module;
[0115] A sixth instruction is sent to the second terminal device through the first NFC module, the fifth instruction includes the NFC identifier of the second NFC module, and the sixth instruction is used to trigger the fourth instruction.
[0116] The first NFC module is a card reader, and the second NFC module is a simulated card terminal. The interaction between the third instruction and the fourth instruction between the first terminal device and the second terminal device is initiated by the first terminal device as the card reader.
[0117] like Figure 4 As shown, including:
[0118] S401. The first terminal device sends a third instruction to the second terminal device, where the third instruction carries first Bluetooth information, first indication information, and an NFC identifier of the second NFC module.
[0119] S402: The second terminal device sends a fifth instruction to the first terminal device.
[0120] In response to the third instruction, the second terminal device sends a fifth instruction, that is, the fifth instruction is used to respond to the third instruction, and the fifth instruction may include the NFC identifier and status code of the second NFC module.
[0121] S403: The first terminal device sends a sixth instruction to the second terminal device, where the sixth instruction carries the NFC identifier of the second NFC module.
[0122] S402: The second terminal device sends a fourth instruction to the first terminal device.
[0123] In response to the sixth instruction, the second terminal device sends a fourth instruction, where the fourth instruction is used to respond to the sixth instruction, and the fourth instruction may include second Bluetooth information, second indication information, an NFC identifier and a status code of the second NFC module.
[0124] In some embodiments, Figure 4 On the basis of, the first terminal device further implements the following steps:
[0125] Sending a security detection request to the second terminal device through the first NFC module;
[0126] An NFC identifier of the second NFC module sent by the second terminal device in response to the security detection request is received through the first NFC module.
[0127] The first terminal device initiates the process of obtaining the NFC identifier as a card reader device. Here, the first terminal device sends a security detection request, and the second terminal device responds to the received security detection request by sending the NFC identifier of the second NFC module serving as the simulated card end to the first terminal device.
[0128] In response to the received security detection request, the second terminal device may also send a unique identification (UID) of the second terminal device serving as a simulated card terminal to the first terminal device.
[0129] In the embodiment of the present application, the card reader obtains the NFC identifier of the simulated card end from the simulated card end through a security detection request, thereby realizing two-way data interaction between the two ends based on the obtained NFC identifier.
[0130] For scenarios where the first NFC module is used as a card emulator and the second NFC module is used as a card reader
[0131] In some embodiments, the first terminal device is an analog card terminal, and the first terminal device further implements the following steps:
[0132] Receiving, via the first NFC module, a card selection instruction sent by the second terminal device;
[0133] In response to the card selection instruction, a selection confirmation parameter is sent to the second terminal device through the first NFC module, where the selection confirmation parameter is used to determine whether the first NFC module supports the transmission of the application AID.
[0134] In the first terminal device and the second terminal device, the terminal device (card reading device) where the NFC module that plays the role of the card reader is located, that is, the second terminal device, sends a card selection instruction to the terminal device (simulated card device) where the NFC module that plays the role of the simulated card end is located, that is, the first terminal device. The card selection instruction is used to obtain SAK information, and the first terminal device returns the SAK parameters to the card reading device based on the received card selection instruction.
[0135] The SAK parameter, i.e., SAN information, is used to distinguish different types of NFC modules based on different values.
[0136] In one example, the value of the SAK information is 0x20, which can identify the type of the NFC module as a bus or car key. The NFC module will enter the AID Select process to interact with the private AID. At this time, the SAK parameter indicates the transmission of the AID of the application supported by the simulated card side.
[0137] In one example, the value of the SAK information is 0x08, which indicates that the type of the NFC module is an access control card, which does not support communication protocols such as ISO 14443-4 and APDU for sending commands and data to a specific AID. At this time, the SAK parameter indicates that the simulated card end does not support the transmission of the application's AID.
[0138] In the embodiment of the present application, when the role of the first NFC module is to simulate the card terminal, the interaction process of the first Bluetooth information and the second Bluetooth information is different based on whether the first NFC module supports the transmission of the AID.
[0139] For the case where the role of the first NFC module is to simulate the card end and the simulated card end supports the transmission of AID
[0140] In some embodiments, the first NFC module supports transmission of the application AID, and S2011 sends the first Bluetooth information through the first NFC module and receives the second Bluetooth information, including:
[0141] receiving, through the first NFC module, a second instruction sent by the second terminal device, where the second instruction includes the second Bluetooth information and second indication information, where the second indication information is used to indicate whether the second terminal device is in a scenario where the data transmission is allowed;
[0142] In response to the second instruction, sending a first instruction to the second terminal device through the first NFC module, where the first instruction includes the first Bluetooth information and first indication information, where the first indication information is used to indicate whether the first terminal device is in a scenario where the data transmission is allowed;
[0143] Among them, if the first terminal device is in a scenario where the data transmission is allowed, and the second terminal device is in a scenario where the data transmission is allowed, the Bluetooth connection is established with the second terminal device based on the first Bluetooth information and the second Bluetooth information.
[0144] The first NFC module is a card reader, the second NFC module is a simulated card, and the second NFC module supports the transmission of the application AID. The first terminal device and the second terminal device implement NFC protocol interaction based on the type A method, such as Figure 5 As shown, including:
[0145] S501. The second terminal device sends a second instruction to the first terminal device.
[0146] S502: In response to the received second instruction, the first terminal device sends the first instruction to the second terminal device.
[0147] The second instruction in S501 includes second Bluetooth information and second indication information, and the second indication information is used to indicate whether the second terminal device is in a scenario where the data transmission is allowed. The first instruction in S502 includes first Bluetooth information and first indication information, and the first indication information is used to indicate whether the first terminal device is in a scenario where the data transmission is allowed.
[0148] When the simulated card end receives the second instruction sent by the card reader end, it determines that the second instruction carries the second Bluetooth information, and determines that it needs to respond to its own first Bluetooth information to the card reader end, then sends the first instruction to the second terminal device through the first NFC module, and the first instruction carries the first Bluetooth information and the first indication information.
[0149] In an embodiment of the present application, the first indication information can be understood as indication information sent by the first terminal device for the first terminal device, and the second indication information can be understood as indication information sent by the second terminal device for the second terminal device. The indication information is used to indicate whether the scenario in which the terminal device is located is suitable for data transmission, that is, whether the terminal device currently allows the establishment of a target connection based on NFC triggering and the transmission of data or one-touch exchange function based on the established target connection. In one example, the indication information includes scenario information of the scenario in which the terminal device is located. In one example, the indication information indicates whether the terminal device allows the use of the one-touch transfer function based on different values.
[0150] In the embodiment of the present application, the scenarios suitable for data transmission include at least one of the following: picture sharing page, file sharing page, application page, desktop, etc. Among them, the terminal device whose scenario is picture sharing page or file sharing page is the data sending end, and the terminal device whose scenario is application page or desktop is the data receiving end.
[0151] In an embodiment of the present application, when the indication information includes scene information of the scene in which the terminal device is located, when the first terminal device and the second terminal device display dynamic effects, the corresponding dynamic effects can be displayed based on the scene information, wherein different scene information corresponds to different dynamic effects, and the scene of data transmission is clearly indicated based on the dynamic effect, thereby improving the user's perception of data transmission.
[0152] In an embodiment of the present application, before the Bluetooth connection is established, whether the scenario of the two terminal devices is suitable for data transmission, i.e., one-touch retransmission, is determined based on the interaction of the first indication information and the second indication information, i.e., the transmission of the two-way indication information, so as to ensure the reliability of data transmission.
[0153] In some embodiments, the second instruction includes a setting sequence, and receiving, through the first NFC module, the second instruction sent by the second terminal device includes:
[0154] The first NFC module receives a second instruction in a set format sent by the second terminal device.
[0155] The first terminal device receives a second instruction in a set format sent by the second terminal device through the first NFC module, wherein the second instruction in the set format includes a set sequence, and the set sequence is used to instruct the simulated card end to receive data.
[0156] The role of the first NFC module is to simulate the card end, and the role of the second NFC module is to read the card end. The first terminal device is a simulated card device, and the second terminal device is a card reader. The second terminal device can read the first Bluetooth information and the first indication information of the first terminal device from the first terminal device based on the NFC protocol in the relevant technology. However, based on the NFC protocol in the relevant technology, the second terminal device cannot write the second Bluetooth information and the second indication information of the second terminal device to the first terminal device.
[0157] In an embodiment of the present application, the second terminal device writes the second Bluetooth information and the second indication information to the first terminal device in a set format, wherein, when the instruction sent by the second terminal device includes a setting sequence, it can be considered that the second instruction sent by the second terminal device is an instruction that can be parsed or recognized by the first terminal device, and the first terminal device can read the data carried by the instruction. Here, the data carried by the second instruction includes the second Bluetooth information and the second indication information. The setting sequence is used to indicate the writing of data. In one example, the setting sequence is 00CA0101. In one example, the setting sequence is 0000.
[0158] In the embodiment of the present application, based on the existence of the set sequence, the writing of data from the card reader to the analog card end is realized, thereby realizing two-way data transmission between the analog card end and the card reader end.
[0159] In the present application embodiment, based on Figure 3 or Figure 5 In the method shown, when the simulated card supports the transmission of AID, the interaction between the card reader and the simulated card device can be as follows: Figure 6 As shown, including:
[0160] S601, the card reader sends an AID selection instruction to the simulated card device;
[0161] The select AID instruction sent by the card reader device includes the AID of the application program registered with the HCE service on the simulated card device to be accessed.
[0162] S602: The simulated card device sends a status code for responding to the AID selection instruction to the card reader device.
[0163] The NFC module on the simulated card device receives the Select AID instruction and forwards the Select AID instruction to the application registered for the HCE service on the simulated card device. When the application registered for the HCE service on the simulated card device determines that the AID carried in the received Select AID instruction is its own AID, it sends a status code indicating success to its NFC module, and the NFC module forwards the status code to the card reader device.
[0164] In one example, the status code indicating success is 9000.
[0165] S603: The card reader sends a write instruction to the simulated card device.
[0166] The write instruction includes the setting sequence, as well as the Bluetooth information and instruction information of the card reader device.
[0167] After receiving the response code indicating success, the NFC module of the card reader device reads the Bluetooth information and the indication information from the application on the card reader device, and sends the Bluetooth information and the indication information to the simulated card device in a write instruction.
[0168] Here, the write instruction may be a first instruction sent when the first NFC module is a card reader, or a second instruction received when the first NFC module is a simulated card terminal.
[0169] S604: The simulated card device sends a read instruction to the card reader device.
[0170] The read instruction includes the Bluetooth information and instruction information of the simulated card device, which is the data read by the card reader from the simulated card device.
[0171] After receiving the write instruction, the NFC module of the simulated card device sends the Bluetooth information and indication information carried in the write instruction to the application on the simulated card device, and the application on the simulated card device sends its own Bluetooth information and indication information to the NFC module of the simulated card device. The NFC module of the simulated card device carries the Bluetooth information and indication information of the simulated card device in the read and write instructions and sends them to the card reader device.
[0172] Here, the read instruction may be the second instruction received when the first NFC module is a card reader, or the first instruction received when the first NFC module is a simulated card.
[0173] For the case where the role of the first NFC module is to simulate the card end and the simulated card end does not support the transmission of AID
[0174] In some embodiments, the first NFC module does not support transmission of the application AID, and S2011 sends a first Bluetooth message through the first NFC module and receives a second Bluetooth message, including:
[0175] Sending a third instruction to the second terminal device through the first NFC module, where the third instruction includes the first Bluetooth information and the NFC identifier of the first NFC module;
[0176] A fourth instruction sent by the second terminal device is received through the first NFC module, where the fourth instruction includes the second Bluetooth information and the NFC identifier of the first NFC module.
[0177] The first NFC module does not support the transmission of the application AID, and the NFC protocol interaction between the first terminal device and the second terminal device is implemented based on the type F method.
[0178] The first terminal device writes data to the second terminal device through the third instruction, and reads data from the second terminal device through the fourth instruction. Here, the third instruction can be understood as a data writing instruction, and the fourth instruction can be understood as a data reading instruction. The first instruction includes an NFC identifier as a simulated card-side first NFC module; the second instruction includes an NFC identifier as a simulated card-side first NFC module. In other words, the instruction for the interaction between the first terminal device and the second terminal device includes an NFC identifier for the simulated card side.
[0179] The first terminal device sends a third instruction to the second terminal device through the first NFC module, and the third instruction includes the first Bluetooth information and the NFC identifier of the first NFC module; the first terminal device receives a fourth instruction sent by the second terminal device through the first NFC module, and the fourth instruction includes the second Bluetooth information and the NFC identifier of the first NFC module.
[0180] In the case that the first NFC module does not support the transmission of the AID, the first terminal device and the second terminal device cannot execute the process of selecting the AID, and cannot execute the process after selecting the AID.
[0181] In the embodiment of the present application, the first terminal device and the second terminal device transmit Bluetooth information based on the NFC identifier of the simulated card end.
[0182] When the first NFC module is a simulated card terminal and the second NFC module is a card reader terminal, the NFC identifier of the simulated card terminal is the NFC identifier of the first NFC module.
[0183] In the embodiment of the present application, the sequence of the third instruction and the fourth instruction is not limited. That is, the card reader can first write its own data to the simulated card end and then read the data of the simulated card end, or first read the data of the simulated card end and then write its own data to the simulated card end.
[0184] In some embodiments, S2011 sends the first Bluetooth information through the first NFC module and receives the second Bluetooth information, and further includes:
[0185] receiving, through the first NFC module, a fifth instruction sent by the second terminal device, where the fifth instruction includes the NFC identifier of the first NFC module, and the fifth instruction is used to trigger the third instruction;
[0186] In response to the fourth instruction, a sixth instruction is sent to the second terminal device through the first NFC module, where the sixth instruction includes the NFC identifier of the first NFC module.
[0187] The first NFC module is a simulated card terminal, and the second NFC module is a card reader terminal. Then, the interaction between the third instruction and the fourth instruction between the first terminal device and the second terminal device is initiated by the second terminal device serving as the card reader terminal.
[0188] like Figure 7 As shown, including:
[0189] S701. The second terminal device sends a fifth instruction to the first terminal device. The fifth instruction may include an NFC identifier of the first NFC module.
[0190] S702: The first terminal device sends a third instruction to the second terminal device.
[0191] In response to the fifth instruction, the second terminal device sends a third instruction, that is, the third instruction is used to respond to the fifth instruction. The third instruction carries the first Bluetooth information, the first indication information, the NFC identifier of the first NFC module, and a status code.
[0192] S703. The second terminal device sends a fourth instruction to the first terminal device, where the fourth instruction carries the second Bluetooth information, the second indication information, and the NFC identifier of the first NFC module.
[0193] S704: The first terminal device sends a sixth instruction to the second terminal device.
[0194] In response to the fourth instruction, the first terminal device sends a sixth instruction, where the sixth instruction is used to respond to the fourth instruction, and the sixth instruction carries the NFC identifier and status code of the first NFC module.
[0195] In some embodiments, Figure 7 On the basis of, the first terminal device further implements the following steps:
[0196] Receiving, through the first NFC module, a security detection request sent by the second terminal device;
[0197] In response to the security detection request, an NFC identifier of the first NFC module is sent to the second terminal device through the first NFC module.
[0198] The second terminal device initiates the process of obtaining the NFC identifier as the card reader. Here, the second terminal device sends a security detection request, and the first terminal device responds to the received security detection request by sending the NFC identifier of the first NFC module serving as the simulated card end to the second terminal device.
[0199] In response to the received security check request, the first terminal device may also send a unique identification (UID) of the first terminal device serving as a simulated card terminal to the second terminal device.
[0200] In the embodiment of the present application, the card reader obtains the NFC identifier of the simulated card end from the simulated card end through a security detection request, thereby realizing two-way data interaction between the two ends based on the obtained NFC identifier.
[0201] In the present application embodiment, based on Figure 4 or Figure 7 In the method shown, when the simulated card supports the transmission of AID, the interaction between the card reader and the simulated card device can be as follows: Figure 8 As shown, including:
[0202] S801: The card reader sends a security detection request to the simulated card device.
[0203] S802: The simulated card device sends the UID and NFC identifier of the simulated card end to the card reader device.
[0204] S803, the card reader sends a request command to the simulated card device;
[0205] The request command is used to read the indication information indicating whether the analog card device supports one-touch transfer.
[0206] S804, the simulated card device sends a request response to the card reader device;
[0207] The request response includes indication information indicating whether the simulated card device supports one-touch transfer.
[0208] S805: The card reader sends a read instruction to the simulated card device.
[0209] The read instruction is used to read the business data of the analog card device. The business data of the analog card device may include Bluetooth information and indication information of the analog card device.
[0210] The read instruction may also include an NFC identifier of the simulated card.
[0211] The read instruction may also include address information of the business data of the simulated card device, which is used to instruct to read the business data of the simulated card device from the storage unit corresponding to the address information.
[0212] The read instruction may be the sixth instruction sent when the first terminal device is a card reading device, or may be the fifth instruction sent when the first terminal device is a simulated card device.
[0213] S806: The simulated card device sends a read response to the card reader device, where the read response includes the business data of the simulated card device.
[0214] The read response may also include a status code and the NFC identifier of the simulated card.
[0215] The read response may be the fourth instruction sent when the first terminal device is a card reading device, or may be the third instruction sent when the first terminal device is a simulated card device.
[0216] S807: The card reader sends a write instruction to the simulated card device.
[0217] The write instruction includes the business data of the card reader device, which is used to write the business data of the card reader device into the simulated card device. The business data of the card reader device may include Bluetooth information and indication information of the card reader device.
[0218] The write instruction may also include an NFC identifier of the simulated card.
[0219] The write instruction may also include address information of the business data of the card reader device, which is used to instruct writing the business data of the card reader device into the storage unit corresponding to the address information.
[0220] The write instruction may be the third instruction sent when the first terminal device is a card reader device, or may be the fourth instruction sent when the first terminal device is an analog card device.
[0221] S808. The simulated card device sends a write response to the card reader device.
[0222] The write response may also include a status code and the NFC identifier of the simulated card.
[0223] The write response may be the fifth instruction sent when the first terminal device is a card reader device, or may be the sixth instruction sent when the first terminal device is a simulated card device.
[0224] In the embodiment of the present application, the card reader can read the data of the first storage unit of the simulated card end, and the first storage unit stores the Bluetooth information and indication information of the terminal device where the simulated card end is located. The card reader can write data to the second storage unit of the simulated card end, and the data written to the second storage unit may include the Bluetooth information and indication information of the terminal device where the card reader is located.
[0225] In the case that the first storage unit and the second storage unit are the same storage unit, the card reader may first read data from the storage unit and then write data into the storage unit.
[0226] Next, the device control method provided in the embodiment of the present application is further described.
[0227] For NFC near-field data interaction, there is a complete set of host-based card emulation (HCE) solutions (HostApduService) and corresponding card reader solutions (NfcAdapter.ReaderCallback). When the NFC module detects an HCE simulated card, it will call back the corresponding simulated card data to the registered listener, thereby realizing the exchange of near-field NFC data. The process of NFC data exchange is as follows: the simulated card end needs to register the HCE service first and specify its own private application identifier (application identifier, AID). When the peer card reader sends a select command, it needs to exchange command data according to the Android definition process. After the simulated card is successfully registered with the Android system, the card reader can register the callback discovered by the HCE service, so that when the system finds the simulated card corresponding to the AID, the corresponding tag information can be called back to the business party of the card reader.
[0228] However, the NFC exchange method has the following limitations:
[0229] 1. NFC has limitations on transmission rate and distance;
[0230] 2. The analog card data can only be read by the card end;
[0231] 3. When the default card on the simulated card side is the access card type, it cannot enter the AID process due to its protocol restrictions, that is, it cannot complete the NFC protocol interaction.
[0232] The embodiment of the present application provides a method for two mobile phones to exchange data via NFC to perform NFC one-touch interconnection / transmission between the two mobile phones.
[0233] There are many ways to connect two mobile phones, such as WiFi, P2P, Bluetooth (BL), etc., but no matter which connection method is used, initial data interaction is required. For example, WiFi P2P needs to know the IP address of the other end, and Bluetooth needs to know the Bluetooth MAC address of the other end. In the embodiment of the present application, the overall process of connecting two mobile phones with one touch through NFC is as follows: Fig. 9 As shown, including:
[0234] S901, two mobile phones exchange the Bluetooth MAC address of the other end through NFC;
[0235] S902, establishing a near-field Bluetooth connection channel through the Bluetooth MAC address;
[0236] S903: Establish a faster near-field connection channel (such as a P2P Socket channel) through the Bluetooth connection channel interaction protocol content.
[0237] In the embodiment of the present application, two mobile phones exchange the Bluetooth MAC address of the other end through NFC, wherein the simulated card solution is used to exchange the initial data, one end is used as the simulated card end, and the other end is used as the card reader end, so as to perform the data interaction operation initiated by the card reader end to the simulated card end;
[0238] In the NFC field, Select Acknowledgment (SAK) is used to identify the specific type and technical specifications of the card during the NFC card search process. It is a response to the card selection command. The information contained in SAK is used to distinguish different types of NFC cards, such as ISO / IEC 14443A or 14443B, MIFARE Classic, MIFARE Ultralight, etc. By parsing the value of SAK, the card reader can understand which protocols and features the card supports and adjust the communication process accordingly.
[0239] In the embodiment of the present application, the SAK interaction process is as follows Fig.10 As shown, including:
[0240] S1001, the card reader will first send a card search command to the other end;
[0241] When the two mobile phones are switched to the card reader and the simulated card end respectively, the card reader will first send a card search command to the other end.
[0242] The card search command may include a REQA command and a WUPA command. The REQA command is used to detect whether there is an analog card terminal at the beginning, and the WUPA command is used to return the analog card terminal from a stop state to a ready state.
[0243] S1002. After receiving the card search command, the simulated card end will reply to the card reader end.
[0244] The reply request may carry card type information. The reply request may be an ATQA command. The ATQA command simulates the card's response to REQA (0x26) and WUPA (0x52). Its main function is to determine how many levels of unique identifiers (UID) there are.
[0245] S1003. The card reader sends an identification instruction and a card selection instruction to the other end according to the types of cards received.
[0246] S1004. After receiving the card selection instruction, the simulated card terminal returns its own UID, SAK parameters and other information to the card reader.
[0247] After receiving the SAK, the card reader identifies the protocol type of the other party and performs corresponding protocol interaction and processing.
[0248] The information exchange between the card reader and the card end can adopt the AID solution, but not all card types can support the AID process, so the first step of the card reader is to read the SAK information of the mobile phone simulation card on the other end. Currently, there are two types of SAK on the mobile phone simulation card end:
[0249] 1. 0x20 (bus card / car key): When the SAK of the simulated card is 0x20 (the default card in the wallet is the bus / car key), the NFC process will enter the AID Select process. When the simulated card receives the private AID, it executes Fig.10 The Type A method shown implements the NFC protocol interaction process and performs one-touch interaction.
[0250] 2. 0x08 (access card): For the analog card end with SAK value 0x08, it usually refers to Mifare Classic 1K tag. This type of tag does not support ISO 14443-4 protocol, that is, it does not support Application Protocol Data Unit (APDU) commands. APDU is a communication protocol that sends commands and data to a specific AID.
[0251] Therefore, when the card SAK is 0x08 (the wallet defaults to the access card), according to the NFC protocol, the AID process cannot be reached. At this time, the card reader will execute Fig.11 The Type F method shown implements the NFC protocol interaction process, that is, adopts the Felica communication method to exchange information with the card side.
[0252] Type A method to implement NFC protocol interaction
[0253] When the card reader recognizes that the peer SAK is 0x20, it means that the peer supports the ISO / IEC 14443-4 standard and is compatible with MIFARE Classic (generally, it means that the peer's mobile phone is simulating a bus card or car key). This type of card supports APDU (Application Protocol Data Unit) commands and can perform AID interaction. In this case, the card reader will search for the specific AID registered by the simulated card and send it a SelectAID command, such as Fig.11 As shown, including:
[0254] S1101. The simulation card service provider registers the HCE simulation card at the simulation card terminal.
[0255] The simulated card business party registers the HCE simulated card service through the SDK interface and specifies the AID corresponding to the simulated card.
[0256] The simulated card service can be understood as the application in the terminal device where the simulated card is located.
[0257] S1102: The card reader sends a Select AID instruction to the simulated card reader.
[0258] When the card reader detects that the SAK of the peer simulated card is 0x20, it will enter the Select AID process and send the Select AID command to the peer simulated card.
[0259] S1103: The simulated card terminal forwards the received Select AID instruction to the simulated card service provider.
[0260] S1104, the simulated card service direction simulates the card end to reply with a success instruction.
[0261] When the simulated card service provider receives the Select AID command carrying its own AID, it will reply with a success status to indicate that the service provider supports NFC one-touch interconnection.
[0262] S1105, the simulated card end returns a success command to the card reader end.
[0263] S1106. When the card reader receives the success command corresponding to the AID from the other end, it reports the device discovery to the card reader service provider through the SDK interface.
[0264] The card reader service can be understood as the application in the terminal device where the card reader is located.
[0265] S1107. The card reader business direction sends the card reader business party information to the card reader.
[0266] The card reader service party information may include Bluetooth MAC address A and service data A.
[0267] In one example, the business data A can be understood as indication information for indicating whether the card reader business party supports one-touch interconnection, that is, whether it is in the one-touch interconnection scenario.
[0268] In the embodiment of the present application, the one-touch interconnection scenario can be understood as a scenario that can support one-touch interconnection. For example, when the terminal device displays a sharing page, an application page, a desktop, etc., it can be identified as a one-touch interconnection scenario.
[0269] S1108. The card reader sends the card reader service party information to the simulated card terminal through an APDU command.
[0270] S1109. The simulated card end sends the card reader end service party information to the simulated card end service party.
[0271] S1111. The simulated card end service provider sends its own simulated card end service provider information to the simulated card end.
[0272] The simulated card-side service party information may include Bluetooth MAC address B and service data B.
[0273] S1111. The simulated card end replies the simulated card end service party information to the card reader end.
[0274] S1112. The card reader reports the received simulated card service provider information to the card reader service provider.
[0275] S1113: The card reader service provider and the card simulation service provider establish a Bluetooth connection based on the service information of both parties.
[0276] Type F method to implement NFC protocol interaction
[0277] When the card reader reads the SAK value of the other end as 0x08, it indicates that the other end is a MIFARE 1k classic MIFARE series card. This type of card does not support the exchange of NFC information through APDU commands, but supports the card reader to actively initiate Felica communication. The process of NFC information exchange in Type Felica mode is as follows: Fig.12 As shown, including:
[0278] S1201, when the card reader recognizes that the current SAK is 0x08, it will send a security detection request (SENSF_REQ) to the other end to perform Felica communication.
[0279] S1202, the simulated card side will respond with ACK + local NFCID information.
[0280] The simulated card will respond with ACK+ local NFCID information and establish Felica communication.
[0281] S1203, the card reader sends a request instruction to read 0 storage units.
[0282] The request instruction is used to instruct to read the data in the 0th storage unit of the simulated card end corresponding to the NFCID information.
[0283] In the embodiment of the present application, the data stored in the 0 block storage unit is used to indicate whether the simulated card-side service provider supports one-touch transfer.
[0284] The request instruction sent by S1203 may be REQ_CMD+NFCID2+00, where 00 is used to indicate the data in block 0 of the storage unit on the simulated card side.
[0285] S1204, the simulated card terminal responds with the data of the read storage unit 0.
[0286] The simulated card end may send a reply instruction carrying data of 0 storage units. The information header of the reply instruction may include the NFCID information and status code of the simulated card end, indicating that data of 0 storage units has been successfully read from the simulated card segment corresponding to the NFCID information.
[0287] The instruction sent by S1204 may be RSP_CMD+NFCID2+status code+data.
[0288] The data is used to indicate whether one-touch transfer is supported.
[0289] S1205. The card reader sends a request instruction to read data from storage units 1, 2, and 3.
[0290] When the card reader confirms that the simulated card supports one-touch interconnection, the card reader will read the data of storage units 1, 2, and 3 on the card to obtain the business party information of the simulated card.
[0291] The information header of the request instruction includes the NFCID information of the simulated card segment, which is used to instruct to read the data in the 1st, 2nd and 3rd storage units of the simulated card end corresponding to the NFCID information.
[0292] The instruction in S1205 may be READ_CMD+NFCID2+010203, where 010203 is used to instruct to read data from storage units 1, 2, and 3.
[0293] The instruction sent in S1205 can be understood as a read instruction.
[0294] S1206. After receiving the command, the simulated card end obtains the simulated card end service provider information from the simulated card end service provider.
[0295] S1207. The simulated card end replies with the simulated card end service provider information.
[0296] The simulated card end can send a reply instruction carrying the simulated card end business party information. The information header of the reply instruction may include the NFCID information and status code of the simulated card end, indicating that the data of storage units 1, 2, and 3 are successfully read from the simulated card segment corresponding to the NFCID information.
[0297] The instruction of S1207 may be READ_ESP_CMD+NFCID2+status code+data.
[0298] The instruction sent by S1207 may be a read response.
[0299] S1208. The card reader reports the simulated card reader service provider information to the card reader service provider, and obtains the card reader service provider information of the card reader service provider.
[0300] S1209: The card reader sends the card reader service provider information to the simulated card reader.
[0301] The instruction of S1209 may be WRITE_CMD+NFCID2+010203+data.
[0302] The instruction sent by S1209 may be a write instruction.
[0303] S1210. The simulated card end sends the card reader end service party information to the simulated card end service party.
[0304] S1211, the simulation card end returns the writing status to the card reader end.
[0305] The instruction of S1211 may be WRITE_CMD+NFCID2+status code.
[0306] The instruction sent by S1211 may be a write response.
[0307] S1212: The card reader service provider and the card simulation service provider establish a Bluetooth connection based on the service information of both parties.
[0308] In the embodiment of the present application, the process of establishing a faster near-field connection channel through the Bluetooth connection channel interaction protocol content in S903 may include:
[0309] 1. Both ends synchronize basic data based on the Bluetooth connection channel.
[0310] Basic data may include: device type, account information, etc.
[0311] 2. Wait for dynamic effect confirmation.
[0312] Wait for the dynamic effects on both ends to complete and confirm the one-touch transfer.
[0313] 3. Confirmation by the receiving end.
[0314] The receiving end confirms whether to receive it. A Fluid Cloud confirmation card will pop up on the receiving end.
[0315] 4. Both ends conduct key negotiation.
[0316] The two ends negotiate the transmission key during P2P transmission.
[0317] 5. Both ends establish a P2P connection.
[0318] Both ends establish a P2P connection and perform corresponding data transmission based on the established P2P connection.
[0319] The device control method provided in the embodiment of the present application is based on the original AID process, and adds a method for the card reader to send data to the card end, so as to support NFC two-end two-way communication; use SAK to distinguish the status of the simulated card on the other end: the card reader uses SAK to distinguish the card type on the other end, and follows the corresponding NFC interaction process according to the card type; NFC interaction is performed based on Felica communication: when the simulated card on the other end does not support AID process interaction, the card reader can perform two-way interaction with the other end through Felica communication.
[0320] The device control method provided in the embodiment of the present application includes the following technical effects:
[0321] Smoother process: The one-way communication where only the card reader can read the card has evolved into two-way communication, which allows both ends to send their business data to each other, making subsequent business smoother;
[0322] Support access card simulation: When the original Android solution is simulating access cards on the simulated card side, it cannot perform AID process interaction because it recognizes that the card type is not supported. This method supports NFC interaction through Type Felica communication in this case, making the support range wider.
[0323] Those skilled in the art should understand that the relevant description of the above-mentioned electronic device in the embodiment of the present application can be understood by referring to the relevant description of the device control method in the embodiment of the present application.
[0324] A first terminal device in an embodiment of the present application, such as Fig.13 As shown, the first terminal device 1300 includes:
[0325] A first near field communication NFC module 1301 is configured to interact with a second terminal device through Bluetooth information;
[0326] The first Bluetooth module 1302 is configured to establish a Bluetooth connection with the second terminal device based on the interacted Bluetooth information, and interact with the target information through the Bluetooth connection;
[0327] The first target connection module 1303 is configured to establish a target connection with the second terminal device based on the interacted target information, and perform data transmission through the target connection.
[0328] In some embodiments, the first NFC module 1301 is further configured to receive first Bluetooth information and send second Bluetooth information, wherein the first Bluetooth information is Bluetooth information of the first terminal device and the second Bluetooth information is Bluetooth information of the second terminal device;
[0329] The first Bluetooth information and the second Bluetooth information are used to establish the Bluetooth connection.
[0330] In some embodiments, the role of the first NFC module 1301 is a card reader, and the first NFC module is further configured as:
[0331] Sending a card selection instruction to the second terminal device;
[0332] A selection confirmation parameter returned by the second terminal device in response to the selection instruction is received, where the selection confirmation parameter is used to determine whether the second NFC module supports transmission of the application AID.
[0333] In some embodiments, the first NFC module 1301 is further configured to:
[0334] In the case where the second NFC module in the second terminal device supports the transmission of the application AID,
[0335] Sending a first instruction to the second terminal device, where the first instruction includes the first Bluetooth information and first indication information, where the first indication information is used to indicate whether the first terminal device is in a scenario where the data transmission is allowed;
[0336] receiving a second instruction sent by the second terminal device in response to the first instruction, where the second instruction includes the second Bluetooth information and second indication information, where the second indication information is used to indicate whether the second terminal device is in a scenario where the data transmission is allowed;
[0337] Among them, if the first terminal device is in a scenario where the data transmission is allowed, and the second terminal device is in a scenario where the data transmission is allowed, the Bluetooth connection is established with the second terminal device based on the first Bluetooth information and the second Bluetooth information.
[0338] In some embodiments, the first NFC module 1301 is further configured to send a first instruction in a setting format to the second terminal device, where the first instruction includes a setting sequence.
[0339] In some embodiments, the first NFC module 1301 is further configured to:
[0340] In the case that the second NFC module in the second terminal device does not support the transmission of the application AID,
[0341] Sending a third instruction to the second terminal device, where the third instruction includes the first Bluetooth information and the NFC identifier of the second NFC module;
[0342] Receive a fourth instruction sent by the second terminal device, where the fourth instruction includes the second Bluetooth information and the NFC identifier of the second NFC module.
[0343] In some embodiments, the first NFC module 1301 is further configured to:
[0344] receiving a fifth instruction sent by the second terminal device in response to the third instruction, wherein the fifth instruction includes the NFC identifier of the second NFC module;
[0345] A sixth instruction is sent to the second terminal device, where the sixth instruction includes the NFC identifier of the second NFC module, and the sixth instruction is used to trigger the fourth instruction.
[0346] In some embodiments, the role of the first NFC module is to simulate the card terminal, and the first NFC module 1301 is further configured as:
[0347] receiving a card selection instruction sent by the second terminal device;
[0348] In response to the card selection instruction, a selection confirmation parameter is sent to the second terminal device, where the selection confirmation parameter is used to determine whether the first NFC module supports the transmission of the application AID.
[0349] In some embodiments, the first NFC module 1301 is further configured to:
[0350] In the case where the first NFC module supports transmission of the application AID,
[0351] receiving a second instruction sent by the second terminal device, where the second instruction includes the second Bluetooth information and second indication information, where the second indication information is used to indicate whether the second terminal device is in a scenario where the data transmission is allowed;
[0352] In response to the second instruction, sending a first instruction to the second terminal device, where the first instruction includes the first Bluetooth information and first indication information, where the first indication information is used to indicate whether the first terminal device is in a scenario where the data transmission is allowed;
[0353] Among them, if the first terminal device is in a scenario where the data transmission is allowed, and the second terminal device is in a scenario where the data transmission is allowed, the Bluetooth connection is established with the second terminal device based on the first Bluetooth information and the second Bluetooth information.
[0354] In some embodiments, the first NFC module 1301 is further configured to: receive a second instruction in a set format sent by the second terminal device, where the second instruction includes a set sequence.
[0355] In some embodiments, the first NFC module 1301 is further configured to:
[0356] In the case that the first NFC module does not support the transmission of the application AID,
[0357] Sending a third instruction to the second terminal device, where the third instruction includes the first Bluetooth information and the NFC identifier of the first NFC module;
[0358] Receive a fourth instruction sent by the second terminal device, where the fourth instruction includes the second Bluetooth information and the NFC identifier of the first NFC module.
[0359] In some embodiments, the first NFC module 1301 is further configured to:
[0360] receiving a fifth instruction sent by the second terminal device, where the fifth instruction includes the NFC identifier of the first NFC module, and the fifth instruction is used to trigger the third instruction;
[0361] In response to the fourth instruction, a sixth instruction is sent to the second terminal device, where the sixth instruction includes the NFC identifier of the first NFC module.
[0362] In some embodiments, the first NFC module 1301 is further configured to:
[0363] Receiving a security detection request sent by the second terminal device, where the role of the second NFC module in the second terminal device is a card reader;
[0364] In response to the security detection request, the NFC identifier of the first NFC module is sent to the second terminal device.
[0365] Fig.14 An optional implementation of the present application is provided as a structural diagram of an electronic device, such as Fig.14 As shown, the embodiment of the present application provides an electronic device 1400, including an electronic chip 1401, which can be implemented as a device control method as described in one or more embodiments above. The electronic chip can be implemented as a processor of an electronic device or as a microprocessor of a fast charging module.
[0366] An embodiment of the present application provides an electronic device, Fig.15 Another optional implementation provided in the embodiment of the present application is a structural diagram of an electronic device, such as Fig.15 As shown, an embodiment of the present application provides an electronic device 1500, including:
[0367] A processor 1501 and a storage medium 1502 storing executable instructions of the processor 1501, wherein the storage medium 1502 relies on the processor 1501 to perform operations through a communication bus 1503, and when the instructions are executed by the processor 1501, the device control method executed in one or more of the above embodiments is executed.
[0368] It should be noted that in actual application, the various components in the terminal are coupled together through the communication bus 1503. It is understandable that the communication bus 1503 is used to realize the connection and communication between these components. In addition to the data bus, the communication bus 1503 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Fig.15 Various buses are labeled as communication buses 1503.
[0369] An embodiment of the present application provides a computer storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program enables a computer to execute the steps of the device control method described in one or more of the above embodiments.
[0370] An embodiment of the present application provides a schematic structural diagram of an electronic device 1600. Fig.16 The electronic device 1600 shown includes a processor 1610 and a first NFC module 1611. The processor 1610 is configured to:
[0371] Interacting Bluetooth information with a second terminal device through the first NFC module;
[0372] Based on the interacted Bluetooth information, establish a Bluetooth connection with the second terminal device, and interact with the target information through the Bluetooth connection;
[0373] A target connection is established with the second terminal device based on the interacted target information, and data is transmitted through the target connection.
[0374] In the embodiment of the present application, the processor 1610 can call and run a computer program from the memory to implement the device control method in the embodiment of the present application.
[0375] Alternatively, if Fig.16 As shown, the electronic device 1600 may further include a memory 1620. The processor 1610 may call and run a computer program from the memory 1620 to implement the device control method in the embodiment of the present application.
[0376] The memory 1620 may be a separate device independent of the processor 1610 , or may be integrated into the processor 1610 .
[0377] Alternatively, if Fig.16 As shown, the electronic device 1600 may further include a transceiver 1630, and the processor 1610 may control the transceiver 1630 to communicate with other devices, specifically, to receive signals sent by other devices. Here, the transceiver may include at least two antennas.
[0378] It can be understood that the transceiver includes multiple physical paths for receiving signals or transmitting signals, and the physical elements on one or more physical paths for transmitting signals constitute a transmitter.
[0379] Optionally, the electronic device 1600 can implement the corresponding processes implemented by the electronic device in each method of the embodiment of the present application, and for the sake of brevity, it will not be repeated here. It should be understood that the processor of the embodiment of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor are combined to execute. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0380] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0381] It should be understood that the above-mentioned memory is exemplary but not restrictive. For example, the memory in the embodiments of the present application may also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM), etc. That is to say, the memory in the embodiments of the present application is intended to include but not limited to these and any other suitable types of memory.
[0382] An embodiment of the present application also provides a computer-readable storage medium for storing a computer program.
[0383] Optionally, the computer-readable storage medium can be applied to the electronic device in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the electronic device in the various methods of the embodiments of the present application. For the sake of brevity, they are not repeated here.
[0384] An embodiment of the present application also provides a computer program product, including computer program instructions.
[0385] Optionally, the computer program can be applied to the electronic device in the embodiments of the present application. When the computer program runs on a computer, the computer executes the corresponding processes implemented by the electronic device in the various methods of the embodiments of the present application. For the sake of brevity, they are not described here.
[0386] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0387] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0388] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0389] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0390] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0391] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0392] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A device control method, characterized in that: Applied to a first terminal device, the first terminal device includes a first near field communication NFC module, and the device control method includes: Interacting Bluetooth information with a second terminal device through the first NFC module; Based on the interacted Bluetooth information, establish a Bluetooth connection with the second terminal device, and interact with the target information through the Bluetooth connection; A target connection is established with the second terminal device based on the interacted target information, and data is transmitted through the target connection.
2. The method according to claim 1, characterized in that: The interacting with the second terminal device via the first NFC module via Bluetooth information includes: Through the first NFC module, a first Bluetooth message is sent, and a second Bluetooth message sent by the second terminal device is received, wherein the first Bluetooth message is the Bluetooth information of the first terminal device, and the second Bluetooth message is the Bluetooth information of the second terminal device; wherein the first Bluetooth message and the second Bluetooth message are used to establish the Bluetooth connection.
3. The method according to claim 2, characterized in that The role of the first NFC module is a card reader, and the method further includes: Sending a card selection instruction to the second terminal device through the first NFC module; A selection confirmation parameter returned by the second terminal device in response to the selection instruction is received through the first NFC module, where the selection confirmation parameter is used to determine whether the second NFC module supports transmission of the application AID.
4. The method according to claim 3, characterized in that The second NFC module in the second terminal device supports the transmission of the application AID, and the sending of the first Bluetooth information and the receiving of the second Bluetooth information through the first NFC module include: Sending a first instruction to the second terminal device through the first NFC module, where the first instruction includes the first Bluetooth information and first indication information, where the first indication information is used to indicate whether the first terminal device is in a scenario where the data transmission is allowed; receiving, through the first NFC module, a second instruction sent by the second terminal device in response to the first instruction, where the second instruction includes the second Bluetooth information and second indication information, where the second indication information is used to indicate whether the second terminal device is in a scenario where the data transmission is allowed; Among them, if the first terminal device is in a scenario where the data transmission is allowed, and the second terminal device is in a scenario where the data transmission is allowed, the Bluetooth connection is established with the second terminal device based on the first Bluetooth information and the second Bluetooth information.
5. The method according to claim 4, characterized in that The first instruction includes a setting sequence, and sending the first instruction to the second terminal device through the first NFC module includes: The first NFC module sends a first instruction of a set format to the second terminal device based on the set sequence.
6. The method according to claim 3, characterized in that The second NFC module in the second terminal device does not support the transmission of the application AID, and the sending of the first Bluetooth information through the first NFC module and the receiving of the second Bluetooth information include: Sending a third instruction to the second terminal device through the first NFC module, where the third instruction includes the first Bluetooth information and the NFC identifier of the second NFC module; A fourth instruction sent by the second terminal device is received through the first NFC module, where the fourth instruction includes the second Bluetooth information and the NFC identifier of the second NFC module.
7. The method according to claim 6, characterized in that The sending of the first Bluetooth information through the first NFC module and the receiving of the second Bluetooth information further includes: receiving, through the first NFC module, a fifth instruction sent by the second terminal device in response to the third instruction, wherein the fifth instruction includes the NFC identifier of the second NFC module; A sixth instruction is sent to the second terminal device through the first NFC module, the sixth instruction includes the NFC identifier of the second NFC module, and the sixth instruction is used to trigger the fourth instruction.
8. The method according to claim 6, characterized in that The method further comprises: Sending a security detection request to the second terminal device through the first NFC module; An NFC identifier of the second NFC module sent by the second terminal device in response to the security detection request is received through the first NFC module.
9. The method according to claim 2, characterized in that: The role of the first NFC module is to simulate a card terminal, and the method further includes: Receiving, via the first NFC module, a card selection instruction sent by the second terminal device; In response to the card selection instruction, a selection confirmation parameter is sent to the second terminal device through the first NFC module, where the selection confirmation parameter is used to determine whether the first NFC module supports the transmission of the application AID.
10. The method according to claim 9, characterized in that The first NFC module supports transmission of the application AID, and the sending of the first Bluetooth information and the receiving of the second Bluetooth information through the first NFC module include: receiving, through the first NFC module, a second instruction sent by the second terminal device, where the second instruction includes the second Bluetooth information and second indication information, where the second indication information is used to indicate whether the second terminal device is in a scenario where the data transmission is allowed; In response to the second instruction, sending a first instruction to the second terminal device through the first NFC module, where the first instruction includes the first Bluetooth information and first indication information, where the first indication information is used to indicate whether the first terminal device is in a scenario where the data transmission is allowed; Among them, if the first terminal device is in a scenario where the data transmission is allowed, and the second terminal device is in a scenario where the data transmission is allowed, the Bluetooth connection is established with the second terminal device based on the first Bluetooth information and the second Bluetooth information.
11. The method according to claim 10, characterized in that The second instruction includes a setting sequence, and the receiving, through the first NFC module, the second instruction sent by the second terminal device includes: The first NFC module receives a second instruction in a set format sent by the second terminal device.
12. The method according to claim 9, characterized in that The first NFC module does not support transmission of the application AID, and the sending of the first Bluetooth information through the first NFC module and the receiving of the second Bluetooth information include: Sending a third instruction to the second terminal device through the first NFC module, where the third instruction includes the first Bluetooth information and the NFC identifier of the first NFC module; A fourth instruction sent by the second terminal device is received through the first NFC module, where the fourth instruction includes the second Bluetooth information and the NFC identifier of the first NFC module.
13. The method according to claim 11, characterized in that The sending of the first Bluetooth information through the first NFC module and the receiving of the second Bluetooth information further includes: receiving, through the first NFC module, a fifth instruction sent by the second terminal device, where the fifth instruction includes the NFC identifier of the first NFC module, and the fifth instruction is used to trigger the third instruction; In response to the fourth instruction, a sixth instruction is sent to the second terminal device through the first NFC module, where the sixth instruction includes the NFC identifier of the first NFC module.
14. The method according to claim 12, characterized in that The method further comprises: Receiving, through the first NFC module, a security detection request sent by the second terminal device; In response to the security detection request, an NFC identifier of the first NFC module is sent to the second terminal device through the first NFC module.
15. A first terminal device, characterized in that: The first terminal device comprises: A first near field communication NFC module, configured to interact with a second terminal device through Bluetooth information; A first Bluetooth module is configured to establish a Bluetooth connection with the second terminal device based on the interacted Bluetooth information, and interact with the target information through the Bluetooth connection; The first target connection module is configured to establish a target connection with the second terminal device based on the interactive target information, and perform data transmission through the target connection.
16. An electronic device, comprising a processor and a first NFC module, characterized in that: The processor is configured to: Interacting Bluetooth information with a second terminal device through the first NFC module; Based on the interacted Bluetooth information, establish a Bluetooth connection with the second terminal device, and interact with the target information through the Bluetooth connection; A target connection is established with the second terminal device based on the interacted target information, and data is transmitted through the target connection.
17. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps in the device control method according to any one of claims 1 to 14 are implemented.
18. A storage medium storing an executable program, characterized in that: When the executable program is executed by a processor, the device control method according to any one of claims 1 to 14 is implemented.
19. A chip, comprising a processor, characterized in that: The processor is configured to execute the device control method according to any one of claims 1 to 14.