Data transmission method, electronic equipment and system

By selecting the data transmission method according to the number of electronic devices and network status in the collaborative synchronization scenario, the problem of low data transmission efficiency in the prior art is solved, low latency and high efficiency data transmission are achieved, and user experience is improved.

CN119728708AActive Publication Date: 2025-03-28HUAWEI TECH CO LTD

Patent Information

Application Number
CN202311261294.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-27
Publication Date
2025-03-28
Estimated Expiration
2043-09-27

AI Technical Summary

Technical Problem

The prior art is difficult to provide an efficient way to transmit data to improve the user's experience of processing tasks through multiple electronic devices.

Method used

In the collaborative synchronization scenario, the specific data transmission method is determined based on the number of electronic devices and network status, including end-end mode and end-cloud mode, to ensure low latency, low power consumption and high efficiency of data synchronization.

Benefits of technology

It realizes low-latency and high-efficiency data transmission in collaborative synchronization scenarios, improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728708A_ABST
    Figure CN119728708A_ABST
Patent Text Reader

Abstract

The invention provides a data transmission method, electronic equipment and a data transmission system. The method is applied to a first electronic device and comprises the steps that in response to opening of a collaborative application, second synchronization information is received, and the second synchronization information is synchronization information of a second electronic device; according to the second synchronization information, determining whether the first electronic equipment and at least one second electronic equipment are coordinated and synchronized; when the first electronic equipment and the second electronic equipment are collaboratively synchronized, determining a first data transmission mode according to the number of the second electronic equipment and / or network states of the first electronic equipment and the second electronic equipment; and transmitting the to-be-synchronized data with the second electronic equipment in the first data transmission mode. According to the data transmission method, the electronic equipment and the system, whether the current scene is the collaborative synchronization scene or not can be automatically identified, and the specific data transmission mode is determined based on the number of the electronic equipment and / or the network state in the collaborative synchronization scene, so that the use experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of electronic devices, and in particular, to a method, electronic device, and system for transmitting data. Background Art

[0002] With the development of science and technology, users can complete work or study tasks through multiple electronic devices, and the task processing of multiple electronic devices needs to be based on data transmission. Among them, factors such as the efficiency and method of data transmission affect the user's experience of processing tasks through electronic devices.

[0003] Therefore, how to provide an efficient way to transmit data to improve user experience is a problem that needs to be solved urgently. Summary of the invention

[0004] The present application provides a method, electronic device and system for transmitting data, which can provide an efficient data transmission method in a collaborative synchronization scenario and improve user experience.

[0005] In a first aspect, a method for transmitting data is provided, which is applied to a first electronic device, and the method includes: in response to opening a collaborative application, receiving at least one second synchronization information, the at least one second synchronization information is synchronization information of at least one second electronic device, and the at least one second synchronization information corresponds one-to-one with the at least one second electronic device; 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 method according to the number of the second electronic devices and / or the network status of the first electronic device and the second electronic device; and transmitting the data to be synchronized with the at least one second electronic device through the first data transmission method.

[0006] Exemplarily, collaborative applications may be drawing applications, file applications, and other applications that support collaborative synchronization functions, and the data ID may be used to represent information such as pages, pictures, and texts currently displayed (or opened) by the electronic device.

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

[0008] It should be noted that when a collaborative application is opened, the upload and download of 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, a picture of a drawing application is displayed on a first electronic device. When a user modifies the picture through the device, the first electronic device can upload the modified data ID to the cloud server, where the modified data ID can represent the modified picture.

[0009] Based on the above scheme, it is possible to determine whether multiple electronic devices are in a collaborative synchronization scenario, and in the collaborative synchronization scenario, determine the specific data transmission method (transmission strategy) based on the number of electronic devices and / or network status, so that the data synchronization latency in the collaborative synchronization scenario is low, the power consumption is low, the efficiency is high, and a good user experience is guaranteed.

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

[0011] In combination with the first aspect, in certain implementations of the first aspect, before determining the first data transmission method based on the number of the second electronic devices and / or the network status of the first electronic device and the second electronic device, the method also includes: determining the number of the second electronic devices based on the at least one second synchronization information, and determining the network status of the first electronic device and the second electronic device based on 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 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. In other words, the first electronic device can determine the number of second electronic devices according to the number of received second synchronization information, and because 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. In simple terms, near field and far field can be relative concepts in terms of communication distance. When the distance between two electronic devices is close, it may be a near field network state; when the distance between two electronic devices is far, it may be a far field network state. When the first electronic device is synchronized with at least two second electronic devices, both the near field and far field network states may exist.

[0014] In combination with the first aspect, in certain implementations of the first aspect, before determining the number of the second electronic devices based on at least one second synchronization information, the method also includes: determining that the first electronic device is collaboratively synchronized with the at least one second electronic device based on the ID of the collaborative application in the first synchronization information being 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 being 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 display the same collaborative application and the same data on the front end, the first electronic device and the second electronic device can be considered to be in a collaborative synchronization scenario. In the collaborative synchronization scenario, the first electronic device and the second electronic device synchronize data and share resources. At the same time, multiple electronic devices in collaborative synchronization can also complete the tasks of two electronic devices on one electronic device through a peripheral device (for example, a mouse, a keyboard).

[0016] It is understandable that the content displayed on the collaboratively synchronized first electronic device is consistent with the content displayed on 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 accordingly.

[0017] In combination with the first aspect, in certain implementations of the first aspect, when the number of 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 data to be synchronized is transmitted with the at least one second electronic device through the first data transmission method, including: sending the data to be synchronized to a third electronic device, which is one of the at least one second electronic device.

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

[0019] Exemplarily, two cooperating devices in a near field network state may preferably perform data transmission via a distributed soft bus.

[0020] In comparison, if two collaborative devices in a near-field network state choose to transmit data through server forwarding, the number of hops required for the first electronic device to complete data synchronization is 2. That is, the first electronic device needs to first send the data to be synchronized to the server, and the server then forwards the data to be synchronized to the third electronic device. It can be seen that when the two collaborative devices are in a near-field network state, it is obvious that the number of hops required to transmit data through a distributed soft bus is smaller. The fewer the hops, the fewer resources required to transmit data, and the lower the latency. Therefore, in certain scenarios, a data transmission method with fewer hops is preferred.

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

[0022] In combination with the first aspect, in certain implementations of the first aspect, when the number of 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 data to be synchronized is transmitted with the at least one second electronic device through the first data transmission method, including: sending the data to be synchronized to a third electronic device through a server, and the third electronic device is 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. Moreover, when the first electronic device and the third electronic device are in a far-field network state, data cannot be transmitted between them in an end-to-end manner, and data can be transmitted in an end-to-cloud manner. In other words, the first electronic device forwards the data to be synchronized to the third electronic device through the server. When the two collaborative devices are in a far-field network state, the number of hops for the first electronic device to complete data synchronization is 2. It can be seen that even if the number of collaborative devices is the same, different methods of transmitting data may be used. (For example, two collaborative devices in a near-field network state use distributed soft bus technology to transmit data; two collaborative devices in a far-field network state transmit data through a cloud server).

[0024] Based on the above solution, two collaborative devices in a far-field network state can improve the efficiency of data transmission through an end-cloud approach, thereby enhancing the user experience of collaboratively processing work tasks through electronic devices.

[0025] In combination with the first aspect, in certain implementations of the first aspect, when the number of second electronic devices is 3, the data to be synchronized is transmitted with the at least one second electronic device through the first data transmission method, including: sending the data to be synchronized 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 a near-field network state or a far-field network state, data can be transmitted in an end-to-cloud manner. In other words, the first electronic device forwards the data to be synchronized 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 approach can be applied to both near-field network states and far-field network states. When the number of collaborative devices is greater than or equal to 4, regardless of the near-field network state or the far-field network state, the end-cloud approach can be used for data transmission to ensure that the number of data forwarding times (fewer hops) is small during the data transmission process, reducing transmission delay and power consumption.

[0028] Based on the above solution, four or more collaborative devices can improve the efficiency of data transmission through the end-cloud method, thereby enhancing the user experience of collaboratively processing work tasks through electronic devices.

[0029] In combination with the first aspect, in certain 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 data to be synchronized with the at least one second electronic device through a second data transmission method; wherein the latency of the first data transmission method is lower than the latency of the second data transmission method.

[0030] It should be noted that ordinary synchronization can be screen projection connection, or USB flash drive synchronization and other synchronization methods with lower requirements for data consistency.

[0031] It is understandable that the first data transmission method has higher data consistency requirements than the second data transmission method. The data consistency requirements can be reflected by the data synchronization delay, and the delay of the transmission method with high data consistency requirements is lower than the delay of the transmission method with low data consistency requirements.

[0032] Exemplarily, the data consistency of the first data transmission mode is strong final consistency, and the data synchronization delay is at the millisecond level. The data consistency of the second data transmission mode is final consistency, and the data synchronization delay is at the x-second level.

[0033] That is to say, when electronic devices are in a collaborative synchronization scenario, transmitting data in a manner with higher data consistency helps improve the user experience of the data synchronization process.

[0034] According to a second aspect, an electronic device is provided, which is a first electronic device and includes: 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 include instructions, which, when executed by the one or more processors, enable the electronic device to perform the following steps: in response to opening a collaborative application, receive at least one second synchronization information, the at least one second synchronization information is synchronization information of at least one second electronic device, and the at least one second synchronization information corresponds one-to-one with the at least one second electronic device; determine whether the first electronic device and the at least one second electronic device are collaboratively synchronized based on the at least one second synchronization information; when the first electronic device and the at least one second electronic device are collaboratively synchronized, determine a first data transmission method based on the number of the second electronic devices and / or the network status of the first electronic device and the second electronic device; and transmit the data to be synchronized with the at least one second electronic device through the first data transmission method.

[0035] In combination with the second aspect, in some implementations of the second aspect, the synchronization information includes an electronic device identification ID, an ID of the collaborative application, and a data ID, where the data ID is used to represent data displayed by the electronic device.

[0036] In combination with the second aspect, in certain implementations of the second aspect, when the instruction is executed by the one or more processors, the electronic device performs the following steps: before determining the first method of transmitting data based on the number of the second electronic devices and / or the network status of the first electronic device and the second electronic device, determine the number of the second electronic devices based on the at least one second synchronization information, and determine the network status of the first electronic device and the second electronic device based on the at least one second synchronization information.

[0037] In combination with the second aspect, in certain implementations of the second aspect, when the instruction is executed by the one or more processors, the electronic device performs the following steps: before determining the number of the second electronic devices based on at least one second synchronization information, determine that the first electronic device is synchronized collaboratively with the at least one second electronic device based on the fact that 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, wherein the first synchronization information is the synchronization information of the first electronic device.

[0038] In combination with the second aspect, in certain implementations of the second aspect, when the number of 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 data to be synchronized is transmitted to the at least one second electronic device through the first data transmission method. When the instruction is executed by the one or more processors, the electronic device performs the following steps: sending the data to be synchronized to a third electronic device, which is one of the at least one second electronic device.

[0039] In combination with the second aspect, in certain implementations of the second aspect, when the number of 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 data to be synchronized is transmitted to the at least one second electronic device through the first data transmission method. When the instruction is executed by the one or more processors, the electronic device performs the following steps: sending the data to be synchronized to a third electronic device through the server, and the third electronic device is one of the at least one second electronic device.

[0040] In combination with the second aspect, in certain implementations of the second aspect, when the number of second electronic devices is 3, the data to be synchronized is transmitted to the at least one second electronic device through the first data transmission method, and when the instruction is executed by the one or more processors, the electronic device performs the following steps: sending the data to be synchronized 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] In combination with the second aspect, in certain implementations of the second aspect, when the instruction is executed by the one or more processors, the electronic device performs the following steps: when the first electronic device is normally synchronized with the at least one second electronic device, the data to be synchronized is transmitted to the at least one second electronic device through a second data transmission method; wherein the latency of the first data transmission method is lower than the latency of the second data transmission method.

[0042] In a third aspect, a system for transmitting data is provided, the system comprising a first electronic device and a second electronic device as in the first aspect and any possible implementation thereof.

[0043] In a fourth aspect, a device for transmitting data is provided, a processor coupled to a memory, the memory is used to store a computer program, and the processor is used to run the computer program, so that the device for transmitting data executes the method in the first aspect and any possible implementation thereof.

[0044] In combination with the fourth aspect, in certain implementations of the fourth aspect, one or more of the memory and the transceiver are also included, and the transceiver is used to receive signals and / or send signals.

[0045] In a fifth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a computer, the computer implements the method in the first aspect and any possible implementation thereof.

[0046] In a sixth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method in the first aspect and any possible implementation thereof.

[0047] In a seventh aspect, a chip is provided, comprising a processor and a data interface, wherein the processor reads instructions stored in a memory through the data interface to execute the method in the first aspect and any possible implementation thereof.

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

[0049] In combination with the seventh aspect, in a possible implementation, the chip system also includes a memory, in which a computer program or computer instructions are stored. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0051] Figure 2 It is a software structure diagram of an electronic device.

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

[0053] Figure 4 It is a schematic diagram of the data synchronization method provided in an embodiment of the present application.

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

[0055] Figure 6 This is a schematic diagram of a transmission method provided in an embodiment of the present application.

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

[0057] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0058] The terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one, two or more. The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0059] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[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 a music player function, such as a mobile phone, a tablet computer, a wearable electronic device with wireless communication function (such as a smart watch), etc. Exemplary embodiments of portable electronic devices include but are not limited to devices equipped with Or a portable electronic device with other operating systems. The portable electronic device may also be other portable electronic devices, such as a laptop computer. It should also be understood that in some other embodiments, the electronic device may not be a portable electronic device, but a smart home device such as a desktop computer, a smart screen, a smart host, a smart speaker, a smart refrigerator, etc.

[0061] For example, Figure 1The structure diagram of the electronic device 100 is shown. The electronic device 100 may 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, and a display screen 194. The sensor module 180 may include an acceleration sensor 180E, a touch sensor 180K, and the like.

[0062] It is to be understood that the structure illustrated in the embodiment 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 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0063] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (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 may be independent devices or integrated into one or more processors.

[0064] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

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

[0066] In some embodiments, the processor 110 may include one or more interfaces. The interface may 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 through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

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

[0069] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may 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 from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0070] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the 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. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a microphone 170C, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be arranged in the same device as the mobile communication module 150 or other functional modules.

[0071] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

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

[0073] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0074] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

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

[0076] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element converts the optical signal into an electrical signal, which is then transmitted to the ISP for conversion 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 RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0077] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

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

[0079] NPU is a neural network (NN) computing processor, which can quickly process input information and continuously self-learn by drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain. NPU can realize applications such as intelligent cognition of electronic device 100.

[0080] The internal memory 121 can be used to store computer executable program codes, which include 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 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function), etc. The data storage area may store data (such as audio data) created during the use of the electronic device 100, etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, etc.

[0081] The electronic device 100 can implement audio functions, such as music playback, through the audio module 170, the speaker 170A, the microphone 170C, and the application processor.

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

[0083] The speaker 170A, also called a "speaker", is used 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] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.

[0085] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

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

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

[0088] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer may include some predefined functions.

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

[0090] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc. The content provider is used to store and obtain data and make the data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

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

[0092] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0093] Android runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0094] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0095] The system library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0096] The surface manager is used to manage the display subsystem and provide the fusion of two-dimensional and three-dimensional layers for multiple applications.

[0097] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats.

[0098] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0099] A 2D graphics engine is a drawing engine for 2D drawings.

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

[0101] The hardware layer can include various types of sensors, such as Figure 1 Various types of sensors introduced in.

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

[0103] For example, the following is combined Figure 4 , introducing several common data synchronization methods. One data synchronization method is the ordinary synchronization method. Generally speaking, the ordinary synchronization method has low data consistency requirements. Another data synchronization method is the collaborative synchronization method. Generally speaking, the collaborative synchronization method has high data consistency requirements. In the data transmission scenario provided in the embodiment of the present application, data consistency can mean that the data maintains the same content and status on multiple interconnected electronic devices. Among them, low data consistency requirements (eventual consistency) can be understood as the data synchronization delay is in the order of x seconds. High data consistency requirements (strong eventual consistency) can be understood as the data synchronization delay is in the order of hundreds of milliseconds.

[0104] like Figure 4As shown in (a) in the figure, a common synchronization method is shown, in which the mobile phone terminal is connected to the smart screen for screen projection. Specifically, if both the mobile phone terminal and the smart screen support high-definition multimedia interface (HDMI), the mobile phone terminal can be connected to the smart screen for screen projection via HDMI. Alternatively, if both the mobile phone terminal and the smart screen support the wireless screen projection function, the screen projection connection between the mobile phone terminal and the smart screen can be achieved through a wireless screen projection connection. For example, the mobile phone terminal and the smart screen are connected to the same local area network, and screen mirroring is achieved through system-level distributed soft bus technology, thereby achieving the following: Figure 4 The picture displayed by the mobile terminal shown in (a) can be mirrored and displayed on the smart screen in real time. For another example, the mobile terminal uses an application that supports the screen projection function (for example, a video player, a conference application, etc.) to transfer the screen projection content through the cloud server, and the mobile terminal sends the projected picture to the smart screen, which can display the picture.

[0105] like Figure 4 As shown in (b), another common synchronization method is shown. The mobile terminal and the smart screen can synchronize data through 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 (for example, file 1, file 2, and file 3) to the mobile storage device, removes the mobile storage device from the mobile terminal, inserts the smart screen device, and moves the files from the mobile storage device to the smart screen to complete data synchronization.

[0106] It should be noted that the above Figure 4 (a) and Figure 4 (b) in the figure exemplifies two common synchronization methods, which can display data from one electronic device to another electronic device, and the user can process the synchronized data on one or more electronic devices. Figure 4 When the screen is connected as shown in (a) in the figure, the smart screen can synchronously display the picture shared by the mobile terminal. When the user zooms in or out on the mobile terminal, the picture displayed on the smart screen will also be zoomed in or out synchronously. Figure 4When synchronizing data by copying via a USB flash drive as shown in (b) in the figure, the shared file from the mobile phone terminal is displayed on the smart screen. Since the file exists on both the mobile phone terminal and the smart screen, the user can process the shared file on the mobile phone terminal or the electronic device respectively. After the user processes file 1 through the mobile phone terminal, the processed file 1 can be synchronized to the smart screen through a mobile storage device, so that the smart screen obtains the processed file 1; or, after the user processes file 2 through the smart screen, the processed file 2 can be synchronized to the mobile phone terminal through a mobile storage device, so that the mobile phone terminal obtains the processed file 2. It can be seen that real-time synchronization of data cannot be achieved through mobile storage devices. The above two data synchronization scenarios do not require high data consistency.

[0107] like Figure 4 As shown in (c) in the figure, a collaborative synchronization method is shown, where the mobile terminal is collaboratively connected with the smart screen, and the main interface of the mobile terminal is displayed on the smart screen. The user can control the mobile terminal interface on the smart screen, for example, the content can be freely dragged between the mobile terminal and the smart screen, thereby realizing dual-screen operation.

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

[0109] For example, Figure 4 As shown in (d) in the figure, a collaborative synchronization method is shown, in which a tablet computer is collaboratively connected with a personal computer. The drawing application 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 collaboratively connected, the tablet computer can be used as an extended screen of the personal computer to expand the operating space and method 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 dragging and dropping of data between the personal computer and the tablet computer, making data transmission more convenient.

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

[0111] That is to say, in the scenario of ordinary synchronization, in order to save power consumption, it is not necessary to use higher data consistency for data synchronization; but in the scenario of collaborative synchronization, 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 embodiment of the present application, the corresponding data consistency can be used for data synchronization processing according to the specific data synchronization scenario.

[0112] It should be noted that when determining whether the current synchronization scenario is as follows Figure 4 (c) or Figure 4 When the collaborative synchronization scenario shown in (d) is implemented, synchronization information is required, wherein the synchronization information includes device identification (ID), application ID, data ID and other information. The data ID can be used to represent the page, picture, text and other information currently displayed (or opened) by the device. Each device in the collaborative scenario can determine that the current synchronization scenario is a collaborative scenario based on the synchronization information. And, further, after determining that the current synchronization scenario is a collaborative synchronization scenario, it is necessary to determine the number and / or network status of the current collaborative devices. The collaborative synchronization scenario requires at least two electronic devices to collaborate; the network status includes near-field communication and / or far-field communication. The above specific methods for determining the collaborative synchronization scenario, the number of collaborative devices and the network status will be combined with the following. Figure 5 Provide specific instructions.

[0113] like Figure 5 As shown, a schematic diagram of a network scenario 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 status of the collaborative devices can be determined through the local area network.

[0114] It should be noted that a local area network is a regional network formed in a local area. The area that a local area network can cover is limited, but compared with other networks, it has a faster transmission speed, stable performance, and a simple framework. Local area networks include wired local area networks and wireless local area networks (WLAN). Among them, there are many implementation protocols for wireless local area networks. The most widely used one is Wi-Fi. A router can be used to connect multiple devices with wireless functions to form a wireless local area network. For example, in a home scenario, a router is usually enough to build a small wireless local area network. Wired local area networks can use a variety of different transmission technologies. Usually, various devices under a wired local area network can communicate and interact through copper wires, optical fibers, etc. as transmission media.

[0115] For example, Figure 5As shown, device A and device B belong to the same local area network. Device A and device B can report their own synchronization information to the server of the local area network. For example, device A reports the ID of device A and the ID of the application opened on the front end of device A (for example, Figure 4 drawing application as shown in (d) in FIG. 1 ) and a data ID (e.g., Figure 4 Similarly, device B also reports its own device ID, application ID, and data ID to the server in the local area network.

[0116] Device A and device B can also download synchronization information of other devices from the server of the local area network. For example, device A downloads the device ID, application ID and data ID of device B from the server of the local area network, and device B downloads the device ID, application ID and data ID of device A from the server of the local area network. When the application ID of device B is consistent with the application ID of device A, it can be said that the front-ends of device A and device B have the same application opened or displayed; when the data ID of device B is consistent with the data ID of device A, it can be said that the front-ends of device B and device A have the same data opened or displayed (for example, pages, pictures or text, etc.). In other words, when device A and device B are connected to the same local area network via wired or wireless means, they can exchange synchronization information with each other through the server of the local area network. This method of exchanging synchronization information through a server can also be understood as an end-to-cloud method.

[0117] Device A can determine whether to synchronize with device B, the number of devices synchronized with device A, and the network status based on the synchronization information. For example, device A learns from the downloaded synchronization information of device B that the same application is opened or displayed on the front end of device B and device A, and the same data is opened or displayed on the front end of device B and device A, and then device A determines to synchronize with device B. Device A only learns from the server of the local area network that device B synchronizes with itself, and can determine that the number of devices synchronized with it is 2 (including device A and device B), and determines the device ID of device B synchronized with device A. In addition, since device A and device B are both connected to the same local area network server, the device IDs of device A and device B are stored in the local area network server, and the local area network server can 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 synchronized with device B, and the network status based on the synchronization information.

[0118] In addition, if Figure 5As shown, in addition to device A and device B in the same local area network, it also includes device C and device D outside the local area network. Among them, device C can communicate and interact with device A and device B in the local area network through the cloud server. Device C can report its own synchronization information to the cloud server, and device A and device B can also report their own synchronization information to the cloud server. Each device downloads the synchronization information of other devices from the cloud server respectively, and determines whether it is a collaborative synchronization scenario, the number of collaborative synchronization devices and the network status based on the synchronization information. For example, device C downloads the synchronization information of device A and device B from the cloud server, and determines that device C and device A and B have the same application and data opened or displayed on the front end. Therefore, it is determined that the current synchronization scenario is a collaborative synchronization scenario, and the number of collaborative devices is 3 (including device A, device B and device C). Since device C realizes the interaction of synchronization information with device A and device C through the cloud server, device C and device A or device B are in a far-field network state, while for device A, device B and device C, device A and device B are in a near-field network state. It can be seen that the network states of device A, device B and device C include near-field and far-field. This method of exchanging synchronization information through a cloud server can also be understood as an end-to-end method. For another example, device D can exchange respective synchronization information with device C through an end-to-end (device to device, D2D) communication method, and device D can also determine the synchronization scenario, the number of collaborative devices and the network status based on the synchronization information. This method of directly exchanging synchronization information between devices can be understood as an end-to-end method.

[0119] It should be noted that each of the above-mentioned devices can send its own synchronization information to the server, or to other devices. It is understandable that when a device opens a collaborative application (for example, a painting application, etc.), it can trigger the device to send its own synchronization information. Alternatively, in order to save power consumption, the device can send updated synchronization information when the data changes. For example, a picture of a drawing application is displayed on the device. When the user modifies the picture through the device, the device can upload the modified data ID to the cloud server, where the modified data ID can represent the modified picture.

[0120] It should be noted that in the collaborative synchronization scenario, there are at least two collaborative devices. By querying the device ID in the near-field network (for example, the local area network), the number of collaborative devices and the network status of the collaborative devices (including near-field, far-field, or near-field and far-field) are determined. Figure 5As shown, device A and device B are in a local area network, and device A and device B are relatively in a near-field network state. Device C is not in the local area network, and device C is relatively in a far-field network state with device A or device B. Among them, near field and far field can be relative concepts in communication distance. In simple terms, if the distance between two devices is close, it may be a near-field network state; if the distance between two devices is far, it may be a far-field network state.

[0121] Furthermore, in the collaborative synchronization scenario, the preferred data transmission method can be determined according to the number of collaborative devices and the network status. Figure 6 , a method for determining a preferred transmission strategy is introduced.

[0122] like Figure 6 As shown in (a) in the figure, a method of transmitting data between two collaborative devices is shown. When device A and device B are in a near-field network state, data transmission can be carried out in an end-to-end manner. In other words, device A and device B communicate and interact directly, and device A can directly transmit data to device B. In the scenario where two collaborative devices are in a near-field network state, the number of hops required for device A to complete data synchronization is 1. In simple terms, it takes 1 hop for device A to transmit data to device B to complete the data synchronization process.

[0123] Exemplarily, this end-to-end approach can specifically adopt a distributed soft bus. The distributed soft bus can provide a unified distributed communication capability for seamless interconnection between devices, and can quickly discover and connect to each other, so that tasks and data can be efficiently transmitted. HarmonyOS connects different devices through distributed soft bus technology, which can realize multiple communication methods, and multiple devices can communicate with each other efficiently and conveniently, and users are like using "one device". The distributed soft bus can include four parts in the logical architecture: discovery, connection, networking and transmission. These four parts can work together in the business logic to achieve the goal of distributed soft bus communication by building a distributed communication framework. The following is a brief introduction to the four parts of the 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 around it. Any device can be an active discoverer, a passive discoverer, or both.

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

[0127] 2. Connect

[0128] Through the connection technology of the distributed soft bus, any device can connect to other distributed devices in the vicinity. The distributed soft bus selects the appropriate communication medium and the most appropriate communication connection technology according to the capabilities and business requirements of the distributed devices. Communication links are established between devices to facilitate subsequent networking and transmission.

[0129] 3. Networking

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

[0131] In the dynamic network, the communication and service capabilities of each device can be effectively managed. When any device in the network has service needs, the communication device can provide the information of the device required by the service at any time through the distributed soft bus network to support the establishment of service channels.

[0132] 4. Transmission

[0133] The transmission technology of the distributed soft bus can provide the transmission capability of business data for any device in the current scenario. The transmission technology of the distributed soft bus can abstract business data and quality of service (QoS) and provide appropriate transmission services based on network load and device capabilities. This transmission technology can ensure the transmission quality of multiple services in the entire distributed network while ensuring the communication requirements of a single service.

[0134] Understandably, Figure 6 The two collaborative devices shown in (a) are in a near-field network state, and data transmission can preferably be performed through a distributed soft bus. If the transmission is performed through a cloud server, the number of hops required for device A to complete data synchronization is 2. Simply put, device A needs to send the data to the cloud server first, and then the cloud server sends the data to device B to complete the data transmission. It can be seen that when the two collaborative devices are in a near-field network state, it is obvious that the number of hops required to transmit data through a distributed soft bus is relatively small. The fewer the hops, the fewer resources required to transmit data, and the lower the latency. Therefore, in certain scenarios, a data 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 meet the current data transmission needs. Based on this, data transmission needs to be carried out 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, the number of hops for device A to complete data synchronization is 2. It can be seen that even if the number of collaborative devices is the same, different data transmission methods may be used (for example, two collaborative devices in a near-field network state use distributed soft bus technology to transmit data; two collaborative devices in a far-field network state transmit data through a cloud server).

[0136] like Figure 6 As shown in (b) in the figure, a method of transmitting data among three collaborative devices is shown. When device A, device B, and device C are in a near-field network state, data transmission can be performed in an end-to-end manner. That is to say, device A, device B, and device C can communicate and interact directly, and device A can transmit data directly to device B, or directly to device C. In a scenario where there are three collaborative devices and they are in a near-field network state, the number of hops required for device A to synchronize data to the other two collaborative devices is 2. In simple terms, the process of device A transmitting data to device B is 1 hop, and the process of device A transmitting data to device C is 1 hop. The process of device A completing data synchronization requires a total of 2 hops.

[0137] like Figure 6 As shown in (c) of FIG. 1 , a data transmission method of three collaborative devices is shown, which is similar to the method shown in FIG. Figure 6 The difference from the scenario shown in (b) is that Figure 6 The three collaborative devices shown in (c) are in a far-field network state. Based on this, the end-to-end (for example, a distributed soft bus) approach is not suitable for scenarios where the three collaborative devices are in a far-field network state. Therefore, the data transmission process can be completed through the forwarding function of the cloud server. For example, device A sends data to the cloud server, and the cloud server can send the data down to device B and device C. It can be seen that the above process of uploading data to the cloud server requires 1 hop, the process of the cloud server sending data down to the collaborative device requires 1 hop, and the process of device A completing data synchronization requires a total of 2 hops.

[0138] like Figure 6As shown in (d) in the figure, a method of transmitting data among four collaborative devices is shown. When device A, device B, device C and device D are in a near-field network, data transmission can be performed in an end-to-end manner. That is to say, device A, device B, device C and device D can communicate and interact directly, and device A can transmit data to device B, device C and device D respectively. When the four collaborative devices transmit data in an end-to-end manner, the number of hops required for device A to synchronize data to the other three collaborative devices is 3. In simple terms, 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. A total of 3 hops are required for device A to complete data synchronization.

[0139] like Figure 6 As shown in (e) of FIG. 1 , a data transmission method of four collaborative devices is shown. Figure 6 The difference between the data transmission method described in (d) is that Figure 6 (e) in the figure shows a data transmission method from end to cloud, that is, data synchronization is achieved through forwarding by a cloud server. When four collaborative devices use the end-to-cloud method to transmit data, the number of hops required for device A to synchronize data to the other three collaborative devices is 2. In simple terms, the process of device A sending data to the cloud server is 1 hop, and the process of the cloud server sending data to the collaborative devices (devices B, C, and D) requires 1 hop. The process of device A completing data synchronization requires a total of 2 hops.

[0140] It should be noted that when end-to-end data transmission is adopted, the more cooperative devices there are, the more hops are required to complete the data transmission, that is, the more data forwarding times are required. Therefore, for the near-field network state, it cannot be simply assumed that end-to-end data transmission is sufficient, and the number of cooperative devices must also be considered. Figure 6 As shown in (e), the number of hops (2 hops) required for data transmission in the end-to-cloud mode for four collaborative devices in a near-field network is obviously less than the number of hops (3 hops) required for data transmission in the end-to-end mode. In other words, when determining the preferred data transmission method (data transmission strategy), it is necessary to determine the number of data forwarding times (number of hops) in the data transmission process based on the number of collaborative devices and the network status. Selecting a data transmission method with fewer data forwarding times as the preferred method can reduce the latency of the data transmission process and save power consumption.

[0141] It should be noted that in a collaborative synchronization scenario, the number of collaborative devices and the network status may change dynamically. Therefore, the method of transmitting data may also change with the changes in the number of collaborative devices and / or the network status, so that the method of transmitting data can be most suitable for the current collaborative synchronization scenario.

[0142] like Figure 7 As shown, a method for transmitting data provided by an embodiment of the present application is shown, and the method can be applied to Figure 3 In the scenario shown, the method is described in detail below.

[0143] S701: In response to opening a collaborative application, receiving at least one second synchronization information.

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

[0145] Exemplarily, collaborative applications may be drawing applications, file applications, and other applications that support collaborative synchronization functions, and the data ID may be used to represent information such as pages, pictures, and texts currently displayed (or opened) by the electronic device.

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

[0147] It is understandable that whether the device that interacts with the first electronic device with the first synchronization information and the second synchronization information is a cloud server or other electronic devices may depend on the current network status.

[0148] For example, when the first electronic device and the second electronic device correspond to Figure 5 The device A and the device B shown in the figure 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, and the second electronic device reports the second synchronization information to the local area network server. 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 Figure 5Device A and device C shown in the figure do not belong to the same local area network, and device C communicates and interacts with 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 the 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 Figure 5 In the device C and the device D shown, the first electronic device and the second electronic device communicate and interact in an end-to-end manner. When the user opens a collaborative application on the 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 a collaborative application is opened, the upload and download of 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, a picture of a drawing application is displayed on the first electronic device. 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, where the modified data ID can represent the reduced picture.

[0150] S702: Determine whether the first electronic device and at least one second electronic device are synchronized in a coordinated manner according to at least one second synchronization information.

[0151] Exemplarily, the first electronic device may be synchronized cooperatively or normally with at least one second electronic device.

[0152] S703: When the first electronic device is synchronized with at least one second electronic device, determine a first data transmission method according to the number of second electronic devices and / or the network status of the first electronic device and the second electronic device.

[0153] It should be noted that before determining the first method of transmitting data based on the number of second electronic devices and / or the network status of the first electronic device and the second electronic device, the first electronic device can determine the number of second electronic devices based on at least one second synchronization information, and determine the network status of the first electronic device and the second electronic device based on 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. In other words, the first electronic device can determine the number of second electronic devices based on 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 based on the electronic device ID in the second synchronization information.

[0155] It should be noted that the network status includes near field communication, far field communication, or near field communication and far field communication. In simple terms, near field and far field can be relative concepts in terms of communication distance. When the distance between two electronic devices is close, it may be a near field network status; when the distance between two electronic devices is far, it may be a far field network status. When a first electronic device is synchronized with at least two second electronic devices, both near field and far field network status may exist. For example, Figure 5 As shown, the first electronic device corresponds to device C, one second electronic device corresponds to device D, and another second electronic device corresponds to device A. It can be seen that 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 states of device A, device C, and device D include a near-field network state and a far-field network state.

[0156] Optionally, before determining the number of second electronic devices based on at least one second synchronization information, the first electronic device determines that the first electronic device is collaboratively synchronized with at least one second electronic device based on the fact that an ID of a collaborative application in the first synchronization information is consistent with an ID of a collaborative application in at least one second synchronization information, and that a data ID in the first synchronization information is consistent with a data ID in at least one second synchronization information.

[0157] That is to say, when the first electronic device and the second electronic device display the same collaborative application and the same data on the front end, 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 and share resources. At the same time, the collaboratively synchronized multiple electronic devices can also complete the tasks of two electronic devices on one electronic device through a peripheral device (for example, a mouse, a keyboard).

[0158] It is understandable that the content displayed on the collaboratively synchronized first electronic device is consistent with the content displayed on 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 accordingly.

[0159] S704: Transmit the data to be synchronized with at least one second electronic device in a first data transmission manner.

[0160] It should be noted that before the first electronic device and the second electronic device transmit the data to be synchronized, it is necessary to determine the method of transmitting the data. The basis for determining the method of transmitting the data includes at least one of the following: the number of second electronic devices and the network status. Among them, the method of transmitting the data can be understood as the strategy of transmitting the data, which can include the end-to-end method and the end-to-cloud method.

[0161] Exemplarily, 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 data to be synchronized is sent to a third electronic device, which is one of the at least one second electronic device.

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

[0163] For example, Figure 6 As shown in (a), the first electronic device corresponds to device A, the third electronic device corresponds to device B, and device A and device B communicate and interact directly. That is to say, in the scenario of two collaborative devices in a near field network state, the number of hops for device A to complete data synchronization is 1. Of course, for device B, the number of hops for device B to complete data synchronization is also 1.

[0164] Exemplarily, two cooperating devices in a near field network state may preferably perform data transmission via a distributed soft bus.

[0165] In comparison, if two collaborative devices in a near-field network state choose to transmit data through server forwarding, the number of hops required for the first electronic device to complete data synchronization is 2. That is, the first electronic device needs to first send the data to be synchronized to the server, and the server then forwards the data to be synchronized to the third electronic device. It can be seen that when the two collaborative devices are in a near-field network state, it is obvious that the number of hops required to transmit data through a distributed soft bus is smaller. The fewer the hops, the fewer resources required to transmit data, and the lower the latency. Therefore, in certain scenarios, a data transmission method with fewer hops is preferred.

[0166] Exemplarily, 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 data to be synchronized is sent to a third electronic device through the server, and the third electronic device is one of the at least one second electronic device.

[0167] 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. Moreover, when the first electronic device and the third electronic device are in a far-field network state, data cannot be transmitted between them in an end-to-end manner, and data can be transmitted in an end-to-cloud manner. In other words, the first electronic device forwards the data to be synchronized to the third electronic device through the server. When the two collaborative devices are in a far-field network state, the number of hops for the first electronic device to complete data synchronization is 2. It can be seen that even if the number of collaborative devices is the same, different methods of transmitting data may be used. (For example, two collaborative devices in a near-field network state use distributed soft bus technology to transmit data; two collaborative devices in a far-field network state transmit data through a cloud server).

[0168] Exemplarily, 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 a third electronic device and a 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 2, the number of collaborative devices is 3, including the first electronic device, the third electronic device and the fourth electronic device. Moreover, when the first electronic device, the third electronic device and the fourth electronic device are in a near field network state, data can be directly transmitted end-to-end. In other words, the first electronic device directly sends the data to be synchronized to the third electronic device and the fourth electronic device.

[0170] For example, 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. Device A, device B, and device C communicate and interact directly. That is to say, in the scenario of three collaborative devices and near-field network status, the number of hops for device A to complete data synchronization is 2. Of course, for device B and device C, the number of hops for completing data synchronization is also 2.

[0171] Exemplarily, 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 2, the number of collaborative devices is 3, including the first electronic device, the third electronic device and the fourth electronic device. And when the first electronic device, the third electronic device and the fourth electronic device are in a far-field network state, data can be transmitted in an end-to-cloud manner. In other words, the first electronic device forwards the data to be synchronized to the third electronic device and the fourth electronic device through the server.

[0173] For example, Figure 6 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. Device A, device B, and device C communicate and interact through the server. That is to say, in the scenario of three collaborative devices and far-field network status, the number of hops for device A to complete data synchronization is 2. Of course, for device B and device C, the number of hops to complete data synchronization is also 2.

[0174] It can be seen that for the three collaborative devices, regardless of the near-field network state or the far-field network state, the end-to-end data transmission method and the end-to-cloud data transmission method respectively adopted both require 2 hops.

[0175] Exemplarily, when the number of second electronic devices is 3, the data to be synchronized 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 at least one second electronic device.

[0176] 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 a near-field network state or a far-field network state, data can be transmitted in an end-to-cloud manner. In other words, the first electronic device forwards the data to be synchronized to the third electronic device, the fourth electronic device and the fifth electronic device through the server.

[0177] For example, Figure 6 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 the case of four collaborative devices and near-field network scenarios, data is transmitted end-to-end, and the number of hops required for device A to complete data synchronization is 3. Of course, for devices B, C, and D, the number of hops required to complete data synchronization is also 3. Figure 6As shown in (e), 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 case of four collaborative devices, regardless of the near-field network or far-field network scenario, the end-to-cloud method is used to transmit data, and the number of hops required for device A to complete data synchronization is 2. Of course, for device B, device C, and device D, the number of hops required to complete data synchronization is also 2.

[0178] It should be noted that the end-cloud approach can be applied to both near-field network states and far-field network states. When the number of collaborative devices is greater than or equal to 4, regardless of the near-field network state or the far-field network state, the end-cloud approach can be used for data transmission to ensure that the number of data forwarding times (fewer hops) is small during the data transmission process, 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 data to be synchronized is transmitted to the at least one second electronic device via a second data transmission method; wherein the delay of the first data transmission method is lower than the delay of the second data transmission method.

[0180] It should be noted that ordinary synchronization can be screen projection connection, or USB flash drive synchronization and other synchronization methods with lower requirements for data consistency.

[0181] It is understandable that the first data transmission method has higher data consistency requirements than the second data transmission method. The data consistency requirements can be reflected by the data synchronization delay, and the delay of the transmission method with high data consistency requirements is lower than the delay of the transmission method with low data consistency requirements.

[0182] Exemplarily, the data consistency of the first data transmission mode is strong final consistency, and the data synchronization delay is at the millisecond level. The data consistency of the second data transmission mode is final consistency, and the data synchronization delay is at the x-second level.

[0183] That is to say, when electronic devices are in a collaborative synchronization scenario, transmitting data in a manner with higher data consistency helps improve the user experience of the data synchronization process.

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

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

[0186] The embodiment of the present application provides a computer program product, which, when executed on a device, enables the device to execute the technical solution in the above embodiment. Its implementation principle and technical effect are similar to those of the above method-related embodiments, and will not be described in detail here.

[0187] The embodiment of the present application provides a readable storage medium, which contains instructions. When the instructions are executed on a device, the device executes the technical solution of the above embodiment. The implementation principle and technical effect are similar and will not be repeated here.

[0188] The embodiment of the present application provides a chip, which is used to execute instructions. When the chip is running, the technical solution in the above embodiment is executed. The implementation principle and technical effect are similar and will not be repeated here.

[0189] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.

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

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

[0192] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

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

[0194] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0195] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for transmitting data, characterized in that: The method is applied to a first electronic device, and the method includes: In response to opening the 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 in a one-to-one manner; Determining whether the first electronic device and the at least one second electronic device are synchronized in coordination according to the at least one second synchronization information; When the first electronic device is synchronized with the at least one second electronic device, determining a first data transmission mode according to the number of the second electronic devices and / or the network status of the first electronic device and the second electronic device; The data to be synchronized is transmitted to the at least one second electronic device by using the first data transmission method.

2. The method according to claim 1, characterized in that The synchronization information includes an electronic device identification ID, an ID of the collaborative application, and a data ID, where the data ID is used to represent data displayed by the electronic device.

3. The method according to claim 1 or 2, characterized in that: Before determining the first data transmission mode according to the number of the second electronic devices and / or the network status of the first electronic device and the second electronic device, the method further includes: determining the number of the second electronic devices according to the at least one second synchronization information, and The network status of the first electronic device and the second electronic device is determined according to the at least one second synchronization information.

4. The method according to claim 3, characterized in that Before determining the number of the second electronic devices according to at least one second synchronization information, the method further includes: Based on the fact that 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, it is determined that the first electronic device is collaboratively synchronized with the at least one second electronic device, wherein the first synchronization information is the 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 device 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 data to be synchronized with the at least one second electronic device by using the first data transmission method includes: The data to be synchronized is sent to a third electronic device, where the third electronic device is 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 device is 1, and the network state between the first electronic device and the second electronic device is a far-field network state, The transmitting the data to be synchronized with the at least one second electronic device by using the first data transmission method includes: The data to be synchronized is sent to a third electronic device through a server, where the third electronic device is 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 transmitting the data to be synchronized with the at least one second electronic device by using the first data transmission method includes: The data to be synchronized is sent 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.

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

9. An electronic device, characterized in that: 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 include instructions. When the instructions are executed by the one or more processors, the electronic device performs the method according to any one of claims 1 to 8.

10. A device for transmitting data, characterized in that: A processor coupled to a memory, wherein the memory is used to store a computer program, and the processor is used to run the computer program so that the device for transmitting data performs the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a computer, the computer is caused to implement the method according to any one of claims 1 to 8.

12. A chip, characterized in that: The chip includes a processor and a data interface, and the processor reads instructions stored in a memory through the data interface to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Data synchronization method and electronic device

    CN105681393A

  • Method, device and system for realizing screen projection of camera through mobile client

    CN108055559A

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

    CN110752999A

  • Video synchronous display method, device and system

    CN111372112A

  • Data synchronization method, device and system and storage medium

    CN115102968A

Cited By

  • Data synchronization method and device, atomization equipment and storage medium

    CN120676445A

  • Method for transmitting data, and electronic device and system

    EP4701160A1