Data synchronization method, electronic device, and system
By synchronizing processed data and persistent data separately in electronic devices according to data types, the problem that end-cloud synchronization is difficult to ensure timely data synchronization is solved, and the stability and efficiency of data synchronization are achieved.
Patent Information
- Application Number
- PCT/CN2024/098507
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-06
- Filing Date
- 2024-06-11
- Publication Date
- 2025-03-13
AI Technical Summary
In distributed communication systems, when data synchronization is performed through end-cloud synchronization, it is difficult to ensure the timeliness of data synchronization, affecting the user experience.
After the electronic device generates the data to be synchronized, it synchronizes the processed data and the persistent data separately according to the data type. Process data is synchronized through end-end, and persistent data is synchronized through end-cloud, realizing the timeliness and stability of data synchronization.
Through this method, while ensuring the timeliness and stability of data synchronization, users' user experience can be improved and data synchronization abnormalities can be avoided.
Smart Images

Figure CN2024098507_13032025_PF_FP_ABST
Abstract
Description
Data synchronization method, electronic device and system
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on September 6, 2023, with application number 202311162897.3 and application name “Data Synchronization Method, Electronic Device and System”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of terminal technology, and in particular to a data synchronization method, electronic device, and system. Background Art
[0003] With the development of terminal technology, electronic devices can establish connections with various other electronic devices, forming a distributed communication system. In a distributed communication system, electronic devices can synchronize data with other devices to ensure data consistency across multiple electronic devices.
[0004] For example, while a note-taking app is running on a mobile phone, it updates the app's content in response to a user's editing operation. The mobile phone then sends the updated note content to the tablet via a cloud server through end-to-cloud synchronization. This way, when the tablet launches the note-taking app in response to the user's operation, the note content displayed will be the most recent note edited on the phone, providing convenience for the user.
[0005] However, in the above process, it is difficult to ensure the timeliness of data synchronization between different electronic devices through end-cloud synchronization, which affects the user experience.
[0006] Summary of the Invention
[0007] To address the aforementioned technical issues, the present application provides a data synchronization method, electronic device, and system. The technical solution provided by the present application allows the electronic device to synchronize procedural data and persistent data separately based on the data type of the data to be synchronized, thereby ensuring both the timeliness and stability of data synchronization.
[0008] In order to achieve the above technical objectives, this application provides the following technical solutions:
[0009] In a first aspect, a data synchronization method is provided, applied to a first electronic device. The method includes: displaying a first application interface; receiving a first user operation on the first application; obtaining first data and second data of the first application generated by the first operation, wherein the first data is data not stored in a storage module of the first electronic device, and the second data is data stored in the storage module; sending the first data to a second electronic device; and sending the second data to a cloud server.
[0010] In some examples, the data types include, for example, processed data and persistent data. The first electronic device may distinguish between processed data and persistent data based on whether the generated data is saved to a storage module. For example, after the first electronic device saves the generated data to a storage module, the data in the storage module is persistent data; data not saved to the storage module by the first electronic device is processed data. In some examples, a storage module is a storage medium capable of storing data. For example, a storage module is a read-only memory (ROM), such as a hard disk, a mechanical hard disk, a solid-state drive, a magnetic disk, and the like.
[0011] In this way, the first and second electronic devices can flexibly synchronize data between different devices through various data synchronization methods, such as procedural data end-to-end synchronization and persistent data end-to-cloud synchronization, based on the data type. This ensures both the timeliness and stability of data synchronization.
[0012] According to the first aspect, sending the first data to the second electronic device includes: sending the first data to the second electronic device via a short-range communication method, where the short-range communication method includes at least one of a Bluetooth point-to-point connection P2P communication method, a Wireless Fidelity Wi-Fi P2P communication method, and a local area network communication method.
[0013] In this way, after acquiring the process data (ie, the first data), the first electronic device directly sends the process data to the second electronic device. By using the end-to-end synchronization method, the efficiency of data synchronization is improved.
[0014] According to the first aspect, or any implementation of the first aspect above, the method further includes: receiving a second operation of the user on the first application, obtaining fourth data of the first application generated by the second operation, where the fourth data is data saved to the storage module. Under preset conditions, the fourth data is sent to the second electronic device, where the preset conditions include one or more of the following: failure to send the fourth data to the cloud server, the cloud synchronization function is not enabled, the cloud space capacity is insufficient, and the end-to-end synchronization priority is higher than the end-to-cloud synchronization priority.
[0015] In this way, persistent data is synchronized between the first electronic device and the second electronic device on demand through end-to-end synchronization, avoiding data synchronization anomalies caused by failure of end-to-cloud synchronization, which affects user use.
[0016] Furthermore, in some scenarios, end-to-end synchronization can achieve better data synchronization benefits, so the first electronic device can directly choose to synchronize persistent data through end-to-end synchronization. For example, based on factors such as the current network status, the first electronic device determines that end-to-end synchronization is more efficient than end-to-cloud synchronization. The first electronic device can send all data (including processed data and persistent data) to the second electronic device through end-to-end synchronization.
[0017] According to the first aspect, or any implementation of the first aspect above, the method further includes: receiving a third operation performed by a user on the first application, obtaining seventh data of the first application generated by the third operation, wherein the seventh data is data stored in the storage module, and the amount of the seventh data is greater than a preset threshold. Under preset conditions, sending first information about the seventh data to the second electronic device, the first information including the storage address and / or abbreviation information of the seventh data.
[0018] For example, during on-demand end-to-end synchronization of persistent data between a first electronic device and a second electronic device, the first electronic device determines that the amount of newly added image data in the note application is small and can directly synchronize the attachments through end-to-end synchronization. Alternatively, the first electronic device determines that the amount of newly added video data in the note application is large and can synchronize the video's address through end-to-end synchronization. Subsequently, after obtaining the persistent data of the note application from the cloud server, the second electronic device can discard the already synchronized images and save the video with the unsynchronized attachment content.
[0019] In this way, the first electronic device can synchronize persistent data with the second electronic device end-to-end according to the data volume, thereby improving the end-to-end synchronization efficiency of persistent data.
[0020] According to the first aspect, or any implementation of the first aspect above, the method further includes: receiving a data saving operation from a user or detecting that a data saving period is satisfied, saving the first data to a storage module, and sending the first data in the storage module to a cloud server.
[0021] For example, if the first electronic device saves the procedural data to the storage module in response to a user operation, the procedural data becomes persistent data. The first electronic device sends the persistent data to the cloud server according to a preset period or after confirming that the persistent data has been obtained.
[0022] For another example, if the first application is configured with an automatic save function and automatically saves the process data according to a preset period, the first electronic device can send the persistent data to the cloud server after obtaining the latest persistent data saved in the storage module.
[0023] In this way, the first electronic device divides the procedural data and the persistent data according to whether the data is saved, and synchronizes the procedural data and the persistent data in different ways, thereby ensuring the timeliness and stability of data synchronization.
[0024] In a second aspect, a data synchronization method is provided, applied to a second electronic device. The method includes: receiving first data sent by a first electronic device; and downloading, from a cloud server, second data sent by the first electronic device to the cloud server; wherein the first data and the second data are data generated by a first application in the first electronic device, the first data being data not stored in a storage module of the first electronic device, and the second data being data stored in the storage module of the first electronic device.
[0025] According to the second aspect, receiving first data sent by a first electronic device includes: receiving first data sent by the first electronic device via a short-range communication method, where the short-range communication method includes at least one of a Bluetooth point-to-point connection P2P communication method, a Wireless Fidelity Wi-Fi P2P communication method, and a local area network communication method.
[0026] According to the second aspect, or any implementation of the second aspect above, downloading from a cloud server second data sent by a first electronic device to the cloud server includes: obtaining first data information of third data sent by the cloud server, where the third data includes the second data and data in the first data that has been saved to a storage module; and requesting, based on the first data information, from the cloud server to download second data in the third data that has not been end-to-end synchronized with the first electronic device.
[0027] In this way, the consistency of the data in the second electronic device and the data in the first electronic device is ensured and synchronized, and data conflicts between different devices are avoided.
[0028] According to the second aspect, or any implementation of the second aspect above, the method also includes: receiving fourth data sent by the second electronic device under preset conditions, the fourth data being data that the first electronic device has saved to the storage module; the preset conditions include one or more of the following: the first electronic device fails to send the fourth data to the cloud server, the first electronic device does not turn on the cloud synchronization function, the cloud space capacity is insufficient, and the end-to-end synchronization priority is higher than the end-to-cloud synchronization priority.
[0029] According to the second aspect, or any implementation of the second aspect above, the method further includes: receiving second data information of fifth data sent by the cloud server, where the fifth data is data of a first application sent by the first electronic device to the cloud server. Based on the second data information, requesting the cloud server to download sixth data of the fifth data that has not been end-to-end synchronized with the first electronic device, where the sixth data does not include the fourth data.
[0030] In this way, the second electronic device can pull data from the cloud server as needed according to the actual data synchronization situation, without having to repeatedly download the data that has been synchronized.
[0031] According to the second aspect, or any implementation of the second aspect above, the method also includes: receiving first information of seventh data sent by the first electronic device under preset conditions, the seventh data is data that has been saved to the storage module by the first electronic device, the data volume of the seventh data is greater than a preset threshold, and the first information includes the storage address and / or abbreviation information of the seventh data.
[0032] In a third aspect, a first electronic device is provided. The first electronic device includes: a processor, a memory, and a display screen. The memory and the display screen are coupled to the processor. The memory is used to store computer program code. The computer program code includes computer instructions. When the processor reads the computer instructions from the memory, the first electronic device executes: displaying the interface of a first application. Receive a first operation of a user on a first application, obtain first data and second data of the first application generated by the first operation, the first data being data that has not been saved to the storage module of the first electronic device, and the second data being data that has been saved to the storage module. Send the first data to the second electronic device, and send the second data to the cloud server.
[0033] According to the third aspect, sending the first data to the second electronic device includes: sending the first data to the second electronic device via a short-range communication method, where the short-range communication method includes at least one of a Bluetooth point-to-point connection P2P communication method, a Wireless Fidelity Wi-Fi P2P communication method, and a local area network communication method.
[0034] According to the third aspect, or any implementation of the third aspect above, when the processor reads the computer instruction from the memory, it also causes the first electronic device to execute: receiving a second operation of the user on the first application, obtaining fourth data of the first application generated by the second operation, where the fourth data is data saved to the storage module. Under preset conditions, the fourth data is sent to the second electronic device, and the preset conditions include one or more of the following: failure to send the fourth data to the cloud server, the cloud synchronization function is not enabled, the cloud space capacity is insufficient, and the end-to-end synchronization priority is higher than the end-to-cloud synchronization priority.
[0035] According to the third aspect, or any implementation of the third aspect above, when the processor reads the computer instructions from the memory, the processor further causes the first electronic device to: receive a third operation performed by a user on a first application, obtain seventh data of the first application generated by the third operation, where the seventh data is data stored in the storage module, and the amount of the seventh data is greater than a preset threshold; and under preset conditions, send first information about the seventh data to the second electronic device, where the first information includes a storage address and / or abbreviation information of the seventh data.
[0036] According to the third aspect, or any implementation of the third aspect above, when the processor reads the computer instruction from the memory, the processor further causes the first electronic device to execute the following steps: upon receiving a user's data save operation or detecting that a data save period has been met, save the first data to the storage module; and transmit the first data in the storage module to the cloud server.
[0037] In a fourth aspect, a second electronic device is provided. The second electronic device includes: a processor and a memory, the memory being coupled to the processor, the memory being configured to store computer program code, the computer program code including computer instructions. When the processor reads the computer instructions from the memory, the second electronic device is caused to execute: receiving first data sent by a first electronic device; and downloading, from a cloud server, second data sent by the first electronic device to the cloud server; wherein the first data and the second data are data generated by a first application in the first electronic device, the first data being data not stored in a storage module of the first electronic device, and the second data being data stored in a storage module of the first electronic device.
[0038] According to the fourth aspect, receiving first data sent by a first electronic device includes: receiving first data sent by the first electronic device via a short-range communication method, the short-range communication method including at least one of a Bluetooth point-to-point connection P2P communication method, a Wireless Fidelity Wi-Fi P2P communication method, and a local area network communication method.
[0039] According to the fourth aspect, or any implementation of the fourth aspect, downloading from the cloud server second data sent by the first electronic device to the cloud server includes: obtaining first data information of third data sent by the cloud server, where the third data includes the second data and data in the first data that has been saved to the storage module; and requesting, based on the first data information, from the cloud server to download second data in the third data that has not been end-to-end synchronized with the first electronic device.
[0040] According to the fourth aspect, or any implementation method of the above fourth aspect, when the processor reads computer instructions from the memory, it also enables the second electronic device to execute: receiving fourth data sent by the first electronic device under preset conditions, the fourth data is data that the first electronic device has saved to the storage module; the preset conditions include one or more of the following: the first electronic device fails to send the fourth data to the cloud server, the first electronic device does not turn on the cloud synchronization function, the cloud space capacity is insufficient, and the end-to-end synchronization priority is higher than the end-to-cloud synchronization priority.
[0041] According to the fourth aspect, or any implementation of the fourth aspect, when the processor reads the computer instructions from the memory, the processor further causes the second electronic device to: receive second data information of fifth data sent by the cloud server, where the fifth data is data of the first application sent by the first electronic device to the cloud server; and based on the second data information, request the cloud server to download sixth data of the fifth data that has not been end-to-end synchronized with the first electronic device, where the sixth data does not include the fourth data.
[0042] According to the fourth aspect, or any implementation method of the above fourth aspect, when the processor reads computer instructions from the memory, it also enables the second electronic device to execute: receiving first information of the seventh data sent by the first electronic device under preset conditions, the seventh data is data that the first electronic device has saved to the storage module, the data volume of the seventh data is greater than the preset threshold, and the first information includes the storage address and / or abbreviation information of the seventh data.
[0043] In a fifth aspect, a data synchronization system is provided, the system including a first electronic device and a second electronic device, and a short-range communication connection is established between the first electronic device and the second electronic device. The first electronic device is used to: display the interface of the first application. Receive a first operation of the user on the first application, obtain first data and second data of the first application generated by the first operation, the first data is data that has not been saved to the storage module of the first electronic device, and the second data is data that has been saved to the storage module. Send the first data to the second electronic device, and send the second data to the cloud server. The second electronic device is used to: receive the first data sent by the first electronic device, and download the second data from the cloud server.
[0044] According to a fifth aspect, the second electronic device is further configured to: obtain first data information of third data sent by the cloud server, where the third data includes the second data and data in the first data that has been saved to the storage module; and request, based on the first data information, to download second data in the third data that has not been end-to-end synchronized with the first electronic device from the cloud server.
[0045] According to the fifth aspect, or any implementation of the fifth aspect above, the first electronic device is further used to: receive a second operation of the user on the first application, obtain fourth data of the first application generated by the second operation, and the fourth data is data saved to the storage module. Under preset conditions, the fourth data is sent to the second electronic device, and the preset conditions include one or more of the following: failure to send the fourth data to the cloud server, the cloud synchronization function is not turned on, the cloud space capacity is insufficient, and the end-to-end synchronization priority is higher than the end-to-cloud synchronization priority. The second electronic device is also used to: receive the fourth data sent by the first electronic device.
[0046] According to the fifth aspect, or any implementation of the fifth aspect, the second electronic device is further configured to: receive second data information of fifth data sent by the cloud server, where the fifth data is data of the first application sent by the first electronic device to the cloud server; and based on the second data information, request the cloud server to download sixth data of the fifth data that has not been end-to-end synchronized with the first electronic device, where the sixth data does not include the fourth data.
[0047] In a sixth aspect, an electronic device is provided, the electronic device having the function of implementing the data synchronization method described in the first aspect and any possible implementation thereof; or the electronic device having the function of implementing the data synchronization method described in the second aspect and any possible implementation thereof. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned functions.
[0048] In a seventh aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program (also referred to as instructions or code), which, when executed by an electronic device, causes the electronic device to perform the method of the first aspect or any one of the embodiments of the first aspect; or causes the electronic device to perform the method of the second aspect or any one of the embodiments of the second aspect.
[0049] In an eighth aspect, a computer program product is provided. When the computer program product is run on an electronic device, the electronic device executes the method of the first aspect or any one of the embodiments of the first aspect; or, the electronic device executes the method of the second aspect or any one of the embodiments of the second aspect.
[0050] In a ninth aspect, a circuit system is provided, the circuit system including a processing circuit, the processing circuit being configured to execute the method of the first aspect or any one of the embodiments of the first aspect; or, the processing circuit being configured to execute the method of the second aspect or any one of the embodiments of the second aspect.
[0051] In the tenth aspect, a chip system is provided, comprising at least one processor and at least one interface circuit, wherein the at least one interface circuit is used to perform transceiver functions and send instructions to the at least one processor. When the at least one processor executes the instructions, the at least one processor executes the method of the first aspect or any one of the embodiments of the first aspect; or, the at least one processor executes the method of the second aspect or any one of the embodiments of the second aspect.
[0052] The technical effects of the aforementioned aspects can be referenced with each other and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] FIG1 is a schematic diagram of a terminal-cloud data synchronization scenario provided by an embodiment of the present application;
[0054] FIG2 is a schematic diagram of an end-to-end data synchronization scenario provided by an embodiment of the present application;
[0055] FIG3 is a schematic diagram of a communication system in which the data synchronization method provided in an embodiment of the present application is applied;
[0056] FIG4 is a schematic diagram of the hardware structure of a first electronic device provided in an embodiment of the present application;
[0057] FIG5 is a schematic diagram of a software structure block diagram provided in an embodiment of the present application;
[0058] FIG6 is a schematic diagram of a scenario of process-based end-to-end data synchronization provided by an embodiment of the present application;
[0059] FIG7 is a schematic diagram of a scenario of persistent data end-cloud data synchronization provided by an embodiment of the present application;
[0060] FIG8 is a first schematic diagram of a scenario of on-demand end-to-end data synchronization of persistent data provided by an embodiment of the present application;
[0061] FIG9 is a second schematic diagram of a scenario of on-demand end-to-end data synchronization of persistent data provided by an embodiment of the present application;
[0062] FIG10 is a schematic diagram of a scenario in which data synchronization is adaptively performed according to data type and data synchronization scenario, provided by an embodiment of the present application;
[0063] FIG11 is a flow chart of a data synchronization method according to an embodiment of the present application;
[0064] FIG12 is a schematic structural diagram of a first electronic device provided in an embodiment of the present application;
[0065] FIG13 is a schematic structural diagram of a second electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] The technical solutions in the embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. Among them, in the description of the embodiments of the present application, 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 appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to include expressions such as "one or more", unless there is a clear indication to the contrary 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 or more (including two).
[0067] References to "one embodiment" or "some embodiments" etc. described in this specification mean that the specific features, structures or characteristics described in conjunction with the embodiment are included in one or more embodiments of the present application. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in 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 another way. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in another way. The term "connected" includes direct and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
[0068] In the embodiments of this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a concrete manner.
[0069] In some embodiments, multiple electronic devices in a distributed communication system can synchronize data through end-to-end synchronization to ensure consistency of multi-end data.
[0070] For example, as shown in Figure 1, electronic device A updates the content of the note application in response to the user's editing operation during the running of the note application, and saves the updated note content to the storage module. Afterwards, electronic device A sends the note content (i.e., data A) in the storage module to the cloud server through end-cloud synchronization. Then, electronic device B can download the note content from the cloud server. In this way, after electronic device B responds to the user's operation and starts the note application, the note content displayed is the latest note content edited by the user on electronic device A, which is convenient for the user.
[0071] However, in the above process, it is difficult to ensure the timeliness of data synchronization between different electronic devices through end-to-end synchronization, which affects the user experience. For example, when the mobile phone determines that it needs to send the updated note content to the cloud server, the current network quality is poor and the transmission fails. In this process, since the mobile phone fails to upload the updated note content to the cloud server, the tablet also fails to obtain the latest note content. Then, if the user opens the note application on the tablet side at this time, he will not be able to view the latest note application content.
[0072] Furthermore, some electronic devices are not configured or have not enabled the cloud synchronization function, resulting in the inability to synchronize data with other devices through end-to-cloud synchronization. Alternatively, some electronic devices may be configured by the user to only synchronize cloud data when using wireless networks, but not when using carrier data plans, thus affecting the timeliness of data synchronization.
[0073] In other embodiments, multiple electronic devices in a distributed communication system may synchronize data through end-to-end synchronization, thereby ensuring consistency of multi-end data.
[0074] For example, as shown in Figure 2, electronic device A, while running a note-taking application, updates the note content in response to a user's editing operation, generating procedural data for the note-taking application. During this process, electronic device A detects a nearby electronic device B and establishes a communication connection with electronic device B. Electronic device A can then synchronize the procedural data updated by the note-taking application (i.e., data A) to electronic device B in real time. In this way, electronic device B, in response to the user's operation, launches the note-taking application and can display the latest note content edited by the user on electronic device A in real time, making it easier for the user to use it.
[0075] However, in the above process, the stability of the end-to-end connection between devices is poor and easily interrupted. In addition, the data transmission speed is slow, which affects the efficiency of data synchronization between different electronic devices through end-to-end synchronization.
[0076] In addition, electronic devices can only perform end-to-end data synchronization when using wireless networks, but cannot perform end-to-end data synchronization when using operator data traffic, which affects the timeliness of data synchronization.
[0077] In some other embodiments, different electronic devices synchronize cursors through end-to-end data synchronization, while other data are synchronized through end-to-cloud synchronization. However, in this solution, the above technical problems still exist.
[0078] Therefore, an embodiment of the present application provides a data synchronization method. After the electronic device generates the data to be synchronized, it synchronizes the procedural data and the persistent data separately according to the data type of the data to be synchronized, thereby ensuring the timeliness of data synchronization while ensuring the stability of data synchronization.
[0079] Figure 3 is a schematic diagram of a communication system to which the data synchronization method provided in an embodiment of the present application is applied. As shown in Figure 3, the communication system includes a first electronic device 100, a second electronic device 200, and a server 300.
[0080] Optionally, the first electronic device 100 or the second electronic device 200 may be, for example, a mobile phone, a tablet computer, a laptop computer, a smart screen, a wearable device, a vehicle-mounted terminal, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), an artificial intelligence (AI) device or other terminal device, and the operating system installed on the first electronic device 100 or the second electronic device 200 includes but is not limited to This application does not limit the specific type of the first electronic device 100 or the second electronic device 200 or the installed operating system.
[0081] Optionally, the server 300 may be a device or server with computing capabilities such as a cloud server or a network server. The server may be a single server, a server cluster consisting of multiple servers, or a cloud computing service center.
[0082] In some embodiments, the first electronic device 100 is the electronic device that generates the data to be synchronized, and the second electronic device 200 is the electronic device with which data synchronization is to be performed. After generating the data to be synchronized, the first electronic device 100 determines the data type and sends the procedural data to the second electronic device 200 via end-to-end synchronization; and sends the persistent data to the second electronic device 200 via end-to-cloud synchronization.
[0083] Optionally, the first electronic device 100 and the second electronic device 200 in the embodiment of the present application may be implemented by the same or different devices, and the different devices may have the same, similar or somewhat different hardware structures, such as the hardware structure shown in FIG. 4 .
[0084] For example, taking the first electronic device 100 having the hardware structure shown in FIG. 4 as an example, the hardware structure shown in FIG. 4 is described.
[0085] As shown in Figure 4, the first electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, 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 sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0086] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the first electronic device 100. In other embodiments of the present application, the first electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0087] 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 processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0088] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0089] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0090] In some embodiments, the processor 110 may include one or more interfaces. The interfaces 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.
[0091] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor, charger, flash, camera 193, etc. via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor via the I2C interface, allowing the processor 110 to communicate with the touch sensor via the I2C bus interface, thereby implementing the touch function of the first electronic device 100.
[0092] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the first electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the first electronic device 100.
[0093] The USB interface 130 is an interface that complies with USB standards and specifications, and may be a MiniUSB interface, a MicroUSB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the first electronic device 100, or to transfer data between the first electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as AR devices.
[0094] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative description and does not constitute a structural limitation on the first electronic device 100. In other embodiments of the present application, the first electronic device 100 may also adopt a different interface connection method from the above embodiments, or a combination of multiple interface connection methods.
[0095] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the first electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.
[0096] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0097] The wireless communication function of the first 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.
[0098] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in first electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0099] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the first 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.
[0100] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted 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 being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs the sound signal through the audio device or displays an image or video through the 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 provided in the same device as the mobile communication module 150 or other functional modules.
[0101] 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., applied on the first 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, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0102] In some embodiments, the antenna 1 of the first electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the first electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0103] The first electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. The GPU is a microprocessor for image processing that 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 modify display information.
[0104] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be manufactured using a liquid crystal display (LCD), for example, an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Mini-LED, Micro-LED, Micro-OLED, quantum dot light-emitting diodes (QLED), etc. In some embodiments, the first electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.
[0105] 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 can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal 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 first electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0106] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the first electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored in the external memory card.
[0107] The internal memory 121 can be used to store computer executable program codes, which include instructions. 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, an image playback function, etc.), etc. The data storage area may store data created during the use of the first electronic device 100 (such as audio data, a phone book, etc.), 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, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the first electronic device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.
[0108] 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 set in the processor 110, or some functional modules of the audio module 170 can be set in the processor 110. The first electronic device 100 can use the audio module 170, such as music playback and recording. The audio module 170 may include a speaker, a receiver, a microphone, a headphone jack, and an application processor to implement audio functions.
[0109] The sensor module 180 may include a pressure sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
[0110] The buttons 190 include a power button, a volume button, etc. The buttons 190 may be mechanical buttons or touch buttons. The first electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the first electronic device 100.
[0111] Motor 191 can generate vibration alerts. This can be used for incoming call vibration alerts or touch vibration feedback. Depending on the touch operation applied to different areas of the display 194, motor 191 can also generate different vibration feedback effects. Different application scenarios (e.g., time reminders, receiving messages, alarm clocks, gaming, etc.) can also correspond to different vibration feedback effects.
[0112] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.
[0113] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and disconnected from the first electronic device 100 by inserting or removing the SIM card into or from the SIM card interface 195. The first electronic device 100 may support one or N SIM card interfaces, where N is a positive integer greater than one.
[0114] The software system of the first electronic device 100 or the second electronic device 200 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the first electronic device 100 or the second electronic device 200.
[0115] FIG5 is a block diagram of the software structure of the first electronic device 100 according to an embodiment of the present application. The second electronic device 200 may have the same, similar or slightly different software structure.
[0116] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0117] The application layer can include a series of application packages.
[0118] As shown in FIG5 , the application package may include applications such as notes, contacts, memos, sports health, clipboard, gallery, map, camera, video, etc.
[0119] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0120] As shown in FIG5 , the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
[0121] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.
[0122] Content providers are used to store and retrieve data and make it accessible to applications. Data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0123] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0124] The phone manager is used to provide communication functions of the first electronic device 100, such as management of call status (including answering, hanging up, etc.).
[0125] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0126] The notification manager allows applications to display notification information in the status bar. It can be used to convey informational messages and can disappear automatically after a short stay without user interaction. The notification manager can also be a notification that appears in the top status bar of the system in the form of an icon or scrolling text bar.
[0127] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for scheduling and management of the Android system.
[0128] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0129] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0130] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0131] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
[0132] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0133] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0134] A 2D graphics engine is a drawing engine for 2D drawings.
[0135] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.
[0136] The following describes the workflow of the software and hardware of the first electronic device 100 and the second electronic device 200 in conjunction with the synchronization scenario of note data.
[0137] In the first electronic device 100, when the touch sensor receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, timestamp of the touch operation and other information). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. Taking the example that the touch operation is a touch single-click operation and the control corresponding to the single-click operation is the control of the note application icon, the note application calls the interface of the application framework layer to start the note application. Afterwards, during the process of displaying the note application, the first electronic device 100 detects the user's touch operation in the note application through the touch sensor, determines that the note application generates new data, and needs to synchronize data.
[0138] Afterwards, if the first electronic device 100 detects the second electronic device 200 located nearby and determines to establish a communication connection with the second electronic device 200, the first electronic device 100 can send the newly generated note data to the second electronic device 200. The newly generated note data is the processed data generated in real time by the note application in the first electronic device 100. In this way, data synchronization between the note applications in the first electronic device 100 and the second electronic device 200 is achieved through end-to-end synchronization.
[0139] If the first electronic device 100 does not detect the second electronic device 200 located nearby. Then, the first electronic device 100 can save the newly generated note data to the storage module in response to the user's save operation. Subsequently, the first electronic device 100 uploads the note data saved in the storage module to the cloud server. The note data uploaded to the cloud server is the persistent data of the note application in the first electronic device 100. Correspondingly, the second electronic device 200 can obtain the note data by downloading it from the cloud server. In this way, data synchronization of the note applications in the first electronic device 100 and the second electronic device 200 is achieved through end-to-cloud synchronization.
[0140] The following describes in detail the data synchronization method provided in the embodiment of the present application, taking the first electronic device 100 as the electronic device that generates the data to be synchronized and the second electronic device 200 as the electronic device to perform data synchronization as an example.
[0141] In some embodiments, an electronic device may generate data of different data types while running an application. In some examples, the data types include procedural data and persistent data. The electronic device may distinguish between procedural data and persistent data based on whether the generated data is saved to a storage module. For example, after the electronic device saves the generated data to a storage module, the data in the storage module is persistent data; data not saved to the storage module by the electronic device is procedural data.
[0142] In some examples, the storage module is a storage medium capable of storing data, such as a read-only memory (ROM), such as a hard disk, a mechanical hard disk, a solid-state drive, a magnetic disk, and the like.
[0143] For example, procedural data includes text content, attachment information, cursor position, and other data generated by the application in real time. Persistent data includes attachments stored in storage modules such as images, videos, documents, and text content.
[0144] In some embodiments, after generating data, the electronic device synchronizes data of different data types separately based on the data type. In some examples, the electronic device synchronizes procedural data with other electronic devices through end-to-end synchronization, thereby ensuring the timeliness of procedural data synchronization. The electronic device synchronizes persistent data with other electronic devices through end-to-cloud synchronization, thereby ensuring the stability of persistent data synchronization.
[0145] Exemplarily, as shown in FIG6 , the first electronic device generates new note content in response to user operations while running a note application. During this process, the first electronic device detects a second electronic device located nearby, and the first electronic device can establish a communication connection with the second electronic device (or a communication connection has already been established between the first electronic device and the second electronic device). Afterwards, while updating the note content, the first electronic device can send the updated note content to the second electronic device through end-to-end synchronization. That is, the first electronic device synchronizes the procedural data to the second electronic device through end-to-end synchronization. In this way, if the first electronic device is running a note application, the second electronic device is also running a note application. Then, through end-to-end data synchronization, the second electronic device can synchronously display the note content edited by the user in the note application in the first electronic device. Alternatively, after the second electronic device starts the note application in response to user operations, it can display the note content synchronized by the first electronic device through end-to-end synchronization, so that the user can continue to edit the note content through the second electronic device.
[0146] As another example, as shown in Figure 7, in response to a user's save operation, the first electronic device saves the updated note content to the storage module. The storage module then stores attachments from the note application, which may include text, images, videos, and the like entered by the user in the note application. The first electronic device can then upload the attachments from the note application to the cloud server, completing end-to-end synchronization of the first electronic device's persistent data. Subsequently, the second electronic device can download the persistent data uploaded by the first electronic device from the cloud server as needed and save it to the storage module, completing end-to-end synchronization of the second electronic device's persistent data. In other words, data synchronization between the first and second electronic devices is achieved through end-to-end synchronization. For example, in response to a user's instruction to launch the note application, the second electronic device sends a data synchronization request to the cloud server to synchronize the note content. After end-to-end synchronization, the second electronic device can display the note content edited by the user on the first electronic device, allowing the user to continue editing the note content on the second electronic device. In this way, data synchronization can be achieved through end-to-end synchronization regardless of whether the second electronic device is near the first electronic device.
[0147] In some embodiments, after generating persistent data, the electronic device may also synchronize data with other electronic devices through end-to-end synchronization as needed.
[0148] For example, as shown in FIG8 , while running a note-taking application, the first electronic device, in response to a user operation, stores the generated procedural data of the note-taking application in a storage module, thereby generating persistent data of the note-taking application. If any one or more of the following situations occur, the first electronic device will synchronize persistent data with other devices as needed through end-to-end synchronization. For example, the first electronic device may not be configured with a cloud synchronization function, the cloud synchronization function is not enabled, the current network quality is poor and the persistent data cannot be uploaded to the cloud server, the cloud space capacity is insufficient, the wireless communication network function is not enabled or the wireless communication network (such as a Wi-Fi network) is not connected, or the end-to-end synchronization priority is determined to be higher than the end-to-cloud synchronization priority. The priority order between end-to-end synchronization and end-to-cloud synchronization can be a preconfigured priority order in the first electronic device or a user-defined priority order. Different user accounts correspond to different cloud spaces. After the first electronic device logs in to a user account, it can access the corresponding cloud space for data backup, etc. The cloud space capacity is limited, so if the cloud space capacity is insufficient, the first electronic device cannot send persistent data to the cloud server.
[0149] It should be understood that in some other demand scenarios, the first electronic device may also send persistent data to the second electronic device through end-to-end synchronization as needed, and this embodiment of the application will not illustrate this one by one. For example, if the first electronic device determines that the opposite device (such as the second electronic device) cannot download data from the cloud server, it may also send persistent data to the opposite device through end-to-end synchronization.
[0150] In various cases of the above examples, the first electronic device detects a second electronic device located nearby, and the first electronic device can establish a communication connection with the second electronic device (or a communication connection has already been established between the first electronic device and the second electronic device). Afterwards, the first electronic device can send the persistent data of the note application stored in the storage module to the second electronic device through the communication connection between the first electronic device and the second electronic device. This enables the synchronization of persistent data between the first electronic device and the second electronic device through end-to-end synchronization on demand, avoiding data synchronization anomalies caused by the inability to perform end-to-cloud synchronization, which affects user use.
[0151] In some embodiments, the manner in which the procedural data is stored in the storage module includes storing it in the form of a file and storing it in the form of a database. Storing it in the form of a file represents storing the data content of the procedural data. For example, in response to a user's save operation in a note application, the electronic device stores the video content newly added by the user in the note application in the form of a file in the storage module. Storing it in the form of a database represents storing a uniform resource locator (URL) corresponding to the file in the storage module, and the URL indicates a specific file storage address. For example, after the electronic device saves the video content in the form of a file in the storage module in response to a user's save operation, it determines the URL of the storage address and stores the URL in the form of a database. Optionally, a file directory corresponding to the note application is stored in the database, and the file directory includes one or more URLs for indexing one or more files of the note application stored in the storage module.
[0152] In some examples, the first electronic device establishes a point-to-point connection (P2P) with the second electronic device through Bluetooth, Wi-Fi, etc., and realizes end-to-end data synchronization through the P2P connection. Generally, the data transmission speed of the P2P connection is slow. Therefore, in order to ensure the efficiency of data synchronization, when it is necessary to synchronize persistent data through the end, you can choose to synchronize the file corresponding to the persistent data (such as an attachment stored in the form of a file), or choose to synchronize the information of the persistent data, such as the information including the database content corresponding to the persistent data (such as the URL stored in the database) or thumbnail information (such as thumbnails, video covers, etc.). In this way, when the amount of persistent data is large, the first electronic device and the second electronic device can also achieve data synchronization by synchronizing the information of the persistent data. Subsequently, the second electronic device can also read the persistent data across devices on demand based on the information of the persistent data.
[0153] Exemplarily, as shown in FIG9 , after the electronic device stores the procedural data in the storage module, the stored content includes attachments stored in the form of files and attachment URLs stored in the form of a database.
[0154] In one scenario, while running a note-taking application, the first electronic device detects that the user clicks on the save control and saves the text content entered by the user to a storage module. The first electronic device determines that it is currently unable to upload the text content to the cloud server, and determines that a P2P connection has been established with a second electronic device located nearby. Then, the first electronic device can synchronize the text content to the second electronic device through end-to-end synchronization. The second electronic device saves the text content to the storage module to complete the data synchronization of the note-taking application.
[0155] In another scenario, the first electronic device detects the user clicking the save control while running the note application, and saves the video file input by the user to the storage module. The first electronic device determines that the video file cannot be uploaded to the cloud server at present, and determines that a P2P connection has been established with a second electronic device located nearby. Since the data volume of the video file is large, the first electronic device can synchronize the cover information and URL of the video file to the second electronic device through end-to-end synchronization. The second electronic device saves the cover information and URL of the video file to the storage module to complete the data synchronization of the note application. Subsequently, the second electronic device starts the note application in response to the user operation, and can display the cover of the video file. If it is detected that the user clicks on the cover of the video file, the second electronic device can then request the first electronic device to obtain the video stream of the video file by reading the file across devices based on the URL of the video file. This ensures the efficiency of data synchronization while also ensuring the effectiveness of data synchronization.
[0156] Therefore, as shown in Figure 10, the first electronic device and the second electronic device can flexibly realize data synchronization between different devices according to the data type and the current data synchronization scenario through various data synchronization methods such as procedural data end-to-end synchronization, persistent data end-to-cloud synchronization, and persistent data on-demand end-to-end synchronization.
[0157] In some embodiments, data synchronization is performed between different electronic devices in a variety of ways. While ensuring data consistency across multiple terminals, it is also necessary to avoid duplicate data synchronization.
[0158] In some examples, the electronic device determines the consistency and repeatability of data synchronization by comparing data.
[0159] For example, after obtaining synchronized data through end-to-end synchronization or end-to-cloud synchronization, the second electronic device compares the synchronized data with local data to determine whether the same data is already stored locally. If the same data is already stored locally, the second electronic device may discard the synchronized data. If the same data is not stored locally, the second electronic device may save the synchronized data.
[0160] Exemplarily, as shown in FIG10 , during the operation of the note application, the first electronic device generates procedural data of the note application in response to user operations, and synchronizes the procedural data to a second electronic device located nearby through end-to-end synchronization. The second electronic device obtains and saves the procedural data. Subsequently, the first electronic device saves the procedural data of the note application to the storage module in response to the user's save operation, and obtains the persistent data of the note application. Afterwards, the first electronic device uploads the persistent data of the note application to the cloud server. Correspondingly, the second electronic device requests the cloud server to download the persistent data of the note application. Among them, the persistent data of the note application may include the procedural data of the note application previously obtained by the first electronic device and the second electronic device through end-to-end synchronization. Therefore, the second electronic device can determine whether it needs to retain part or all of the persistent data obtained from the cloud server by data comparison.
[0161] For example, during the end-to-end synchronization process, the second electronic device obtains 3 pictures input by the user into the note application, and obtains the editing time of the 3 pictures. Subsequently, the persistent data of the note application downloaded by the second electronic device from the cloud server includes the 5 pictures input by the user and the editing time of these 5 pictures. Based on the pictures and editing time, the second electronic device can determine that after the end-to-end synchronization, the first electronic device inserted 2 pictures into the note application based on the user's operation. Therefore, the second electronic device can retain the 2 newly added pictures and discard the 3 pictures downloaded repeatedly from the cloud server. Alternatively, the second electronic device determines that after the end-to-end synchronization, the user edited the 3 pictures that have been synchronized based on the pictures and editing time. Then, the second electronic device can discard the 3 pictures synchronized by the end-to-end synchronization and retain all 5 pictures synchronized from the cloud server.
[0162] In this way, the consistency of the data in the second electronic device and the data in the first electronic device is ensured and synchronized, and data conflicts between different devices are avoided.
[0163] As another example, as shown in FIG10 , the first electronic device inserts pictures and videos into the note application in response to the user's editing operation while running the note application. After the first electronic device detects the user's save operation in the note application, it saves the persistent data of the note application in the storage module. Afterwards, the first electronic device determines that the cloud synchronization function is not currently turned on, and detects a second electronic device located nearby. It can synchronize the persistent data of the note application to the second electronic device through end-to-end synchronization as needed. Subsequently, the first electronic device detects that the user has turned on the cloud synchronization function, and can upload the persistent data of the note application that has not been uploaded to the cloud server to the cloud server.
[0164] For example, after the second electronic device downloads the persistent data of the note application from the cloud server, if it determines that the persistent data has been synchronized with the first electronic device through end-to-end synchronization, the second electronic device can avoid synchronizing the duplicate data again.
[0165] For example, during on-demand end-to-end synchronization of persistent data between a first electronic device and a second electronic device, the first electronic device determines that the amount of newly added image data in the note application is small and can directly synchronize the attachments through end-to-end synchronization. Alternatively, the first electronic device determines that the amount of newly added video data in the note application is large and can synchronize the video URL through end-to-end synchronization. Subsequently, after obtaining the persistent data of the note application from the cloud server, the second electronic device can discard the already synchronized images and save the video attachments without syncing them.
[0166] In this way, the second electronic device pulls data from the cloud server as needed according to the actual data synchronization situation.
[0167] In other examples, the electronic device determines the consistency and repeatability of data synchronization by comparing data information.
[0168] For example, the second electronic device can compare the data edit time to determine whether the edit time of the data in the cloud server is later than the edit time of the local application data. This allows the second electronic device to download only the latest data to be synchronized, without having to repeatedly download historical data, effectively reducing data download power consumption and data synchronization time. In other words, the second electronic device first determines the edit time of the data to be synchronized and downloads the attachment from the cloud server as needed. If the attachment has not changed, it does not need to be downloaded again.
[0169] For example, as shown in FIG10 , while running a note-taking application, a first electronic device generates procedural data for the note-taking application in response to a user's editing operation, and synchronizes the procedural data to a nearby second electronic device through end-to-end synchronization. The second electronic device obtains and saves the procedural data. Subsequently, the first electronic device saves the procedural data of the note-taking application to a storage module in response to the user's save operation, obtaining the persistent data of the note-taking application. The first electronic device then uploads the persistent data of the note-taking application to a cloud server.
[0170] Afterwards, the second electronic device responds to the user's operation of starting the note application by sending a data synchronization request to the cloud server, and the data synchronization request carries the note application identifier. Accordingly, the cloud server receives the data synchronization request and determines the data of the note application that the second electronic device requests to synchronize based on the note application identifier carried in the data synchronization request. The cloud server can determine the note application data uploaded by the first electronic device and obtained between the second electronic device's last data synchronization and this data synchronization as data to be synchronized, and send information about the data to be synchronized to the second electronic device; or, the cloud server directly determines all the note application data as data to be synchronized, and sends information about the data to be synchronized to the second electronic device.
[0171] Accordingly, after receiving the information about the data to be synchronized from the cloud server, the second electronic device compares the information about the data to be synchronized with the local data information of the note-taking application, determines the data that actually needs to be synchronized, and then sends a data synchronization request to the cloud server again, including the information about the data that actually needs to be synchronized. Accordingly, after receiving the data synchronization request, the cloud server sends the corresponding data to be synchronized to the second electronic device based on the data information contained in the request.
[0172] In this way, the second electronic device can synchronize data with the first electronic device, avoid downloading duplicate attachment data, and improve the efficiency of end-cloud data synchronization.
[0173] As another example, when the first electronic device is running a note application, it updates the note application content in response to user operations and sends the updated note content to the second electronic device through end-to-end synchronization. If the second electronic device is also running a note application, the first electronic device and the second electronic device can synchronously display the note application content edited by the user; or, if the second electronic device is not running a note application, it can also save and obtain the note content. Subsequently, the first electronic device uploads the updated content and update time of the note application to the cloud server in response to the user's operation of saving the note application. When the second electronic device requests the cloud server to synchronize the note application data, it can be determined that there is no need to synchronize the note content with the cloud server based on the fact that the last update time of the note content fed back by the cloud server (such as the time when the note content is uploaded to the cloud server) is earlier than the synchronization time of the locally stored note content.
[0174] In this way, the second electronic device determines whether data synchronization is required by comparing the final update time of the data to be synchronized, thereby effectively improving the data synchronization efficiency.
[0175] Figure 11 is a flow chart of a data synchronization method provided in an embodiment of the present application. It should be noted that the method is not limited to the specific sequence shown in Figure 11 and below. It should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:
[0176] S1101: A first electronic device displays an interface of a first application.
[0177] In some embodiments, the first electronic device runs a first application in the foreground and displays the interface of the first application. During the process of displaying the interface of the first application, the first electronic device may receive a user operation, and the user operation may generate data for the first application.
[0178] S1102: The first electronic device receives a first operation of a user on a first application, and obtains first data and second data of the first application generated by the first operation, wherein the first data is data not stored in a storage module of the first electronic device, and the second data is data stored in the storage module of the first electronic device.
[0179] The first data is procedural data that has not been saved to the storage model, and the second data is persistent data that has been saved to the storage module. Optionally, the storage module is a storage medium capable of storing data. The storage module is, for example, a ROM, such as a hard disk, a mechanical hard disk, a solid-state drive, a magnetic disk, etc.
[0180] In some embodiments, a first application may detect a first user operation and generate data for the first application. For example, if the first operation is an edit operation, the first application may generate procedural data based on the user's edit. For another example, if the first operation is a save operation, the first application may save second data to a storage module based on the user's operation, and the second data may be persistent data.
[0181] In some examples, the first application may generate procedural data and / or persistent data during operation.
[0182] S1103: The first electronic device sends first data to the second electronic device.
[0183] S1104. The first electronic device sends second data to the cloud server.
[0184] In some embodiments, after acquiring the first data of the first application generated by the first operation, the first electronic device directly sends the first data to a second electronic device. The second electronic device is an electronic device near the first electronic device, and a short-range communication connection is established between the first electronic device and the second electronic device.
[0185] In some examples, a first electronic device transmits first data to a second electronic device via a short-range communication method. Correspondingly, the second electronic device receives the first data transmitted by the first electronic device via the short-range communication method. The short-range communication method includes at least one of a Bluetooth P2P communication method, a Wi-Fi P2P communication method, and a local area network communication method.
[0186] In some embodiments, after obtaining the second data of the first application generated by the first operation, the first electronic device uploads the second data to the cloud server so that other electronic devices can download the second data.
[0187] It should be understood that the embodiment of the present application does not limit the execution order of S1103 and S1104.
[0188] S1105. The second electronic device downloads the second data to the cloud server.
[0189] In some embodiments, the second electronic device obtains first data information of third data sent by the cloud server, where the third data includes the second data and data in the first data that has been saved to the storage module. Based on the first data information, the second electronic device requests the cloud server to download second data in the third data that has not been synchronized end-to-end with the first electronic device.
[0190] In this way, the second electronic device can request data synchronization from the cloud server as needed, and the second electronic device can pull data from the cloud server that has not been synchronized with other electronic devices, thereby reducing the amount of data downloaded and allowing the second electronic device to obtain the latest application data.
[0191] In some embodiments, the first electronic device receives a data saving operation from a user or detects that a data saving period is satisfied, saves the first data to the storage module, and sends the first data in the storage module to the cloud server.
[0192] For example, if the first electronic device saves the procedural data to the storage module in response to a user operation, the procedural data becomes persistent data. The first electronic device sends the persistent data to the cloud server according to a preset period or after confirming that the persistent data has been obtained.
[0193] For another example, if the first application is configured with an automatic save function and automatically saves the process data according to a preset period, the first electronic device can send the persistent data to the cloud server after obtaining the latest persistent data saved in the storage module.
[0194] In this way, the first electronic device divides the procedural data and the persistent data according to whether the data is saved, and synchronizes the procedural data and the persistent data in different ways, thereby ensuring the timeliness and stability of data synchronization.
[0195] Exemplarily, as shown in FIG10 , during the process of running a first application (such as a note application), the first electronic device generates procedural data of the note application in response to a user operation, and synchronizes the procedural data to a second electronic device located nearby through end-to-end synchronization. The second electronic device obtains and saves the procedural data. Subsequently, the first electronic device saves the procedural data of the note application to a storage module in response to the user's save operation, and obtains the persistent data of the note application. Afterwards, the first electronic device uploads the persistent data of the note application to the cloud server. Correspondingly, the second electronic device requests the cloud server to download the persistent data of the note application. Among them, the persistent data of the note application may include the procedural data of the note application previously obtained by the first electronic device and the second electronic device through end-to-end synchronization. Therefore, the second electronic device can determine whether it needs to retain some or all of the persistent data obtained from the cloud server by data comparison.
[0196] In this way, the consistency of the data in the second electronic device and the data in the first electronic device is ensured and synchronized, and data conflicts between different devices are avoided.
[0197] In some embodiments, the first electronic device receives a second operation of the user on the first application, obtains fourth data of the first application generated by the second operation, and the fourth data is data saved in the storage module. Under preset conditions, the first electronic device sends the fourth data to the second electronic device. Correspondingly, the second electronic device receives the fourth data sent by the second electronic device under preset conditions. Among them, the preset conditions include one or more of the following: failure to send the fourth data to the cloud server, the cloud synchronization function is not turned on, the cloud space capacity is insufficient, and the end-to-end synchronization priority is higher than the end-to-cloud synchronization priority.
[0198] For example, as shown in FIG10 , the first electronic device inserts pictures and videos into the note application in response to the user's editing operation while running the note application. After the first electronic device detects the user's save operation in the note application, it saves the persistent data of the note application in the storage module. Afterwards, the first electronic device determines that the cloud synchronization function is not currently turned on, and detects a second electronic device located nearby. It can synchronize the persistent data of the note application to the second electronic device through end-to-end synchronization as needed. Subsequently, the first electronic device detects that the user has turned on the cloud synchronization function, and can upload the persistent data of the note application that has not been uploaded to the cloud server to the cloud server.
[0199] In this way, the first electronic device and the second electronic device can flexibly realize data synchronization between different devices according to the data type and the current data synchronization scenario through various data synchronization methods such as procedural data end-to-end synchronization, persistent data end-to-cloud synchronization, and persistent data on-demand end-to-end synchronization.
[0200] In some embodiments, a second electronic device receives second data information of fifth data sent by a cloud server, where the fifth data is data of a first application sent by the first electronic device to the cloud server. Based on the second data information, the second electronic device requests the cloud server to download sixth data of the fifth data that has not been end-to-end synchronized with the first electronic device, where the sixth data does not include the fourth data.
[0201] In this way, the second electronic device can pull data from the cloud server as needed according to the actual data synchronization situation, without having to repeatedly download the data that has been synchronized.
[0202] In some embodiments, a first electronic device receives a third operation performed by a user on a first application and obtains seventh data of the first application generated by the third operation, where the seventh data is data that has been saved to a storage module, and the amount of the seventh data is greater than a preset threshold. Under preset conditions, the first electronic device sends first information of the seventh data to a second electronic device. The first information includes the storage address and / or abbreviation information of the seventh data. Correspondingly, the second electronic device receives the first information of the seventh data sent by the first electronic device under the preset conditions.
[0203] For example, during on-demand end-to-end synchronization of persistent data between a first electronic device and a second electronic device, the first electronic device may determine that the amount of newly added image data in a note-taking application is small and may directly synchronize the attachments through end-to-end synchronization. Alternatively, the first electronic device may determine that the amount of newly added video data in the note-taking application is large and may synchronize the video URL through end-to-end synchronization. Subsequently, after obtaining the persistent data of the note-taking application from the cloud server, the second electronic device may discard the already synchronized images and save the video attachments without synchronization.
[0204] In this way, the first electronic device can synchronize persistent data with the second electronic device end-to-end according to the data volume, thereby improving the end-to-end synchronization efficiency of persistent data.
[0205] The data synchronization method provided by the embodiment of the present application is described in detail above with reference to Figures 6 to 11. The first electronic device and the second electronic device provided by the embodiment of the present application are described in detail below with reference to Figures 12 and 13.
[0206] In one possible design, Figure 12 is a schematic diagram of the structure of a first electronic device provided in an embodiment of the present application. As shown in Figure 12, the first electronic device 1200 may include: a display unit 1201, a processing unit 1202, and a transceiver unit 1203. The first electronic device 1200 may be used to implement the functions of the first electronic device involved in the above method embodiment.
[0207] Optionally, the display unit 1201 is configured to support the first electronic device 1200 in displaying interface content; and / or support the first electronic device 1200 in executing S1101 in FIG. 11 .
[0208] Optionally, the processing unit 1202 is configured to support the first electronic device 1200 in executing S1102 in FIG. 11 .
[0209] Optionally, the transceiver unit 1203 is configured to support the first electronic device 1200 in executing S1103 and S1104 in FIG. 11 .
[0210] The transceiver unit may include a receiving unit and a sending unit, and may be implemented by a transceiver or a transceiver-related circuit component, and may be a transceiver or a transceiver module. The operations and / or functions of each unit in the first electronic device 1200 are respectively for implementing the corresponding processes of the data synchronization method described in the above method embodiment. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional unit. For the sake of brevity, they are not repeated here.
[0211] Optionally, the first electronic device 1200 shown in FIG12 may further include a storage unit (not shown in FIG12 ) storing a program or instruction. When the display unit 1201, the processing unit 1202, and the transceiver unit 1203 execute the program or instruction, the first electronic device 1200 shown in FIG12 may execute the data synchronization method described in the above method embodiment.
[0212] The technical effects of the first electronic device 1200 shown in FIG12 may refer to the technical effects of the data synchronization method described in the above method embodiment, and will not be repeated here.
[0213] In addition to being in the form of the first electronic device 1200, the technical solution provided in this application may also be a functional unit or chip in the first electronic device, or a device used in conjunction with the first electronic device.
[0214] In one possible design, Figure 13 is a schematic diagram of the structure of a second electronic device provided in an embodiment of the present application. As shown in Figure 13, the second electronic device 1300 may include: a transceiver unit 1301 and a processing unit 1302. The second electronic device 1300 may be used to implement the functions of the second electronic device involved in the above method embodiment.
[0215] Optionally, the transceiver unit 1301 is configured to support the second electronic device 1300 in executing S1103 and S1105 in FIG. 11 .
[0216] Optionally, the processing unit 1302 is configured to support the second electronic device 1300 to compare the data received from the first electronic device and the data downloaded from the cloud server, thereby determining to synchronize non-duplicate data therein.
[0217] The transceiver unit may include a receiving unit and a sending unit, and may be implemented by a transceiver or a transceiver-related circuit component, and may be a transceiver or a transceiver module. The operations and / or functions of each unit in the second electronic device 1300 are respectively for implementing the corresponding processes of the data synchronization method described in the above method embodiment. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional unit. For the sake of brevity, they are not repeated here.
[0218] Optionally, the second electronic device 1300 shown in FIG13 may further include a storage unit (not shown in FIG13 ) storing a program or instruction. When the transceiver unit 1301 and the processing unit 1302 execute the program or instruction, the second electronic device 1300 shown in FIG13 may execute the data synchronization method described in the above method embodiment.
[0219] The technical effects of the second electronic device 1300 shown in FIG13 can refer to the technical effects of the data synchronization method described in the above method embodiment, and will not be repeated here. In addition to the form of the second electronic device 1300, the technical solution provided in this application can also be a functional unit or chip in the second electronic device, or a device used in conjunction with the second electronic device.
[0220] An embodiment of the present application also provides a chip system, including: a processor, the processor is coupled to a memory, the memory is used to store programs or instructions, when the program or instructions are executed by the processor, the chip system implements the method in any of the above method embodiments.
[0221] Optionally, there may be one or more processors in the chip system. The processor may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0222] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be provided separately from the processor, which is not limited in the embodiments of the present application. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or provided on different chips. The embodiments of the present application do not specifically limit the type of memory or the configuration of the memory and the processor.
[0223] Exemplarily, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
[0224] It should be understood that each step in the above method embodiment can be completed by hardware integrated logic circuits in a processor or by software instructions. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.
[0225] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a computer, the computer executes the above-mentioned related steps to implement the data synchronization method in the above-mentioned embodiment.
[0226] An embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the above-mentioned related steps to implement the data synchronization method in the above-mentioned embodiment.
[0227] In addition, embodiments of the present application further provide a device. Specifically, the device may be a component or module, and may include one or more processors and a memory connected to each other. The memory is configured to store a computer program. When the computer program is executed by one or more processors, the device performs the data synchronization method described in each of the above method embodiments.
[0228] The apparatus, computer-readable storage medium, computer program product, or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding methods provided above, and will not be repeated here.
[0229] The steps of the method or algorithm described in conjunction with the disclosure of the embodiments of the present application can be implemented in a hardware manner or can be implemented by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in a random access memory (RAM), a flash memory, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a register, a hard disk, a mobile hard disk, a read-only compact disc (CD-ROM) or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC).
[0230] From the above description of the embodiments, those skilled in the art will clearly understand that, for ease of description and brevity, only the above-described division of functional modules is used as an example. In actual applications, the above-described functions can be assigned to different functional modules as needed; that is, the internal structure of the device can be divided into different functional modules to perform all or part of the functions described above. The specific operating processes of the systems, devices, and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules or units is merely a logical functional division. In actual implementation, other division methods may be used; for example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented. In addition, the coupling or direct coupling or communication connection shown or discussed between each other may be through some interface, or indirect coupling or communication connection between modules or units, and may be electrical, mechanical, or other forms. In addition, the functional units in the various embodiments of this application may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0231] Computer-readable storage media include, but are not limited to, any of the following: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and other media that can store program code.
[0232] The above is only a specific embodiment of the present application, but the scope of protection of this application is not limited to this. Any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A data synchronization system, characterized in that: The system includes a first electronic device and a second electronic device, wherein a short-range communication connection is established between the first electronic device and the second electronic device; The first electronic device is used for: Displaying the interface of the first application; receiving a first operation of the user on the first application, and acquiring first data and second data of the first application generated by the first operation, wherein the first data is data that has not been saved in a storage module of the first electronic device, and the second data is data that has been saved in the storage module; Sending the first data to a second electronic device, and sending the second data to a cloud server; The second electronic device is used for: The first data sent by the first electronic device is received, and the second data is downloaded from the cloud server.
2. The system according to claim 1, characterized in that The second electronic device is further used to: obtain first data information of third data sent by the cloud server, where the third data includes the second data and data in the first data that has been saved in the storage module; According to the first data information, a request is made to the cloud server to download second data in the third data that has not been end-to-end synchronized with the first electronic device.
3. The system according to claim 1 or 2, characterized in that: The first electronic device is also used for: receiving a second operation of the user on the first application, and acquiring fourth data of the first application generated by the second operation, wherein the fourth data is data that has been saved in the storage module; Under a preset condition, sending the fourth data to the second electronic device, the preset condition including one or more of the following: failure to send the fourth data to the cloud server, not enabling the cloud synchronization function, insufficient cloud space capacity, and a higher priority of end-to-end synchronization than that of end-to-cloud synchronization; The second electronic device is further used for: The fourth data sent by the first electronic device is received.
4. The system according to claim 3, characterized in that The second electronic device is further used for: receiving second data information of fifth data sent by the cloud server, where the fifth data is data of the first application sent by the first electronic device to the cloud server; According to the second data information, a request is made to the cloud server to download sixth data in the fifth data that has not been end-to-end synchronized with the first electronic device, wherein the sixth data does not include the fourth data.
5. A data synchronization method, characterized in that: Applied to a first electronic device, the method includes: Displaying the interface of the first application; receiving a first operation of the user on the first application, and acquiring first data and second data of the first application generated by the first operation, wherein the first data is data that has not been saved in a storage module of the first electronic device, and the second data is data that has been saved in the storage module; The first data is sent to a second electronic device, and the second data is sent to a cloud server.
6. The method according to claim 5, characterized in that The sending the first data to the second electronic device includes: The first data is sent to the second electronic device via a short-distance communication method, wherein the short-distance communication method includes at least one of a Bluetooth point-to-point connection P2P communication method, a Wireless Fidelity Wi-Fi P2P communication method, and a local area network communication method.
7. The method according to claim 5 or 6, characterized in that: The method further comprises: receiving a second operation of the user on the first application, and acquiring fourth data of the first application generated by the second operation, wherein the fourth data is data that has been saved in the storage module; Under preset conditions, the fourth data is sent to the second electronic device, and the preset conditions include one or more of the following: failure to send the fourth data to the cloud server, not turning on the cloud synchronization function, insufficient cloud space capacity, and the priority of end-to-end synchronization is higher than the priority of end-to-cloud synchronization.
8. The method according to claim 7, characterized in that The method further comprises: receiving a third operation of the user on the first application, and acquiring seventh data of the first application generated by the third operation, wherein the seventh data is data that has been saved in the storage module, and the data volume of the seventh data is greater than a preset threshold; Under the preset condition, first information of the seventh data is sent to the second electronic device, where the first information includes a storage address and / or abbreviation information of the seventh data.
9. The method according to any one of claims 5 to 8, characterized in that: The method further comprises: Receiving a data saving operation from a user or detecting that a data saving period is satisfied, saving the first data to the storage module; The first data in the storage module is sent to the cloud server.
10. A data synchronization method, characterized in that: Applied to a second electronic device, the method includes: Receiving first data sent by a first electronic device; Download from the cloud server the second data sent by the first electronic device to the cloud server; wherein the first data and the second data are data generated by a first application in the first electronic device, the first data are data not saved in the storage module of the first electronic device, and the second data are data saved in the storage module of the first electronic device.
11. The method according to claim 10, characterized in that The receiving first data sent by the first electronic device includes: The first data is received from the first electronic device through a short-distance communication method, where the short-distance communication method includes at least one of a Bluetooth point-to-point connection P2P communication method, a Wireless Fidelity Wi-Fi P2P communication method, and a local area network communication method.
12. The method according to claim 10 or 11, characterized in that: The downloading, from the cloud server, second data sent by the first electrical device to the cloud server comprises: Acquire first data information of third data sent by the cloud server, where the third data includes the second data and data in the first data that has been saved in the storage module; According to the first data information, a request is made to the cloud server to download the second data in the third data that has not been end-to-end synchronized with the first electronic device.
13. The method according to any one of claims 10 to 12, characterized in that: The method further comprises: Receive fourth data sent by the first electronic device under preset conditions, where the fourth data is data that has been saved to the storage module by the first electronic device; the preset conditions include one or more of the following: the first electronic device fails to send the fourth data to the cloud server, the cloud synchronization function is not turned on for the first electronic device, the cloud space capacity is insufficient, and the priority of end-to-end synchronization is higher than the priority of end-to-cloud synchronization.
14. The method according to claim 13, characterized in that The method further comprises: receiving second data information of fifth data sent by the cloud server, where the fifth data is data of the first application sent by the first electronic device to the cloud server; According to the second data information, a request is made to the cloud server to download sixth data in the fifth data that has not been end-to-end synchronized with the first electronic device, wherein the sixth data does not include the fourth data.
15. The method according to claim 13 or 14, characterized in that The method further comprises: Receive first information of the seventh data sent by the first electronic device under the preset conditions, the seventh data is data that the first electronic device has saved to the storage module, the data amount of the seventh data is greater than a preset threshold, and the first information includes the storage address and / or abbreviation information of the seventh data.
16. An electronic device, characterized in that: include: A processor, a memory and a display screen, wherein the memory and the display screen are coupled to the processor, the memory is used to store computer program codes, and the computer program codes include computer instructions. When the processor reads the computer instructions from the memory, the electronic device executes the method as described in any one of claims 5 to 9.
17. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor reads the computer instructions from the memory, the electronic device executes the method as described in any one of claims 10-15.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a computer program, and when the computer program is executed on an electronic device, the electronic device executes the method as claimed in any one of claims 5 to 9; or the electronic device executes the method as claimed in any one of claims 10 to 15.
19. A computer program product, characterized in that When the computer program product is executed on a computer, the computer is enabled to execute the method according to any one of claims 5 to 9; or the computer is enabled to execute the method according to any one of claims 10 to 15.
Citation Information
Patent Citations
Data synchronization method, electronic equipment and system
CN119583567A
Application program synchronizing method, device and system
CN104794008A
Data synchronization method, electronic equipment and computer readable storage medium
CN113923230A
Mirroring method, device, storage medium, and computer program product
WO2023020528A1