WO2018228488A1 - 一种数据同步方法、装置及移动设备 - Google Patents

一种数据同步方法、装置及移动设备 Download PDF

Info

Publication number
WO2018228488A1
WO2018228488A1 PCT/CN2018/091327 CN2018091327W WO2018228488A1 WO 2018228488 A1 WO2018228488 A1 WO 2018228488A1 CN 2018091327 W CN2018091327 W CN 2018091327W WO 2018228488 A1 WO2018228488 A1 WO 2018228488A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
smart wearable
account identifier
wearable device
synchronized
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2018/091327
Other languages
English (en)
French (fr)
Inventor
田兴龙
苏莹莹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Asu Tech Co Ltd
Qingdao Haier Co Ltd
Original Assignee
Beijing Asu Tech Co Ltd
Qingdao Haier Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Asu Tech Co Ltd, Qingdao Haier Co Ltd filed Critical Beijing Asu Tech Co Ltd
Publication of WO2018228488A1 publication Critical patent/WO2018228488A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Definitions

  • the present invention relates to the field of data communication technologies, and in particular, to a data synchronization method, apparatus, and mobile device.
  • the smart wearable device is a portable electronic device that can be directly worn on the user, and can collect the wearer's information.
  • An existing data synchronization method for a smart wearable device is: a mobile device establishes a connection with the smart device in response to a connection request about the mobile device and the smart wearable device, and further, the mobile device pushes the data to be synchronized to the smart wearable device. Therefore, the smart wearable device can obtain historical data corresponding to the local account identifier carried by the mobile device; subsequently, the mobile device uploads the data to be synchronized acquired from the smart wear device to the server according to a predetermined period.
  • the mobile phone sends a connection request to the wrist (smart wear device)
  • a connection is established with the wrist, and the mobile phone downloads sports health data corresponding to the local account identifier of the mobile phone from the server, and transmits the sports health data.
  • the wrist is thrown; then, every two hours, the sports health data collected by the wrist in the past two hours is received. For example, if the current time is 9:00, the receiving wrist is collected from 7:00-9:00. Go to the sports health data and upload the sports health data obtained from the wrist in the past three hours to the server every three hours.
  • the above data synchronization method can implement data synchronization, for the scenario in which a plurality of mobile devices share one smart wearable device
  • the above-mentioned prior art data synchronization method has the following problem: the same smart wearable device is on different mobile devices.
  • the binding switching interaction affects each other.
  • the specific mobile device establishes a connection with the smart wearable device after the connection request is established, and the data to be synchronized of the mobile device is sent to the smart wearable after the connection is established.
  • the device causes the smart wearable device to have a binding relationship with another device before the connection is established, and the data of the device with the binding relationship in the smart wearable device is undoubtedly lost.
  • the purpose of the embodiments of the present invention is to provide a data synchronization method, device, and mobile device, so as to achieve the purpose that the same smart wearable device does not affect the binding between different mobile devices.
  • the specific technical solutions are as follows:
  • an embodiment of the present invention provides a data synchronization method, which is applied to a mobile device, where the method includes:
  • binding account identifier is a null value
  • establishing a communication connection with the smart wearable device and pushing the data to be synchronized to the smart wearable device with the binding account identifier being null;
  • binding account identifier is a non-null value, determining whether the binding account identifier is the same as the local account identifier carried by the mobile device;
  • binding account identifier is the same as the local account identifier carried by the mobile device, establishing a communication connection with the smart wearable device.
  • the method before the step of pushing the data to be synchronized to the smart wearable device with the binding account identifier being null, the method further includes:
  • the method further includes:
  • the method further includes:
  • the data to be synchronized is uploaded to the server according to a preset period.
  • the method further includes:
  • the data to be synchronized includes: sports health data;
  • Sports health data and device data including at least one of setting data and system time.
  • the step of sending the data to be synchronized to the smart wearable device whose binding account identifier is a non-null value includes:
  • an embodiment of the present invention provides a data synchronization apparatus, which is applied to a mobile device, where the apparatus includes:
  • a first acquiring module configured to: obtain, according to the connection request, the binding account identifier fed back by the smart wearable device, and determine whether the binding account identifier is a null value;
  • a pushing module configured to establish a communication connection with the smart wearable device when the judgment result of the first obtaining module is yes, and push the data to be synchronized to the smart wearable device whose binding account identifier is a null value;
  • a determining module configured to determine, when the determination result of the first obtaining module is negative, whether the binding account identifier is the same as the local account identifier carried by the mobile device;
  • Establishing a connection module configured to establish a communication connection with the smart wearable device when the determination result of the determination module is YES.
  • the device further includes:
  • the second obtaining module is configured to: before the smart wearable device with the binding account identifier is null, request the server to acquire the data to be synchronized; and/or obtain the data to be synchronized locally from the mobile device.
  • the device further includes:
  • a third acquiring module configured to: after the mobile device establishes a communication connection with the smart wearable device whose binding account identifier is a non-null value, obtain the smart wearable device whose binding account identifier is a non-null value to the The data to be synchronized sent by the mobile device; and/or, the data to be synchronized is sent to the smart wearable device whose binding account is identified as a non-null value.
  • the device further includes:
  • the uploading module is configured to upload the data to be synchronized to the server according to a preset period after establishing a communication connection with the smart wearable device.
  • the device further includes:
  • a rejecting module configured to refuse to establish a connection with the smart wearable device when the determination result of the first obtaining module is no, and the determining result of the determining module is negative.
  • the data to be synchronized includes: sports health data;
  • Sports health data and device data including at least one of setting data and system time.
  • the third obtaining module includes:
  • a sub-module configured to perform data fusion processing on the data to be synchronized and the data to be synchronized that are requested to be acquired by the server, to obtain data to be sent to be sent;
  • a sending sub-module configured to send the obtained to-be-synchronized data to be sent to the smart wearable device whose binding account identifier is a non-null value.
  • an embodiment of the present invention further provides a mobile device, where the mobile device includes: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
  • a memory for storing a computer program
  • the processor when used to execute a program stored in the memory, implements the steps of the data synchronization method provided by the embodiment of the present invention.
  • the embodiment of the present invention further provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the data provided by the embodiment of the present invention is implemented.
  • the steps of the synchronization method are not limited to:
  • the mobile device after the mobile device responds to the connection request, the mobile device does not directly establish a communication connection with the smart wearable device, but determines whether the binding account identifier obtained from the smart wearable device is null, that is, whether the smart wearable device is currently determined. And having a binding relationship with the other device; further, when it is determined that the binding account identifier is a null value, establishing a communication connection with the smart wearable device, and pushing the data to be synchronized to the smart wearable device; and, when determining the binding When the account identifier is a non-null value but is the same as the local account identifier carried by the mobile device, a communication connection is also established with the smart wearable device.
  • FIG. 1 is a schematic flowchart of a data synchronization method according to an embodiment of the present invention
  • FIG. 2 is a flowchart of data synchronization by using a data synchronization method provided by an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a data synchronization apparatus according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a mobile device according to an embodiment of the present invention.
  • the embodiment of the invention provides a data synchronization method, device and mobile device.
  • a data synchronization method provided by an embodiment of the present invention is first introduced.
  • the main body of the data synchronization method provided by the embodiment of the present invention may be a mobile device, such as a mobile phone, a tablet computer, or the like, which is not limited herein.
  • a data synchronization method provided by an embodiment of the present invention is applied to a mobile device, and includes the following steps:
  • the mobile device in response to the connection request, obtain the binding account identifier fed back by the smart wearable device, and determine whether the binding account identifier is a null value; if yes, execute S102; if not, execute S103;
  • the smart wearable device may be: a smart device such as a wrist drop, a smart watch, or a smart bracelet.
  • the embodiment of the present invention does not limit the specific type of smart wearable device.
  • the connection request may be sent by the mobile device to the smart wearable device, so that the mobile device may obtain the binding account identifier fed back by the smart wear device for the connection request, and determine whether the binding account identifier is null; the connection request may also be The smart wearable device sends the mobile device to the mobile device, so that the mobile device responds to the connection request and sends an acquisition request to the smart wear device, so that the mobile device can obtain the binding account identifier of the smart wear device for the acquisition request feedback, and determine the Whether the binding account ID is null.
  • the binding account identifier is used to identify the mobile device bound to the smart wearable device, if the smart wearable device has never been bound to any mobile device, or if the smart wearable device has previously bound a mobile device, but the mobile device has If the smart wearable device is unbound, the binding account identifier is a null value; if the smart wearable device is currently bound to a mobile device, the binding account identifier is a non-null value.
  • the specific representation of the null value and the non-null value is not limited in the embodiment of the present invention.
  • binding account identifier is a null value, that is, when the smart wearable device is not currently bound to any mobile device, a communication connection is established with the smart wearable device, and the data to be synchronized is pushed to the binding.
  • the so-called smart wearable device is currently not bound to the state of any mobile device, and two specific cases may be involved in this embodiment. For convenience of description, it is assumed that the mobile device described in this step is specifically mobile device A.
  • the smart wearable device is a new device, that is, it has never been bound to the mobile device A before. Then, in this step, the smart wearable device and the mobile device A will establish a communication connection to complete the initial binding.
  • the binding means that the binding account identifier of the smart wearable device is modified from a null value to a value of the mobile device A local account identifier.
  • the data to be synchronized pushed by the mobile device A to the smart wearable device may include setting data, system time, etc., for subsequent synchronization interaction and normal use.
  • the smart wearable device is bound to the mobile device A during a certain period of time, and then unbound with the mobile device A. During the unbinding period, the smart device may be in an idle state or may be in a binding relationship with other mobile devices, and the overall solution of the embodiment is not affected.
  • the smart wearable device in this step, is in a state of not being bound to any mobile device, and needs to be re-bound with the smart device A. Then the smart wearable device and the mobile device A will establish a communication connection and complete the binding again.
  • the binding means that the binding account identifier of the smart wearable device is modified from a null value to a value of the mobile device A local account identifier.
  • the data to be synchronized that the mobile device A pushes to the smart wearable device further includes various related data generated in the previous binding process, such as sports health data and the like. Thereby, the data of the smart wearable device is restored to the state before the mobile device A is unbind.
  • the smart wearable device once the smart wearable device is unbundled with the mobile device A and bound to other mobile devices, the data related to the mobile device A on the smart wearable device will be overwritten. Even if the smart wearable device is rebinded with mobile device A, part of the covered data cannot be recovered. The user who caused the mobile device A cannot continue to use normally in the previous scenario. It can be seen that multiple mobile devices share the smart wearable device when they interact with each other.
  • the data can be restored to the state before the unbinding. That is to say, even if the smart wearable device repeatedly switches the binding between two or more mobile devices, the users of the respective mobile devices can use normally without affecting the integrity of the respective data.
  • Data to be synchronized refers to data that needs to be synchronized between different devices.
  • data that needs to be synchronized between the mobile device and the smart wearable device may be data stored by the mobile device itself or may be a mobile device. From the data obtained from the cloud storage server, it can be understood that the specific content of the data to be synchronized is different at different times. For example, the 9:00 data to be synchronized is different from the specific content of the 10:00 data to be synchronized.
  • the method may further include: requesting the server to acquire the data to be synchronized; and/or from the The mobile device locally obtains data to be synchronized.
  • the data fusion processing may be performed on the to-be-synchronized data requested from the server and the to-be-synchronized data locally obtained from the mobile device, when the data to be synchronized is requested to be obtained from the server, The fused data to be synchronized is obtained, and the fused data to be synchronized is pushed to the smart wearable device whose binding account identifier is null.
  • the so-called data fusion processing specifically refers to: using data fusion algorithms to perform data combination, correlation and combination processing, so that the data to be synchronized after fusion is more accurate, more comprehensive and complete.
  • the specific data fusion algorithm is not limited in the embodiment of the present invention. For example, it may be a fusion method based on feature extraction or a fusion method based on search, and is of course not limited thereto.
  • the server may be a server in the cloud server cluster, where the server stores the data to be synchronized corresponding to the mobile device, and the mobile device may send the acquisition request to the server to obtain the data to be synchronized.
  • the mobile terminal may request the server to synchronize the data to be synchronized corresponding to the mobile device in the next 7 days.
  • the data to be synchronized includes: sports health data; or, sports health data and device data, the device data including at least one of setting data and system time.
  • the sports health data is data collected by the smart wearable device and worn by the smart wearable device, and the wearer owns the mobile device, and can use the mobile device to push the sports health data to the smart wearable device, and can also obtain the mobile health device by using the mobile device. Sports health data sent by the smart wearable device.
  • the setting data is mainly used to set the shortcut of the smart wearable device.
  • setting the left button in the smart wearable device is: starting to collect data, setting the right button in the smart wearable device to: stop collecting data, and the smart wearable device obtains the setting data. You can set your own shortcuts based on this setting data.
  • the system time can be the system time of the server.
  • the smart wearable device can update its current time as: the system time, so as to avoid data caused by the time synchronization of the smart wearable device and the server. error.
  • binding account identifier is a non-null value
  • binding account identifier is the same as the local account identifier carried by the mobile device, that is, the mobile device currently bound to the smart wearable device is: the mobile device, Execute S104;
  • the mobile device currently bound to the smart wearable device is:
  • the method may further include:
  • the mobile device currently bound to the smart wearable device is: other mobile devices than the mobile device, the mobile device refuses to establish a connection with the smart wearable device, thereby being currently bound to the smart wearable device. Mobile device data is not lost.
  • the mobile device currently bound to the smart wearable device is: mobile device A.
  • the binding account identifier of the smart wearable device is: mobile device A The account identifier.
  • an account switching request occurs, that is, the mobile device B requests to establish a communication connection with the smart wearable device
  • the binding account identifier is not null
  • the binding account identifier and the local account identifier carried by the mobile device B are The mobile device B refuses to establish a connection with the smart wearable device. Therefore, the data corresponding to the mobile device A collected by the smart wearable device is not lost, that is, when the mobile device A establishes a connection with the smart wearable device again, The smart wearable device acquires data corresponding to the mobile device A.
  • binding account identifier is non-null and the binding account identifier is the same as the local account identifier carried by the mobile device, a communication connection is established with the smart wearable device.
  • the mobile device after the mobile device responds to the connection request, the mobile device does not directly establish a communication connection with the smart wearable device, but determines whether the binding account identifier obtained from the smart wearable device is null, that is, whether the smart wearable device is currently determined.
  • the binding relationship is established with the other device.
  • the smart wearable device When the smart wearable device does not have a binding relationship with the other device, the smart wearable device establishes a communication connection with the smart wearable device.
  • the smart wearable device pushes the data to be synchronized; and when it is determined that the binding account identifier is a non-null value but is the same as the local account identifier carried by the mobile device, the communication connection is also established with the smart wearable device.
  • the mobile device can immediately perform synchronous operation with the smart wearable device.
  • the method may further include:
  • the smart wearable device can actively synchronize the data stored by the smart wearable device to the mobile device, and the smart wearable device whose binding account identifier is not null can be sent to the mobile device.
  • the mobile device can obtain the data to be synchronized sent by the smart wearable device whose binding account identifier is a non-null value to the mobile device; in another implementation manner, the mobile device can actively The stored data is synchronized to the smart wearable device.
  • the mobile device sends the data to be synchronized to the smart wearable device whose binding account is identified as a non-null value.
  • the smart wearable device can receive the data to be synchronized sent by the mobile device.
  • the mobile device and the smart wearable device can perform a two-way synchronization operation. Specifically, the mobile device obtains data to be synchronized sent by the smart wearable device whose binding account identifier is a non-null value to the mobile device, and The mobile device sends the data to be synchronized to the smart wearable device whose binding account is identified as a non-null value. It should be noted that the data to be synchronized sent by the mobile device and the specific data content of the data to be synchronized sent by the smart wearable device may be different or the same, and the content type may include sports health data; or, sports health data and device data, The device data includes at least one of setting data and system time.
  • the step of the mobile device sending the data to be synchronized to the smart wearable device whose binding account is identified as a non-null value may include The following two steps:
  • Step A1 Perform data fusion processing on the data to be synchronized and the data to be synchronized that are requested to be acquired by the server, to obtain data to be transmitted to be sent;
  • the time that the mobile device can store the data to be synchronized stored in the mobile device and closest to the current time is As the start time, the server is requested to obtain the data to be synchronized after the start time.
  • the so-called data fusion processing specifically refers to: using a data fusion algorithm to perform data combination, correlation, and combination processing, thereby realizing the fusion of the data to be synchronized locally and the data to be synchronized requested from the server.
  • the data to be sent to be sent makes the data to be transmitted to be sent more accurate, more comprehensive and complete.
  • the specific data fusion algorithm is not limited in the embodiment of the present invention. For example, it may be a fusion method based on feature extraction or a fusion method based on search.
  • Step A2 Send the obtained to-be-synchronized data to be sent to the smart wearable device whose binding account identifier is a non-null value.
  • the mobile device sends the data to be synchronized to the smart wearable device only when the binding account identifier of the smart wearable device is the same as the local account identifier carried by the mobile device.
  • the smart wearable device does not have the problem of data loss of the bound device.
  • the data to be synchronized obtained by the smart wearable device is processed by data fusion, that is, the data to be synchronized includes the data to be synchronized locally of the mobile terminal, and The data to be synchronized obtained from the server request is included, and therefore, the data to be synchronized obtained by the smart wearable device is more complete.
  • the method may further include:
  • the data to be synchronized is uploaded to the server according to a preset period.
  • the smart wearable device may send the data to be synchronized to the mobile device according to a preset period. Accordingly, the mobile device may upload the data to be synchronized to the server according to a preset period.
  • the preset period can be set according to the user requirements.
  • the specific value of the preset period is not limited in the embodiment of the present invention. For example, specific values may be 2 hours, 3 hours, 4 hours, 5 hours, 6 hours, and the like.
  • the data synchronization method provided by the embodiment of the present invention is applied to a certain mobile terminal, and the smart wearable device is assumed to be a wrist drop.
  • the process diagram of the mobile terminal synchronizing with the wrist projection data is as shown in FIG. 2 , and the details are as follows:
  • the mobile terminal sends a connection request to the wrist through the handshake protocol, and further obtains a binding account identifier (appid) that is sent by the wrist to the connection request, and determines whether the binding account identifier is a null value. If yes, execute S202. Otherwise, execute S203;
  • S205 establishing a communication connection with the wrist, and acquiring the data to be synchronized sent by the wrist with the binding account identifier as a non-null value to the mobile device; and the data to be synchronized locally and the data to be synchronized requested from the server.
  • the preset period can be: 2 hours, 3 hours, 4 hours, and so on.
  • the switching and synchronization are not directly performed, but the switching and synchronization are performed only when it is determined that the wrist is not currently bound to other devices.
  • the data to be synchronized obtained by the wrist is processed by data fusion, that is, the data to be synchronized includes both the data to be synchronized and the data to be synchronized requested from the server, so that the data obtained by the wrist is more complete. .
  • the embodiment of the present invention provides a data synchronization device, which is applied to a mobile device.
  • the device includes:
  • the first obtaining module 301 is configured to obtain, according to the connection request, the binding account identifier fed back by the smart wearable device, and determine whether the bound account identifier is a null value;
  • the pushing module 302 is configured to establish a communication connection with the smart wearable device when the determination result of the first obtaining module 301 is YES, and push the data to be synchronized to the smart wearable device whose binding account identifier is a null value;
  • the determining module 303 is configured to determine, when the determination result of the first obtaining module 301 is negative, whether the binding account identifier is the same as the local account identifier carried by the mobile device;
  • the establishing connection module 304 is configured to establish a communication connection with the smart wearable device when the determination result of the determining module 303 is YES.
  • the mobile device after the mobile device responds to the connection request, the mobile device does not directly establish a communication connection with the smart wearable device, but determines whether the binding account identifier obtained from the smart wearable device is null, that is, whether the smart wearable device is currently determined. And having a binding relationship with the other device; further, when it is determined that the binding account identifier is a null value, establishing a communication connection with the smart wearable device, and pushing the data to be synchronized to the smart wearable device; and, when determining the binding When the account identifier is a non-null value but is the same as the local account identifier carried by the mobile device, a communication connection is also established with the smart wearable device.
  • the device further includes:
  • the second obtaining module is configured to: before the smart wearable device with the binding account identifier is null, request the server to acquire the data to be synchronized; and/or obtain the data to be synchronized locally from the mobile device.
  • the device further includes:
  • a third acquiring module configured to: after the mobile device establishes a communication connection with the smart wearable device whose binding account identifier is a non-null value, obtain the smart wearable device whose binding account identifier is a non-null value to the The data to be synchronized sent by the mobile device; and/or, the data to be synchronized is sent to the smart wearable device whose binding account is identified as a non-null value.
  • the device further includes:
  • the uploading module is configured to upload the data to be synchronized to the server according to a preset period after establishing a communication connection with the smart wearable device.
  • the device further includes:
  • the rejecting module is configured to refuse to establish a connection with the smart wearable device when the determination result of the first obtaining module 301 is negative, and the determination result of the determining module 303 is negative.
  • the data to be synchronized includes: sports health data;
  • Sports health data and device data including at least one of setting data and system time.
  • the third obtaining module includes:
  • a sub-module configured to perform data fusion processing on the data to be synchronized and the data to be synchronized that are requested to be acquired by the server, to obtain data to be sent to be sent;
  • a sending sub-module configured to send the obtained to-be-synchronized data to be sent to the smart wearable device whose binding account identifier is a non-null value.
  • the embodiment of the present invention further provides a mobile device, as shown in FIG. 4, including a processor 401, a communication interface 402, a memory 403, and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 pass through the communication bus 404.
  • a mobile device as shown in FIG. 4, including a processor 401, a communication interface 402, a memory 403, and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 pass through the communication bus 404.
  • the processor 401 is configured to implement the data synchronization method provided by the embodiment of the present invention when the program stored in the memory 403 is executed.
  • the data synchronization method includes the following steps:
  • binding account identifier is a null value
  • establishing a communication connection with the smart wearable device and pushing the data to be synchronized to the smart wearable device with the binding account identifier being null;
  • binding account identifier is a non-null value, determining whether the binding account identifier is the same as the local account identifier carried by the mobile device;
  • binding account identifier is the same as the local account identifier carried by the mobile device, establishing a communication connection with the smart wearable device.
  • the method before the step of pushing the data to be synchronized to the smart wearable device with the binding account identifier being null, the method further includes:
  • the method further includes:
  • the method further includes:
  • the data to be synchronized is uploaded to the server according to a preset period.
  • the method further includes:
  • the data to be synchronized includes: sports health data;
  • the step of sending the data to be synchronized to the smart wearable device whose binding account identifier is a non-null value includes:
  • the communication bus mentioned in the above mobile device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, the figure is shown by only one thick line, but does not mean that there is only one bus or one type of bus.
  • the communication interface is used for communication between the above mobile device and other devices.
  • the memory may include a random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage.
  • the memory may also be at least one storage device located away from the aforementioned processor.
  • the processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (Ne twork processor, NP for short), or a digital signal processor (DSP). ), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.
  • CPU central processing unit
  • Ne twork processor Network processor
  • DSP digital signal processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • the embodiment of the present invention further provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the data synchronization method provided by the embodiment of the present invention are implemented. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Information Transfer Between Computers (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本发明提供的数据同步方法包括:所述移动设备响应于连接请求,获取智能穿戴设备反馈的绑定账号标识,当绑定账号标识为空值时,与所述智能穿戴设备建立通信连接,并将待同步数据推送至绑定账号标识为空值的智能穿戴设备;当为非空值时,则判断所述绑定账号标识与所述移动设备携带的本地账号标识是否相同。

Description

一种数据同步方法、装置及移动设备
本申请要求了申请日为2017年06月15日,申请号为201710451761.2,发明名称为“一种数据同步方法、装置及移动设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及数据通信技术领域,特别是涉及一种数据同步方法、装置及移动设备。
背景技术
近几年,智能穿戴设备发展迅速,在提高人们生活品质、促进生活方式智能化方面起到很重要的作用。其中,智能穿戴设备是一种可以直接佩戴于用户身上的便携式电子设备,它可以采集佩戴者的信息。
现有的针对于智能穿戴设备的数据同步方法为:移动设备响应于关于该移动设备和智能穿戴设备的连接请求,与该智能设备建立连接,进而,移动设备将待同步数据推送给智能穿戴设备,从而智能穿戴设备能够获得该移动设备携带的本地账号标识对应的历史数据;随后,移动设备按照预定周期将从智能穿戴设备获取的待同步数据上传到服务器。例如,手机(移动设备)向腕投(智能穿戴设备)发送连接请求后,与腕投建立连接,手机从服务器下载与该手机的本地账号标识对应的运动健康数据,并将该运动健康数据传输给腕投;随后,每隔两小时,接收腕投在过去两小时内采集到的运动健康数据,例如,当前时间为9:00,则接收腕投在7:00-9:00时间内采集到的运动健康数据,并每隔三小时,将过去三小时内从腕投获取的运动健康数据上传到服务器。
尽管上述的数据同步方法能够实现数据同步,但是,对于多个移动设备共用一个智能穿戴设备的场景而言,采用上述的现有技术的数据同步方法存在如下问题:同一智能穿戴设备在不同移动设备之间绑定切换相互影响,具体体现在:由于任一移动设备响应于连接请求后,均会与智能穿戴设备建立连接,且连接建立后会将该移动设备的待同步数据发送至该智能穿戴设备,这样导致如果该连接建立之前,该智能穿戴设备与另一设备仍具有绑定关系,那么,无疑会使得该智能穿戴设备中该存在绑定关系的设备的数据丢失,即被覆盖。
发明内容
本发明实施例的目的在于提供一种数据同步方法、装置及移动设备,以达到同一智能穿戴设备在不同移动设备之间绑定切换相互不影响目的。具体技术方案如下:
第一方面,本发明实施例提供了一种数据同步方法,应用于移动设备,所述方法包括:
所述移动设备响应于连接请求,获取智能穿戴设备反馈的绑定账号标识,判断所述绑定账号标识是否为空值;
当所述绑定账号标识为空值时,则与所述智能穿戴设备建立通信连接,并将待同步数据推送至绑定账号标识为空值的智能穿戴设备;
当所述绑定账号标识为非空值时,则判断所述绑定账号标识与所述移动设备携带的本地账号标识是否相同;
当所述绑定账号标识与所述移动设备携带的本地账号标识相同时,则与所述智能穿戴设备建立通信连接。
可选的,所述将待同步数据推送至绑定账号标识为空值的智能穿戴设备的步骤之前,所述方法还包括:
向服务器请求获取待同步数据;和/或,从所述移动设备本地获取待同步数据。
可选的,当所述移动设备与所述绑定账号标识为非空值的智能穿戴设备建立通信连接后,所述方法还包括:
获取所述绑定账号标识为非空值的智能穿戴设备向所述移动设备发送的待同步数据;
和/或,向所述绑定账号标识为非空值的智能穿戴设备发送待同步数据。
可选的,所述与所述智能穿戴设备建立通信连接之后,所述方法还包括:
按照预设的周期将待同步数据上传至服务器。
可选的,当所述绑定账号标识为非空值,且所述绑定账号标识与所述移动设备携带的本地账号标识不相同时,所述方法还包括:
拒绝与所述智能穿戴设备建立连接。
可选的,所述待同步数据包括:运动健康数据;
或者,
运动健康数据以及设备数据,所述设备数据包括设置数据和系统时间中的至少一种。
可选的,所述向所述绑定账号标识为非空值的智能穿戴设备发送待同步数据的步骤,包括:
将所述移动设备本地的待同步数据和从服务器请求获取的待同步数据进行数据融合 处理,得到待发送的待同步数据;
将所得到的待发送的待同步数据发送至所述绑定账号标识为非空值的智能穿戴设备。
第二方面,本发明实施例提供了一种数据同步装置,应用于移动设备,所述装置包括:
第一获取模块,用于所述移动设备响应于连接请求,获取智能穿戴设备反馈的绑定账号标识,判断所述绑定账号标识是否为空值;
推送模块,用于在所述第一获取模块的判断结果为是时,与所述智能穿戴设备建立通信连接,并将待同步数据推送至绑定账号标识为空值的智能穿戴设备;
判断模块,用于在所述第一获取模块的判断结果为否时,判断所述绑定账号标识与所述移动设备携带的本地账号标识是否相同;
建立连接模块,用于在所述判断模块的判断结果为是时,与所述智能穿戴设备建立通信连接。
可选的,所述装置还包括:
第二获取模块,用于将待同步数据推送至绑定账号标识为空值的智能穿戴设备之前,向服务器请求获取待同步数据;和/或,从所述移动设备本地获取待同步数据。
可选的,所述装置还包括:
第三获取模块,用于当所述移动设备与所述绑定账号标识为非空值的智能穿戴设备建立通信连接后,获取所述绑定账号标识为非空值的智能穿戴设备向所述移动设备发送的待同步数据;和/或,向所述绑定账号标识为非空值的智能穿戴设备发送待同步数据。
可选的,所述装置还包括:
上传模块,用于与所述智能穿戴设备建立通信连接之后,按照预设的周期将待同步数据上传至服务器。
可选的,所述装置还包括:
拒绝模块,用于在所述第一获取模块的判断结果为否,且所述判断模块的判断结果为否时,拒绝与所述智能穿戴设备建立连接。
可选的,所述待同步数据包括:运动健康数据;
或者,
运动健康数据以及设备数据,所述设备数据包括设置数据和系统时间中的至少一种。
可选的,所述第三获取模块,包括:
获取子模块,用于将所述移动设备本地的待同步数据和从服务器请求获取的待同步数据进行数据融合处理,得到待发送的待同步数据;
发送子模块,用于将所得到的待发送的待同步数据发送至所述绑定账号标识为非空值的智能穿戴设备。
第三方面,本发明实施例还提供了一种移动设备,该移动设备包括:处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
存储器,用于存放计算机程序;
处理器,用于执行存储器上所存放的程序时,实现本发明实施例所提供的数据同步方法的步骤。
第四方面,本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现本发明实施例所提供的数据同步方法的步骤。
本发明实施例中,移动设备响应于连接请求后,并非直接与智能穿戴设备建立通信连接,而是判断从智能穿戴设备获取的绑定账号标识是否为空值,即判断该智能穿戴设备当前是否与其他设备具有绑定关系;进而,当判断出该绑定账号标识为空值时,与该智能穿戴设备建立通信连接,并向该智能穿戴设备推送待同步数据;并且,当判断出该绑定账号标识为非空值但与该移动设备携带的本地账号标识相同时,也与该智能穿戴设备建立通信连接。可见,通过利用本方案,当同一智能穿戴设备在不同移动设备间切换时,并非直接执行切换及同步,而是在判断出该智能穿戴设备当前不与其他设备具有绑定关系时,才执行切换与同步,这样,由于该智能穿戴设备已经解绑其他设备,因此,不会存在绑定设备的数据丢失的问题,因此,达到了同一智能穿戴设备在不同移动设备之间绑定切换相互不影响的目的。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的数据同步方法的一种流程示意图;
图2为应用本发明实施例提供的数据同步方法进行数据同步的一种流程图;
图3为本发明实施例提供的数据同步装置的一种结构示意图;
图4为本发明实施例提供的一种移动设备的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
为了提高数据交互过程中的数据完整性,本发明实施例提供了一种数据同步方法、装置及移动设备。
下面首先对本发明实施例提供的一种数据同步方法进行介绍。
需要说明的是,本发明实施例提供的数据同步方法的执行主体,可以为移动设备,例如,手机,平板电脑等,此处不作限定。
参见图1所示,本发明实施例提供的一种数据同步方法,应用于移动设备,包括如下步骤:
S101,所述移动设备响应于连接请求,获取智能穿戴设备反馈的绑定账号标识,判断所述绑定账号标识是否为空值;如果是,则执行S102,如果否,则执行S103;
需要说明的是,智能穿戴设备可以是:腕投、智能手表、智能手环等智能设备。本发明实施例对具体的智能穿戴设备类型不做限定。
连接请求可以是移动设备向智能穿戴设备发送的,从而,移动设备可以获取智能穿戴设备针对该连接请求反馈的绑定账号标识,并判断该绑定账号标识是否为空值;连接请求也可以是智能穿戴设备向移动设备发送的,从而,移动设备响应该连接请求,并向智能穿戴设备发送获取请求,从而,移动设备可以获取智能穿戴设备针对该获取请求反馈的绑定账号标识,并判断该绑定账号标识是否为空值。
绑定账号标识用于标识与智能穿戴设备绑定的移动设备,如果智能穿戴设备从未绑定过任何移动设备,或者,如果智能穿戴设备之前绑定过某一移动设备,但是该移动设备已与该智能穿戴设备解绑,则绑定账号标识为空值;如果智能穿戴设备当前已绑定某一移动设备,则绑定账号标识为非空值。
具体的,本发明实施例对空值和非空值的具体表示形式不做限定。例如,可以用数值0表示空值,用任意非0值表示不为空值,也可以用字符串NULL表示空值,用任意非NULL的字符串表示不为空值。
S102,与所述智能穿戴设备建立通信连接,并将待同步数据推送至绑定账号标识为空值的智能穿戴设备;
可以理解的是,当所述绑定账号标识为空值时,即智能穿戴设备当前未绑定任何移动设备时,则与所述智能穿戴设备建立通信连接,并将待同步数据推送至绑定账号标识为空值的智能穿戴设备。
所谓的智能穿戴设备当前未绑定任何移动设备的状态,在本实施例中可能涉及两种具体的情况。为便于叙述,以下假设本步骤中所述的移动设备具体为移动设备A。
一种情况下,所述智能穿戴设备为新设备,即之前从未与所述移动设备A绑定过。则在本步骤中,所述智能穿戴设备与所述移动设备A将建立通信连接,完成初次的绑定。所述绑定意味着所述智能穿戴设备的绑定账号标识由空值修改为移动设备A本地账号标识的数值。在这种情况下,移动设备A向所述智能穿戴设备推送的待同步数据可以包括设置数据、系统时间等,以便于后续的同步交互和正常使用。
另一种情况下,所述智能穿戴设备在先前的某个时间段内曾与所述移动设备A绑定,后又与移动设备A解除绑定。解除绑定的期间,所述智能设备可能一直处于空闲状态,也可能与其他移动设备建立过绑定关系,均不影响本实施例的整体方案,所以此处不做限定。总之在本步骤当中,所述智能穿戴设备处于未绑定任何移动设备的状态,并需要与智能设备A重新绑定。则所述智能穿戴设备与所述移动设备A将建立通信连接,再次完成绑定。所述绑定意味着所述智能穿戴设备的绑定账号标识由空值修改为移动设备A本地账号标识的数值。在这种情况下,移动设备A向所述智能穿戴设备推送的待同步数据还包括先前绑定过程中产生的各类相关数据,例如运动健康数据等。由此使得所述智能穿戴设备的数据恢复到与移动设备A上一次解除绑定前的状态。
这就意味着,智能穿戴设备与移动设备A即使解除绑定后再重新绑定,数据依然能够恢复到解除绑定之前的状态。移动设备A的用户可以在上一次的情景下继续正常使用,基本不受到解除绑定期间发生事件的影响。由此解决了现有技术中,不同移动设备无法互不影响的共用智能穿戴设备的问题。
例如在现有技术中,一旦智能穿戴设备与移动设备A解绑,并绑定其他移动设备使用,则智能穿戴设备上与移动设备A相关的数据将被覆盖。即使智能穿戴设备与移动设备A重新绑定,被覆盖的部分数据也不能够恢复。导致移动设备A的用户无法在上一次的情景下继续正常使用。可见多个移动设备共用智能穿戴设备时是相互影响的。
而在本实施例当中,无论智能穿戴设备与移动设备A解绑期间是否与其他移动设备 绑定,数据是否被覆盖,二者重新绑定后数据均可恢复到解绑之前的状态。也就是说,即使智能穿戴设备在两个或者多个移动设备之间反复的切换绑定,各个移动设备的用户均可以正常使用,互不影响各自数据的完整性。
待同步数据是指不同设备之间需要进行同步的数据,此处指移动设备与智能穿戴设备之间的需要进行同步的数据,待同步数据可以是移动设备自身存储的数据,也可以是移动设备从云存储服务器获取的数据,可以理解的是,待同步数据在不同时刻的其具体内容不同。例如,9:00的待同步数据与10:00的待同步数据的具体内容不同。
因此,为了获取待同步数据,将待同步数据推送至绑定账号标识为空值的智能穿戴设备的步骤之前,该方法还可以包括:向服务器请求获取待同步数据;和/或,从所述移动设备本地获取待同步数据。并且,当既向服务器请求获取待同步数据,也从所述移动设备本地获取待同步数据时,可以对从服务器请求得到的待同步数据和从移动设备本地获取的待同步数据进行数据融合处理,得到融合后的待同步数据,并将该融合后的待同步数据推送至绑定账号标识为空值的智能穿戴设备。所谓的数据融合处理具体指:利用数据融合算法,进行数据的联合、相关及组合处理,使得融合后的待同步数据更准确、更全面和完整。本发明实施例对具体的数据融合算法不做限定。例如,可以为基于特征抽取的融合方法,也可以为基于搜索的融合方法,当然并不局限于此。
需要说明的是,服务器可以是云端服务器集群中的某一台服务器,该服务器中存储有与该移动设备对应的待同步数据,移动设备可以通过向该服务器发送获取请求,用以获得待同步数据。例如,移动终端可以向服务器请求近7天内的与该移动设备对应的待同步数据。
具体的,待同步数据包括:运动健康数据;或者,运动健康数据以及设备数据,所述设备数据包括设置数据和系统时间中的至少一种。
运动健康数据是智能穿戴设备采集的佩戴该智能穿戴设备的佩戴者的数据,该佩戴者拥有移动设备,并可以利用该移动设备向该智能穿戴设备推送运动健康数据,也可以利用该移动设备获取该智能穿戴设备发送的运动健康数据。
设置数据主要用于设置智能穿戴设备的快捷方式,例如,设置智能穿戴设备中的左键为:开始采集数据,设置智能穿戴设备中的右键为:停止采集数据,智能穿戴设备在获得设置数据以后,可以根据该设置数据设置自身快捷方式。
实际应用中,系统时间可以为服务器的系统时间,智能穿戴设备在获得系统时间以后,可以更新其当前时间为:该系统时间,从而可以避免因智能穿戴设备和服务器的时间不同 步带来的数据误差。
S103,判断所述绑定账号标识与所述移动设备携带的本地账号标识是否相同;如果相同,则执行S104;
可以理解的是,当绑定账号标识为非空值,且绑定账号标识与移动设备携带的本地账号标识相同,即表明当前与智能穿戴设备绑定的移动设备为:本移动设备,则可以执行S104;
在一种具体的实施方式中,当绑定账号标识为非空值,且绑定账号标识与移动设备携带的本地账号标识不相同时,即表明当前与智能穿戴设备绑定的移动设备为:除本移动设备以外的其他移动设备,则该方法还可以包括:
拒绝与所述智能穿戴设备建立连接。
可以看出,由于当前与智能穿戴设备绑定的移动设备为:除本移动设备以外的其他移动设备,故本移动设备拒绝与该智能穿戴设备建立连接,从而,当前与智能穿戴设备绑定的移动设备的数据不会丢失。
例如,当前与智能穿戴设备绑定的移动设备为:移动设备A,在移动设备A未与智能穿戴设备解除绑定关系的情况下,该智能穿戴设备的绑定账号标识为:移动设备A的账号标识,此时,如果出现账号切换请求,即移动设备B请求与智能穿戴设备建立通信连接,则由于绑定账号标识不为空值,且绑定账号标识与移动设备B携带的本地账号标识不相同,故移动设备B拒绝与智能穿戴设备建立连接,因此,智能穿戴设备采集的与移动设备A对应的数据不会丢失,即当移动设备A再次与智能穿戴设备建立连接时,依然能从该智能穿戴设备获取到与移动设备A对应的数据。
S104,与所述智能穿戴设备建立通信连接。
可以理解的是,当绑定账号标识为非空值,且绑定账号标识与移动设备携带的本地账号标识相同时,则与该智能穿戴设备建立通信连接。
应用本发明实施例,移动设备响应于连接请求后,并非直接与智能穿戴设备建立通信连接,而是判断从智能穿戴设备获取的绑定账号标识是否为空值,即判断该智能穿戴设备当前是否与其他设备具有绑定关系;进而,当判断出该绑定账号标识为空值时,即该智能穿戴设备当前与其他设备不具有绑定关系时,与该智能穿戴设备建立通信连接,并向该智能穿戴设备推送待同步数据;并且,当判断出该绑定账号标识为非空值但与该移动设备携带的本地账号标识相同时,也与该智能穿戴设备建立通信连接。
可见,通过利用本方案,当同一智能穿戴设备在不同移动设备间切换时,并非直接执 行切换及同步,而是在判断出该智能穿戴设备当前不与其他设备具有绑定关系时,才执行切换与同步,这样,由于该智能穿戴设备已经解绑其他设备,因此,不会存在绑定设备的数据丢失的问题,因此,达到了同一智能穿戴设备在不同移动设备之间绑定切换相互不影响的目的。
可以理解的是,当移动设备与绑定账号标识为非空值的智能穿戴设备建立通信连接后,为了保证数据完整性及提高用户的使用体验,移动设备可以与智能穿戴设备立即进行同步操作。基于该处理思想,当移动设备与绑定账号标识为非空值的智能穿戴设备建立通信连接后,该方法还可以包括:
获取绑定账号标识为非空值的智能穿戴设备向所述移动设备发送的待同步数据;和/或,向绑定账号标识为非空值的智能穿戴设备发送待同步数据。
具体的,在一种具体实现方式中,该智能穿戴设备可以主动将自身存储的数据同步给移动设备,此时,绑定账号标识为非空值的智能穿戴设备可以向所述移动设备发送的待同步数据,相应的,该移动设备可以获取绑定账号标识为非空值的智能穿戴设备向所述移动设备发送的待同步数据;在另一种实现方式中,该移动设备可以主动将自身存储的数据同步给智能穿戴设备,此时,移动设备向绑定账号标识为非空值的智能穿戴设备发送待同步数据,相应的,该智能穿戴设备可以接收到移动设备发送的待同步数据;在又一种实现方式中,移动设备和智能穿戴设备可以进行双向同步操作,具体的,移动设备获取绑定账号标识为非空值的智能穿戴设备向所述移动设备发送的待同步数据,且移动设备向绑定账号标识为非空值的智能穿戴设备发送待同步数据。需要说明的是,移动设备所发送的待同步数据和智能穿戴设备发送的待同步数据的具体数据内容可以不同或相同,并且,内容类型可以包括运动健康数据;或者,运动健康数据以及设备数据,所述设备数据包括设置数据和系统时间中的至少一种。
可选的,为了保证数据准确性、完整及不存在冗余,在一种具体的实施方式中,移动设备向绑定账号标识为非空值的智能穿戴设备发送待同步数据的步骤,可以包括以下两步:
步骤A1,将移动设备本地的待同步数据和从服务器请求获取的待同步数据进行数据融合处理,得到待发送的待同步数据;
实际应用中,为了避免从服务器获取的待同步数据与移动设备本地的待同步数据重复,造成资源浪费,移动设备可以将本移动设备中存储的,且距离当前时间最近的待同步数据的时间,作为起始时间,并向服务器请求获得该起始时间以后的待同步数据。
需要说明的是,所谓的数据融合处理具体指:利用数据融合算法,进行数据的联合、相关及组合处理,从而实现移动终端本地的待同步数据和从服务器请求获取的待同步数据的融合,得到待发送的待同步数据,使得待发送的待同步数据更准确、更全面和完整。本发明实施例对具体的数据融合算法不做限定。例如,可以为基于特征抽取的融合方法,也可以为基于搜索的融合方法。
步骤A2,将所得到的待发送的待同步数据发送至绑定账号标识为非空值的智能穿戴设备。
对于绑定账号标识为非空值的智能穿戴设备,只有该智能穿戴设备的绑定账号标识与移动设备携带的本地账号标识相同时,移动设备才向该智能穿戴设备发送待同步数据,因此,该智能穿戴设备不会存在绑定设备的数据丢失的问题,进一步,由于该智能穿戴设备获得的待同步数据是经过数据融合处理的,即待同步数据既包括移动终端本地的待同步数据,又包括从服务器请求获取的待同步数据,因此,该智能穿戴设备获得的待同步数据更完整。
需要说明的是,实际应用中,与智能穿戴设备建立通信连接之后,该方法还可以包括:
按照预设的周期将待同步数据上传至服务器。
为了通过云端存储数据,智能穿戴设备可以按照预设的周期将待同步数据发送至移动设备,相应的,移动设备可以按照预设的周期将待同步数据上传至服务器。其中,预设的周期可以根据用户需求设定,本发明实施例对预设的周期的具体数值不做限定。例如,具体数值可以为2小时、3小时、4小时、5小时、6小时等等。
下面通过一个具体实例来对本发明实施例进行简单介绍。
将本发明实施例提供的数据同步方法应用于某个移动终端,并假设智能穿戴设备为腕投,则该移动终端与该腕投数据同步的过程图如图2所示,具体如下:
S201,移动终端通过握手协议向腕投发送连接请求,进而,获得腕投针对该连接请求反馈的绑定账号标识(appid),并判断该绑定账号标识是否为空值,如果是,执行S202,否则,执行S203;
S202,与该腕投建立通信连接,并向服务器请求获取待同步数据;将待同步数据推送至绑定账号标识为空值的腕投,并执行S206;
S203,判断该绑定账号标识与该移动设备携带的本地账号标识是否相同,如果是,执行S205,否则,执行S204;
S204,拒绝与该腕投建立通信连接;
S205,与该腕投建立通信连接,并获取绑定账号标识为非空值的腕投向所述移动设备发送的待同步数据;将移动设备本地的待同步数据和从服务器请求获取的待同步数据进行数据融合处理,得到待发送的待同步数据,将所得到的待发送的待同步数据发送至绑定账号标识为非空值的腕投,并执行S206;
S206,按照预设的周期将待同步数据上传至服务器。
进一步,判断待同步数据是否上传成功,如果不成功,则需要重新上传待同步数据。预设的周期可以为:2小时、3小时、4小时等等。
可见,通过利用本方案,当同一腕投在不同移动设备间切换时,并非直接执行切换及同步,而是在判断出该腕投当前不与其他设备具有绑定关系时,才执行切换与同步,这样,由于该腕投已经解绑其他设备,因此,不会存在绑定设备的数据丢失的问题,因此,达到了同一腕投在不同移动设备之间绑定切换相互不影响的目的,进一步,腕投获得的待同步数据是经过数据融合处理的,即待同步数据既包括移动终端本地的待同步数据,又包括从服务器请求获取的待同步数据,因此,腕投获得待同步数据更完整。
相应于上述数据同步方法实施例,本发明实施例提供了一种数据同步装置,应用于移动设备,参见图3所示,所述装置包括:
第一获取模块301,用于所述移动设备响应于连接请求,获取智能穿戴设备反馈的绑定账号标识,判断所述绑定账号标识是否为空值;
推送模块302,用于在所述第一获取模块301的判断结果为是时,与所述智能穿戴设备建立通信连接,并将待同步数据推送至绑定账号标识为空值的智能穿戴设备;
判断模块303,用于在所述第一获取模块301的判断结果为否时,判断所述绑定账号标识与所述移动设备携带的本地账号标识是否相同;
建立连接模块304,用于在所述判断模块303的判断结果为是时,与所述智能穿戴设备建立通信连接。
本发明实施例中,移动设备响应于连接请求后,并非直接与智能穿戴设备建立通信连接,而是判断从智能穿戴设备获取的绑定账号标识是否为空值,即判断该智能穿戴设备当前是否与其他设备具有绑定关系;进而,当判断出该绑定账号标识为空值时,与该智能穿戴设备建立通信连接,并向该智能穿戴设备推送待同步数据;并且,当判断出该绑定账号标识为非空值但与该移动设备携带的本地账号标识相同时,也与该智能穿戴设备建立通信连接。可见,通过利用本方案,当同一智能穿戴设备在不同移动设备间切换时,并非直接执行切换及同步,而是在判断出该智能穿戴设备当前不与其他设备具有绑定关系时,才执 行切换与同步,这样,由于该智能穿戴设备已经解绑其他设备,因此,不会存在绑定设备的数据丢失的问题,因此,达到了同一智能穿戴设备在不同移动设备之间绑定切换相互不影响的目的。
可选的,所述装置还包括:
第二获取模块,用于将待同步数据推送至绑定账号标识为空值的智能穿戴设备之前,向服务器请求获取待同步数据;和/或,从所述移动设备本地获取待同步数据。
可选的,所述装置还包括:
第三获取模块,用于当所述移动设备与所述绑定账号标识为非空值的智能穿戴设备建立通信连接后,获取所述绑定账号标识为非空值的智能穿戴设备向所述移动设备发送的待同步数据;和/或,向所述绑定账号标识为非空值的智能穿戴设备发送待同步数据。
可选的,所述装置还包括:
上传模块,用于与所述智能穿戴设备建立通信连接之后,按照预设的周期将待同步数据上传至服务器。
可选的,所述装置还包括:
拒绝模块,用于在所述第一获取模块301的判断结果为否,且所述判断模块303的判断结果为否时,拒绝与所述智能穿戴设备建立连接。
可选的,所述待同步数据包括:运动健康数据;
或者,
运动健康数据以及设备数据,所述设备数据包括设置数据和系统时间中的至少一种。
可选的,所述第三获取模块,包括:
获取子模块,用于将所述移动设备本地的待同步数据和从服务器请求获取的待同步数据进行数据融合处理,得到待发送的待同步数据;
发送子模块,用于将所得到的待发送的待同步数据发送至所述绑定账号标识为非空值的智能穿戴设备。
本发明实施例还提供了一种移动设备,如图4所示,包括处理器401、通信接口402、存储器403和通信总线404,其中,处理器401,通信接口402,存储器403通过通信总线404完成相互间的通信,
存储器403,用于存放计算机程序;
处理器401,用于执行存储器403上所存放的程序时,实现本发明实施例所提供的数据同步方法,其中,该数据同步方法包括如下步骤:
所述移动设备响应于连接请求,获取智能穿戴设备反馈的绑定账号标识,判断所述绑定账号标识是否为空值;
当所述绑定账号标识为空值时,则与所述智能穿戴设备建立通信连接,并将待同步数据推送至绑定账号标识为空值的智能穿戴设备;
当所述绑定账号标识为非空值时,则判断所述绑定账号标识与所述移动设备携带的本地账号标识是否相同;
当所述绑定账号标识与所述移动设备携带的本地账号标识相同时,则与所述智能穿戴设备建立通信连接。
可选的,所述将待同步数据推送至绑定账号标识为空值的智能穿戴设备的步骤之前,所述方法还包括:
向服务器请求获取待同步数据;和/或,从所述移动设备本地获取待同步数据。
可选的,当所述移动设备与所述绑定账号标识为非空值的智能穿戴设备建立通信连接后,所述方法还包括:
获取所述绑定账号标识为非空值的智能穿戴设备向所述移动设备发送的待同步数据;
和/或,向所述绑定账号标识为非空值的智能穿戴设备发送待同步数据。
可选的,所述与所述智能穿戴设备建立通信连接之后,所述方法还包括:
按照预设的周期将待同步数据上传至服务器。
可选的,当所述绑定账号标识为非空值,且所述绑定账号标识与所述移动设备携带的本地账号标识不相同时,所述方法还包括:
拒绝与所述智能穿戴设备建立连接。
可选的,所述待同步数据包括:运动健康数据;
或者,
运动健康数据以及设备数据,所述设备数据包括设置数据和系统时间中的至少一种。可选的,所述向所述绑定账号标识为非空值的智能穿戴设备发送待同步数据的步骤,包括:
将所述移动设备本地的待同步数据和从服务器请求获取的待同步数据进行数据融合处理,得到待发送的待同步数据;
将所得到的待发送的待同步数据发送至所述绑定账号标识为非空值的智能穿戴设备。
上述移动设备提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,简称PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,简称EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示, 图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
通信接口用于上述移动设备与其他设备之间的通信。
存储器可以包括随机存取存储器(Random Access Memory,简称RAM),也可以包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Ne twork Processor,简称NP)等;还可以是数字信号处理器(Digital Signal Processing,简称DSP)、专用集成电路(Applica tion Specific Integrated Circuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现本发明实施例所提供的数据同步方法的步骤。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、移动设备、计算机可读存储介质实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本发明的保护范围内。

Claims (8)

  1. 一种数据同步方法,其特征在于,应用于移动设备,所述方法包括:
    所述移动设备响应于连接请求,获取智能穿戴设备反馈的绑定账号标识,判断所述绑定账号标识是否为空值;
    当所述绑定账号标识为空值时,则与所述智能穿戴设备建立通信连接,并将待同步数据推送至绑定账号标识为空值的智能穿戴设备;
    当所述绑定账号标识为非空值时,则判断所述绑定账号标识与所述移动设备携带的本地账号标识是否相同;
    当所述绑定账号标识与所述移动设备携带的本地账号标识相同时,则与所述智能穿戴设备建立通信连接。
  2. 根据权利要求1所述方法,其特征在于,所述将待同步数据推送至绑定账号标识为空值的智能穿戴设备的步骤之前,所述方法还包括:
    向服务器请求获取待同步数据;和/或,从所述移动设备本地获取待同步数据。
  3. 根据权利要求1所述方法,其特征在于,当所述移动设备与所述绑定账号标识为非空值的智能穿戴设备建立通信连接后,所述方法还包括:
    获取所述绑定账号标识为非空值的智能穿戴设备向所述移动设备发送的待同步数据;
    和/或,向所述绑定账号标识为非空值的智能穿戴设备发送待同步数据。
  4. 根据权利要求1所述方法,其特征在于,所述与所述智能穿戴设备建立通信连接之后,所述方法还包括:
    按照预设的周期将待同步数据上传至服务器。
  5. 根据权利要求1所述方法,其特征在于,当所述绑定账号标识为非空值,且所述绑定账号标识与所述移动设备携带的本地账号标识不相同时,所述方法还包括:
    拒绝与所述智能穿戴设备建立连接。
  6. 根据权利要求1所述方法,其特征在于,所述待同步数据包括:运动健康数据;
    或者,
    运动健康数据以及设备数据,所述设备数据包括设置数据和系统时间中的至少一种。
  7. 根据权利要求3所述的方法,其特征在于,所述向所述绑定账号标识为非空值的智能穿戴设备发送待同步数据的步骤,包括:
    将所述移动设备本地的待同步数据和从服务器请求获取的待同步数据进行数据融合处理,得到待发送的待同步数据;
    将所得到的待发送的待同步数据发送至所述绑定账号标识为非空值的智能穿戴设备。
  8. 一种移动设备,其特征在于,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
    存储器,用于存放计算机程序;
    处理器,用于执行存储器上所存放的程序时,实现权利要求1方法步骤。
PCT/CN2018/091327 2017-06-15 2018-06-14 一种数据同步方法、装置及移动设备 Ceased WO2018228488A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710451761.2 2017-06-15
CN201710451761.2A CN107135474B (zh) 2017-06-15 2017-06-15 一种数据同步方法、装置及移动设备

Publications (1)

Publication Number Publication Date
WO2018228488A1 true WO2018228488A1 (zh) 2018-12-20

Family

ID=59733964

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/091327 Ceased WO2018228488A1 (zh) 2017-06-15 2018-06-14 一种数据同步方法、装置及移动设备

Country Status (2)

Country Link
CN (1) CN107135474B (zh)
WO (1) WO2018228488A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107135474B (zh) * 2017-06-15 2019-12-20 北京一数科技有限公司 一种数据同步方法、装置及移动设备
CN108777859A (zh) * 2018-04-27 2018-11-09 努比亚技术有限公司 移动终端与穿戴设备间的数据处理方法、终端及存储介质
CN110062341A (zh) * 2019-04-25 2019-07-26 深圳市融智联科技有限公司 一种设备数据分享的方法、装置及系统
CN110502115B (zh) 2019-08-19 2021-08-13 Oppo广东移动通信有限公司 交互方法、头戴设备和存储介质
CN114710509B (zh) * 2022-04-14 2023-03-24 北京思必拓科技有限责任公司 应用数据同步方法、设备、终端及存储介质
CN115276699B (zh) * 2022-07-13 2024-04-26 读书郎教育科技有限公司 一种可数据对齐记录的分体式设备及方法
CN115245271B (zh) * 2022-07-27 2024-07-02 珠海优特智厨科技有限公司 厨房设备以及厨房设备的配对方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160072882A1 (en) * 2014-09-10 2016-03-10 Kabushiki Kaisha Toshiba Electronic apparatus, system and synchronization method
CN105681605A (zh) * 2016-01-04 2016-06-15 上海斐讯数据通信技术有限公司 穿戴设备同步移动终端上信息的方法、穿戴设备及系统
CN105939380A (zh) * 2016-05-25 2016-09-14 北京小米移动软件有限公司 数据同步方法、装置、路由器及智能硬件设备
CN105974802A (zh) * 2016-04-27 2016-09-28 腾讯科技(深圳)有限公司 一种控制智能设备的方法、装置和系统
CN107135474A (zh) * 2017-06-15 2017-09-05 北京数科技有限公司 一种数据同步方法、装置及移动设备

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4968917B2 (ja) * 2006-07-28 2012-07-04 キヤノン株式会社 権限管理装置、権限管理システム及び権限管理方法
CN104580403B (zh) * 2014-12-24 2017-03-01 腾讯科技(深圳)有限公司 一种数据统计方法及其系统、用户终端、应用服务器
CN105138420A (zh) * 2015-07-31 2015-12-09 小米科技有限责任公司 数据备份方法、装置及系统、数据恢复方法、装置和系统
CN105354407A (zh) * 2015-09-22 2016-02-24 深圳还是威健康科技有限公司 一种智能穿戴设备用户使用数据的处理方法和系统
WO2017070854A1 (zh) * 2015-10-27 2017-05-04 深圳还是威健康科技有限公司 一种数据同步方法、移动终端及智能穿戴设备
CN105516282B (zh) * 2015-12-01 2019-06-11 深圳市元征科技股份有限公司 一种数据同步处理的方法以及可穿戴设备
CN105930135A (zh) * 2016-04-22 2016-09-07 上海海漾软件技术有限公司 一种基于可穿戴设备的控制方法以及装置
CN106487911A (zh) * 2016-10-25 2017-03-08 广东欧珀移动通信有限公司 一种数据同步方法、装置和系统
CN106817405A (zh) * 2016-12-15 2017-06-09 奇酷互联网络科技(深圳)有限公司 数据同步方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160072882A1 (en) * 2014-09-10 2016-03-10 Kabushiki Kaisha Toshiba Electronic apparatus, system and synchronization method
CN105681605A (zh) * 2016-01-04 2016-06-15 上海斐讯数据通信技术有限公司 穿戴设备同步移动终端上信息的方法、穿戴设备及系统
CN105974802A (zh) * 2016-04-27 2016-09-28 腾讯科技(深圳)有限公司 一种控制智能设备的方法、装置和系统
CN105939380A (zh) * 2016-05-25 2016-09-14 北京小米移动软件有限公司 数据同步方法、装置、路由器及智能硬件设备
CN107135474A (zh) * 2017-06-15 2017-09-05 北京数科技有限公司 一种数据同步方法、装置及移动设备

Also Published As

Publication number Publication date
CN107135474A (zh) 2017-09-05
CN107135474B (zh) 2019-12-20

Similar Documents

Publication Publication Date Title
WO2018228488A1 (zh) 一种数据同步方法、装置及移动设备
CN108040108B (zh) 通信切换方法、装置、协调服务器及可读存储介质
WO2011023068A1 (zh) 一种个人网设备获取业务内容的装置、方法及相关装置
CN113177093B (zh) 数据同步方法及装置、电子设备和存储介质
CN107395658B (zh) 离线对等辅助通知传输
US10425477B2 (en) Synchronizing file data between computer systems
US20160117079A1 (en) Method and apparatus for displaying application icons on terminal
WO2018219178A1 (zh) 数据同步方法、装置、服务器及存储介质
JP2016040724A (ja) データ同期化
KR20150027771A (ko) 이동 장치 및 애플리케이션의 클러스터링을 위한 시스템 및 방법
WO2014063658A1 (zh) 一种内容同步的方法和装置
CN109644201A (zh) 在设备之间复制和粘贴
WO2013071747A1 (zh) 一种获取文件的方法和装置
CN111291008A (zh) 数据处理方法、装置、系统、电子设备及计算机存储介质
CN110716945A (zh) 一种数据更新方法、数据更新系统、服务器及存储介质
CN115334163B (zh) 业务数据处理方法、装置和服务器
CN108415908B (zh) 一种多媒体数据的处理方法及服务器
US10673791B2 (en) Techniques for data reads from secondary stores
CN106453571A (zh) 一种数据迁移的方法及终端
CN108965359B (zh) 通信方法、通信装置、可读介质和电子设备
US20140370814A1 (en) Connecting wireless devices
TWI505100B (zh) 在區域網路中進行資料分享與數據同步的方法
CN106528098A (zh) 一种多开应用之间数据的处理方法、装置及终端
US10642877B2 (en) Techniques for consistent reads in a split message store
CN103763087A (zh) 一种信息处理方法及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18816620

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18816620

Country of ref document: EP

Kind code of ref document: A1