A method, system and device for multi-terminal data synchronization
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-22
- Publication Date
- 2026-08-14
AI Technical Summary
[0003]鉴于上述问题,本发明实施例提供了一种多端数据同步方法、系统及装置,能够保证多端数据的同步,避免了数据丢失以及数据错乱现象的产生,提高了数据同步的效率和用户体验,用于解决现有技术中多端数据同步触发存在数据错乱、多端数据不同步和数据同步效率低的问题
Smart Images

Figure CN117216165B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data synchronization technology, specifically to a multi-terminal data synchronization method, system, and apparatus. Background Technology
[0002] Data synchronization is fundamental to interoperability. From small-scale communication between multiple applications within a single device to large-scale interaction between multiple devices, data synchronization is essential. In scenarios involving mobile phone and vehicle-to-vehicle (V2V) connectivity, data synchronization relies on a cloud platform. To reduce the burden on the cloud platform, vehicle-side data synchronization is triggered only under specific circumstances to decrease the frequency of requests. However, this approach can easily lead to data inconsistencies. For example, if both the vehicle and mobile devices contain data 'a', and the user deletes 'a' on the mobile device, the V2V system, due to infrequent synchronization, may not receive a real-time notification that 'a' has been deleted. The next time data synchronization is triggered, the vehicle may assume the mobile device does not contain 'a' and will reverse-synchronize 'a' from its local device, causing the deleted 'a' to reappear. This results in data inconsistencies and asynchrony between devices, severely impacting data synchronization efficiency and user experience. Summary of the Invention
[0003] In view of the above problems, embodiments of the present invention provide a multi-terminal data synchronization method, system and apparatus, which can ensure the synchronization of multi-terminal data, avoid data loss and data disorder, improve the efficiency of data synchronization and user experience, and solve the problems of data disorder, multi-terminal data asynchrony and low data synchronization efficiency in the prior art.
[0004] According to one aspect of the present invention, a multi-terminal data synchronization method is provided, applied to a device, the method comprising:
[0005] Monitor the current working status locally;
[0006] If the current working state meets the preset data synchronization triggering conditions, the local application data is fused to obtain local fused data corresponding to the identity identifier and uploaded to the cloud.
[0007] Receive cloud-fused data from the cloud, wherein the cloud-fused data is obtained by the cloud fusion of local fused data received under the same identity identifier;
[0008] The cloud-based fused data is used to overwrite the local fused data.
[0009] According to another aspect of the present invention, a multi-terminal data synchronization method is provided, applied in the cloud, the method comprising:
[0010] Receive locally integrated data with identification tags uploaded from multiple devices;
[0011] Local fusion data under the same identity identifier is fused in the cloud to obtain cloud-fused data;
[0012] Based on the identity identifier, the cloud-integrated data is sent to the corresponding device.
[0013] According to another aspect of the present invention, a multi-terminal data synchronization system is provided, the system comprising:
[0014] Device-side and cloud-side;
[0015] The device is used to monitor the current working status locally; if the current working status meets the preset data synchronization triggering conditions, the local application data is fused to obtain local fused data corresponding to the identity identifier and uploaded to the cloud.
[0016] The cloud is connected to the device and is used to receive local fusion data with identity identifiers uploaded by multiple device terminals; to perform cloud fusion on the local fusion data under the same identity identifier to obtain cloud fusion data; and to send the cloud fusion data to the corresponding device terminal based on the identity identifier.
[0017] The device receives cloud-fused data from the cloud, which is obtained by fusing local fused data received under the same identity identifier from the cloud; the cloud-fused data is then used to overwrite the local fused data.
[0018] According to another aspect of the present invention, a multi-terminal data synchronization device is provided, applied to a device, the device comprising:
[0019] The local monitoring module is used to monitor the current working status locally;
[0020] The local fusion module is used to fuse local application data to obtain local fused data corresponding to the identity identifier and upload it to the cloud if the current working state meets the preset data synchronization triggering conditions.
[0021] The data receiving module is used to receive cloud-fused data from the cloud, wherein the cloud-fused data is obtained by the cloud fusing local fused data received under the same identity identifier;
[0022] The data synchronization module is used to overwrite the local fused data with the cloud-fused data.
[0023] According to another aspect of the present invention, a multi-terminal data synchronization device is provided, applied in the cloud, characterized in that the device comprises:
[0024] The data receiving module is used to receive locally integrated data with identification tags uploaded from multiple devices.
[0025] The cloud-to-cloud fusion module is used to pause the processing of a data synchronization request initiated by another device if a data synchronization request is received during the data synchronization process between the cloud and the current device.
[0026] The data delivery module is used to release the synchronization lock after the data synchronization on the current device is completed, so as to process the data synchronization request.
[0027] According to another aspect of the present invention, a multi-terminal data synchronization device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, wherein the executable instruction causes the processor to perform the operation of the multi-terminal data synchronization method as described in the above embodiments.
[0028] According to another aspect of the present invention, a computer-readable storage medium is provided, the storage medium storing at least one executable instruction that causes a multi-application-based multi-terminal data low-frequency synchronization device / apparatus to perform the operation of the multi-terminal data synchronization method as described in the above embodiments.
[0029] This invention integrates local application data from multiple devices with cloud data, ensuring that the cloud-integrated data is the latest. Each device pulls the latest data to overwrite the local data to achieve multi-device data synchronization. This avoids data loss and data corruption during synchronization, guarantees data synchronization for multiple devices logged into the same account, and improves the efficiency of multi-device data synchronization.
[0030] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0031] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0032] Figure 1 A flowchart illustrating a first embodiment of the multi-terminal data synchronization method provided by the present invention is shown.
[0033] Figure 2 A flowchart illustrating a second embodiment of the multi-terminal data synchronization method provided by the present invention is shown.
[0034] Figure 3 A flowchart illustrating a third embodiment of the multi-terminal data synchronization method provided by the present invention is shown;
[0035] Figure 4 A schematic diagram of an embodiment of the multi-terminal data synchronization system provided by the present invention is shown;
[0036] Figure 5 This diagram illustrates the interaction process of a first embodiment of the multi-terminal data synchronization system provided by the present invention.
[0037] Figure 6 An example diagram of multi-application data fusion provided by the present invention is shown;
[0038] Figure 7 This diagram illustrates the interaction process of a second embodiment of the multi-terminal data synchronization system provided by the present invention.
[0039] Figure 8 A schematic diagram of the structure of a first embodiment of the multi-terminal data synchronization device provided by the present invention is shown.
[0040] Figure 9 A schematic diagram of the structure of a second embodiment of the multi-terminal data synchronization device provided by the present invention is shown;
[0041] Figure 10 A schematic diagram of an embodiment of the multi-terminal data synchronization device provided by the present invention is shown. Detailed Implementation
[0042] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0043] Figure 1 A flowchart of a first embodiment of the multi-terminal data synchronization method of the present invention is shown. This method is applied to the device side and is executed by a multi-terminal data synchronization device. Figure 1 As shown, the method includes the following steps:
[0044] Step 110: Monitor the current working status of the local machine.
[0045] In this embodiment, the device side includes: the vehicle side and the mobile electronic terminal. For example, the mobile electronic terminal includes: mobile phone APP, tablet, and smartwatch, etc.
[0046] In this embodiment, the local current operating status is monitored by related devices installed on the device itself. For example, when the vehicle is powered on, the sensors or related detection devices on the vehicle can detect the vehicle's power-on signal, which indicates that the vehicle is currently in an operating state. The above examples are for illustrative purposes only and are not intended to be limiting. They can be adapted according to actual application needs.
[0047] Step 120: If the current working state meets the preset data synchronization triggering conditions, the local application data is fused to obtain the local fused data corresponding to the identity identifier and uploaded to the cloud.
[0048] In this embodiment, the preset data synchronization triggering conditions include at least one of the following: powering on the device, reconnecting the device to the cloud network, and switching applications on the device. Specifically, each device establishes a communication connection with the cloud and performs multi-device data synchronization only when it is powered on, reconnected to the cloud network, or when an application is switched. For example, powering on the vehicle, restoring network access after a vehicle network outage, or switching app interfaces on a mobile device are examples only and are not intended to limit the scope of the data synchronization.
[0049] In this embodiment, the device establishes a communication connection with the cloud via at least one of 4G, 5G, and Wi-Fi networks to execute a multi-device data synchronization process. It should be noted that the communication between the device and the cloud in this embodiment is a non-real-time, non-long-term connection; the connection is only established when data synchronization is triggered. This greatly reduces the concurrent pressure on the cloud, resulting in a low data synchronization frequency and high efficiency, enabling stable and efficient execution of multi-device data synchronization.
[0050] It should be noted that during the process of uploading locally merged data to the cloud by the device in this embodiment, the locally merged data will carry a corresponding identity identifier. This identity identifier is used to represent the device information and its corresponding application information. For example, if the device is a vehicle and a mobile phone, and the vehicle and mobile phone are logged into the same account, and use this account as an identifier to upload or download data to the cloud, then that account is the identity identifier. The above examples are for illustrative purposes only and are not intended to be limiting.
[0051] Step 130: Receive cloud-fused data from the cloud, wherein the cloud-fused data is obtained by the cloud fusion of local fused data received under the same identity identifier.
[0052] In one specific embodiment, the cloud serves as a platform for connecting multiple devices, responsible for data fusion, storage, and distribution. During its data processing, the cloud stores data in a cloud database according to the requests from multiple devices, such as data deletion, addition, and clearing operations, as well as the unique identifier of each piece of data agreed upon by the multiple devices. Furthermore, the cloud merges the database based on the time when the data was generated, thereby ensuring the uniqueness and timeliness of each piece of data.
[0053] Step 140: Overlay the local fusion data with the cloud-based fusion data.
[0054] In this embodiment, after the cloud-based fused data is pulled and overwritten with the local fused data, the local fused data is also cleared. By clearing the local fused data, the amount of data processing during synchronization can be reduced, and data chaos can be avoided during data synchronization, ensuring low-frequency synchronization of data from multiple terminals and improving the efficiency and accuracy of data synchronization.
[0055] It should be noted that when multiple devices synchronize data with the cloud separately, if any link in the process fails, the data synchronization is abandoned and the data is restored to its state before synchronization. This reduces the possibility of data loss during the synchronization process and ensures the accuracy and efficiency of data synchronization.
[0056] Figure 2 A flowchart illustrating a second embodiment of the multi-terminal data synchronization method provided by the present invention is shown. This method is executed by a multi-terminal data synchronization device. Figure 2 As shown, the method includes the following steps:
[0057] Step 210: Monitor the current local operating status. See details below. Figure 1 Step 110 shown will not be repeated here.
[0058] Step 220: If the current working state meets the preset data synchronization triggering conditions, the local application data is fused to obtain the local fused data corresponding to the identity identifier and uploaded to the cloud.
[0059] Specifically, the fusion of local application data in step 220 above includes:
[0060] Step 2201: Convert the local application data into a preset data structure to obtain the target application data represented by the preset data structure.
[0061] In this embodiment, the fields in the preset data structure include: an application data function type field, a data type name field, a data operation type field, and a data generation time field; wherein, the application data function type field is used to characterize the application data type corresponding to different functions, the data type name field is the sub-name of the function type data determined based on the application data function type field, and the data operation type field is used to identify the data operation type, which includes at least one of adding data operation, deleting data operation, and clearing data operation.
[0062] In one specific embodiment, the fields in the preset data structure include: an application data function type (recordType) field, a data type name (name) field, a data operation type (operateType) field, and a data generation time (time) field. The application data function type (recordType) field is used to represent the application data type corresponding to different functions. For example, the recordType field includes specific application data types such as navigation, routes, memos, and phonebook on the vehicle side. The data type name (name) field is the sub-name of the function type data determined by the application data function type (recordType) field. For example, when the recordType field represents the address book data function type, the name field can represent the contacts in the address book, such as Zhang, Li, and Wang. It should be noted that the design of the recordType field must ensure that the same data structure is compatible with multiple applications and multiple data types. The data operation type (operateType) field is used to identify the data operation type, which includes at least one of the following: adding data operation, deleting data operation, and clearing data operation.
[0063] In this embodiment, the fields in the preset data structure also include: an application data recordType field and an extended json field; wherein, the recordType field is used to record the original application data content; the json field is an extended string, which can be used to expand the preset data structure with corresponding functional fields based on actual needs. The preset data structure in this embodiment has the advantages of convenient setup and strong extensibility.
[0064] Step 2202: The target application data is fused to obtain the local fused data and saved to the local database.
[0065] Specifically, step 2202 above includes:
[0066] Step A1: Based on the fields in each of the target application data, the target application data is divided into a first type of target application data and a second type of target application data. There is at least one common field among the first type of target application data, and there are no common fields among the second type of target application data.
[0067] Step A2: Based on the data generation time field in the target application data of the first type, filter the target application data of the first type to obtain the target application data of the first type with the most recent time.
[0068] Step A3: Determine that the local fused data is the first type of target application data and the second type of target application data that are most recent in time.
[0069] In one specific embodiment, the system determines whether data of the same type already exists based on the `recordType` and `name` fields. If it exists, the `time` fields of the two data types are compared, the newer data replaces the older data, and it is saved to the local database as the target application data. If it does not exist, the data is directly saved to the local database as the target application data. For example, if the data contains multiple navigation data sets, the navigation data corresponding to the latest time is retained, which can filter redundant data and ensure the timeliness of cached data.
[0070] In this embodiment, the step of fusing the target application data to obtain the local fused data further includes:
[0071] Step B1: For all target application data, determine the relationship between the data generation time corresponding to the data operation type and the preset operation time threshold.
[0072] Step B2: When the data generation time is less than a preset operation time threshold, the corresponding target application data is determined to be invalid data.
[0073] Step B3: When the data generation time is greater than or equal to the preset operation time threshold, the corresponding target application data is determined as valid data, and fusion is performed based on the valid data.
[0074] In one specific embodiment, when fusing target application data, the preset operation time threshold for each data operation type is first obtained, which is the minimum time queried based on the `operateType` field. For example, the typical processing flow for adding data is 0-1 seconds, and based on experience, the preset operation time threshold is set to 0.5 seconds. When the `time` field of the target application data is less than this minimum time, it indicates that the data has expired, and the fusion is abandoned. By determining whether to perform data fusion, the validity of the data can be screened during the data fusion process, ensuring that invalid data is not fused, thus guaranteeing the authenticity and validity of cached data to a certain extent and accelerating the data fusion process.
[0075] Step 230: Receive cloud-fused data from the cloud, whereby the cloud-fused data is obtained by fusing locally fused data received under the same identity identifier. For a detailed description, please refer to [link to details]. Figure 1 Step 130 shown will not be repeated here.
[0076] Step 240: Overlay the local fused data with the cloud-based fused data. For a detailed description, please refer to [link to details]. Figure 1 Step 140 shown will not be repeated here.
[0077] In this embodiment, the multi-terminal data synchronization method further includes:
[0078] Step C1: When the device disconnects from the cloud network, the application data of each application is converted into a preset data structure.
[0079] Step C2 involves performing data fusion of a single application based on the application data represented by the preset data structure, obtaining application fusion data corresponding to each application, and saving it to the local database.
[0080] It should be noted that when the device is offline or in other abnormal situations, the vehicle and mobile devices cannot contact the cloud. In this case, the application data is stored locally on the device. While retaining the original information, the user's operation behavior is identified by the operateType field in the preset data structure. Data is fused based on the unique identifier, and the fused data is saved to the local database, ensuring the uniqueness and timeliness of each piece of data.
[0081] Figure 3 The diagram illustrates a third embodiment of the multi-terminal data synchronization method provided by the present invention. This method should be performed in the cloud by a multi-terminal data synchronization device. Figure 3 As shown, the method includes the following steps:
[0082] Step 310: Receive local fusion data with identity identifiers uploaded from multiple devices.
[0083] Step 320: Perform cloud fusion on the local fusion data under the same identity identifier to obtain cloud fusion data.
[0084] Step 330: Based on the identity identifier, the cloud-integrated data is sent to the corresponding device.
[0085] In this embodiment, during data synchronization between the cloud and the current device, if a data synchronization request initiated by another device is received, the processing of the data synchronization request is paused by setting a synchronization lock. The synchronization lock is released after the data synchronization on the current device is completed, allowing the data synchronization request to be processed again. Specifically, cloud data fusion uses locking to ensure exclusive data synchronization on the vehicle side, meaning the cloud only allows data synchronization with one device at a time. This solves the concurrency problem of multiple devices, greatly reducing the concurrency pressure on the cloud when multiple devices are online simultaneously, i.e., multiple vehicles needing to synchronize data simultaneously. This ensures the smooth execution of the entire data synchronization process and improves synchronization efficiency to a certain extent.
[0086] Figure 4 A schematic diagram of an embodiment of the multi-terminal data synchronization system of the present invention is shown. The multi-terminal data synchronization system includes: multiple device terminals and a cloud.
[0087] The device monitors the current working status locally; if the current working status meets the preset data synchronization triggering conditions, it merges the local application data to obtain local merged data corresponding to the identity identifier and uploads it to the cloud.
[0088] The cloud is connected to the device and is used to receive local fusion data with identity identifiers uploaded by multiple device terminals; to perform cloud fusion on the local fusion data under the same identity identifier to obtain cloud fusion data; and to send the cloud fusion data to the corresponding device terminal based on the identity identifier.
[0089] The device receives cloud-fused data from the cloud, which is obtained by fusing local fused data received under the same identity identifier from the cloud; the cloud-fused data is then used to overwrite the local fused data.
[0090] It should be noted that the data synchronization process between each device and the cloud is the same in this embodiment. The following explanation uses vehicle 1 and cloud 2 as an example. (See attached document.) Figure 5 This is a schematic diagram of the interaction process in the first embodiment of a multi-terminal data synchronization system. The vehicle terminal 1 executes steps S110 to S140, and the cloud terminal 1 executes steps S310 to S330. For a detailed description, please refer to... Figure 1 Steps S110 to S140 shown are Figure 3 Steps S310 to S330 shown will not be repeated here.
[0091] In one specific embodiment, the vehicle-side application includes a main vehicle-side application and other vehicle-side applications. The main vehicle-side application can be configured according to actual needs, and it serves as the representative for local multi-application data fusion. When data synchronization is triggered, the main application will actively acquire data from multiple other applications for fusion. Specifically, for configuring the main vehicle-side application, please refer to [link to relevant documentation]. Figure 6 The diagram illustrates a multi-application data fusion example. When an anomaly occurs in the data uploaded by the vehicle-side main application, the application encapsulates the abnormal data into a specific data structure for storage. This structure transforms the abnormal data into a preset data structure containing application data record fields, extended fields, application data function type fields, data type name fields, data operation type fields, and data generation time fields. The vehicle-side main application then performs multi-application data fusion on the stored data in this preset data structure, obtaining the fused data, which is then cached in its local database, resulting in the local multi-application data fusion. When the data synchronization trigger condition is met, the fused multi-application data is uploaded to the vehicle cloud server.
[0092] In this embodiment, the data caching function designed in the main application supports not only data within the application but also data caching from other applications. This avoids multiple applications on the vehicle connecting to the cloud for data synchronization, thus avoiding wasted bandwidth and cloud server resources. It should be noted that other applications do not need to save their data to the main application in real time; they only need to save it at the moment synchronization is triggered, reducing resource consumption caused by communication between multiple applications within the device. When data synchronization is triggered, the main application actively retrieves data from external applications and then merges it into the local cache using the aforementioned fusion method. After fusion, invalid and redundant data is filtered out, and the data is uploaded to the cloud for multi-device fusion.
[0093] Figure 7 The diagram illustrates the interaction process of a second embodiment of the multi-terminal data synchronization system provided by the present invention. As shown in the diagram, the device is either a vehicle or a mobile phone. Both the vehicle and mobile phones log in with the same account, and when data is uploaded or downloaded to the cloud using this account as an identifier, if a user performs an operation under that account, the respective operations are merged, processed, and then uploaded to the cloud platform for fusion before being distributed, ensuring data synchronization between the vehicle and mobile phones.
[0094] In this embodiment, the cloud platform serves as a multi-terminal interface platform, responsible for data fusion, storage, and distribution. Data is stored in a cloud database according to the multi-terminal request intent (delete, add, clear) and the unique identifier of each data entry agreed upon by the multi-terminals. Furthermore, the database is fused based on the time the data was generated, thereby ensuring the uniqueness and timeliness of each data entry.
[0095] Specifically, the data synchronization process includes: when the vehicle or mobile device meets the synchronization conditions (for the vehicle, this is triggered when the vehicle's infotainment system is powered on or the network is restored after a power outage; for the mobile device, it is triggered when the user switches to the relevant page), it checks if there are any records of failed uploads on the local machine. If so, it calls the cloud platform's batch synchronization interface to merge the unique data on the vehicle or mobile device into the cloud platform. After the cloud platform data fusion is successful, the vehicle or mobile device pulls the latest cloud data. If the pull is successful, it overwrites the local data and clears any local offline or abnormal operation records.
[0096] In summary, the multi-terminal data synchronization method of this invention solves the problem of low-frequency, real-time data synchronization failure when multiple applications log in to the same account simultaneously on vehicle-side and mobile electronic terminals. It is a low-frequency multi-terminal data synchronization method that triggers data synchronization only under certain conditions, greatly reducing cloud concurrency pressure. It can ensure accurate synchronization of multi-terminal data, and offline and cloud interface anomalies will not lead to data loss, avoiding data corruption and improving data synchronization efficiency.
[0097] Figure 8 A schematic diagram of the multi-terminal data synchronization device provided by the present invention is shown. Figure 8 As shown, the multi-terminal data synchronization device 800 is applied to the device side, and the device 800 includes:
[0098] The local monitoring module 810 is used to monitor the current working status of the local machine.
[0099] The local fusion module 820 is used to fuse local application data to obtain local fused data corresponding to the identity identifier and upload it to the cloud if the current working state meets the preset data synchronization triggering conditions.
[0100] The data receiving module 830 is used to receive cloud-fused data from the cloud, wherein the cloud-fused data is obtained by the cloud fusing local fused data received under the same identity identifier.
[0101] The data synchronization module 840 is used to overwrite the local fused data with the cloud-fused data.
[0102] In one optional embodiment, the local fusion module 820 includes a data transformation submodule and a data fusion submodule; wherein, the data transformation submodule is used to transform local application data into a preset data structure to obtain target application data represented by the preset data structure; the data fusion submodule is used to fuse the target application data to obtain the local fused data and save it to a local database.
[0103] In one optional embodiment, the data fusion submodule includes: a data partitioning unit, a data filtering unit, and a data determination unit; wherein, the data partitioning unit is used to partition the target application data based on fields in each of the target application data to obtain target application data of a first type and target application data of a second type, wherein there is at least one common field among the target application data of the first type, and no common fields among the target application data of the second type; the data filtering unit is used to filter the target application data of the first type based on the data generation time field in the target application data of the first type to obtain the target application data of the most recent time; and the data determination unit is used to determine that the locally fused data is the target application data of the most recent time of the first type and the target application data of the second type.
[0104] In one optional embodiment, the data fusion submodule further includes: a data determination unit, a first determination unit, and a second determination unit; wherein, the data determination unit is used to determine the relationship between the data generation time corresponding to the data operation type and a preset operation time threshold for all target application data; the first determination unit is used to determine the corresponding target application data as invalid data when the data generation time is less than the preset operation time threshold; the second determination unit is used to determine the corresponding target application data as valid data when the data generation time is greater than or equal to the preset operation time threshold, and to perform fusion based on the valid data.
[0105] In one alternative embodiment, the multi-terminal data synchronization device 800 further includes: an offline data fusion submodule, used to convert the application data of each application into a preset data structure when the device is disconnected from the cloud network; perform single-application data fusion based on the application data represented by the preset data structure to obtain application fusion data corresponding to each application and save it to a local database.
[0106] Figure 9 A schematic diagram of another multi-terminal data synchronization device provided by the present invention is shown; as follows: Figure 9 As shown, the multi-terminal data synchronization device 900 is applied in the cloud, and the device 900 includes:
[0107] The data receiving module 910 is used to receive local fusion data with identification tags uploaded by multiple devices.
[0108] The cloud fusion module 920 is used to pause the processing of a data synchronization request initiated by another device when a data synchronization request is received during the process of data synchronization between the cloud and the current device. This is achieved by setting a synchronization lock.
[0109] The data delivery module 930 is used to release the synchronization lock after the data synchronization on the current device is completed, so as to process the data synchronization request.
[0110] In one optional embodiment, the multi-device data synchronization device 900 further includes: a synchronization lock setting submodule, used to pause the processing of a data synchronization request initiated by another device by setting a synchronization lock during the data synchronization process between the cloud and the current device; and to release the synchronization lock after the data synchronization on the current device is completed so that the data synchronization request can be processed.
[0111] The multi-terminal data synchronization device provided in this embodiment of the invention can ensure the synchronization of data across multiple terminals, avoid data loss and data corruption, and greatly improve the efficiency of data synchronization and user experience.
[0112] Figure 10 The diagram shows a structural schematic of an embodiment of the multi-terminal data synchronization device of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the multi-terminal data synchronization device.
[0113] like Figure 10 As shown, the multi-terminal data synchronization device may include: a processor 1002, a communications interface 1004, a memory 1006, and a communications bus 1008.
[0114] The processor 1002, communication interface 1004, and memory 1006 communicate with each other via communication bus 1008. Communication interface 1004 is used to communicate with other network elements such as clients or other servers. The processor 1002 executes program 1010, specifically performing the relevant steps described in the multi-terminal data synchronization method embodiment.
[0115] Specifically, program 1010 may include program code, which includes computer-executable instructions.
[0116] The processor 1002 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The multi-application, multi-terminal data low-frequency synchronization device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0117] Memory 1006 is used to store program 1010. Memory 1006 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0118] Specifically, program 1010 can be called by processor 1002 to cause the multi-end data synchronization device to perform the following operations:
[0119] The device monitors the current working status locally; if the current working status meets the preset data synchronization triggering conditions, it merges the local application data to obtain local merged data corresponding to the identity identifier and uploads it to the cloud; it receives cloud merged data from the cloud, which is obtained by the cloud merging the received local merged data under the same identity identifier; and it uses the cloud merged data to overwrite the local merged data.
[0120] The cloud is used to receive local fusion data with identity identifiers uploaded by multiple devices; to perform cloud fusion on local fusion data under the same identity identifier to obtain cloud fusion data; and to send the cloud fusion data to the corresponding device based on the identity identifier.
[0121] This invention provides a computer-readable storage medium storing at least one executable instruction that, when executed on a multi-terminal data synchronization device / app, causes the multi-terminal data synchronization device / app to perform the multi-terminal data synchronization method described in any of the above method embodiments.
[0122] Specifically, the executable instructions can be used to cause the multi-device data synchronization device / app to perform the following operations:
[0123] The device monitors the current working status locally; if the current working status meets the preset data synchronization triggering conditions, it merges the local application data to obtain local merged data corresponding to the identity identifier and uploads it to the cloud; it receives cloud merged data from the cloud, which is obtained by the cloud merging the received local merged data under the same identity identifier; and it uses the cloud merged data to overwrite the local merged data.
[0124] The cloud is used to receive local fusion data with identity identifiers uploaded by multiple devices; to perform cloud fusion on local fusion data under the same identity identifier to obtain cloud fusion data; and to send the cloud fusion data to the corresponding device based on the identity identifier.
[0125] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Furthermore, the embodiments of this invention are not directed to any particular programming language.
[0126] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. Similarly, for the sake of brevity and to aid in understanding one or more aspects of the invention, in the description of exemplary embodiments of the invention above, various features of the embodiments are sometimes grouped together in a single embodiment, figure, or description thereof. The claims, which follow the detailed description, are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the invention.
[0127] Those skilled in the art will understand that the modules in the device of the embodiment can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiment can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components, except that at least some of such features and / or processes or units are mutually exclusive.
[0128] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.
Claims
1. A multi-terminal data synchronization method, applied to the device side, characterized in that, The method includes: Monitor the current working status locally; If the current working state meets the preset data synchronization triggering conditions, the local application data is fused to obtain local fused data corresponding to the identity identifier and uploaded to the cloud. Receive cloud-fused data from the cloud, wherein the cloud-fused data is obtained by the cloud fusion of local fused data received under the same identity identifier; The cloud-based fused data is used to overlay the local fused data; The fusion of local application data includes: The local application data is transformed into a preset data structure to obtain the target application data represented by the preset data structure. The preset data structure includes the following fields: application data function type field, data type name field, data operation type field, and data generation time field. The application data function type field represents the application data type corresponding to different functions. The data type name field is the sub-name of the function type data determined by the application data function type field. The data operation type field identifies the data operation type, which includes at least one of adding data operation, deleting data operation, and clearing data operation. The target application data is fused to obtain the local fused data, which is then saved to a local database; wherein, the process of fusing the target application data to obtain the local fused data includes: Based on the fields in each of the target application data, the target application data is divided into a first type of target application data and a second type of target application data. There is at least one common field among the target application data of the first type, and no common fields among the target application data of the second type. Based on the data generation time field in the target application data of the first type, the target application data of the first type is filtered to obtain the target application data of the first type with the most recent time. The local fusion data is determined to be the most recent first type of target application data and the second type of target application data.
2. The method according to claim 1, characterized in that, The preset data synchronization trigger conditions include at least one of the following: powering on the device, reconnecting the device to the cloud network, and switching applications on the device.
3. The method according to claim 1, characterized in that, The step of fusing the target application data to obtain the local fused data further includes: For all target application data, determine the relationship between the data generation time period corresponding to the data operation type and the preset operation time threshold; wherein, the data generation time period represents the duration from the moment represented by the data generation time field to the current moment; When the time period for generating the data is less than a preset operation time threshold, the corresponding target application data will be determined as invalid data. When the time period for which the data is generated is greater than or equal to the preset operation time threshold, the corresponding target application data is determined as valid data, and fusion is performed based on the valid data.
4. The method according to any one of claims 1-3, characterized in that, The method further includes: When the device disconnects from the cloud network, the application data of each application is converted into a preset data structure. Data fusion of single applications is performed based on application data represented by a preset data structure to obtain application fusion data corresponding to each application and save it to a local database.
5. A multi-terminal data synchronization method, applied in the cloud, characterized in that, The method includes: Receive locally fused data with identification tags uploaded from multiple devices; wherein, the process of determining the locally fused data includes: The device transforms local application data into a preset data structure to obtain the target application data represented by the preset data structure. The preset data structure includes the following fields: application data function type field, data type name field, data operation type field, and data generation time field. The application data function type field represents the application data type corresponding to different functions. The data type name field is the sub-name of the function type data determined by the application data function type field. The data operation type field identifies the data operation type, which includes at least one of adding data operation, deleting data operation, and clearing data operation. Based on the fields in each of the target application data, the target application data is divided into a first type of target application data and a second type of target application data. There is at least one common field among the target application data of the first type, and no common fields among the target application data of the second type. Based on the data generation time field in the target application data of the first type, the target application data of the first type is filtered to obtain the target application data of the first type with the most recent time. The locally fused data is determined to be the most recent first type of target application data and the second type of target application data; Local fusion data under the same identity identifier is fused in the cloud to obtain cloud-fused data; Based on the identity identifier, the cloud-integrated data is sent to the corresponding device.
6. The method according to claim 5, characterized in that, The method further includes: During the data synchronization process between the cloud and the current device, if a data synchronization request initiated by another device is received, the processing of the data synchronization request is paused by setting a synchronization lock; After the data synchronization on the current device is completed, the synchronization lock is released to process the data synchronization request.
7. A multi-terminal data synchronization system, characterized in that, The system includes: Device-side and cloud-side; The device is used to monitor the current local operating status; if the current operating status meets the preset data synchronization trigger condition, the local application data is fused to obtain local fused data corresponding to the identity identifier and uploaded to the cloud; wherein, the fusion of local application data includes: The local application data is transformed into a preset data structure to obtain the target application data represented by the preset data structure. The preset data structure includes the following fields: application data function type field, data type name field, data operation type field, and data generation time field. The application data function type field represents the application data type corresponding to different functions. The data type name field is the sub-name of the function type data determined by the application data function type field. The data operation type field identifies the data operation type, which includes at least one of adding data operation, deleting data operation, and clearing data operation. The target application data is fused to obtain the local fused data, which is then saved to a local database; wherein, the process of fusing the target application data to obtain the local fused data includes: Based on the fields in each of the target application data, the target application data is divided into a first type of target application data and a second type of target application data. There is at least one common field among the target application data of the first type, and no common fields among the target application data of the second type. Based on the data generation time field in the target application data of the first type, the target application data of the first type is filtered to obtain the target application data of the first type with the most recent time. The locally fused data is determined to be the most recent first type of target application data and the second type of target application data; The cloud is connected to the device and is used to receive local fusion data with identity identifiers uploaded by multiple device terminals; to perform cloud fusion on the local fusion data under the same identity identifier to obtain cloud fusion data; and to send the cloud fusion data to the corresponding device terminal based on the identity identifier. The device receives cloud-fused data from the cloud, which is obtained by fusing local fused data received under the same identity identifier from the cloud; the cloud-fused data is then used to overwrite the local fused data.
8. A multi-terminal data synchronization device, applied to the device end, characterized in that, The device includes: The local monitoring module is used to monitor the current working status locally; The local fusion module is used to fuse local application data to obtain local fused data corresponding to the identity identifier and upload it to the cloud if the current working state meets the preset data synchronization triggering conditions. The data receiving module is used to receive cloud-fused data from the cloud, wherein the cloud-fused data is obtained by the cloud fusing local fused data received under the same identity identifier; The data synchronization module is used to overwrite the local fused data with the cloud-based fused data; The fusion of local application data includes: The local application data is transformed into a preset data structure to obtain the target application data represented by the preset data structure. The preset data structure includes the following fields: application data function type field, data type name field, data operation type field, and data generation time field. The application data function type field represents the application data type corresponding to different functions. The data type name field is the sub-name of the function type data determined by the application data function type field. The data operation type field identifies the data operation type, which includes at least one of adding data operation, deleting data operation, and clearing data operation. The target application data is fused to obtain the local fused data, which is then saved to a local database; wherein, the process of fusing the target application data to obtain the local fused data includes: Based on the fields in each of the target application data, the target application data is divided into a first type of target application data and a second type of target application data. There is at least one common field among the target application data of the first type, and no common fields among the target application data of the second type. Based on the data generation time field in the target application data of the first type, the target application data of the first type is filtered to obtain the target application data of the first type with the most recent time. The local fusion data is determined to be the most recent first type of target application data and the second type of target application data.
Citation Information
Patent Citations
Data interaction method and system of client and server in online and offline states
CN105791401A
Contact synchronization method, apparatus and system
CN106230927A