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

By controlling the NFC module to enter card emulation mode using custom NFC commands, the data transmission problem between electronic devices from different manufacturers is solved, achieving a simplified interaction process and a stable communication connection.

WO2026067111A1PCT designated stage Publication Date: 2026-04-02GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-09-15
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

In existing technologies, electronic devices from different manufacturers cannot transmit data via NFC, resulting in a complex interaction process.

Method used

By controlling the NFC module to enter card emulation mode through custom NFC commands, it can read device information and establish a wireless communication connection, enabling data transmission between devices from different manufacturers.

Benefits of technology

It simplifies the data transmission process between electronic devices from different manufacturers, improves the accuracy and stability of interaction, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025121418_02042026_PF_FP_ABST
    Figure CN2025121418_02042026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present application are a data transmission method and apparatus, an electronic device, and a program product. The method is applied to a first electronic device, which comprises a first NFC module. The method comprises: when it is detected that a second electronic device is approaching a first electronic device, receiving a first NFC instruction sent by the second electronic device, wherein the first NFC instruction is a custom NFC instruction; in response to the first NFC instruction, controlling a first NFC module to be in a card simulation mode, such that the second electronic device reads device information of the first electronic device from the first NFC module, wherein the device information is used for triggering the second electronic device to establish a wireless communication connection with the first electronic device; and by means of the wireless communication connection, performing data transmission with the second electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Data transmission method and device, electronic equipment and program product

[0001] The present application claims priority from the Chinese patent application No. 202411358986.X filed on September 26, 2024 and entitled "Data transmission method and device, electronic equipment and program product", the whole content of which is incorporated herein by reference. TECHNICAL FIELD

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

[0003] In order to improve the convenience of users' life, most of the electronic devices on the market have NFC (Near Field Communication) function. Different electronic devices can support NFC technology-based data transmission under the interaction of "touching", which can realize "touching" file sharing, multimedia data sharing and the like. At present, most of the electronic devices only support NFC data transmission with electronic devices belonging to the same manufacturer under "touching", and cannot realize NFC data transmission between electronic devices of different manufacturers under "touching". SUMMARY

[0004] The present application provides a data transmission method, device, electronic equipment and program product, which can realize the function of data transmission between electronic devices of different manufacturers through touching, and simplifies the interactive process of data transmission.

[0005] The present application discloses a data transmission method applied to a first electronic device, wherein the first electronic device comprises a first NFC module, and the method comprises the following steps:

[0006] In a case where a second electronic device is detected to be close to the first electronic device, a first NFC instruction sent by the second electronic device is received; the first NFC instruction is a self-defined NFC instruction;

[0007] In response to the first NFC instruction, the first NFC module is controlled 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;

[0008] Data transmission is performed with the second electronic device through the wireless communication connection.

[0009] The embodiment of the present application discloses a data transmission method, applied to a second electronic device, the second electronic device comprising a second NFC module, the method comprising:

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

[0011] reading the device information of the first electronic device from the first NFC module;

[0012] establishing a wireless communication connection with the first electronic device based on the device information;

[0013] transmitting data with the second electronic device through the wireless communication connection.

[0014] The embodiment of the present application discloses a data transmission device, applied to a first electronic device, the first electronic device comprising a first NFC module, the device comprising:

[0015] an NFC receiving module, configured to receive a first NFC instruction sent by a second electronic device when it is detected that the second electronic device is close to the first electronic device; the first NFC instruction being a self-defined NFC instruction;

[0016] 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, the device information being used to trigger the second electronic device to establish a wireless communication connection with the first electronic device;

[0017] a first transmission module, configured to transmit data with the second electronic device through the wireless communication connection.

[0018] The embodiment of the present application discloses a data transmission device, applied to a second electronic device, the second electronic device comprising a second NFC module, the device comprising:

[0019] The NFC sending module is configured to send a first NFC instruction through the second NFC module, the first NFC instruction being a self-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, in response to the first NFC instruction, controls a first NFC module in the first electronic device to be in a card emulation mode; and the first NFC module stores device information of the first electronic device;

[0020] The reading module is configured to read the device information of the first electronic device from the first NFC module;

[0021] The connecting module is configured to establish a wireless communication connection with the first electronic device based on the device information;

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

[0023] An electronic device is disclosed in the embodiments of the present application, which includes 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 the above embodiments.

[0024] A computer readable storage medium is disclosed in the embodiments of the present application, which stores a computer program. When the computer program is executed by a processor in an electronic device, the electronic device implements the method according to any one of the above embodiments.

[0025] A computer program product is disclosed in the embodiments of the present application, which includes a computer program. When the computer program is executed by a processor in an electronic device, the electronic device implements the method according to any one of the above embodiments.

[0026] The details of one or more embodiments of the present application are presented in the following drawings and description. Other features and advantages of the present application will be apparent from the description, drawings and claims. BRIEF DESCRIPTION OF DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.

[0028] FIG. 1 is an application scenario diagram of a data transmission method in an embodiment;

[0029] FIG. 2 is a timing diagram of a data transmission method in an embodiment;

[0030] FIG. 3 is a flowchart of a data transmission method in one embodiment;

[0031] FIG. 4 is a flowchart of a data transmission method in another embodiment;

[0032] FIG. 5A is a timing diagram of a data transmission method in another embodiment;

[0033] FIG. 5B is a timing diagram of a data transmission method in another embodiment;

[0034] FIG. 6 is a flowchart of a data transmission method in another embodiment;

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

[0036] FIG. 7B is a timing diagram of a data transmission method in another embodiment;

[0037] FIG. 8 is a schematic diagram of an interface showing an application jump component in one embodiment;

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

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

[0040] FIG. 10 is a flowchart of a data transmission method in another embodiment;

[0041] FIG. 11 is a block diagram of a data transmission apparatus in one embodiment;

[0042] FIG. 12 is a block diagram of a data transmission apparatus in another embodiment;

[0043] FIG. 13 is a structural block diagram of an electronic device in one embodiment. DETAILED DESCRIPTION

[0044] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0045] It should be noted that the terms "comprising" and "having" and any variations thereof used in the present application and the accompanying drawings are intended to cover both the inclusive and exclusive aspects of the terms. For example, a process, method, system, product, or apparatus that comprises a list of steps or units is not limited to only those steps or units that are listed, but can optionally include additional steps or units that are not listed, or can optionally include other steps or units that are inherent to the process, method, product, or apparatus.

[0046] It can be understood that the terms "first", "second", and the like used in the present application can be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element. For example, without departing from the scope of the present application, the first electronic device can be referred to as the second electronic device, and similarly, the second electronic device can be referred to as the 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 "a plurality of" used in the present application means two or more. The term "and / or" used in the present application means one of the options, or any combination of a plurality of options.

[0047] Some terms that can be involved in the present application are explained and described below:

[0048] NFC: It is an emerging technology. Electronic devices using NFC technology can exchange data when they are close to each other.

[0049] Reader mode: In this mode, the NFC device can be used as a reader, which can read and write data to an NFC tag.

[0050] Card Emulation (CE) mode: The NFC device is emulated as an NFC card and can communicate with a reader.

[0051] Peer-to-Peer mode: Both NFC devices can act as a reader and an NFC tag, and can be wirelessly interconnected and transmit data using NFC technology.

[0052] 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.56 MHz radio frequency carrier, encoded using an improved Miller code, and modulated using 100% ASK (Amplitude Shift Keying).

[0053] Type B: NFC-B, one of the NFC card types defined in the ISO / IEC 14443 protocol of the NFC standard, which transmits signals through a 13.56 MHz radio frequency carrier when a reader transmits signals to an NFC card, encodes using NRZ code (Non-Return-to-Zero), and uses 10% ASK modulation.

[0054] Type F: NFC-F, one of the NFC card types defined in the FeliCa protocol of the NFC standard.

[0055] Type V: NFC-V, one of the NFC card types defined in the ISO / IEC 15693 protocol of the NFC standard, which is used to compensate for the defects of insufficient communication distance and insufficient number of tags read by ISO / IEC 14443.

[0056] Polling mode: An NFC device generates a carrier or polling instruction to discover nearby NFC devices or NFC cards.

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

[0058] FIG. 1 is an application scenario diagram of a data transmission method in an embodiment. As shown in FIG. 1, NFC communication can be performed between a first electronic device 110 and a second electronic device 120. The first electronic device 110 and the second electronic device 120 can include, but are not limited to, a mobile phone, a wearable device (such as a smart watch, smart glasses, etc.), a vehicle terminal, a tablet computer, a notebook computer, a PC (Personal Computer), a smart home device (such as a television, a sound box, etc.), and the like.

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

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

[0061] In the case that the first electronic device 110 is in a data transmission scenario, the data transmission scenario can refer to a scenario in which multimedia data transmission, file data transmission, and the like are performed between multiple electronic devices. The second electronic device 120 can send a first NFC instruction through the second NFC module, and the first NFC instruction can be a custom NFC instruction, for example, the first NFC instruction can be an NFC instruction customized by the manufacturer of the second electronic device 120, and the like. In the case that 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 one end provided with a receiver, a front camera, and the like) touches the top of the second electronic device 120, that is, the first electronic device 110 and the second electronic device 120 perform a "tap-to-tap" interaction, and the like, the first electronic device 110 can receive the first NFC instruction sent by the second electronic device. The first electronic device 110 can control the first NFC module to be in a card emulation mode in response to the first NFC instruction. The second electronic device 120 can read the device information of the first electronic device 110 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.

[0062] 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 can include, but is not limited to, a Bluetooth communication connection and / or a Wi-Fi communication connection, and the like, but the present application is not limited thereto.

[0063] Optionally, the first electronic device 110 can be a data receiving party in the data transmission scenario, and the second electronic device 120 can be a data sending party in the data transmission scenario, and the first electronic device 110 can receive data sent by the second electronic device 120 through the wireless communication connection.

[0064] Optionally, the first electronic device 110 can be a data sender in a data transmission scenario, and the second electronic device 120 can be a data receiver in the data transmission scenario. The first electronic device 110 can send data to the second electronic device 120 through a wireless communication connection.

[0065] FIG. 2 is a timing diagram of a data transmission method in an embodiment. As shown in FIG. 2, the data transmission method can include the following steps:

[0066] Step 1: When the first electronic device is close to the second electronic device, the first electronic device receives a first NFC instruction sent by the second electronic device.

[0067] 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.

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

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

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

[0071] As shown in FIG. 3, in an embodiment, a data transmission method is provided, which can be applied to the above-mentioned first electronic device. The method can include the following steps:

[0072] 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 self-defined NFC instruction.

[0073] The first electronic device can determine to be in a data transmission scenario, in which multiple electronic devices can perform data transmission, such as multimedia data (e.g., photo, audio, video, voice, etc.) transmission, file transmission, etc., but not limited thereto. Further, in the data transmission scenario, multiple electronic devices can interact with connection information through NFC technology, so as to establish a wireless communication connection and perform data transmission through the wireless communication connection.

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

[0075] In a case where the first electronic device determines to be in a data transmission scenario, the first NFC instruction sent by the second electronic device can be listened to. The second electronic device can include a second NFC module, and the second electronic device can send the first NFC instruction through the second NFC module. The first NFC instruction can be a self-defined NFC instruction, which is different from an NFC standard instruction and is self-defined by a manufacturer of the electronic device according to a requirement. Further, the first NFC instruction can be a self-defined NFC instruction of the manufacturer of the second electronic device, for example, the first NFC instruction can be a self-defined NFC polling instruction of the manufacturer of the second electronic device, which can be used to discover an electronic device supporting an NFC function and belonging to the same manufacturer.

[0076] In the embodiments of the present application, the first electronic device can have the capability of listening to the first NFC instruction sent by the second electronic device, and the manufacturer of the second electronic device can be different from the manufacturer of the first electronic device. The first electronic device can receive the NFC instruction sent by the second electronic device through the first NFC module, and identify whether the received NFC instruction is a self-defined first NFC instruction. It should be noted that the first electronic device can support the listening of a self-defined first NFC instruction of one manufacturer, or support the listening of self-defined NFC instructions of multiple manufacturers, and is not limited to supporting the listening of a self-defined NFC instruction of a specific manufacturer.

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

[0078] In a case where the second electronic device is detected to be close to the first electronic device, the first electronic device can listen to the first NFC instruction to receive the first NFC instruction sent by the second electronic device.

[0079] In a case where the second electronic device is detected to be close to the first electronic device, the first electronic device can listen to the first NFC instruction to receive the first NFC instruction sent by the second electronic device.

[0080] In some embodiments, when the first electronic device receives the first NFC instruction sent by the second electronic device, the second electronic device can be identified as an electronic device of another manufacturer according to the first NFC instruction, and the first NFC module can be controlled to be in the card emulation mode, so that the second electronic device, which 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 in NFC information.

[0081] Further, the first NFC module can be controlled to be closed in the reader / writer mode and only in the card emulation mode. 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, the NFC interaction process between different electronic devices is simplified, and no matter 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, so that the processing consistency of different data transmission directions is ensured.

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

[0083] As an implementation, the first electronic device can write the device information into the first NFC module in the NDEF format, so as to facilitate the second electronic device to read the device information from the first NFC module subsequently.

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

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

[0086] 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 based on the Bluetooth communication connection, establish a Wi-Fi communication connection with the first electronic device. After the second electronic device reads the device information from the first NFC module through the second NFC module, it can establish a Bluetooth communication connection with the first electronic device based on the device information, and then based on the Bluetooth communication connection, establish a Wi-Fi communication connection with the first electronic device.

[0087] Further, after the first electronic device establishes a Bluetooth communication connection with the second electronic device, it can send the connection information of the wireless access point (such as the identification information of the wireless access point, the connection password, etc.) to the second electronic device through the Bluetooth communication connection, so that the second electronic device can connect to the wireless access point according to the connection information and establish a Wi-Fi communication connection with the first electronic device.

[0088] As an implementation, the Bluetooth communication connection described above can include a BLE connection, the Wi-Fi communication connection described above can be a WLAN (Wireless Local Area Networks) connection, and the wireless access point described above can be a wireless access point provided by the first electronic device, or a wireless access point provided by another device (such as a router, etc.) and connected by the first electronic device, which is not limited here.

[0089] The way of first establishing a Bluetooth communication connection between the first electronic device and the second electronic device, and then establishing 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 improve the data transmission speed and improve the user's experience.

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

[0091] In step 330, data transmission is performed with the second electronic device through the wireless communication connection.

[0092] 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, for example, sharing of data such as photos, audio, video, files, etc. between multiple electronic devices, and then the first electronic device and the second electronic device can interact with the file information of the file to be shared before performing file sharing. The file information can be used to describe the file to be shared, and optionally, the file information can include file type, file format, file size, etc. For example, if the file to be shared is a photo, the first electronic device and the second electronic device can first interact with the file information of the photo, such as file type, file format, size of the photo, etc., but not limited to this.

[0093] As an implementation, in the case that the first electronic device determines to be in the data transmission scenario, if the first electronic device is a 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 the first NFC module is controlled to be in the card emulation state, the second electronic device can read the file information from the first NFC module through the second NFC module.

[0094] As another implementation, the first electronic device and the second electronic device can also interact with the file information of the file to be shared after establishing the wireless communication connection, or during the process of establishing the wireless communication connection. By interacting with the file information of the file to be shared by both parties, the accuracy of subsequent data transmission can be further improved.

[0095] In the embodiment of the present application, when the first electronic device is close to the second electronic device, the first electronic device can control the first NFC module to be in the card emulation mode according to the first NFC instruction sent by the second electronic device, realize automatic switching of the mode of the first NFC module, and enable the second electronic device to read the device information from the first NFC module and trigger establishment of the wireless communication connection therebetween, thereby simplifying the interaction process of establishing the wireless communication connection between the two electronic devices based on the NFC technology, and simplifying the interaction process of data transmission. In addition, the first electronic device has the function of identifying the first NFC instruction defined by the second electronic device, and can realize the function of data transmission between electronic devices of different manufacturers and / or different operating systems through touching, thereby meeting the use requirement of the user and improving the use experience of the user.

[0096] As shown in FIG. 4, in another embodiment, a data transmission method is provided, which can be applied to the first electronic device described above. The method can include the following steps:

[0097] In step 402, in the case of being in a data transmission scenario, device information of the first electronic device is written to the first NFC module.

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

[0099] The data transmission operation can include, but is not limited to, an operation of triggering the first electronic device to display a data transmission page, a triggering operation on a data transmission component contained in the displayed interface, and the like. The data transmission page can refer to a page for triggering data transmission, such as a photo sharing page, an audio sharing page, a file sharing page, and the like. The data transmission component can include, but is not limited to, a notification, a button, a dialog box, and the like. The user can trigger the first electronic device to perform data transmission by clicking the data transmission component and the like.

[0100] As an entity implementation, the first electronic device can display a data transmission page, determine that it is in a data transmission scenario, write device information of the first electronic device to the first NFC module in the case that the first electronic device enters the data transmission page, and trigger entry into a subsequent NFC interaction process, which can simplify user operation and improve user experience.

[0101] In some embodiments, the first electronic device can register an NFC event in the case of determining that it is in a data transmission scenario, and write device information of the first electronic device to the first NFC module based on the NFC event.

[0102] The application program (such as a photo album, an audio playing application, a "Tap to Pair" interactive application, etc., but not limited thereto) in the first electronic device for implementing data transmission can register an NFC event, and through the registered NFC event, it can be ensured that the application program can interact with the first NFC module, so that the application program can obtain information of the first NFC module. The application program can obtain device information of the first electronic device, and write the device information to the first NFC module through the registered NFC event, thereby ensuring accurate writing of the device information, and ensuring that a subsequent wireless communication connection can be accurately established with the second electronic device and data transmission can be performed.

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

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

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

[0106] As an entity embodiment, 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 the second electronic device is in the data transmission scenario, and a first Bluetooth signal carrying a first identifier is sent.

[0107] Optionally, the first identifier can be one identifier or a combination of multiple identifiers, and the first identifier can identify the data transmission scenario. Further, the first identifier can identify a data transmission scenario based on NFC technology. The first identifier can be a customized identifier according to actual requirements.

[0108] Exemplarily, the first identifier can include a UUID (Universally Unique Identifier), and the UUID can identify a signal type of the first Bluetooth signal. For the data transmission scenario, a corresponding UUID can be customized, for example, the UUID corresponding to the data transmission scenario can be 0x1234, but is not limited thereto.

[0109] The first electronic device can receive the first Bluetooth signal sent by the second electronic device, determine that the data transmission scenario is in accordance with the first identification 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.

[0110] In some embodiments, the first Bluetooth signal can include a BLE (Bluetooth Low Energy) broadcast signal. The first electronic device can scan the BLE broadcast signal, for example, the first electronic device can periodically scan the BLE broadcast signal, can parse the received BLE broadcast signal, and determine whether the first identification is carried in the BLE broadcast signal. If the BLE broadcast signal carrying the first identification is identified, the first identification can be determined to be in the data transmission scenario.

[0111] Optionally, the first electronic device can scan the first Bluetooth signal carrying the first identification in the case that the first electronic device is in the bright screen state, which can reduce unnecessary power consumption loss and improve the endurance of the first electronic device.

[0112] Optionally, the first electronic device can scan the first Bluetooth signal carrying the first identification in the case that the NFC interaction function is turned on. If the first electronic device does not turn on the NFC interaction function, the first Bluetooth signal carrying the first identification can not be scanned, which can reduce unnecessary power consumption loss and improve the endurance of the first electronic device.

[0113] In some embodiments, the first electronic device receives the first Bluetooth signal sent by the second electronic device, and can determine the distance between the first electronic device and the second electronic device according to the signal strength of the first Bluetooth signal, and write the device information to the first NFC module in the case that the distance is less than or equal to the distance threshold.

[0114] 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 identification. If the first identification is carried, the distance between the first electronic device and the second electronic device can be calculated according to the signal strength of the first Bluetooth signal. The signal strength of the first Bluetooth signal can 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.

[0115] The first electronic device can determine whether the distance between the first electronic device and the second electronic device is less than a distance threshold. If the distance is less than the distance threshold, it indicates that the first electronic device and the second electronic device are relatively close, and the second electronic device is likely to perform data transmission with the first electronic device. Therefore, the device information of the first electronic device can be written into the first NFC module, so that the device information of the first electronic device can be read from the first NFC module by the second electronic device in the future, and a wireless communication connection can be established, thereby improving the interaction accuracy of data transmission based on NFC.

[0116] As a specific implementation, the application program (such as an application program supporting NFC function) of the first electronic device can register to listen to the first Bluetooth signal, and configure the type of Bluetooth signal to be listened to, that is, the first identification carried by the Bluetooth signal to be listened to. Alternatively, the application program of the first electronic device can use a dynamic registration manner to register to listen to the first Bluetooth signal, so as to cancel the listening when it is not needed, thereby reducing unnecessary overhead.

[0117] After the Bluetooth module of the first electronic device scans the first Bluetooth signal carrying the first identification, the distance between the first electronic device and the second electronic device can be determined according to the signal strength corresponding to the first Bluetooth signal, and the signal content (such as the first identification) of the scanned first Bluetooth signal, the signal strength, the distance and other information can be fed back to the application program through callback.

[0118] The application program can listen to 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 the distance is less than the distance threshold, the application program can write the device information of the first electronic device into the first NFC module.

[0119] In this embodiment, the first electronic device can be a data receiving side, and the second electronic device as a data sending side can trigger the first electronic device to write the device information into the first NFC module by sending the first Bluetooth signal carrying the first identification, so as to ensure that the wireless communication connection is accurately established in the future and data transmission is performed, thereby improving the flexibility of data transmission between electronic devices of different manufacturers and / or different operating systems.

[0120] Step 404: 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.

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

[0122] In a case where the first electronic device determines to be in a data transmission scenario, the first NFC module can be controlled to enter a mute 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 mute state, the first NFC module can receive and identify the first NFC instruction sent by the second electronic device, but does not respond to the first NFC instruction or actively send other NFC instructions.

[0123] Optionally, the mute state can be understood as a state in which the first NFC module specially processes a custom NFC instruction of another manufacturer (such as a manufacturer of the second electronic device) and / or another operating system. By switching the first NFC module to the mute state, the first NFC module can have the ability to listen to the first NFC instruction, can ensure that the first NFC module more focusedly identifies the first NFC instruction, can avoid NFC interaction errors (such as performing an error or unnecessary NFC instruction interaction), and further improves the accuracy and stability of NFC interaction between electronic devices of different manufacturers and / or different operating systems.

[0124] In some embodiments, the first NFC module can be controlled to enter the mute state to listen to the first NFC instruction sent by the second electronic device in a case where the second electronic device is detected to be close to the first electronic device. In a case where the second electronic device is not detected to be close to the first electronic device, the first NFC module can not enter the mute state, and only enters the mute state to listen to the first NFC instruction sent by the second electronic device when the second electronic device is detected to be close to the first electronic device. The first NFC instruction is listened to only in a case where it is determined that the first electronic device needs to perform data transmission with the second electronic device, thereby improving the accuracy of state control and switching of the first NFC module.

[0125] In step 408, the first NFC module is controlled 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. The device information is used to trigger the second electronic device to establish a wireless communication connection with the first electronic device.

[0126] In step 410, data transmission is performed with the second electronic device through the wireless communication connection.

[0127] The description of steps 408-410 can refer to the related description in the above embodiments, which will not be repeated here.

[0128] In some embodiments, after the first electronic device controls the first NFC module to enter the silent state, the time duration for which the first NFC module enters the silent state can be timed. If the first NFC module enters the silent state for a time duration exceeding a first time threshold, and the first NFC instruction sent by the second electronic device is still not received, it is determined that the second electronic device is most likely a NFC tag or an electronic device that only supports NFC card simulation mode, i.e., cannot realize data transmission with the first electronic device, and the first NFC module can be controlled to exit the silent state. By setting a timeout mechanism for the silent state, the first NFC module can be prevented from being in the silent state for a long time, which can result in the inability to normally interact with other NFC devices, and the user experience is improved.

[0129] Exemplarily, FIG. 5A is a timing diagram of a data transmission method in another embodiment. As shown in FIG. 5A, the first electronic device can enter a data transmission page, determine that it is in a data transmission scenario, and write device information to the first NFC module. The second electronic device can be in a screen-on state and can display any interface. Alternatively, 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. Alternatively, the second NFC module can switch between a card reader mode and a card simulation mode, and send the first NFC instruction when in the card reader mode.

[0130] In the case that the first electronic device and the second electronic device “bump”, the first electronic device can control the first NFC module to enter the silent state to listen for the first NFC instruction sent by the second electronic device. The first electronic device and the second electronic device remain in contact, and the first electronic device can close the reader / writer mode of the first NFC module and enter the card simulation mode when the first NFC instruction is received, so that the second NFC module in the reader / writer mode in 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.

[0131] Exemplarily, FIG. 5B is a timing diagram of a data transmission method in another embodiment. As shown in FIG. 5B, the second electronic device can enter a data transmission page and send a BLE broadcast carrying a first identifier, which is used to identify a data transmission scenario. The first electronic device can be in a screen-on state and can display any interface, and optionally, the first electronic device can display any interface other than the data transmission page. The first electronic device can perform BLE scanning, receive the 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, and optionally, the second NFC module can switch between a card reader mode and a card emulation mode, and send the first NFC instruction when in the card reader mode.

[0132] In the case that the first electronic device and the second electronic device "bump", 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 in the case that the first electronic device receives the first NFC instruction, the first electronic device can close the reader / writer mode of the first NFC module and enter a card emulation mode, so that the second NFC module in the reader / writer mode in 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.

[0133] In the embodiments of the present application, in the case that 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 also be controlled to enter a silent state. In the silent state, the first NFC module can receive and identify the first NFC instruction sent by the second electronic device, and does not send an NFC instruction outward, which can ensure that the first NFC module more focuses on identifying the first NFC instruction, can avoid NFC interaction errors (such as performing incorrect or unnecessary NFC instruction interaction, etc.), and the identity of the second electronic device (electronic devices of different manufacturers and / or different operating systems) can be accurately identified by using the first NFC instruction, which further improves the accuracy and stability of data transmission between electronic devices of different manufacturers and / or different operating systems based on NFC interaction.

[0134] As shown in FIG. 6, in another embodiment, a data transmission method is provided, which can be applied to the above-mentioned first electronic device. The method can include the following steps:

[0135] In step 602, when the first electronic device is in the data transmission scenario, the first NFC module is controlled to enter a first polling mode, and the device information of the first electronic device is written to the first NFC module. The first polling mode refers to a mode in which the first NFC module only sends a target polling instruction.

[0136] It should be noted that 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 to the first NFC module can refer to the related description in the above embodiments, which will not be repeated here.

[0137] When the first electronic device is in the data transmission scenario, the first NFC module can be controlled to enter the first polling mode, which refers to a mode in which the first NFC module only sends a target polling instruction. The target polling instruction is used to discover an electronic device supporting NFC function and can avoid the discovered electronic device entering a card emulation interaction process.

[0138] In some embodiments, in the first polling mode, the first NFC module can be in a reader / writer mode, generate a radio frequency field, and send a target polling instruction. The target polling instruction can be received by an NFC device or an NFC tag in the radio frequency field generated by the first NFC module. Further, the target polling instruction can be an NFC instruction that does not trigger an electronic device receiving the target polling instruction to enter a card emulation interaction process. The card emulation interaction process can 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) to the first NFC module.

[0139] Alternatively, the target polling instruction includes a Type V type polling instruction or a single carrier signal. Further, when the first NFC module is controlled to enter the first polling mode, the polling functions of Type A, Type B, and Type F of the first NFC module can be turned off, i.e., Type A, Type B, and Type F instructions are not sent. The reason for turning off the polling functions of Type A, Type B, and Type F of the first NFC module is that the polling instructions of Type A, Type B, and Type F will cause a second electronic device receiving the polling instruction to enter a card emulation interaction process of Type A, Type B, and Type F. If the second electronic device mistakenly enters the card emulation interaction process, an NFC card (such as a bank card, a public transportation card, etc.) will be mistakenly ejected, and the subsequent NFC interaction process (such as exchanging connection information, establishing a wireless network connection, and performing data transmission, etc.) cannot be normally completed.

[0140] Optionally, the target polling instruction can be a polling instruction of Type V, and since most electronic devices currently do not have card emulation function of Type V, the polling instruction of Type V will not cause 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 can also be updated with the NFC standard protocol.

[0141] Optionally, the target polling instruction can also be a single carrier signal, which can not carry effective information or carry simple information, and the second electronic device receiving the single carrier signal will not trigger the card emulation interaction process.

[0142] In some embodiments, in the first polling mode, the card emulation mode of the first NFC module can be reserved, that is, the first NFC module can periodically switch between the reader / writer mode and the card emulation mode, and the target polling instruction can not be sent when the first NFC module is in the card emulation mode. By periodically switching between the reader / writer mode and the card emulation mode, the information interaction between the first electronic device and the NFC card reader and the like is facilitated, the card emulation function of the first electronic device is realized, and the first NFC card can avoid the problem that the NFC card reader or other electronic devices in the reader / writer mode cannot normally interact with the first NFC card after the first NFC card enters the first polling mode, thereby affecting the user experience.

[0143] In some embodiments, when the second electronic device is a data sender, the first electronic device receives the first Bluetooth signal sent by the second electronic device, determines the distance between the first electronic device and the second electronic device according to the signal strength of the first Bluetooth signal, and controls the first NFC module to enter the first polling mode when the distance is less than or equal to the distance threshold.

[0144] When the distance between the first electronic device and the second electronic device is less than or equal to the distance threshold, it is indicated that the first electronic device and the second electronic device are likely to perform data transmission, and therefore the first electronic device can modify the hardware parameters of the first NFC module, close the polling functions of Type A, Type B and Type F of the first NFC module, only reserve the polling function of Type V or send a single carrier signal, and write the device information of the first electronic device into the first NFC module when the distance is less than or equal to the distance threshold.

[0145] In some embodiments, in order to improve the accuracy of the identification of the first Bluetooth signal, the first Bluetooth signal can further include a second identifier, which can be used to indicate 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 based on NFC interaction to implement data transmission, and then determine the distance between the first electronic device and the second electronic device according to the signal strength of the first Bluetooth signal.

[0146] For example, the second identifier can also be a customized identifier. For different NFC interaction scenarios, the same second identifier can be used. For example, the second identifier can be 0x1122334455 or 0x5544332211, but is not limited thereto. By combining the first identifier and the second identifier, the first Bluetooth signal can be accurately identified and ranging can 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.

[0147] The first electronic device can determine the distance between the first electronic device 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 a distance threshold. This can avoid polling mode mis-switching and improve the control accuracy of the first NFC module.

[0148] 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.

[0149] When the first electronic device detects that the second electronic device is close, for example, detects that the first electronic device and the second electronic device implement a "bump-to-bump" interaction 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 listen to the first NFC instruction sent by the second electronic device.

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

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

[0152] At step 608, in response to the first NFC instruction, the first NFC module is controlled 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.

[0153] At step 610, data transmission is performed with the second electronic device through the wireless communication connection.

[0154] The description of steps 606-610 can refer to the related description in the above embodiments, which will not be repeated here.

[0155] 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 a second polling mode, where the second polling mode refers to a mode in which the first NFC module sends polling instructions of multiple NFC card types in turn.

[0156] Further, the multiple NFC card types can include multiple types of Type A, Type B, Type F, and Type V.

[0157] The exit condition can refer to a condition for triggering the exit of the first polling mode. Alternatively, the exit condition can include one or more of the following conditions, but is not limited to the following conditions:

[0158] (1) After the first NFC module enters a silent state, no first NFC instruction sent by the second electronic device is received, and the time length of entering the silent state exceeds a first time threshold.

[0159] (2) The duration of continuously not receiving the first NFC instruction sent by the second electronic device exceeds a second time threshold.

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

[0161] In some embodiments, since there can be obstacles, obstructions, or electronic device movement during the transmission of the first Bluetooth signal, the signal strength of the first Bluetooth signal received by the first electronic device can frequently change. Therefore, the first electronic device can determine the distance between the first electronic device and the second electronic device according to multiple times of receiving the first Bluetooth signal, and perform smoothing processing according to the distances corresponding to the multiple times of the first Bluetooth signal, and determine whether to exit the first polling mode according to the result of the smoothing processing.

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

[0163] 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 the 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.

[0164] 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 recorded 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, and 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, and the recorded multiplication result can be cleared.

[0165] The target distance described above can be determined according to the distance threshold. Optionally, the target distance can be a multiple of the distance threshold, such as twice the distance threshold.

[0166] In this embodiment, the distances respectively corresponding to the plurality of first Bluetooth signals can be smoothed, and whether to control the first NFC module to exit the first polling mode can be determined according to the result of the smoothing. This can improve the accuracy of controlling the state switching of the first NFC module.

[0167] In some embodiments, a protection duration corresponding to the first polling mode can be set. The protection duration can refer to a 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 can be set according to actual needs, such as 30 seconds, 1 minute, etc., but is not limited thereto. After the duration during which the first NFC module enters the first polling mode exceeds the protection duration, whether to control the first NFC module to exit the first polling mode can be determined according to the distance between the first electronic device and the second electronic device. This can avoid the first NFC module switching between different polling modes too frequently, causing unnecessary power loss.

[0168] In the case of meeting the exit condition, 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 the NFC tag, the electronic device supporting only the card emulation mode, the electronic device of the same manufacturer or the same operating system, and the like, to meet the NFC use requirements in different scenarios.

[0169] Exemplarily, FIG. 7A is a timing diagram of a data transmission method in another embodiment. As shown in FIG. 7A, the first electronic device can enter a data transmission page, write device information to the first NFC module, and close the polling functions of Type A, Type B, and Type F of the first NFC module, and only keep the polling function of Type V or continuously send a single carrier signal. The second electronic device can be in a screen-on 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 the card reader mode and the card emulation mode, and send the first NFC instruction when in the card reader mode.

[0170] In the case of "touching" between the first electronic device and the second electronic device, 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. In the case of receiving the first NFC instruction, the first electronic device can close 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 in 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.

[0171] Exemplarily, FIG. 7B is a timing diagram of a data transmission method in another embodiment. As shown in FIG. 7B, the second electronic device can enter a data transmission page and send a BLE broadcast carrying a first identifier, which is used to identify a data transmission scenario. The first electronic device can be in a screen-on state and can display any interface. The first electronic device can perform BLE broadcast scanning and receive the BLE broadcast sent by the second electronic device. In a case where it is determined according to the BLE broadcast that the distance between the first electronic device and the second electronic device is less than a distance threshold, the first electronic device can write device information to the first NFC module and turn off the polling functions of Type A, Type B and Type F of the first NFC module, and only keep the polling function of Type V or continuously send 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 the first NFC instruction when in the card reader mode.

[0172] In a case where the first electronic device and the second electronic device "bump", 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 in a case where the first electronic device receives the first NFC instruction, the first electronic device 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 in 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.

[0173] In the embodiments of the present application, in a case where the first electronic device is in a data transmission scenario, the first NFC module can be controlled to enter a first polling mode, in which the first NFC module can only send a target polling instruction to discover electronic devices in a radio frequency field, and electronic devices entering the radio frequency field will not mistakenly enter a card emulation interaction process, avoiding the occurrence of a false card ejection situation, and ensuring 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.

[0174] In some embodiments, the device information written by the first electronic device to the first NFC module can include a device identifier. The above method can further include: in a case where it is detected that the second electronic device is close to the first electronic device, sending a second Bluetooth signal carrying the device identifier, so that the second electronic device receives the second Bluetooth signal, and in a case where it is determined that the device identifier carried by the second Bluetooth signal is consistent with the device identifier read from the first NFC module, establishing a wireless communication connection with the first electronic device.

[0175] In a case where the first electronic device detects that the second electronic device is close, such as detecting a "tap-to-tap" interaction with the second electronic device, a second Bluetooth signal carrying a device identifier of the first electronic device can be sent, for example, a second Bluetooth signal carrying a device ID of the first electronic device can be sent.

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

[0177] In some embodiments, the second Bluetooth signal can include a BLE broadcast signal. After reading the device information stored in the first NFC module through the second NFC module, the second electronic device can perform BLE broadcast signal scanning, so that the BLE broadcast signal sent by the first electronic device can be scanned. The second electronic device can parse the received BLE broadcast signal to obtain the device identifier carried in the BLE broadcast signal, and then compare the device identifier carried in the BLE broadcast signal with the device identifier read from the first NFC module. If they are consistent, the second electronic device can determine that the BLE broadcast signal is the 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 with the first electronic device based on the BLE broadcast signal. Through the second Bluetooth signal carrying the device identifier of the first electronic device, more accurate wireless communication connection between the two electronic devices can be established, and the accuracy and security of data transmission are improved.

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

[0179] The inter-application can be an application that supports the second electronic device and the first electronic device to implement data transmission based on NFC interaction. The inter-application can be responsible for establishing a wireless communication connection between the second electronic device and the first electronic device and data transmission. The link information can be a link address corresponding to the inter-application, and the second electronic device can directly jump to the inter-application by triggering the link address corresponding to the inter-application.

[0180] Optionally, the link information can also be a link address of an application jump component for jumping to the cross-application program. The second electronic device can display the application jump component by triggering the link address of the application jump component. The application jump component can refer to a component for prompting a user to jump to the cross-application program, for example, a prompt card, a notification, a prompt box, etc.

[0181] As an implementation, after the second electronic device reads the link information from the first NFC module through the second NFC module, the second electronic device can display the application jump component according to the link information. The user can select whether to perform a jump operation on the application jump component according to actual needs. If the second electronic device detects a jump operation on the application jump component, the second electronic device can jump to the cross-application program in response to the jump operation on the application jump component.

[0182] In the case where the second electronic device jumps to the cross-application program, the cross-application program can call the Bluetooth module to scan the second Bluetooth signal sent by the first electronic device. By way of example, FIG. 8 is a schematic diagram of an interface for displaying an application jump component in an embodiment. As shown in FIG. 8, in the case where the second electronic device displays an arbitrary interface (such as a 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 a device identifier and link information, from the first NFC module of the first electronic device through the second NFC module. The second electronic device can display an application jump component 820 according to the link information. The display of the application jump component 820 can be used to prompt a jump to an NFC cross-application program. The user can select whether to jump to the NFC cross-application program, for example, by clicking a confirm button to select to jump to the NFC cross-application program or by clicking a cancel button. If the second electronic device detects a jump operation on the application jump component 820 (for example, the user clicks the confirm button), the second electronic device can jump to the NFC cross-application program and scan the second Bluetooth signal sent by the first electronic device.

[0183] It should be noted that the cross-application program that is jumped to can run in the foreground of the second electronic device or run in the background, which is not limited herein.

[0184] In this embodiment, the first electronic device can trigger the second electronic device that reads the link information to jump to the cross-application program and scan the second Bluetooth signal sent by the first electronic device by writing the link information to the first NFC module, so that the first electronic device and the second electronic device can successfully establish a wireless communication connection and perform data interaction. In addition, the second electronic device can prompt the user about the jump by displaying the application jump component, thereby improving the user experience.

[0185] Optionally, during the process of establishing the Bluetooth communication connection between the second electronic device and the first electronic device, or after the Bluetooth communication connection between the second electronic device and the first electronic device is established, the second electronic device can also perform mutual identity verification according to the check code read from the first NFC module. For example, the second electronic device and the first electronic device can exchange the check codes, the second electronic device sends the read check code to the first electronic device, the first electronic device sends the stored check code to the second electronic device, and the two can be compared to determine whether they are consistent. If they are consistent, it is determined that the mutual identity verification is passed.

[0186] In some embodiments, the first electronic device can create a wireless access point. After the Bluetooth communication connection between the second electronic device and the first electronic device is established, the first electronic device can send the identification information of the wireless access point, the access password and other access point information to the second electronic device through the Bluetooth communication connection. For example, the first electronic device can send the SSID (Service Set Identifier) of the wireless access point, the access password and other information. The second electronic device can connect to the wireless access point provided by the first electronic device according to the access point information, and establish a Wi-Fi communication connection with the first electronic device. The first electronic device and the second electronic device can perform data transmission through the Wi-Fi communication connection.

[0187] For example, FIG. 9A is a timing diagram of a data transmission method in another embodiment. As shown in FIG. 9A, the first electronic device can enter a data transmission page, write device information to the first NFC module, and close the polling functions of Type A, Type B and Type F of the first NFC module, and only keep the polling function of Type V or continuously send the 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 the card reader mode and the card simulation mode, and send the first NFC instruction when it is in the card reader mode.

[0188] In the case that the first electronic device "bumps" the second electronic device, the first electronic device can control the first NFC module to enter a mute state to listen to the first NFC instruction sent by the second electronic device. In the case that the first electronic device keeps bumping the second electronic device and receives the first NFC instruction, the first electronic device can close the reader / writer mode of the first NFC module and enter a card emulation mode, so that the second NFC module in the reader / writer mode in 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, the second electronic device scans the BLE broadcast, and in the case that the device identifier carried in the BLE broadcast is consistent with the device identifier read from the first NFC module, the second electronic device establishes a Bluetooth communication connection with the first electronic device and establishes a Wi-Fi communication connection. The first electronic device and the second electronic device can perform data transmission through the Wi-Fi communication connection.

[0189] Exemplarily, FIG. 9B is a timing diagram of a data transmission method in another embodiment. As shown in FIG. 9B, the second electronic device can enter a data transmission page and send a BLE broadcast carrying a first identifier, the first identifier being used to identify a 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 BLE broadcast scanning and receive the BLE broadcast sent by the second electronic device. In the case that the first electronic device determines that the distance between the first electronic device and the second electronic device is less than a distance threshold according to the BLE broadcast, the first electronic device can write device information to the first NFC module and close the polling functions of Type A, Type B and Type F of the first NFC module, and only keep the polling function of Type V or continuously send 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 the first NFC instruction when in the card reader mode.

[0190] In the case that the first electronic device "bumps" the second electronic device, the first electronic device can control the first NFC module to enter a mute state to listen to the first NFC instruction sent by the second electronic device. In the case that the first electronic device and the second electronic device keep bumping, the first electronic device can close the reader / writer mode of the first NFC module and enter a card emulation mode in the case that the first NFC instruction is received, so that the second NFC module in the reader / writer mode in 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 the device identifier, the second electronic device scans the BLE broadcast, and in the case that the device identifier carried in the BLE broadcast is consistent with the device identifier read from the first NFC module, the second electronic device establishes a Bluetooth communication connection with the first electronic device and establishes a Wi-Fi communication connection. The first electronic device and the second electronic device can perform data transmission through the Wi-Fi communication connection.

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

[0192] As shown in FIG. 10, in one embodiment, another data transmission method is provided, which can be applied to the second electronic device described above. The method can include the following steps:

[0193] In step 1010, a first NFC instruction is sent through the second NFC module. The first NFC instruction is a self-defined NFC instruction, so that the first electronic device receives the first NFC instruction in the case that the second electronic device is close to the first electronic device, and the first electronic device 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 device information of the first electronic device is stored in the first NFC module.

[0194] In step 1020, the device information of the first electronic device is read from the first NFC module.

[0195] In step 1030, a wireless communication connection is established with the first electronic device based on the device information.

[0196] In step 1040, data transmission is performed with the second electronic device through the wireless communication connection.

[0197] In some embodiments, before step 1010, the method further includes: displaying a data transmission page; and 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 the data transmission scenario according to the first identifier carried by the first Bluetooth signal.

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

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

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

[0201] In some embodiments, step 1030 can include: establishing a Bluetooth communication connection with the first electronic device based on the device information; and establishing a Wi-Fi communication connection with the first electronic device based on the Bluetooth communication connection; and step 1040 can include: performing data transmission with the second electronic device through the Wi-Fi communication connection.

[0202] 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, through the Bluetooth communication connection, connection information of a wireless access point corresponding to the first electronic device; and connecting to the wireless access point according to the connection information to establish the Wi-Fi communication connection with the first electronic device.

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

[0204] In the embodiment of the present application, when the first electronic device is close to the second electronic device, the first electronic device can control the first NFC module to be in the card emulation mode according to the first NFC instruction sent by the second electronic device, so as to realize automatic switching of the mode of the first NFC module, and make the second electronic device read the device information from the first NFC module and trigger establishment of the wireless communication connection between the two devices, thereby simplifying the interaction process of establishing the wireless communication connection between the two electronic devices based on the NFC technology, and simplifying the interaction process of data transmission. In addition, the first electronic device has the function of identifying the first NFC instruction defined by the second electronic device, and can realize the function of data transmission between electronic devices of different manufacturers and / or different operating systems through touching, thereby meeting the use requirement of the user and improving the use experience of the user.

[0205] As shown in FIG. 11, in one embodiment, a data transmission apparatus 1100 is provided, which can be applied to the first electronic device described above, and the data transmission apparatus 1100 comprises an NFC receiving module 1110, an NFC control module 1120 and a first transmission module 1130.

[0206] The NFC receiving module 1110 is configured to receive the 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 self-defined NFC instruction.

[0207] The NFC control module 1120 is configured to control the first NFC module to be in the 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 establishment of the wireless communication connection between the second electronic device and the first electronic device.

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

[0209] In one embodiment, the NFC control module 1120 is further configured to control the first NFC module 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 the NFC instruction.

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

[0211] In one embodiment, the data transmission apparatus 1100 further comprises a writing module.

[0212] The writing module is configured to write the device information of the first electronic device to the first NFC module in a data transmission scenario.

[0213] In one embodiment, the NFC control module 1120 is further configured to, in a case where the first NFC module is in the data transmission scenario, control 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, the target polling instruction is used to discover an electronic device supporting NFC function and can avoid the discovered electronic device to enter a card emulation interaction process; and in a case where the second electronic device is detected to be close to the first electronic device, control the first NFC module to stop sending the target polling instruction.

[0214] In one embodiment, the data transmission apparatus 1100 further comprises a scenario determination module.

[0215] The scenario determination module is configured to display a data transmission page and determine that the first electronic device is in a data transmission scenario.

[0216] In one embodiment, the scenario determination module is further configured to receive a first Bluetooth signal sent by the second electronic device; the first Bluetooth signal is sent in a case where the second electronic device displays the data transmission page; the first Bluetooth signal carries a first identifier, the first identifier is used to identify the data transmission scenario; and determine that the first electronic device is in the data transmission scenario according to the first identifier carried by the first Bluetooth signal.

[0217] In one embodiment, the data transmission apparatus 1100 further comprises a ranging module.

[0218] The ranging module is configured to determine a distance between the first electronic device and the second electronic device according to a signal strength of the first Bluetooth signal.

[0219] The NFC control module 1120 is further configured to, in a case where the distance is less than or equal to a distance threshold, control the first NFC module to enter the first polling mode.

[0220] In one embodiment, the target polling instruction comprises a polling instruction of Type V type, or a single carrier signal.

[0221] In one embodiment, the NFC control module 1120 is further configured to, in a case where an exit condition is met, control the first NFC module to switch from the first polling mode to a second polling mode; the second polling mode refers to a mode in which the first NFC module sends polling instructions of multiple NFC card types in turn; the multiple NFC card types comprise multiple types selected from Type A type, Type B type, Type F type and Type V type.

[0222] In one embodiment, the data transmission apparatus 1100 further comprises a first Bluetooth sending module.

[0223] The first Bluetooth sending module is configured to, in a case where the second electronic device is detected to be close to the first electronic device, send a second Bluetooth signal carrying device identification, so that the second electronic device receives the second Bluetooth signal, and in a case where the device identification carried by the second Bluetooth signal is consistent with the device identification read from the first NFC module, establish a wireless communication connection with the first electronic device.

[0224] In one embodiment, the device information further 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.

[0225] In one embodiment, the NFC control module 1120 is further configured to control the first NFC module to close the reader / writer mode and only be in the card emulation mode.

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

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

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

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

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

[0231] In the embodiments of the present application, in a case where the first electronic device is close to the second electronic device, the first electronic device can control the first NFC module to be in the card emulation mode according to the first NFC instruction sent by the second electronic device, realize 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 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 NFC technology, and thus simplify the interaction process of data transmission. In addition, the first electronic device has the function of identifying the first NFC instruction defined by the second electronic device, can realize the function of data transmission between electronic devices of different manufacturers and / or different operating systems through touching, meets the use demand of users, and improves the use experience of users.

[0232] As shown in FIG. 12, in one embodiment, a data transmission apparatus 1200 is provided, which can be applied to the second electronic device described above, and the data transmission apparatus 1200 can include an NFC sending module 1210, a reading module 1220, a connecting module 1230, and a second transmission module 1240.

[0233] The NFC sending module 1210 is configured to send a first NFC instruction through the second NFC module, the first NFC instruction being a self-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, in response to the first NFC instruction, controls the first NFC module in the first electronic device to be in a card emulation mode; and the first NFC module stores device information of the first electronic device.

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

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

[0236] The second transmission module 1240 is configured to perform data transmission with the second electronic device through the wireless communication connection.

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

[0238] The second Bluetooth sending module is configured to display a data transmission page; and send 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 the data transmission scenario according to the first identifier carried by the first Bluetooth signal.

[0239] In one embodiment, the first Bluetooth signal is used to instruct the first electronic device to determine a distance between the first electronic device and the second electronic device according to a 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.

[0240] In one embodiment, the device information includes a device identifier; and the data transmission apparatus 1200 further includes a Bluetooth receiving module and a comparison module.

[0241] The Bluetooth receiving module is configured to receive a second Bluetooth signal sent by the first electronic device, the second Bluetooth signal carrying the device identifier.

[0242] The comparison module is configured to compare the device identifier carried by the second Bluetooth signal with the device identifier read from the first NFC module.

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

[0244] In an embodiment, the device information further includes link information, and the data transmission apparatus 1200 further includes a jump module.

[0245] The jump module is configured to display an application jump component according to the link information, the application jump component being used to instruct to jump to the cross-application program; and in response to a jump operation on the application jump component, jump to the cross-application program and scan the second Bluetooth signal sent by the first electronic device.

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

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

[0248] In an embodiment, the connection module 1230 is further configured to receive, through the Bluetooth communication connection, connection information corresponding to a wireless access point sent by the first electronic device, and connect to the wireless access point according to the connection information to establish the Wi-Fi communication connection with the first electronic device.

[0249] In the embodiments of the present application, when the first electronic device is close to the second electronic device, the first electronic device can control the first NFC module to be in the card emulation mode according to the first NFC instruction sent by the second electronic device, to realize 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 establishment of the wireless communication connection therebetween, which simplifies the interaction process of establishing the wireless communication connection based on the NFC technology between the two electronic devices, and thus simplifies the interaction process of data transmission, and the first electronic device has the function of identifying the first NFC instruction defined by the second electronic device, and can realize the function of data transmission through touching between electronic devices of different manufacturers and / or different operating systems, to meet the use requirements of users and improve the use experience of users.

[0250] FIG. 13 is a structural block diagram of an electronic device in an embodiment. As shown in FIG. 13, the electronic device 1300 can include one or more of the following components: a processor 1310, a memory 1320 coupled with the processor 1310, and a transceiver 1330, wherein the memory 1320 can store one or more computer programs which can be configured to enable the electronic device 1300 to implement the data transmission method applied to the first electronic device as described in the above embodiments when executed by the one or more processors 1310.

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

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

[0253] The transceiver unit 1330 can at least include an NFC module, and further can include, but not limited to, a Bluetooth module, a Wi-Fi module, etc., which can be used to provide communication functions.

[0254] The electronic device disclosed by the embodiments of the present application includes a memory, a processor and a transceiver unit, the memory stores a computer program, and the computer program is executed by the processor to enable the earphone device to implement the data transmission method applied to the second electronic device as described in the above embodiments.

[0255] The embodiments of the present application disclose a computer readable storage medium storing a computer program, wherein the computer program is executed by a processor in an electronic device to enable the electronic device to implement the data transmission method applied to the first electronic device as described in the above embodiments.

[0256] The embodiments of the present application disclose a computer readable storage medium storing a computer program, wherein the computer program is executed by a processor in an electronic device to enable the electronic device to implement the data transmission method applied to the second electronic device as described in the above embodiments.

[0257] The embodiments of the present application disclose a computer program product including a computer program, and the computer program can be executed by a processor in an electronic device to enable the electronic device to implement the data transmission method applied to the first electronic device as described in the above embodiments.

[0258] The embodiments of the present application disclose a computer program product including a computer program, and the computer program can be executed by a processor in an electronic device to enable the electronic device to implement the data transmission method applied to the second electronic device as described in the above embodiments.

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

[0260] As used herein, any reference to memory, storage, a database or other medium can include non-volatile and / or volatile storage. Suitable non-volatile storage can include ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), or flash memory. Volatile storage can include random access memory (RAM), which acts as external cache. By way of illustration and not limitation, RAM can be SRAM, DRAM, synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), Rambus DRAM (RDRAM), direct Rambus dynamic RAM (DRDRAM), and the like.

[0261] It is to be understood that the terminology "one embodiment" or "an embodiment" used throughout this specification can denote a particular feature, structure, or characteristic included in at least one embodiment of the application. Hence, the appearances of "in one embodiment" or "in an embodiment" throughout this specification are not necessarily referring to the same embodiment. Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It is to be understood that the embodiments described herein are merely exemplary of the application, and that various modifications can be made to form still other embodiments within the spirit and scope of the application. As such, those skilled in the art will appreciate that the functions can be implemented using either software functioning in a firmware or hardware element, or a combination of both.

[0262] In various embodiments of the present application, it should be understood that the magnitude of the serial number of the processes described above does not mean the inevitable sequence of execution order, and the execution order of the processes should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0263] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0264] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0265] Each technical feature of the above-described embodiments can be combined arbitrarily, and in order to make the description concise, not all possible combinations of each technical feature in the above-described embodiments are described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.

[0266] The data transmission method, device, electronic equipment and program product disclosed in the embodiments of the present application are described in detail above, and the principle and implementation mode of the present application are described by applying specific examples. The above description of the embodiments is only used to help understand the method and its core idea. At the same time, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed. In summary, the content of the specification should not be understood as a limitation of the present application.

Claims

1. A data transmission method, characterized by, The method is applied to a first electronic device including a first NFC module, and the method comprises the following steps: In a case where a second electronic device is detected to be close to the first electronic device, a first NFC instruction sent by the second electronic device is received; 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 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; Data transmission is performed with the second electronic device through the wireless communication connection.

2. The method of claim 1, wherein, Before the step of receiving the first NFC instruction sent by the second electronic device, the method further comprises the following steps: The first NFC module is controlled to be in a silent state; the silent state refers to a state in which the first NFC module listens to a first NFC instruction and does not send an NFC instruction.

3. The method of claim 2, wherein, The step of controlling the first NFC module to be in the silent state comprises the following steps: In a case where the second electronic device is detected to be close to the first electronic device, the first NFC module is controlled to be in the silent state.

4. The method of claim 1, wherein, Before the step of receiving the first NFC instruction sent by the second electronic device in a case where the second electronic device is detected to be close to the first electronic device, the method further comprises the following steps: In a case where a data transmission scenario is present, device information of the first electronic device is written into the first NFC module.

5. The method of claim 1, wherein, Before the step of receiving the first NFC instruction sent by the second electronic device in a case where the second electronic device is detected to be close to the first electronic device, the method further comprises the following steps: In a case where the data transmission scenario is present, the first NFC module is controlled to be in 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 an electronic device supporting an NFC function and can avoid the discovered electronic device from entering a card emulation interaction process; The method further comprises the following steps: In a case where the second electronic device is detected to be close to the first electronic device, the first NFC module is controlled to stop sending the target polling instruction.

6. The method of claim 5, wherein, Before the step of controlling the first NFC module to be in the first polling mode in a case where the data transmission scenario is present, the method further comprises the following steps: A data transmission page is displayed, and it is determined that the data transmission scenario is present.

7. The method of claim 5, wherein, Before the step of controlling the first NFC module to be in the first polling mode in a case where the data transmission scenario is present, the method further comprises the following steps: A first Bluetooth signal sent by the second electronic device is received; the first Bluetooth signal is sent in a case where 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 the data transmission scenario; The first identifier carried by the first Bluetooth signal is used to determine that the data transmission scenario is present.

8. The method of claim 7, wherein, Before the step of controlling the first NFC module to be in the first polling mode, the method further comprises the following steps: 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 the first polling mode comprises: in a case where the distance is less than or equal to a distance threshold, controlling the first NFC module to enter the first polling mode.

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

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

11. The method of claim 1, wherein, the device information comprises a device identifier, and the method further comprises: in a case where a second electronic device is detected to be close to the first electronic device, sending a second Bluetooth signal carrying the device identifier, so as to enable the second electronic device to receive the second Bluetooth signal, and in a case where the device identifier carried by the second Bluetooth signal is determined to be consistent with the device identifier read from the first NFC module, establishing a wireless communication connection with the first electronic device.

12. The method of claim 11, wherein, the device information further comprises link information; the link information is used to trigger the second electronic device to jump to an application program for mutual transmission 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 the card emulation mode comprises: controlling the first NFC module to close a reader-writer mode and only be in the card emulation mode.

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

15. The method of claim 14, wherein, the device information is further used to trigger the second electronic device to establish a Bluetooth communication connection with the first electronic device, and establish a Wi-Fi communication connection with the first electronic device based on the Bluetooth communication connection; the data transmission between the second electronic device through the wireless communication connection comprises: the data transmission between the second electronic device through the Wi-Fi communication connection.

16. The method of claim 15, wherein, before the data transmission between the second electronic device through the Wi-Fi communication connection, the method further comprises: establishing a Bluetooth communication connection with the second electronic device; sending, to the second electronic device through the Bluetooth communication connection, connection information corresponding to a wireless access point, so as to enable the second electronic device to connect the wireless access point according to the connection information and establish a Wi-Fi communication connection with the first electronic device.

17. A data transmission method, characterized by, applied to a second electronic device, the second electronic device comprising a second NFC module, the method comprising: The second NFC module sends a first NFC instruction, the first NFC instruction is a self-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 in response to the first NFC instruction, the first NFC module in the first electronic device is controlled to be in a card emulation mode; the first NFC module stores device information of the first electronic device; Read the device information of the first electronic device from the first NFC module; Based on the device information, a wireless communication connection is established with the first electronic device; Through the wireless communication connection, data transmission is performed with the second electronic device.

18. The method of claim 17, wherein, Before the first NFC instruction is sent through the second NFC module, the method further comprises: Display a data transmission page; Send a first Bluetooth signal, the first Bluetooth signal carries a first identifier, the first identifier is 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.

19. The method of claim 18, wherein, 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 of claim 17, wherein, The device information includes a device identifier; the wireless communication connection is established with the first electronic device based on the device information, comprising: Receive the second Bluetooth signal sent by the first electronic device, the second Bluetooth signal carries a device identifier; Compare the device identifier carried by the second Bluetooth signal with the device identifier read from the first NFC module; If the device identifier carried by the second Bluetooth signal is consistent with the device identifier read from the first NFC module, a wireless communication connection is established with the first electronic device.

21. The method of claim 20, wherein, The device information further includes link information; after the device information of the first electronic device is read from the first NFC module, the method further comprises: According to the link information, display an application jump component, the application jump component is used to instruct to jump to a mutual transmission application program; In response to a 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 wireless communication connection is established with the first electronic device based on the device information, comprising: Based on the device information, a Bluetooth communication connection is established with the first electronic device; Based on the Bluetooth communication connection, a Wi-Fi communication connection is established with the first electronic device; The data transmission is performed with the second electronic device through the wireless communication connection, comprising: Through the Wi-Fi communication connection, data transmission is performed with the second electronic device.

23. The method of claim 22, wherein, The Wi-Fi communication connection is established with the first electronic device based on the Bluetooth communication connection, comprising: The first electronic device sends connection information of a wireless access point to the second electronic device through the Bluetooth communication connection. The second electronic device connects the wireless access point according to the connection information to establish a Wi-Fi communication connection with the first electronic device.

24. A data transmission apparatus, characterized by comprising: The first electronic device includes a first NFC module, and the apparatus includes: An NFC receiving module configured to receive a first NFC instruction sent by a second electronic device when the second electronic device is detected to be close to the first electronic device, the first NFC instruction being a self-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, the device information being used to trigger the second electronic device to establish a wireless communication connection with the first electronic device; A first transmission module configured to perform data transmission with the second electronic device through the wireless communication connection.

25. A data transmission device, characterized by The second electronic device includes a second NFC module, and the apparatus includes: An NFC sending module configured to send a first NFC instruction through the second NFC module, the first NFC instruction being a self-defined NFC instruction, so that the first electronic device receives the first NFC instruction when the second electronic device is close to the first electronic device, and the first electronic device controls a 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 storing device information of the first electronic device; A reading module configured to read the 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; A second transmission module configured to perform data transmission with the second electronic device through the wireless communication connection.

26. An electronic device, comprising: The electronic device includes a memory and a processor, a transceiver unit, the memory stores a computer program, and the computer program is executed by the processor to enable the electronic device to implement the method in any one of claims 1-16 or 17-23.

27. A computer program product, characterised in that, The computer program is executed by a processor in an electronic device to enable the electronic device to implement the method in any one of claims 1-16 or 17-23.

Citation Information

Patent Citations

  • Information processing apparatus, non-transitory storage medium, and information exchange method

    CN109561229A

  • Content continuing method and system and electronic equipment

    CN112351412A

  • Data interaction method and device based on NFC

    CN115442780A

  • Equipment connection method and device, equipment and storage medium

    CN116249097A

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

    CN119255216A