WO2018000692A1 - 数据同步方法、系统及用于数据同步的用户终端和服务端 - Google Patents

数据同步方法、系统及用于数据同步的用户终端和服务端 Download PDF

Info

Publication number
WO2018000692A1
WO2018000692A1 PCT/CN2016/105546 CN2016105546W WO2018000692A1 WO 2018000692 A1 WO2018000692 A1 WO 2018000692A1 CN 2016105546 W CN2016105546 W CN 2016105546W WO 2018000692 A1 WO2018000692 A1 WO 2018000692A1
Authority
WO
WIPO (PCT)
Prior art keywords
synchronization
data
user terminal
server
mark
Prior art date
Application number
PCT/CN2016/105546
Other languages
English (en)
French (fr)
Inventor
李奇奇
Original Assignee
乐视控股(北京)有限公司
乐视网信息技术(北京)股份有限公司
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 乐视控股(北京)有限公司, 乐视网信息技术(北京)股份有限公司 filed Critical 乐视控股(北京)有限公司
Publication of WO2018000692A1 publication Critical patent/WO2018000692A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • 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 patent application relates to data transmission technology, and in particular to a data synchronization method and system.
  • the user may use different terminals to transmit data with other users at the same time or at different times.
  • a user finds a chat history they cannot find a chat log that is not local.
  • a part of the embodiments of the present invention provides a data synchronization method and system, and a user terminal and a server for data synchronization, which are used to solve the problem that data synchronization cannot be performed between multi-user terminals in the prior art.
  • an embodiment of the present invention provides a data synchronization method, for a user terminal, including: when receiving an update instruction, sending a saved synchronization mark to a preset server; acquiring the server is based on Matching the synchronization mode obtained by the synchronization mark; synchronizing synchronization data and synchronization flag with the server based on the synchronization mode.
  • an embodiment of the present invention further provides a data synchronization method for serving End, comprising: matching a synchronization mark obtained from the user terminal with the saved latest synchronization mark, and obtaining a synchronization manner corresponding to the matching result; feeding the synchronization mode to the user terminal; and based on the synchronization manner The user terminal synchronizes the data and the synchronization flag.
  • a third aspect of the present invention provides a user terminal for data synchronization, including: a synchronization mark sending module, configured to send a saved synchronization mark to a preset server when receiving an update instruction; a mode obtaining module, configured to acquire a synchronization mode obtained by the server based on matching the synchronization mark, and a first synchronization module, configured to synchronize synchronization data and a synchronization mark with the server according to the synchronization mode.
  • the embodiment of the present invention further provides a server for data synchronization, comprising: a matching module, configured to match a synchronization mark obtained from the user terminal with the saved latest synchronization mark, and obtain a synchronization mode;
  • the synchronization mode sending module is configured to feed back the synchronization mode to the user terminal, and the second synchronization module is configured to perform synchronization of data and synchronization tags with the user terminal according to the synchronization mode.
  • an embodiment of the present invention further provides a data synchronization system, including: the user terminal as described above; and the server as described above.
  • an embodiment of the present invention further provides an electronic device, including: at least one processor; and a memory; wherein the memory stores a program executable by the at least one processor, where the instruction is The at least one processor executes to enable the at least one processor to perform the data synchronization method applied to the user terminal according to any of the above aspects of the present invention.
  • the embodiment of the present invention further provides a non-volatile computer storage medium storing computer-executable instructions for performing data synchronization applied to a user terminal according to any of the above aspects of the present invention. method.
  • the embodiment of the present invention further provides a computer program capable of performing the data synchronization method applied to the user terminal according to any one of the above aspects of the present invention.
  • an embodiment of the present invention further provides an electronic device, including: at least one location And a memory; wherein the memory stores a program executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the invention described above Any data synchronization method applied to the server.
  • an embodiment of the present invention further provides a non-volatile computer storage medium storing computer-executable instructions for performing the data synchronization method applied to the server by any one of the foregoing aspects of the present invention.
  • the embodiment of the present invention further provides a computer program capable of performing the data synchronization method applied to the server by any of the above aspects of the present invention.
  • the embodiment of the present invention determines the data synchronization between the plurality of user terminals and the server by using the synchronization flag, and further updates the synchronization data according to the synchronization flag of the server and the synchronization flag in the user terminal. In this way, when the user uses different user terminals, the data recorded by each terminal can be synchronized with each other.
  • corresponding generation manners of setting update instructions can effectively ensure that each user terminal updates data in time to achieve data synchronization across terminals.
  • synchronizing the synchronization flags while synchronizing the data ensures that the synchronization flags of the terminals and the server are unified, thereby effectively reducing the amount of transmission of the updated data.
  • FIG. 1 is a flowchart of a data synchronization method according to a first embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a data synchronization system according to a second embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of another data synchronization system according to a second embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention.
  • FIG. 5 is a schematic structural view of an electronic device according to a sixth embodiment of the present invention.
  • a first embodiment of the present invention relates to a data synchronization method.
  • the data synchronization method is applicable to data synchronization between different user terminals and server terminals and different user terminals through the server.
  • the user terminal includes but is not limited to: a mobile phone, a computer, a tablet computer, and the like.
  • the server includes but is not limited to: a single server, a server cluster, a distributed server group, and the like.
  • the data synchronization method mainly includes the following steps:
  • Step S110 When receiving the update instruction, the user terminal sends the saved synchronization mark to the preset server.
  • the user terminal may obtain an update instruction through the server, or generate an update instruction based on the self event.
  • the user terminal receiving the update instruction includes at least one of the following:
  • step S110 when the user terminal is running data synchronization, in order to update the synchronization data in the user terminal in time, the user terminal generates an update instruction according to a preset time period, and when the update instruction is stored in the cache, the user terminal performs step S110.
  • the user terminal A1 is running a chat application, in order to be able to obtain it in time The user uses the same chat application in the user terminal A2 to perform chat chat information, and the user terminal A1 periodically generates the update command according to a preset time period.
  • step S110 For example, when the user terminal B1 starts a chat application including data synchronization, the user terminal B1 generates an update instruction.
  • the server can save device information of multiple user terminals that include the same account, and when the server receives new synchronization data, sends an update command to each user terminal according to the device information.
  • the server sends an update instruction to the user terminal according to the online information obtained from the user terminal. For example, when the user terminal B2 logs in to the data synchronization account, the server receives the online information generated based on the login step, and the server sends an update instruction according to the online information.
  • An update command is generated when receiving data input based on the human-machine interaction device. For example, when the user operates a keyboard and mouse to input data (such as a chat record, a picture, etc.) on the input interface of the user terminal, the received data is mapped to the current synchronization mark, and an update instruction is generated. For another example, when the user inputs a data (such as a chat record, a picture, etc.) on the input interface of the user terminal by operating the keyboard and mouse, the saved synchronization mark is updated, and an update instruction is generated.
  • data such as a chat record, a picture, etc.
  • the user terminal After receiving the update instruction, the user terminal sends the saved synchronization mark to the server.
  • the synchronization flag may be version information of data synchronization based on numbers, and/or characters.
  • the synchronization flag may be version information of data synchronization based on numbers, and/or characters.
  • Step S210 The server matches the synchronization mark obtained from the user terminal with the saved latest synchronization mark, and obtains a synchronization manner corresponding to the matching result.
  • the server retains each synchronization tag and corresponding synchronization data.
  • the synchronization flag a1 of the user terminal is acquired, the synchronization flag a1 is version-matched with the saved latest synchronization flag a2.
  • the synchronization mode is not fed back.
  • the synchronization mode is set based on the inconsistency of the two synchronization flags, the synchronization mode is fed back to the user terminal.
  • the synchronization mode may be an identification information; or synchronization request information prepared for step S120, where the synchronization request information includes information that needs to be synchronized (such as information for indicating a synchronization synchronization flag, and/or Information used to indicate synchronization data).
  • Step S120 The user terminal synchronizes the synchronization data and the synchronization flag with the server according to the synchronization manner.
  • step S121 when the synchronization mode is set based on the synchronization flag of the user terminal that is older than the latest synchronization flag of the server, step S121 is performed.
  • step S122 is performed when the synchronization mode is set based on the synchronization flag of the user terminal newly added to the latest synchronization flag of the server.
  • At least one interaction between the user terminal and the server is included in steps S121 and S122.
  • Step S121 The user terminal receives the data between the two synchronization marks and the latest synchronization mark provided by the server, and updates the synchronization mark of the user terminal.
  • the server determines that the synchronization mark a3 of the user terminal is older than the latest synchronization flag a4 of the server, the server acquires the synchronization data D3 corresponding to the synchronization flag a3 from the user terminal, and marks the synchronization data D3 with the database as a3. Corresponding synchronization data D3' is compared. If they are consistent, the synchronization data between the synchronization markers (a3, a4) is sent to the user terminal; if not, the synchronization flag a5 of the server is updated, and the synchronization data is inconsistent.
  • the synchronization data between (a3, a4) and the latest synchronization mark a5 Feedback to the user terminal corresponds to the updated synchronization mark a5, and save it, at the same time, the synchronization data between (a3, a4) and the latest synchronization mark a5 Feedback to the user terminal.
  • the synchronization mark a3 is older than the synchronization mark a4
  • the synchronization mark a4 is older than the synchronization mark a5.
  • Step S122 The user terminal sends data between the two synchronization tags to the server.
  • the user terminal transmits data corresponding to the current latest synchronization flag a6 to the server.
  • the latest synchronization flag saved by the server is updated as a6, and the data corresponding to the synchronization flag a6 is saved in the database.
  • the present invention determines the data synchronization between a plurality of user terminals and the server by utilizing the synchronization flag, and further updates the synchronization data according to the synchronization flag of the server and the synchronization flag in the user terminal. In this way, when the user uses different user terminals, the data recorded by each terminal can be synchronized with each other.
  • a second embodiment of the present invention provides a data synchronization system.
  • the data synchronization system is applicable to data synchronization between different user terminals and server terminals and different user terminals through the server.
  • the user terminal includes but is not limited to: a mobile phone, a computer, a tablet computer, and the like.
  • the server includes but is not limited to: a single server, a server cluster, a distributed server group, and the like.
  • the user terminal includes: a synchronization mark sending module 11, a synchronization mode acquiring module 12, and a first synchronization module 13.
  • Each module in the user terminal can share a timer, a CPU, a register, a memory, a display screen, and a communication module (such as a wifi module or a cellular network communication module, etc.), and each hardware executes each module under a timing instruction indicated by software.
  • the server includes: a matching module 21, a synchronous mode sending module 22, and a second synchronization module 23, and is connected to a database.
  • Each module in the server can share a CPU, a register, a memory, a communication module (such as a network card, etc.), and each hardware executes each module under a timing instruction indicated by software. The function.
  • the synchronization mark sending module 11 is configured to send the saved synchronization mark to the preset server when receiving the update instruction.
  • the synchronization mark sending module 11 can obtain an update instruction through the server or generate an update command based on the self event in different data synchronization application scenarios.
  • the synchronization mark sending module 11 receives the update instruction including at least one of the following:
  • the synchronization mark transmitting module 11 when the synchronization mark transmitting module 11 is running data synchronization, in order to update the synchronization data in the user terminal in time, the synchronization mark transmitting module 11 generates an update instruction according to a preset time period, and when the update instruction is stored in the cache. , send a sync tag.
  • the user terminal A1 when the user terminal A1 is running a chat application, in order to timely acquire the chat information that the user performs chat using the same chat application in the user terminal A2, the user terminal A1 periodically generates the update instruction according to a preset time period. .
  • the synchronization mark transmitting module 11 generates an update command based on a startup operation of the user.
  • the application corresponding to the application icon obtains a startup operation event of data synchronization.
  • the user terminal In order to upload/download the synchronization data in time, the user terminal generates an update instruction and sends a synchronization flag when the startup operation event is obtained. For example, when the user terminal B1 starts a chat application including data synchronization, the user terminal B1 generates an update instruction.
  • the server can save device information of multiple user terminals including the same account, and when the server receives new synchronization data, sends an update to each synchronization tag sending module 11 according to the device information. instruction.
  • the server sends an update command to the synchronization mark sending module 11 according to the online information obtained from the user terminal. For example, when the user terminal B2 logs in to the data synchronization account, the server receives the online information generated based on the login step, and the server sends an update instruction according to the online information.
  • An update command is generated when receiving data input based on the human-machine interaction device.
  • a data such as a chat record, a picture, etc.
  • the synchronization mark transmitting module 11 associates the received data with the current synchronization mark, and generates an update instruction.
  • the synchronization mark transmitting module 11 updates the saved synchronization mark and generates an update instruction.
  • the synchronization mark sending module 11 sends the saved synchronization mark to the server after receiving the update command.
  • the synchronization flag may be version information of data synchronization based on numbers, and/or characters.
  • the synchronization flags in the user terminal and the server can be empty.
  • the sync mark transmitting module 11 receives new data, the sync mark increases.
  • the synchronization mark transmitting module 11 transmits the latest synchronization flag to the server.
  • the synchronization mark sending module 11 may set a new synchronization mark corresponding to each new data; or the data received at every other time interval may correspond to a new synchronization mark.
  • the matching module 21 of the server matches the synchronization mark acquired from the user terminal with the saved latest synchronization mark, and obtains a synchronization manner corresponding to the matching result.
  • the matching module 21 retains each synchronization flag and corresponding synchronization data.
  • the synchronization flag a1 of the user terminal is acquired, the synchronization flag a1 is version-matched with the saved latest synchronization flag a2.
  • the synchronization mode is not fed back.
  • the synchronization mode transmitting module 22 feeds back the synchronization mode to the user terminal.
  • the synchronization mode may be an identifier information, or synchronization request information prepared by the synchronization mode acquisition module 12, where the synchronization request information includes information that needs to be synchronized (such as information for indicating a synchronization synchronization flag, And/or information used to indicate synchronization data).
  • the synchronization mode obtaining module 12 synchronizes synchronization with the server based on the synchronization mode. Data and synchronization tags.
  • the synchronization mode acquisition module 12 instructs the first synchronization module 13 to perform step S121.
  • the synchronization mode acquisition module 12 instructs the first synchronization module 13 to perform step S122.
  • At least one interaction between the user terminal and the server is included in steps S121 and S122. That is, the interaction between the first synchronization module 13 and the second synchronization module 23.
  • Step S121 The first synchronization module 13 receives the data between the two synchronization tags provided by the second synchronization module 23 and the latest synchronization flag of the server, and updates the synchronization flag of the user terminal.
  • the second synchronization module 23 determines that the synchronization flag a3 of the user terminal is older than the latest synchronization flag a4 of the server, the second synchronization module 23 acquires the synchronization data D3 corresponding to the synchronization flag a3 from the first synchronization module 13, and will synchronize The data D3 is compared with the synchronization data D3' corresponding to the synchronization mark a3 in the database.
  • the second synchronization module 23 sends the synchronization data between the synchronization marks (a3, a4) to the first synchronization module 13; If not, the second synchronization module 23 updates the synchronization flag a5 of the server, and associates the inconsistent synchronization data with the updated synchronization flag a5, and saves it, and simultaneously synchronizes the data between (a3, a4) and the latest.
  • the synchronization flag a5 is fed back to the first synchronization module 13.
  • the synchronization flag a3 is older than the synchronization flag a4, and the synchronization flag a4 is older than the synchronization flag a5.
  • Step S122 The first synchronization module 13 sends data between the two synchronization tags to the second synchronization module 23.
  • the first synchronization module 13 transmits the data corresponding to the current latest synchronization flag a6 to the second synchronization module 23.
  • the saved latest synchronization flag is updated by the second synchronization module 23 as a6, and the data corresponding to the synchronization flag a6 is saved in the database.
  • the data synchronization system of the present invention utilizes hardware of the user terminal and the server, and presses
  • An example of the timing execution process as indicated by the program is as follows:
  • the timer in the user terminal instructs the CPU to generate an update instruction and extracts the synchronization flag from the cache, and sends the synchronization flag to the server through the communication module, and the communication module of the server receives the synchronization flag, and uses the CPU to receive the synchronization flag. Matches with the latest synchronization mark saved in the database. If the version of the received synchronization mark is lower than the latest synchronization mark, the data between the two synchronization marks is sent from the database to the CPU of the user terminal through the paired communication module. The CPU of the user terminal presents the updated data to the user through the terminal display.
  • a third embodiment of the present invention relates to an electronic device corresponding to a data synchronization method of a user terminal.
  • the hardware structure is as shown in FIG. 4, and the device includes:
  • processors 410 and memory 420 One or more processors 410 and memory 420, one processor 410 is exemplified in FIG.
  • the electronic device for the data synchronization method may further include: an input device 430 and an output device 440.
  • the processor 410, the memory 420, the input device 430, and the output device 440 may be connected by a bus or other means, as exemplified by a bus connection in FIG.
  • the memory 420 is used as a non-volatile computer readable storage medium, and can be used for storing non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions corresponding to the data synchronization method in the embodiment of the present invention.
  • / Module for example, the synchronization mark transmission module 11, the synchronization mode acquisition module 12, and the first synchronization module 13 shown in FIG. 2).
  • the processor 410 executes various functional applications and data processing of the server by executing non-volatile software programs, instructions, and modules stored in the memory 420, that is, implementing the data synchronization method of the method embodiment applied to the user terminal.
  • the memory 420 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created by the data synchronization method, and the like. Furthermore, the memory 420 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, Or other non-volatile solid-state storage devices. In some embodiments, memory 420 can optionally include memory remotely located relative to processor 410, which can be connected to a processing device for data synchronization methods over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the input device 430 can receive input numeric or character information, and generate key signal inputs related to user settings and function control of the processing device of the data synchronization method.
  • Output device 440 can include a display device such as a display screen.
  • the one or more modules are stored in the memory 420, and when executed by the one or more processors 410, perform the data synchronization method described above in any of the method embodiments applied to the user terminal.
  • the above product can perform the method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
  • the above product can perform the method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
  • the electronic device of the embodiment of the invention exists in various forms, including but not limited to:
  • Mobile communication devices These devices are characterized by mobile communication functions and are mainly aimed at providing voice and data communication.
  • Such terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
  • Ultra-mobile personal computer equipment This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has mobile Internet access.
  • Such terminals include: PDAs, MIDs, and UMPC devices, such as the iPad.
  • Portable entertainment devices These devices can display and play multimedia content. Such devices include: audio, video players (such as iPod), handheld game consoles, e-books, and smart toys and portable car navigation devices.
  • the composition of the server includes the processor, hard disk, and internal Storage, system bus, etc.
  • the server is similar to a general-purpose computer architecture, but because of the need to provide highly reliable services, it is highly demanded in terms of processing power, stability, reliability, security, scalability, and manageability.
  • the present embodiment realizes that when users use different user terminals, the data recorded by each terminal can be synchronized with each other.
  • a fourth embodiment of the present invention relates to a non-volatile computer storage medium storing computer-executable instructions that can perform data synchronization in any of the above-described method embodiments applied to a user terminal method.
  • the present embodiment realizes that when users use different user terminals, the data recorded by each terminal can be synchronized with each other.
  • a fifth embodiment of the present invention relates to a computer program capable of executing the data synchronization method in any of the above-described method embodiments applied to a user terminal.
  • the present embodiment realizes that when users use different user terminals, the data recorded by each terminal can be synchronized with each other.
  • a sixth embodiment of the present invention relates to an electronic device related to a data synchronization method corresponding to a server.
  • the hardware structure is as shown in FIG. 5, and the device includes:
  • processors 510 and memory 520 one processor 510 is taken as an example in FIG.
  • the electronic device for the data synchronization method may further include: an input device 530 and an output device 550.
  • the processor 510, the memory 520, the input device 530, and the output device 550 may be connected by a bus or other means, as exemplified by a bus connection in FIG.
  • the memory 520 is a non-volatile computer readable storage medium that can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the numbers in the embodiments of the present invention.
  • the program instructions/modules corresponding to the synchronization method for example, the matching module 21, the synchronous mode transmitting module 22, and the second synchronization module 23 shown in FIG. 2).
  • the processor 510 executes various functional applications and data processing of the server by executing non-volatile software programs, instructions, and modules stored in the memory 520, that is, implementing the data synchronization method of the method embodiment applied to the server.
  • the memory 520 may include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created by the data synchronization method, and the like. Further, the memory 520 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other nonvolatile solid state storage device. In some embodiments, memory 520 can optionally include memory remotely located relative to processor 510, which can be connected to a processing device for data synchronization methods over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • Input device 530 can receive input numeric or character information, as well as generate key signal inputs related to user settings and function control of the processing device of the data synchronization method.
  • the output device 550 can include a display device such as a display screen.
  • the one or more modules are stored in the memory 520, and when executed by the one or more processors 510, perform the data synchronization method described above in any of the method embodiments of the server.
  • the above product can perform the method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
  • the above product can perform the method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
  • the present embodiment solves the problem that data synchronization cannot be performed between multi-user terminals in the prior art.
  • a seventh embodiment of the present invention is directed to a nonvolatile computer storage medium storing computer executable instructions executable for any of the above applications The data synchronization method in the method embodiment of the server.
  • the present embodiment solves the problem that data synchronization cannot be performed between multi-user terminals in the prior art.
  • An eighth embodiment of the present invention relates to a computer program capable of executing the data synchronization method in any of the above-described method embodiments applied to a server.
  • the present embodiment solves the problem that data synchronization cannot be performed between multi-user terminals in the prior art.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明实施例公开一种数据同步方法、系统及用于数据同步的用户终端和服务端。根据所述方法,用户终端在接收到更新指令时,将保存的同步标记发送给预设的服务端;服务端将获取自用户终端的同步标记与所保存的最新同步标记进行匹配,并得到对应匹配结果的同步方式;服务端将所述同步方式反馈给所述用户终端;用户终端和服务端基于所述同步方式进行数据和同步标记的同步。采用本发明实施例,实现了用户使用不同用户终端时,各终端所记录的数据能够彼此同步。

Description

数据同步方法、系统及用于数据同步的用户终端和服务端
本申请基于申请号为2016104759922、申请日为2016/6/26的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本专利申请涉及数据传输技术,特别涉及数据同步方法及系统。
背景技术
随着用户所拥有的用户终端数量的增加,用户可能同时、或不同时的使用不同终端与其他用户的终端进行数据传输。当用户查找聊天记录时,却无法找到不在本地的聊天记录。
为此,需要对现有技术进行改进。
发明内容
本发明部分实施例的目的在于提供一种数据同步方法、系统及用于数据同步的用户终端和服务端,用于解决现有技术中的多用户终端之间无法进行数据同步的问题。
第一方面,本发明的实施方式提供了一种数据同步方法,用于用户终端,包含:在接收到更新指令时,将保存的同步标记发送给预设的服务端;获取所述服务端基于匹配所述同步标记所得到的同步方式;基于所述同步方式同步与所述服务端之间的同步数据和同步标记。
第二方面,本发明的实施方式还提供一种数据同步方法,用于服务 端,包含:将获取自用户终端的同步标记与所保存的最新同步标记进行匹配,并得到对应匹配结果的同步方式;将所述同步方式反馈给所述用户终端;基于所述同步方式与所述用户终端进行数据和同步标记的同步。
第三方面,本发明实施方式还提供一种用于数据同步的用户终端,包含:同步标记发送模块,用于在接收到更新指令时,将保存的同步标记发送给预设的服务端;同步方式获取模块,用于获取所述服务端基于匹配所述同步标记所得到的同步方式;第一同步模块,用于基于所述同步方式同步与所述服务端之间的同步数据和同步标记。
第四方面,本发明实施方式还提供一种用于数据同步的服务端,包含:匹配模块,用于将获取自用户终端的同步标记与所保存的最新同步标记进行匹配,并得到同步方式;同步方式发送模块,用于将所述同步方式反馈给所述用户终端;第二同步模块,用于基于所述同步方式与所述用户终端进行数据和同步标记的同步。
第五方面,本发明实施方式还提供一种数据同步系统,包括:如上所述的用户终端;以及,如上所述的服务端。
第六方面,本发明实施例还提供了一种电子设备,包括:至少一个处理器;以及存储器;其中,所述存储器存储有可被所述至少一个处理器执行的程序,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行本发明上述任一项应用于用户终端的数据同步方法。
第七方面,本发明实施例还提供了一种非易失性计算机存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行本发明上述任一项应用于用户终端的数据同步方法。
第八方面,本发明实施例还提供了一种计算机程序,能够执行本发明上述任一项应用于用户终端的数据同步方法。
第九方面,本发明实施例还提供了一种电子设备,包括:至少一个处 理器;以及存储器;其中,所述存储器存储有可被所述至少一个处理器执行的程序,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行本发明上述任一项应用于服务端的数据同步方法。
第十方面,本发明实施例还提供了一种非易失性计算机存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行本发明上述任一项应用于服务端的数据同步方法。
第十一方面,本发明实施例还提供了一种计算机程序,能够执行本发明上述任一项应用于服务端的数据同步方法。
本发明实施方式相对于现有技术而言,通过利用同步标记来确定多个用户终端与服务端之间的数据同步情况,并进一步根据服务端的同步标记和用户终端中的同步标记更新同步数据。如此实现了用户使用不同用户终端时,各终端所记录的数据能够彼此同步。
在一个实施例中,针对数据同步的不同应用场景,对应设置更新指令的产生方式,能够有效确保各用户终端及时更新数据,实现跨终端的数据同步。
在一个实施例中,在同步数据的同时还同步同步标记,能够确保各终端与服务器的同步标记统一,从而有效减少更新数据的传输量。
附图说明
图1是本发明第一实施方式的数据同步方法的流程图;
图2是本发明的第二实施方式的一种数据同步系统的结构示意图;
图3是本发明的第二实施方式的另一种数据同步系统的结构示意图;
图4是本发明第三实施方式中电子设备的结构示意图;
图5是本发明第六实施方式中电子设备的结构示意图。
具体实施方式
为使本发明部分实施例的目的、技术方案和优点更加清楚,下面将结合附图对本发明的各实施方式进行详细的阐述。然而,本领域的普通技术人员可以理解,在本发明各实施方式中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施方式的种种变化和修改,也可以实现本申请各权利要求所要求保护的技术方案。
实施例一
如图1所示,本发明的第一实施方式涉及一种数据同步方法。所述数据同步方法适用于不同用户终端与服务端之间、不同用户终端通过服务端的数据同步。其中,所述用户终端包括但不限于:手机、电脑、平板电脑等。所述服务端包括但不限于:单台服务器、服务器集群、分布式的服务器群组等。
所述数据同步方法主要包括以下各步骤:
步骤S110、用户终端在接收到更新指令时,将保存的同步标记发送给预设的服务端。
具体地,用户终端在不同的数据同步应用场景下,可通过服务端获取到更新指令,或者基于自身事件产生更新指令。
所述用户终端接收更新指令包括以下至少一种:
1)按照预设的时间周期,定时产生更新指令。在此,当用户终端正运行数据同步时,为了及时更新用户终端中的同步数据,用户终端按照预设的时间周期定时产生更新指令,并当更新指令存到缓存中时,用户终端执行步骤S110。例如,当用户终端A1正运行一聊天应用程序,为了能够及时获取 用户利用用户终端A2中的同一聊天应用程序进行聊天的聊天信息,用户终端A1按照预设时间周期,定期的产生所述更新指令。
2)基于用户的启动操作,产生更新指令。在此,当用户点击包含数据同步的应用图标时,该应用图标所对应的应用程序得到数据同步的启动操作事件。为了及时上传/下载同步数据,用户终端在得到所述启动操作事件时,产生更新指令,并执行步骤S110。例如,当用户终端B1启动包含数据同步的聊天应用程序,则用户终端B1产生更新指令。
3)由所述服务端发送更新指令。在此,一种可选方案为,服务端可以保存包含同一账号的多个用户终端的设备信息,并当服务端接收到新的同步数据时,根据设备信息向各用户终端发出更新指令。另一种可选方案为,服务端根据获取自所述用户终端的上线信息,向所述用户终端发送更新指令。例如,当用户终端B2登陆数据同步账号时,服务端接收到基于登陆步骤产生的上线信息,则服务端根据该上线信息发送更新指令。
4)在接收基于人机交互装置所输入的数据时,产生更新指令。例如,当用户操作键盘鼠标在用户终端的输入界面上输入数据(如聊天记录、图片等)时,将所接收的数据对应到当前的同步标记上,并产生更新指令。又如,当用户操作键盘鼠标在用户终端的输入界面上输入数据(如聊天记录、图片等)时,更新所保存的同步标记,并产生更新指令。
用户终端在接收到更新指令后,将保存的同步标记发送给所述服务端。
在此,所述同步标记可以是基于数字、和/或字符构成的数据同步的版本信息。用户终端每次产生的新的数据都会对应一个同步标记。当初始时,用户终端和服务端中的同步标记可均为空。当用户终端接收新的数据时,同步标记随着增加。当接收到更新指令时,所述用户终端将最新的同步标记发送给服务端。其中,用户终端可以将每次新增数据对应设置一个新的同步标 记;也可以将每隔一时间间隔所接收的数据对应一个新的同步标记。
步骤S210、服务端将获取自用户终端的同步标记与所保存的最新同步标记进行匹配,并得到对应匹配结果的同步方式。
在此,服务端保留每个同步标记及对应的同步数据。当获取到用户终端的同步标记a1时,将同步标记a1与所保存的最新同步标记a2进行版本匹配。当同步方式是基于两同步标记一致而设定的时,不予反馈所述同步方式。当同步方式是基于两同步标记不一致而设定的时,将所述同步方式反馈给用户终端。其中,所述同步方式可以是一个标识信息;或者是为步骤S120准备的同步请求信息,其中,所述同步请求信息中包含需要同步的信息(如用于指示同步同步标记的信息,和/或用于指示同步数据的信息)。
步骤S120、用户终端基于所述同步方式同步与所述服务端之间的同步数据和同步标记。
具体地,当同步方式是基于用户终端的同步标记旧于服务端的最新同步标记而设定的时,执行步骤S121。当同步方式是基于用户终端的同步标记新于服务端的最新同步标记而设定的时,执行步骤S122。
其中步骤S121和S122中都包含了用户终端与服务端之间的至少一次交互。
步骤S121、用户终端接收服务端提供的介于两同步标记之间的数据和服务端的最新同步标记,并更新用户终端的同步标记。
在此,当服务端确定用户终端的同步标记a3旧于服务端的最新同步标记a4时,服务端向用户终端获取对应同步标记a3的同步数据D3,并将同步数据D3与数据库中同步标记为a3所对应的同步数据D3’进行比较,若相一致,则将同步标记(a3,a4]之间的同步数据发送给用户终端;若不一致,则更新服务端的同步标记a5,并将不一致的同步数据对应到更新后的同步标记a5,并予以保存,同时,将(a3,a4]之间的同步数据和最新的同步标记a5一并 反馈给用户终端。其中,同步标记a3旧于同步标记a4,同步标记a4旧于同步标记a5。
步骤S122、用户终端将介于两同步标记之间的数据发送给所述服务端。
在此,用户终端将当前最新的同步标记a6所对应的数据发送给所述服务端。由所述服务端更新所保存的最新同步标记为a6,并将同步标记a6所对应的数据保存在数据库中。
本发明通过利用同步标记来确定多个用户终端与服务端之间的数据同步情况,并进一步根据服务端的同步标记和用户终端中的同步标记更新同步数据。如此实现了用户使用不同用户终端时,各终端所记录的数据能够彼此同步。
实施例二
如图2所示,本发明第二实施例提供一种数据同步系统。所述数据同步系统适用于不同用户终端与服务端之间、不同用户终端通过服务端的数据同步。其中,所述用户终端包括但不限于:手机、电脑、平板电脑等。所述服务端包括但不限于:单台服务器、服务器集群、分布式的服务器群组等。
所述用户终端包括:同步标记发送模块11、同步方式获取模块12和第一同步模块13。所述用户终端中的各模块可共用定时器、CPU、寄存器、内存、显示屏和通信模块(如wifi模块或蜂窝网络通信模块等),并各硬件在软件指示的时序指令下执行各模块的功能。
所述服务端包括:匹配模块21、同步方式发送模块22、第二同步模块23,并与数据库连接。所述服务端中的各模块可共用CPU、寄存器、内存、通信模块(如网卡等),并各硬件在软件指示的时序指令下执行各模块 的功能。
所述同步标记发送模块11用于在接收到更新指令时,将保存的同步标记发送给预设的服务端。
具体地,同步标记发送模块11在不同的数据同步应用场景下,可通过服务端获取到更新指令,或者基于自身事件产生更新指令。
所述同步标记发送模块11接收更新指令包括以下至少一种:
1)按照预设的时间周期,定时产生更新指令。在此,当同步标记发送模块11正运行数据同步时,为了及时更新用户终端中的同步数据,同步标记发送模块11按照预设的时间周期定时产生更新指令,并当更新指令存到缓存中时,发送同步标记。例如,当用户终端A1正运行一聊天应用程序,为了能够及时获取用户利用用户终端A2中的同一聊天应用程序进行聊天的聊天信息,用户终端A1按照预设时间周期,定期的产生所述更新指令。
2)所述同步标记发送模块11基于用户的启动操作,产生更新指令。在此,当用户点击包含数据同步的应用图标时,该应用图标所对应的应用程序得到数据同步的启动操作事件。为了及时上传/下载同步数据,用户终端在得到所述启动操作事件时,产生更新指令,并发送同步标记。例如,当用户终端B1启动包含数据同步的聊天应用程序,则用户终端B1产生更新指令。
3)接收所述服务端发送更新指令。在此,一种可选方案为,服务端可以保存包含同一账号的多个用户终端的设备信息,并当服务端接收到新的同步数据时,根据设备信息向各同步标记发送模块11发出更新指令。另一种可选方案为,服务端根据获取自所述用户终端的上线信息,向所述同步标记发送模块11发送更新指令。例如,当用户终端B2登陆数据同步账号时,服务端接收到基于登陆步骤产生的上线信息,则服务端根据该上线信息发送更新指令。
4)在接收基于人机交互装置所输入的数据时,产生更新指令。例如, 当用户操作键盘鼠标在用户终端的输入界面上输入数据(如聊天记录、图片等)时,同步标记发送模块11将所接收的数据对应到当前的同步标记上,并产生更新指令。又如,当用户操作键盘鼠标在用户终端的输入界面上输入数据(如聊天记录、图片等)时,同步标记发送模块11更新所保存的同步标记,并产生更新指令。
同步标记发送模块11在接收到更新指令后,将保存的同步标记发送给所述服务端。
在此,所述同步标记可以是基于数字、和/或字符构成的数据同步的版本信息。用户终端每次产生的新的数据都会对应一个同步标记。当初始时,用户终端和服务端中的同步标记可均为空。当同步标记发送模块11接收新的数据时,同步标记随着增加。当接收到更新指令时,所述同步标记发送模块11将最新的同步标记发送给服务端。其中,同步标记发送模块11可以将每次新增数据对应设置一个新的同步标记;也可以将每隔一时间间隔所接收的数据对应一个新的同步标记。
接着,服务端的匹配模块21将获取自用户终端的同步标记与所保存的最新同步标记进行匹配,并得到对应匹配结果的同步方式。
在此,匹配模块21保留每个同步标记及对应的同步数据。当获取到用户终端的同步标记a1时,将同步标记a1与所保存的最新同步标记a2进行版本匹配。当同步方式是基于两同步标记一致而设定的时,不予反馈所述同步方式。当同步方式是基于两同步标记不一致而设定的时,通过同步方式发送模块22将所述同步方式反馈给用户终端。其中,所述同步方式可以是一个标识信息;或者是为同步方式获取模块12准备的同步请求信息,其中,所述同步请求信息中包含需要同步的信息(如用于指示同步同步标记的信息,和/或用于指示同步数据的信息)。
同步方式获取模块12基于所述同步方式同步与所述服务端之间的同步 数据和同步标记。
具体地,当同步方式是基于用户终端的同步标记旧于服务端的最新同步标记而设定的时,所述同步方式获取模块12指示第一同步模块13执行步骤S121。当同步方式是基于用户终端的同步标记新于服务端的最新同步标记而设定的时,所述同步方式获取模块12指示第一同步模块13执行步骤S122。
其中步骤S121和S122中都包含了用户终端与服务端之间的至少一次交互。即第一同步模块13和第二同步模块23的交互。
步骤S121、第一同步模块13接收第二同步模块23提供的介于两同步标记之间的数据和服务端的最新同步标记,并更新用户终端的同步标记。
在此,当第二同步模块23确定用户终端的同步标记a3旧于服务端的最新同步标记a4时,第二同步模块23向第一同步模块13获取对应同步标记a3的同步数据D3,并将同步数据D3与数据库中同步标记为a3所对应的同步数据D3’进行比较,若相一致,则第二同步模块23将同步标记(a3,a4]之间的同步数据发送给第一同步模块13;若不一致,则第二同步模块23更新服务端的同步标记a5,并将不一致的同步数据对应到更新后的同步标记a5,并予以保存,同时,将(a3,a4]之间的同步数据和最新的同步标记a5一并反馈给第一同步模块13。其中,同步标记a3旧于同步标记a4,同步标记a4旧于同步标记a5。
步骤S122、第一同步模块13将介于两同步标记之间的数据发送给所述第二同步模块23。
在此,第一同步模块13将当前最新的同步标记a6所对应的数据发送给所述第二同步模块23。由所述第二同步模块23更新所保存的最新同步标记为a6,并将同步标记a6所对应的数据保存在数据库中。
如图3所示,本发明数据同步系统利用用户终端和服务端的各硬件,按 照程序所指示当时序执行过程举例如下:
用户终端中的定时器定时指示CPU产生更新指令并从缓存中提取同步标记,并通过通信模块将同步标记发送给服务端,服务端的通信模块对应接收同步标记,并利用CPU将所接收的同步标记和数据库中保存的最新同步标记进行匹配,若所接收的同步标记的版本低于最新同步标记,则从数据库中将两同步标记之间的数据通过配对的通信模块发送至用户终端的CPU。用户终端的CPU将更新的数据通过终端显示屏展示给用户。
本发明第三实施方式涉及对应于用户终端的数据同步方法的电子设备,硬件结构示意图如图4所示,该设备包括:
一个或多个处理器410以及存储器420,图4中以一个处理器410为例。
用于数据同步方法的电子设备还可以包括:输入装置430和输出装置440。
处理器410、存储器420、输入装置430和输出装置440可以通过总线或者其他方式连接,图4中以通过总线连接为例。
存储器420作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本发明实施例中的数据同步方法对应的程序指令/模块(例如,附图2所示的同步标记发送模块11、同步方式获取模块12和第一同步模块13)。处理器410通过运行存储在存储器420中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述应用于用户终端的方法实施例的数据同步方法。
存储器420可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储用于数据同步方法所创建的数据等。此外,存储器420可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、 或其他非易失性固态存储器件。在一些实施例中,存储器420可选包括相对于处理器410远程设置的存储器,这些远程存储器可以通过网络连接至用于数据同步方法的处理装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
输入装置430可接收输入的数字或字符信息,以及产生与数据同步方法的处理装置的用户设置以及功能控制有关的键信号输入。输出装置440可包括显示屏等显示设备。
所述一个或者多个模块存储在所述存储器420中,当被所述一个或者多个处理器410执行时,执行上述任意应用于用户终端的方法实施例中的数据同步方法。
上述产品可执行本发明实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本发明实施例所提供的方法。
本发明实施例的电子设备以多种形式存在,包括但不限于:
(1)移动通信设备:这类设备的特点是具备移动通信功能,并且以提供话音、数据通信为主要目标。这类终端包括:智能手机(例如iPhone)、多媒体手机、功能性手机,以及低端手机等。
(2)超移动个人计算机设备:这类设备属于个人计算机的范畴,有计算和处理功能,一般也具备移动上网特性。这类终端包括:PDA、MID和UMPC设备等,例如iPad。
(3)便携式娱乐设备:这类设备可以显示和播放多媒体内容。该类设备包括:音频、视频播放器(例如iPod),掌上游戏机,电子书,以及智能玩具和便携式车载导航设备。
(4)服务器:提供计算服务的设备,服务器的构成包括处理器、硬盘、内 存、系统总线等,服务器和通用的计算机架构类似,但是由于需要提供高可靠的服务,因此在处理能力、稳定性、可靠性、安全性、可扩展性、可管理性等方面要求较高。
(5)其他具有数据交互功能的电子装置。
与现有技术相比,本实施方式实现了用户使用不同用户终端时,各终端所记录的数据能够彼此同步。
本发明第四实施方式涉及一种非易失性计算机存储介质,所述计算机存储介质存储有计算机可执行指令,该计算机可执行指令可执行上述任意应用于用户终端的方法实施例中的数据同步方法。
与现有技术相比,本实施方式实现了用户使用不同用户终端时,各终端所记录的数据能够彼此同步。
本发明第五实施方式涉及一种计算机程序,能够执行上述任意应用于用户终端的方法实施例中的数据同步方法。
与现有技术相比,本实施方式实现了用户使用不同用户终端时,各终端所记录的数据能够彼此同步。
本发明第六实施方式涉及一种涉及对应于服务端的数据同步方法的电子设备,硬件结构示意图如图5所示,该设备包括:
一个或多个处理器510以及存储器520,图5中以一个处理器510为例。
用于数据同步方法的电子设备还可以包括:输入装置530和输出装置550。
处理器510、存储器520、输入装置530和输出装置550可以通过总线或者其他方式连接,图5中以通过总线连接为例。
存储器520作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本发明实施例中的数 据同步方法对应的程序指令/模块(例如,附图2所示的匹配模块21、同步方式发送模块22和第二同步模块23)。处理器510通过运行存储在存储器520中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述应用于服务端的方法实施例的数据同步方法。
存储器520可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储用于数据同步方法所创建的数据等。此外,存储器520可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器520可选包括相对于处理器510远程设置的存储器,这些远程存储器可以通过网络连接至用于数据同步方法的处理装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
输入装置530可接收输入的数字或字符信息,以及产生与数据同步方法的处理装置的用户设置以及功能控制有关的键信号输入。输出装置550可包括显示屏等显示设备。
所述一个或者多个模块存储在所述存储器520中,当被所述一个或者多个处理器510执行时,执行上述任意应用于服务端的方法实施例中的数据同步方法。
上述产品可执行本发明实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本发明实施例所提供的方法。
与现有技术相比,本实施方式解决了现有技术中的多用户终端之间无法进行数据同步的问题。
本发明第七实施方式涉及一种非易失性计算机存储介质,所述计算机存储介质存储有计算机可执行指令,该计算机可执行指令可执行上述任意应用 于服务端的方法实施例中的数据同步方法。
与现有技术相比,本实施方式解决了现有技术中的多用户终端之间无法进行数据同步的问题。
本发明第八实施方式涉及一种计算机程序,能够执行上述任意应用于服务端的方法实施例中的数据同步方法。
与现有技术相比,本实施方式解决了现有技术中的多用户终端之间无法进行数据同步的问题。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (19)

  1. 一种数据同步方法,应用于用户终端,包含:
    在接收到更新指令时,将保存的同步标记发送给预设的服务端;
    获取所述服务端基于匹配所述同步标记所得到的同步方式;
    基于所述同步方式同步与所述服务端之间的同步数据和同步标记。
  2. 根据权利要求1所述的数据同步方法,其中,还包括:
    在接收基于人机交互装置所输入的数据时,产生更新指令。
  3. 根据权利要求2所述的数据同步方法,其中,所述在接收基于人机交互装置所输入的数据时,产生更新指令,包括:当接收基于人机交互装置所输入的数据时,更新所保存的同步标记,并产生更新指令;
    对应的,在接收到所述更新指令时,将更新后的同步标记发送给预设的服务端。
  4. 根据权利要求1,2或3所述的数据同步方法,其中,还包括以下至少一种:
    按照预设的时间周期,定时产生更新指令;
    基于用户的启动操作,产生更新指令;
    以及,接收来自所述服务端发送的更新指令。
  5. 根据权利要求1至4任一项所述的数据同步方法,其中,所述基于同步方式同步与所述服务端之间的同步数据和同步标记包括:
    若同步方式是基于用户终端的同步标记旧于服务端的最新同步标记而设定的,则接收服务端提供的介于两同步标记之间的数据和服务端的最新同步标记,并更新用户终端的同步标记;
    若同步方式是基于用户终端的同步标记新于服务端的最新同步标记而设定的,则将介于两同步标记之间的数据发送给所述服务端。
  6. 一种数据同步方法,应用于服务端,包含:
    将获取自用户终端的同步标记与所保存的最新同步标记进行匹配,并得到对应匹配结果的同步方式;
    将所述同步方式反馈给所述用户终端;
    基于所述同步方式与所述用户终端进行数据和同步标记的同步。
  7. 根据权利要求6所述的数据同步方法,其中,还包含:
    当所述同步方式是基于两同步标记一致而设定的时,不予反馈所述同步方式;
    当所述同步方式是基于两同步标记不一致而设定的时,将所述同步方式反馈给所述用户终端。
  8. 根据权利要求6或7所述的数据同步方法,其中,还包括:根据获取自所述用户终端的上线信息,向所述用户终端发送更新指令,并获取所述用户终端基于所述更新指令提供的同步标记。
  9. 根据权利要求6,7或8所述的数据同步方法,其中,所述基于同步方式与用户终端进行数据和同步标记的同步包括:
    若同步方式是基于获取自用户终端的同步标记旧于所保存的最新同步标记而设定的,则将介于两同步标记之间的数据和所保存的同步标记反馈给所述用户终端;
    若同步方式是基于获取自用户终端的同步标记新于所保存的最新同步标记而设定的,则更新所保存的最新同步标记,并从所述用户终端获取对应更新后的最新同步标记的数据。
  10. 一种用于数据同步的用户终端,其特征在于,包含:
    同步标记发送模块,用于在接收到更新指令时,将保存的同步标记发送给预设的服务端;
    同步方式获取模块,用于获取所述服务端基于匹配所述同步标记所得到的同步方式;
    第一同步模块,用于基于所述同步方式同步与所述服务端之间的同步数据和同步标记。
  11. 根据权利要求10所述的用于数据同步的用户终端,其特征在于,所述同步标记发送模块还用于在接收基于人机交互装置所输入的数据时,产生更新指令。
  12. 一种用于数据同步的服务端,其特征在于,包含:
    匹配模块,用于将获取自用户终端的同步标记与所保存的最新同步标记进行匹配,并得到同步方式;
    同步方式发送模块,用于将所述同步方式反馈给所述用户终端;
    第二同步模块,用于基于所述同步方式与所述用户终端进行数据和同步标记的同步。
  13. 一种数据同步系统,其特征在于,包括:
    如权利要求10或11所述的用户终端;
  14. 一种电子设备,包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:
    在接收到更新指令时,将保存的同步标记发送给预设的服务端;
    获取所述服务端基于匹配所述同步标记所得到的同步方式;
    基于所述同步方式同步与所述服务端之间的同步数据和同步标记。
  15. 一种非易失性计算机存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为:
    在接收到更新指令时,将保存的同步标记发送给预设的服务端;
    获取所述服务端基于匹配所述同步标记所得到的同步方式;
    基于所述同步方式同步与所述服务端之间的同步数据和同步标记。
  16. 一种计算机程序,能够:
    在接收到更新指令时,将保存的同步标记发送给预设的服务端;
    获取所述服务端基于匹配所述同步标记所得到的同步方式;
    基于所述同步方式同步与所述服务端之间的同步数据和同步标记。
  17. 一种电子设备,包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:
    将获取自用户终端的同步标记与所保存的最新同步标记进行匹配,并得到对应匹配结果的同步方式;
    将所述同步方式反馈给所述用户终端;
    基于所述同步方式与所述用户终端进行数据和同步标记的同步。
  18. 一种非易失性计算机存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为:
    将获取自用户终端的同步标记与所保存的最新同步标记进行匹配,并得到对应匹配结果的同步方式;
    将所述同步方式反馈给所述用户终端;
    基于所述同步方式与所述用户终端进行数据和同步标记的同步。
  19. 一种计算机程序,能够:
    将获取自用户终端的同步标记与所保存的最新同步标记进行匹配,并得到对应匹配结果的同步方式;
    将所述同步方式反馈给所述用户终端;
    基于所述同步方式与所述用户终端进行数据和同步标记的同步。
PCT/CN2016/105546 2016-06-26 2016-11-12 数据同步方法、系统及用于数据同步的用户终端和服务端 WO2018000692A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610475992.2 2016-06-26
CN201610475992.2A CN106131137A (zh) 2016-06-26 2016-06-26 数据同步方法、系统及用于数据同步的用户终端和服务端

Publications (1)

Publication Number Publication Date
WO2018000692A1 true WO2018000692A1 (zh) 2018-01-04

Family

ID=57267142

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/105546 WO2018000692A1 (zh) 2016-06-26 2016-11-12 数据同步方法、系统及用于数据同步的用户终端和服务端

Country Status (2)

Country Link
CN (1) CN106131137A (zh)
WO (1) WO2018000692A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114172915A (zh) * 2021-11-05 2022-03-11 中汽创智科技有限公司 一种消息同步方法、自动驾驶系统、存储介质及电子设备
CN114172957A (zh) * 2021-12-02 2022-03-11 Oppo广东移动通信有限公司 订阅系统、方法、电子设备、服务器、存储介质及产品

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018095175A1 (zh) * 2016-11-25 2018-05-31 腾讯科技(深圳)有限公司 通信消息同步方法、数据备份方法、设备及存储介质
CN106506674B (zh) * 2016-11-25 2019-07-09 腾讯科技(深圳)有限公司 通信消息同步方法及装置
CN115865528B (zh) * 2023-02-20 2023-05-12 深圳市英唐数码科技有限公司 基于多设备的用户资料操作方法、系统和可读存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103634445A (zh) * 2013-11-19 2014-03-12 广州云宏信息科技有限公司 来电显示方法及装置
CN104618498A (zh) * 2015-02-13 2015-05-13 深圳市创梦天地科技有限公司 一种数据资源同步的方法及服务器
CN105302895A (zh) * 2015-10-21 2016-02-03 浪潮通用软件有限公司 一种数据缓存同步方法、服务器和客户端

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5065482B2 (ja) * 2007-06-19 2012-10-31 クゥアルコム・インコーポレイテッド 無線環境においてデータセットを同期するための方法および機器
CN103841167A (zh) * 2012-11-27 2014-06-04 中国移动通信集团公司 一种用户数据同步方法及设备

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103634445A (zh) * 2013-11-19 2014-03-12 广州云宏信息科技有限公司 来电显示方法及装置
CN104618498A (zh) * 2015-02-13 2015-05-13 深圳市创梦天地科技有限公司 一种数据资源同步的方法及服务器
CN105302895A (zh) * 2015-10-21 2016-02-03 浪潮通用软件有限公司 一种数据缓存同步方法、服务器和客户端

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114172915A (zh) * 2021-11-05 2022-03-11 中汽创智科技有限公司 一种消息同步方法、自动驾驶系统、存储介质及电子设备
CN114172915B (zh) * 2021-11-05 2023-10-31 中汽创智科技有限公司 一种消息同步方法、自动驾驶系统、存储介质及电子设备
CN114172957A (zh) * 2021-12-02 2022-03-11 Oppo广东移动通信有限公司 订阅系统、方法、电子设备、服务器、存储介质及产品
CN114172957B (zh) * 2021-12-02 2024-05-14 Oppo广东移动通信有限公司 订阅系统、方法、电子设备、服务器、存储介质及产品

Also Published As

Publication number Publication date
CN106131137A (zh) 2016-11-16

Similar Documents

Publication Publication Date Title
WO2018000692A1 (zh) 数据同步方法、系统及用于数据同步的用户终端和服务端
CN107124278B (zh) 业务处理方法、装置以及数据共享系统
US10484347B2 (en) Method and apparatus for supporting secure chat
CN110765744B (zh) 多人协同文档编辑方法及系统
WO2019222934A1 (zh) 文件处理方法、装置和系统
CN110727525B (zh) 用于活动协作的配套应用程序
US9117191B2 (en) Automatic device inventory management for different types of devices
EP3886452B1 (en) Method for sharing media content, terminal device, and content sharing system
EP2866420A1 (en) Method and device for content synchronization
WO2017107542A1 (zh) 视频节目获取方法、设备及系统
US10673931B2 (en) Synchronizing method, terminal, and server
WO2015101320A1 (zh) 一种账号的生成方法、终端及后台服务器
US20170134364A1 (en) Note update method and device
US20130184083A1 (en) Method for interactive logic fault tolerance in online game, and system and client for fault tolerance in online game
US10666588B2 (en) Method for sharing media content, terminal device, and content sharing system
WO2019037566A1 (zh) 信息显示方法、装置、设备及计算机可读存储介质
US20170171339A1 (en) Advertisement data transmission method, electrnoic device and system
WO2017148157A1 (zh) Android设备的应用程序本地化安装方法和装置
CN104536782A (zh) 引导内容展示方法、文件生成方法及装置
JP2013230226A (ja) ゲーム管理サーバ装置、ゲーム管理サーバ装置用プログラム、および、端末装置用プログラム
CN109213955B (zh) 数据处理方法及相关设备
TW201423420A (zh) 資料同步系統以及資料同步方法
TW201615252A (zh) 電子設備的控制系統與方法
WO2017181602A1 (zh) 点播方法、装置、电子设备及系统
CN108650217B (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: 16907088

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: 16907088

Country of ref document: EP

Kind code of ref document: A1