Method, electronic device and system for transmitting data

By selecting the appropriate transmission method based on the number of devices and network status in collaborative synchronization scenarios, and using near-field communication, far-field communication, or cloud servers to transmit data, the problem of low data transmission efficiency of multiple devices is solved, and user experience and data consistency are improved.

CN119728708BActive Publication Date: 2026-04-10HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2023-09-27
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing technologies, data transmission efficiency among multiple electronic devices is low, which affects user experience.

Method used

In collaborative synchronization scenarios, the method of transmitting data is determined based on the number of electronic devices and network status. Data transmission is carried out using a combination of near-field communication, far-field communication, or distributed soft bus and cloud server to ensure low latency and low power consumption.

Benefits of technology

It improves the data synchronization efficiency and user experience of multiple electronic devices co-processing tasks, and meets the data consistency requirements of different synchronization scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728708B_ABST
    Figure CN119728708B_ABST
Patent Text Reader

Abstract

The application provides a data transmission method, an electronic device and a system. The method is applied to a first electronic device, and the method comprises the following steps: in response to opening a collaborative application, receiving second synchronization information, the second synchronization information being synchronization information of a second electronic device; determining whether the first electronic device and at least one second electronic device are in a collaborative synchronization state according to the second synchronization information; when the first electronic device and the second electronic device are in the collaborative synchronization state, determining a first data transmission mode according to the number of the second electronic devices and / or the network state of the first electronic device and the second electronic devices; and transmitting to-be-synchronized data to the second electronic devices by using the first data transmission mode. The data transmission method, the electronic device and the system can automatically identify whether the current situation is a collaborative synchronization situation, and determine a specific data transmission mode based on the number of the electronic devices and / or the network state in the collaborative synchronization situation, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the field of electronic devices, and in particular to a method for transmitting data, an electronic device and a system. BACKGROUND

[0002] With the development of science and technology, users can complete work or learning tasks through multiple electronic devices, and the task processing of multiple electronic devices needs to be based on data transmission, in which the efficiency and mode of data transmission affect the experience of users in processing tasks through electronic devices.

[0003] Therefore, how to provide an efficient way of transmitting data to improve user experience is a problem to be solved at present. SUMMARY

[0004] The present application provides a method for transmitting data, an electronic device and a system. An efficient way of transmitting data can be provided in a collaborative synchronization scenario to improve user experience.

[0005] In a first aspect, a method for transmitting data is provided, the method being applied to a first electronic device, and the method comprising: in response to opening a collaborative application, receiving at least one second synchronization information, the at least one second synchronization information being synchronization information of at least one second electronic device, and the at least one second synchronization information corresponding to the at least one second electronic device one by one; determining whether the first electronic device and the at least one second electronic device are collaboratively synchronized according to the at least one second synchronization information; when the first electronic device and the at least one second electronic device are collaboratively synchronized, determining a first data transmission mode according to the number of the second electronic devices and / or the network state of the first electronic device and the second electronic devices; and transmitting to-be-synchronized data to the at least one second electronic device through the first data transmission mode.

[0006] For example, the collaborative application can be a drawing application, a file application, and the like, which supports a collaborative synchronization function and the like. The data ID can be used to represent the information such as a page, a picture, a text, and the like, which is currently displayed (or opened) by the electronic device.

[0007] It should be noted that the first electronic device can send the first synchronization information to the at least one second electronic device or send the first synchronization information to a cloud server in response to the user opening the collaborative application. The first synchronization information is the synchronization information of the first electronic device. Meanwhile, the first electronic device can receive at least one second synchronization information from the at least one second electronic device or receive at least one second synchronization information from the cloud server.

[0008] It should be noted that when the collaborative application is opened, the uploading and downloading of the synchronization information can be triggered; or, in order to save power consumption, the updated synchronization information can be transmitted when the data changes. For example, the first electronic device displays a picture of a drawing application, and when the user modifies the picture through the device, the first electronic device can upload the modified data ID to the cloud server, wherein the modified data ID can represent the modified picture.

[0009] Based on the above scheme, it can be determined whether multiple electronic devices are in a collaborative synchronization scenario, and in the collaborative synchronization scenario, a specific data transmission mode (transmission strategy) is determined based on the number of electronic devices and / or network status, so that the data synchronization delay in the collaborative synchronization scenario is low, the power consumption is low, the efficiency is high, and good user experience is ensured.

[0010] In combination with the first aspect, in some implementations of the first aspect, the synchronization information includes an electronic device identifier ID, an ID of the collaborative application, and a data ID, the data ID being used to represent data displayed by the electronic device.

[0011] In combination with the first aspect, in some implementations of the first aspect, before the first transmission data mode is determined according to the number of the second electronic devices and / or the network status of the first electronic device and the second electronic devices, the method further includes: determining the number of the second electronic devices according to the at least one second synchronization information, and determining the network status of the first electronic device and the second electronic devices according to the at least one second synchronization information.

[0012] It can be understood that when the first electronic device receives one second synchronization information, the first electronic device can determine that the number of the second electronic devices is 1; when the first electronic device receives two second synchronization information, the first electronic device can determine that the number of the second electronic devices is 2. That is, the first electronic device can determine the number of the second electronic devices according to the number of the received second synchronization information, and since the synchronization information includes the electronic device ID, the first electronic device can also determine the second electronic device ID corresponding to the second synchronization information according to the electronic device ID in the second synchronization information.

[0013] It should be noted that the network status includes near field communication, far field communication, or near field communication and far field communication. Simply put, near field and far field can be relative concepts in terms of communication distance. Two electronic devices are close in distance, which may be a near field network state; two electronic devices are far apart, which may be a far field network state. When the first electronic device collaborates with at least two second electronic devices, the network status of near field and far field may exist.

[0014] With reference to the first aspect, in some implementations of the first aspect, before the determining the number of the second electronic devices according to the at least one second synchronization information, the method further includes: determining that the first electronic device and the at least one second electronic device are in a cooperative synchronization scenario according to the fact that the ID of the cooperative application in the first synchronization information is consistent with the ID of the cooperative application in the at least one second synchronization information, and the data ID in the first synchronization information is consistent with the data ID in the at least one second synchronization information, wherein the first synchronization information is the synchronization information of the first electronic device.

[0015] It should be noted that when the first electronic device and the second electronic device both display the same cooperative application and the same data, it can be considered that the first electronic device and the second electronic device are in a cooperative synchronization scenario. In the cooperative synchronization scenario, the first electronic device and the second electronic device are in data synchronization and resource sharing, and the multiple electronic devices in the cooperative synchronization scenario can also complete the task of the two electronic devices on one electronic device through one peripheral device (for example, a mouse or a keyboard).

[0016] It can be understood that the content displayed by the first electronic device in the cooperative synchronization is consistent with the content displayed by the second electronic device, and when the content displayed on one of the electronic devices changes, the content displayed on the other electronic device will also change.

[0017] With reference to the first aspect, in some implementations of the first aspect, when the number of the second electronic devices is 1 and the network state between the first electronic device and the second electronic device is a near-field network state, the transmitting the to-be-synchronized data to the at least one second electronic device by the first transmission manner includes: transmitting the to-be-synchronized data to a third electronic device, the third electronic device being one of the at least one second electronic device.

[0018] It should be noted that when the number of the second electronic devices is 1, the number of the cooperative devices is 2, including the first electronic device and the third electronic device. When the first electronic device and the third electronic device are in a near-field network state, the data can be directly transmitted in an end-to-end manner. That is, the first electronic device directly transmits the to-be-synchronized data to the third electronic device.

[0019] For example, the two cooperative devices in the near-field network state can preferably transmit data through a distributed soft bus.

[0020] In comparison, if the two collaborative devices are in the near-field network state, the first electronic device needs to transmit the to-be-synchronized data to the server, and the server forwards the to-be-synchronized data to the third electronic device, so that the first electronic device completes data synchronization in two hops. It can be seen that when the two collaborative devices are in the near-field network state, the number of hops required for data transmission in the distributed soft bus mode is smaller, the number of hops is smaller, the resources required for data transmission are less, and the time delay is lower. Therefore, in a certain scenario, the transmission data mode with fewer hops is preferred.

[0021] Based on the above scheme, the two collaborative devices in the near-field network state can improve the efficiency of data transmission in an end-to-end manner, and improve the user experience of processing work tasks in a collaborative manner through electronic devices.

[0022] In combination with the first aspect, in some implementations of the first aspect, when the number of second electronic devices is 1 and the network state between the first electronic device and the second electronic device is a far-field network state, the first data transmission manner for transmitting the to-be-synchronized data with the at least one second electronic device comprises: transmitting the to-be-synchronized data to a third electronic device through a server, the third electronic device being one of the at least one second electronic device.

[0023] It should be noted that when the number of second electronic devices is 1, the number of collaborative devices is 2, including the first electronic device and the third electronic device. When the first electronic device and the third electronic device are in a far-field network state, the end-to-end data transmission mode cannot be used, and the end-to-cloud data transmission mode can be used. That is, the first electronic device forwards the to-be-synchronized data to the third electronic device through the server. When the two collaborative devices are in a far-field network state, the first electronic device completes data synchronization in two hops. It can be seen that even if the number of collaborative devices is the same, different data transmission modes can be used. (For example, two collaborative devices in a near-field network state use a distributed soft bus technology to transmit data, and two collaborative devices in a far-field network state transmit data through a cloud server.)

[0024] Based on the above scheme, the two collaborative devices in the far-field network state can improve the efficiency of data transmission in an end-to-cloud manner, and improve the user experience of processing work tasks in a collaborative manner through electronic devices.

[0025] In combination with the first aspect, in some implementations of the first aspect, when the number of second electronic devices is 3, the first data transmission manner for transmitting the to-be-synchronized data with the at least one second electronic device comprises: transmitting the to-be-synchronized data to a third electronic device, a fourth electronic device and a fifth electronic device through a server, wherein the third electronic device, the fourth electronic device and the fifth electronic device belong to the at least one second electronic device.

[0026] It should be noted that when the number of second electronic devices is 3, the number of collaborative devices is 4, including the first electronic device, the third electronic device, the fourth electronic device and the fifth electronic device. For the scenario of collaborative synchronization of four collaborative devices, whether in the near-field network state or the far-field network state, the end-cloud mode can be used to transmit data. That is, the first electronic device forwards the to-be-synchronized data to the third electronic device, the fourth electronic device and the fifth electronic device through the server.

[0027] It should be noted that the end-cloud mode can be applied to the near-field network state and the far-field network state. When the number of collaborative devices is greater than or equal to 4, whether in the near-field network state or the far-field network state, the end-cloud mode can be used for data transmission to ensure that the number of data forwarding times (hop count) is small during data transmission, and to reduce transmission delay and power consumption.

[0028] Based on the above scheme, four or more collaborative devices can improve the efficiency of transmitting data through the end-cloud mode, and improve the user experience of processing work tasks through electronic devices in a collaborative manner.

[0029] In combination with the first aspect, in some implementations of the first aspect, the method further includes: when the first electronic device is normally synchronized with the at least one second electronic device, transmitting the to-be-synchronized data to the at least one second electronic device through a second data transmission mode; and wherein the time delay of the first data transmission mode is lower than the time delay of the second data transmission mode.

[0030] It should be noted that normal synchronization can be screen projection connection, or U disk synchronization and the like, which has a low requirement on data consistency.

[0031] It can be understood that the first data transmission mode has a higher requirement on data consistency than the second data transmission mode. The high and low of the requirement on data consistency can be reflected by the time delay of data synchronization, and the time delay of the transmission mode with a high requirement on data consistency is lower than the time delay of the transmission mode with a low requirement on data consistency.

[0032] For example, the data consistency of the first data transmission mode is strong eventual consistency, and the time delay of data synchronization is in the order of milliseconds. The data consistency of the second data transmission mode is eventual consistency, and the time delay of data synchronization is in the order of x seconds.

[0033] That is, when the electronic device is in a collaborative synchronization scenario, using a mode with higher data consistency to transmit data helps to improve the user experience of the data synchronization process.

[0034] In a second aspect, an electronic device is provided, which is a first electronic device, comprising: one or more processors; one or more memories; the one or more memories storing one or more computer programs comprising instructions which, when executed by the one or more processors, cause the electronic device to perform the following steps: in response to opening a collaboration application, receiving at least one second synchronization information, the at least one second synchronization information being synchronization information of at least one second electronic device, the at least one second synchronization information corresponding to the at least one second electronic device one-to-one; determining whether the first electronic device and the at least one second electronic device are collaboratively synchronized according to the at least one second synchronization information; when the first electronic device and the at least one second electronic device are collaboratively synchronized, determining a first transmission data manner according to a number of the second electronic devices and / or a network state between the first electronic device and the second electronic devices; and transmitting to-be-synchronized data to the at least one second electronic device through the first transmission data manner.

[0035] With reference to the second aspect, in some implementations of the second aspect, the synchronization information comprises an electronic device identifier (ID), an ID of the collaboration application, and a data ID, the data ID being used to represent data displayed by the electronic device.

[0036] With reference to the second aspect, in some implementations of the second aspect, when the instructions are executed by the one or more processors, the electronic device is caused to perform the following steps: before the first transmission data manner is determined according to the number of the second electronic devices and / or the network state between the first electronic device and the second electronic devices, the number of the second electronic devices is determined according to the at least one second synchronization information, and the network state between the first electronic device and the second electronic devices is determined according to the at least one second synchronization information.

[0037] With reference to the second aspect, in some implementations of the second aspect, when the instructions are executed by the one or more processors, the electronic device is caused to perform the following steps: before the number of the second electronic devices is determined according to the at least one second synchronization information, it is determined that the first electronic device and the at least one second electronic device are collaboratively synchronized when the ID of the collaboration application in the first synchronization information is consistent with the ID of the collaboration application in the at least one second synchronization information, and the data ID in the first synchronization information is consistent with the data ID in the at least one second synchronization information, wherein the first synchronization information is synchronization information of the first electronic device.

[0038] With reference to the second aspect, in some implementations of the second aspect, when the number of the second electronic devices is 1 and the network status between the first electronic device and the second electronic device is a near-field network status, the transmitting the to-be-synchronized data to the at least one second electronic device by the first data transmission manner, when the instructions are executed by the one or more processors, causes the electronic device to perform the following step: sending the to-be-synchronized data to a third electronic device, the third electronic device being one of the at least one second electronic device.

[0039] With reference to the second aspect, in some implementations of the second aspect, when the number of the second electronic devices is 1 and the network status between the first electronic device and the second electronic device is a far-field network status, the transmitting the to-be-synchronized data to the at least one second electronic device by the first data transmission manner, when the instructions are executed by the one or more processors, causes the electronic device to perform the following step: sending the to-be-synchronized data to a third electronic device through a server, the third electronic device being one of the at least one second electronic device.

[0040] With reference to the second aspect, in some implementations of the second aspect, when the number of the second electronic devices is 3, the transmitting the to-be-synchronized data to the at least one second electronic device by the first data transmission manner, when the instructions are executed by the one or more processors, causes the electronic device to perform the following step: sending the to-be-synchronized data to a third electronic device, a fourth electronic device and a fifth electronic device through a server, wherein the third electronic device, the fourth electronic device and the fifth electronic device belong to the at least one second electronic device.

[0041] With reference to the second aspect, in some implementations of the second aspect, when the instructions are executed by the one or more processors, causes the electronic device to perform the following step: when the first electronic device and the at least one second electronic device are in normal synchronization, transmitting to-be-synchronized data to the at least one second electronic device by a second data transmission manner; wherein the time delay of the first data transmission manner is lower than the time delay of the second data transmission manner.

[0042] The third aspect provides a system for transmitting data, the system comprising the first electronic device and the second electronic device according to any one of the possible implementations of the first aspect.

[0043] The fourth aspect provides a device for transmitting data, the device comprising a processor coupled to a memory, the memory being configured to store a computer program, and the processor being configured to execute the computer program, so that the device for transmitting data performs the method according to any one of the possible implementations of the first aspect.

[0044] In combination with the fourth aspect, in some implementations of the fourth aspect, further including one or more of the memory and a transceiver, the transceiver configured to receive signals and / or transmit signals.

[0045] A fifth aspect provides a computer readable storage medium having stored thereon a computer program which, when executed by a computer, causes the computer to implement the method according to the first aspect as such or any possible implementation of the first aspect.

[0046] A sixth aspect provides a computer program product comprising instructions which, when executed on a computer, cause the computer to carry out the method according to the first aspect as such or any possible implementation of the first aspect.

[0047] A seventh aspect provides a chip comprising a processor and a data interface, the processor configured to read instructions stored on a memory via the data interface to implement the method according to the first aspect as such or any possible implementation of the first aspect.

[0048] In combination with the seventh aspect, in one possible implementation, the processor is coupled to the memory via the interface.

[0049] In combination with the seventh aspect, in one possible implementation, the chip system further comprises a memory, the memory storing the computer program or the computer instructions. BRIEF DESCRIPTION OF DRAWINGS

[0050] Figure 1 FIG. 1 is a structural schematic diagram of an electronic device.

[0051] Figure 2 FIG. 2 is a software structural block diagram of an electronic device.

[0052] Figure 3 FIG. 3 is a scenario schematic diagram provided by an embodiment of the present application.

[0053] Figure 4 FIG. 4 is a data synchronization manner schematic diagram provided by an embodiment of the present application.

[0054] Figure 5 FIG. 5 is a network scenario schematic diagram provided by an embodiment of the present application.

[0055] Figure 6 FIG. 6 is a transmission manner schematic diagram provided by an embodiment of the present application.

[0056] Figure 7 FIG. 7 is a schematic flow chart of a method for transmitting data provided by an embodiment of the present application. DETAILED DESCRIPTION

[0057] The technical solutions in the present application will be described below with reference to the drawings.

[0058] The terminology used in the following embodiments is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to also include expressions such as “one or more,” unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, “at least one” and “one or more” refer to one, two, or more than two. The term “and / or” is used to describe the relationship between related objects, indicating that three relationships may exist; for example, A and / or B can indicate: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character “ / ” generally indicates that the preceding and following related objects are in an “or” relationship.

[0059] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0060] The following describes an electronic device, a user interface for such an electronic device, and embodiments for using such an electronic device. In some embodiments, the electronic device may be a portable electronic device that also includes other functions such as a personal digital assistant and / or music player, such as a mobile phone, tablet computer, wearable electronic device with wireless communication capabilities (such as a smartwatch), etc. Exemplary embodiments of the portable electronic device include, but are not limited to, carrying... Alternatively, it can be a portable electronic device with another operating system. The aforementioned portable electronic device can also be other portable electronic devices, such as laptops. It should also be understood that in some other embodiments, the aforementioned electronic device may not be a portable electronic device, but rather a desktop computer, smart screen, smart host, smart speaker, smart refrigerator, or other smart home device.

[0061] For example, Figure 1A structural diagram of the electronic device 100 is shown. The electronic device 100 can include a processor 110, an internal memory 121, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a microphone 170C, a sensor module 180, a camera 193, a display screen 194. The sensor module 180 can include an acceleration sensor 180E, a touch sensor 180K, and the like.

[0062] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0063] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices, or can be integrated into one or more processors.

[0064] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions.

[0065] The memory in the processor 110 can also be provided for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can be directly called from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thus improving the efficiency of the system.

[0066] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0067] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, etc.

[0068] The antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In some other embodiments, the antennas can be used in combination with a tuning switch.

[0069] The mobile communication module 150 can provide a solution including 2G / 3G / 4G / 5G wireless communication applied on the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert the signals into electromagnetic waves radiated by the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be arranged in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 can be arranged in the same device.

[0070] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal, after being processed by the baseband processor, is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the microphone 170C, etc.), or displays an image or a video through the display screen 194. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the processor 110 and be disposed in the same device as the mobile communication module 150 or other functional modules.

[0071] The wireless communication module 160 can provide a wireless communication solution applied to the electronic device 100, including wireless local area networks (WLAN) (such as a wireless fidelity (Wi-Fi) network), Bluetooth (BT), a global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), and the like. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, perform frequency modulation, amplification, and convert it into electromagnetic wave radiation via the antenna 2.

[0072] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology.

[0073] The electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor, etc. 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 for graphics rendering. The processor 110 can include one or more GPUs that execute program instructions to generate or change display information.

[0074] The display 194 is configured to display images, videos, and the like. The display 194 includes a display panel. In some embodiments, the electronic device 100 can include one or N displays 194, where N is a positive integer greater than 1.

[0075] The ISP is configured to process data fed back by the camera 193. In some embodiments, the ISP can be disposed in the camera 193.

[0076] The camera 193 is configured to capture still images or videos. An object projects an optical image through a lens to a photosensitive element. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard format, such as RGB, YUV, or the like. In some embodiments, the electronic device 100 can include one or N cameras 193, where N is a positive integer greater than 1.

[0077] The digital signal processor is configured to process digital signals, in addition to processing digital image signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is configured to perform Fourier transform on the energy of the frequency point, and the like.

[0078] The video codec is configured to compress or decompress digital videos. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats.

[0079] The NPU is a neural-network (NN) computing processor. By drawing on the structure of a biological neural network, such as the transmission mode between human brain neurons, the NPU can quickly process input information and can also constantly self-learn. Through the NPU, the electronic device 100 can implement intelligent cognition and other applications.

[0080] The internal memory 121 can be configured to store computer-executable program code including instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function), and the like. The data storage area can store data (such as audio data) created during use of the electronic device 100, and the like. In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, and the like.

[0081] The electronic device 100 can implement an audio function through the audio module 170, the speaker 170A, the microphone 170C, and the application processor, etc. For example, music playing, etc.

[0082] The audio module 170 is configured to convert digital audio information into an analog audio signal output, and to convert an analog audio input into a digital audio signal. The audio module 170 can also be configured to encode and decode an audio signal. In some embodiments, the audio module 170 can be disposed in the processor 110, or some functional modules of the audio module 170 can be disposed in the processor 110.

[0083] The speaker 170A, also referred to as a “loudspeaker”, is configured to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0084] The microphone 170C, also referred to as a “microphone”, “microphone”, is configured to convert a sound signal into an electrical signal.

[0085] The touch sensor 180K, also referred to as a “touch panel”. The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also referred to as a “touch screen”. The touch sensor 180K is configured to detect a touch operation acting on or near the touch sensor 180K. The touch sensor can transmit the detected touch operation to the application processor to determine the touch event type. The visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, which is different from the position where the display screen 194 is located.

[0086] Figure 2 is a software structure block diagram of the electronic device 100 of the embodiments of the present application. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and the system library, and the kernel layer. The application layer can include a series of application packages.

[0087] As shown in Figure 2 , the application layer can include a camera, a user interface (UI), a third-party application, etc. Among them, the third-party application can include a gallery, a calendar, a map, etc.

[0088] The application framework layer provides an application programming interface (API) and programming framework for applications of the application layer. The application framework layer can include some pre-defined functions.

[0089] As shown in Figure 2 the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc.

[0090] The window manager is used to manage window programs. The window manager can acquire the size of the display screen, determine whether there is a status bar, lock the screen, and intercept the screen, etc. The content provider is used to store and acquire data, and make the data accessible to the application program. The data can include videos, images, audios, dialed and received calls, browsing history and bookmarks, phone books, etc.

[0091] The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build an application program. The display interface can be composed of one or more views.

[0092] The notification manager enables the application program to display notification information in the status bar, which can be used to convey a notification type of message, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the completion of downloading, message reminders, etc. The notification manager can also be a notification in the form of a chart or a scroll bar text appearing in the top status bar of the system, such as a notification of an application program running in the background, and can also be a notification in the form of a dialog window appearing on the screen. For example, prompting text information in the status bar, issuing a prompt sound, vibrating the electronic device, flashing the indicator light, etc.

[0093] The Android runtime includes a core library and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

[0094] The core library includes two parts: one part is the function function called by the java language, and the other part is the core library of Android.

[0095] The system library can include multiple functional modules. For example: a surface manager, media libraries, a three-dimensional graphics processing library (such as OpenGL ES), a two-dimensional graphics engine (such as SGL), etc.

[0096] The surface manager is used to manage the display subsystem and provides two-dimensional and three-dimensional layer fusion for multiple application programs.

[0097] The media library supports multiple commonly used audio, video format playback and recording, and static image files, etc. The media library can support multiple audio and video encoding formats.

[0098] The three-dimensional graphics processing library is used to implement three-dimensional graphics drawing, image rendering, composition, and layer processing, etc.

[0099] The two-dimensional graphics engine is a drawing engine for 2D drawing.

[0100] The kernel layer is a layer between hardware and software. The kernel layer at least contains display drivers, camera drivers, audio drivers, and sensor drivers.

[0101] The hardware layer can include various sensors, such as Figure 1 the various sensors introduced above.

[0102] With the development of science and technology, users usually have multiple electronic devices, for example, as shown in Figure 3 , a scenario for applying a data transmission method provided by an embodiment of the present application is shown. The multiple electronic devices can include mobile phone terminals, personal computers, and tablet computers, etc. In order to facilitate the work and study of users, the multiple electronic devices can be connected with each other, thereby realizing data synchronization, so that users can flexibly use different electronic devices to process data. However, there are multiple data synchronization modes, and different synchronization modes have different requirements for data consistency. Therefore, the present application provides a data transmission mode, which can provide appropriate data consistency for different synchronization modes, and determine appropriate data transmission modes in combination with the number of electronic devices and network status, thereby improving the user experience of the data synchronization process.

[0103] For example, the following introduces several common data synchronization modes in combination with Figure 4 . One data synchronization mode is a normal synchronization mode, which generally has low data consistency requirements. Another data synchronization mode is a collaborative synchronization mode, which generally has high data consistency requirements. In the data transmission scenario provided by the present application, data consistency can represent that the data on the multiple connected electronic devices maintains the same content and state. The low data consistency requirement (eventual consistency) can be understood as a delay of x seconds in data synchronization. The high data consistency requirement (strong eventual consistency) can be understood as a delay of hundreds of milliseconds in data synchronization.

[0104] As shown in Figure 4As shown in (a), a common synchronization method is illustrated, where a mobile terminal and a smart screen are connected for screen mirroring. Specifically, if both the mobile terminal and the smart screen support High Definition Multimedia Interface (HDMI), they can be connected via HDMI for screen mirroring. Alternatively, if both the mobile terminal and the smart screen support wireless screen mirroring, they can be connected wirelessly for screen mirroring. For example, if the mobile terminal and the smart screen are connected to the same local area network, screen mirroring can be achieved through system-level distributed soft bus technology, thereby realizing... Figure 4 The image displayed on the mobile terminal shown in (a) can be mirrored on the smart screen in real time. For example, the mobile terminal can use an application that supports screen mirroring (e.g., a video player, a conferencing application, etc.) to relay the mirrored content through a cloud server, sending the mirrored image to the smart screen, which can then display the image.

[0105] like Figure 4 As shown in (b), another common synchronization method is illustrated: the mobile terminal and the smart screen can synchronize data via a USB flash drive. This method requires manual operation by the user. For example, the user inserts a USB flash drive or other mobile storage device into the mobile terminal, copies the files in the folder to be synchronized (e.g., file 1, file 2, and file 3) to the mobile storage device, removes the mobile storage device from the mobile terminal, and inserts it into the smart screen device. The files are then moved from the mobile storage device to the smart screen, thus completing the data synchronization.

[0106] It should be noted that the above Figure 4 (a) and Figure 4 (b) exemplifies two common synchronization methods that allow data to be displayed from one electronic device to another, enabling users to process synchronized data on one or more electronic devices. For example, when using methods such as... Figure 4 When using the screen mirroring connection shown in (a), the smart screen can synchronously display images shared by the mobile terminal. When the user zooms in or out on the image on the mobile terminal, the image displayed on the smart screen will also zoom in or out synchronously. When using a method such as... Figure 4In the (b) of the U disk copy shown in the figure, the data is synchronized in the manner, the shared file from the mobile terminal is displayed on the smart screen, since the mobile terminal and the smart screen both have the file, the user can process the shared file on the mobile terminal or the electronic device. When the user processes the file 1 through the mobile terminal, the processed file 1 can be synchronized to the smart screen through the mobile storage device, so that the smart screen obtains the processed file 1; or when the user processes the file 2 through the smart screen, the processed file 2 can be synchronized to the mobile terminal through the mobile storage device, so that the mobile terminal obtains the processed file 2. It can be seen that the real-time synchronization of data cannot be realized through the mobile storage device. The above two data synchronization scenarios do not require high data consistency.

[0107] As shown in Figure 4 (c), a collaborative synchronization mode is shown, the mobile terminal is connected with the smart screen in collaboration, and the main interface of the mobile terminal is displayed on the smart screen. The user can control the interface of the mobile terminal on the smart screen, for example, the content can be freely dragged between the mobile terminal and the smart screen, so as to realize the dual-screen operation.

[0108] It should be noted that the collaborative synchronization is a distributed technology, which can realize cross-system and cross-device collaboration. After the multiple electronic devices are connected in collaboration, the data synchronization and resource sharing can be realized. At the same time, the multiple electronic devices can also complete the tasks of two electronic devices on one electronic device through one peripheral device.

[0109] For example, as shown in Figure 4 (d), a collaborative synchronization mode is shown, the tablet computer is connected with the personal computer in collaboration. The drawing application program is opened on the front end of the personal computer and the tablet computer, and the same picture content is displayed. After the tablet computer and the personal computer are connected in collaboration, the tablet computer can be used as an extension screen of the personal computer to expand the operation space and mode of the personal computer. The tablet computer and the personal computer can share the mouse and keyboard of the personal computer, and the tablet computer can control the synchronized data through the touch screen (finger or stylus). The mouse of the personal computer can realize the drag of data between the personal computer and the tablet computer, so that the data transmission is more convenient.

[0110] It should be noted that through the above Figure 4 (c) and Figure 4 (d) shown in the figure, the electronic device can synchronize the data to the device connected in collaboration in real time. It can be seen that in the collaborative synchronization scenario, multiple electronic devices need to open the same application program on the front end and process the synchronized data in real time, which requires high data consistency to meet the user's use experience in the collaborative synchronization scenario.

[0111] That is, in the common synchronization scenario, in order to save power consumption, it is unnecessary to use higher data consistency for data synchronization; but in the collaborative synchronization scenario, in order to improve the user experience, it is necessary to use higher data consistency for data synchronization. Therefore, in the method for transmitting data provided in the embodiments of the present application, according to the specific data synchronization scenario, the corresponding data consistency can be used for data synchronization processing.

[0112] It should be noted that when determining whether the current synchronization scenario is the collaborative synchronization scenario as shown in (c) of Figure 5 or (d) of Figure 5 , the synchronization information needs to be used for assistance, wherein the synchronization information includes device identification (ID), application program ID, data ID and the like. The data ID can be used to represent the information such as the page, picture, text and the like currently displayed (or opened) by the device. Each device in the collaborative scenario can determine that the current synchronization scenario is a collaborative scenario according to the synchronization information. Furthermore, after determining that the current synchronization scenario is a collaborative synchronization scenario, the number of current collaborative devices and / or the network state need to be determined. The collaborative synchronization scenario requires at least two electronic devices to collaborate; the network state includes near field communication and / or far field communication. The specific manner of determining the collaborative synchronization scenario, the number of collaborative devices and the network state will be described in detail below. Figure 5 .

[0113] As shown in Figure 4 , a network scenario schematic diagram is shown. In this network scenario, device A and device B are in the same local area, and the collaborative scenario, the number of collaborative devices and the network state of the collaborative device can be determined through the local area network.

[0114] It should be noted that the local area network is a regional network formed in a local area, and the local area network can cover a limited area, but the transmission speed is faster, the performance is stable, and the framework is simple compared with other networks. The local area network includes a wired local area network and a wireless local area network (WLAN), wherein the implementation protocols of the wireless local area network are numerous, and the most widely used at present is Wi-Fi. A router can be used to form a wireless local area network with multiple devices having wireless functions. For example, in a home scenario, a small wireless local area network can be formed by using a router. The wired local area network can use various transmission technologies, and in general, the devices in the wired local area network can communicate and interact through copper wires, optical fibers and the like as transmission media.

[0115] For example, as shown in Figure 4As shown, Device A and Device B belong to the same local area network (LAN). Device A and Device B can report their synchronization information to the server on this LAN. For example, Device A reports its ID and the ID of the application running in front of Device A (e.g., ...). Figure 5 (d) shows the drawing application) and the data ID (e.g., such as Figure 5 (See the specific image shown in (d)). Similarly, device B will also report its device ID, application ID, and data ID to the server on the local area network.

[0116] Device A and Device B can also download synchronization information from other devices on the local area network (LAN) server. For example, Device A downloads Device ID, Application ID, and Data ID of Device B from the LAN server, and Device B downloads Device ID, Application ID, and Data ID of Device A from the LAN server. When the Application ID of Device B matches the Application ID of Device A, it indicates that the same application is open or displayed on the front end of both Device A and Device B. When the Data ID of Device B matches the Data ID of Device A, it indicates that the same data (e.g., pages, images, or text) is open or displayed on the front end of both Device B and Device A. In other words, when Device A and Device B are connected to the same LAN via wired or wireless means, they can exchange synchronization information through the LAN server. This method of exchanging synchronization information through a server can also be understood as an end-to-cloud approach.

[0117] Device A can determine whether to synchronize with Device B, the number of devices synchronizing with Device A, and the network status based on synchronization information. For example, based on the synchronization information downloaded from Device B, Device A learns that Device B and Device A's front-end have the same application open or displayed, and that Device B and Device A's front-end have the same data open or displayed, thus determining to synchronize with Device B. Device A only learns from the local area network server that Device B is synchronizing with it, determining that the number of synchronizing devices is 2 (including Device A and Device B), and identifying the device ID of Device B synchronizing with Device A. Furthermore, since Device A and Device B are both connected to the same local area network server, which stores the device IDs of Device A and Device B, the local area network server can be used to determine that Device A and Device B are in a near-field network state. Similarly, Device B can also determine whether to synchronize with Device A, the number of devices synchronizing with Device B, and the network status based on synchronization information.

[0118] In addition, such as Figure 6As shown, in addition to the device A and the device B in the same local area network, the device C and the device D outside the local area network are also included. The device C can communicate with the device A and the device B in the local area network through the cloud server. The device C can report its own synchronization information to the cloud server, and the device A and the device B can also report their own synchronization information to the cloud server. Each device respectively downloads the synchronization information of other devices from the cloud server, and determines whether it is a collaborative synchronization scenario, the number of collaborative synchronization devices and the network state according to the synchronization information. For example, the device C downloads the synchronization information of the device A and the device B from the cloud server, determines that the device C and the device A and B front-end open or display the same application program and data, and therefore determines that the current synchronization scenario is a collaborative synchronization scenario, and the number of collaborative devices is 3 (including the device A, the device B and the device C). Since the device C exchanges the synchronization information with the device A and the device C through the cloud server, the device C and the device A or the device B are in a far-field network state, and for the device A, the device B and the device C, the device A and the device B are in a near-field network state. It can be seen that the network states of the device A, the device B and the device C include near field and far field. This way of exchanging synchronization information through the cloud server can also be understood as an end-to-cloud way. For another example, the device D can exchange its own synchronization information with the device C through a device-to-device (D2D) communication mode, and the device D can also determine the synchronization scenario, the number of collaborative devices and the network state based on the synchronization information. This way of directly exchanging synchronization information between devices can be understood as an end-to-end way.

[0119] It should be noted that each of the above devices can send its own synchronization information to the server or to other devices. It can be understood that when the device opens a collaborative application (such as a drawing application), the device can send its own synchronization information. Alternatively, in order to save power consumption, the device can send the synchronization information after the data is updated when the data changes. For example, the device displays a picture of a drawing application, and when the user modifies the picture through the device, the device can upload the modified data ID to the cloud server, wherein the modified data ID can represent the modified picture.

[0120] It should be noted that in the collaborative synchronization scenario, the number of collaborative devices is at least two. The number of collaborative devices and the network state of the collaborative devices (including near field, far field, or near field and far field) are determined by querying the device ID in the near-field networking (such as a local area network). For example, as shown in FIG. 1, the device A and the device B are in the same local area network, and the device C and the device D are outside the local area network. The device A and the device B can exchange their own synchronization information through the local area network, and the device C and the device D can exchange their own synchronization information through the cloud server. The device A and the device B can also exchange their own synchronization information through the cloud server, and the device C and the device D can also exchange their own synchronization information through the local area network. The device A and the device B can also exchange their own synchronization information through the device-to-device (D2D) communication mode, and the device C and the device D can also exchange their own synchronization information through the D2D communication mode. Figure 6As shown, device A and device B are within a local area network (LAN). Device A and device B are in a near-field network state, while device C is not within the LAN and is in a far-field network state relative to device A or device B. Here, "near-field" and "far-field" are relative concepts in terms of communication distance. Simply put, if two devices are close to each other, it is likely a near-field network state; if two devices are far apart, it is likely a far-field network state.

[0121] Furthermore, in collaborative synchronization scenarios, the preferred data transmission method can be determined based on the number of collaborative devices and network status. The following section will combine... Figure 6 The method for determining the optimal transmission strategy will be introduced.

[0122] like Figure 6 As shown in (a), a data transmission method between two cooperating devices is illustrated. When device A and device B are in a near-field network (NFC) state, data transmission can be performed end-to-end. That is, device A and device B communicate and interact directly, and device A can directly transmit data to device B. In the scenario of two cooperating devices in a NFC state, device A completes data synchronization with a hop count of 1. Simply put, device A needs 1 hop to transmit data to device B to complete the data synchronization process.

[0123] For example, this end-to-end approach can specifically employ a distributed soft bus. A distributed soft bus provides unified distributed communication capabilities for seamless interconnection between devices, enabling rapid discovery and interconnection, thus efficiently transmitting tasks and data. HarmonyOS connects different devices through distributed soft bus technology, enabling efficient and convenient communication between multiple devices using various communication methods, allowing users to use "a single device." The distributed soft bus logically comprises four parts: discovery, connection, networking, and transmission. These four parts can collaborate within the business logic, achieving the goal of distributed soft bus communication by constructing a distributed communication framework. The following is a brief introduction to the four parts of a distributed soft bus:

[0124] 1. Discovery

[0125] Through the discovery technology of the distributed soft bus, any device can discover the existence of distributed devices in its vicinity. Any device can be an active discoverer, a passive discoverer, or both.

[0126] Specifically, the distributed soft bus discovery technology supports discovering devices through different media such as Bluetooth, Ethernet, and Wi-Fi; it supports selecting the appropriate discovery media based on the capabilities of different devices; and it supports providing appropriate discovery strategies such as discovery frequency and scanning cycle based on the characteristics of the devices and business needs.

[0127] 2. Connection

[0128] Through the connection technology of the distributed soft bus, any device can connect to other distributed devices in the periphery. The distributed soft bus selects the appropriate communication medium and the most appropriate communication connection technology according to the capabilities and business needs of the distributed devices. A communication link is established between the devices to facilitate subsequent networking and transmission.

[0129] 3. Networking

[0130] Through the distributed networking technology, any device can form a network by grouping distributed devices with different communication capabilities. Networking enables the distributed device network to be not limited to single or one-to-one communication connection relationships. Distributed networking can group the devices involved in the current scenario (home scenario, industrial manufacturing scenario, etc.) into a dynamic network.

[0131] In the dynamic network of networking, the communication capabilities and business capabilities of each device can be effectively managed. When any device in the network has a business need, the device can provide information about the device that meets the business needs at any time through the network of the distributed soft bus, and support the establishment of a business channel.

[0132] 4. Transmission

[0133] Through the transmission technology of the distributed soft bus, any device in the current scenario can be provided with the transmission capability of business data. The transmission technology of the distributed soft bus can abstract the business data and the quality of service (QoS), and provide appropriate transmission services according to the network load and the capabilities of the devices. This transmission technology can ensure the communication appeal of a single business while ensuring the transmission quality of multiple businesses in the entire distributed network.

[0134] It can be understood that, Figure 6 The two collaborative devices shown in (a) are in a near-field network state, and data transmission through the distributed soft bus can be preferred. If transmission is performed through a cloud server, the number of hops for device A to complete data synchronization is 2. In simple terms, device A needs to first send data to the cloud server, and then the cloud server sends data to device B, thereby completing data transmission. As can be seen, when the two collaborative devices are in a near-field network state, the number of hops required for data transmission through the distributed soft bus is obviously less. The fewer the number of hops, the fewer the resources required for data transmission, and the lower the latency. Therefore, in certain scenarios, the transmission method with fewer hops is preferred.

[0135] When device A and device B are in a far-field network state, the distributed soft bus technology may not be sufficient to meet the current data transmission requirements. Therefore, data transmission needs to be handled through a cloud server. That is, device A sends data to the cloud server, and the cloud server forwards the data to device B. In this scenario, device A completes data synchronization with a hop count of 2. It is evident that even with the same number of cooperating devices, different data transmission methods may be used (for example, two cooperating devices in a near-field network state may use distributed soft bus technology to transmit data; two cooperating devices in a far-field network state may transmit data through a cloud server).

[0136] like Figure 6 As shown in (b), a data transmission method involving three coordinating devices is illustrated. When devices A, B, and C are in a near-field network (NFC) state, data transmission can be performed end-to-end. That is, devices A, B, and C can communicate and interact directly; device A can directly transmit data to device B or directly to device C. In this scenario with three coordinating devices in a NFC state, the number of hops required for device A to synchronize data to the other two coordinating devices is 2. Simply put, the process of device A transmitting data to device B is 1 hop, the process of device A transmitting data to device C is 1 hop, and the total number of hops required for device A to complete data synchronization is 2.

[0137] like Figure 6 As shown in (c), a data transmission method for three coordinating devices is illustrated, which is similar to... Figure 6 The scenario shown in (b) is different. Figure 6 (c) shows a far-field network configuration for the three collaborating devices. Therefore, an end-to-end approach (e.g., a distributed soft bus) is not suitable for scenarios involving three collaborating devices in a far-field network. Thus, data transmission can be accomplished using the forwarding functionality of a cloud server. For example, device A sends data to the cloud server, which can then distribute the data to devices B and C. It is evident that the process of uploading data to the cloud server requires one hop, the process of the cloud server distributing data to the collaborating devices requires one hop, and the total time required for device A to complete data synchronization is two hops.

[0138] like Figure 6As shown in (d), a data transmission method involving four coordinating devices is illustrated. When devices A, B, C, and D are in a near-field network, data transmission can be performed end-to-end. That is, devices A, B, C, and D can communicate directly with each other, and device A can transmit data to each of devices B, C, and D. When the four coordinating devices transmit data end-to-end, the number of hops required for device A to synchronize data to the other three coordinating devices is 3. Simply put, the process of device A transmitting data to device B is 1 hop, the process of device A transmitting data to device C is 1 hop, and the process of device A transmitting data to device D is 1 hop; the total number of hops required for device A to complete data synchronization is 3.

[0139] like Figure 6 As shown in (e), a data transmission method for four coordinating devices is illustrated, which is consistent with... Figure 7 The data transmission method described in (d) is different from that described in the previous one. Figure 3 (e) illustrates one end-to-end cloud data transmission method, where data synchronization is achieved through forwarding from a cloud server. When four collaborative devices use this end-to-end cloud method for data transmission, device A requires 2 hops to synchronize data to the other three collaborative devices. Simply put, the process of device A sending data to the cloud server is 1 hop, the process of the cloud server distributing data to the collaborative devices (devices B, C, and D) requires 1 hop, and device A requires a total of 2 hops to complete the data synchronization process.

[0140] It's important to note that when transmitting data end-to-end, the more cooperating devices there are, the more hops are required to complete the data transmission, meaning more data forwarding. Therefore, for near-field network conditions, it's not simply a matter of using end-to-end data transmission; the number of cooperating devices must also be considered. For example, the aforementioned... Figure 5 As described in (e), the number of hops required for data transmission by four coordinating devices in a near-field network (2 hops) using an end-to-cloud approach is significantly less than the number of hops required by an end-to-end approach (3 hops). In other words, when determining the preferred data transmission method (data transmission strategy), it is necessary to determine the number of data forwarding steps (hops) based on the number of coordinating devices and the network status. Selecting the data transmission method with fewer data forwarding steps as the preferred method can reduce latency and save power during data transmission.

[0141] It should be noted that in collaborative synchronization scenarios, the number of collaborative devices and the network status may change dynamically. Therefore, the data transmission method can also change with the number of collaborative devices and / or the network status, so that the data transmission method can be best suited to the current collaborative synchronization scenario.

[0142] As shown in Figure 5 , a method for transmitting data is shown, which can be applied to the scenario as shown in Figure 5 . The method will be described in detail below.

[0143] S701, in response to opening the collaborative application, receiving at least one second synchronization information.

[0144] It should be noted that the at least one second synchronization information is the synchronization information of at least one second electronic device, and the second electronic device is other electronic device except the first electronic device, and the at least one second synchronization information corresponds to the at least one second electronic device one by one. The synchronization information includes electronic device ID, ID of the collaborative application and data ID. The data ID is used to represent the data displayed by the electronic device.

[0145] For example, the collaborative application can be a drawing application, a file application and other application supporting collaborative synchronization function, and the data ID can be used to represent the page, picture, text and other information currently displayed (or opened) by the electronic device.

[0146] It should be noted that the first electronic device can send the first synchronization information to the at least one second electronic device, or send the first synchronization information to the cloud server in response to the user's operation of opening the collaborative application. At the same time, the first electronic device can receive at least one second synchronization information from the at least one second electronic device, or receive at least one second synchronization information from the cloud server. The first synchronization information is the synchronization information of the first electronic device.

[0147] It can be understood that the device which interacts with the first electronic device with the first synchronization information and the second synchronization information is the cloud server or other electronic device, which can depend on the current network state.

[0148] For example, when the first electronic device and the second electronic device correspond to device A and device B as shown in Figure 5 , respectively, which belong to the same local area network, when the user opens the collaborative application on the first electronic device, the first electronic device reports the first synchronization information to the local area network server, the second electronic device reports the second synchronization information to the local area network server, and at the same time, the first electronic device downloads the second synchronization information from the local area network server, and the second electronic device downloads the first synchronization information from the local area network server. For another example, the first electronic device and the second electronic device correspond to device A and device B as shown in Figure 6The device A and the device C shown do not belong to the same local area network, and the device C communicates with the device A through a cloud server. When a user opens a collaborative application on a first electronic device, the first electronic device reports first synchronization information to the cloud server, and a second electronic device reports second synchronization information to the cloud server. At the same time, the first electronic device downloads the second synchronization information from the cloud server, and the second electronic device downloads the first synchronization information from the cloud server. For another example, when the first electronic device and the second electronic device correspond to the first electronic device and the second electronic device, respectively, as shown in FIG. 1C, the first electronic device and the second electronic device communicate with each other in an end-to-end manner. When a user opens a collaborative application on a first electronic device, the first electronic device and the second electronic device exchange synchronization information with each other. Figure 6 The device C and the device D shown, the first electronic device and the second electronic device communicate with each other in an end-to-end manner. When a user opens a collaborative application on a first electronic device, the first electronic device and the second electronic device exchange synchronization information with each other.

[0149] It should be noted that when the collaborative application is opened, the uploading and downloading of the synchronization information can be triggered; or, in order to save power consumption, the updated synchronization information can be transmitted when the data changes. For example, the first electronic device displays a picture of a drawing application, and when the user reduces the picture through the first electronic device, the first electronic device can upload the modified data ID to the cloud server, wherein the modified data ID can represent the reduced picture.

[0150] S702, determining whether the first electronic device and the at least one second electronic device are synchronized according to at least one second synchronization information.

[0151] For example, the first electronic device can be synchronized with the at least one second electronic device, or normally synchronized.

[0152] S703, when the first electronic device and the at least one second electronic device are synchronized, determining a first transmission data mode according to the number of second electronic devices and / or the network state of the first electronic device and the second electronic device.

[0153] It should be noted that before determining the first transmission data mode according to the number of second electronic devices and / or the network state of the first electronic device and the second electronic device, the first electronic device can determine the number of second electronic devices according to at least one second synchronization information, and determine the network state of the first electronic device and the second electronic device according to at least one second synchronization information.

[0154] It should be noted that when the first electronic device receives one second synchronization information, the first electronic device can determine that the number of second electronic devices is 1; when the first electronic device receives two second synchronization information, the first electronic device can determine that the number of second electronic devices is 2. That is, the first electronic device can determine the number of second electronic devices according to the number of received second synchronization information, and since the synchronization information includes the electronic device ID, the first electronic device can also determine the second electronic device ID corresponding to the second synchronization information according to the electronic device ID in the second synchronization information.

[0155] It should be noted that the network state includes near field communication, far field communication, or near field communication and far field communication. Simply put, near field and far field can be a relative concept in communication distance. Two electronic devices are close in distance, which may be a near field network state; two electronic devices are far apart, which may be a far field network state. When the first electronic device synchronizes with at least two second electronic devices, both near field and far field network states may exist. For example, as shown in Figure 6 , the first electronic device corresponds to device C, one of the second electronic devices corresponds to device D, and the other second electronic device corresponds to device A. As can be seen, device C and device D are in a near field network state, and device A and device C or device D are in a far field network state. The network state of device A, device C and device D includes near field network state and far field network state.

[0156] Optionally, before determining the number of second electronic devices according to at least one second synchronization information, the first electronic device determines that the first electronic device synchronizes with at least one second electronic device according to the fact that the ID of the collaborative application in the first synchronization information is consistent with the ID of the collaborative application in at least one second synchronization information, and the data ID in the first synchronization information is consistent with the data ID in at least one second synchronization information.

[0157] That is, when the first electronic device and the second electronic device have the same collaborative application displayed on the front end and have the same data displayed, it can be considered that the first electronic device and the second electronic device are in a collaborative synchronization scenario. In the collaborative synchronization scenario, the first electronic device and the second electronic device synchronize data, share resources, and at the same time, multiple electronic devices in collaborative synchronization can also complete the task of two electronic devices on one electronic device through an external device (for example, a mouse, a keyboard).

[0158] It can be understood that the content displayed by the first electronic device in collaborative synchronization is consistent with the content displayed by the second electronic device. When the content displayed on one of the electronic devices changes, the content displayed on the other electronic device will also change accordingly.

[0159] S704, transmits data to be synchronized with at least one second electronic device via a first data transmission method.

[0160] It should be noted that before the first electronic device and the second electronic device transmit the data to be synchronized, the method of data transmission needs to be determined. The basis for determining the data transmission method includes at least one of the following: the number of second electronic devices and the network status. The data transmission method can be understood as a data transmission strategy, which may include end-to-end transmission and end-to-cloud transmission.

[0161] For example, when the number of second electronic devices is 1 and the network state of the first electronic device and the second electronic device is a near-field network state, the data to be synchronized is sent to the third electronic device, which is one of at least one second electronic device.

[0162] It should be noted that when the number of second electronic devices is 1, the number of collaborating devices is 2, including the first electronic device and the third electronic device. Furthermore, when the first and third electronic devices are in a near-field network state, data can be transmitted directly end-to-end. That is, the first electronic device directly sends the data to be synchronized to the third electronic device.

[0163] For example, such as Figure 6 As shown in (a), the first electronic device corresponds to device A, and the third electronic device corresponds to device B. Device A and device B communicate and interact directly. That is, in a scenario with two cooperating devices and a near-field network, device A completes data synchronization with a hop count of 1. Of course, for device B, device B also completes data synchronization with a hop count of 1.

[0164] For example, two coordinating devices in a near-field network state can preferably transmit data via a distributed soft bus.

[0165] In contrast, if two coordinating devices in a near-field network choose to transmit data via server forwarding, the first electronic device requires only 2 hops to complete data synchronization. That is, the first electronic device needs to send the data to be synchronized to the server, which then forwards it to the third electronic device. Clearly, in a near-field network with two coordinating devices, transmitting data via a distributed soft bus requires fewer hops. Fewer hops mean less resources are needed for data transmission, and latency is lower. Therefore, in certain scenarios, the data transmission method with fewer hops is preferred.

[0166] For example, when the number of second electronic devices is 1 and the network status of the first electronic device and the second electronic device is a far-field network status, the data to be synchronized is sent to the third electronic device through the server, and the third electronic device is one of at least one second electronic device.

[0167] It should be noted that when the number of second electronic devices is 1, the number of collaborating devices is 2, including both the first and third electronic devices. Furthermore, when the first and third electronic devices are in a far-field network state, data cannot be transmitted end-to-end; instead, an end-to-cloud approach can be used. That is, the first electronic device forwards the data to be synchronized to the third electronic device through a server. In the far-field network state of the two collaborating devices, the first electronic device completes data synchronization with a hop count of 2. Therefore, even if the number of collaborating devices is the same, different data transmission methods may be used. (For example, two collaborating devices in a near-field network state may use distributed soft bus technology to transmit data; two collaborating devices in a far-field network state may transmit data through a cloud server.)

[0168] For example, when the number of second electronic devices is 2, and the network state of the first electronic device and the second electronic device is a near-field network state, the data to be synchronized is sent to the third electronic device and the fourth electronic device, and the third electronic device and the fourth electronic device belong to at least one second electronic device.

[0169] It should be noted that when the number of second electronic devices is two, the number of collaborating devices is three, including the first, third, and fourth electronic devices. Furthermore, when the first, third, and fourth electronic devices are in a near-field network state, data can be transmitted directly end-to-end. That is, the first electronic device directly sends the data to be synchronized to the third and fourth electronic devices.

[0170] For example, such as Figure 6 As shown in (b), the first electronic device corresponds to device A, the third electronic device corresponds to device B, and the fourth electronic device corresponds to device C. Devices A, B, and C communicate and interact directly. That is, in a scenario with three coordinating devices and a near-field network, device A completes data synchronization in 2 hops. Of course, the data synchronization hops for devices B and C are also 2.

[0171] For example, when the number of second electronic devices is 2, and the network status of the first electronic device and the second electronic device is a far-field network status, the data to be synchronized is sent to the third electronic device and the fourth electronic device through the cloud server, and the third electronic device and the fourth electronic device belong to at least one second electronic device.

[0172] It should be noted that when the number of second electronic devices is two, the number of collaborating devices is three, including the first, third, and fourth electronic devices. Furthermore, when the first, third, and fourth electronic devices are in a far-field network state, data can be transmitted via an end-to-cloud approach. That is, the first electronic device forwards the data to be synchronized to the third and fourth electronic devices through a server.

[0173] For example, such as ​ As shown in (c), the first electronic device corresponds to device A, the third electronic device corresponds to device B, and the fourth electronic device corresponds to device C. Devices A, B, and C communicate and interact through a server. That is, in a scenario with three coordinating devices and a far-field network, device A completes data synchronization with 2 hops. Similarly, the data synchronization hops for devices B and C are also 2.

[0174] It is evident that for the three collaborative devices, regardless of whether they are in near-field or far-field network conditions, both the end-to-end data transmission method and the end-to-cloud data transmission method require two hops.

[0175] For example, when the number of second electronic devices is 3, the data to be synchronized is sent to the third, fourth, and fifth electronic devices through the server, wherein the third, fourth, and fifth electronic devices belong to at least one second electronic device.

[0176] It should be noted that when the number of second electronic devices is 3, the number of collaborating devices is 4, including the first, third, fourth, and fifth electronic devices. For the collaborative synchronization scenario of these four devices, regardless of whether it's a near-field or far-field network, data can be transmitted via an edge-cloud approach. That is, the first electronic device forwards the data to be synchronized to the third, fourth, and fifth electronic devices through a server.

[0177] For example, such as ​ As shown in (d), the first electronic device corresponds to device A, the third electronic device corresponds to device B, the fourth electronic device corresponds to device C, and the fifth electronic device corresponds to device D. In a near-field network scenario with four coordinating devices, data is transmitted end-to-end, and device A completes data synchronization with 3 hops. Similarly, the data synchronization hop count for devices B, C, and D is also 3. ​As shown in (e) in FIG. 1, the first electronic device corresponds to device A, the third electronic device corresponds to device B, the fourth electronic device corresponds to device C, and the fifth electronic device corresponds to device D. In the scenario of four collaborative devices, whether in a near-field network or a far-field network, the data is transmitted in an end-cloud manner, and the number of hops for device A to complete data synchronization is 2. Of course, for device B, device C, and device D, the number of hops to complete data synchronization is also 2.

[0178] It should be noted that the end-cloud manner can be applied to the near-field network state and the far-field network state. When the number of collaborative devices is greater than or equal to 4, whether in a near-field network state or a far-field network state, the end-cloud manner can be used for data transmission to ensure that the number of data forwarding times (the number of hops) is small during data transmission, thereby reducing transmission delay and power consumption.

[0179] In addition, when the first electronic device is normally synchronized with at least one second electronic device, the first electronic device transmits the to-be-synchronized data to the at least one second electronic device by using a second data transmission manner.

[0180] It should be noted that normal synchronization can be screen projection connection or U disk synchronization or other synchronization manners with low data consistency requirements.

[0181] It can be understood that the data consistency requirement of the first data transmission manner is higher than that of the second data transmission manner. The high and low of the data consistency requirement can be reflected by the data synchronization delay. The delay of the transmission manner with high data consistency requirement is lower than that of the transmission manner with low data consistency requirement.

[0182] For example, the data consistency of the first data transmission manner is strong eventual consistency, and the data synchronization delay is in the order of milliseconds. The data consistency of the second data transmission manner is eventual consistency, and the data synchronization delay is in the order of x seconds.

[0183] That is, when the electronic device is in a collaborative synchronization scenario, using a transmission manner with high data consistency can help improve the user experience of the data synchronization process.

[0184] It should be noted that based on the first data transmission manner determined in the above steps, strong eventual consistency data synchronization between electronic devices in a collaborative synchronization scenario can be implemented. Of course, based on the second data transmission manner determined in the above steps, eventual consistency data synchronization between electronic devices in a normal synchronization scenario can also be implemented.

[0185] The embodiments provided in the application can determine whether multiple electronic devices are in a cooperative synchronization scene, and determine a specific data transmission mode (transmission strategy) based on the number of electronic devices and / or network status in the cooperative synchronization scene, and the data transmission mode in the cooperative synchronization scene has high data consistency, so that the data synchronization in the cooperative synchronization scene has low latency, low power consumption and high efficiency, and good user experience is ensured.

[0186] The embodiments provided in the application provide a computer program product, when the computer program product runs on a device, causes the device to execute the technical solutions in the above embodiments. The implementation principle and technical effects are similar to those of the above method-related embodiments, and will not be repeated here.

[0187] The embodiments provided in the application provide a readable storage medium, which contains instructions, when the instructions run on a device, causes the device to execute the technical solutions of the above embodiments. The implementation principle and technical effects are similar, and will not be repeated here.

[0188] The embodiments provided in the application provide a chip, which is used to execute instructions, when the chip runs, executes the technical solutions in the above embodiments. The implementation principle and technical effects are similar, and will not be repeated here.

[0189] Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solutions. 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 the embodiments of the application.

[0190] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the above-described devices and units (modules) can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

[0191] In several embodiments provided in the application, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the apparatus embodiments described above are only schematic. For example, the division of the units is only a logical function division, and actual implementation can have another division manner. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.

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

[0193] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.

[0194] The above functions, if realized in the form of software functional units and sold or used as independent products, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of software products, and the computer software products are stored in a storage medium, including a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.

[0195] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method of transmitting data, characterized by, The method is applied to a first electronic device, and the method comprises: in response to opening a collaborative application, receiving at least one second synchronization information, the at least one second synchronization information being synchronization information of at least one second electronic device, the at least one second synchronization information corresponding to the at least one second electronic device one by one; determining, according to the at least one second synchronization information, whether the first electronic device and the at least one second electronic device are collaboratively synchronized, the collaborative synchronization indicating that the first electronic device and the second electronic device both open the same collaborative application in front ends; when the first electronic device and the at least one second electronic device are collaboratively synchronized, determining a first transmission data mode according to a number of the second electronic devices and / or a network state of the first electronic device and the second electronic device, wherein the first transmission data mode comprises end-end synchronization and end-cloud synchronization; transmitting, through the first transmission data mode, to-be-synchronized data to the at least one second electronic device.

2. The method of claim 1, wherein, The synchronization information comprises an electronic device identifier (ID), an ID of the collaborative application, and a data ID, the data ID being used to represent data displayed by the electronic device.

3. The method of claim 1, wherein, Before the step of determining the first transmission data mode according to the number of the second electronic devices and / or the network state of the first electronic device and the second electronic device, the method further comprises: determining, according to the at least one second synchronization information, the number of the second electronic devices, and determining, according to the at least one second synchronization information, the network state of the first electronic device and the second electronic devices.

4. The method of claim 3, wherein, Before the step of determining the number of the second electronic devices according to the at least one second synchronization information, the method further comprises: when the ID of the collaborative application in the first synchronization information is consistent with the ID of the collaborative application in the at least one second synchronization information, and the data ID in the first synchronization information is consistent with the data ID in the at least one second synchronization information, determining that the first electronic device and the at least one second electronic device are collaboratively synchronized, wherein the first synchronization information is synchronization information of the first electronic device.

5. The method according to claim 3 or 4, characterized in that, when the number of the second electronic devices is 1, and the network state of the first electronic device and the second electronic device is a near-field network state, the step of transmitting, through the first transmission data mode, to-be-synchronized data to the at least one second electronic device comprises: sending the to-be-synchronized data to a third electronic device, the third electronic device being one of the at least one second electronic device.

6. The method according to claim 3 or 4, characterized in that, when the number of the second electronic devices is 1, and the network state of the first electronic device and the second electronic device is a far-field network state, the step of transmitting, through the first transmission data mode, to-be-synchronized data to the at least one second electronic device comprises: sending, through a server, the to-be-synchronized data to a third electronic device, the third electronic device being one of the at least one second electronic device.

7. The method according to claim 3 or 4, characterized in that, when the number of the second electronic devices is 3, the step of transmitting, through the first transmission data mode, to-be-synchronized data to the at least one second electronic device comprises: The to-be-synchronized data is sent to a third electronic device, a fourth electronic device and a fifth electronic device through the server, wherein the third electronic device, the fourth electronic device and the fifth electronic device belong to the at least one second electronic device.

8. The method according to any one of claims 1 to 4, characterized in that, The method further comprises: When the first electronic device is normally synchronized with the at least one second electronic device, the to-be-synchronized data is transmitted to the at least one second electronic device through a second data transmission manner; The time delay of the first data transmission manner is lower than that of the second data transmission manner.

9. An electronic device, comprising: The electronic device is a first electronic device, comprising: one or more processors; one or more memories; The one or more memories store one or more computer programs, and the one or more computer programs comprise instructions which, when executed by the one or more processors, cause the electronic device to perform the method of any one of claims 1 to 8.

10. An apparatus for transmitting data, the apparatus comprising: A processor coupled with a memory, the memory for storing a computer program, the processor for running the computer program, so that the data transmission device performs the method of any one of claims 1 to 8.

11. A computer readable storage medium, characterized in that, A computer program stored thereon, which is executed by a computer to cause the computer to implement the method of any one of claims 1 to 8.

12. A chip, characterized by The chip comprises a processor and a data interface, and the processor reads instructions stored on the memory through the data interface to execute the method of any one of claims 1 to 8.

Citation Information

Patent Citations

  • Data synchronization method and electronic device

    CN105681393A

  • Screen broadcasting method, device, system, electronic equipment and storage medium

    CN110752999A

  • Method and device for cooperative work of applications between devices

    CN115147056A