Data synchronization method, device and computer-readable storage medium

By acquiring and processing data on smart terminals and using decision rules to unify the processed data of multiple applications into target data, the problem of inconsistent pedometer data from different applications is solved, and the user experience is improved.

CN116016566BActive Publication Date: 2025-09-23ZTE CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310149824.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-10-19
Publication Date
2025-09-23
Estimated Expiration
2038-10-19

AI Technical Summary

Technical Problem

Different applications on existing smart terminals have different algorithms and platforms when counting data such as steps, resulting in inconsistent data, which causes trouble for users.

Method used

The data to be processed is obtained through the first intelligent terminal, the processing data corresponding to the multiple applications are calculated, and the target data is obtained according to the preset decision rules, and the target data is synchronized uniformly on the UI interface of each application.

Benefits of technology

It achieves data synchronization between different applications, improves user experience, and ensures the consistency of data displayed by each application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116016566B_ABST
    Figure CN116016566B_ABST
Patent Text Reader

Abstract

The present invention discloses a data synchronization method, comprising: obtaining data to be processed by a first smart terminal; when multiple applications loaded on the first smart terminal access the data to be processed, calculating and obtaining multiple processed data corresponding to the multiple applications based on the data to be processed; analyzing and obtaining target data corresponding to the multiple processed data according to a preset first decision rule; and synchronizing the target data in multiple UI user interfaces corresponding to the multiple applications. The present invention also discloses a data synchronization device and a computer-readable storage medium. The present invention implements data synchronization.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the Chinese invention patent application with application number 201811226608.0, application date October 19, 2018, and invention name “Data synchronization method, device and computer-readable storage medium”. Technical Field

[0002] The present invention relates to the field of terminal technology, and in particular to a data synchronization method, device, and computer-readable storage medium. Background Art

[0003] With the development of technology, smart terminals such as smartphones and PADs (tablet computers) are becoming increasingly versatile, bringing great convenience to users' daily lives and work. When users collect data through smart terminals, for example, taking smartphone pedometers as an example, users can now count their steps through various applications on their smartphones, such as WeChat Sports, Alipay Pedometer, and Chunyu Pedometer. However, due to differences in algorithm implementation and application platforms (operating systems), the step count data of each application varies, causing trouble for users. Therefore, data inconsistency is a problem that needs to be solved urgently. Summary of the Invention

[0004] The main purpose of the present invention is to provide a data synchronization method, device and computer-readable storage medium, aiming to solve the problem of data inconsistency in the prior art.

[0005] To achieve the above-mentioned objectives, the present invention proposes a data synchronization method, which includes the following steps: a first smart terminal obtains data to be processed; when multiple applications loaded on the first smart terminal call the data to be processed, multiple processing data corresponding to the multiple applications are calculated and obtained based on the data to be processed; according to a preset first decision rule, target data corresponding to the multiple processing data are analyzed and obtained; and the target data is synchronized in multiple UI user interfaces corresponding to the multiple applications.

[0006] Optionally, before the step of the first smart terminal obtaining the data to be processed, the step also includes: obtaining multiple original data collected by the first smart terminal and at least one second smart terminal; wherein, the first smart terminal establishes a communication connection with the at least one second smart terminal; the step of the first smart terminal obtaining the data to be processed includes: obtaining the data to be processed corresponding to the multiple original data based on the multiple original data and a preset second decision rule.

[0007] Optionally, the step of obtaining the data to be processed corresponding to the multiple original data based on the multiple original data and the preset second decision rule includes: determining the priority of the multiple original data based on the device type of the first smart terminal and the at least one second smart terminal; and determining the original data with the highest priority as the data to be processed.

[0008] Optionally, the step of obtaining the data to be processed corresponding to the multiple original data based on the multiple original data and a preset second decision rule includes: selecting first original data from the multiple original data, the first original data being the original data collected by the smart terminal selected by the user; and determining the first original data as the data to be processed.

[0009] Optionally, the step of analyzing and obtaining target data corresponding to the plurality of processed data according to a preset first decision rule includes: comparing sizes of the plurality of processed data to determine a maximum processed data therein; and determining the maximum processed data as the target data.

[0010] Optionally, the step of analyzing and obtaining target data corresponding to the plurality of processed data according to a preset first decision rule includes: performing weighted average calculation on the plurality of processed data to obtain the target data corresponding to the plurality of processed data.

[0011] Optionally, the step of analyzing and obtaining target data corresponding to the plurality of processed data according to a preset first decision rule includes: obtaining first processed data selected by a user from the plurality of processed data; and determining the first processed data as the target data.

[0012] Optionally, after the step of the first intelligent terminal acquiring the data to be processed, the method further includes: caching the data to be processed in a preset buffer and entering a sleep mode.

[0013] In addition, to achieve the above-mentioned purpose, the present invention also proposes a data synchronization device, which includes: an acquisition module for acquiring data to be processed; a calculation module for calculating and obtaining multiple processing data corresponding to the multiple applications according to the data to be processed when multiple applications loaded on the first smart terminal call the data to be processed; an analysis module for analyzing and obtaining target data corresponding to the multiple processing data according to a preset first decision rule; and a processing module for synchronizing the target data in multiple UI user interfaces corresponding to the multiple applications.

[0014] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium, on which a data synchronization program is stored. When the data synchronization program is executed by a processor, the steps of the data synchronization method described above are implemented.

[0015] In the technical solution of the present invention, the first smart terminal obtains the data to be processed. When multiple applications loaded on the first smart terminal call the data to be processed, the first smart terminal calculates and obtains multiple processing data corresponding to the multiple applications based on the data to be processed, and analyzes and obtains target data corresponding to the multiple processing data according to the preset first decision rule. Then, the target data is synchronized in the multiple UI user interfaces corresponding to the multiple applications, rather than the different processing data corresponding to each application, thereby achieving data synchronization. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a schematic diagram of the structure of an intelligent terminal in the hardware operating environment involved in the embodiment of the present invention;

[0017] Figure 2 is a flowchart of a first embodiment of a data synchronization method of the present invention;

[0018] Figure 3 is a flow chart of a second embodiment of a data synchronization method of the present invention;

[0019] Figure 4 This is a schematic diagram of an optional decision tree structure involved in an embodiment of the present invention;

[0020] Figure 5 This is a schematic diagram of an optional data synchronization system structure involved in an embodiment of the present invention;

[0021] Figure 6 This is a schematic diagram of an optional step counting data synchronization process involved in an embodiment of the present invention;

[0022] Figure 7 It is a functional module diagram of an embodiment of a data synchronization device of the present invention.

[0023] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0024] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0025] The solution of the embodiment of the present invention is mainly as follows: the first smart terminal obtains the data to be processed. When multiple applications loaded on the first smart terminal call the data to be processed, the first smart terminal calculates and obtains multiple processing data corresponding to the multiple applications based on the data to be processed. According to a preset first decision rule, the first smart terminal analyzes and obtains target data corresponding to the multiple processing data. The multiple UI user interfaces corresponding to the multiple applications then synchronize the target data, rather than the different processing data corresponding to each application. Thus, data synchronization is achieved. The technical solution of the embodiment of the present invention solves the problem of data inconsistency.

[0026] An embodiment of the present invention provides an intelligent terminal.

[0027] Reference Figure 1 , Figure 1 This is a schematic diagram of the intelligent terminal structure of the hardware operating environment involved in the embodiment of the present invention.

[0028] In the subsequent description, suffixes such as "module," "component," or "unit" used to represent elements are only used to facilitate the description of the present invention and have no specific meaning. Therefore, "module," "component," or "unit" can be used interchangeably.

[0029] like Figure 1 As shown, the intelligent terminal may include: a processor 1001, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0030] Those skilled in the art will understand that Figure 1 The structure of the smart terminal shown in the figure does not constitute a limitation to the smart terminal, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0031] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, and a data synchronization program.

[0032] In the present invention, the smart terminal calls the data synchronization program stored in the memory 1005 through the processor 1001, and performs the following operations: the first smart terminal obtains the data to be processed; when multiple applications loaded by the first smart terminal call the data to be processed, multiple processing data corresponding to the multiple applications are calculated and obtained according to the data to be processed; according to the preset first decision rule, the target data corresponding to the multiple processing data are analyzed and obtained; and the target data is synchronized in multiple UI user interfaces corresponding to the multiple applications.

[0033] Furthermore, the processor 1001 can call the data synchronization program stored in the memory 1005 and perform the following operations: obtain multiple original data collected by the first smart terminal and at least one second smart terminal; wherein, the first smart terminal establishes a communication connection with the at least one second smart terminal; based on the multiple original data and the preset second decision rule, obtain the data to be processed corresponding to the multiple original data.

[0034] Furthermore, the processor 1001 can call the data synchronization program stored in the memory 1005 and perform the following operations: determine the priority of the multiple original data based on the device type of the first smart terminal and the at least one second smart terminal; and determine the original data with the highest priority as the data to be processed.

[0035] Furthermore, the processor 1001 can call the data synchronization program stored in the memory 1005 and perform the following operations: select the first original data from the multiple original data, where the first original data is the original data collected by the smart terminal selected by the user; and determine the first original data as the data to be processed.

[0036] Furthermore, the processor 1001 may call a data synchronization program stored in the memory 1005 and further perform the following operations: comparing the sizes of the plurality of processed data to determine the largest processed data therein; and determining the largest processed data as the target data.

[0037] Furthermore, the processor 1001 may call a data synchronization program stored in the memory 1005 and further perform the following operations: performing weighted average calculation on the plurality of processed data to obtain the target data corresponding to the plurality of processed data.

[0038] Furthermore, the processor 1001 may call a data synchronization program stored in the memory 1005 and further perform the following operations: acquiring first processed data selected by a user from the plurality of processed data; and determining the first processed data as the target data.

[0039] Furthermore, the processor 1001 may call a data synchronization program stored in the memory 1005 and further perform the following operations: cache the data to be processed in a preset buffer and enter a sleep mode.

[0040] Through the above scheme, this embodiment uses the first smart terminal to obtain the data to be processed. When multiple applications loaded on the first smart terminal call the data to be processed, the first smart terminal calculates and obtains multiple processing data corresponding to the multiple applications based on the data to be processed, and analyzes and obtains target data corresponding to the multiple processing data based on the preset first decision rule. Then, the target data is synchronized in the multiple UI user interfaces corresponding to the multiple applications, rather than the different processing data corresponding to each application, thereby achieving data synchronization.

[0041] Based on the above hardware structure, an embodiment of the data synchronization method of the present invention is proposed.

[0042] Reference Figure 2 , Figure 2 Schematic diagram of the flow of the first embodiment of the data synchronization method of the present invention.

[0043] In a first embodiment, the data synchronization method includes the following steps:

[0044] Step S10: The first intelligent terminal obtains data to be processed;

[0045] Step S20, when multiple applications loaded on the first intelligent terminal retrieve the data to be processed, respectively calculating and obtaining multiple processed data corresponding to the multiple applications based on the data to be processed;

[0046] Step S30, analyzing and obtaining target data corresponding to the plurality of processed data according to a preset first decision rule;

[0047] Step S40: synchronizing the target data in a plurality of UI user interfaces corresponding to the plurality of application programs.

[0048] The data synchronization method proposed in the present invention is applicable to the smart terminals in the above-mentioned embodiments. It should be noted that the smart terminals include but are not limited to smartphones, PADs (tablet computers), smart bracelets, smart watches, and other devices. By adopting this data synchronization method, synchronized display of data is achieved. The following uses pedometer data as an example to describe this data synchronization method in detail. Those skilled in the art will understand that this data synchronization method is not limited to application to pedometer data.

[0049] The smart terminal is equipped with independent hardware sensors, such as vibration sensors, gravity sensors G-Sensor, etc., which collect the original data of the user's step count (data to be processed) through the sensors. For multiple applications with pedometer functions loaded on the smart terminal, each uses a corresponding pedometer algorithm to complete the corresponding data calculation, obtain the processed data corresponding to each application, and then use the corresponding decision rules to analyze the processed data corresponding to each application to obtain the final pedometer data (target data), which is presented to the user through the UI (User Interface) corresponding to each application, thereby realizing the synchronization of the pedometer data (target data) corresponding to each application.

[0050] The following are the specific steps for implementing the data synchronization method in this embodiment:

[0051] Step S10: The first intelligent terminal obtains data to be processed;

[0052] When a user counts steps using a smart terminal, for ease of description, the smart terminal currently counting steps is referred to as the first smart terminal. The first smart terminal is equipped with corresponding sensors for step counting, including but not limited to a vibration sensor and a gravity sensor (G-Sensor). When the first smart terminal counts steps, the sensors of the first smart terminal collect raw data corresponding to the user's steps, including but not limited to the user's movement amplitude and frequency, and then the first smart terminal obtains this data.

[0053] Optionally, after step S10, the method further includes:

[0054] Step a: caching the data to be processed in a preset buffer and entering a sleep mode.

[0055] Optionally, the first smart terminal also pre-sets a corresponding preset buffer. When the first smart terminal obtains the data to be processed, it caches the data to be processed in the preset buffer. Furthermore, after caching the data to be processed in the preset buffer, the first smart terminal enters a sleep mode, thereby reducing power consumption of the first smart terminal.

[0056] Step S20, when multiple applications loaded on the first intelligent terminal retrieve the data to be processed, respectively calculating and obtaining multiple processed data corresponding to the multiple applications based on the data to be processed;

[0057] For multiple application programs APP with pedometer function loaded on the first smart terminal, every time the application program APP retrieves the data to be processed, the processing data corresponding to the application program APP is calculated based on the data to be processed. For example, by using the interface provided by the first smart terminal system, such as the API (Application Programming Interface) such as OnSensorChanged() of the Android system, corresponding calculations are performed in combination with corresponding algorithms to determine whether the motion states such as the amplitude and frequency collected by the sensor meet the pedometer standard, thereby counting the data as a specific number of steps and obtaining the processing data corresponding to the application program APP. In this way, for multiple application programs APP with pedometer function loaded on the first smart terminal, multiple processing data corresponding to the multiple application programs APP are obtained respectively.

[0058] Optionally, after obtaining the processing data corresponding to the application APP, the processing data is stored in a preset buffer and the system enters a sleep mode.

[0059] Step S30, analyzing and obtaining target data corresponding to the plurality of processed data according to a preset first decision rule;

[0060] To achieve data synchronization, this embodiment pre-defines corresponding decision rules for processing multiple processed data. These decision rules include, but are not limited to, weighted averaging, statistical algorithms, independent calculations, and other algorithms. For ease of description, this decision rule for processing multiple processed data is referred to as the first decision rule. Based on this first decision rule, the first intelligent terminal analyzes and processes the multiple processed data to obtain target data corresponding to the multiple processed data, i.e., the final pedometer data.

[0061] Optionally, three methods of obtaining target data according to different first decision rules are listed below:

[0062] 1) Method 1: Determine the target data based on the size of the processed data. Specifically, in this method, step S30 includes:

[0063] Step b, comparing the sizes of the plurality of processed data to determine the largest processed data therein;

[0064] Step c: determining the maximum processed data as the target data.

[0065] In this method, for the multiple processed data corresponding to the multiple application programs APP obtained, the target data is finally decided based on the multiple processed data, the sizes of the multiple processed data are compared, the maximum processed data therein is determined, and then the maximum processed data is determined as the final target data, that is, the step counting data.

[0066] 2) Method 2: Determine target data by performing weighted averaging on the processed data. Specifically, in this method, step S30 includes:

[0067] Step d: performing weighted average calculation on the plurality of processed data to obtain the target data corresponding to the plurality of processed data.

[0068] In this method, for the multiple processed data corresponding to the multiple application programs APP, these multiple processed data are weighted averaged to obtain a corresponding weighted average value, and the weighted average value obtained by the calculation is used as the target data corresponding to the multiple processed data.

[0069] 3) Mode 3: Determining target data by user selection of processing data. Specifically, in this mode, step S30 includes:

[0070] Step e: obtaining first processed data selected by a user from the plurality of processed data;

[0071] Step f: determining the first processed data as the target data.

[0072] In this method, the user can select the processed data corresponding to one of the multiple application programs according to the actual situation. The first smart terminal obtains the processed data selected by the user from the multiple processed data. For ease of description, the processed data corresponding to the application program selected by the user is referred to as the first processed data. The first processed data is determined as the final target data, i.e., the step counting data.

[0073] It should be noted that in addition to the three methods listed above, the first smart terminal can also adopt other different first decision rules to obtain target data, and is not limited to the three methods listed above. In this embodiment, there is no restriction on the specific method of obtaining target data using the first decision rule.

[0074] Step S40: synchronizing the target data in a plurality of UI user interfaces corresponding to the plurality of application programs.

[0075] For multiple application APPs with pedometer functions loaded on the first smart terminal, each application APP is configured with a corresponding UI interface. After determining the target data, that is, the pedometer data, the first smart terminal synchronizes the target data on the multiple UI interfaces corresponding to the multiple application APPs, that is, synchronizes the pedometer data for the multiple application APPs.

[0076] For example, taking the example of loading applications APP1 and APP2 with pedometer functions on the first smart terminal, if the first decision rule is used to determine that the target data DD is the processed data D1 corresponding to the application APP1 based on the processed data D1 corresponding to the application APP1 and the processed data D2 corresponding to the application APP2, the first UI interface corresponding to the application APP1 is updated with the processed data D1; and the processed data D1 is transmitted to the application APP2 through broadcast or intent message, and the second UI interface corresponding to the application APP2 is updated with the processed data D1, thereby realizing the synchronization of the target data corresponding to the application APP1 and the application APP2, that is, the pedometer data.

[0077] In this way, when the user views the UI interfaces corresponding to the multiple application programs APP, unified target data, that is, unified step counting data, is displayed, thereby greatly improving the user experience.

[0078] Optionally, after the UI interface corresponding to the application APP is updated with the target data, the first smart terminal enters the sleep mode again, thereby reducing the power consumption of the first smart terminal.

[0079] Optionally, data synchronization can be performed in a scheduled or real-time manner according to the timeliness of the system.

[0080] In the solution provided by this embodiment, the first smart terminal obtains the data to be processed. When multiple applications loaded on the first smart terminal call the data to be processed, the first smart terminal calculates and obtains multiple processing data corresponding to the multiple applications based on the data to be processed, and analyzes and obtains target data corresponding to the multiple processing data based on a preset first decision rule. Then, the target data is synchronized in the multiple UI user interfaces corresponding to the multiple applications, rather than the different processing data corresponding to each application, thereby achieving data synchronization.

[0081] Furthermore, based on the first embodiment, a second embodiment of the data synchronization method of the present invention is proposed. In this embodiment, as Figure 3 As shown, before step S10, the following steps are also included:

[0082] Step S50: acquiring a plurality of raw data collected by the first smart terminal and at least one second smart terminal; wherein the first smart terminal establishes a communication connection with the at least one second smart terminal;

[0083] The step S10 includes:

[0084] Step S11 : acquiring the data to be processed corresponding to the multiple original data according to the multiple original data and a preset second decision rule.

[0085] In practice, a variety of smart devices can be used for pedometers, including smartphones, smart bracelets, and smart watches. Typically, each smart device's pedometer algorithm and pedometer hardware (sensor) are relatively independent, meaning each device's pedometer process is independent and its data is out of sync. When a user carries multiple smart devices, each device generates different pedometer data, causing confusion.

[0086] To further enhance the user experience, in this embodiment, for a user's multiple smart terminals that can be used for step counting, in addition to the first smart terminal described in the first embodiment, the other smart terminals are referred to as second smart terminals. The first smart terminal and at least one other second smart terminal are both provided with corresponding step counting hardware carriers (sensors), and the first smart terminal establishes a communication connection with the at least one other second smart terminal, such as a Bluetooth connection, an NFC (nearfield communication) connection, a ZigBee protocol connection, a Wi-Fi connection, or other wireless communication connection or a wired communication connection.

[0087] When counting steps, a carrier decision tree is first established. The decision tree branches are divided into two subtrees: hardware carrier (sensor) and software carrier (APP or activity). For example, Figure 4 As shown in the figure, the hardware carrier layer is the top layer of the decision-making group, recording the raw sensor data through independent hardware sensors. The software carrier layer is located in the second layer, collecting the raw data of the corresponding hardware sensors and combining them with their own step counting algorithms to complete the corresponding data calculation. After the calculation is completed, it is presented to the user through the corresponding UI interface of the respective application APP for the user to view or select.

[0088] When there are two or more hardware carriers (sensors), decision sub-nodes are established according to the number of hardware carriers. The decision group uses heartbeat packets to maintain data synchronization among all hardware carriers (sensors) within the group. At the same time, after the decision result is generated, the decision master's data is used to synchronize the data of other decision group members within the decision group through broadcasting to maintain data consistency.

[0089] When two or more software carriers (apps or activities) coexist within a hardware carrier (sensor), decision nodes are established based on the software carriers. When a software carrier node requests data from the hardware carrier, the data acquisition process / thread for other applications on the hardware carrier is locked. After the software carrier completes the step counting data calculation, the calculation results are synchronized to other software carrier nodes using the operating system's internal broadcast mechanism to achieve unified and effective data. Communication at the hardware decision layer in the decision tree primarily relies on short-range communication components to complete data exchange. The software decision layer relies on the software communication mechanism within the smart terminal (a key component within the smart terminal operating system), and uses broadcasts, listeners, callbacks, and other methods to complete data exchange between smart terminal applications.

[0090] Specifically, when counting steps, the first smart terminal and at least one second smart terminal each use their respective sensors to collect raw data corresponding to the user's steps. The first smart terminal reads the raw data collected by the first smart terminal from its underlying layer and obtains the raw data collected by the at least one second smart terminal via a wireless channel such as Bluetooth.

[0091] In this embodiment, corresponding decision rules for determining the raw data are also pre-set. These decision rules include, but are not limited to, prioritizing raw data corresponding to wearable devices, performing weighted averaging of multiple raw data, prioritizing raw data corresponding to user-selected smart terminals, and other decisions. For ease of description, this decision rule for determining the raw data is referred to as the second decision rule below.

[0092] After obtaining a plurality of original data corresponding to the first smart terminal and at least one second smart terminal, the first smart terminal makes a decision on the plurality of original data according to the second decision rule to obtain data to be processed corresponding to the plurality of original data.

[0093] Optionally, two methods of obtaining the data to be processed according to different second decision rules are listed below:

[0094] 1) Method 1: Determine the data to be processed based on the device type of the smart terminal. Specifically, in this method, step S11 includes:

[0095] Step g: determining the priority of the plurality of original data according to the device types of the first smart terminal and the at least one second smart terminal;

[0096] Step h: determining the original data with the highest priority as the data to be processed.

[0097] Due to factors such as the different hardware sensors installed on each smart terminal and the different ways users carry their smart terminals, the accuracy of the raw data collected by each smart terminal through the sensors may vary. For example, the accuracy of the raw data collected by a wearable device may be higher than that collected by a smartphone. Therefore, in this method, after obtaining multiple raw data corresponding to a first smart terminal and at least one second smart terminal, the priority of the multiple raw data is determined based on the device types of the first smart terminal and at least one second smart terminal. For example, the raw data corresponding to a smart bracelet is determined to have the highest priority.

[0098] After the priorities of the plurality of original data are determined, the original data with the highest priority is determined as the data to be processed.

[0099] 2) Method 2: Determine the data to be processed based on the original data corresponding to the smart terminal selected by the user. Specifically, in this method, step S11 includes:

[0100] Step i, selecting first original data from the plurality of original data, where the first original data is original data collected by a user-selected smart terminal;

[0101] Step j: determining the first original data as the data to be processed.

[0102] For a first smart terminal capable of counting steps and at least one second smart terminal, the user can select the raw data collected by one of the smart terminals for step counting based on actual conditions. For ease of description, the raw data collected by the user-selected smart terminal will be referred to as the first raw data.

[0103] After obtaining a plurality of original data corresponding to the first smart terminal and at least one second smart terminal, first original data collected by the smart terminal selected by the user is selected from the plurality of original data, and the first original data is determined as data to be processed.

[0104] It should be noted that in addition to the two methods listed above, other different second decision rules can also be used to decide the data to be processed, without being limited to the two methods listed above. In this embodiment, there is no restriction on the specific method of using the second decision rule to decide the data to be processed.

[0105] Afterwards, when multiple applications loaded on the first smart terminal retrieve the data to be processed, multiple processed data corresponding to the multiple applications are calculated based on the data to be processed. Target data corresponding to the multiple processed data is analyzed and obtained based on a preset first decision rule. The target data is then synchronized across the multiple UI user interfaces corresponding to the multiple applications. The specific operations can be found in the first embodiment and will not be repeated here.

[0106] For example, Figure 5 As shown, two hardware carriers (sensors) are used as an example, including sensor 1 and sensor 2, where sensor 2 also contains two software carriers, APP1 and APP2. For example, sensor 1 is a hardware carrier set in a smart bracelet, sensor 2 is a hardware carrier set in a smartphone, and APP1 and APP2 are software carriers loaded in the smartphone that can be used for step counting. It should be noted that:

[0107] (1) Sensor 1 and Sensor 2 represent different hardware carriers.

[0108] (2) The software core of a smartphone is an operating system represented by Android or IOS.

[0109] (3) What is exchanged and transmitted between sensor 1 and sensor 2 is hardware data, also known as raw data.

[0110] (4) The data transmitted between sensor 1 or sensor 2 and APP1 or APP2 is uplink data, that is, raw data; the data transmitted between APP1 or APP2 and sensor 1 or sensor 2 is downlink data, that is, processed data.

[0111] (5) Data is transferred between APP1 and APP2 through the traditional method of the operating system (observer mode or broadcast mode), and the processed data is transferred.

[0112] When users count steps using the above-mentioned smart phones and smart bracelets, Figure 6 As shown, the steps are as follows:

[0113] Step 1: The smartphone and smart bracelet establish a wireless communication connection through Bluetooth or other interfaces;

[0114] Step 2: After the smartphone confirms that the connection is established, a carrier decision tree is built on the smartphone using software.

[0115] Step 3: The decision tree module starts initialization, reading the original data 1 on the smartphone side from the bottom layer of the smartphone side, and obtaining the original data 2 on the smart bracelet side through channels such as Bluetooth;

[0116] Step 4: If the original data is read successfully, go to step 5; otherwise, go to step 3;

[0117] Step 5: Complete the first decision according to the preset second decision rule. Assuming that the decision result uses original data 2, the decision result original data 2 is placed in the preset buffer and temporarily retained;

[0118] Step 6: If the application APP1 on the smartphone attempts to access the raw data 1 at the bottom layer of the smartphone, the raw data 2 in the preset buffer is written back to the data file partition where the smartphone's bottom layer sensor is located, and the application APP1 is added to the decision module to start generating the software decision layer of the decision tree.

[0119] Step 7: After the application APP1 obtains the original data 2 from the bottom layer, it performs corresponding calculations, uses the callback function to obtain the calculated processed data D1, puts the processed data D1 into a preset buffer, and enters the sleep mode;

[0120] Step 8: Application APP2 also attempts to obtain raw data 2 from the bottom layer. Similarly, it performs corresponding calculations to obtain processed data D2, stores the processed data D2 in a preset buffer, and enters sleep mode.

[0121] Step 9: Activate the first decision rule at the software layer and determine the target data DD to be adopted based on the processed data D1 and processed data D2. Assuming that the target data DD is processed data D1, the target data DD is delivered to the application APP2 via a broadcast or intent message.

[0122] Step 10: Application APP1 and application APP2 update their respective corresponding UI interfaces according to the target data DD, and then enter the sleep mode again.

[0123] In addition, there are a few points that need to be explained:

[0124] 1. Decision rules: The second decision rule at the hardware layer can adopt a wearable device priority method. That is, when the smartphone detects that the connection with the smart bracelet is disconnected or there is a trend of moving away, the raw data collected by the smart bracelet's sensor shall prevail. The first decision rule at the software layer can take into account the user's setting selection, such as the user's selection of the maximum priority strategy or the weighted average strategy.

[0125] 2. If the preset buffer has sufficient sample space, the sensor model can be collected. The collected data can be used to revise the manufacturer's sensor calibration and standards. Similarly, for upper-level software applications, the corresponding application name and software version number can be recorded to optimize the pedometer algorithm and move towards greater accuracy.

[0126] 3. The upper display of the wearable device (smart bracelet) can also be used as an APP to write back the decision-making processing data DD through Bluetooth and other methods, thereby achieving the unification of data from various smart terminals. The transmission method can also use Bluetooth and other methods.

[0127] 4. UI interface: It involves two levels: the display level, which includes the step counting data display of smartphone applications APP and smart bracelets; the setting level, which provides users with the selection entry for setting rules, mainly for the first decision rule setting of the software layer and the second decision rule setting of the hardware layer. The setting level can also hide part or all of the setting menu from the user.

[0128] Through the above-mentioned scheme, this embodiment obtains multiple original data collected by the first smart terminal and at least one second smart terminal when performing data statistics with the first smart terminal and at least one second terminal that establishes a communication connection therewith. Based on the multiple original data and the preset second decision rule, the processed data corresponding to the multiple original data are obtained, thereby improving the accuracy of the processed data and further improving the accuracy of the target data. Therefore, while achieving data synchronization, the reliability of the data is also improved.

[0129] The present invention further provides a data synchronization device, such as Figure 7 As shown, Figure 7 Schematic diagram of the functional modules of a data synchronization device embodiment of the present invention.

[0130] In this embodiment, the data synchronization device includes: an acquisition module 10, used to acquire the data to be processed; a calculation module 20, used to calculate and obtain multiple processing data corresponding to the multiple applications according to the data to be processed when multiple applications loaded on the first smart terminal call the data to be processed; an analysis module 30, used to analyze and obtain target data corresponding to the multiple processing data according to a preset first decision rule; a processing module 40, used to synchronize the target data in multiple UI user interfaces corresponding to the multiple applications.

[0131] Optionally, the acquisition module 10 is also used to: acquire multiple original data collected by the first smart terminal and at least one second smart terminal; wherein the first smart terminal establishes a communication connection with the at least one second smart terminal; and acquire the data to be processed corresponding to the multiple original data based on the multiple original data and a preset second decision rule.

[0132] Optionally, the acquisition module 10 is specifically configured to: determine priorities of the plurality of original data according to device types of the first smart terminal and the at least one second smart terminal; and determine original data with the highest priority as the data to be processed.

[0133] Optionally, the acquisition module 10 is specifically configured to: select first original data from the multiple original data, where the first original data is original data collected by a smart terminal selected by a user; and determine the first original data as the data to be processed.

[0134] Optionally, the acquisition module 10 is specifically configured to: compare sizes of the plurality of processed data to determine a maximum processed data therein; and determine the maximum processed data as the target data.

[0135] Optionally, the analysis module 30 is specifically configured to perform weighted average calculation on the plurality of processed data to obtain the target data corresponding to the plurality of processed data.

[0136] Optionally, the analysis module 30 is specifically configured to: obtain first processed data selected by a user from the plurality of processed data; and determine the first processed data as the target data.

[0137] Optionally, the processing module 40 is further configured to cache the data to be processed in a preset buffer and enter a sleep mode.

[0138] The specific implementation of the data synchronization device of the present invention is basically the same as the embodiments of the above-mentioned data synchronization method, and will not be repeated here.

[0139] Through the above scheme, this embodiment uses the first smart terminal to obtain the data to be processed. When multiple applications loaded on the first smart terminal call the data to be processed, the first smart terminal calculates and obtains multiple processing data corresponding to the multiple applications based on the data to be processed, and analyzes and obtains target data corresponding to the multiple processing data based on the preset first decision rule. Then, the target data is synchronized in the multiple UI user interfaces corresponding to the multiple applications, rather than the different processing data corresponding to each application, thereby achieving data synchronization.

[0140] The present invention also provides a computer-readable storage medium, which stores a data synchronization program. The data synchronization program can be executed by one or more processors to: a first smart terminal obtains data to be processed; when multiple applications loaded on the first smart terminal call the data to be processed, multiple processing data corresponding to the multiple applications are calculated based on the data to be processed; according to a preset first decision rule, target data corresponding to the multiple processing data are analyzed and obtained; and the target data is synchronized in multiple UI user interfaces corresponding to the multiple applications.

[0141] Furthermore, when the data synchronization program is executed by the processor, it also implements the following operations: obtaining multiple original data collected by the first smart terminal and at least one second smart terminal; wherein, the first smart terminal establishes a communication connection with the at least one second smart terminal; based on the multiple original data and a preset second decision rule, obtaining the data to be processed corresponding to the multiple original data.

[0142] Furthermore, when the data synchronization program is executed by the processor, the following operations are also implemented: determining the priority of the multiple original data based on the device types of the first smart terminal and the at least one second smart terminal; and determining the original data with the highest priority as the data to be processed.

[0143] Furthermore, when the data synchronization program is executed by the processor, the following operations are also implemented: selecting first original data from the multiple original data, the first original data being the original data collected by the smart terminal selected by the user; and determining the first original data as the data to be processed.

[0144] Furthermore, when the data synchronization program is executed by the processor, the following operations are also implemented: comparing the sizes of the plurality of processed data to determine the largest processed data therein; and determining the largest processed data as the target data.

[0145] Furthermore, when the data synchronization program is executed by the processor, the following operation is also implemented: performing weighted average calculation on the multiple processed data to obtain the target data corresponding to the multiple processed data.

[0146] Furthermore, when the data synchronization program is executed by the processor, the following operations are also implemented: obtaining first processed data selected by a user from the plurality of processed data; and determining the first processed data as the target data.

[0147] Furthermore, when the data synchronization program is executed by the processor, the following operations are also implemented: caching the data to be processed in a preset buffer and entering a sleep mode.

[0148] The specific implementation of the computer-readable storage medium of the present invention is basically the same as the various embodiments of the above-mentioned data synchronization method, and will not be repeated here.

[0149] Through the above-mentioned scheme, this embodiment obtains the data to be processed. When multiple applications loaded on the first smart terminal call the data to be processed, multiple processing data corresponding to the multiple applications are calculated and obtained respectively according to the data to be processed, and according to the preset first decision rule, the target data corresponding to the multiple processing data are analyzed and obtained. Then, the target data is synchronized in the multiple UI user interfaces corresponding to the multiple applications, rather than the different processing data corresponding to each application, thereby achieving data synchronization.

[0150] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.

[0151] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0152] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0153] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for synchronizing step counting data, comprising: Acquire a plurality of processed data corresponding to a plurality of applications having a pedometer function of the first smart terminal, wherein the plurality of processed data represents pedometer data; Analyzing and processing the plurality of processed data to obtain target data according to a preset first decision rule, wherein the target data is final step counting data; as well as The target data is synchronized on multiple user interfaces UI corresponding to the multiple application programs with the step counting function.

2. The method according to claim 1, wherein the first smart terminal is communicatively connected to a second smart terminal, the plurality of applications includes a first application associated with the second smart terminal, the method further comprising: Obtaining raw data collected by the second intelligent terminal; as well as Based on the original data collected by the second smart terminal, processed data corresponding to the first application is determined.

3. The method of claim 1 , wherein the plurality of applications includes a second application, the method further comprising: Acquiring data to be processed collected by the first intelligent terminal; as well as Based on the data to be processed collected by the first smart terminal, the processed data corresponding to the second application is determined, wherein the processed data corresponding to the second application is obtained by the second application calling the data to be processed and calculating.

4. The method according to claim 1, wherein analyzing and processing the plurality of processed data according to a preset first decision rule to obtain target data comprises: comparing sizes of the plurality of processed data to determine a maximum processed data among the plurality of processed data; as well as The maximum processed data is determined as the target data.

5. The method according to claim 1 , wherein analyzing and processing the plurality of processed data according to a preset first decision rule to obtain target data comprises: The target data is obtained by performing weighted averaging on the plurality of processed data.

6. The method according to claim 1, wherein analyzing and processing the plurality of processed data according to a preset first decision rule to obtain target data comprises: acquiring first processed data selected by a user from the plurality of processed data; as well as The first processed data is determined as the target data.

7. The method according to claim 2, wherein the second smart terminal comprises a wearable device, and the wearable device comprises a smart watch or a smart bracelet.

8. The method according to any one of claims 1 to 7, wherein the first intelligent terminal comprises a smart phone or a tablet computer.

9. A device for synchronizing step counting data, comprising: an acquisition module, configured to acquire a plurality of processed data corresponding to a plurality of applications having a pedometer function of the first smart terminal, wherein the plurality of processed data represents pedometer data; an analysis module, configured to analyze and process the plurality of processed data according to a preset first decision rule to obtain target data, wherein the target data is the final step counting data; as well as A processing module is used to synchronize the target data on multiple user interfaces UI corresponding to the multiple application programs with a step counting function.

10. An intelligent terminal comprising: a memory configured to store a program; as well as The processor is configured to call the program to execute the synchronization method for step counting data according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for synchronizing step counting data according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Data statistical method and device

    CN106156480A

  • Contact information synchronization method and apparatus

    CN106375535A

  • Application control method, device, terminal equipment and medium

    CN108600303A