Data interaction methods, devices, electronic devices, and storage media
By constructing an electric field-human communication channel when the electronic device is on the opposite side of the human body, the signal attenuation problem caused by human body obstruction in wireless data transmission is solved, thus improving the data transmission rate.
Patent Information
- Application Number
- CN202311265790.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-25
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2043-09-25
AI Technical Summary
In wireless data transmission, the data transmission rate between electronic devices is affected by human obstruction, especially when the device is on the same side of the body, the signal attenuation is severe.
By determining the distance and positional relationship between electronic devices and the human body, electric field human body communication technology can be used to construct data interaction channels when the device is located on different sides of the human body, thereby reducing the impact of human body obstruction.
It increases data transmission rate, reduces the impact of human obstruction on signal, and improves data transmission efficiency.
Smart Images

Figure CN119697616B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic equipment technology, and more specifically, to a data interaction method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the development of science and technology, electronic devices are becoming increasingly widespread and multifunctional, becoming an essential part of people's daily lives. Currently, different electronic devices can exchange data wirelessly; however, wireless communication is often hampered by obstacles, leading to poor data transmission rates. Summary of the Invention
[0003] In view of the above problems, this application proposes a data interaction method, apparatus, electronic device, and storage medium to solve the above problems.
[0004] In a first aspect, embodiments of this application provide a data interaction method applied to a first electronic device, the first electronic device being used to interact with a second electronic device. The method includes: determining a first distance relationship between the first electronic device and a target human body and a first distance threshold, and determining a second distance relationship between the second electronic device and the target human body and a second distance threshold; determining the positional relationship between the first electronic device and the second electronic device and the target human body; if, based on the first distance relationship, it is determined that the first distance is less than the distance threshold, based on the second distance relationship, it is determined that the second distance is less than the distance threshold, and based on the positional relationship, it is determined that the first electronic device and the second electronic device are located on different sides of the target human body, then a data interaction channel between the first electronic device and the second electronic device is constructed based on electric field human body communication technology.
[0005] Secondly, embodiments of this application provide a data interaction device applied to a first electronic device, the first electronic device being used to interact with a second electronic device. The device includes: a distance relationship determination module, used to determine a first distance relationship between the first electronic device and a target human body and a first distance threshold, and to determine a second distance relationship between the second electronic device and the target human body and a second distance threshold; a position relationship determination module, used to determine the positional relationship between the first electronic device and the second electronic device and the target human body; and a data interaction channel construction module, used to construct a data interaction channel between the first electronic device and the second electronic device based on electric field human body communication technology if, based on the first distance relationship, the first distance is determined to be less than the distance threshold, based on the second distance relationship, the second distance is determined to be less than the distance threshold, and based on the positional relationship, the first electronic device and the second electronic device are located on different sides of the target human body.
[0006] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory is coupled to the processor, the memory stores instructions, and when the instructions are executed by the processor, the processor performs the above-described method.
[0007] Fourthly, embodiments of this application provide a computer-readable storage medium storing program code, which can be invoked by a processor to execute the above-described method.
[0008] The data interaction method, apparatus, electronic device, and storage medium provided in this application determine a first distance relationship between a first electronic device and a target human body and a first distance threshold, and a second distance relationship between a second electronic device and a target human body and a second distance threshold. They also determine the positional relationship between the first and second electronic devices and the target human body. If, based on the first distance relationship, the first distance is determined to be less than the distance threshold, based on the second distance relationship, the second distance is determined to be less than the distance threshold, and based on the positional relationship, the first and second electronic devices are determined to be located on different sides of the target human body, then a data interaction channel between the first and second electronic devices is constructed based on electric field human body communication technology. Therefore, by constructing a data interaction channel between electronic devices based on electric field human body communication technology when the electronic devices requiring data interaction are close to the target human body and located on different sides of the target human body, human body obstruction can be reduced, and data transmission rate can be improved. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0010] Figure 1 A schematic diagram illustrating an application scenario that can be used for the data interaction method provided in the embodiments of this application is shown;
[0011] Figure 2 A schematic diagram showing the equivalent capacitance formed between the first electronic device and the target human body is shown;
[0012] Figure 3 A schematic diagram showing the equivalent capacitance formed between the second electronic device and the target human body is shown;
[0013] Figure 4 A flowchart illustrating a data interaction method provided in an embodiment of this application is shown;
[0014] Figure 5 A flowchart illustrating a data interaction method provided in an embodiment of this application is shown;
[0015] Figure 6 A flowchart illustrating a data interaction method provided in an embodiment of this application is shown;
[0016] Figure 7 A flowchart illustrating a data interaction method provided in an embodiment of this application is shown;
[0017] Figure 8 A block diagram of a data interaction device provided in an embodiment of this application is shown;
[0018] Figure 9 A block diagram of an electronic device for performing a data interaction method according to an embodiment of this application is shown;
[0019] Figure 10 An embodiment of the present application shows a storage unit for storing or carrying program code that implements the data interaction method according to the embodiment of the present application. Detailed Implementation
[0020] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0021] Currently, two electronic devices can interact with each other. For example, two electronic devices can include a smartphone and headphones, which can then interact via Bluetooth or a wired connection. Method 1: The headphones are wired to the smartphone, with the headphone plug connected to the smartphone's jack. This allows the audio signals from the smartphone to be transmitted to the headphones, and the audio signals are output through the headphones' speakers. Method 2: The headphones are wireless Bluetooth headphones, which connect to the smartphone via Bluetooth.
[0022] For Method 2, the current data transmission and connection establishment process is as follows: 1. Bluetooth broadcast - device discovery; 2. Pairing and binding devices; 3. Establishing a connection; 4. Data communication. Broadcasting is conducted on Bluetooth frame formats via broadcast channels 37, 38, and 39. A single broadcast packet is a maximum of 37 bytes, consisting of a MAC address and N AD structures. If the data is less than 37 bytes, it can be padded. Upon receiving a scan_req, the broadcaster can send a scan_rsp response message on the same channel, which is completed within a specified time. After transmitting a broadcast packet, the advertiser needs to open a radio frequency reception window for a period of time to receive data packets from the observer. During this time, the observer can send connection requests to the advertiser. After the host scans and detects the slave device, it sends a connect_req connection request.
[0023] In wireless communication between smartphones and headphones, the transmission of wireless audio involves communication between the smartphone and both headphones. Regardless of whether the smartphone is held in hand, on a table, or in a pocket, it remains on one side of the user's body. The signal from the headphones on the opposite side of the body is obstructed and attenuated, inevitably leading to a significant decrease in signal strength and a drop in audio bitrate. Using binaural relay, however, consumes bandwidth and cannot completely solve the problem.
[0024] To address the aforementioned problems, the inventors, through long-term research, discovered and proposed the data interaction method, apparatus, electronic device, and storage medium provided in the embodiments of this application. By constructing a data interaction channel between electronic devices based on electric field human body communication technology when the electronic device requiring data interaction is close to the target human body and located on different sides of the target human body, the obstruction of the human body can be reduced, and the data transmission rate can be improved. The specific data interaction method will be described in detail in the subsequent embodiments.
[0025] The following describes the application scenarios that can be used for the data interaction methods provided in the embodiments of this application.
[0026] Please see Figure 1 , Figure 1A schematic diagram illustrating an application scenario that can be used for the data interaction method provided in the embodiments of this application is shown. For example... Figure 1 As shown, it includes a first electronic device 100, which is used to interact with a second electronic device 200. The first electronic device 100 may include a smartphone, tablet, earphones, smart ring, smartwatch, smart glasses, heart rate monitor, wristband, bracelet, etc., and is not limited thereto. Figure 1 Taking a smartphone as an example, the first electronic device 100 may include, but is not limited to, smartphones, tablets, earphones, smart rings, smartwatches, smart glasses, heart rate monitors, wristbands, bracelets, etc. Figure 1 Taking the second electronic device 200 as an example, which is a headset. Figure 1 As shown, the first electronic device 100 can be held in the hand of the user (target human body), and the second electronic device 200 can be worn on the ear of the user (target human body).
[0027] The first electronic device 100 can be used as a signal source for the second electronic device 200. For example, the first electronic device 100 can be used as an audio source, a health data source, etc. for the second electronic device, without limitation.
[0028] Please see Figure 2 , Figure 2 A schematic diagram showing the equivalent capacitance formed between the first electronic device and the target human body is shown. Figure 2 As shown, the first electronic device 100 may include an electrode antenna, which is used to form an equivalent capacitance / electric field with the human body for data transmission based on the equivalent capacitance / electric field. That is, the first electronic device 100 is used to transmit data based on the equivalent capacitance / electric field, and the second electronic device 200 is used to receive data.
[0029] Please see Figure 3 , Figure 3 A schematic diagram illustrating the equivalent capacitance formed between the second electronic device and the target human body is shown. Figure 3As shown, the second electronic device 200 may include a microcontroller unit (MCU) for system logic processing and routine detection, such as headphone insertion detection, opening detection, and touch event judgment; a codec for audio data encoding and decoding; a power amplifier and speaker for outputting sound that can be perceived by the human ear; and Wi-Fi (Wireless-Remote Communication), a human body electric field communication technology. Wi-Fi, in conjunction with electrodes / antennas, is used for data transmission. These electrodes / antennas form an equivalent capacitance with the human body for data transmission. The antenna can share a design with a conventional Bluetooth antenna, which can better save the size of the second electronic device 200. Optionally, the Wi-Fi operating frequency is between 1MHz and 20MHz.
[0030] Please see Figure 4 , Figure 4 A flowchart illustrating a data interaction method according to an embodiment of this application is shown. This method is used to construct a data interaction channel between electronic devices when the electronic device requiring data interaction is close to the target human body and located on different sides of the target human body. This reduces human body obstruction and improves data transmission rate. In a specific embodiment, this data interaction method is applied to, for example... Figure 8 The data interaction device 300 and the first electronic device 100 equipped with the data interaction device 300 are shown. Figure 9 The following will use a first electronic device as an example to illustrate the specific process of this embodiment. Of course, it is understood that the first electronic device used in this embodiment may include smartphones, tablets, wearable electronic devices, etc., and is not limited thereto. In this embodiment, the first electronic device is used for data interaction with the second electronic device. The following will focus on... Figure 4 The process shown will be described in detail. The data interaction method may specifically include the following steps:
[0031] Step S110: Determine the first distance relationship between the first electronic device and the target human body and a first distance threshold, and determine the second distance relationship between the second electronic device and the target human body and a second distance threshold.
[0032] Optionally, the target human body can be a human body that corresponds to the first electronic device and the second electronic device. For example, if the first electronic device and / or the second electronic device are in a wearing state, the human body wearing the first electronic device and / or the second electronic device can be identified as the target human body; if the first electronic device and / or the second electronic device are in a holding state, the human body held by the first electronic device and / or the second electronic device can be identified as the target human body; or, the human body closest to the first electronic device and / or the second electronic device can be identified as the target human body, etc., without limitation.
[0033] In this embodiment, the distance between the first electronic device and the target human body can be determined as a first distance, and the distance relationship between the first distance and a distance threshold can be determined as a first distance relationship. This first distance relationship may include: the first distance is less than the distance threshold, the first distance is equal to the distance threshold, or the first distance is greater than the distance threshold.
[0034] The distance threshold can be the maximum distance within the range of the human body's electric field (the range relative to the surface of the human skin). That is, if the initial distance between the first electronic device and the target human body is less than the distance threshold, it can be considered that the distance between the first electronic device and the target human body meets the effective range for the transmission of the human body's electric field, and an effective human body electric field can be formed between the first electronic device and the target human body. If the initial distance between the first electronic device and the target human body is equal to or greater than the distance threshold, it can be considered that the distance between the first electronic device and the target human body does not meet the effective range for the transmission of the human body's electric field, and an effective human body electric field cannot be formed between the first electronic device and the target human body. Optionally, the distance threshold can include 10cm, 15cm, etc., and is not limited here.
[0035] In some implementations, the first electronic device may include a first distance sensor. Based on this, the first distance sensor of the first electronic device can detect a first distance between the first electronic device and the target human body, and compare the detected first distance with a pre-set and stored distance threshold to determine a first distance relationship between the first distance and the distance threshold.
[0036] In this embodiment, the distance between the second electronic device and the target human body can be determined as a second distance, and the distance relationship between the second distance and a distance threshold can be determined as a second distance relationship. This second distance relationship can include: the second distance is less than the distance threshold, the second distance is equal to the distance threshold, or the second distance is greater than the distance threshold.
[0037] The distance threshold can be the maximum distance within the range of the human body's electric field. That is, if the second distance between the second electronic device and the target human body is less than the distance threshold, it can be considered that the distance between the second electronic device and the target human body meets the effective range for the transmission of the human body's electric field, and an effective human body electric field can be formed between the second electronic device and the target human body. If the second distance between the second electronic device and the target human body is equal to or greater than the first distance threshold, it can be considered that the distance between the second electronic device and the target human body does not meet the effective range for the transmission of the human body's electric field, and an effective human body electric field cannot be formed between the second electronic device and the target human body. Optionally, the distance threshold can include 10cm, 15cm, etc., and is not limited here.
[0038] In some implementations, the second electronic device may include a second distance sensor. Based on this, the second distance sensor of the second electronic device can detect a second distance between the second electronic device and the target human body, and compare the detected second distance with a pre-set and stored distance threshold to determine a second distance relationship between the second distance and the distance threshold.
[0039] As one possible approach, if the second electronic device obtains a second distance relationship with the distance threshold, it can send the second distance relationship to the first electronic device via broadcast or Bluetooth. Accordingly, the first electronic device can obtain the second distance relationship, which is not limited here.
[0040] Step S120: Determine the positional relationship between the first electronic device and the second electronic device and the target human body.
[0041] In this embodiment, the positional relationship between the first electronic device and the second electronic device and the target human body can be determined. This positional relationship can include: the first electronic device and the second electronic device being located on the same side of the target human body, or the first electronic device and the second electronic device being located on different sides of the target human body. Optionally, when the first electronic device and the second electronic device are located on different sides of the target human body, the first electronic device can be located on the left side of the target human body, and the second electronic device can be located on the right side of the target human body; the first electronic device can be located in front of the target human body, and the second electronic device can be located on the left side of the target human body, etc., without limitation.
[0042] It can be understood that if the positional relationship indicates that the first electronic device and the second electronic device are located on the same side of the target human body, it can be assumed that the first electronic device and the second electronic device will not be obstructed by the target human body during the data transmission process via wireless means such as Bluetooth; if the positional relationship indicates that the first electronic device and the second electronic device are located on different sides of the target human body, it can be assumed that the first electronic device and the second electronic device will be obstructed by the target human body during the data transmission process via wireless means such as Bluetooth.
[0043] In some implementations, a first positional relationship between a first electronic device and a target human body can be obtained, and a second positional relationship between a second electronic device and a target human body can be obtained. Based on the first and second positional relationships, the positional relationship between the first electronic device, the second electronic device, and the target human body can be determined.
[0044] As one feasible approach, the first electronic device may determine the first positional relationship with the target human body through ultrasonic positioning technology; through radar positioning technology; through infrared positioning technology; through RFID positioning technology; or through image recognition technology, etc., without limitation.
[0045] As one feasible approach, the second electronic device can determine the second positional relationship with the target human body through ultrasonic positioning technology; through radar positioning technology; through infrared positioning technology; through RFID positioning technology; or through image recognition technology, etc., without limitation.
[0046] In one approach, if the second electronic device obtains a second positional relationship with the target human body, it can send the second positional relationship to the first electronic device via broadcast or Bluetooth. Accordingly, the first electronic device can obtain the second positional relationship, without any limitation.
[0047] Step S130: If it is determined that the first distance is less than a distance threshold based on the first distance relationship, the second distance is less than the distance threshold based on the second distance relationship, and the first electronic device and the second electronic device are located on different sides of the target human body based on the position relationship, then a data interaction channel between the first electronic device and the second electronic device is constructed based on electric field human body communication technology.
[0048] In this embodiment, given the first distance relationship, the second distance relationship, and the positional relationship, it is possible to determine whether the first distance is less than a distance threshold based on the first distance relationship, whether the second distance is less than a distance threshold based on the second distance relationship, and whether the first electronic device and the second electronic device are located on different sides of the target human body based on the positional relationship. Specifically, if the first distance is determined to be less than the distance threshold based on the first distance relationship, it can be determined that an effective human body electric field can be formed between the first electronic device and the target human body; if the second distance is determined to be less than the distance threshold based on the second distance relationship, it can be determined that an effective human body electric field can be formed between the second electronic device and the target human body; if the positional relationship determines whether the first electronic device and the second electronic device are located on different sides of the target human body, it can be determined that data transmission between the first electronic device and the second electronic device via wireless means such as Bluetooth would be obstructed by the target human body. Therefore, a data interaction channel between the first electronic device and the second electronic device can be constructed based on electric field human body communication technology, which can reduce human body obstruction and improve the efficiency of human body data transmission.
[0049] Among them, electric field human body communication technology is a communication technology that uses the human body as a communication channel for signal transmission. This technology establishes an electric field on or inside the human body, coupling signals to the body to achieve signal transmission and exchange. It can be understood that electric field human body communication technology can achieve low-frequency signal transmission. This technology uses low-frequency signals for transmission, typically between tens and hundreds of hertz. The low-frequency signal establishes an electric field on or inside the human body to achieve signal transmission. Electric field human body communication technology can achieve signal enclosure. Because it uses low-frequency signals, the signal propagation distance is short, usually only a few centimeters to a few meters. Therefore, the signal confidentiality is good and it is not easily interfered with or eavesdropped on by external forces. Electric field human body communication technology can achieve high reliability. Because the signal transmission of electric field human body communication technology takes place inside the human body, it is not affected by the external environment, thus possessing high reliability.
[0050] In the case of constructing a data interaction channel between a first electronic device and a second electronic device based on electric field human body communication technology, the first electronic device can modulate the signal to be transmitted and convert it into a signal form suitable for transmission. Then, the first electronic device uses electrodes or sensors to couple the signal to the target human body, establishing an electric field inside the human body. The signal propagates in the electric field inside the target human body. Since the human body itself has certain electrical characteristics such as resistance and capacitance, it can have a certain influence on the electric field. The signal can be transmitted with changes in distance and human posture. The second electronic device can use another set of electrodes or sensors to receive the signal transmitted from inside the target human body, demodulate it, and restore it to the original signal. Afterwards, the second electronic device can further process and apply the received signal, such as playback.
[0051] An embodiment of this application provides a data interaction method that determines a first distance relationship between a first electronic device and a target human body and a first distance threshold, and a second distance relationship between a second electronic device and a target human body and a second distance threshold. It also determines the positional relationship between the first electronic device, the second electronic device, and the target human body. If, based on the first distance relationship, the first distance is determined to be less than the distance threshold; based on the second distance relationship, the second distance is determined to be less than the distance threshold; and based on the positional relationship, the first electronic device and the second electronic device are determined to be located on different sides of the target human body, a data interaction channel between the first electronic device and the second electronic device is constructed based on electric field human body communication technology. Therefore, by constructing a data interaction channel between electronic devices based on electric field human body communication technology when the electronic devices requiring data interaction are close to the target human body and located on different sides of the target human body, human body obstruction can be reduced, and data transmission rate can be improved.
[0052] Please see Figure 5 , Figure 5 A flowchart illustrating a data interaction method according to an embodiment of this application is shown. This method is applied to the aforementioned first electronic device, which is used to interact with a second electronic device. The following will focus on... Figure 5 The process shown will be described in detail. The data interaction method may specifically include the following steps:
[0053] Step S210: Obtain the first state of the first electronic device.
[0054] In this embodiment, the state of the first electronic device can be obtained and the state of the first electronic device can be determined as the first state.
[0055] In some implementations, the first electronic device may include a first pressure sensor, which can be used to detect and obtain the first state of the first electronic device. For example, the first pressure sensor can detect the location where the first electronic device receives a press, and the first state of the first electronic device can be obtained based on the location where the first electronic device receives a press.
[0056] In some implementations, the first electronic device may include a first contact sensor, which can be used to detect and obtain the first state of the first electronic device. For example, the first contact sensor can be used to detect the location where the first electronic device receives a touch, and the first state of the first electronic device can be obtained based on the location where the first electronic device receives a touch.
[0057] In some implementations, the first electronic device may include a first attitude sensor, which can be used to detect and obtain the first state of the first electronic device. For example, the first attitude of the first electronic device can be detected by the first attitude sensor, and the first state of the first electronic device can be obtained based on the first attitude.
[0058] Step S220: If it is determined based on the first state that the first electronic device is in a wearing state or a holding state, then it is determined that the first distance is less than the distance threshold.
[0059] In this embodiment, when the first state of the first electronic device is obtained, it can be determined whether the first electronic device is in a wearing state or a holding state based on the first state. If it is determined that the first electronic device is in a wearing state or a holding state based on the first state, it can be determined that the first distance is less than a distance threshold.
[0060] In some implementations, if the first state of the first electronic device is determined by data detected by the first pressure sensor, then the pressing position detected by the first pressure sensor can be compared with the pressing position when the first electronic device is in a wearing or holding state. If the comparison result indicates that the pressing position matches the pressing position when the first electronic device is in a wearing or holding state, then it can be determined that the first electronic device is in a wearing or holding state, and that the first distance is less than a distance threshold.
[0061] In some implementations, if the first state of the first electronic device is determined by data detected by the first touch sensor, then the touch position detected by the first touch sensor can be compared with the touch position when the first electronic device is in a wearing state or a holding state. If the comparison result indicates that the touch position matches the touch position when the first electronic device is in a wearing state or a holding state, then it can be determined that the first electronic device is in a wearing state or a holding state, and that the first distance is less than a distance threshold.
[0062] In some implementations, if the first state of the first electronic device is determined by data detected by the first attitude sensor, then the attitude data detected by the first attitude sensor can be compared with the attitude data when the first electronic device is in a wearing state or a holding state. If the comparison result indicates that the attitude data matches the attitude data when the first electronic device is in a wearing state or a holding state, then it can be determined that the first electronic device is in a wearing state or a holding state, and that the first distance is less than a distance threshold.
[0063] Step S230: Obtain the second state of the second electronic device.
[0064] In this embodiment, the state of the second electronic device can be obtained and the state of the second electronic device can be determined as the second state.
[0065] In some implementations, the second electronic device may include a second pressure sensor, which can be used to detect and obtain the second state of the second electronic device. For example, the second pressure sensor can detect the location where the second electronic device receives a press, and the second state of the second electronic device can be obtained based on the location where the second electronic device receives a press.
[0066] In some implementations, the second electronic device may include a second contact sensor, which can be used to detect and obtain the second state of the second electronic device. For example, the second contact sensor can detect the location where the second electronic device receives a touch, and the second state of the second electronic device can be obtained based on the location where the second electronic device receives a touch.
[0067] In some implementations, the second electronic device may include a second attitude sensor, which can be used to detect and acquire the second state of the second electronic device. For example, the second attitude of the second electronic device can be detected by the second attitude sensor, and the second state of the second electronic device can be acquired based on the second attitude.
[0068] Step S240: If it is determined based on the second state that the second electronic device is in a wearing state or a holding state, then it is determined that the second distance is less than the distance threshold.
[0069] In this embodiment, when the second state of the second electronic device is obtained, it can be determined whether the second electronic device is in a wearing state or a holding state based on the second state. If it is determined that the second electronic device is in a wearing state or a holding state based on the second state, it can be determined that the second distance is less than a distance threshold.
[0070] In some implementations, if the second state of the second electronic device is determined by data detected by the second pressure sensor, then the pressing position detected by the second pressure sensor can be compared with the pressing position when the second electronic device is in a wearing or holding state. If the comparison result indicates that the pressing position matches the pressing position when the second electronic device is in a wearing or holding state, then it can be determined that the second electronic device is in a wearing or holding state, and that the second distance is less than a distance threshold.
[0071] In some implementations, if the second state of the second electronic device is determined by data detected by the second touch sensor, then the touch position detected by the second touch sensor can be compared with the touch position when the second electronic device is in a wearing or holding state. If the comparison result indicates that the touch position matches the touch position when the second electronic device is in a wearing or holding state, then it can be determined that the second electronic device is in a wearing or holding state, and that the second distance is less than a distance threshold.
[0072] In some implementations, if the second state of the second electronic device is determined by data detected by the second attitude sensor, then the attitude data detected by the second attitude sensor can be compared with the attitude data when the second electronic device is in a wearing state or a holding state. If the comparison result indicates that the attitude data matches the attitude data when the second electronic device is in a wearing state or a holding state, then it can be determined that the second electronic device is in a wearing state or a holding state, and that the second distance is less than a distance threshold.
[0073] Step S250: Determine the positional relationship between the first electronic device and the second electronic device and the target human body.
[0074] Step S260: If it is determined that the first distance is less than a distance threshold based on the first distance relationship, the second distance is less than the distance threshold based on the second distance relationship, and the first electronic device and the second electronic device are located on different sides of the target human body based on the position relationship, then a data interaction channel between the first electronic device and the second electronic device is constructed based on electric field human body communication technology.
[0075] For a detailed description of steps S250-S260, please refer to steps S120-S130, which will not be repeated here.
[0076] The data interaction method provided in one embodiment of this application is compared to... Figure 4 The data interaction method shown in this embodiment also obtains the first state of the first electronic device, and when the first state indicates that the first electronic device is in a wearing state or a holding state, determines that the distance between the first electronic device and the target human body is less than a distance threshold. It also obtains the second state of the second electronic device, and when the second state indicates that the second electronic device is in a wearing state or a holding state, determines that the distance between the second electronic device and the target human body is less than a distance threshold, thereby improving the accuracy of the determined distance relationship.
[0077] Please see Figure 6 , Figure 6A flowchart illustrating a data interaction method according to an embodiment of this application is shown. This method is applied to the aforementioned first electronic device, which is used to interact with a second electronic device. The following will focus on... Figure 6 The process shown will be described in detail. The data interaction method may specifically include the following steps:
[0078] Step S310: Determine the data type corresponding to the data to be transmitted from the first electronic device to the second electronic device.
[0079] In this embodiment, the data type corresponding to the data to be transmitted from the first electronic device to the second electronic device can be determined.
[0080] One approach is to obtain the data format corresponding to the data to be transmitted from the first electronic device to the second electronic device, and based on this data format, determine the data type corresponding to the data to be transmitted from the first electronic device to the second electronic device.
[0081] As another method, the application corresponding to the data to be transmitted from the first electronic device to the second electronic device can be obtained, and the data type corresponding to the data to be transmitted from the first electronic device to the second electronic device can be determined based on the application.
[0082] Step S320: If the data type includes audio type, then determine the first distance relationship between the first distance and the distance threshold, and determine the second distance relationship between the second distance and the distance threshold.
[0083] In this embodiment, after determining the data type of the data to be transmitted from the first electronic device to the second electronic device, it can be determined whether the data type includes audio. If the data type includes audio, a first distance relationship between a first distance and a distance threshold can be determined, and a second distance relationship between a second distance and a distance threshold can be determined. This facilitates the subsequent implementation of a data interaction channel between the first and second electronic devices using electric field human body communication technology, thereby improving the transmission effect of audio data. If the data type does not include audio (e.g., includes health data types), a wireless (e.g., Bluetooth) connection between the first and second electronic devices can be directly established.
[0084] Step S330: Determine the positional relationship between the first electronic device and the second electronic device and the target human body.
[0085] Step S340: If it is determined that the first distance is less than a distance threshold based on the first distance relationship, the second distance is less than the distance threshold based on the second distance relationship, and the first electronic device and the second electronic device are located on different sides of the target human body based on the position relationship, then a data interaction channel between the first electronic device and the second electronic device is constructed based on electric field human body communication technology.
[0086] For a detailed description of steps S330-S340, please refer to steps S120-S130, which will not be repeated here.
[0087] The data interaction method provided in one embodiment of this application is compared to... Figure 4 The data interaction method shown in this embodiment further determines the data type corresponding to the data to be transmitted from the first electronic device to the second electronic device, and constructs a data interaction channel between electronic devices based on electric field human body communication technology when the data type includes audio type, thereby ensuring the transmission rate of audio data.
[0088] Please see Figure 7 , Figure 7 A flowchart illustrating a data interaction method according to an embodiment of this application is shown. This method is applied to the aforementioned first electronic device, which is used to interact with a second electronic device. The following will focus on... Figure 7 The process shown will be described in detail. The data interaction method may specifically include the following steps:
[0089] Step S410: Determine the first distance relationship between the first electronic device and the target human body and the first distance threshold, and determine the second distance relationship between the second electronic device and the target human body and the second distance threshold.
[0090] Step S420: Determine the positional relationship between the first electronic device and the second electronic device and the target human body.
[0091] For a detailed description of steps S410-S420, please refer to steps S110-S120, which will not be repeated here.
[0092] Step S430: If it is determined that the first distance is less than a distance threshold based on the first distance relationship, the second distance is less than the distance threshold based on the second distance relationship, and the first electronic device and the second electronic device are located on different sides of the target human body based on the position relationship, then the current data interaction mode is determined from multiple data interaction modes.
[0093] The electronic device can pre-set and store multiple data interaction modes, each with its own distinct data interaction method. For example, the multiple data interaction modes may include a first data interaction mode, a second data interaction mode, and a third data interaction mode, each with a different data interaction method. Optionally, the first data interaction mode may include a simplified mode, where devices do not need to interact or verify each other's data; the second data interaction mode may include a conventional one-way / two-way communication mode, which typically includes one master device (such as the first electronic device) and one or more slave devices (such as the second electronic device) for data communication in this scenario; the third data interaction mode may include a multi-device simultaneous communication mode, which typically includes two or more master devices (such as the first electronic device) communicating, with no limit on the number of slave devices (such as the second electronic device).
[0094] In this embodiment, when it is determined that the first distance is less than a distance threshold based on the first distance relationship, the second distance is less than a distance threshold based on the second distance relationship, and the first electronic device and the second electronic device are located on different sides of the target human body based on the position relationship, a data interaction mode can be determined as the current data interaction mode from multiple data interaction modes.
[0095] In some implementations, the first electronic device may determine the current data interaction mode from multiple data interaction modes by random selection; the first electronic device may determine the current data interaction mode from multiple data interaction modes by polling; the first electronic device may determine the current data interaction mode from multiple data interaction modes by user selection, etc., without limitation.
[0096] Step S440: Based on the current data interaction mode and the electric field human body communication technology, construct the data interaction channel and perform data interaction through the data interaction channel.
[0097] In this embodiment, when the current data interaction mode is determined from multiple data interaction modes, a data interaction channel between the first electronic device and the second electronic device can be constructed based on the current data interaction mode and the electric field human body communication technology, and data interaction between the first electronic device and the second electronic device can be carried out through the data interaction channel.
[0098] In some implementations, if the current data interaction mode is the first data interaction mode, a data interaction channel between the first electronic device and the second electronic device is constructed based on electric field human body communication technology. The first electronic device is controlled to work in the transmitting state so as to send the first data to the second electronic device working in the receiving state through the data interaction channel.
[0099] If the current data interaction mode is the first data interaction mode, then no pairing process or additional data interaction process is required between the first and second electronic devices, essentially achieving the user experience of a wired connection. This first data interaction mode can be used simultaneously for switching between multiple devices without requiring additional device pairing operations. Furthermore, this first data interaction mode can be applied to music-related applications. Since music-related data can tolerate a certain amount of packet loss during normal use, there is no need for secondary verification of received data integrity, thus allowing for direct and simple application.
[0100] As an implementable approach, in the first data interaction mode, the first data sent by the first electronic device may include a data frame header, data content, and others. The data frame header mainly includes the device information ID / address of the first device, the transmitted signal strength, the data type, and other custom data. The data content includes audio data transmission content, i.e., the specific data. Other information includes definition information such as CRC checksum, data source, and whether a response is required.
[0101] In some implementations, if the current data interaction mode is the second data interaction mode, the first electronic device is controlled to operate in the transmitting state and transmit broadcast frames at a preset period. After transmitting the broadcast frames, it switches from the transmitting state to the receiving state. If a response data is received from the second electronic device based on the monitored broadcast frames, a data interaction channel is established between the first and second electronic devices based on electric field human body communication technology, and data interaction is performed through the data interaction channel. It can be understood that in the second data interaction mode, the data interaction process between the first and second electronic devices is as follows: the first electronic device transmits a broadcast, the second electronic device responds and accesses, and the first and second electronic devices negotiate data transmission.
[0102] As an example, the first electronic device can transmit a broadcast frame that says "I am the master device 01, are there any other devices?" and the second electronic device can return response data that says "There are other devices, I am the slave device 01".
[0103] Optionally, the response data may include basic information of the second electronic device, device type, device purpose, device name ID, device signal quality, etc., which are not limited here.
[0104] As an feasible approach, if the master device does not receive response data from the second electronic device based on the monitored broadcast frame within a preset time period while transmitting broadcast frames according to a preset period, it can stop transmitting broadcast frames to save power consumption of the first electronic device.
[0105] As an feasible approach, if a data interaction channel is constructed between the first electronic device and the second electronic device based on electric field human body communication technology, the first electronic device and the second electronic device can normally send and receive data through the data interaction channel, that is, perform data interaction through the data interaction channel.
[0106] One method of data interaction via a data interaction channel includes: controlling a first electronic device to operate in a transmitting state to send second data to a second electronic device operating in a receiving state via the data interaction channel; and switching from the transmitting state to the receiving state after sending the second data. If feedback information is received from the second electronic device (which has switched from the receiving state to the transmitting state) based on the received second data, the device switches back from the receiving state to the transmitting state to send third data to the second electronic device (which has switched from the transmitting state to the receiving state) via the data interaction channel. It is understood that during this data interaction process, the second electronic device needs to respond to the data sent by the first electronic device; the requirement for a response can be carried within the data sent by the first electronic device.
[0107] Optionally, if no feedback information (acknowledgment) is received from the second electronic device during this process, the first electronic device may repeatedly send the second data until a timeout or number of times the communication is determined to be interrupted or the second electronic device is not present (e.g., the second electronic device is too far away from the body, the first device is too far away from the body, the second device has its data receiving function turned off, the second device is powered off, etc.).
[0108] One method of data interaction via a data interaction channel includes: controlling a first electronic device to operate in a transmitting state to send second data to a second electronic device operating in a receiving state via the data interaction channel; and switching from the transmitting state to the receiving state after sending the second data. Upon receiving the second data, the second device does not return any information and waits for the first electronic device to send the next data. It is understood that during this data interaction process, the second electronic device does not need to respond to the data sent by the first electronic device; the requirement for a response can be carried within the data sent by the first electronic device.
[0109] In some implementations, if the current data interaction mode is the third data interaction mode, the working state of the first electronic device can be detected. This working state includes being in a transmitting state or a receiving state. If it is determined that the first electronic device is in a transmitting state based on the working state, the working state of the second electronic device is determined to be a receiving state. The first electronic device is controlled to work in the transmitting state and transmit broadcast frames at a preset period. After transmitting the broadcast frames, it switches from working in the transmitting state to working in the receiving state. If the response data returned by the second electronic device based on the monitored broadcast frames is received, a data interaction channel between the first electronic device and the second electronic device is constructed based on electric field human body communication technology, and data interaction is performed through this data interaction channel.
[0110] Optionally, in the third data interaction mode, there can be multiple master devices (including the first electronic device), and multiple master devices need to compete for the data interaction channel formed by the target human body to send data. Therefore, in this embodiment, the first electronic device can detect its working status to determine whether it is in the sending state (i.e., successfully compete for the data interaction channel), and in the sending state, it can conduct subsequent data interaction with the second electronic device.
[0111] As an example, the first electronic device can transmit "I am the master device 01, are there any other devices?", and other master devices can return "I am the master device 02, device information is XXX".
[0112] Optionally, after the first electronic device finishes sending data, the channel is idle. In the idle state, other master devices can actively initiate communication processes.
[0113] As one feasible approach, the data sent by the first electronic device can be received by any other master device and second electronic device in a receiving state. The device ID can be specified when the data is sent, so only the device corresponding to the device ID will receive the data and respond, while other devices can remain silent.
[0114] The data interaction method provided in one embodiment of this application is compared to... Figure 4 The data interaction method shown in this embodiment further determines the current data interaction mode from multiple data interaction modes, and constructs a data interaction channel for data interaction based on the current data interaction mode and electric field human body communication technology, thereby adapting to different data interaction modes and improving the diversity of data interaction application scenarios.
[0115] Please see Figure 8 , Figure 8This diagram illustrates a block diagram of a data interaction device according to an embodiment of this application. The data interaction device 300 is applied to a first electronic device, which is used for data interaction with a second electronic device. The following will describe... Figure 8 The data interaction device 300, illustrated in the block diagram, includes: a distance relationship determination module 310, a position relationship determination module 320, and a data interaction channel construction module 330, wherein:
[0116] The distance relationship determination module 310 is used to determine a first distance relationship between the first electronic device and the target human body and a first distance threshold, and to determine a second distance relationship between the second electronic device and the target human body and a second distance threshold.
[0117] Further, the distance relationship determination module 310 includes: a first state acquisition submodule and a first distance relationship determination submodule, wherein:
[0118] The first state acquisition submodule is used to acquire the first state of the first electronic device.
[0119] The first distance relationship determination submodule is used to determine that if the first electronic device is in a wearing state or a holding state based on the first state, the first distance is less than the distance threshold.
[0120] Further, the distance relationship determination module 310 includes: a second state acquisition submodule and a second distance relationship determination submodule, wherein:
[0121] The second state acquisition submodule is used to acquire the second state of the second electronic device.
[0122] The second distance relationship determination submodule is used to determine that the second distance is less than the distance threshold if the second electronic device is determined to be in a wearing state or a holding state based on the second state.
[0123] Furthermore, the distance relationship determination module 310 includes: a data type determination submodule and a third distance relationship determination submodule, wherein:
[0124] The data type determination submodule is used to determine the data type corresponding to the data to be transmitted from the first electronic device to the second electronic device.
[0125] The third distance relationship determination submodule is used to determine, if the data type includes audio type, a first distance relationship between the first distance and the distance threshold, and a second distance relationship between the second distance and the distance threshold.
[0126] The position relationship determination module 320 is used to determine the position relationship between the first electronic device and the second electronic device and the target human body.
[0127] The data interaction channel construction module 330 is used to construct a data interaction channel between the first electronic device and the second electronic device based on electric field human body communication technology if it is determined that the first distance is less than a distance threshold based on the first distance relationship, the second distance is less than the distance threshold based on the second distance relationship, and the first electronic device and the second electronic device are located on different sides of the target human body based on the position relationship.
[0128] Furthermore, the data interaction channel construction module 330 includes: a data interaction mode determination submodule and a data interaction channel construction submodule, wherein:
[0129] The data interaction mode determination submodule is used to determine the current data interaction mode from multiple data interaction modes.
[0130] The data interaction channel construction submodule is used to construct the data interaction channel based on the current data interaction mode and the electric field human body communication technology, and to conduct data interaction through the data interaction channel.
[0131] Furthermore, the data interaction channel construction submodule includes: a first data interaction channel construction unit and a first data sending unit, wherein:
[0132] The first data interaction channel construction unit is used to construct the data interaction channel based on the electric field human body communication technology if the current data interaction mode is the first data interaction mode.
[0133] The first data transmission unit is used to control the first electronic device to operate in the transmission state, so as to send the first data to the second electronic device operating in the receiving state through the data interaction channel.
[0134] Furthermore, the data interaction channel construction submodule includes: a broadcast frame transmission unit and a second data interaction channel construction unit, wherein:
[0135] The broadcast frame transmitting unit is configured to control the first electronic device to operate in the transmitting state and transmit broadcast frames at a preset period if the current data interaction mode is the second data interaction mode, and to switch from operating in the transmitting state to operating in the receiving state after transmitting the broadcast frames.
[0136] The second data interaction channel construction unit is used to construct the data interaction channel based on the electric field human body communication technology and perform data interaction through the data interaction channel if it receives response data returned by the second electronic device based on the broadcast frame it has been monitored.
[0137] Furthermore, the second data interaction channel construction unit includes: a second data transmission subunit and a third data transmission subunit, wherein:
[0138] The second data transmission subunit is used to control the first electronic device to operate in the transmission state, so as to send the second data to the second electronic device operating in the receiving state through the data interaction channel, and switch from operating in the transmission state to operating in the receiving state after sending the second data.
[0139] The third data transmission subunit is configured to switch from the receiving state to the transmission state if it receives feedback information returned by the second electronic device, which has switched from the receiving state to the transmission state, based on the received second data, so as to send third data to the second electronic device, which has switched from the transmission state to the receiving state, through the data interaction channel.
[0140] Furthermore, the second data interaction channel construction unit also includes: a transmit stop unit, wherein:
[0141] The transmission stop unit is used to stop transmitting the broadcast frame if no response data is received from the second electronic device based on the broadcast frame being monitored within a preset time period.
[0142] Furthermore, the data interaction channel construction submodule includes: a working status detection unit, a status determination unit, a broadcast frame transmission control unit, and a response data receiving unit, wherein:
[0143] The working status detection unit is used to detect the working status of the first electronic device if the current data interaction mode is the third data interaction mode, wherein the working status includes being in a sending state or being in a receiving state.
[0144] A state determination unit is configured to determine the operating state of the second electronic device as being in a receiving state if the first electronic device is determined to be in a transmitting state based on the operating state.
[0145] The broadcast frame transmission control unit is used to control the first electronic device to operate in the transmission state and transmit broadcast frames at a preset period, and to switch from operating in the transmission state to operating in the reception state after transmitting the broadcast frames.
[0146] The response data receiving unit is configured to, if it receives response data returned by the second electronic device based on the broadcast frame it has been listening to, construct the data interaction channel based on the electric field human body communication technology and perform data interaction through the data interaction channel.
[0147] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0148] In the several embodiments provided in this application, the coupling between modules can be electrical, mechanical, or other forms of coupling.
[0149] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0150] Please see Figure 9 This document illustrates a structural block diagram of an electronic device 100 provided in an embodiment of this application. The electronic device 100 can be a smartphone, tablet computer, e-reader, or other electronic device capable of running applications. The electronic device 100 in this application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications can be stored in the memory 120 and configured to be executed by one or more processors 110, and the one or more applications are configured to perform the methods described in the foregoing method embodiments.
[0151] The processor 110 may include one or more processing cores. The processor 110 connects to various parts within the electronic device 100 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and by calling data stored in the memory 120. Optionally, the processor 110 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 110 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 110 and may be implemented separately using a communication chip.
[0152] The memory 120 may include random access memory (RAM) or read-only memory (ROM). The memory 120 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing functions (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described below. The data storage area may also store data created by the electronic device 100 during use (such as phonebook data, audio and video data, chat log data, etc.).
[0153] Please see Figure 10 This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable medium 400 stores program code that can be called by a processor to execute the methods described in the above method embodiments.
[0154] The computer-readable storage medium 400 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 400 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 400 has storage space for program code 410 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 410 may be compressed, for example, in a suitable form.
[0155] In summary, the data interaction method, apparatus, electronic device, and storage medium provided in this application determine a first distance relationship between a first electronic device and a target human body and a first distance threshold, and a second distance relationship between a second electronic device and a target human body and a second distance threshold. They also determine the positional relationship between the first and second electronic devices and the target human body. If, based on the first distance relationship, the first distance is determined to be less than the distance threshold; based on the second distance relationship, the second distance is determined to be less than the distance threshold; and based on the positional relationship, the first and second electronic devices are determined to be located on different sides of the target human body, a data interaction channel between the first and second electronic devices is constructed based on electric field human body communication technology. Therefore, by constructing a data interaction channel between electronic devices based on electric field human body communication technology when the electronic devices requiring data interaction are close to the target human body and located on different sides of the target human body, human body obstruction can be reduced, and data transmission rate can be improved.
[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A data interaction method, characterized in that, The method is applied to a first electronic device used for data interaction with a second electronic device, the first electronic device is a smart phone, and the second electronic device is a Bluetooth earphone. If the first electronic device is in a holding state and the second electronic device is in a wearing state, a first distance relationship between a first distance of the first electronic device from a target human body and a distance threshold is determined, and a second distance relationship between a second distance of the second electronic device from the target human body and the distance threshold is determined. A position relationship between the first electronic device, the second electronic device, and the target human body is determined. If it is determined based on the first distance relationship that the first distance is less than the distance threshold, it is determined based on the second distance relationship that the second distance is less than the distance threshold, and it is determined based on the position relationship that the first electronic device and the second electronic device are located on different sides of the target human body, a data interaction channel between the first electronic device and the second electronic device is constructed based on an electric field human body communication technology. If it is determined based on the position relationship that the first electronic device and the second electronic device are located on the same side of the target human body, data transmission between the first electronic device and the second electronic device is performed in a Bluetooth mode.
2. The method of claim 1, wherein, The determination of the first distance relationship between the first distance of the first electronic device from the target human body and the distance threshold comprises: Obtaining a first state of the first electronic device; If it is determined based on the first state that the first electronic device is in a wearing state or a holding state, it is determined that the first distance is less than the distance threshold.
3. The method of claim 1, wherein, The determination of the second distance relationship between the second distance of the second electronic device from the target human body and the distance threshold comprises: Obtaining a second state of the second electronic device; If it is determined based on the second state that the second electronic device is in a wearing state or a holding state, it is determined that the second distance is less than the distance threshold.
4. The method of claim 1, wherein, The determination of the first distance relationship between the first distance of the first electronic device from the target human body and the distance threshold, and the determination of the second distance relationship between the second distance of the second electronic device from the target human body and the distance threshold, comprise: Determining a data type corresponding to data to be transmitted by the first electronic device to the second electronic device; If the data type includes an audio type, the first distance relationship between the first distance and the distance threshold is determined, and the second distance relationship between the second distance and the distance threshold is determined.
5. The method according to any one of claims 1 to 4, characterized in that, The construction of the data interaction channel between the first electronic device and the second electronic device based on the electric field human body communication technology comprises: Determining a current data interaction mode from a plurality of data interaction modes; Based on the current data interaction mode and the electric field human body communication technology, the data interaction channel is constructed, and data interaction is performed through the data interaction channel.
6. The method of claim 5, wherein, The construction of the data interaction channel based on the current data interaction mode and the electric field human body communication technology, and the data interaction performed through the data interaction channel, comprise: If the current data interaction mode is the first data interaction mode, the data interaction channel is constructed based on the electric field human body communication technology; The first electronic device is controlled to work in a sending state to send first data to the second electronic device working in a receiving state through the data interaction channel.
7. The method of claim 5, wherein, The data interaction channel is constructed based on the current data interaction mode and the electric field human body communication technology, and data interaction is performed through the data interaction channel, including: If the current data interaction mode is the second data interaction mode, the first electronic device is controlled to work in a sending state to emit a broadcast frame at a preset period, and is switched from the sending state to the receiving state after the broadcast frame is emitted; If the second electronic device returns response data based on the broadcast frame listened to, the data interaction channel is constructed based on the electric field human body communication technology, and data interaction is performed through the data interaction channel.
8. The method of claim 7, wherein, The data interaction is performed through the data interaction channel, including: The first electronic device is controlled to work in a sending state to send second data to the second electronic device working in a receiving state through the data interaction channel, and is switched from the sending state to the receiving state after the second data is sent; If the second electronic device returns feedback information based on the second data received after being switched from the receiving state to the sending state, the first electronic device is switched from the receiving state to the sending state to send third data to the second electronic device switched from the sending state to the receiving state through the data interaction channel.
9. The method of claim 7, wherein, The method further includes: If the second electronic device returns response data based on the broadcast frame listened to is not received within a preset time length, the broadcast frame is stopped from being emitted.
10. The method of claim 5, wherein, The data interaction channel is constructed based on the current data interaction mode and the electric field human body communication technology, and data interaction is performed through the data interaction channel, including: If the current data interaction mode is the third data interaction mode, the working state of the first electronic device is detected, wherein the working state includes being in a sending state or being in a receiving state; If it is determined that the first electronic device is in the sending state based on the working state, the working state of the second electronic device is determined to be in the receiving state; The first electronic device is controlled to work in the sending state to emit a broadcast frame at a preset period, and is switched from the sending state to the receiving state after the broadcast frame is emitted; If the second electronic device returns response data based on the broadcast frame listened to is received, the data interaction channel is constructed based on the electric field human body communication technology, and data interaction is performed through the data interaction channel.
11. A data interaction device, characterized by The first electronic device is applied to the first electronic device, and the first electronic device is used for data interaction with the second electronic device. The first electronic device is a smart phone, and the second electronic device is a Bluetooth earphone. The device includes: The distance relationship determining module is configured to determine a first distance relationship between a first distance between the first electronic device and the target human body and a distance threshold, and a second distance relationship between a second distance between the second electronic device and the target human body and the distance threshold, if the first electronic device is in the holding state and the second electronic device is in the wearing state. The position relationship determining module is configured to determine a position relationship between the first electronic device and the second electronic device and the target human body. The data interaction channel constructing module is configured to construct a data interaction channel between the first electronic device and the second electronic device based on an electric field human body communication technology, if it is determined based on the first distance relationship that the first distance is less than the distance threshold, based on the second distance relationship that the second distance is less than the distance threshold, and based on the position relationship that the first electronic device and the second electronic device are located on different sides of the target human body; and to perform data transmission between the first electronic device and the second electronic device through Bluetooth, if it is determined based on the position relationship that the first electronic device and the second electronic device are located on the same side of the target human body.
12. An electronic device, comprising: The computer readable storage medium stores program codes, and the program codes can be invoked by a processor to execute the method according to any one of claims 1-10.
13. A computer readable storage medium, characterized in that, The computer readable storage medium stores program codes, and the program codes can be invoked by a processor to execute the method according to any one of claims 1-10.
Citation Information
Patent Citations
Method, device and system for establishing communication connection
CN105939520A
Wireless earphone based on human body communication and communication method, system and device thereof
CN111601204A