Method, electronic device and system for data transmission
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2025-05-29
- Publication Date
- 2026-08-07
AI Technical Summary
[0003]然而,当前的碰一碰操作仅支持一对一碰一碰分享,应用场景比较单一
Smart Images

Figure CN120730279B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, and more specifically, to a method, electronic device, and system for data transmission. Background Technology
[0002] Electronic devices can transmit data through methods such as "tap to connect". For example, when electronic device A displays an interface that allows data transmission, such as a gallery or contacts, it can tap to electronic device B. Electronic device A and electronic device B can then establish a communication connection in the background, and electronic device A can then transmit data to electronic device B based on the user's actions.
[0003] However, the current tap-to-tap feature only supports one-to-one tap-to-tap sharing, limiting its application scenarios. Summary of the Invention
[0004] This application provides a data transmission method, electronic device, and system that enables one-to-many tap-to-share, enriching the application scenarios of tap-to-share.
[0005] In a first aspect, a data transmission system is provided, comprising a first electronic device, a second electronic device, and a third electronic device, wherein: the first electronic device is configured to broadcast a first message in response to satisfying a first preset condition, the first message including a first identifier indicating that the first electronic device has data transmission, wherein the first preset condition includes detecting a touch operation or detecting a triggering of near-field communication; the second electronic device is configured to broadcast a second message in response to satisfying the first preset condition, the second message including a second identifier indicating that no data transmission is occurring; the third electronic device is configured to broadcast a third message in response to satisfying the first preset condition, the third message including a third identifier indicating that no data transmission is occurring; the second electronic device is further configured to, upon receiving the first message and upon receiving the third message... The third electronic device is further configured to ignore the third message when the second preset condition is met, provided that the first message and the second message are received; the second electronic device is further configured to send first information to the first electronic device, wherein the first information is used to identify the second electronic device; the third electronic device is further configured to send second information to the first electronic device, wherein the second information is used to identify the third electronic device; the first electronic device is further configured to establish a first communication link with the second electronic device based on the first information, and to establish a second communication link with the third electronic device based on the second information; the first electronic device is further configured to respond to a first operation by the user by sending first data to the second electronic device through the first communication link, and to sending first data to the third electronic device through the second communication link.
[0006] For example, the first electronic device can broadcast the first message via Bluetooth or Bluetooth Low Energy.
[0007] For example, the first electronic device may include a near field communication (NFC) module, which can be used to sense whether near field communication is triggered.
[0008] For example, the first operation may be a user sliding in a preset direction on the display interface of the first electronic device.
[0009] In other examples, the first preset condition may also include detecting that a user clicks a preset function control on the display interface. When the first electronic device detects that a user has clicked the preset function control, it may also broadcast the first message.
[0010] In other examples, when the first electronic device detects that a preset display interface is displayed, it can also be understood that the first preset condition is met, and the first electronic device can also broadcast the aforementioned first message.
[0011] Based on the embodiments of this application, when a touch operation is detected or near-field communication is triggered, the first electronic device, acting as the sending end, can broadcast a first message to indicate that data transmission is occurring. The second and third electronic devices, acting as receiving ends, can broadcast messages indicating that no data transmission is occurring. When the second and third electronic devices at the receiving end receive the first message and the message broadcast by the other party indicating that no data transmission is occurring, and when preset conditions are met, they can ignore the message broadcast by the other party indicating that no data transmission is occurring. The first electronic device can receive first information from the second electronic device and second information from the third electronic device, and establish a first communication link with the second electronic device based on the first information and a second communication link with the third electronic device based on the second information. In response to the user's first operation, it sends first data to the second electronic device through the first communication link and sends first data to the third electronic device through the second communication link.
[0012] In this way, when a sending electronic device taps with multiple receiving electronic devices simultaneously, the sending electronic device can establish communication links with each of the multiple receiving electronic devices and send the data to be transmitted to each of the multiple receiving electronic devices according to the user's operation, thereby realizing one-to-many tap sharing and enriching the application scenarios of tap.
[0013] In some implementations, the first electronic device is further configured to: ignore the second message when it is determined that the second electronic device is a receiving electronic device based on the second message, and ignore the third message when it is determined that the third electronic device is another receiving electronic device based on the third message.
[0014] Based on the embodiments of this application, a first electronic device acting as a receiving end can determine that a second electronic device is a receiving end electronic device based on a received second message, and determine that a third electronic device is another receiving end electronic device based on a received third message. Thus, the first electronic device can ignore messages sent by the receiving end electronic devices and determine which receiving end electronic devices exist.
[0015] In some implementations, the second preset condition includes one of the following: receiving a first message at a first moment and receiving a third message at a second moment, wherein the first moment is earlier than or equal to the second moment; or receiving the first message within a first preset time period after receiving the third message; or receiving a first indication information sent by a cloud server to indicate that the first electronic device is a sending electronic device and a second indication information to indicate that the third electronic device is a receiving electronic device.
[0016] Based on the embodiments of this application, the receiving electronic device can ignore the third message sent by other receiving electronic devices when the second preset condition is met, so as to avoid the second electronic device, which is a receiving electronic device, receiving broadcast messages from other receiving electronic devices and causing a prompt message that no data is being transmitted to the user.
[0017] In some implementations, the third preset condition includes one of the following: receiving the first message at a third time and receiving the second message at a fourth time, wherein the third time is earlier than or equal to the fourth time; or receiving the first message within a first preset time period after receiving the second message; or receiving a first indication message sent by the cloud server to indicate that the first electronic device is the sending electronic device and another indication message to indicate that the second electronic device is the receiving electronic device.
[0018] Based on the embodiments of this application, the receiving electronic device can ignore the second message sent by other receiving electronic devices when the third preset condition is met, so as to avoid the third electronic device, which is the receiving electronic device, receiving the broadcast message of other receiving electronic devices and displaying a prompt message to the user that no data is being transmitted.
[0019] In some implementations, the first message also includes third indication information for indicating the strength of the first signal. The third indication information is used by other electronic devices to determine the distance between themselves and the first electronic device. The first signal is the signal of the communication method used by the first electronic device to broadcast the first message.
[0020] Based on the embodiments of this application, after receiving the first message, other electronic devices can determine the distance between themselves and the first electronic device according to the third indication information in the first message used to indicate the strength of the first signal. This helps other electronic devices to determine whether the object to be touched by other electronic devices may be the first electronic device, based on whether the distance is less than a preset distance.
[0021] In some implementations, the first message also includes data from a first sensor of the first electronic device. This first sensor data may include acceleration data of the first electronic device, which allows other electronic devices to determine whether the object to be touched by another electronic device is likely the first electronic device, based on whether the first sensor data matches data from their own sensors. In other implementations, the first electronic device may also send the first sensor data in a separate message from the first message.
[0022] Based on the embodiments of this application, other electronic devices can determine whether the currently received first message belongs to the first electronic device through the data of the first sensor in the first message, thereby avoiding the situation where the received broadcast is not sent by the device that triggered the touch operation.
[0023] In some implementations, the first sensor is an acceleration sensor or a collision sensor.
[0024] In other examples, the first sensor may be other sensors, such as pressure sensors, etc., which are not limited in this application embodiment.
[0025] In a second aspect, a data transmission method is provided, applied to a second electronic device, comprising: broadcasting a second message in response to satisfying a first preset condition, the second message including a second identifier for indicating no data transmission, wherein the first preset condition includes detecting a touch operation or detecting a triggering of near-field communication; ignoring the third message when the second preset condition is satisfied, in the case of receiving a first message from a first electronic device and receiving a third message from a third electronic device, wherein the first message includes a first identifier for indicating that the first electronic device has data transmission, and the third message includes a third identifier for indicating that the third electronic device has no data transmission; sending first information to the first electronic device according to the first message, the first information for identifying the second electronic device; establishing a first communication link with the first electronic device; and receiving first data sent by the first electronic device through the first communication link.
[0026] It should be understood that if the second electronic device does not transmit data, then the second electronic device is the receiving electronic device; if the first electronic device transmits data, then the first electronic device is the sending electronic device.
[0027] Based on the embodiments of this application, when a tap-to-tap operation is detected or near-field communication is triggered, the second electronic device, acting as the receiving end, can broadcast a second message to indicate that the second electronic device has no data transmission. Since it is a one-to-many tap-to-tap scenario, the second electronic device taps to the first electronic device and the third electronic device simultaneously or almost simultaneously. This tap-to-tap operation will trigger the second electronic device to broadcast the second message, as well as the first electronic device to broadcast the first message and the third electronic device to broadcast the third message. Therefore, the second electronic device will also receive the first message from the first electronic device and the third message from the third electronic device. Then, the second electronic device can ignore the third message when the second preset condition is met, and send the first information to the first electronic device at the sending end according to the first message, and establish a first communication link with the first electronic device. Subsequently, it can receive the data sent by the first electronic device through the first communication link.
[0028] In this way, when a sending electronic device touches multiple receiving electronic devices simultaneously, the receiving electronic device can identify the presence of other receiving electronic devices and sending electronic devices in the vicinity. As a result, it can ignore the broadcast messages sent by other receiving electronic devices and establish a communication link with the sending electronic device. This enables one-to-many touch sharing and avoids the second electronic device, which acts as a receiving electronic device, receiving broadcast messages from other receiving electronic devices, which would cause a message indicating no data transmission to be displayed to the user.
[0029] In some implementations, the second preset condition includes one of the following: receiving a first message at a first moment and receiving a third message at a second moment, wherein the first moment is earlier than or equal to the second moment; or receiving the first message within a first preset time period after receiving the third message; or receiving a first indication information sent by a cloud server to indicate that the first electronic device is a sending electronic device and a second indication information to indicate that the third electronic device is a receiving electronic device.
[0030] Based on the embodiments of this application, the receiving electronic device can ignore the third message sent by other receiving electronic devices when the second preset condition is met, so as to avoid the second electronic device, which is a receiving electronic device, receiving broadcast messages from other receiving electronic devices and causing a prompt message that no data is being transmitted to the user.
[0031] In some implementations, the first message also includes third indication information for indicating the strength of the first signal. The first signal is a signal of the communication method used by the first electronic device to broadcast the first message. Sending the first information to the first electronic device according to the first message includes: determining a first distance between the device and the first electronic device according to the third indication information; and sending the first information to the first electronic device when the first distance is less than a preset distance.
[0032] For example, the preset distance can be 10 cm or 15 cm, etc., and the specific value of the preset distance is not limited in the embodiments of this application.
[0033] Based on the embodiments of this application, the second electronic device determines, according to the third indication information in the first message, that the distance between it and the first electronic device is less than a preset distance. Therefore, it determines that the object performing the "tap-to-tap" operation with the second electronic device is likely the first electronic device, and sends first information to the first electronic device. In this way, because the distance between the first and second electronic devices is relatively short, it can be determined that the first electronic device is more likely to be the one triggering the tap-to-tap operation, thereby improving the security of data transmission.
[0034] In some implementations, the first message also includes data from the first sensor of the first electronic device. When the first distance is less than a preset distance, the first information is sent to the first electronic device, including: determining whether the first electronic device is the electronic device broadcasting the first message based on the relationship between the data from the first sensor of the first electronic device and the data from the second sensor of the second electronic device; and sending the first information to the first electronic device when the first distance is less than the preset distance and the first electronic device is the electronic device broadcasting the first message.
[0035] It should be understood that the first sensor and the second sensor are of the same type; for example, both the first sensor and the second sensor are acceleration sensors.
[0036] Based on the embodiments of this application, the second electronic device can determine that the object to be touched by the second electronic device is the first electronic device based on the matching of the data of the first sensor with the data of its own sensor and the fact that the distance between the first electronic device and the second electronic device is less than a preset distance, and send the first information to the first electronic device, thereby improving the security of data transmission.
[0037] In some implementations, the first message also includes data from the first sensor of the first electronic device. Sending first information to the first electronic device based on the first message includes: determining that the first electronic device is the electronic device broadcasting the first message based on the relationship between the data from the first sensor of the first electronic device and the data from the second sensor of the second electronic device; and sending the first information to the first electronic device.
[0038] Based on the embodiments of this application, the second electronic device can determine that the object of the touch operation with the second electronic device is the first electronic device by matching the data of the first sensor with the data of its own sensor, and send the first information to the first electronic device, so as to avoid the first message received not being sent by the first electronic device that is currently colliding, thereby improving the security of data transmission.
[0039] In some implementations, the first sensor and the second sensor may include one of an acceleration sensor, a pressure sensor, or a collision sensor.
[0040] Thirdly, a data transmission method is provided, applied to a first electronic device, comprising: broadcasting a first message in response to satisfying a first preset condition, the first message including a first identifier, the first identifier indicating that the first electronic device has data transmission, wherein the first preset condition includes detecting a touch operation or detecting a triggering of near-field communication; receiving first information from a second electronic device, wherein the first information is used to identify the second electronic device; establishing a first communication link with the second electronic device based on the first information; broadcasting a first message in response to satisfying the first preset condition again, when the first electronic device is a sending electronic device, the first message including a first identifier, the first identifier indicating that the first electronic device has data transmission; receiving second information from a third electronic device, wherein the second information is used to identify the third electronic device; establishing a second communication link with the third electronic device based on the second information; and sending first data to the second electronic device and to the third electronic device through the second communication link in response to a first operation by a user.
[0041] Based on the embodiments of this application, when a touch operation is detected or near-field communication is triggered (i.e., the user performs the first touch operation), the first electronic device can broadcast a first message to indicate that data transmission is possible. Subsequently, the first electronic device can receive first information from the second electronic device and establish a first communication link with the second electronic device based on the first information. If the first electronic device then detects another touch operation or triggers near-field communication again (i.e., the user performs a second touch operation), it can establish a second communication link with the third electronic device. Subsequently, in response to the user's first operation, the first electronic device sends first data to the second electronic device via the first communication link and then sends first data to the third electronic device via the second communication link.
[0042] In this way, when a sending electronic device taps with multiple receiving electronic devices in sequence, the sending electronic device can establish communication links with multiple receiving electronic devices in sequence, and send the data to be transmitted to multiple receiving electronic devices simultaneously according to the user's operation, thereby realizing one-to-many tap sharing and enriching the application scenarios of tap.
[0043] In some implementations, the moment when the first electronic device meets the first preset condition is the third moment, and the moment when the first electronic device meets the first preset condition again is the fourth moment, wherein the difference between the third moment and the fourth moment is less than or equal to the second preset duration.
[0044] For example, the second preset duration can be 3 minutes or 2 minutes, etc., and the specific value of the second preset duration is not limited in this application embodiment.
[0045] Based on the embodiments of this application, the time interval between the first electronic device touching the other device is less than or equal to the second preset time, thereby avoiding the user from being stuck in the data transmission display interface after the first touch, thus wasting the power consumption of the electronic device.
[0046] In some implementations, before the first preset condition is met again, the method further includes: displaying a first display interface, which includes first data that can be transmitted; after a second preset time period, if no first preset condition is detected to be met again and no operation to trigger the transmission of the first data is detected, canceling the display of the first display interface and disconnecting the first communication link.
[0047] For example, the first display interface may include a display interface that indicates a transferable image, and the first display interface may also be used to display animations to indicate that the user can perform a swipe operation to transfer data.
[0048] Based on the embodiments of this application, after a second preset time period, if no first preset condition is detected to be met again and no operation to trigger the transmission of first data is detected, the first electronic device cancels the display of the first display interface and disconnects the first communication link with the second electronic device. This can prevent the user from being stuck in the display interface waiting to transmit data after the first touch, thus wasting the power consumption of the electronic device.
[0049] In some implementations, the first message also includes third indication information for indicating the strength of the first signal. The third indication information is used by other electronic devices to determine the distance between themselves and the first electronic device. The first signal is the signal of the communication method used by the first electronic device to broadcast the first message.
[0050] Based on the embodiments of this application, after receiving the first message, other electronic devices can determine the distance between themselves and the first electronic device according to the third instruction information in the first message. This helps other electronic devices determine whether the object they are touching is the first electronic device, based on whether the distance is less than a preset distance.
[0051] In some implementations, the first message also includes data from a first sensor of the first electronic device. This first sensor data may include acceleration data of the first electronic device, which allows other electronic devices to determine whether the object to be touched by another electronic device is likely the first electronic device, based on whether the first sensor data matches data from their own sensors. In other implementations, the first electronic device may also send the first sensor data in a separate message from the first message.
[0052] Based on the embodiments of this application, other electronic devices can determine whether the currently received first message belongs to the first electronic device through the data of the first sensor in the first message, thereby avoiding the situation where the received broadcast is not sent by the device that triggered the touch operation.
[0053] Fourthly, a method for transmitting data is provided, including modules for implementing the method as described in the second to third aspects and any possible implementation thereof.
[0054] Fifthly, an electronic device is provided, comprising: one or more processors; one or more memories; said one or more memories storing one or more programs that, when executed by said one or more processors, cause the methods described in the second to third aspects and any possible implementation thereof to be performed.
[0055] In a sixth aspect, a chip is provided, the chip including a processor and a communication interface, the communication interface being used to receive a signal and transmit the signal to the processor, the processor processing the signal such that the method described in the second to third aspects and any possible implementation thereof is performed.
[0056] A seventh aspect provides a readable storage medium storing instructions that, when executed on an electronic device, cause the methods described in the second to third aspects and any possible implementation thereof to be performed.
[0057] Eighthly, a program product is provided, the program product including program code that, when run on an electronic device, causes the methods described in the second to third aspects and any possible implementation thereof to be executed. Attached Figure Description
[0058] Figure 1 A schematic diagram of the electronic device is shown.
[0059] Figure 2 This is a schematic diagram illustrating a scenario in which the embodiments of this application can be applied.
[0060] Figure 3 This is a schematic flowchart illustrating a one-to-many, one-to-one data transmission method provided in an embodiment of this application.
[0061] Figure 4 This is a schematic diagram of a one-to-many data transmission process provided in an embodiment of this application.
[0062] Figure 5 This is a schematic diagram illustrating a wormhole provided in an embodiment of this application.
[0063] Figure 6 This is a schematic diagram illustrating another one-to-many one-to-one data transmission process provided in the embodiments of this application.
[0064] Figure 7 This is a schematic diagram of another one-to-many data transmission process provided in an embodiment of this application.
[0065] Figure 8 This is a schematic flowchart illustrating a data transmission method provided in an embodiment of this application.
[0066] Figure 9 This is a schematic flowchart illustrating a data transmission method provided in an embodiment of this application.
[0067] Figure 10 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0068] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0069] The methods described in this application embodiment can be applied to smartphones, wearable devices, smart TVs, tablets, laptops, personal computers (PCs), ultra-mobile personal computers (UMPCs), netbooks, in-vehicle devices, foldable devices, Internet of Things (IoT) devices, augmented reality devices, virtual reality devices, etc.
[0070] Figure 1 A schematic diagram of the structure of electronic device 100 is shown. Electronic device 100 may include processor 110, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, camera 193, display screen 194, accelerometer 180E, and touch sensor 180K, etc.
[0071] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0072] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0073] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0074] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0075] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), Bluetooth low energy (BLE), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), ultra-wideband (UWB), SparkLink, and SparkLink low energy (SLE).
[0076] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.
[0077] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0078] The display screen 194 is used to display images, videos, etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1. In this embodiment, the display screen 194 can be used to display various display interfaces and application switching entries, etc.
[0079] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0080] The ISP is used to process the data fed back by camera 193. Camera 193 is used to capture still images or videos.
[0081] The accelerometer 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of the electronic device and applied to applications such as screen orientation switching and pedometers. In this embodiment, the electronic device 100 can detect a touch event by detecting changes in the data from the accelerometer.
[0082] Touch sensor 180K can be disposed on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen". Touch sensor 180K is used to detect touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be disposed on the surface of electronic device 100, in a different location than display screen 194.
[0083] Electronic devices can transmit data through methods such as "tap to connect". For example, when electronic device A displays an interface that allows data transmission, such as a gallery or contacts, and taps it against electronic device B, electronic device A and electronic device B can establish a communication connection in the background. Afterward, electronic device A can transmit data to electronic device B according to the user's operation.
[0084] However, the current tap-to-tap feature only supports one-to-one tap-to-tap sharing, limiting its application scenarios.
[0085] In a one-to-many tap-to-share scenario, for example, when electronic device A is displaying an interface with data transmission such as a gallery or contacts, it simultaneously taps with electronic devices B and C. During the tap-to-share operation, electronic devices B and C display interfaces indicating no data transmission. After the tap-to-share operation, the following scenarios are possible: (A) Electronic device A establishes a communication connection with one of electronic devices B and C and performs tap-to-share, while the other electronic device cannot participate; (B) Both electronic devices B and C display a message indicating no data transmission, preventing any of electronic devices A, B, or C from performing tap-to-share.
[0086] The reason for scenario (B) is that when electronic device A touches electronic devices B and C simultaneously, since electronic devices B and C display a message indicating no data transmission, both electronic devices B and C broadcast Bluetooth messages indicating no data transmission. Then, electronic devices B and C receive the Bluetooth messages broadcast by each other indicating no data transmission. Based on these Bluetooth messages, electronic devices B and C assume that the object they are touching has no data transmission and thus display a message indicating no data transmission, causing the touch operation to fail.
[0087] It should be understood that the no data transmission prompt may include text prompts such as "No data transmission this time" to inform the user that no data is being transmitted to the objects being tapped.
[0088] In other examples, electronic devices B and C can also provide a voice prompt to the user that no data was transmitted during the tap, indicating that no data was transmitted to the objects being tapped.
[0089] For example, when electronic device A displays an interface with data transmission, such as a gallery or contacts, it taps against electronic devices B and C in succession. Electronic device A will establish a communication connection with electronic device B, which was the first device to be tapped, and will then display the interface with data transmission. However, since electronic device A is currently in the process of tapping and sharing with electronic device B, and this tapping and sharing process is not yet complete, the current technical solution cannot support electronic device A continuing to respond to tapping operations with electronic device C during the tapping and sharing process.
[0090] In view of this, embodiments of this application provide a method, electronic device, and system for data transmission, aiming to realize one-to-many tap-to-share and enrich the application scenarios of tap-to-share.
[0091] The following will combine Figure 2-9 The technical solutions in the embodiments of this application are introduced.
[0092] For example, Figure 2 This is a schematic diagram illustrating a scenario in which the embodiments of this application can be applied. For example... Figure 2 As shown, the scenario may include a transmitting electronic device 200 and multiple receiving electronic devices. For example, the multiple receiving electronic devices may include electronic device 210, electronic device 220, or further include more electronic devices.
[0093] It should be understood that in this embodiment of the application, the receiving end electronic device is described as two electronic devices (such as electronic device 210 and electronic device 220), but this should not limit the application scenario of this application in any way.
[0094] In one scenario, electronic device 200 can simultaneously tap with electronic devices 210 and 220. This tapping action triggers electronic devices 200 to establish communication connections with electronic devices 210 and 220. Afterward, when the user performs data transmission, electronic device 200 can simultaneously transmit data to both electronic devices 210 and 220.
[0095] In another scenario, electronic device 200 can tap-to-connect with electronic devices 210 and 220 sequentially. For example, electronic device 200 can first tap-to-connect with electronic device 210, triggering a communication connection between them. However, at this point, the user does not perform any data transmission. Instead, electronic device 200 then tap-to-connect with electronic device 220. After a communication connection is also established between electronic devices 200 and 220, the user can then transmit data, and electronic device 200 can simultaneously transmit data to both electronic devices 210 and 220.
[0096] After a tap-to-talk operation, the electronic device can determine whether it is a receiver or a transmitter in the following ways.
[0097] For example, an application can pre-register certain display interfaces for a tap-to-share event via a system interface provided by the electronic device. When the electronic device displays display interface A of the application (which has already registered the tap-to-share event), upon detecting a tap operation, the electronic device's operating system can send a callback function for the tap-to-share event to the application. In response to receiving the callback function, the application can send data from display interface A to the electronic device's operating system. The operating system then generates a transferable card based on the data from display interface A and controls its display on display interface A. In this case, the electronic device is the sender.
[0098] In other cases, when the display interface B of the electronic device has not registered the tap-to-share event, the system of the electronic device will not be able to detect the callback function of the tap-to-share event when the electronic device detects the tap-to-share operation, and the electronic device will be the receiving end.
[0099] For example, the display interface B can be a desktop or other display interface without data transmission.
[0100] After electronic device 200, electronic device 210, and electronic device 220 simultaneously perform a tap-to-tap operation, electronic device 200, as the sending end, will broadcast a message indicating that data transmission has occurred (such as a Bluetooth message), and electronic devices 210 and 220, as the receiving ends, will broadcast a message indicating that no data transmission has occurred (such as a Bluetooth message).
[0101] In other examples, multiple electronic devices can also trigger a tap-to-share feature through near-field sensing.
[0102] For example, when electronic device 200 is close to electronic devices 210 and 220, the NFC modules in electronic devices 200, 210 and 220 can sense the presence of each other. In this case, electronic device 200 can also determine itself as the sender in the same way as above, and electronic devices 210 and 220 can determine themselves as the receiver in the same way as above.
[0103] The following will combine Figures 3 to 5 This application describes a technical solution in which the transmitting electronic device simultaneously performs a tap-to-tap operation with multiple receiving electronic devices to transmit data. Figure 6-7 This application describes a technical solution in which the transmitting electronic device sequentially touches multiple receiving electronic devices to transmit data.
[0104] For example, Figure 3 This is a schematic flowchart illustrating a one-to-many, one-to-one data transmission method provided in an embodiment of this application. Figure 3 As shown, the method 300 may include steps 301 to 310.
[0105] 301. When the preset conditions are met and the device determines itself to be the sender, the first electronic device broadcasts request message A.
[0106] The request message A may include a data transmission identifier A. This allows other electronic devices to identify the first electronic device as the sending electronic device based on the request message A.
[0107] It should be understood that the first electronic device can determine itself as the transmitting electronic device by referring to [reference needed]. Figure 2 Related descriptions.
[0108] The preset condition could be that the first electronic device detects a touch operation. For example, the first electronic device may include an accelerometer, and the first electronic device can determine the touch operation by observing the data change patterns of the accelerometer. For instance, the first electronic device may include an inertial measurement unit (IMU), and the first electronic device can acquire data from the accelerometer from the IMU.
[0109] For example, the first electronic device can compare the waveform of the data from the accelerometer with a preset waveform. When the difference between the two is within a threshold range, it can be determined that the first electronic device has performed a touch operation.
[0110] For example, the first electronic device may include a pre-trained model that can analyze data from the accelerometer to determine whether the first electronic device has performed a touch operation.
[0111] The preset condition can also be that the first electronic device detects near-field communication triggered between itself and the second or third electronic device.
[0112] For example, the first, second, and third electronic devices all include NFC modules. When the NFC function is enabled, and the electronic devices are close to each other, the first electronic device can use its NFC module to determine that near-field communication has been triggered with the second and third electronic devices. It should be understood that when the first electronic device detects that it has triggered near-field communication with multiple electronic devices simultaneously, it can also be considered that a one-to-many sharing service has been triggered.
[0113] For example, the first electronic device may broadcast the request message A via a first communication method. For instance, the first communication method may be Bluetooth (specifically, Bluetooth Low Energy), UWB, or StarFlash (specifically, low-power StarFlash).
[0114] In this embodiment of the application, Bluetooth is used as an example for illustration as the first communication method.
[0115] In some implementations, the request message A may also include other information, such as indication information 1 for indicating the Bluetooth signal strength 1 of the first electronic device, triaxial data from the accelerometer of the first electronic device, etc. The indication information 1 can be used by other electronic devices to determine the distance between themselves and the first electronic device, and the triaxial data from the accelerometer can be used by other electronic devices to determine that the first electronic device has triggered a tap-to-tap operation.
[0116] For example, after receiving the request message A, the second electronic device can determine the Bluetooth signal strength 1 based on the indication information 1 in the request message A, and determine the distance between itself and the first electronic device based on the Bluetooth signal strength 1.
[0117] For example, after acquiring the triaxial data from the accelerometer of the first electronic device, the second electronic device can compare it with the triaxial data from its own accelerometer to determine whether the first electronic device triggered a touch operation. This prevents the request message A received by the second electronic device from being sent by the electronic device that actually collided with it, thus ensuring the security of subsequent data transmission.
[0118] It's understandable that, taking a collision between a first electronic device and a second electronic device as an example, when the two devices collide, their respective accelerometers collect triaxial data. Since these two sets of triaxial data are generated from the same collision, their characteristics (such as numerical values and the time of occurrence) should theoretically be similar. Therefore, the second electronic device can determine whether request message A was sent by the electronic device that actually collided with it by comparing the triaxial data from its own accelerometer with the triaxial data from the first electronic device (e.g., using a preset similarity algorithm and comparing it with a preset threshold).
[0119] In other examples, the triaxial data from the accelerometer can be replaced by data from other sensors, such as pressure sensors or collision sensors.
[0120] It should be understood that the first electronic device can be the electronic device 200 mentioned above, the second electronic device can be the electronic device 210 mentioned above, and the third electronic device can be the electronic device 220 mentioned above.
[0121] 302. When the preset conditions are met and the device determines itself to be the receiving end, the second electronic device broadcasts request message B1.
[0122] It should be understood that the preset conditions can be found in the description of step 301 above, and the second electronic device determining itself as the receiving electronic device can be found in [the following text is missing from the original] Figure 2 The relevant descriptions in the document will not be repeated here.
[0123] The request message B1 may include a no data transmission identifier 1, so that other electronic devices can determine the second electronic device as the receiving electronic device based on the request message B1.
[0124] In some implementations, the request message B1 may also include other information, such as indication information 2 for indicating the Bluetooth signal strength 2 of the second electronic device, triaxial data from the accelerometer of the second electronic device, etc. The indication information 2 can be used by other electronic devices to determine the distance between themselves and the second electronic device, and the triaxial data from the accelerometer of the second electronic device can be used by other electronic devices to determine that the second electronic device has triggered a tap-to-tap operation.
[0125] For example, the second electronic device may broadcast the request message B1 via a first communication method.
[0126] It should be understood that the scheme for other electronic devices to determine the distance between themselves and the second electronic device based on the instruction information 2, and to determine that the second electronic device has triggered the touch operation based on the triaxial data, can be found in the description in step 301, and will not be repeated here.
[0127] 303. When the preset conditions are met and the device determines itself to be the receiving end, the third electronic device broadcasts request message B2.
[0128] It should be understood that the preset conditions can be referred to in the description of step 301 above, and the third electronic device determining itself as the receiving electronic device can be referred to... Figure 2 The relevant descriptions in the document will not be repeated here.
[0129] The request message B2 may include a no data transmission identifier 2, so that other electronic devices can determine the third electronic device as the receiving electronic device based on the request message B2.
[0130] For example, a third electronic device may broadcast the request message B2 via a first communication method.
[0131] In some implementations, the request message B2 may also include other information, such as indication information 3 for indicating the Bluetooth signal strength 3 of the third electronic device, triaxial data from the accelerometer of the third electronic device, etc. The indication information 3 can be used by other electronic devices to determine the distance between themselves and the third electronic device, and the triaxial data from the accelerometer of the third electronic device can be used by other electronic devices to determine that the third electronic device has triggered a touch-to-touch operation.
[0132] It should be understood that the scheme for other electronic devices to determine the distance between themselves and the third electronic device based on the instruction information 3, and to determine that the third electronic device has triggered the touch operation based on the triaxial data, can be found in the description in step 301, and will not be repeated here.
[0133] It is understood that steps 301-303 can be performed simultaneously. For example, see... Figure 4 (a) in the middle, Figure 4This is a schematic diagram of a one-to-many data transmission process provided in an embodiment of this application. When the first electronic device, the second electronic device, and the third electronic device simultaneously perform a touch operation (for example, the tops of the first electronic device, the second electronic device, and the third electronic device approach each other and collide), the first electronic device executes step 301 to broadcast request message A, the second electronic device executes step 302 to broadcast request message B1, and the third electronic device executes step 303 to broadcast request message B2.
[0134] After broadcasting request message B1, the second electronic device, acting as the receiving electronic device, can execute steps 304-305 to establish a communication connection with the first electronic device, which is the sending electronic device.
[0135] After broadcasting request message B2, the third electronic device, acting as the receiving electronic device, can execute steps 307-308 to establish a communication connection with the first electronic device, which is the sending electronic device.
[0136] It should be understood that the second electronic device performing steps 304-305 and the third electronic device performing steps 307-308 can be performed synchronously.
[0137] 304. The second electronic device determines the distance A between the first electronic device and the second electronic device based on request message A.
[0138] In some examples, the second electronic device can determine the distance A between the first electronic device and the second electronic device based on the indication information 1 in the request message A.
[0139] For example, the second electronic device can determine the Bluetooth signal strength 1 of the first electronic device based on the indication information 1 in the request message A, and determine the distance A between the two based on the Bluetooth signal strength 1.
[0140] Alternatively, the second electronic device may determine the distance A between itself and the first electronic device by means of a phase-based ranging method, a round-trip time-based ranging method, or a method based on the angle of arrival or the angle of departure.
[0141] In some cases, since the second electronic device will receive request message A from the first electronic device, it will also receive request message B2 from the third electronic device. Therefore, the second electronic device may ignore request message B2 from the third electronic device when the following conditions are met.
[0142] It should be understood that "ignore" in the embodiments of this application can be interpreted as the first electronic device being able to recognize the data format of the request message B2, or being able to understand the meaning of the request message B2, but the first electronic device may not respond to the request message B2, that is, the first electronic device may not process the request message B2, and may not generate and reply to other data packets based on the request message B2.
[0143] Condition 1: If the second electronic device first receives request message A, it subsequently receives request message B2, which includes the no data transmission identifier 2.
[0144] When the first electronic device, the second electronic device, and the third electronic device simultaneously perform a touch-to-touch operation, the first electronic device, acting as the sender, broadcasts request message A, and the third electronic device, acting as the receiver, broadcasts request message B2. The second electronic device may receive request message A first, and then request message B2. In this case, the second electronic device can determine the existence of the first electronic device as the sender based on the received request message A, and can also determine that it is the receiver electronic device. Therefore, the second electronic device can ignore request message B2.
[0145] In this way, when the second electronic device can determine that there is a transmitting electronic device in the vicinity, even if it receives a request message B2 including the no data transmission identifier 2, it will not respond to the request message B2, but will continue to carry out the tap-to-share process, which is conducive to completing the tap-to-share service in sequence.
[0146] Condition 2: If the second electronic device receives request message B2 first, then within a preset time period T1, it receives request message A from the first electronic device.
[0147] The specific value of the preset duration T1 is not limited in the embodiments of this application. For example, the preset duration T1 is 100 milliseconds or 500 milliseconds, etc.
[0148] For the second electronic device, it is possible that it receives request message B2 first and then request message A. In this case, the second electronic device needs to wait for a preset time T1 after receiving request message B2 first, without responding to request message B2. If request message A is received within the preset time T1, the second electronic device can determine that there is a sending electronic device nearby, and therefore can choose not to respond to request message B2.
[0149] In this way, even though the second electronic device receives the request message B2 first and determines that there is a receiving electronic device nearby, the second electronic device can also determine that there is a sending electronic device nearby. Therefore, the second electronic device can choose not to respond to the request message B2, but continue the tap-to-share process, which is conducive to completing the tap-to-share service sequentially.
[0150] Furthermore, if the second electronic device receives request message B2 and immediately responds to it by displaying a message indicating no data transmission, the one-touch-many-touch-one-touch sharing service will be unable to continue. By determining that condition two is met, the second electronic device can ignore request message B2, thereby avoiding this situation.
[0151] Condition 3: When the second electronic device receives both request message A and request message B2 simultaneously.
[0152] The second electronic device may also receive request message B2 and request message A simultaneously. In this case, the second electronic device can determine the existence of the first electronic device as the sender based on the received request message A, and determine the existence of the third electronic device as the receiver based on the received request message B2. Since the second electronic device can determine that it is the receiver electronic device, it can ignore request message B2.
[0153] In this way, when the second electronic device can determine that there is a transmitting electronic device in the vicinity, even though it has also received a request message B2 including the no data transmission identifier 2, it will not respond to the request message B2, but will continue to carry out the tap-to-share process, which is conducive to completing the tap-to-share service in sequence.
[0154] Condition 4: The second electronic device receives information 1 from the first electronic device and status information 2 from the third electronic device sent by the cloud server. Information 1 indicates that the first electronic device is the sending electronic device, and information 2 indicates that the third electronic device is the receiving electronic device.
[0155] When the first, second, and third electronic devices are logged into the same system account, and a simultaneous "tap-to-share" function is triggered, each device can send its own information to the cloud server. This information can be used to instruct the sending or receiving device. The cloud server can send information 1 from the first device and information 2 from the third device to the second device, send information 1 from the first device and information 3 from the second device (information 3 indicating that the second device is the receiving device) to the third device, and send information 3 from the second device and information 2 from the third device to the first device. In this way, each electronic device can clearly identify the role of the other devices.
[0156] When the second electronic device can determine that there is a transmitting electronic device in the vicinity, even though it has also received a request message B2 including the no data transmission identifier 2, it will ignore the request message B2 and continue the tap-to-share process, which is conducive to completing the tap-to-share service in sequence.
[0157] Similarly, the third electronic device can also use the above processing method to ignore the request message B1 from the second electronic device.
[0158] Since the first electronic device can determine that it is the sending electronic device, after the first electronic device receives the request message B1 sent by the second electronic device and the request message B2 sent by the third electronic device, it can determine that there are two receiving electronic devices, the second electronic device and the third electronic device, based on the request message B1 and the request message B2. However, the first electronic device can also ignore the request message B1 and the request message B2.
[0159] 305. When the distance A is less than or equal to the preset distance, the second electronic device sends message C1 to the first electronic device.
[0160] For example, the second electronic device can send message C1 to the first electronic device through a second communication method. For example, the second communication method can be Wi-Fi, UWB, etc. In this embodiment, Wi-Fi is used as an example for explanation.
[0161] For example, see Figure 4 In (b), the second electronic device can send message C1 to the first electronic device.
[0162] The message C1 may include device identification information 1 of the second electronic device, such as a unique device identifier (UDID), device ID, media access control (MAC) address, etc.
[0163] In this way, the first electronic device can distinguish the identity of the second electronic device from that of other electronic devices.
[0164] The message C1 may also include other information, such as receiver identification information and channel identification information. The receiver identification information can be used by the first electronic device to determine that the second electronic device is the receiver. This helps to clarify the role of the second electronic device during subsequent screen sharing or service transfer, thus facilitating accurate service execution. The channel identification information can be used to indicate the channel information used by the second electronic device to transmit data.
[0165] It should be understood that the specific value of the preset distance is not limited in the embodiments of this application. For example, the preset distance may be 10 cm or 20 cm.
[0166] 306. The first electronic device establishes a communication link A with the second electronic device according to message C1.
[0167] In some examples, if the first electronic device and the second electronic device are logged into the same system account, such as a Huawei account, the first electronic device can exchange account information with the second electronic device, and when the account information is determined to be the same, communication link A is automatically established so that the first electronic device and the second electronic device can maintain a communication connection.
[0168] In some examples, if the first electronic device and the second electronic device are logged into different system accounts, the first electronic device and the second electronic device may need to perform mutual trust authentication first. After the mutual trust authentication is successful, the communication link A is established so that the first electronic device and the second electronic device can maintain a communication connection.
[0169] For example, the communication link A can be a Wi-Fi link, Bluetooth link, UWB link, or Starlink link. In this embodiment, the communication link A is described as a Wi-Fi link.
[0170] See Figure 4 In (c), the first electronic device can establish a communication link A with the second electronic device.
[0171] 307. The third electronic device determines the distance B between the first electronic device and the third electronic device based on request message A.
[0172] It should be understood that the method by which the third electronic device determines the distance B can be found in the description of the second electronic device determining the distance A in step 304, and will not be repeated here for the sake of brevity.
[0173] 308. When the distance B is less than or equal to the preset distance, the third electronic device sends message C2 to the first electronic device.
[0174] For example, see Figure 4 In (b), the third electronic device can send message C2 to the first electronic device.
[0175] For example, the third electronic device can also send message C2 to the first electronic device via a second communication method (such as Wi-Fi).
[0176] The message C2 may include device identification information 2 of the third electronic device, such as UDID, device ID, MAC address, etc. This helps the first electronic device to determine the identity of the third electronic device based on the message C2.
[0177] The message C2 may also include other information, such as receiver identification information and channel identification information.
[0178] 309. The first electronic device establishes a communication link B with the third electronic device.
[0179] For example, the communication link B can be a Wi-Fi link, Bluetooth link, UWB link, or Starlink link. In this embodiment, the communication link B is described as a Wi-Fi link.
[0180] It should be understood that step 309 can be found in the relevant description of step 306.
[0181] See Figure 4 In (c), the first electronic device can establish a communication link B with the third electronic device.
[0182] 310. The first electronic device sends data A to the second electronic device through communication link A, and sends data A to the third electronic device through communication link B.
[0183] For example, see Figure 4 In (d), the first electronic device can respond to the user's operation A by sending data A to the second electronic device via communication link A and data A to the third electronic device via communication link B.
[0184] In some implementations, after the first electronic device establishes communication link A with the second electronic device and communication link B with the third electronic device, the first electronic device can display a transmittable card A and animation effects (such as a wormhole animation). When the first electronic device detects an operation A by the user sliding the card A towards the direction of the wormhole (such as sliding it upwards), it can respond to this operation A by sending data A to the second electronic device via communication link A and to the third electronic device via communication link B. Afterwards, the display interface of the first electronic device can display the animation effect of the transmittable card A entering the wormhole, while the second and third electronic devices can simultaneously display the animation effect of the card A sliding out of the wormhole.
[0185] For example, Figure 5 This is a schematic diagram illustrating a wormhole provided in an embodiment of this application. For example... Figure 5As shown, after the first electronic device taps against the second and third electronic devices, the first electronic device, acting as the sender, can display a shareable card A and a wormhole animation above card A. The second and third electronic devices, acting as receivers, can also display the wormhole animation. When the first electronic device detects the user sliding card A towards the wormhole, it sends data A to the second electronic device via communication link A and to the third electronic device via communication link B. In the first electronic device's display, card A gradually shrinks and enters the wormhole. After card A completely enters the wormhole, the second and third electronic devices can display an animation of card A gradually sliding out of the wormhole. This provides real-time transmission feedback for users during one-touch multi-service sharing, improving the user experience.
[0186] In other instances, the wormhole may also be static, which is not limited in the embodiments of this application.
[0187] Alternatively, if communication link A is established first, the first electronic device can also display the aforementioned transmittable card A and the corresponding wormhole animation. After the user performs operation A, the first electronic device can first send data A to the second electronic device through communication link A. During this process, if communication link B has been established, then data B will continue to be sent to the third electronic device through communication link B.
[0188] The data corresponding to card A is data A.
[0189] In some examples, if the first electronic device triggers a tap-to-share feature while displaying image A in the gallery, then data A is image A. If the first electronic device triggers a tap-to-share feature while displaying contacts, then data A is contact data.
[0190] In other examples, the data A can also be music, video, document, etc., which are not limited in this application embodiment.
[0191] Based on the embodiments of this application, when the first electronic device, as a sending electronic device, conducts a tap-to-share service with multiple receiving electronic devices, it can establish communication connections with multiple receiving electronic devices respectively, and can synchronously send the data to be shared to multiple receiving electronic devices according to the user's operation.
[0192] This enables one-to-many synchronous sharing of the tap-to-pay service, thus enriching its application scenarios. Furthermore, this technical solution can enhance the playability of electronic devices and the user experience.
[0193] In some cases, the first electronic device can first tap with the second electronic device, and then tap with the third electronic device. This will be discussed in the following text. Figure 6-7 This paper introduces a technical solution for the first electronic device to sequentially touch the second and third electronic devices.
[0194] It should be understood that the meaning of the first electronic device sequentially touching the second and third electronic devices can be found in the preceding text. Figure 2 The relevant description in the document.
[0195] For example, Figure 6 This is a schematic diagram illustrating another one-to-many, one-to-one data transmission process provided in an embodiment of this application. For example... Figure 6 As shown, the method 500 may include steps 501 to 512.
[0196] 501. When the preset conditions are met and the device determines itself to be the sender, the first electronic device broadcasts request message A2.
[0197] 502. When the preset conditions are met and the device determines itself to be the receiving end, the second electronic device broadcasts request message B3.
[0198] For example, Figure 7 This is a schematic diagram of another one-to-many data transmission process provided in an embodiment of this application. See also... Figure 7 In (a), when the first electronic device and the second electronic device trigger the tap-to-share service, the first electronic device at the sending end can broadcast request message A2, and the second electronic device at the receiving end can broadcast request message B3.
[0199] It should be understood that steps 501-502 can be found in the descriptions of steps 301-302 above.
[0200] 503, The second electronic device determines the distance A between the first electronic device and the second electronic device according to the request message A2.
[0201] 504. When the distance A is less than or equal to the preset distance, the second electronic device sends message C3 to the first electronic device.
[0202] For example, see Figure 7 In (b), the second electronic device can send message C3 to the first electronic device.
[0203] 505, The first electronic device establishes a communication link C with the second electronic device according to message C3.
[0204] For example, see Figure 7 In (c), the first electronic device can establish a communication link C with the second electronic device.
[0205] It should be understood that steps 503-505 can be found in the descriptions of steps 304-306 above.
[0206] 506, The first electronic device displays a transferable card and animation A.
[0207] After the first electronic device establishes a communication link C with the second electronic device, the first electronic device can display a transmittable card and animation A, which can be referred to in the previous description.
[0208] 507. When the preset conditions are met and the device determines itself to be the sender, the first electronic device broadcasts request message A3.
[0209] 508. When the preset conditions are met and the device determines itself to be the receiving end, the third electronic device broadcasts request message A4.
[0210] Understandably, if the moment when the first electronic device touches the second electronic device is recorded as moment 1, and the moment when the first electronic device touches the third electronic device is recorded as moment 2, then the time interval between moment 1 and moment 2 must be less than or equal to a preset duration T2. For example, the preset duration T2 can be 3 minutes or 2 minutes, etc.
[0211] When a user wants to use the first electronic device to tap the second electronic device and the third electronic device in sequence, the first electronic device will generally not tap the second electronic device for a long time before tapping the third electronic device. Therefore, the time interval between the above time 1 and time 2 can be set to be less than or equal to the preset time T2.
[0212] This avoids wasting the power consumption of the electronic device by keeping the first electronic device in the data transmission display interface when the user accidentally operates or does not want to continue the one-to-many tap-to-tap operation.
[0213] It should be understood that after the first electronic device and the second electronic device touch, the first electronic device, acting as the transmitting end, will continuously display a screen showing the data to be transmitted. This screen can be used to indicate to the user that there is data available to be transmitted to other electronic devices. For example, see... Figure 5 The data to be transmitted can be the data corresponding to shareable card A, and the display interface for the data to be transmitted can be... Figure 5 The display interface of the first electronic device in China.
[0214] If, after the first electronic device and the second electronic device have touched, the first electronic device has not touched the third electronic device within a preset time period T2, and the first electronic device has not detected any user data transmission, then the first electronic device can disconnect its communication connection with the second electronic device. In this case, since the first electronic device neither continued to touch the third electronic device nor detected any user data transmission, it means that the previous touch operation between the first and second electronic devices may have been a user error, or that the user did not want to continue the one-to-many touch operation. Therefore, the first electronic device can disconnect its communication connection with the second electronic device.
[0215] This avoids the first electronic device from touching the second electronic device, and after the communication connection is established, the first electronic device remains in the display interface for data transmission, but the user does not perform any operation, thus wasting the power consumption of the electronic device.
[0216] For example, see Figure 7 In (d), after the first electronic device and the third electronic device trigger the tap-to-tap service, the first electronic device can broadcast request message A3, and the third electronic device can broadcast request message B4.
[0217] For steps 507-508, please refer to the relevant descriptions of steps 301-302.
[0218] 509. The third electronic device determines the distance B between the first electronic device and the third electronic device based on request message A3.
[0219] 510. When the distance B is less than or equal to the preset distance, the third electronic device sends message C4 to the first electronic device.
[0220] For example, see Figure 7 In (e), after receiving request message A3, the third electronic device may send message C4 to the first electronic device.
[0221] 511, The first electronic device establishes a communication link D with the third electronic device based on message C4.
[0222] For example, see Figure 7 In (f), a communication link D is established between the first electronic device and the third electronic device.
[0223] It should be understood that steps 509-511 can be found in the descriptions of steps 307-309 above.
[0224] 512, In response to user operation A, the first electronic device sends data B to the second electronic device via communication link C, and sends data B to the third electronic device via communication link D.
[0225] See Figure 7 In (g), the first electronic device can respond to the user's operation A by sending data B to the second electronic device via communication link C and to the third electronic device via communication link D.
[0226] For example, in step 506, the first electronic device has already displayed the transferable card and animation A. After establishing a communication link D between the first electronic device and the third electronic device, the first electronic device can, in response to the user's operation A of sliding the transferable card towards the wormhole, send data B to the second electronic device via communication link C, and send data B to the third electronic device via communication link D. Afterwards, the display interface of the first electronic device can display the animation of the transferable card entering the wormhole, and the second and third electronic devices can simultaneously display the animation of the card sliding out of the wormhole.
[0227] It is understandable that step 512 can be referred to in the relevant description of step 310 above.
[0228] Based on the embodiments of this application, the first electronic device can act as a transmitting electronic device, sequentially perform a tap-to-tap operation with multiple receiving electronic devices, and sequentially establish communication connections with multiple receiving electronic devices. It can also synchronously send the data to be transmitted to multiple receiving electronic devices according to the user's operation.
[0229] This enables one-to-many synchronous sharing of the tap-to-pay service, thus enriching its application scenarios. Furthermore, this technical solution can enhance the playability of electronic devices and the user experience.
[0230] In some cases, in embodiments of this application, the first electronic device, as a transmitting electronic device, can support establishing communication connections with a preset number of receiving electronic devices, for example, the preset number can be 8 or 10.
[0231] Taking a preset quantity of 8 as an example, the first electronic device can simultaneously tap with 8 electronic devices to establish communication links with each of them, resulting in a total of 8 communication links. In some cases, when the number of receiving electronic devices exceeds 8, for example, if there are 9 receiving electronic devices, the first electronic device can first establish communication links with 8 of them. The electronic device without a communication connection is denoted as electronic device A. According to the user's operation, A transmits data to each of the 8 receiving electronic devices. When one of the receiving electronic devices, B, finishes transmitting, the first electronic device can disconnect from electronic device B and establish a communication connection with electronic device A, and continue transmitting data to electronic device A.
[0232] In this way, when the receiving electronic device has a large amount of data, one-to-many touch-to-transfer data can also be achieved.
[0233] For example, embodiments of this application provide a data transmission system. This system may include a first electronic device, a second electronic device, and a third electronic device.
[0234] A first electronic device is configured to broadcast a first message in response to a first preset condition being met. The first message includes a first identifier, which indicates that the first electronic device has data transmission capability.
[0235] The first preset condition includes detecting a touch operation or detecting the triggering of near-field communication.
[0236] In other examples, the first preset condition may also include detecting that a user clicks a preset function control on the display interface. When the first electronic device detects that a user has clicked the preset function control, it may also broadcast the first message.
[0237] In other examples, when the first electronic device detects that a preset display interface is displayed, it can also be understood that the first preset condition is met, and then the first electronic device can broadcast the aforementioned first message.
[0238] For example, the first electronic device may broadcast the first message via Bluetooth or Bluetooth Low Energy.
[0239] For example, the first electronic device may include an NFC module, which can be used to sense whether near-field communication is triggered.
[0240] For example, see Figure 3 The first message can be the request message A mentioned earlier. The first identifier can be the data transmission identifier A mentioned earlier.
[0241] A second electronic device is configured to broadcast a second message in response to a first preset condition being met. The second message includes a second identifier, which is used to indicate that no data is being transmitted.
[0242] A third electronic device is configured to broadcast a third message in response to the fulfillment of a first preset condition. The third message includes a third identifier, which is used to indicate that no data is being transmitted.
[0243] The second electronic device is further configured to ignore the third message when a second preset condition is met, in the case of receiving both the first and third messages.
[0244] The third electronic device is also configured to ignore the second message when a third preset condition is met, in the case of receiving both the first and second messages.
[0245] The second electronic device is also used to send first information to the first electronic device, wherein the first information is used to identify the second electronic device.
[0246] The third electronic device is also used to send second information to the first electronic device, wherein the second information is used to identify the third electronic device.
[0247] The first electronic device is also configured to establish a first communication link with the second electronic device based on the first information, and to establish a second communication link with the third electronic device based on the second information.
[0248] The first electronic device is also configured to, in response to a first operation by a user, send first data to a second electronic device via a first communication link, and send first data to a third electronic device via the second communication link.
[0249] For example, see Figure 3 The second message can be request message B1, the second identifier can be no data transmission identifier 1, the third message can be request message B2, and the third identifier can be no data transmission identifier 2. The first information can be message C1 mentioned above, and the second information can be message C2 mentioned above. The first communication link can be communication link A, and the second communication link can be communication link B.
[0250] For example, the first operation could be a user sliding the first image in a preset direction on the display interface of the first electronic device. For instance, the display interface of the first electronic device could include a floating first image and a wormhole, and the first operation could be sliding the first image towards the wormhole.
[0251] For example, see Figure 3 The first data can be data A.
[0252] Based on the embodiments of this application, when a touch operation is detected or near-field communication is triggered, the first electronic device, acting as the sending end, can broadcast a first message to indicate that data transmission is occurring. The second and third electronic devices, acting as receiving ends, can broadcast messages indicating that no data transmission is occurring. Upon receiving the first message and the message broadcast by the other party indicating no data transmission, and if preset conditions are met, the second and third electronic devices can ignore the message broadcast by the other party indicating no data transmission. The first electronic device can receive first information from the second electronic device and second information from the third electronic device, and establish a first communication link with the second electronic device based on the first information, and establish a second communication link with the third electronic device based on the second information. In response to the user's first operation, it sends first data to the second electronic device through the first communication link and sends first data to the third electronic device through the second communication link.
[0253] In this way, when a sending electronic device taps with multiple receiving electronic devices simultaneously, the sending electronic device can establish communication links with each of the multiple receiving electronic devices and send the data to be transmitted to each of the multiple receiving electronic devices according to the user's operation, thereby realizing one-to-many tap sharing and enriching the application scenarios of tap.
[0254] In some implementations, the first electronic device is also used for:
[0255] When the second electronic device is determined to be the receiving electronic device based on the second message, the second message is ignored; and when the third electronic device is determined to be another receiving electronic device based on the third message, the third message is ignored.
[0256] For example, see Figure 4 The second message can be message B1, and the second identifier can be no data transmission identifier 1. The third message can be message B2, and the third identifier can be no data transmission identifier 2.
[0257] Based on the embodiments of this application, a first electronic device acting as a receiving end can determine that a second electronic device is a receiving end electronic device based on a received second message, and determine that a third electronic device is another receiving end electronic device based on a received third message. Thus, the first electronic device can ignore messages sent by the receiving end electronic devices and determine which receiving end electronic devices exist.
[0258] In some implementations, the second preset condition includes one of the following:
[0259] The device receives a first message at a first moment and a third message at a second moment, wherein the first moment is earlier than or equal to the second moment; or, the first message is received within a first preset time period after receiving the third message; or, the device receives a first indication message sent by the cloud server to indicate that the first electronic device is the sending electronic device and a second indication message to indicate that the third electronic device is the receiving electronic device.
[0260] Based on the embodiments of this application, the receiving electronic device can ignore third messages sent by other receiving electronic devices according to the preset conditions, so as to avoid the second electronic device, which is a receiving electronic device, receiving broadcast messages from other receiving electronic devices and thus displaying a prompt message to the user that no data is being transmitted.
[0261] In some implementations, the third precondition includes one of the following:
[0262] The first message is received at a third time, and the second message is received at a fourth time, wherein the third time is earlier than or equal to the fourth time; or, the first message is received within a first preset time period after the second message is received; or, a first indication message sent by the cloud server is received to indicate that the first electronic device is the sending electronic device, and another indication message is received to indicate that the second electronic device is the receiving electronic device.
[0263] Based on the embodiments of this application, the receiving electronic device can ignore the second message sent by other receiving electronic devices when the third preset condition is met, so as to avoid the third electronic device, which is a receiving electronic device, receiving broadcast messages from other receiving electronic devices and causing a prompt message that no data is being transmitted to the user.
[0264] In some implementations, the first message also includes third indication information for indicating the strength of the first signal. The third indication information is used by other electronic devices to determine the distance between themselves and the first electronic device. The first signal is the signal of the communication method used by the first electronic device to broadcast the first message.
[0265] For example, the first signal can be the Bluetooth signal mentioned above, or it can be a Bluetooth Low Energy signal, a UWB signal, etc.
[0266] Based on the embodiments of this application, after receiving the first message, other electronic devices can determine the distance between themselves and the first electronic device according to the third instruction information in the first message. This helps other electronic devices determine whether the object they are touching is the first electronic device, based on whether the distance is less than a preset distance.
[0267] In some implementations, the first message also includes data from a first sensor of the first electronic device. This first sensor data may include acceleration data of the first electronic device, which allows other electronic devices to determine whether the object to be touched by another electronic device is likely the first electronic device, based on whether the first sensor data matches data from their own sensors. In other implementations, the first electronic device may also send the first sensor data in a separate message from the first message.
[0268] For example, the first sensor may be the accelerometer mentioned above, and the data of the first sensor may be triaxial data acquired by the accelerometer.
[0269] Based on the embodiments of this application, other electronic devices can determine whether the currently received first message belongs to the first electronic device through the data of the first sensor in the first message, thereby avoiding the situation where the received broadcast is not sent by the device that triggered the touch operation.
[0270] In some implementations, the first sensor is an acceleration sensor or a collision sensor.
[0271] In other examples, the first sensor may be other sensors, such as pressure sensors, etc., which are not limited in this application embodiment.
[0272] For example, Figure 8 This is a schematic flowchart illustrating a data transmission method provided in an embodiment of this application. Figure 8 As shown, the method 800 can be applied to a second electronic device, and the method 800 may include steps 810 to 850.
[0273] 810, in response to the fulfillment of the first preset condition, the second electronic device broadcasts a second message, the second message including a second identifier, the second identifier being used to indicate that the second electronic device has no data transmission.
[0274] The first preset condition includes detecting a touch operation or detecting the triggering of near-field communication.
[0275] It should be understood that the first preset condition can be found in the relevant description in step 710 above, and will not be repeated here.
[0276] 820, when the second electronic device receives a first message from the first electronic device and a third message from the third electronic device, it ignores the third message when a second preset condition is met. The first message includes a first identifier, which is used to indicate that the first electronic device has data transmission, and the third message includes a third identifier, which is used to indicate that the third electronic device has no data transmission.
[0277] For example, see Figure 3 The first message can be the request message A mentioned earlier. The first identifier can be the data transmission identifier A mentioned earlier. The third message can be message B2 mentioned earlier, and the third identifier can be the no data transmission identifier 2 mentioned earlier.
[0278] 830, the second electronic device sends first information to the first electronic device according to the first message, the first information being used to identify the second electronic device.
[0279] For example, see Figure 4 The first piece of information can be message C1 from the previous text.
[0280] 840, The second electronic device establishes a first communication link with the first electronic device.
[0281] 850, the second electronic device receives the first data sent by the first electronic device through the first communication link.
[0282] It should be understood that the first communication link can be communication link A mentioned above.
[0283] Based on the embodiments of this application, when a tap-to-tap operation is detected or near-field communication is triggered, the second electronic device, acting as the receiving end, can broadcast a second message to indicate that the second electronic device has no data transmission. Since it is a one-to-many tap-to-tap scenario, the second electronic device taps to the first electronic device and the third electronic device simultaneously or almost simultaneously. This tap-to-tap operation will trigger the second electronic device to broadcast the second message, as well as the first electronic device to broadcast the first message and the third electronic device to broadcast the third message. Therefore, the second electronic device will also receive the first message from the first electronic device and the third message from the third electronic device. Then, the second electronic device can ignore the third message when the second preset condition is met, and send the first information to the first electronic device at the sending end according to the first message, and establish a first communication link with the first electronic device. Subsequently, it can receive the data sent by the first electronic device through the first communication link.
[0284] In this way, when a sending electronic device touches multiple receiving electronic devices simultaneously, the receiving electronic device can identify the presence of other receiving electronic devices and sending electronic devices in the vicinity. As a result, it can ignore the broadcast messages sent by other receiving electronic devices and establish a communication link with the sending electronic device. This enables one-to-many touch sharing and avoids the second electronic device, which acts as a receiving electronic device, receiving broadcast messages from other receiving electronic devices, which would cause a message indicating no data transmission to be displayed to the user.
[0285] In some implementations, the second preset condition includes one of the following:
[0286] The first message is received at the first moment, and the third message is received at the second moment, wherein the first moment is earlier than or equal to the second moment; or...
[0287] Within a first preset time period after receiving the third message, the first message is received; or,
[0288] The system receives a first indication message from the cloud server indicating that the first electronic device is the sending electronic device, and a second indication message indicating that the third electronic device is the receiving electronic device.
[0289] It should be understood that the preset conditions can be found in the relevant descriptions of conditions one to four in step 304 above.
[0290] Based on the embodiments of this application, the receiving electronic device can ignore the third message sent by other receiving electronic devices when the second preset condition is met, so as to avoid the second electronic device, which is a receiving electronic device, receiving broadcast messages from other receiving electronic devices and causing a prompt message that no data is being transmitted to the user.
[0291] In some implementations, the first message also includes third indication information for indicating the strength of the first signal. The first signal is a signal of the communication method used by the first electronic device to broadcast the first message. Sending the first information to the first electronic device according to the first message includes: determining a first distance between the device and the first electronic device based on the strength of the first signal; and sending the first information to the first electronic device when the first distance is less than a preset distance.
[0292] For example, the preset distance can be 10 cm or 15 cm, etc., and the specific value of the preset distance is not limited in the embodiments of this application.
[0293] Based on the embodiments of this application, the second electronic device determines, according to the third indication information in the first message, that the distance between it and the first electronic device is less than a preset distance. Therefore, it determines that the object performing the "tap-to-tap" operation with the second electronic device is likely the first electronic device, and sends first information to the first electronic device. In this way, because the distance between the first and second electronic devices is relatively short, it can be determined that the first electronic device is more likely to be the one triggering the tap-to-tap operation, thereby improving the security of data transmission.
[0294] In some implementations, the first message also includes data from the first sensor of the first electronic device. When the first distance is less than a preset distance, first information is sent to the first electronic device, including:
[0295] Based on the relationship between the data from the first sensor of the first electronic device and the data from the second sensor of the second electronic device, determine whether the first electronic device is the electronic device broadcasting the first message;
[0296] When the first distance is less than a preset distance and the first electronic device is an electronic device broadcasting the first message, the first information is sent to the first electronic device.
[0297] It should be understood that the first sensor and the second sensor are of the same type; for example, both the first sensor and the second sensor are acceleration sensors.
[0298] Based on the embodiments of this application, the second electronic device can determine that the object to be touched by the second electronic device is the first electronic device based on the matching of the data of the first sensor with the data of its own sensor and the fact that the distance between the first electronic device and the second electronic device is less than a preset distance, and send the first information to the first electronic device, thereby improving the security of data transmission.
[0299] In some implementations, the first message also includes data from the first sensor of the first electronic device, and first information is sent to the first electronic device according to the first message, including:
[0300] Based on the relationship between the data from the first sensor of the first electronic device and the data from the second sensor of the second electronic device, the first electronic device is determined to be the electronic device broadcasting the first message; the first information is sent to the first electronic device.
[0301] Based on the embodiments of this application, the second electronic device can determine that the object of the touch operation with the second electronic device is the first electronic device by matching the data of the first sensor with the data of its own sensor, and send the first information to the first electronic device to avoid receiving the first message that is not sent by the first electronic device that is currently colliding, thereby improving the security of data transmission.
[0302] In some implementations, the first sensor and the second sensor may include one of an acceleration sensor, a pressure sensor, or a collision sensor.
[0303] For example, Figure 9 This is a schematic flowchart illustrating a data transmission method provided in an embodiment of this application. Figure 9 As shown, the method 900 can be applied to a first electronic device, and the method 900 may include steps 910 to 970.
[0304] 910, in response to the fulfillment of a first preset condition, the first electronic device broadcasts a first message, the first message including a first identifier, the first identifier being used to indicate that the first electronic device has data transmission.
[0305] The first preset condition includes detecting a touch operation or detecting the triggering of near-field communication.
[0306] For example, see Figure 6 The first message can be request message A2.
[0307] 920, the first electronic device receives first information from the second electronic device, wherein the first information is used to identify the second electronic device.
[0308] 930, the first electronic device establishes a first communication link with the second electronic device based on the first information.
[0309] For example, see Figure 6 The first piece of information can be message C3. The first communication link can be communication link C.
[0310] 940, in response to the first preset condition being met again, the first electronic device broadcasts a first message, the first message including a first identifier, the first identifier being used to indicate that the first electronic device has data transmission.
[0311] It should be understood that this first message can be found in the relevant description above.
[0312] For example, meeting the first preset condition again can be understood as the first electronic device detecting that it has touched the third electronic device again.
[0313] 950, the first electronic device receives second information from the third electronic device, wherein the second information is used to identify the third electronic device.
[0314] 960. The first electronic device establishes a second communication link with the third electronic device based on the second information.
[0315] For example, see Figure 6 The second information can be message C4, and the second communication link can be communication link D.
[0316] 970, in response to a user's first operation, the first electronic device sends first data to the second electronic device via the first communication link, and sends first data to the third electronic device via the second communication link.
[0317] For example, the first data can be data B.
[0318] Based on the embodiments of this application, when a touch operation is detected or near-field communication is triggered (i.e., the user performs the first touch operation), the first electronic device can broadcast a first message to indicate that data transmission is possible. Subsequently, the first electronic device can receive first information from the second electronic device and establish a first communication link with the second electronic device based on the first information. If the first electronic device then detects another touch operation or triggers near-field communication again (i.e., the user performs a second touch operation), it can establish a second communication link with the third electronic device. Subsequently, in response to the user's first operation, the first electronic device sends first data to the second electronic device via the first communication link and then sends first data to the third electronic device via the second communication link.
[0319] In this way, when a sending electronic device taps with multiple receiving electronic devices in sequence, the sending electronic device can establish communication links with multiple receiving electronic devices in sequence, and send the data to be transmitted to multiple receiving electronic devices simultaneously according to the user's operation, thereby realizing one-to-many tap sharing and enriching the application scenarios of tap.
[0320] In some implementations, the moment when the first electronic device meets the first preset condition is the third moment, and the moment when the first electronic device meets the first preset condition again is the fourth moment, wherein the difference between the third moment and the fourth moment is less than or equal to the second preset duration.
[0321] For example, the second preset duration can be 3 minutes or 2 minutes, etc., and the specific value of the second preset duration is not limited in this application embodiment.
[0322] Based on the embodiments of this application, the time interval between the first electronic device touching the other device is less than or equal to the second preset time, thereby avoiding the user from being stuck in the data transmission display interface after the first touch, thus wasting the power consumption of the electronic device.
[0323] In some implementations, the method further includes:
[0324] Display a first display interface, which includes first data that can be transmitted;
[0325] After a second preset time period, if no first preset condition is met again and no operation to trigger the transmission of first data is detected, the first display interface is canceled and the first communication link is disconnected.
[0326] For example, the first display interface may include a display interface that indicates a transferable image, and the first display interface may also be used to display animations to indicate that the user can perform a swipe operation to transfer data.
[0327] For example, see Figure 5 The first display interface can be the display interface of display card A and the wormhole.
[0328] Based on the embodiments of this application, after a second preset time period, if no first preset condition is detected to be met again and no operation to trigger the transmission of first data is detected, the first electronic device cancels the display of the first display interface and disconnects the first communication link with the second electronic device. This can prevent the user from being stuck in the display interface waiting to transmit data after the first touch, thus wasting the power consumption of the electronic device.
[0329] In some implementations, the first message also includes third indication information for indicating the strength of the first signal. The third indication information is used by other electronic devices to determine the distance between themselves and the first electronic device. The first signal is the signal of the communication method used by the first electronic device to broadcast the first message.
[0330] Based on the embodiments of this application, after receiving the first message, other electronic devices can determine the distance between themselves and the first electronic device according to the third instruction information in the first message. This helps other electronic devices determine whether the object they are touching is the first electronic device, based on whether the distance is less than a preset distance.
[0331] In some implementations, the first message also includes data from a first sensor of the first electronic device. This first sensor data may include acceleration data of the first electronic device, which allows other electronic devices to determine whether the object to be touched by another electronic device is likely the first electronic device, based on whether the first sensor data matches data from their own sensors. In other implementations, the first electronic device may also send the first sensor data in a separate message from the first message.
[0332] Based on the embodiments of this application, other electronic devices can determine whether the currently received first message belongs to the first electronic device through the data of the first sensor in the first message, thereby avoiding the situation where the received broadcast is not sent by the device that triggered the touch operation.
[0333] Figure 10 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Figure 10 As shown, the electronic device 1000 includes one or more processors 1010; one or more memories 1020; the one or more memories 1020 storing one or more instructions that, when executed by one or more processors 1010, cause the method described in any of the possible implementations above to be executed.
[0334] For example, the electronic device 1000 may be the electronic device 100, electronic device 200, electronic device 210, electronic device 220, first electronic device, second electronic device, or third electronic device mentioned above.
[0335] The electronic device 1000 can be used to execute methods 300, 500, 800 and 900 mentioned above.
[0336] This application also provides an electronic device, including a processor, a memory, and a communication interface, wherein the communication interface is used to receive signals, the memory is used to store signals, the communication interface is also used to transmit signals to the processor, and the processor processes the signals such that the data transmission method described in any of the possible implementations above is executed.
[0337] This application also provides a data transmission apparatus, including a processor and a communication interface. The communication interface is used to receive signals and transmit the signals to the processor. The processor processes the signals so that the data transmission method described in any of the possible implementations above is executed.
[0338] The device can be a chip. For example, the chip can be a chip system or a standalone chip.
[0339] This application also provides a readable storage medium (also known as a computer-readable storage medium) that stores instructions. When these instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the data transmission method described in the above embodiments.
[0340] This application also provides a program product (also known as a computer program product) that, when run on an electronic device, causes the electronic device to perform the aforementioned steps to implement the data transmission method described in the above embodiments.
[0341] This application also provides an apparatus including a module for implementing the data transmission method as described in any of the foregoing embodiments.
[0342] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component, or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store instructions, and when the apparatus is running, the processor may execute the instructions stored in the memory to cause the apparatus to perform the data transmission methods in the above-described method embodiments.
[0343] In this embodiment, the device, readable storage medium, program product or apparatus are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.
[0344] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0345] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0346] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0347] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0348] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0349] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks.
[0350] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data transmission system, characterized in that, The system includes a first electronic device, a second electronic device, and a third electronic device, wherein: The first electronic device is configured to broadcast a first message in response to meeting a first preset condition. The first message includes a first identifier, which is used to indicate that the first electronic device has data transmission. The first preset condition includes detecting a touch operation or detecting the triggering of near-field communication. The second electronic device is configured to broadcast a second message in response to the fulfillment of the first preset condition, the second message including a second identifier, the second identifier being used to indicate no data transmission; The third electronic device is configured to broadcast a third message in response to the fulfillment of the first preset condition, the third message including a third identifier, the third identifier being used to indicate no data transmission; The second electronic device is further configured to ignore the third message when a second preset condition is met, provided that both the first message and the third message are received. The second preset condition includes one of the following: receiving the first message at a first moment and receiving the third message at a second moment, wherein the first moment is earlier than or equal to the second moment; or receiving the first message within a first preset time period after receiving the third message; or receiving first indication information from a cloud server indicating that the first electronic device is a sending electronic device and second indication information indicating that the third electronic device is a receiving electronic device. The third electronic device is further configured to ignore the second message when a third preset condition is met, provided that both the first message and the second message are received. The third preset condition includes one of the following: receiving the first message at a third time and receiving the second message at a fourth time, wherein the third time is earlier than or equal to the fourth time; or receiving the first message within a first preset time period after receiving the second message; or receiving a first indication message from the cloud server indicating that the first electronic device is a sending electronic device and another indication message indicating that the second electronic device is a receiving electronic device. The second electronic device is further configured to send first information to the first electronic device, wherein the first information is used to identify the second electronic device; The third electronic device is further configured to send second information to the first electronic device, wherein the second information is used to identify the third electronic device; The first electronic device is further configured to establish a first communication link with the second electronic device based on the first information, and to establish a second communication link with the third electronic device based on the second information; The first electronic device is further configured to, in response to a first operation by a user, send first data to the second electronic device via the first communication link, and send the first data to the third electronic device via the second communication link.
2. The system according to claim 1, characterized in that, The first electronic device is further configured to: When the second electronic device is determined to be a receiving electronic device based on the second message, the second message is ignored; and when the third electronic device is determined to be another receiving electronic device based on the third message, the third message is ignored.
3. The system according to claim 1 or 2, characterized in that, The first message also includes third indication information for indicating the strength of the first signal, the third indication information being used by other electronic devices to determine the distance between themselves and the first electronic device, wherein the first signal is a signal of the communication method used by the first electronic device to broadcast the first message.
4. The system according to claim 1 or 2, characterized in that, The first message also includes data from a first sensor of the first electronic device, which is used by other electronic devices to determine whether the first electronic device is the one broadcasting the first message.
5. A method for data transmission, characterized in that, The method is applied to a second electronic device, and the method includes: In response to the fulfillment of a first preset condition, a second message is broadcast, the second message including a second identifier, the second identifier being used to indicate no data transmission, wherein the first preset condition includes detecting a touch operation or detecting the triggering of near-field communication; In the event that a first message is received from a first electronic device and a third message is received from a third electronic device, the third message is ignored if a second preset condition is met. The first message includes a first identifier indicating that the first electronic device is transmitting data, and the third message includes a third identifier indicating that the third electronic device is not transmitting data. The second preset condition includes one of the following: receiving the first message at a first moment and receiving the third message at a second moment, wherein the first moment is earlier than or equal to the second moment; or receiving the first message within a first preset time period after receiving the third message; or receiving first indication information from a cloud server indicating that the first electronic device is a sending electronic device and second indication information indicating that the third electronic device is a receiving electronic device. First information is sent to the first electronic device according to the first message, and the first information is used to identify the second electronic device; Establish a first communication link with the first electronic device; The first data sent by the first electronic device is received through the first communication link.
6. The method according to claim 5, characterized in that, The first message also includes third indication information for indicating the strength of the first signal, whereby the first signal is a signal of the communication method used by the first electronic device to broadcast the first message. The step of sending the first information to the first electronic device according to the first message includes: The first distance between the device and the first electronic device is determined based on the third indication information; When the first distance is less than the preset distance, the first information is sent to the first electronic device.
7. The method according to claim 6, characterized in that, The first message also includes data from the first sensor of the first electronic device, and the step of sending the first information to the first electronic device when the first distance is less than a preset distance includes: Based on the relationship between the data from the first sensor of the first electronic device and the data from the second sensor of the second electronic device, determine whether the first electronic device is the electronic device broadcasting the first message; When the first distance is less than a preset distance and the first electronic device is the electronic device broadcasting the first message, the first information is sent to the first electronic device.
8. The method according to claim 5, characterized in that, The first message also includes data from the first sensor of the first electronic device, and the step of sending the first information to the first electronic device according to the first message includes: Based on the relationship between the data from the first sensor of the first electronic device and the data from the second sensor of the second electronic device, it is determined that the first electronic device is the electronic device broadcasting the first message; Send the first information to the first electronic device.
9. A method for data transmission, characterized in that, The method is applied to a first electronic device, and the method includes: The first display interface shows the data transmission. In response to the fulfillment of a first preset condition, a first message is broadcast, the first message including a first identifier, the first identifier being used to indicate that the first electronic device has data transmission, wherein the first preset condition includes detecting a touch operation or detecting the triggering of near-field communication; Receive first information from a second electronic device, wherein the first information is used to identify the second electronic device; A first communication link is established with the second electronic device based on the first information; Display a second display interface, which is a display interface used to indicate the first data that can be transmitted; In response to the first preset condition being met again, the first message is broadcast, the first message including a first identifier, the first identifier being used to indicate that the first electronic device has data transmission; Receive second information from a third electronic device, wherein the second information is used to identify the third electronic device; A second communication link is established with the third electronic device based on the second information; In response to a first operation by the user on the second display interface, the first data is sent to the second electronic device via the first communication link, and the first data is also sent to the third electronic device via the second communication link.
10. The method according to claim 9, characterized in that, The moment when the first electronic device meets the first preset condition is the third moment, and the moment when the first electronic device meets the first preset condition again is the fourth moment, wherein the difference between the third moment and the fourth moment is less than or equal to the second preset duration.
11. The method according to claim 10, characterized in that, Before the first preset condition is satisfied again, the method further includes: If, after the second preset time period, no first preset condition is detected to be met again and no operation to trigger the transmission of the first data is detected, the second display interface is canceled and the first communication link is disconnected.
12. The method according to any one of claims 9-11, characterized in that, The first message also includes third indication information for indicating the strength of the first signal, the third indication information being used by other electronic devices to determine the distance between themselves and the first electronic device, wherein the first signal is a signal of the communication method used by the first electronic device to broadcast the first message.
13. The method according to any one of claims 9-11, characterized in that, The first message also includes data from a first sensor of the first electronic device, which is used by other electronic devices to determine whether the first electronic device is the one broadcasting the first message.
14. An electronic device, characterized in that, include: One or more processors; One or more memories; the one or more memories storing one or more programs that, when executed by one or more processors, cause the method as described in any one of claims 5-13 to be performed.
15. A chip, characterized in that, The chip includes a processor and a communication interface, the communication interface being used to receive signals and transmit the signals to the processor, the processor processing the signals such that the method as described in any one of claims 5-13 is executed.
16. A readable storage medium, characterized in that, The readable storage medium stores instructions that, when executed on an electronic device, cause the method as described in any one of claims 5-13 to be performed.
17. A program product, characterized in that, The program product includes program code that, when run on an electronic device, causes the method as described in any one of claims 5-13 to be executed.
Citation Information
Patent Citations
System and method for sharing files of near-field communication devices
CN103457643A