Data transmission method and device, electronic equipment and program product

By detecting and responding to custom NFC instructions in electronic devices, wireless communication connections between different manufacturers and devices are realized, which solves the problem that different manufacturers and devices in the prior art cannot transmit data, simplifies the process and improves the user experience.

CN119255216APending Publication Date: 2025-01-03GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411358986.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

Existing electronic devices only support NFC data transmission with devices from the same manufacturer, and cannot realize data transmission between different manufacturers.

Method used

By detecting the custom NFC instructions sent by adjacent devices, the NFC module is controlled to be in card simulation mode, so that electronic devices from different manufacturers can read device information and establish wireless communication connections to realize data transmission.

Benefits of technology

It simplifies the NFC data transmission process between electronic devices of different manufacturers, improves the user experience, and supports data transmission functions between different manufacturers and operating systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119255216A_ABST
    Figure CN119255216A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data transmission method and device, electronic equipment and a program product. The method is applied to first electronic equipment, the first electronic equipment comprises a first NFC module, and the method comprises the following steps: receiving a first NFC instruction sent by second electronic equipment under the condition that the second electronic equipment is detected to be close to the first electronic equipment; the first NFC instruction is a self-defined NFC instruction; in response to the first NFC instruction, the first NFC module is controlled to be in a card simulation mode, so that the second electronic equipment reads equipment information of the first electronic equipment from the first NFC module, and the equipment information is used for triggering the second electronic equipment to establish wireless communication connection with the first electronic equipment; and performing data transmission with the second electronic equipment through the wireless communication connection. In the embodiment of the application, the function of data transmission between electronic devices of different manufacturers through touch can be realized, and the interaction process of data transmission is simplified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a data transmission method, device, electronic equipment and program product. Background Art

[0002] In order to improve the convenience of users' lives, most electronic devices on the market have NFC (Near Field Communication) functions. Different electronic devices can support data transmission based on NFC technology under the "touch and pay" interactive operation, and can realize "touch and pay" file sharing, multimedia data sharing, etc. At present, most electronic devices only support "touch and pay" NFC data transmission with electronic devices from the same manufacturer, and cannot realize "touch and pay" NFC data transmission with electronic devices from different manufacturers. Summary of the invention

[0003] The embodiments of the present application provide a data transmission method, device, electronic device and program product, which can realize the function of data transmission by touch between electronic devices of different manufacturers and simplify the interactive process of data transmission.

[0004] The embodiment of the present application discloses a data transmission method, which is applied to a first electronic device, wherein the first electronic device includes a first NFC module, and the method includes:

[0005] When detecting that the second electronic device is close to the first electronic device, receiving a first NFC instruction sent by the second electronic device; the first NFC instruction is a custom NFC instruction;

[0006] In response to the first NFC instruction, control the first NFC module to be in a card emulation mode, so that the second electronic device reads device information of the first electronic device from the first NFC module, wherein the device information is used to trigger the second electronic device to establish a wireless communication connection with the first electronic device;

[0007] Data is transmitted with the second electronic device via the wireless communication connection.

[0008] The embodiment of the present application discloses a data transmission method, which is applied to a second electronic device, wherein the second electronic device includes a second NFC module, and the method includes:

[0009] sending a first NFC instruction through the second NFC module, wherein the first NFC instruction is a custom NFC instruction, so that when the second electronic device is close to the first electronic device, the first electronic device receives the first NFC instruction and controls the first NFC module in the first electronic device to be in a card emulation mode in response to the first NFC instruction; the first NFC module stores device information of the first electronic device;

[0010] Reading device information of the first electronic device from the first NFC module;

[0011] Based on the device information, establishing a wireless communication connection with the first electronic device;

[0012] Data is transmitted with the second electronic device via the wireless communication connection.

[0013] The embodiment of the present application discloses a data transmission device, which is applied to a first electronic device, wherein the first electronic device includes a first NFC module, and the device includes:

[0014] An NFC receiving module, configured to receive a first NFC instruction sent by the second electronic device when detecting that the second electronic device is close to the first electronic device; the first NFC instruction is a user-defined NFC instruction;

[0015] an NFC control module, configured to control the first NFC module to be in a card emulation mode in response to the first NFC instruction, so that the second electronic device reads device information of the first electronic device from the first NFC module, wherein the device information is used to trigger the second electronic device to establish a wireless communication connection with the first electronic device;

[0016] The first transmission module is used to perform data transmission with the second electronic device through the wireless communication connection.

[0017] The embodiment of the present application discloses a data transmission device, which is applied to a second electronic device, wherein the second electronic device includes a second NFC module, and the device includes:

[0018] an NFC sending module, configured to send a first NFC instruction through the second NFC module, wherein the first NFC instruction is a user-defined NFC instruction, so that when the second electronic device is close to the first electronic device, the first electronic device receives the first NFC instruction and controls the first NFC module in the first electronic device to be in a card emulation mode in response to the first NFC instruction; the first NFC module stores device information of the first electronic device;

[0019] A reading module, configured to read device information of the first electronic device from the first NFC module;

[0020] A connection module, configured to establish a wireless communication connection with the first electronic device based on the device information;

[0021] The second transmission module is used to perform data transmission with the second electronic device through the wireless communication connection.

[0022] An embodiment of the present application discloses an electronic device, including a memory, a processor, and a transceiver unit. The memory stores a computer program. When the computer program is executed by the processor, the electronic device implements the method described in any of the above embodiments.

[0023] An embodiment of the present application discloses a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor in an electronic device, the electronic device implements the method described in any of the above embodiments.

[0024] An embodiment of the present application discloses a computer program product, including a computer program. When the computer program is executed by a processor in an electronic device, the electronic device implements the method described in any of the above embodiments.

[0025] The data transmission method, device, electronic device and program product disclosed in the embodiment of the present application, when the first electronic device detects that the second electronic device is close to the first electronic device, receives the first NFC instruction sent by the second electronic device, the first NFC instruction is a customized NFC instruction, the first electronic device responds to the first NFC instruction, controls the first NFC module to be in the card simulation mode, so that the second electronic device reads the device information of the first electronic device from the first NFC module, the second electronic device can establish a wireless communication connection with the first electronic device based on the device information, and the first electronic device and the second electronic device can perform data transmission through the wireless communication connection. In the embodiment of the present application, when the first electronic device and the second electronic device are close to each other, the first electronic device can control the first NFC module to be in the card simulation mode according to the first NFC instruction sent by the second electronic device, realize the automatic switching of the mode of the first NFC module, so that the second electronic device can read the device information from the first NFC module and trigger the establishment of a wireless communication connection between the two electronic devices, simplify the interaction process of establishing a wireless communication connection between the two electronic devices based on the NFC technology, thereby simplifying the interaction process of data transmission, and the first electronic device has the function of identifying the first NFC instruction customized by the second electronic device, which can realize the function of data transmission between electronic devices of different manufacturers and / or different operating systems by touching, meet the user's use needs, and improve the user's use experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0027] Figure 1 An application scenario diagram of a data transmission method in an embodiment;

[0028] Figure 2 is a timing diagram of a data transmission method in one embodiment;

[0029] Figure 3 is a flow chart of a data transmission method in one embodiment;

[0030] Figure 4 is a flow chart of a data transmission method in another embodiment;

[0031] Figure 5A is a timing diagram of a data transmission method in another embodiment;

[0032] Figure 5B is a timing diagram of a data transmission method in another embodiment;

[0033] Figure 6 is a flow chart of a data transmission method in another embodiment;

[0034] Fig. 7A is a timing diagram of a data transmission method in another embodiment;

[0035] Figure 7B is a timing diagram of a data transmission method in another embodiment;

[0036] Figure 8 A schematic diagram of an interface showing an application jump component in an embodiment;

[0037] Fig.9A is a timing diagram of a data transmission method in another embodiment;

[0038] Fig. 9B is a timing diagram of a data transmission method in another embodiment;

[0039] Fig.10 is a flow chart of a data transmission method in another embodiment;

[0040] Fig.11 is a block diagram of a data transmission device in one embodiment;

[0041] Fig.12is a block diagram of a data transmission device in another embodiment;

[0042] Fig.13 FIG. 4 is a structural block diagram of an electronic device in an embodiment. DETAILED DESCRIPTION

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

[0044] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0045] It is understood that the terms "first", "second", etc. used in this application may be used in this article to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first electronic device may be referred to as a second electronic device, and similarly, a second electronic device may be referred to as a first electronic device. Both the first electronic device and the second electronic device are electronic devices, but they are not the same electronic device. The term "plurality" used in this application refers to two or more. The term "and / or" used in this application refers to one of the schemes, or any combination of multiple schemes.

[0046] The following are some explanations and descriptions of some terms that may be involved in this application:

[0047] NFC: It is an emerging technology that allows electronic devices to exchange data when they are close to each other.

[0048] Reader / Writer Mode: In this mode, the NFC device can be used as a reader / writer and can read the data written into the NFC tag.

[0049] Card Emulation (CE) mode: The NFC device is simulated as an NFC card and can communicate with the reader / writer.

[0050] Peer-to-Peer mode: Two NFC devices can both act as readers and NFC tags, and can use NFC technology to wirelessly interconnect and transmit data.

[0051] Type A: NFC-A, a type of NFC card defined in the ISO / IEC 14443 protocol of the NFC standard. When the reader transmits a signal to the NFC card, the signal is transmitted through a 13.56MHz radio frequency carrier, encoded using an improved Miller code, and modulated using 100% ASK (Amplitude Shift Keying).

[0052] Type B: NFC-B, a type of NFC card defined in the ISO / IEC 14443 protocol of the NFC standard. When the reader transmits a signal to the NFC card, the signal is transmitted through a 13.56MHz radio frequency carrier, encoded using NRZ code (Non-Return-to-Zero) and 10% ASK modulation.

[0053] Type F: NFC-F is a type of NFC card defined in the FeliCa protocol of the NFC standard.

[0054] Type V: NFC-V is a type of NFC card defined in the ISO / IEC 15693 protocol of the NFC standard. It is used to make up for the shortcomings of ISO / IEC 14443, such as insufficient communication distance and insufficient number of tags that can be read simultaneously.

[0055] Polling mode: The NFC device generates a carrier wave or a polling command to discover nearby NFC devices or NFC cards.

[0056] NDEF (NFC Data Exchange Format): is a standardized data format that can be used to exchange information between any compatible NFC device and another NFC device or NFC tag.

[0057] Figure 1 FIG. 1 is an application scenario diagram of a data transmission method in an embodiment. Figure 1 As shown, NFC communication can be performed between the first electronic device 110 and the second electronic device 120, and the first electronic device 110 and the second electronic device 120 may include but are not limited to mobile phones, wearable devices (such as smart watches, smart glasses, etc.), vehicle terminals, tablet computers, laptops, PCs (Personal Computers), smart home devices (such as televisions, speakers, etc.), and other devices.

[0058] The first electronic device 110 may include a first NFC module, and the second electronic device 120 may include a second NFC module. The first NFC module and the second NFC module may perform NFC communication.

[0059] In some embodiments, the first electronic device 110 and the second electronic device 120 may be electronic devices produced by different manufacturers, and / or, the first electronic device 110 and the second electronic device 120 may be electronic devices installed with different operating systems, for example, the first electronic device 110 may be an electronic device installed with an Android operating system, and the second electronic device 120 may be an electronic device installed with an IOS operating system, or the first electronic device 110 may be an electronic device installed with an Android operating system, and the second electronic device 120 may be an electronic device installed with a Windows operating system, etc., but not limited thereto. It should be noted that the first electronic device 110 and the second electronic device 120 may also be electronic devices produced by the same manufacturer, or electronic devices installed with the same operating system.

[0060] When the first electronic device is in a data transmission scenario, the data transmission scenario may refer to a scenario in which multimedia data transmission, file data transmission, etc. are performed between multiple electronic devices. The second electronic device 120 may send a first NFC instruction through the second NFC module, and the first NFC instruction may be a customized NFC instruction, for example, the first NFC instruction may be a customized NFC instruction of the manufacturer of the second electronic device 120, etc. When the first electronic device 110 detects that it is close to the second electronic device 120, for example, the top of the first electronic device 110 (such as the end with the handset, the front camera, etc.) touches the top of the second electronic device 120, that is, the first electronic device 110 and the second electronic device 120 perform a "touch and touch" interaction, etc., the first electronic device 110 may receive the first NFC instruction sent by the second electronic device. The first electronic device 110 may control the first NFC module to be in a card emulation mode in response to the first NFC instruction. The second electronic device 120 may read the device information of the first electronic device from the first NFC module through the second NFC module, and establish a wireless communication connection with the first electronic device 110 based on the device information.

[0061] The first electronic device 110 can perform data transmission with the second electronic device 120 through the wireless communication connection. The wireless communication connection established between the first electronic device 110 and the second electronic device 120 may include but is not limited to a Bluetooth communication connection and / or a Wi-Fi communication connection, etc., but is not limited thereto.

[0062] Optionally, the first electronic device 110 may be a data receiver in a data transmission scenario, the second electronic device 120 may be a data sender in the data transmission scenario, and the first electronic device 110 may receive data sent by the second electronic device 120 via a wireless communication connection.

[0063] Optionally, the first electronic device 110 may be a data sender in a data transmission scenario, the second electronic device 120 may be a data receiver in the data transmission scenario, and the first electronic device 110 may send data to the second electronic device 120 via a wireless communication connection.

[0064] Figure 2 FIG. 1 is a timing diagram of a data transmission method in one embodiment. Figure 2 As shown, the data transmission method may include the following steps:

[0065] Step 1: When a first electronic device and a second electronic device are close to each other, the first electronic device receives a first NFC instruction sent by the second electronic device.

[0066] Step 2: The first electronic device controls the first NFC module to be in a card emulation mode in response to the first NFC instruction.

[0067] Step 3: The second electronic device reads the device information of the first electronic device from the first NFC module through the second NFC module.

[0068] Step 4: The second electronic device establishes a wireless communication connection with the first electronic device based on the read device information.

[0069] Step 5: The first electronic device and the second electronic device perform data transmission via the established wireless communication connection.

[0070] like Figure 3 As shown, in one embodiment, a data transmission method is provided, which can be applied to the first electronic device mentioned above, and the method may include the following steps:

[0071] Step 310: When it is detected that the second electronic device is close to the first electronic device, a first NFC instruction sent by the second electronic device is received; the first NFC instruction is a user-defined NFC instruction.

[0072] The first electronic device may determine that it is in a data transmission scenario, in which data transmission may be performed between multiple electronic devices, such as multimedia data (such as photos, audio, video, voice, etc.) transmission, file transmission, etc., but not limited thereto. Further, in this data transmission, multiple electronic devices may exchange connection information through NFC technology, thereby establishing a wireless communication connection, and perform data transmission through the wireless communication connection.

[0073] In some embodiments, the first electronic device may be a data receiver, the second electronic device may be a data sender, and the first electronic device receives data sent by the second electronic device. In some embodiments, the first electronic device may also be a data sender, the second electronic device may be a data receiver, and the first electronic device sends data to the second electronic device.

[0074] When the first electronic device determines that it is in a data transmission scenario, it can monitor the first NFC instruction sent by the second electronic device. The second electronic device may include a second NFC module, and the second electronic device may send the first NFC instruction through the second NFC module. The first NFC instruction may be a customized NFC instruction, which can be distinguished from the NFC standard instruction and is an NFC instruction customized by the manufacturer of the electronic device according to the needs. Further, the first NFC instruction may be an NFC instruction customized by the manufacturer of the second electronic device. For example, the first NFC instruction may be an NFC polling instruction customized by the manufacturer of the second electronic device. The NFC polling instruction customized by the manufacturer of the second electronic device can be used to discover electronic devices that support NFC function and belong to the same manufacturer.

[0075] In an embodiment of the present application, the first electronic device may have the ability to monitor the first NFC instruction sent by the second electronic device, and the manufacturer of the second electronic device may not be the same manufacturer as the manufacturer of the first electronic device. The first electronic device may receive the NFC instruction sent by the second electronic device through the first NFC module, and identify whether the received NFC instruction is a customized first NFC instruction. It should be noted that the first electronic device can support monitoring of a manufacturer-defined first NFC instruction, and can also support monitoring of NFC instructions customized by multiple manufacturers, and is not limited to supporting monitoring of NFC instructions customized by a specific manufacturer.

[0076] When the first electronic device is in a data transmission scenario, the first electronic device can detect whether it is close to the second electronic device. Optionally, when the first electronic device is in a data transmission scenario, a detection signal can be periodically sent through the first NFC module to detect whether other electronic devices are close to the first electronic device. When an NFC coil is close to the outside of the first electronic device, the load of the first NFC module will change. The first electronic device can detect the load change, thereby determining that an NFC coil is close to the outside, and detecting that a second electronic device supporting the NFC function is close to the first electronic device.

[0077] When it is detected that the second electronic device is close to the first electronic device, the first electronic device may monitor the first NFC instruction to receive the first NFC instruction sent by the second electronic device.

[0078] Step 320, in response to the first NFC instruction, control the first NFC module to be in a card emulation mode, so that the second electronic device reads device information of the first electronic device from the first NFC module, and the device information is used to trigger the second electronic device to establish a wireless communication connection with the first electronic device.

[0079] In some embodiments, when a first electronic device receives a first NFC instruction sent by a second electronic device, it can identify the second electronic device as an electronic device from another manufacturer based on the first NFC instruction, and control the first NFC module to be in a card emulation mode, so that the second electronic device that belongs to a different manufacturer and / or has a different operating system from the first electronic device can accurately interact with the first electronic device through NFC information.

[0080] Furthermore, the first NFC module can be controlled to turn off the reader / writer mode and be in the card emulation mode only. The second NFC module of the second electronic device can be in the reader / writer mode and can read the device information stored in the first NFC module in the card emulation mode. By identifying the first NFC instruction sent by the second electronic device, the state of the first NFC module can be automatically switched, which simplifies the NFC interaction process between different electronic devices. Moreover, regardless of whether the first electronic device or the second electronic device is the data sender, the first electronic device can be fixed in the card emulation mode and the second electronic device can be fixed in the reader / writer mode, which ensures the consistency of processing in different data transmission directions.

[0081] In some embodiments, before the first electronic device receives the first NFC instruction sent by the second electronic device, in the case of a data transmission scenario, the first electronic device may write device information of the first electronic device to the first NFC module, wherein the device information may be used to trigger the second electronic device to establish a wireless communication connection with the first electronic device.

[0082] As an implementation manner, the first electronic device may write device information to the first NFC module in NDEF format, thereby facilitating the subsequent reading of the device information from the first NFC module by the second electronic device.

[0083] In some embodiments, the device information may include connection information of the first electronic device, for example, the connection information may include one or more of the Bluetooth address of the first electronic device, identification information of the wireless access point provided by the first electronic device, an access password, etc. After the second electronic device reads the connection information from the first NFC module through the second NFC module, it may establish a wireless communication connection with the first electronic device according to the connection information. For example, the second electronic device may connect to the wireless access point provided by the first electronic device according to the identification information and access password of the wireless access point provided by the first electronic device, thereby establishing a Wi-Fi communication connection with the first electronic device; the second electronic device may also initiate a Bluetooth connection to the first electronic device according to the Bluetooth address of the first electronic device, thereby establishing a Bluetooth communication connection with the first electronic device, etc., but is not limited thereto.

[0084] In some embodiments, the device information may include a device identification of the first electronic device, and the device identification may be used to identify the identity of the first electronic device. For example, the device identification may include a device ID (Identity document) of the first electronic device, a verification code, etc., and the device identification may be used to enable the second electronic device to verify the identity of the first electronic device. Further, the verification code may be a randomly generated string, such as a string composed of one or more randomly generated numbers, letters, symbols, etc. The first electronic device may write the device identification to the first NFC module, and the second electronic device may read the device identification from the first NFC module through the second NFC module, authenticate the first electronic device based on the read device identification, and establish a wireless communication connection with the first electronic device if the verification is successful.

[0085] In some embodiments, the device information is also used to trigger the second electronic device to establish a Bluetooth communication connection with the first electronic device, and to establish a Wi-Fi communication connection with the first electronic device based on the Bluetooth communication connection. After the second electronic device reads the device information from the first NFC module through the second NFC module, it can first establish a Bluetooth communication connection with the first electronic device based on the device information, and then establish a Wi-Fi communication connection with the first electronic device based on the Bluetooth communication connection.

[0086] Furthermore, after establishing a Bluetooth communication connection with the second electronic device, the first electronic device can send connection information corresponding to the wireless access point (such as identification information of the wireless access point, connection password, etc.) to the second electronic device through the Bluetooth communication connection, so that the second electronic device connects to the wireless access point according to the connection information and establishes a Wi-Fi communication connection with the first electronic device.

[0087] As an implementation mode, the above-mentioned Bluetooth communication connection may include a BLE connection, the above-mentioned Wi-Fi communication connection may be a WLAN (Wireless Local Area Networks) connection, and the above-mentioned wireless access point may be a wireless access point provided by the first electronic device, or it may be a wireless access point provided by other devices (such as a router, etc.) and connected to the first electronic device, which is not limited here.

[0088] The method in which the first electronic device and the second electronic device first establish a Bluetooth communication connection and then establish a Wi-Fi communication connection based on the Bluetooth communication connection can improve the security and stability of establishing a wireless communication connection between the two electronic devices, and using the Wi-Fi communication connection for data transmission can increase the data transmission speed and improve the user experience.

[0089] In an embodiment of the present application, when the first electronic device is in a data transmission scenario, the device information of the first electronic device can be written to the first NFC module, and when a first NFC instruction sent by the second electronic device is received, the first NFC module is controlled to be in a card emulation mode, so that the second NFC module of the second electronic device can read the device information of the first electronic device, thereby ensuring that the second electronic device and the first electronic device can accurately establish a wireless communication connection subsequently, thereby ensuring the stability and reliability of data transmission.

[0090] Step 330: Transmit data with a second electronic device via wireless communication connection.

[0091] The first electronic device and the second electronic device can perform data transmission through the established wireless communication connection. In some embodiments, the data transmission scenario can be a file sharing scenario, such as sharing photos, audio, video, files and other data between multiple electronic devices. Before sharing the file, the first electronic device and the second electronic device can first exchange file information of the file to be shared. The file information can be used to describe the file to be shared. Optionally, the file information may include information such as file type, file format, and file size. For example, if the file to be shared is a photo, the first electronic device and the second electronic device can first exchange file information of the photo, such as the file type is a photo, the file format is a JPEG (Joint Photographic Experts Group) format, and the size of the photo is 500*300, etc., but is not limited to this.

[0092] As an implementation mode, when the first electronic device determines that it is in a data transmission scenario, if the first electronic device is the data sender, the first electronic device can write the file information of the file to be shared into the first NFC module, so that after controlling the first NFC module to be in a card simulation state, the second electronic device can read the file information from the first NFC module through the second NFC module.

[0093] As another implementation, after the first electronic device and the second electronic device establish a wireless communication connection, or during the process of establishing a wireless communication connection, the first electronic device and the second electronic device may exchange file information of the file to be shared. By exchanging file information of the file to be shared between the two parties, the accuracy of subsequent data transmission can be further improved.

[0094] In an embodiment of the present application, when the first electronic device and the second electronic device are close to each other, the first electronic device can control the first NFC module to be in card emulation mode according to the first NFC instruction sent by the second electronic device, thereby realizing automatic switching of the mode of the first NFC module, so that the second electronic device can read the device information from the first NFC module and trigger the establishment of a wireless communication connection between the two electronic devices, thereby simplifying the interaction process of establishing a wireless communication connection between the two electronic devices based on NFC technology, thereby simplifying the interaction process of data transmission, and the first electronic device has the function of recognizing the first NFC instruction customized by the second electronic device, and can realize the function of data transmission through touch between electronic devices of different manufacturers and / or different operating systems, thereby meeting the user's usage needs and improving the user's usage experience.

[0095] like Figure 4 As shown, in another embodiment, a data transmission method is provided, which can be applied to the first electronic device mentioned above, and the method may include the following steps:

[0096] Step 402: In a data transmission scenario, write device information of a first electronic device into a first NFC module.

[0097] In some embodiments, the first electronic device may be a data sender in a data transmission scenario. The first electronic device may determine that the first electronic device is in a data transmission scenario in response to a data transmission operation.

[0098] The data transmission operation may include but is not limited to the operation of triggering the first electronic device to display a data transmission page, the triggering operation of the data transmission component contained in the displayed interface, etc. The data transmission page may refer to a page used to trigger data transmission, such as a photo sharing page, an audio sharing page, a file sharing page, etc. The data transmission component may include but is not limited to notifications, buttons, dialog boxes, etc. The user may trigger the first electronic device to perform data transmission by clicking on the data transmission component, etc.

[0099] As a physical implementation, the first electronic device can display a data transmission page to determine that it is in a data transmission scenario. When the first electronic device enters the data transmission page, it can be determined that it is in a data transmission scenario, and the device information of the first electronic device can be written to the first NFC module, and the subsequent NFC interaction process can be triggered, which can simplify user operations and improve user experience.

[0100] In some embodiments, when the first electronic device determines that it is in a data transmission scenario, it can register an NFC event and write the device information of the first electronic device into the first NFC module based on the NFC event.

[0101] The application used to implement data transmission in the first electronic device (such as a photo album, an audio playback application, a "touch and pay" interactive application, etc., but not limited thereto) can register an NFC event, and the registered NFC event can ensure that the application can interact with the first NFC module, so that the application can obtain the information of the first NFC module. The application can obtain the device information of the first electronic device, and write the device information to the first NFC module through the registered NFC event, ensuring the accurate writing of the device information, thereby ensuring that a wireless communication connection can be accurately established with the second electronic device and data transmission can be performed subsequently.

[0102] In this implementation, the first electronic device may be a data sender, thereby improving the flexibility of data transmission between electronic devices of different manufacturers and / or different operating systems.

[0103] In some embodiments, the first electronic device may be a data receiver in a data transmission scenario, and the second electronic device may be a data sender in a data transmission scenario. The second electronic device may determine that the second electronic device is in a data transmission scenario in response to a data transmission operation, and the second electronic device may send a first Bluetooth signal, and the first Bluetooth signal may carry a first identifier, and the first identifier is used to identify the data transmission scenario.

[0104] The data transmission operation performed on the second electronic device may be similar to the data transmission operation performed on the first electronic device, and will not be repeated here.

[0105] As a physical implementation, the second electronic device can display a data transmission page and send a first Bluetooth device. When the second electronic device enters the data transmission page, it can be determined that it is in a data transmission scenario and send a first Bluetooth signal carrying a first identifier.

[0106] Optionally, the first identifier can be one identifier or a combination of multiple identifiers, and the first identifier can identify a data transmission scenario, and further, the first identifier can identify a data transmission scenario for implementing data transmission based on NFC technology. The first identifier can be an identifier customized according to actual needs.

[0107] Exemplarily, the first identifier may include a UUID (Universally Unique Identifier), which may identify the signal type of the first Bluetooth signal. For data transmission scenarios, the corresponding UUID may be customized. For example, the UUID corresponding to the data transmission scenario may be 0x1234, etc., but is not limited to this.

[0108] The first electronic device can receive the first Bluetooth signal sent by the second electronic device, and determine that it is in a data transmission scenario based on the first identifier carried by the first Bluetooth signal, write the device information of the first electronic device to the first NFC module, and trigger the subsequent NFC interaction process.

[0109] In some embodiments, the first Bluetooth signal may include a BLE (Bluetooth Low Energy) broadcast signal. The first electronic device may scan the BLE broadcast signal. For example, the first electronic device may periodically scan the BLE broadcast signal, parse the received BLE broadcast signal, and determine whether the BLE broadcast signal carries the first identifier. If a BLE broadcast signal carrying the first identifier is identified, it can be determined that the data transmission scenario is in place based on the first identifier.

[0110] Optionally, when the first electronic device is in a screen-on state, the first Bluetooth signal carrying the first identifier may be scanned, thereby reducing unnecessary power consumption loss and improving the battery life of the first electronic device.

[0111] Optionally, the first electronic device may scan the first Bluetooth signal carrying the first identifier when the NFC interaction function is turned on. If the first electronic device does not turn on the NFC interaction function, it may not scan the first Bluetooth signal carrying the first identifier, thereby reducing unnecessary power consumption and improving the battery life of the first electronic device.

[0112] In some embodiments, the first electronic device receives a first Bluetooth signal sent by the second electronic device, and can determine the distance between the first electronic device and the second electronic device based on the signal strength of the first Bluetooth signal, and write device information to the first NFC module if the distance is less than or equal to a distance threshold.

[0113] The first electronic device receives the first Bluetooth signal sent by the second electronic device, and can first determine whether the first Bluetooth signal carries the first identifier. If it carries the first identifier, the distance between the first electronic device and the second electronic device can be calculated based on the signal strength of the first Bluetooth signal. The signal strength of the first Bluetooth signal may include but is not limited to RSSI (Received Signal Strength Indication). The greater the signal strength, the smaller the distance between the first electronic device and the second electronic device. The specific method of calculating the distance between the two electronic devices based on the signal strength of the first Bluetooth signal is not limited here.

[0114] The first electronic device can determine whether the distance between it and the second electronic device is less than a distance threshold. If the distance is less than the distance threshold, it means that the first electronic device is relatively close to the second electronic device, and the second electronic device is likely to transmit data with the first electronic device. In this case, the device information of the first electronic device can be written into the first NFC module, so that the second electronic device can read the device information of the first electronic device from the first NFC module and establish a wireless communication connection, thereby improving the accuracy of interaction based on NFC for data transmission.

[0115] As a specific implementation, an application of the first electronic device (such as an application supporting the NFC function) can register to monitor the first Bluetooth signal and configure the type of Bluetooth signal to be monitored, that is, the first identifier carried by the Bluetooth signal to be monitored. Optionally, the application of the first electronic device can register to monitor the first Bluetooth signal in a dynamic registration manner, so as to cancel the monitoring when the first Bluetooth signal does not need to be scanned, thereby reducing unnecessary overhead.

[0116] After the Bluetooth module of the first electronic device scans the first Bluetooth signal carrying the first identifier, the distance between the first electronic device and the second electronic device can be determined based on the signal strength corresponding to the first Bluetooth signal, and the signal content (such as the first identifier, etc.), signal strength, distance and other signals of the scanned first Bluetooth signal can be fed back to the application through a callback.

[0117] The application may monitor the callback sent by the Bluetooth module and determine whether the distance included in the callback of the Bluetooth module is less than the distance threshold. If it is less than the distance threshold, the application may write the device information of the first electronic device to the first NFC module.

[0118] In this embodiment, the first electronic device can be the data receiver, and the second electronic device as the data sender can trigger the first electronic device to write device information into the first NFC module by sending a first Bluetooth signal carrying a first identifier, thereby ensuring the subsequent accurate establishment of a wireless communication connection and data transmission, thereby improving the flexibility of data transmission between electronic devices from different manufacturers and / or different operating systems.

[0119] Step 404: Control the first NFC module to enter a silent state; the silent state refers to a state in which the first NFC module monitors the first NFC instruction and does not send an NFC instruction.

[0120] Step 406: When it is detected that the second electronic device is close to the first electronic device, a first NFC instruction sent by the second electronic device is received.

[0121] When the first electronic device determines that it is in a data transmission scenario, the first NFC module can be controlled to enter a silent state, which refers to a state in which the first NFC module listens to the first NFC instruction and does not send an NFC instruction. In the silent state, the first NFC module can receive and identify the first NFC instruction sent by the second electronic device, but will not respond to the first NFC instruction, nor actively send other NFC instructions to the outside.

[0122] Optionally, the silent state can be understood as a state in which the first NFC module specifically processes customized NFC instructions of other manufacturers (such as the manufacturer of the second electronic device) and / or other operating systems. By switching the first NFC module to the silent state, the first NFC module can be enabled to monitor the first NFC instruction, which can ensure that the first NFC module recognizes the first NFC instruction more attentively, avoid NFC interaction errors (such as performing erroneous or unnecessary NFC instruction interactions, etc.), and further improve the accuracy and stability of NFC interactions between electronic devices of different manufacturers and / or different operating systems.

[0123] In some embodiments, when the second electronic device is detected to be close to the first electronic device, the first NFC module can be controlled to enter a silent state and monitor the first NFC instruction sent by the second electronic device. When the second electronic device is not detected to be close to the first electronic device, the first NFC module may not enter the silent state first, but only enter the silent state when the second electronic device is detected to be close to the first electronic device, and monitor the first NFC instruction sent by the second electronic device. When it is determined that the first electronic device is to transmit data with the second electronic device, the first NFC instruction is monitored, thereby improving the accuracy of the state control and switching of the first NFC module.

[0124] Step 408: In response to the first NFC instruction, control the first NFC module to be in a card emulation mode, so that the second electronic device reads the device information of the first electronic device from the first NFC module, and the device information is used to trigger the second electronic device to establish a wireless communication connection with the first electronic device.

[0125] Step 410: Transmit data with a second electronic device via wireless communication connection.

[0126] The description of steps 408 to 410 may refer to the relevant description in the above embodiments, and will not be repeated here.

[0127] In some embodiments, after the first electronic device controls the first NFC module to enter the silent state, the duration of the first NFC module entering the silent state can be timed. If the duration of the first NFC module entering the silent state exceeds the first duration threshold, and the first NFC instruction sent by the second electronic device is still not received, it means that the second electronic device is most likely an NFC tag or an electronic device that only supports the NFC card emulation mode, that is, it is unable to realize data transmission with the first electronic device, and the silent state can be exited. By setting a timeout mechanism for the silent state, it can avoid the first NFC module being in the silent state for a long time, resulting in the inability to interact normally with other NFC devices, thereby improving the user experience.

[0128] For example, Figure 5A FIG. 1 is a timing diagram of a data transmission method in another embodiment. Figure 5A As shown, the first electronic device can enter the data transmission page, determine that it is in the data transmission scenario, and write device information to the first NFC module. The second electronic device can be in a bright screen state and can display any interface. Optionally, the second electronic device can display any interface other than the data transmission page. The second NFC module of the second electronic device can send a first NFC instruction. Optionally, the second NFC module can switch between a card reader mode and a card emulation mode, and send a first NFC instruction when in the card reader mode.

[0129] When the first electronic device and the second electronic device are "touched", the first electronic device can control the first NFC module to enter a silent state to listen to the first NFC instruction sent by the second electronic device. The first electronic device and the second electronic device remain in contact, and when the first electronic device receives the first NFC instruction, it can turn off the reader / writer mode of the first NFC module and enter the card emulation mode, so that the second NFC module in the reader / writer mode of the second electronic device can read the device information of the first electronic device from the first NFC module. The second electronic device can establish a wireless communication connection with the first electronic device based on the device information, and the first electronic device can transmit data to the second electronic device through the wireless communication connection.

[0130] For example, Figure 5B FIG. 1 is a timing diagram of a data transmission method in another embodiment. Figure 5B As shown, the second electronic device can enter the data transmission page and send a BLE broadcast carrying a first identifier, where the first identifier is used to identify the data transmission scenario. The first electronic device can be in a bright screen state and can display any interface. Optionally, the first electronic device can display any interface other than the data transmission page. The first electronic device can perform a BLE scan, receive a BLE broadcast sent by the second electronic device, and write device information to the first NFC module. The second NFC module of the second electronic device can send a first NFC instruction. Optionally, the second NFC module can switch between a card reader mode and a card emulation mode, and send a first NFC instruction when in a card reader mode.

[0131] When the first electronic device and the second electronic device are "touched", the first electronic device can control the first NFC module to enter a silent state to listen to the first NFC instruction sent by the second electronic device. The first electronic device and the second electronic device remain in contact, and when the first electronic device receives the first NFC instruction, it can turn off the reader / writer mode of the first NFC module and enter the card emulation mode, so that the second NFC module in the reader / writer mode of the second electronic device can read the device information of the first electronic device from the first NFC module. The second electronic device can establish a wireless communication connection with the first electronic device based on the device information, and the second electronic device can transmit data to the first electronic device through the wireless communication connection.

[0132] In an embodiment of the present application, when the first electronic device is in a data transmission scenario, device information can be written to the first NFC module, and the first NFC module can be controlled to enter a silent state. In this silent state, the first NFC module can receive and identify a first NFC instruction sent by the second electronic device, and does not send an NFC instruction to the outside, thereby ensuring that the first NFC module can more attentively identify the first NFC instruction, thereby avoiding NFC interaction errors (such as performing erroneous or unnecessary NFC instruction interactions, etc.), and the identity of the second electronic device (an electronic device from a different manufacturer and / or with a different operating system) can be accurately identified by using the first NFC instruction, thereby further improving the accuracy and stability of data transmission based on NFC interaction between electronic devices from different manufacturers and / or with different operating systems.

[0133] like Figure 6 As shown, in another embodiment, a data transmission method is provided, which can be applied to the first electronic device mentioned above, and the method may include the following steps:

[0134] Step 602: In a data transmission scenario, control the first NFC module to enter a first polling mode, and write device information of the first electronic device into the first NFC module; the first polling mode refers to a mode in which the first NFC module only sends a target polling instruction.

[0135] It should be noted that, for the description of the first electronic device determining that it is in the data transmission scenario and writing the device information of the first electronic device into the first NFC module, reference may be made to the relevant descriptions in the above embodiments, which will not be repeated here.

[0136] When the first electronic device is in a data transmission scenario, the first NFC module can be controlled to enter a first polling mode, which refers to a mode in which the first NFC module only sends a target polling instruction, wherein the target polling instruction is used to discover electronic devices that support the NFC function and can prevent the discovered electronic devices from entering the card simulation interaction process.

[0137] In some embodiments, in the first polling mode, the first NFC module may be in a reader / writer mode, and generate a radio frequency field and send a target polling instruction, which may be received by an NFC device or an NFC tag that enters the radio frequency field generated by the first NFC module. Further, the target polling instruction may be an NFC instruction that does not trigger the electronic device that receives the target polling instruction to enter a card emulation interaction process, wherein the card emulation interaction process may refer to an interaction process in which the electronic device switches to a card emulation state and sends a response signal (such as a response signal carrying an NFC card type, etc.) to the first NFC mode.

[0138] Optionally, the target polling instruction includes a Type V type polling instruction, or a single carrier signal. Furthermore, when controlling the first NFC module to enter the first polling mode, the Type A type, Type B type and Type F type polling functions of the first NFC module can be turned off, that is, Type A type, Type B type and Type F type instructions are not sent. The reason for turning off the Type A type, Type B type and Type F type polling functions of the first NFC module is that the Type A type, Type B type and Type F type polling instructions will cause the second electronic device that receives the polling instruction to enter the Type A type, Type B type and Type F type card simulation interaction process. If the second electronic device mistakenly enters the card simulation interaction process, the NFC card will be erroneously popped up (for example, a bank card, bus card, etc. will be erroneously popped up), and the completed NFC interaction process (such as interacting with connection information, establishing a wireless network connection and transmitting data, etc.) cannot be completed normally.

[0139] Optionally, the target polling instruction may be a Type V type polling instruction. Since most electronic devices currently do not have a Type V card emulation function, the Type V type polling instruction will not allow the second electronic device to enter the card emulation interaction process. It should be noted that, with the development of the NFC standard protocol, the target polling instruction may also be updated along with the NFC standard protocol.

[0140] Optionally, the target polling instruction may also be a single-carrier signal, which may not carry valid information or may carry relatively simple information. Then, the second electronic device receiving the single-carrier signal will not be triggered to enter the card simulation interaction process.

[0141] In some embodiments, in the first polling mode, the card emulation mode of the first NFC module can be retained, that is, the first NFC module can periodically switch between the reader / writer mode and the card emulation mode, and when the first NFC module is in the card emulation mode, the target polling instruction may not be found. By periodically switching between the reader / writer mode and the card emulation mode, it is convenient for the first electronic device to interact with the NFC card reader and the like, and the card emulation function of the first electronic device is realized, which can avoid that after the first NFC card enters the first polling mode, the NFC card reader or other electronic devices in the card reader mode cannot interact with the first NFC card normally, affecting the user experience.

[0142] In some embodiments, when the second electronic device is the data sender, the first electronic device receives a first Bluetooth signal sent by the second electronic device, and can determine the distance between the first electronic device and the second electronic device based on the signal strength of the first Bluetooth signal, and control the first NFC module to enter the first polling mode when the distance is less than or equal to the distance threshold.

[0143] When the distance between the first electronic device and the second electronic device is less than or equal to the distance threshold, it indicates that the first electronic device and the second electronic device are likely to perform data transmission. Then, when the distance is less than or equal to the distance threshold, the first electronic device may modify the hardware parameters of the first NFC module, turn off the Type A, Type B and Type F polling functions of the first NFC module, retain only the Type V polling function or send a single carrier signal, and write the device information of the first electronic device into the first NFC module.

[0144] In some embodiments, in order to improve the accuracy of identifying the first Bluetooth signal, the first Bluetooth signal may also include a second identifier, which can be used to characterize that the second electronic device is in an NFC interaction scenario. Through the first identifier and the second identifier, the first electronic device can accurately determine that the first Bluetooth signal is sent by the second electronic device in a data transmission scenario that realizes data transmission based on NFC interaction. The distance between the first electronic device and the second electronic device can be determined based on the signal strength of the first Bluetooth signal.

[0145] Exemplarily, the second identifier may also be a customized identifier, and the same second identifier may correspond to different NFC interaction scenarios. For example, the second identifier may be 0x1122334455, or 0x5544332211, etc., but is not limited thereto. By combining the first identifier with the second identifier, the first Bluetooth signal may be accurately identified and distance measurement may be performed based on the first Bluetooth signal, thereby improving the accuracy of triggering the first NFC module to enter the first polling mode and improving the accuracy of state switching of the first NFC module.

[0146] The first electronic device can determine the distance between itself and the second electronic device based on the first Bluetooth signal sent by the second electronic device, and control the first NFC module to enter the first polling mode when the distance is less than the distance threshold, thereby avoiding erroneous switching of the polling mode and improving the control accuracy of the first NFC module.

[0147] Step 604: When it is detected that the second electronic device is close to the first electronic device, the first NFC module is controlled to stop sending the target polling instruction, and the first NFC module is controlled to enter a silent state; the silent state refers to a state in which the first NFC module listens to the first NFC instruction and does not send an NFC instruction.

[0148] When the first electronic device detects that the second electronic device is approaching, for example, when it is detected that the first electronic device and the second electronic device perform a "touch and pay" interactive operation, the first NFC module can be controlled to stop sending the target polling instruction, and the first NFC module can be controlled to enter a silent state to monitor the first NFC instruction sent by the second electronic device.

[0149] Optionally, the first NFC instruction may be a Type V NFC instruction customized by a manufacturer of the second electronic device.

[0150] Step 606: Receive a first NFC instruction sent by the second electronic device.

[0151] Step 608: In response to the first NFC instruction, control the first NFC module to be in a card emulation mode, so that the second electronic device reads the device information of the first electronic device from the first NFC module, and the device information is used to trigger the second electronic device to establish a wireless communication connection with the first electronic device.

[0152] Step 610: Transmit data with a second electronic device via wireless communication connection.

[0153] For the description of steps 606 to 610 , reference may be made to the relevant description in the above embodiments, which will not be repeated here.

[0154] In some embodiments, when the exit condition is met, the first electronic device can control the first NFC module to switch from the first polling mode to the second polling mode, where the second polling mode refers to a mode in which the first NFC mode sends polling instructions of multiple NFC card types in turn.

[0155] Furthermore, the multiple NFC card types may include multiple types of Type A, Type B, Type F, and Type V.

[0156] The exit condition may refer to a condition that triggers exiting the first polling mode. Optionally, the exit condition may include but is not limited to one or more of the following conditions:

[0157] (1) After the first NFC module enters the silent state, it has not received the first NFC instruction sent by the second electronic device, and the duration of entering the silent state exceeds a first duration threshold.

[0158] (2) The duration during which the first NFC module fails to receive the first NFC instruction sent by the second electronic device exceeds a second duration threshold.

[0159] (3) The distance between the first electronic device and the second electronic device is greater than a distance threshold.

[0160] In some embodiments, the signal strength of the first Bluetooth signal received by the first electronic device may change frequently due to obstacles or movement of the electronic device during the transmission of the first Bluetooth signal. Therefore, the first electronic device can determine the distance between the first electronic device and the second electronic device according to the multiple receptions of the first Bluetooth signal, and perform smoothing according to the distances corresponding to the multiple first Bluetooth signals, and determine whether to exit the first polling mode according to the result of the smoothing process.

[0161] Optionally, a smoothing coefficient may be set, and the distances corresponding to the first Bluetooth signals are smoothed based on the smoothing coefficient. Further, multiple distances greater than the distance threshold are smoothed based on the smoothing coefficient, and it is determined whether to control the first NFC module to exit the first polling mode according to the result of the smoothing process.

[0162] As a specific implementation, after receiving the first Bluetooth signal and determining the distance between the first electronic device and the second electronic device according to the first Bluetooth signal, the first electronic device can determine whether the distance is greater than a distance threshold. If the distance is greater than the distance threshold, the distance can be multiplied by a smoothing coefficient to obtain a multiplication result. It can be determined whether the multiplication result is greater than a target distance. If the multiplication result is greater than the target distance, the first NFC module can be controlled to exit the first polling mode and switch from the first polling mode to the second polling mode.

[0163] If the multiplication result is not greater than the target distance, the multiplication result can be recorded, and when the first Bluetooth signal is received next time, the distance corresponding to the first Bluetooth signal received next time is determined. If the distance corresponding to the first Bluetooth signal received next time is greater than the distance threshold, the multiplication result can be multiplied by the smoothing coefficient to obtain a new multiplication result. The step of determining whether the multiplication result is greater than the target distance can be re-executed until the multiplication result is greater than the target distance, then the first NFC module can be controlled to exit the first polling mode, or the distance corresponding to the first Bluetooth signal received next time is not greater than the distance threshold, then the recorded multiplication result can be cleared.

[0164] The target distance mentioned above may be determined according to a distance threshold. Optionally, the target distance may be a multiple of the distance threshold, such as the target distance may be twice the distance threshold.

[0165] In this implementation, the distances corresponding to the first Bluetooth signals may be smoothed for multiple times, and whether to control the first NFC module to exit the first polling mode may be determined based on the smoothed result, thereby improving the accuracy of controlling the state switching of the first NFC module.

[0166] In some embodiments, a protection duration corresponding to the first polling mode may be set, and the protection duration may refer to the duration during which the first NFC module is not allowed to exit the first polling mode after entering the first polling mode. The protection duration may be set according to actual needs, such as 30 seconds, 1 minute, etc., but is not limited thereto. After the duration of the first NFC module entering the first polling mode exceeds the protection duration, it may be determined whether to control the first NFC module to exit the first polling mode according to the distance between the first electronic device and the second electronic device, so as to avoid the first NFC module switching too frequently between different polling modes, resulting in unnecessary power consumption loss.

[0167] When the exit conditions are met, the first electronic device can control the first NFC module to switch from the first polling mode to the second polling mode. After switching to the second polling mode, the first NFC module can interact with NFC tags, electronic devices that only support card emulation mode, and electronic devices from the same manufacturer or the same operating system, so as to meet NFC usage requirements in different scenarios.

[0168] For example, for example, Fig. 7A FIG. 1 is a timing diagram of a data transmission method in another embodiment. Fig. 7A As shown, the first electronic device can enter the data transmission page, write device information to the first NFC module, and turn off the Type A, Type B and Type F polling functions of the first NFC module, retaining only the Type V polling function or continuously sending a single carrier signal. The second electronic device can be in a bright screen state and can display any interface. The second NFC module of the second electronic device can send a first NFC instruction. Optionally, the second NFC module can switch between a card reader mode and a card emulation mode, and send a first NFC instruction when in the card reader mode.

[0169] When the first electronic device and the second electronic device are "touched", the first electronic device can control the first NFC module to enter a silent state to listen to the first NFC instruction sent by the second electronic device. The first electronic device and the second electronic device remain in contact, and when the first electronic device receives the first NFC instruction, it can turn off the reader / writer mode of the first NFC module and enter the card emulation mode, so that the second NFC module in the reader / writer mode of the second electronic device can read the device information of the first electronic device from the first NFC module. The second electronic device can establish a wireless communication connection with the first electronic device based on the device information, and the first electronic device can transmit data to the second electronic device through the wireless communication connection.

[0170] For example, Figure 7B FIG. 1 is a timing diagram of a data transmission method in another embodiment. Figure 7BAs shown, the second electronic device can enter the data transmission page and send a BLE broadcast carrying a first identifier, which is used to identify the data transmission scenario. The first electronic device can be in a bright screen state and can display any interface. The first electronic device can perform a BLE broadcast scan and receive a BLE broadcast sent by the second electronic device. When the first electronic device determines that the distance between it and the second electronic device is less than the distance threshold according to the BLE broadcast, it can write device information to the first NFC module and turn off the Type A, Type B and Type F polling functions of the first NFC module, retaining only the Type V polling function or continuously sending a single carrier signal. The second NFC module of the second electronic device can send a first NFC instruction. Optionally, the second NFC module can switch between a card reader mode and a card emulation mode, and send a first NFC instruction when in the card reader mode.

[0171] When the first electronic device and the second electronic device are "touched", the first electronic device can control the first NFC module to enter a silent state to listen to the first NFC instruction sent by the second electronic device. The first electronic device and the second electronic device remain in contact, and when the first electronic device receives the first NFC instruction, it can turn off the reader / writer mode of the first NFC module and enter the card emulation mode, so that the second NFC module in the reader / writer mode of the second electronic device can read the device information of the first electronic device from the first NFC module. The second electronic device can establish a wireless communication connection with the first electronic device based on the device information, and the first electronic device can transmit data to the second electronic device through the wireless communication connection.

[0172] In an embodiment of the present application, when the first electronic device is in a data transmission scenario, the first NFC module can be controlled to enter a first polling mode. In the first polling mode, the first NFC module can only send a target polling instruction to generate a radio frequency field to discover the electronic device, and will not allow the electronic device entering the radio frequency field to mistakenly enter the card simulation interaction process, thereby avoiding the situation of erroneous card ejection, and can ensure that the second electronic device and the first electronic device accurately establish a wireless communication connection and perform data transmission, thereby improving the success rate of data transmission.

[0173] In some embodiments, the device information written by the first electronic device to the first NFC module may include a device identification. The above method may also include: when detecting that the second electronic device is close to the first electronic device, sending a second Bluetooth signal carrying the device identification so that the second electronic device receives the second Bluetooth signal, and when determining that the device identification carried by the second Bluetooth signal is consistent with the device identification read from the first NFC module, establishing a wireless communication connection with the first electronic device.

[0174] When the first electronic device detects that it is in proximity with the second electronic device, such as detecting a "touch and click" interactive operation with the second electronic device, a second Bluetooth signal carrying the device identification of the first electronic device may be sent. For example, a second Bluetooth signal carrying the device ID of the first electronic device may be sent.

[0175] The second electronic device can receive the second Bluetooth signal sent by the first electronic device, and compare the device identification carried by the second Bluetooth signal with the device identification read from the first NFC module. If the device identification carried by the second Bluetooth signal is consistent with the device identification read from the first NFC module, a wireless communication connection is established with the first electronic device.

[0176] In one embodiment, the second Bluetooth device may include a BLE broadcast signal. After the second electronic device reads the device information stored in the first NFC module through the second NFC module, it can perform a BLE broadcast signal scan, thereby scanning the BLE broadcast signal sent by the first electronic device. The second electronic device can parse the received BLE broadcast signal to obtain the device identification carried in the BLE broadcast signal, and then compare the device identification carried in the BLE broadcast signal with the device identification read from the first NFC module. If the two are consistent, the second electronic device can determine that the BLE broadcast signal is a BLE broadcast signal sent by the first electronic device, and the second electronic device can establish a Bluetooth communication connection with the first electronic device based on the BLE broadcast signal. For example, the second electronic device can initiate a GATT (Generic Attribute Profile) connection to the first electronic device based on the BLE broadcast signal. By carrying the second Bluetooth signal of the device identification of the first electronic device, it can help to establish a wireless communication connection between the two electronic devices more accurately, thereby improving the accuracy and security of data transmission.

[0177] In some embodiments, the device information written by the first electronic device to the first NFC module may also include link information, which can be used to trigger the second electronic device to jump to the mutual transmission application and scan the second Bluetooth signal sent by the first electronic device.

[0178] The mutual transmission application may be an application that supports the second electronic device and the first electronic device to realize data transmission based on NFC interaction. The mutual transmission application may be responsible for establishing a wireless communication connection and data transmission between the second electronic device and the first electronic device. The link information may be a link address corresponding to the mutual transmission application. The second electronic device may directly jump to the mutual transmission application by triggering the link address corresponding to the mutual transmission application.

[0179] Optionally, the link information may also be a link address of an application jump component for jumping to the mutual transfer application, and the second electronic device may display the application jump component by triggering the link address of the application jump component. The application jump component may refer to a component for prompting the user to jump to the mutual transfer application, for example, it may be a prompt card, notification, prompt box, etc.

[0180] As an implementation method, after the second electronic device reads the link information from the first NFC module through the second NFC module, it can display the application jump component according to the link information. The user can choose whether to perform a jump operation on the application jump component according to actual needs. If the second electronic device detects that a jump operation is performed on the application jump component, it can respond to the jump operation on the application jump component and jump to the mutual transfer application.

[0181] When the second electronic device jumps to the mutual transmission application, the mutual transmission application can call the Bluetooth module to scan the second Bluetooth signal sent by the first electronic device. Figure 8 FIG. 1 is a schematic diagram of an interface showing an application jump component in an embodiment. Figure 8 As shown, when the second electronic device displays any interface (such as desktop 810), the second electronic device is close to the first electronic device, and the second electronic device reads the device information of the first electronic device, such as device identification, link information, etc., from the first NFC module of the first electronic device through the second NFC module. The second electronic device can display the application jump component 820 based on the link information. The application jump component 820 can be used to prompt the jump to the NFC mutual transmission application. The user can choose whether to jump to the NFC mutual transmission application, such as clicking the OK button to choose to jump to the NFC mutual transmission application, or click the Cancel button. If the second electronic device detects a jump operation for the application jump component 820 (such as the user clicking the OK button), it can jump to the NFC mutual transmission application and scan the second Bluetooth signal sent by the first electronic device.

[0182] It should be noted that the transferred mutual transmission application can be run in the foreground or in the background of the second electronic device, which is not limited here.

[0183] In this embodiment, the first electronic device can trigger the second electronic device that reads the link information to jump to the mutual transmission application by writing the link information to the first NFC module, and scan the second Bluetooth signal sent by the first electronic device, so that the first electronic device and the second electronic device can successfully establish a wireless communication connection and exchange data. In addition, the second electronic device can prompt the user of the jump status by displaying the application jump component, thereby improving the user's experience.

[0184] Optionally, during the process of establishing a Bluetooth communication connection between the second electronic device and the first electronic device, or after the second electronic device and the first electronic device establish a Bluetooth communication connection, the second electronic device can also perform identity verification on both sides according to the verification code read from the first NFC module. Exemplarily, the second electronic device and the first electronic device can exchange verification codes, the second electronic device sends the read verification code to the first electronic device, and the first electronic device sends the stored verification code to the second electronic device, and the two can compare whether they are consistent. If they are consistent, it is determined that the identity verification of the other party has passed.

[0185] In some embodiments, the first electronic device can create a wireless access point, and after establishing a Bluetooth communication connection with the second electronic device, the first electronic device can send the identification information, access password and other access point information of the wireless access point to the second electronic device through the Bluetooth communication connection, such as the SSID (Service Set Identifier) ​​and access password of the wireless access point. The second electronic device can connect to the wireless access point provided by the first electronic device based on the access point information and establish a Wi-Fi communication connection with the first electronic device. Data can be transmitted between the first electronic device and the second electronic device through the Wi-Fi communication connection.

[0186] For example, Fig.9A FIG. 1 is a timing diagram of a data transmission method in another embodiment. Fig.9A As shown, the first electronic device can enter the data transmission page, write device information to the first NFC module, and turn off the Type A, Type B and Type F polling functions of the first NFC module, retaining only the Type V polling function or continuously sending a single carrier signal. The second electronic device can be in a bright screen state and can display any interface. The second NFC module of the second electronic device can send a first NFC instruction. Optionally, the second NFC module can switch between a card reader mode and a card emulation mode, and send a first NFC instruction when in the card reader mode.

[0187] When the first electronic device and the second electronic device are "touched", the first electronic device can control the first NFC module to enter a silent state to listen to the first NFC instruction sent by the second electronic device. The first electronic device and the second electronic device remain in contact, and when the first electronic device receives the first NFC instruction, it can turn off the reader / writer mode of the first NFC module and enter the card simulation mode, so that the second NFC module in the reader / writer mode of the second electronic device can read the device information of the first electronic device from the first NFC module. The first electronic device can send a BLE broadcast carrying a device identifier, and the second electronic device scans the BLE broadcast, and when it is confirmed that the device identifier carried by the BLE broadcast is consistent with the device identifier read from the first NFC module, it establishes a Bluetooth communication connection with the first electronic device and establishes a Wi-Fi communication connection. Data transmission between the first electronic device and the second electronic device can be carried out through a Wi-Fi communication connection.

[0188] For example, Fig. 9B FIG. 1 is a timing diagram of a data transmission method in another embodiment. Fig. 9B As shown, the second electronic device can enter the data transmission page and send a BLE broadcast carrying a first identifier, which is used to identify the data transmission scenario. The first electronic device can be in a bright screen state and can display any interface. The first electronic device can perform a BLE broadcast scan and receive a BLE broadcast sent by the second electronic device. When the first electronic device determines that the distance between it and the second electronic device is less than the distance threshold according to the BLE broadcast, it can write device information to the first NFC module and turn off the Type A, Type B and Type F polling functions of the first NFC module, retaining only the Type V polling function or continuously sending a single carrier signal. The second NFC module of the second electronic device can send a first NFC instruction. Optionally, the second NFC module can switch between a card reader mode and a card emulation mode, and send a first NFC instruction when in the card reader mode.

[0189] When the first electronic device and the second electronic device are "touched", the first electronic device can control the first NFC module to enter a silent state to listen to the first NFC instruction sent by the second electronic device. The first electronic device and the second electronic device remain in contact, and when the first electronic device receives the first NFC instruction, it can turn off the reader / writer mode of the first NFC module and enter the card simulation mode, so that the second NFC module in the reader / writer mode of the second electronic device can read the device information of the first electronic device from the first NFC module. The first electronic device can send a BLE broadcast carrying a device identifier, and the second electronic device scans the BLE broadcast, and when it is confirmed that the device identifier carried by the BLE broadcast is consistent with the device identifier read from the first NFC module, it establishes a Bluetooth communication connection with the first electronic device and establishes a Wi-Fi communication connection. Data transmission between the first electronic device and the second electronic device can be carried out through a Wi-Fi communication connection.

[0190] In the embodiments of the present application, the NFC interaction process for "touch and pay" data transmission is unified between electronic devices of different manufacturers and / or different operating systems, the operation of "touch and pay" data transmission is simplified, and regardless of whether the first electronic device is a data sender or a data receiver, the NFC interaction logic is the same, thereby ensuring the consistency of the NFC interaction.

[0191] like Fig.10 As shown, in one embodiment, another data transmission method is provided, which can be applied to the second electronic device mentioned above, and the method may include the following steps:

[0192] Step 1010, sending a first NFC instruction through the second NFC module, where the first NFC instruction is a customized NFC instruction, so that when the second electronic device is close to the first electronic device, the first electronic device receives the first NFC instruction and controls the first NFC module in the first electronic device to be in a card emulation mode in response to the first NFC instruction; the first NFC module stores device information of the first electronic device.

[0193] Step 1020: Read device information of the first electronic device from the first NFC module.

[0194] Step 1030: Establish a wireless communication connection with the first electronic device based on the device information.

[0195] Step 1040: Transmit data with a second electronic device via wireless communication connection.

[0196] In some embodiments, before step 1010, the method also includes: displaying a data transmission page; sending a first Bluetooth signal, the first Bluetooth signal carrying a first identifier, the first identifier being used to identify a data transmission scenario, so that the first electronic device determines that it is in a data transmission scenario according to the first identifier carried by the first Bluetooth signal.

[0197] In some embodiments, the first Bluetooth signal is used to instruct the first electronic device to determine the distance between the first electronic device and the second electronic device based on the signal strength of the first Bluetooth signal, and control the first NFC module to enter the first polling mode when the distance is less than or equal to the distance threshold.

[0198] In some embodiments, the device information includes a device identification; step 1030 includes: receiving a second Bluetooth signal sent by the first electronic device, the second Bluetooth signal carrying a device identification; comparing the device identification carried by the second Bluetooth signal with the device identification read from the first NFC module; if the device identification carried by the second Bluetooth signal is consistent with the device identification read from the first NFC module, establishing a wireless communication connection with the first electronic device.

[0199] In some embodiments, the device information also includes link information; after step 1020, the method also includes: displaying an application jump component based on the link information, the application jump component is used to indicate a jump to the mutual transmission application; in response to a jump operation on the application jump component, jumping to the mutual transmission application, and scanning a second Bluetooth signal sent by the first electronic device.

[0200] In some embodiments, step 1030 may include: establishing a Bluetooth communication connection with the first electronic device based on the device information; establishing a Wi-Fi communication connection with the first electronic device based on the Bluetooth communication connection; step 1040 may include: transmitting data with the second electronic device via the Wi-Fi communication connection.

[0201] In some embodiments, the step of establishing a Wi-Fi communication connection with the first electronic device based on the Bluetooth communication connection includes: receiving connection information corresponding to the wireless access point sent by the first electronic device through the Bluetooth communication connection; connecting the wireless access point according to the connection information to establish a Wi-Fi communication connection with the first electronic device.

[0202] It should be noted that the description of the data transmission method applied to the second electronic device provided in the embodiment of the present application can refer to the relevant description of the data transmission method applied to the first electronic device provided in the above embodiment, and will not be repeated here.

[0203] In an embodiment of the present application, when the first electronic device and the second electronic device are close to each other, the first electronic device can control the first NFC module to be in card emulation mode according to the first NFC instruction sent by the second electronic device, thereby realizing automatic switching of the mode of the first NFC module, so that the second electronic device can read the device information from the first NFC module and trigger the establishment of a wireless communication connection between the two electronic devices, thereby simplifying the interaction process of establishing a wireless communication connection between the two electronic devices based on NFC technology, thereby simplifying the interaction process of data transmission, and the first electronic device has the function of recognizing the first NFC instruction customized by the second electronic device, and can realize the function of data transmission through touch between electronic devices of different manufacturers and / or different operating systems, thereby meeting the user's usage needs and improving the user's usage experience.

[0204] like Fig.11 As shown, in one embodiment, a data transmission device 1100 is provided, which can be applied to the first electronic device mentioned above. The data transmission device 1100 includes an NFC receiving module 1110 , an NFC control module 1120 and a first transmission module 1130 .

[0205] The NFC receiving module 1110 is used to receive a first NFC instruction sent by the second electronic device when it is detected that the second electronic device is close to the first electronic device; the first NFC instruction is a user-defined NFC instruction.

[0206] The NFC control module 1120 is used to control the first NFC module to be in a card emulation mode in response to the first NFC instruction, so that the second electronic device reads the device information of the first electronic device from the first NFC module, and the device information is used to trigger the second electronic device to establish a wireless communication connection with the first electronic device.

[0207] The first transmission module 1130 is used to perform data transmission with the second electronic device through wireless communication connection.

[0208] In one embodiment, the NFC control module 1120 is further used to control the first NFC module to enter a silent state; the silent state refers to a state in which the first NFC module monitors the first NFC instruction and does not send an NFC instruction.

[0209] In one embodiment, the NFC control module 1120 is further configured to control the first NFC module to enter a silent state when detecting that the second electronic device is close to the first electronic device.

[0210] In one embodiment, the data transmission device 1100 further includes a writing module.

[0211] The writing module is used to write the device information of the first electronic device into the first NFC module in the case of a data transmission scenario.

[0212] In one embodiment, the NFC control module 1120 is also used to control the first NFC module to enter a first polling mode in a data transmission scenario; the first polling mode refers to a mode in which the first NFC module only sends a target polling instruction, and the target polling instruction is used to discover electronic devices that support the NFC function and can prevent the discovered electronic devices from entering the card simulation interaction process; and is used to control the first NFC module to stop sending the target polling instruction when it is detected that the second electronic device is close to the first electronic device.

[0213] In one embodiment, the data transmission device 1100 further includes a scene determination module.

[0214] The scene determination module is used to display the data transmission page and determine the data transmission scene.

[0215] In one embodiment, the scene determination module is further used to receive a first Bluetooth signal sent by a second electronic device; the first Bluetooth signal is sent when the second electronic device displays a data transmission page; the first Bluetooth signal carries a first identifier, and the first identifier is used to identify a data transmission scene; and is used to determine that the data transmission scene is in accordance with the first identifier carried by the first Bluetooth signal.

[0216] In one embodiment, the data transmission device 1100 further includes a distance measurement module.

[0217] The distance measuring module is used to determine the distance between the first electronic device and the second electronic device according to the signal strength of the first Bluetooth signal.

[0218] The NFC control module 1120 is further configured to control the first NFC module to enter a first polling mode when the distance is less than or equal to a distance threshold.

[0219] In one embodiment, the target polling instruction includes a Type V polling instruction, or a single carrier signal.

[0220] In one embodiment, the NFC control module 1120 is further used to control the first NFC module to switch from the first polling mode to the second polling mode when the exit condition is met, and the second polling mode refers to a mode in which the first NFC mode sends polling instructions of multiple NFC card types in turn; the multiple NFC card types include multiple types of Type A, Type B, Type F and Type V.

[0221] In one embodiment, the data transmission device 1100 further includes a first Bluetooth sending module.

[0222] The first Bluetooth sending module is used to send a second Bluetooth signal carrying a device identification when detecting that the second electronic device is close to the first electronic device, so that the second electronic device receives the second Bluetooth signal, and establish a wireless communication connection with the first electronic device when it is determined that the device identification carried by the second Bluetooth signal is consistent with the device identification read from the first NFC module.

[0223] In one embodiment, the device information also includes link information; the link information is used to trigger the second electronic device to jump to the mutual transmission application and scan the second Bluetooth signal sent by the first electronic device.

[0224] In one embodiment, the NFC control module 1120 is further used to control the first NFC module to turn off the reader / writer mode and be in the card emulation mode only.

[0225] In one embodiment, the wireless communication connection includes a Bluetooth communication connection, and / or a Wi-Fi communication connection.

[0226] In one embodiment, the device information is also used to trigger the second electronic device to establish a Bluetooth communication connection with the first electronic device, and to establish a Wi-Fi communication connection with the first electronic device based on the Bluetooth communication connection.

[0227] The first transmission module 1130 is further configured to perform data transmission with the second electronic device via a Wi-Fi communication connection.

[0228] In one embodiment, the data transmission device 1100 further includes a connection module.

[0229] The connection module is used to establish a Bluetooth communication connection with the second electronic device; through the Bluetooth communication connection, the connection information corresponding to the wireless access point is sent to the second electronic device, so that the second electronic device connects to the wireless access point according to the connection information and establishes a Wi-Fi communication connection with the first electronic device.

[0230] In an embodiment of the present application, when the first electronic device and the second electronic device are close to each other, the first electronic device can control the first NFC module to be in card emulation mode according to the first NFC instruction sent by the second electronic device, thereby realizing automatic switching of the mode of the first NFC module, so that the second electronic device can read the device information from the first NFC module and trigger the establishment of a wireless communication connection between the two electronic devices, thereby simplifying the interaction process of establishing a wireless communication connection between the two electronic devices based on NFC technology, thereby simplifying the interaction process of data transmission, and the first electronic device has the function of recognizing the first NFC instruction customized by the second electronic device, and can realize the function of data transmission through touch between electronic devices of different manufacturers and / or different operating systems, thereby meeting the user's usage needs and improving the user's usage experience.

[0231] like Fig.12 As shown, in one embodiment, a data transmission device 1200 is provided, which can be applied to the above-mentioned second electronic device. The data transmission device 1200 may include an NFC sending module 1210, a reading module 1220, a connecting module 1230 and a second transmission module 1240.

[0232] The NFC sending module 1210 is used to send a first NFC instruction through a second NFC module, where the first NFC instruction is a customized NFC instruction, so that when the second electronic device is close to the first electronic device, the first electronic device receives the first NFC instruction and controls the first NFC module in the first electronic device to be in a card emulation mode in response to the first NFC instruction; the first NFC module stores device information of the first electronic device.

[0233] The reading module 1220 is configured to read device information of the first electronic device from the first NFC module.

[0234] The connection module 1230 is used to establish a wireless communication connection with the first electronic device based on the device information.

[0235] The second transmission module 1240 is used to perform data transmission with a second electronic device via wireless communication connection.

[0236] In one embodiment, the data transmission device 1200 further includes a second Bluetooth sending module.

[0237] The second Bluetooth sending module is used to display the data transmission page; send a first Bluetooth signal, the first Bluetooth signal carries a first identifier, and the first identifier is used to identify the data transmission scenario, so that the first electronic device determines that it is in the data transmission scenario according to the first identifier carried by the first Bluetooth signal.

[0238] In one embodiment, the first Bluetooth signal is used to instruct the first electronic device to determine the distance between the first electronic device and the second electronic device according to the signal strength of the first Bluetooth signal, and control the first NFC module to enter the first polling mode when the distance is less than or equal to the distance threshold.

[0239] In one embodiment, the device information includes a device identification; the data transmission device 1200 also includes a Bluetooth receiving module and a comparison module.

[0240] The Bluetooth receiving module is used to receive a second Bluetooth signal sent by the first electronic device, where the second Bluetooth signal carries a device identification.

[0241] The comparison module is used to compare the device identification carried by the second Bluetooth signal with the device identification read from the first NFC module.

[0242] The connection module 1230 is further configured to establish a wireless communication connection with the first electronic device if the device identification carried by the second Bluetooth signal is consistent with the device identification read from the first NFC module.

[0243] In one embodiment, the device information also includes link information; the data transmission device 1200 also includes a jump module.

[0244] The jump module is used to display an application jump component according to the link information, and the application jump component is used to indicate jumping to the mutual transmission application; in response to the jump operation on the application jump component, it jumps to the mutual transmission application and scans the second Bluetooth signal sent by the first electronic device.

[0245] In one embodiment, the connection module 1230 is further used to establish a Bluetooth communication connection with the first electronic device based on the device information; and to establish a Wi-Fi communication connection with the first electronic device based on the Bluetooth communication connection.

[0246] The second transmission module 1240 is further configured to perform data transmission with the second electronic device via a Wi-Fi communication connection.

[0247] In one embodiment, the connection module 1230 is further configured to receive connection information corresponding to a wireless access point sent by the first electronic device via a Bluetooth communication connection; and connect to the wireless access point according to the connection information to establish a Wii-Fi communication connection with the first electronic device.

[0248] In an embodiment of the present application, when the first electronic device and the second electronic device are close to each other, the first electronic device can control the first NFC module to be in card emulation mode according to the first NFC instruction sent by the second electronic device, thereby realizing automatic switching of the mode of the first NFC module, so that the second electronic device can read the device information from the first NFC module and trigger the establishment of a wireless communication connection between the two electronic devices, thereby simplifying the interaction process of establishing a wireless communication connection between the two electronic devices based on NFC technology, thereby simplifying the interaction process of data transmission, and the first electronic device has the function of recognizing the first NFC instruction customized by the second electronic device, and can realize the function of data transmission through touch between electronic devices of different manufacturers and / or different operating systems, thereby meeting the user's usage needs and improving the user's usage experience.

[0249] Fig.13 FIG. 1 is a structural block diagram of an electronic device in an embodiment. Fig.13As shown, the electronic device 1300 may include one or more of the following components: a processor 1310, a memory 1320 coupled to the processor 1310, and a transceiver unit 1330, wherein the memory 1320 may store one or more computer programs, and the one or more computer programs may be configured to be executed by one or more processors 1310, so that the electronic device 1300 implements the data transmission method applied to the first electronic device as described in the above embodiments.

[0250] The processor 1310 may include one or more processing cores. The processor 1310 uses various interfaces and lines to connect various parts of the entire electronic device 1300, and executes various functions and processes data of the electronic device 1300 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1320, and calling data stored in the memory 1320. Optionally, the processor 1310 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 1310 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1310, but may be implemented separately through a communication chip.

[0251] The memory 1320 may include a random access memory (RAM) or a read-only memory (ROM). The memory 1320 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 1320 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area may also store data created by the electronic device 1300 during use, etc.

[0252] The transceiver unit 1330 may include at least an NFC module. Further, the transceiver unit 1330 may also include but not limited to a Bluetooth module, a Wi-Fi module, etc., which can be used to provide communication functions.

[0253] An embodiment of the present application discloses an electronic device, including a memory, a processor, and a transceiver unit. The memory stores a computer program. When the computer program is executed by the processor, the headphone device implements the data transmission method applied to a second electronic device as described in the above embodiments.

[0254] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor in an electronic device, the electronic device implements the data transmission method applied to a first electronic device as described in the above embodiments.

[0255] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor in an electronic device, the electronic device implements the data transmission method applied to a second electronic device as described in the above embodiments.

[0256] An embodiment of the present application discloses a computer program product, which includes a computer program. When the computer program can be executed by a processor in an electronic device, the electronic device implements the data transmission method applied to a first electronic device as described in the above embodiments.

[0257] An embodiment of the present application discloses a computer program product, which includes a computer program. When the computer program can be executed by a processor in an electronic device, the electronic device implements the data transmission method applied to a second electronic device as described in the above embodiments.

[0258] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a ROM, etc.

[0259] As used herein, any reference to memory, storage, database, or other medium may include nonvolatile and / or volatile memory. Suitable nonvolatile memory may include ROM, programmable ROM (Programmable ROM, PROM), erasable PROM (Erasable PROM, EPROM), electrically erasable PROM (Electrically Erasable PROM, EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache memory. By way of illustration and not limitation, RAM may be in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus direct RAM (RDRAM) and direct memory bus dynamic RAM (DRDRAM).

[0260] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application. It should be noted that "multiple" in the present application includes "two or more".

[0261] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0262] The units described above 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.

[0263] 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0264] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0265] The above is a detailed introduction to a data transmission method, device, electronic device and program product disclosed in the embodiments of the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. At the same time, for those of ordinary skill in the art, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application. .

Claims

1. A data transmission method, characterized in that: Applied to a first electronic device, the first electronic device includes a first NFC module, and the method includes: When detecting that the second electronic device is close to the first electronic device, receiving a first NFC instruction sent by the second electronic device; the first NFC instruction is a custom NFC instruction; In response to the first NFC instruction, control the first NFC module to be in a card emulation mode, so that the second electronic device reads device information of the first electronic device from the first NFC module, wherein the device information is used to trigger the second electronic device to establish a wireless communication connection with the first electronic device; Data is transmitted with the second electronic device via the wireless communication connection.

2. The method according to claim 1, characterized in that Before receiving the first NFC instruction sent by the second electronic device, the method further includes: The first NFC module is controlled to enter a silent state; the silent state refers to a state in which the first NFC module monitors a first NFC instruction and does not send an NFC instruction.

3. The method according to claim 2, characterized in that The controlling the first NFC module to enter a silent state includes: When it is detected that the second electronic device is close to the first electronic device, the first NFC module is controlled to enter a silent state.

4. The method according to claim 1, characterized in that: In the case where the second electronic device is detected to be close to the first electronic device, before receiving the first NFC instruction sent by the second electronic device, the method further includes: In the case of a data transmission scenario, device information of the first electronic device is written into the first NFC module.

5. The method according to claim 1, characterized in that: In the case where the second electronic device is detected to be close to the first electronic device, before receiving the first NFC instruction sent by the second electronic device, the method further includes: In the case of a data transmission scenario, controlling the first NFC module to enter a first polling mode; the first polling mode refers to a mode in which the first NFC module only sends a target polling instruction, and the target polling instruction is used to discover electronic devices supporting the NFC function and can prevent the discovered electronic devices from entering a card simulation interaction process; The method further comprises: When it is detected that the second electronic device is close to the first electronic device, the first NFC module is controlled to stop sending the target polling instruction.

6. The method according to claim 5, characterized in that Before controlling the first NFC module to enter the first polling mode in the case of being in the data transmission scenario, the method further includes: The data transfer page is displayed, and the data transfer scenario is confirmed.

7. The method according to claim 5, characterized in that Before controlling the first NFC module to enter the first polling mode in the case of being in the data transmission scenario, the method further includes: receiving a first Bluetooth signal sent by a second electronic device; the first Bluetooth signal is sent when the second electronic device displays a data transmission page; the first Bluetooth signal carries a first identifier, and the first identifier is used to identify a data transmission scenario; It is determined that the data transmission scenario is in place according to the first identifier carried by the first Bluetooth signal.

8. The method according to claim 7, characterized in that Before controlling the first NFC module to enter the first polling mode, the method further includes: determining a distance between the first electronic device and the second electronic device according to a signal strength of the first Bluetooth signal; The controlling the first NFC module to enter a first polling mode includes: When the distance is less than or equal to a distance threshold, the first NFC module is controlled to enter a first polling mode.

9. The method according to any one of claims 5 to 8, characterized in that: The target polling instruction includes a Type V polling instruction or a single carrier signal.

10. The method according to any one of claims 5 to 8, characterized in that: The method further comprises: When an exit condition is met, controlling the first NFC module to switch from the first polling mode to a second polling mode, where the second polling mode refers to a mode in which the first NFC mode sends polling instructions of multiple NFC card types in turn; The multiple NFC card types include multiple types of Type A, Type B, Type F, and Type V.

11. The method according to claim 1, characterized in that: The device information includes a device identification, and the method further includes: When a second electronic device is detected to be close to the first electronic device, a second Bluetooth signal carrying the device identification is sent so that the second electronic device receives the second Bluetooth signal, and when it is determined that the device identification carried by the second Bluetooth signal is consistent with the device identification read from the first NFC module, a wireless communication connection is established with the first electronic device.

12. The method according to claim 11, characterized in that The device information also includes link information; the link information is used to trigger the second electronic device to jump to the mutual transmission application and scan the second Bluetooth signal sent by the first electronic device.

13. The method according to any one of claims 1 to 8, 11 to 12, characterized in that: The controlling the first NFC module to be in a card emulation mode includes: The first NFC module is controlled to turn off the reader / writer mode and be in the card emulation mode only.

14. The method according to any one of claims 1 to 8, 11 to 12, characterized in that: The wireless communication connection includes a Bluetooth communication connection and / or a Wi-Fi communication connection.

15. The method according to claim 14, characterized in that The device information is further used to trigger the second electronic device to establish a Bluetooth communication connection with the first electronic device, and to establish a Wi-Fi communication connection with the first electronic device based on the Bluetooth communication connection; The performing data transmission with the second electronic device through the wireless communication connection includes: Data is transmitted with the second electronic device via the Wi-Fi communication connection.

16. The method according to claim 15, characterized in that Before performing data transmission with the second electronic device through the Wi-Fi communication connection, the method further includes: Establishing a Bluetooth communication connection with the second electronic device; The connection information corresponding to the wireless access point is sent to the second electronic device through the Bluetooth communication connection, so that the second electronic device connects to the wireless access point according to the connection information and establishes a Wi-Fi communication connection with the first electronic device.

17. A data transmission method, characterized in that: Applied to a second electronic device, the second electronic device includes a second NFC module, and the method includes: sending a first NFC instruction through the second NFC module, wherein the first NFC instruction is a custom NFC instruction, so that when the second electronic device is close to the first electronic device, the first electronic device receives the first NFC instruction and controls the first NFC module in the first electronic device to be in a card emulation mode in response to the first NFC instruction; the first NFC module stores device information of the first electronic device; Reading device information of the first electronic device from the first NFC module; Based on the device information, establishing a wireless communication connection with the first electronic device; Data is transmitted with the second electronic device via the wireless communication connection.

18. The method according to claim 17, characterized in that Before sending the first NFC instruction through the second NFC module, the method further includes: Display the data transfer page; A first Bluetooth signal is sent, where the first Bluetooth signal carries a first identifier, and the first identifier is used to identify a data transmission scenario, so that the first electronic device determines that it is in the data transmission scenario according to the first identifier carried by the first Bluetooth signal.

19. The method according to claim 18, characterized in that The first Bluetooth signal is used to instruct the first electronic device to determine the distance between the first electronic device and the second electronic device according to the signal strength of the first Bluetooth signal, and control the first NFC module to enter a first polling mode when the distance is less than or equal to a distance threshold.

20. The method according to claim 17, characterized in that The device information includes a device identification; and establishing a wireless communication connection with the first electronic device based on the device information includes: receiving a second Bluetooth signal sent by the first electronic device, where the second Bluetooth signal carries a device identification; comparing the device identification carried by the second Bluetooth signal with the device identification read from the first NFC module; If the device identification carried by the second Bluetooth signal is consistent with the device identification read from the first NFC module, a wireless communication connection is established with the first electronic device.

21. The method according to claim 20, characterized in that The device information also includes link information; after reading the device information of the first electronic device from the first NFC module, the method further includes: According to the link information, display an application jump component, wherein the application jump component is used to indicate a jump to the mutual transmission application; In response to the jump operation on the application jump component, jump to the mutual transmission application program and scan the second Bluetooth signal sent by the first electronic device.

22. The method according to any one of claims 17 to 21, characterized in that: The establishing a wireless communication connection with the first electronic device based on the device information includes: Based on the device information, establishing a Bluetooth communication connection with the first electronic device; Establishing a Wi-Fi communication connection with the first electronic device based on the Bluetooth communication connection; The performing data transmission with the second electronic device through the wireless communication connection includes: Data is transmitted with the second electronic device via the Wi-Fi communication connection.

23. The method according to claim 22, characterized in that The establishing a Wi-Fi communication connection with the first electronic device based on the Bluetooth communication connection includes: Receiving connection information corresponding to the wireless access point sent by the first electronic device through the Bluetooth communication connection; The wireless access point is connected according to the connection information to establish a Wi-Fi communication connection with the first electronic device.

24. A data transmission device, characterized in that: Applied to a first electronic device, the first electronic device includes a first NFC module, and the device includes: An NFC receiving module, configured to receive a first NFC instruction sent by the second electronic device when detecting that the second electronic device is close to the first electronic device; the first NFC instruction is a user-defined NFC instruction; an NFC control module, configured to control the first NFC module to be in a card emulation mode in response to the first NFC instruction, so that the second electronic device reads device information of the first electronic device from the first NFC module, wherein the device information is used to trigger the second electronic device to establish a wireless communication connection with the first electronic device; The first transmission module is used to perform data transmission with the second electronic device through the wireless communication connection.

25. A data transmission device, characterized in that: Applied to a second electronic device, the second electronic device includes a second NFC module, and the device includes: an NFC sending module, configured to send a first NFC instruction through the second NFC module, wherein the first NFC instruction is a user-defined NFC instruction, so that when the second electronic device is close to the first electronic device, the first electronic device receives the first NFC instruction and controls the first NFC module in the first electronic device to be in a card emulation mode in response to the first NFC instruction; the first NFC module stores device information of the first electronic device; A reading module, configured to read device information of the first electronic device from the first NFC module; A connection module, configured to establish a wireless communication connection with the first electronic device based on the device information; The second transmission module is used to perform data transmission with the second electronic device through the wireless communication connection.

26. An electronic device, characterized in that: The electronic device comprises a memory, a processor and a transceiver unit. The memory stores a computer program. When the computer program is executed by the processor, the electronic device implements the method according to any one of claims 1 to 16 or 17 to 23.

27. A computer program product, characterized in that The method comprises a computer program, and when the computer program is executed by a processor in an electronic device, the electronic device implements the method according to any one of claims 1 to 16 or 17 to 23.

Citation Information

Cited By

  • Data transmission method and apparatus, electronic device, and program product

    WO2026067111A1

  • Control method for NFC apparatus, and vehicle

    WO2026200291A1