Method, apparatus and terminal device for synchronizing data
By employing device combination information filtering and data verification mechanisms, the problems of data synchronization latency and low connection success rate in multi-device environments are resolved, achieving efficient and stable data synchronization and device connection.
Patent Information
- Application Number
- CN202310007252.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-04
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2043-01-04
AI Technical Summary
In a multi-device environment, when the central device synchronizes data with multiple terminal devices, problems such as increased latency and reduced connection success rate are likely to occur, especially when there is data transmission interference or a large number of concurrent devices.
By filtering out devices with combination relationships based on device combination information, data synchronization is only performed with these devices, reducing the number and amount of data synchronization, and a data verification mechanism is used to ensure synchronization quality.
It improves the efficiency of data synchronization and the success rate and stability of device connections, optimizes the user experience, and avoids connection failures and increased latency.
Smart Images

Figure CN118301170B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of communication, and more particularly, to a method, apparatus and terminal device for synchronizing data. BACKGROUND
[0002] A terminal device (or a center device) can be combined with other terminal devices in the surrounding environment to conveniently obtain services provided by the other terminal devices or provide services to the other terminal devices. For example, a multi-screen collaboration can be started by combining a mobile phone and a notebook computer, a screen projection for watching a movie can be realized by combining a mobile phone, a headset and a smart screen, and a distributed camera can be realized by combining a mobile phone and a tablet computer.
[0003] To support the implementation of the function, the center device needs to synchronize data with other terminal devices in the surrounding environment. When the number of terminal devices in the environment is large, a data synchronization concurrency phenomenon is likely to occur, that is, the center device simultaneously synchronizes data with two or more terminal devices, which further leads to a prolonged time delay of data synchronization and a reduced data synchronization rate with an increase in the number of concurrent devices. If the center device has data transmission or other interference, the time delay of data synchronization is further increased, and the connection success rate between the center device and other terminal devices is reduced, which eventually leads to a large amount of time required by the center device to establish a connection with other terminal devices. SUMMARY
[0004] Embodiments of the present application provide a method, apparatus and terminal device for synchronizing data, which can improve the efficiency of data synchronization between terminal devices.
[0005] In a first aspect, a method for synchronizing data is provided, including: determining, by a first device, that the first device has a combination relationship with a second device according to device combination information, the device combination information including device information having a combination relationship with the first device, and the combination relationship between the first device and the second device being that the first device and the second device can jointly support one or more distributed services; and synchronizing, by the first device, data of the second device from the second device.
[0006] In embodiments provided by the present application, a first device can screen peripheral devices according to device combination information and synchronize data with the screened devices, which can reduce the number of times of data synchronization of the first device in a multi-device environment, reduce the amount of data to be synchronized by the first device, reduce the time delay of data synchronization, improve the efficiency of data synchronization between devices and device connection, improve the success rate and stability of device connection in a multi-device environment, avoid problems such as device connection failure, connection concurrency or prolonged connection time delay, improve product competitiveness and optimize user experience.
[0007] With reference to the first aspect, in some implementations of the first aspect, the method further includes: the first device verifying the data of the second device.
[0008] In embodiments provided in the present application, the first device can verify the synchronized data after completing data synchronization with the second device, thereby improving the success rate of device connection.
[0009] With reference to the first aspect, in some implementations of the first aspect, the method further includes: the first device synchronizing data of a third device from the second device, the third device being a device having a combination relationship with the second device.
[0010] In embodiments provided in the present application, the first device can synchronize data of other devices, for example, a third device, from the second device, or in other words, the first device can only establish a connection with the second device, without synchronizing data of the third device from the third device and establishing a connection with the third device, thereby reducing the number of times of data synchronization between the first device and peripheral devices in a multi-device environment, improving data synchronization efficiency, and further avoiding problems such as device connection failure, connection concurrency, or connection time delay, thereby improving the success rate and stability of device connection in a multi-device environment.
[0011] With reference to the first aspect, in some implementations of the first aspect, before the first device synchronizes data of a third device from the second device, the method further includes: the first device determining, according to the device combination information, that the first device has a combination relationship with the third device.
[0012] In embodiments provided in the present application, when the second device stores data of other devices, for example, a third device, the first device can determine whether there is a combination relationship with the third device according to device combination information, synchronize data of the third device from the second device if there is a combination relationship, and not synchronize data of the third device if there is no combination relationship, thereby further filtering peripheral devices, greatly reducing the amount of data synchronized by the first device, and improving data synchronization efficiency. Furthermore, the first device determines that there is a combination relationship with the third device according to device combination information and synchronizes data of the third device from the second device, thereby reducing the number of times of data synchronization of the first device, improving data synchronization efficiency, and improving the stability and success rate of device connection in a multi-device environment.
[0013] With reference to the first aspect, in some implementations of the first aspect, the method further includes: the first device verifying the data of the third device.
[0014] In embodiments provided in the present application, the first device can verify the synchronized data after synchronizing data of the third device, thereby improving the success rate of device connection.
[0015] With reference to the first aspect, in some implementations of the first aspect, the method further includes: the first device storing the data of the second device and / or the data of the third device, or the first device uploading the data of the second device and / or the data of the third device to a server.
[0016] In the embodiments provided in the present application, the first device can store the data of the synchronized device into a cache area or a memory, and when the first device comes into the environment where the device with the synchronized data is located again, the data of the device can be directly called to complete the connection with the device, and the data of the device does not need to be synchronized again, thereby the efficiency of device connection and the success rate and stability of device connection can be improved; similarly, the first device can also upload the synchronized data to a server, and when the first device comes into the environment where the device with the synchronized data is located again, the data of the device can be directly downloaded from the server without the need of synchronization again, and storing the synchronized data in the server will not occupy the storage space of the device, and a large amount of device data can be stored.
[0017] With reference to the first aspect, in some implementations of the first aspect, the device combination information further includes first service information, the first service information being information of a distributed service that can be commonly supported by the first device and a device having a combination relationship with the first device.
[0018] In the embodiments provided in the present application, in addition to the device information having a combination relationship with the first device, the device combination information can also include information of a distributed service that can be commonly supported by the combination device, so that the first device can screen the devices needing to synchronize data in the surrounding environment according to the device combination information, reduce the number of data synchronization between devices and the amount of synchronized data, improve the efficiency of data synchronization between devices and device connection, and improve the stability and success rate of device connection.
[0019] With reference to the first aspect, in some implementations of the first aspect, before the first device determines that the first device has a combination relationship with the second device according to the device combination information, the method further includes: the first device sending a first broadcast message, the first broadcast message being used to discover devices in the surrounding of the first device.
[0020] In the embodiments provided in the present application, the first device can discover which devices exist in the surrounding environment by sending a first broadcast message, and then screen the devices needing to synchronize data from the discovered devices according to the device combination information, so that the number of data synchronization of the devices can be reduced, the efficiency of data synchronization can be improved, and the stability and success rate of device connection can be improved.
[0021] In a second aspect, a device for synchronizing data is provided, comprising: a determining unit configured to determine that a first device has a combination relationship with a second device according to device combination information, the device combination information comprising device information of devices having a combination relationship with the first device, the first device having a combination relationship with the second device meaning that the first device and the second device can jointly support one or more distributed services; and a processing unit configured to synchronize data of the second device from the second device.
[0022] With reference to the second aspect, in some implementations of the second aspect, the processing unit is further configured to verify the data of the second device.
[0023] With reference to the second aspect, in some implementations of the second aspect, the processing unit is further configured to synchronize data of a third device from the second device, the third device being a device having a combination relationship with the second device.
[0024] With reference to the second aspect, in some implementations of the second aspect, the determining unit is further configured to determine that the first device has a combination relationship with a third device according to the device combination information before the first device synchronizes data of the third device from the second device.
[0025] With reference to the second aspect, in some implementations of the second aspect, the processing unit is further configured to verify the data of the third device.
[0026] With reference to the second aspect, in some implementations of the second aspect, the processing unit is further configured to store the data of the second device and / or the data of the third device, or upload the data of the second device and / or the data of the third device to a server.
[0027] With reference to the second aspect, in some implementations of the second aspect, the device combination information further comprises first service information, the first service information being information of distributed services that the first device and devices having a combination relationship with the first device can jointly support.
[0028] With reference to the second aspect, in some implementations of the second aspect, the device further comprises a sending unit configured to send a first broadcast message, the first broadcast message being used to discover devices around the first device.
[0029] In a third aspect, a terminal device is provided, comprising a processor and a memory, the memory being configured to store a computer program, and the processor being configured to invoke and run the computer program from the memory, so that the terminal device performs the method for synchronizing data as described in the first aspect and any possible implementation of the first aspect.
[0030] In a fourth aspect, a chip system is provided, which includes at least one processor, and when program instructions are executed in the at least one processor, the program instructions cause the chip system to perform the method for synchronizing data as described in the first aspect and any possible implementation of the first aspect.
[0031] In a fifth aspect, a computer program storage medium is provided, which stores program codes, and when the program codes are run on a computer, the program codes cause the computer to perform the method for synchronizing data as described in the first aspect and any possible implementation of the first aspect.
[0032] In a sixth aspect, a computer program product is provided, which includes computer program codes, and when the computer program codes are run on a computer, the computer program codes cause the computer to perform the method for synchronizing data as described in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF DRAWINGS
[0033] Figure 1 Fig. 1 is a hardware structure schematic diagram of a terminal device provided by an embodiment of the present application.
[0034] Figure 2 Fig. 2 is a software structure schematic diagram of a terminal device provided by an embodiment of the present application.
[0035] Figure 3 Fig. 3 is a schematic diagram of an application scenario provided by an embodiment of the present application.
[0036] Figure 4 Fig. 4 is a flow schematic diagram of a method for synchronizing data provided by an embodiment of the present application.
[0037] Figure 5 Fig. 5 is a device combination relationship schematic diagram provided by an embodiment of the present application.
[0038] Figure 6 Fig. 6 is a flow schematic diagram of a method for synchronizing data provided by an embodiment of the present application.
[0039] Figure 7 Fig. 7 is a user interface schematic diagram of a terminal device provided by an embodiment of the present application.
[0040] Figure 8 Fig. 8 is a structure block diagram of an apparatus for synchronizing data provided by an embodiment of the present application.
[0041] Figure 9 Fig. 9 is a structure block diagram of a terminal device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0042] The technical solutions in the embodiments of the present application will be described below with reference to the drawings.
[0043] In this specification, reference to “one embodiment” or “some embodiments” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. The appearances of the phrases “in one embodiment”, “in some embodiments”, “in other embodiments”, “in additional embodiments” and so on in various places in the specification are not necessarily all referring to the same embodiment, unless otherwise are specifically labeled as such.
[0044] In each embodiment of the present application, the first, the second, and the like are only used to represent that a plurality of objects are different. For example, the first device and the second device are only used to represent different devices. The above-mentioned first, the second, and the like should not cause any influence to the devices themselves and the number, and should not cause any limitation to the embodiments of the present application.
[0045] The terms “comprise”, “contain”, “have” and their conjugates do not mean “consist of”, unless otherwise specifically emphasized.
[0046] Exemplarily, Figure 1 is a schematic diagram of a hardware structure of a terminal device 100. The terminal device 100 can 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 loudspeaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a compass 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, and the like.
[0047] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation to the terminal device 100. In some other embodiments of the present application, the terminal device 100 can include more or fewer components than the illustration, or combine some components, or split some components, or different arrangement of components. The illustrated components can be implemented in hardware, software or a combination of software and hardware.
[0048] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent components or integrated in one or more processors. In some embodiments, the terminal device 100 can also include one or more processors 110. Among them, the controller can generate operation control signals according to instruction operation codes and timing signals to complete the control of fetching and executing instructions. In other embodiments, the processor 110 can also be provided with a memory for storing instructions and data. Exemplarily, the memory in the processor 110 can be a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can directly call from the memory. In this way, repeated access is avoided, the waiting time of the processor 110 is reduced, and the efficiency of the terminal device 100 in processing data or executing instructions is improved.
[0049] In some embodiments, the processor 110 can include one or more interfaces. The interface can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device 100, or to transmit data between the terminal device 100 and a peripheral device.
[0050] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation on the terminal device 100.
[0051] The charging management module 140 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 140 can receive charging input from a wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 can receive wireless charging input through a wireless charging coil of the terminal device 100. The charging management module 140 can charge the battery 142 and also supply power to the wearable device through the power management module 141.
[0052] The power management module 141 is configured 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 to supply power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160, etc. The power management module 141 can also be configured to monitor parameters such as battery capacity, battery cycle count, battery health status (leakage, impedance), etc.
[0053] The wireless communication function of the terminal 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, etc.
[0054] The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the terminal device 100 can be configured to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas.
[0055] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the terminal device 100. The mobile communication module 150 can include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1 and perform filtering, amplification, etc. on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor and convert the signals into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be arranged in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 can be arranged in the same device.
[0056] The wireless communication module 160 can provide solutions for wireless communication, including wireless local area networks (WLAN) (such as wireless fidelity (WiFi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, and the like, which are applied to the terminal device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency-modulates and filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 can also receive signals to be transmitted from the processor 110, frequency-modulate them, amplify them, and radiate them as electromagnetic waves via the antenna 2.
[0057] The terminal device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs that execute program instructions to generate or change display information.
[0058] The display screen 194 is used to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), or the like. The display screen 194 of the terminal device 100 can be a flexible screen.
[0059] The terminal device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like. The ISP is used to process data fed back by the camera 193.
[0060] Camera 193 is used to capture still images or videos. Objects project optical images through the lens to the photosensitive element. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into a standard RGB, YUV, etc. format image signal.
[0061] Digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals.
[0062] Video codec is used to compress or decompress digital video. Terminal device 100 can support one or more video codecs.
[0063] NPU is a neural-network (NN) computing processor, which is inspired by the structure of biological neural networks, such as the transmission mode between human brain neurons, and can quickly process input information and continuously self-learn.
[0064] 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 terminal device 100. The external memory card communicates with processor 110 through external memory interface 120 to realize data storage function. For example, music, video, etc. files are saved in the external memory card.
[0065] The internal memory 121 can be used to store one or more computer programs including instructions. The processor 110 can cause the terminal device 100 to perform the methods provided by some embodiments of the present application, as well as various applications and data processing, etc., by running the above-mentioned instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, and can also store one or more applications (such as a gallery, contacts, etc.) and the like. The data storage area can store data created during use of the terminal device 100 (such as photos, contacts, etc.) and the like. In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory such as one or more disk storage components, flash memory components, universal flash storage (UFS), etc. In some embodiments, the processor 110 can cause the terminal device 100 to perform the methods provided by the embodiments of the present application, as well as other applications and data processing, by running the instructions stored in the internal memory 121 and / or the instructions stored in the memory disposed in the processor 110. The terminal device 100 can realize audio functions such as music playing, recording, etc. through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor, etc.
[0066] The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0067] Figure 2 FIG. 1 is a software structure block diagram of the terminal device 100 according to an embodiment of the present application. The layered architecture divides the software into several layers, each of which has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer. The application layer can include a series of application packages.
[0068] As shown in FIG. 1, the application packages can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc. Figure 2
[0069] The application framework layer provides an application programming interface (API) and programming framework for the applications of the application layer. The application framework layer includes some pre-defined functions.
[0070] For example, in this application, algorithms for processing images, etc. can be included in the application framework layer.
[0071] As shown in Figure 2 The application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc.
[0072] The window manager is used to manage the window program. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, and intercept the screen, etc.
[0073] The content provider is used to store and obtain data, and make the data accessible to the application program. The data can include video, image, audio, dialed and received phone, browsing history and bookmark, phone book, etc.
[0074] The view system includes visual controls, such as a control for displaying text, a control for displaying pictures, etc. The view system can be used to build an application program. A display interface can be composed of one or more views. For example, a display interface including a short message notification icon can include a view for displaying text and a view for displaying pictures.
[0075] The phone manager is used to provide the communication function of the terminal device 100. For example, the management of the call state (including connection, hang-up, etc.).
[0076] The resource manager provides various resources for the application program, such as localized strings, icons, pictures, layout files, video files, etc.
[0077] The notification manager makes the application program display notification information in the status bar, which can be used to convey a type of message that can automatically disappear after a short stay without user interaction. For example, the notification manager is used to inform the completion of downloading, message reminders, etc. The notification manager can also be a notification in the form of a chart or a scroll bar text appearing in the top status bar of the system, such as a notification of an application program running in the background, and can also be a notification in the form of a dialogue window appearing on the screen. For example, prompting text information in the status bar, issuing a prompt sound, terminal device vibration, indicator light blinking, etc.
[0078] The Android runtime includes a core library and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
[0079] The core library includes two parts: one part is a function function that the java language needs to call, and the other part is the core library of Android.
[0080] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java files of the application layer and the application framework layer into binary files. The virtual machine is used to perform functions such as management of object life cycle, stack management, thread management, security and exception management, and garbage collection.
[0081] The system library can include a plurality of function modules. For example: a surface manager, media libraries, a three-dimensional graphics processing library (for example: OpenGL ES), a 2D graphics engine (for example: SGL), etc.
[0082] The surface manager is used to manage the display subsystem and provides 2D and 3D layer fusion for multiple applications.
[0083] The media library supports a plurality of commonly used audio, video format playback and recording, and static image files. The media library can support a plurality of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0084] The three-dimensional graphics processing library is used to realize three-dimensional graphics drawing, image rendering, synthesis, and layer processing, etc.
[0085] The 2D graphics engine is a drawing engine for 2D drawing.
[0086] The kernel layer is a layer between hardware and software. The kernel layer at least includes a display driver, a camera driver, an audio driver, and a sensor driver.
[0087] Figure 3 is an application scenario diagram provided by an embodiment of the present application. As shown in Figure 3 The device M can be a terminal device newly added to a multi-device environment, which can include a plurality of terminal devices such as device A, device B, device C, and device D, and the device M can synchronize data with one or more of the terminal devices, complete discovery and connection of devices that have a combination relationship with the device M.
[0088] The terminal device can be a television, a projector, a smart screen, or a large-screen device, or can be a treadmill or a sports device, or can be a smart watch, a smart bracelet, a headset, a head-mounted display device, or a wearable device, or can be a notebook computer, a tablet computer, a mobile phone, a sound box, a printer, or other devices, and the type of the terminal device is not limited in the present application.
[0089] The combination relationship between the device M and other devices can mean that the device M and other devices can support one or more distributed services. For example, assuming that the device M has a combination relationship with the device A, the device M and the device A can support at least one distributed service, for example, the device M is a mobile phone and the device A is a tablet computer, the device M and the device A can support the implementation of a distributed camera, and the device M can call the camera of the device A to take a picture; for another example, the device A is a large-screen device and the device M is a mobile phone, and a motion health application on the device M can be transferred to the device A, so that the user can watch the display screen of the large-screen device and follow the video content to exercise.
[0090] When the terminal device is shipped, the device combination information can be pre-stored in the database of the terminal device, and the device combination information can include device information that can have a combination relationship with the current device, for example, including device types that can have a combination relationship. For example, the current terminal device is a mobile phone, and the device types that have a device combination relationship with the current terminal device can include a notebook computer, a tablet computer, a large-screen device, and a mobile phone, etc. After the system of the terminal device is upgraded, the device combination information can be updated, and the terminal device can update, download and store the device combination information accordingly.
[0091] Optionally, the device combination information can also include information about devices that have a combination relationship with the current device and distributed services that can be supported by the current device and the devices, that is, the first service information, as shown in Table 1, the device M is the current device, and the device types that can have a combination relationship with the device M can include device type one, device type two and device type three, the device M can support distributed services 1, service 2 and service 3 after being combined with the device type one, the device M can support services 1 and service 2 after being combined with the device type two, and the device M can support service 1 after being combined with the device type three.
[0092] Table 1
[0093] Device combination relationship Distributed service information Device M + device type one Service 1, service 2, service 3 Device M + device type two Service 1, service 2 Device M + device type three Service 1 …… ……
[0094] For example, the device M is a mobile phone, and the device types that have a combination relationship with the device M can include a mobile phone, a tablet computer, a notebook computer and a large-screen device, etc., and the mobile phone and the tablet computer can support distributed camera, multi-screen collaboration and other services after being combined or connected, and the device M and the combined device can be the same account device or different account devices. The device types that have a combination relationship with the device M can be the same as the device types corresponding to the device M, or can be different.
[0095] The device M can not only construct a combination or establish a connection with one device having a combination relationship to realize a distributed service, but also can construct a combination with two or more devices simultaneously to realize a distributed service. For example, the device M is a mobile phone, which can construct a combination with a headset and a large-screen device simultaneously, and can play a video image on the mobile phone on the large-screen device and listen to audio with the headset to realize screen projection and watching.
[0096] The following describes Figure 4 A method for synchronizing data is introduced, which includes steps S401 and S402.
[0097] S401, the first device determines that there is a combination relationship with the second device according to device combination information, the device combination information includes device information having a combination relationship with the first device, and the first device and the second device have a combination relationship, which means that the first device and the second device can support one or more distributed services together.
[0098] S402, the first device synchronizes data of the second device from the second device.
[0099] The first device can be the device M, the second device can be a device around the first device, and the second device can be any one of the device types one, two and three having a combination relationship with the device M. The first device can determine whether there is a combination relationship with the second device according to the device combination information. If there is a combination relationship between the first device and the second device, the first device synchronizes data of the second device from the second device. If there is no combination relationship between the first device and the second device, the first device does not need to synchronize data of the second device from the second device.
[0100] The second device can be any one of the devices around the first device. After the first device discovers the devices around the first device, the first device can select any one of the devices around the first device, and then determine whether there is a combination relationship with the selected device according to the device combination information. If there is a combination relationship, the first device determines that data of the selected device needs to be synchronized. If there is no combination relationship, the first device determines that data of the selected device does not need to be synchronized.
[0101] The first device can also determine which devices around the first device have a combination relationship with the first device according to the device combination information, and then select any one of the devices having a combination relationship with the first device to synchronize data of the selected device. That is, the second device can also be any one of the devices around the first device having a combination relationship with the first device.
[0102] In some embodiments, before the first device performs step S401, the first device can send a first broadcast message, which can be used to discover peripheral devices of the first device. Accordingly, after receiving the first broadcast message, the peripheral devices can send a first response message to the first device, so that the first device knows which terminal devices exist in the peripheral environment, including the types of the terminal devices. Further, the first device determines which devices have a combination relationship according to the device combination information, and synchronizes data with the devices having a combination relationship.
[0103] The first broadcast message can be a Bluetooth broadcast message. The data of the second device synchronized by the first device can include an account, configuration, and service data of the second device, and the like, which are not limited in the present application.
[0104] In some embodiments, the method further includes: the first device verifying the data of the second device. After the first device synchronizes the data of the second device, the first device and the second device can generate a data verification code, and the first device can verify whether the generated data verification code is the same as the data verification code generated by the second device. If the data verification codes generated by the two devices are the same, it means that the data synchronization is successful, and if they are not the same, the data synchronization fails, and there can be data loss, data collision, or data expiration, and the like, and the data synchronization can be performed again.
[0105] Through the embodiments provided in the present application, the terminal device can determine whether there is a combination relationship with the peripheral devices based on the device combination information, synchronize the data of the devices having a combination relationship, and the data of the devices not having a combination relationship does not need to be synchronized, thereby being able to filter the peripheral devices, reduce the number of data synchronization and the amount of data synchronization, reduce the time delay of data synchronization, improve the efficiency of data synchronization, and further improve the success rate and stability of device connection.
[0106] In some embodiments, the first device can not only synchronize the data of the second device from the second device side, but also synchronize the data of other devices having established a connection with the second device from the second device side. Figure 5 is a schematic diagram of an example of a device combination relationship provided by the embodiments of the present application, as shown in Figure 5 The device M can discover the above devices through a first broadcast message, and the bidirectional arrow between the devices indicates that there is a combination relationship between the two devices. If the device M determines that there is a combination relationship with the device A, and the device M can synchronize the data of the device A from the device A side, as shown in Figure 4The steps performed by the first device and the second device in the described method, the first device can be device M, and the second device can be device A. Device M can also synchronize data of other devices from device A. The following describes the method of synchronizing data of other devices from device A by device M. Figure 6 Another method of synchronizing data provided by the present application is introduced as follows. Figure 6 As shown in the method, the method can include steps S601-S603.
[0107] S601, device M determines, according to device combination information, that there is a combination relationship with device B.
[0108] The device B is a third device, which can be a device that has established a connection with device A, or in other words, device A has synchronized data of device B. In other words, as shown in the following, device A and device B have a combination relationship and can jointly support one or more distributed services. Figure 5
[0109] S602, device M synchronizes data of device B from device A.
[0110] In some embodiments, device M can determine, according to device combination information, whether device M has a combination relationship with device A and device B respectively when discovering peripheral devices including device A and device B. After device M synchronizes data of device A from device A, if there is data of device B at device A, device M can continue to synchronize data of device B from device A.
[0111] In some embodiments, device M can first determine that there is a combination relationship with device A and synchronize data of device A from device A, and then determine whether device M has a combination relationship with device B, and further determine whether data of device B needs to be synchronized.
[0112] In some embodiments, device M determines that there is no combination relationship with device A, but device A has established a connection with device B and stores data of device B. Device M can not synchronize data of device A, but synchronize data of device B from device A.
[0113] Similarly, the data of device B can include account, configuration, and service data of device B.
[0114] S603, device M verifies data of device B.
[0115] After synchronizing data from device B from device A, device M can generate a data checksum and determine if it matches the checksum generated by device A. If they match, data synchronization is successful; otherwise, synchronization fails, and the process restarts. Alternatively, when device A synchronizes data from device B, it can generate and store the checksum. When device M synchronizes data from device A from device B, it uses the stored checksum and the checksum generated by device M to perform data verification. This application does not limit the method of data verification.
[0116] It should be understood that the steps for device A to synchronize data with device B can be similar to the steps for device M to synchronize data with device A. In other words, after discovering device B, device A can directly synchronize the data of device B from device B. Alternatively, similar to the steps for device M to synchronize the data of device B, device A can synchronize the data of device B from other devices. This application does not limit this.
[0117] In some embodiments, device A may synchronize not only data from device B, but also data from other devices such as device C and / or device D. Further, device M can determine whether it has a combination relationship with device C and / or device D based on device combination information, and thus determine whether data synchronization with device C and / or device D is necessary. Similarly, if device A synchronizes data from device C, it indicates that device A and device C have a combination relationship and can jointly support one or more distributed services.
[0118] As an example, such as Figure 5 As shown, device A and device C are in a combination relationship and device A has data from device C synchronized. If device M determines that device M and device C are not in a combination relationship, then device M does not need to synchronize data from device C from device A.
[0119] As another example, such as Figure 5 As shown, device A and device D are not combined, and device A has not synchronized data from device D. If device M determines that it is combined with device D, then device M can synchronize the data of device D from device D after synchronizing the data of device A and device B. The process of device M synchronizing the data of device D is similar to the steps of device M synchronizing the data of device A, that is, similar to steps S401 to S402 of the first device synchronizing the data of the second device mentioned above, and will not be repeated here.
[0120] Similar to how device M synchronizes data from device A to device B, when device M synchronizes data from device D to device D, device M can also synchronize data from device D to devices that have a combination relationship with both device M and device D, and perform data verification.
[0121] The device M and the device A, the device B and the device D can be the same type of device, for example, can all be a mobile phone, or can be different types of devices, for example, the device M is a notebook computer, the device A is a tablet computer, and the present application does not limit the number or type of devices that the device M can synchronize data.
[0122] The device M, the device A, the device B, the device C and the device D described above are only used as an example to illustrate the method of the device M synchronizing the data of the peripheral device, and should not be limited to the number or type of devices that the device M can synchronize data.
[0123] The method for synchronizing data provided by the embodiments of the present application can synchronize the data of other devices from one device when a device joins a new multi-device environment, greatly reducing the number of data synchronization, reducing the time delay of data synchronization, avoiding the problems of connection failure or long connection time when the number of peripheral terminal devices is large, improving the success rate and stability of device connection, and optimizing the user experience. For example, the device M discovers that the devices with which it has a combination relationship in the periphery are the device A and the device B, and the device M does not need to establish a connection with the device A and the device B respectively and synchronize data, but can only establish a connection with the device A, synchronize the data of other devices (such as the device B) from the device A to reduce the number of data synchronization and the number of device connections, and improve the success rate and stability of device connection.
[0124] In some embodiments, after the device M synchronizes the data of other devices, it can store the synchronized data in a cache area or memory, or upload the synchronized data to a server. So that the next time the user brings the device M into the environment, after the device M discovers the device whose data has been synchronized, it can directly call the data of the device from the local or cloud, without occupying the data synchronization channel to re-synchronize the data of the device, and only needs to synchronize the data with new devices that have not been synchronized, thereby further improving the success rate and stability of device connection.
[0125] Storing the data of the device in the local can improve the speed of calling the data synchronization of the device, and after the user leaves the current environment for a short time and returns, there is no need to re-synchronize the data, and the cache data occupies less storage space of the device. Uploading the data of the device to the server, for example, saving the data under the user account in the cloud, does not occupy the storage space of the device, and can store a large amount of device synchronization data. When the device is restored to factory settings and reconfigured, the device data can be directly downloaded from the cloud without re-synchronizing the data.
[0126] Optionally, after the user downloads the synchronized data from the cloud, the downloaded data can also be verified in the cloud.
[0127] After the method for synchronizing data provided in the embodiments of the present application is used, the "super terminal" interface of the terminal device can quickly and stably display the peripheral devices, and thus the combination of the center device and the peripheral devices and the device cooperative operation can be realized, and the distributed service can be realized. Figure 7 is a schematic diagram of a user interface of a terminal device provided in the embodiments of the present application, Figure 7 The center device, that is, the device M, is taken as a mobile phone as an example for introduction, and the device M can also be a notebook computer or other terminal device. As shown in Figure 7 (a), after the device M synchronizes data with the devices in the peripheral environment that have a combination relationship, the devices with synchronized data are quickly and stably presented on the user interface. The devices A, B and the devices D, E and F can be devices that have synchronized data with the device M through the method for synchronizing data described in the above embodiments, and the devices that do not have a combination relationship with the device M, such as the device C in the above method embodiments, can not be presented in the interface, so that the user can clearly know which devices in the peripheral environment can build a combination with the center device M and realize device cooperation.
[0128] Further, the user can select the required device from the presented devices according to actual use requirements, and build a combination with the center device M. For example, the user can pull or drag the required device, such as the device A, to the position of the device M, as shown in Figure 7 (b), so that the device M builds a combination with the device A.
[0129] Figure 7 (c) takes a camera as an example to introduce the task flow method of the device M and the device A after the device M builds a combination with the device A. As shown in Figure 7 (c), when the user opens the camera application, a prompt information can be displayed on the camera application interface, for example: click to transfer the "camera" application to the device A. Further, in response to the user clicking the prompt box, the device M can call the camera of the device A, and the image collected by the camera of the device A can be displayed in the image collection area of the camera of the device M (not shown in the figure), and the distributed photographing service can be realized. The distributed camera service is a distributed service that can be supported by the device M and the device A together, and the information of the distributed service can be included in the device combination information of the device M and / or the device A.
[0130] The method for synchronizing data provided in the embodiments of the present application is introduced above in combination with Figures 4 to 7 The apparatus for synchronizing data provided in the embodiments of the present application is introduced below in combination with Figure 8
[0131] As shown in Figure 8 As shown, the apparatus 800 can include a determining unit 810 and a processing unit 820, which cooperate with each other, so that the apparatus 800 can perform the above-mentioned Figures 4 to 6 operations in steps S401 and S601 and the like in the described embodiments. Exemplarily, the determining unit 810 can be configured to perform the operations in steps S401 and S601 and the like in the described embodiments. Figures 4 to 6 The processing unit 820 can be configured to perform the operations in steps S402, S602 and S603 and the like in the described embodiments. Figures 4 to 6
[0132] Optionally, the apparatus 800 can further include a sending unit 830, which can be configured to perform the operations of sending the first broadcast information in the above-mentioned embodiments.
[0133] The embodiments of the present application further provide a terminal device 900, which is configured to perform the above-mentioned method of synchronizing data. The terminal device 900 can include a processor 910 and a memory 920. The processor can be configured to perform various processing operations performed by the first device in the embodiments as shown, such as displaying the synchronized data, checking the data and the like. The memory has one or more computer programs stored thereon, which include instructions that, when executed by one or more processors, cause any of the above-mentioned methods of synchronizing data to be performed. Figures 4 to 6
[0134] The embodiments of the present application further provide a chip system, which includes at least one processor. When program instructions are executed in the at least one processor, the terminal device performs the above-mentioned method of synchronizing data in the embodiments.
[0135] The embodiments of the present application further provide a computer storage medium, which has computer instructions stored therein. When the computer instructions are run on a terminal device, the terminal device performs the above-mentioned related method steps to implement the above-mentioned method of synchronizing data in the embodiments.
[0136] The embodiments of the present application further provide a computer program product, which, when run on a computer, causes the computer to perform the above-mentioned related steps to implement the above-mentioned method of synchronizing data in the embodiments.
[0137] In addition, the embodiments of the present application further provide an apparatus, which can be a chip, a component or a module. The apparatus can include a processor and a memory connected to each other. The memory is configured to store computer execution instructions. When the apparatus is running, the processor can execute the computer execution instructions stored in the memory, so that the chip performs the above-mentioned method of synchronizing data in the embodiments.
[0138] The terminal device, the computer storage medium, the computer program product or the chip provided in the embodiment can be used to execute the corresponding method provided above, and thus the beneficial effects achieved thereby can refer to the beneficial effects of the corresponding method provided above, which will not be repeated here.
[0139] Through the above description of the embodiments, those skilled in the art can understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0140] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. For example, the apparatus embodiment described above is only illustrative, for example, the division of the module or unit is only a logical function division, and in actual implementation, there can be another division manner, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0141] The unit described as a separate component can be or can not be physically separated, and the component shown as a unit can be one physical unit or a plurality of physical units, that is, it can be located in one place or can be distributed to a plurality of different places. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.
[0142] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically independently, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0143] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The software product is stored in a storage medium, including a plurality of instructions to make a device (which can be a single-chip microcomputer, a chip, etc.) or a processor execute all or part of the steps of the various embodiments of the method of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0144] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method of synchronizing data, characterized by, The method comprises: The first device determines, according to device combination information, that the first device has a combination relationship with a second device, the device combination information comprising device information of a device having a combination relationship with the first device, the first device having a combination relationship with the second device meaning that the first device and the second device can jointly support one or more distributed services; The first device determines, according to the device combination information, that the first device has a combination relationship with a third device, the third device being a device having a combination relationship with the second device; The first device synchronizes data of the third device from the second device.
2. The method of claim 1, wherein, Before the first device synchronizes data of the third device from the second device, the method further comprises: The first device synchronizes data of the second device from the second device.
3. The method of claim 2, wherein, The method further comprises: The first device checks data of the second device.
4. The method according to any one of claims 1 to 3, characterized in that, The method further comprises: The first device checks data of the third device.
5. The method according to claim 2 or 3, characterized in that, The method further comprises: The first device stores data of the second device and / or data of the third device, or The first device uploads data of the second device and / or data of the third device to a server.
6. The method according to any one of claims 1 to 3, characterized in that, The device combination information further comprises first service information, the first service information being information of distributed services that the first device and a device having a combination relationship with the first device can jointly support.
7. The method according to any one of claims 1 to 3, characterized in that, Before the first device determines, according to device combination information, that the first device has a combination relationship with a second device, the method further comprises: The first device sends a first broadcast message, the first broadcast message being used to discover devices around the first device.
8. An apparatus for synchronizing data, the apparatus comprising: The method comprises: A determining unit is configured to determine, according to device combination information, that a first device has a combination relationship with a second device, the device combination information comprising device information of a device having a combination relationship with the first device, the first device having a combination relationship with the second device meaning that the first device and the second device can jointly support one or more distributed services; A processing unit is configured to determine, according to the device combination information, that the first device has a combination relationship with a third device, the third device being a device having a combination relationship with the second device; The processing unit is further configured to synchronize data of the third device from the second device.
9. The apparatus of claim 8, wherein, The processing unit is further configured to, before synchronizing data of the third device from the second device, synchronize data of the second device from the second device.
10. The apparatus of claim 9, wherein, The processing unit is further configured to check data of the second device.
11. The apparatus of any one of claims 8-10, wherein, The processing unit is further configured to check data of the third device.
12. The apparatus of claim 9 or 10, wherein, The processing unit is further configured to store data of the second device and / or data of the third device, or The processing unit is further configured to upload data of the second device and / or data of the third device to a server.
13. The apparatus of any one of claims 8-10, wherein, The device combination information further comprises first service information, the first service information being information of distributed services that the first device and a device having a combination relationship with the first device can jointly support.
14. The apparatus of any one of claims 8-10, wherein, The apparatus further comprises: A sending unit is configured to send a first broadcast message for discovering devices around the first device before determining that the first device and the second device have a combination relationship according to the device combination information.
15. A terminal device, comprising: The method comprises: A processor and a memory, the memory is configured to store a computer program, and the processor is configured to call and run the computer program from the memory, so that the terminal device executes the method for synchronizing data according to any one of claims 1 to 7.
16. A chip system, characterized by The chip system comprises at least one processor, and when program instructions are executed in the at least one processor, the method for synchronizing data according to any one of claims 1 to 7 is realized.
17. A computer program storage medium, characterized in that, The computer readable medium stores program codes, and when the program codes are run on a computer, the computer executes the method for synchronizing data according to any one of claims 1 to 7.
Citation Information
Patent Citations
Distributed service scheduling method and related device
CN115086346A
Method and device for establishing connection between multiple devices
CN115278611A