WO2010127591A1 - 基于同步标准协议的信息同步实现方法和系统 - Google Patents

基于同步标准协议的信息同步实现方法和系统 Download PDF

Info

Publication number
WO2010127591A1
WO2010127591A1 PCT/CN2010/072075 CN2010072075W WO2010127591A1 WO 2010127591 A1 WO2010127591 A1 WO 2010127591A1 CN 2010072075 W CN2010072075 W CN 2010072075W WO 2010127591 A1 WO2010127591 A1 WO 2010127591A1
Authority
WO
WIPO (PCT)
Prior art keywords
client
server
synchronization
data
synchronized
Prior art date
Application number
PCT/CN2010/072075
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 WO2010127591A1 publication Critical patent/WO2010127591A1/zh

Links

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 communications, and in particular, to a method and system for implementing information synchronization based on a synchronization standard protocol.
  • OMA Open Mobile Alliance Data Synchronization
  • SyncML OMA Information Synchronization Markup Language
  • DS can also be used for peer-to-peer data synchronization, such as between two PCs.
  • SyncML protocol can realize mobile terminal and network server. Data synchronization. Assuming that the mobile phone card (SIM or USIM card, etc.) in the mobile phone registers a SyncML account on a certain network server, when the data information of the mobile phone changes, the user can directly use the SyncML application in the mobile phone to synchronize data, so that the mobile phone The terminal data is consistent with the server data.
  • SIM SIM or USIM card, etc.
  • Step S101 The client sends an initialization packet for initiating synchronization to the server, where the initialization packet carries a synchronized database, an initiated synchronization type, authentication information, and service capabilities.
  • Step S102 After receiving the initialization packet from the client, the server sends a response message of the initialization packet to the client. In addition, in order to complete the initialization, the server will send the message to the client.
  • Step S103 The client sends the update data updated by the user on the client side to the server, that is, the synchronization package that the client needs to perform data synchronization is encapsulated.
  • Step S104 The server receives the update data from the client, and updates the server locally, and obtains a synchronization update result, and sends the synchronization update result to the client, where the synchronization update result includes one of the following: the server is localized The update success result after the update data is updated, and the update failure result after the server updates the update data locally. Moreover, if the user updates the user data on the server side, the server sends the update data updated by the user on the server side and the local unique identifier (the localized unique identifier) (LUID) of the update data to the client.
  • the server sends the update data updated by the user on the server side and the local unique identifier (the localized unique identifier) (LUID) of the update data to the client.
  • the server performs a map operation on the local: the mapping information of the LUID and the Global Unique Identifier (GUID) is set, wherein the LUID is used to indicate the identifier corresponding to the update data on the client side, and the GUID is used.
  • the identifier corresponding to the update data is indicated on the server side.
  • the above synchronous update result and update data and the local unique identifier of the update data are sent to the client through the synchronization packet.
  • the client receives the update data from the server, and performs local update on the client, and obtains a synchronous update result, and sends the synchronization update result to the server (that is, the response message sent by the client to the server, for the client to respond to the map information.
  • the synchronization update result includes one of the following: the update success result after the client updates the update data locally, and the update failure result after the client updates the update data locally.
  • the Send Data Update Status Packet informs the server of the results of the data update.
  • Step S106 the server sends a response message, that is, a map information confirmation packet, to the client in response to the update data and the synchronization update result in step S105.
  • the present invention has been made in view of the problem of redundancy of data synchronization processes existing in the related art. Accordingly, it is a primary object of the present invention to provide a method and system for implementing information synchronization based on a synchronization standard protocol to solve the above problems.
  • a method for synchronizing information between a server and a client based on a synchronization standard protocol including: the server locally updating the information of the client in response to the first synchronization data packet from the client If the server determines that there is no data that needs to be synchronized to the client, the server sends a status response message to the client; in response to the status response message, the client stops communicating with the server based on the synchronization standard protocol.
  • an information synchronization implementation system based on a synchronization standard protocol
  • the server includes: an update module, configured to be local to the server in response to the first synchronization data packet from the client Updating the information of the client; determining a module, configured to determine, after the update module updates, whether there is data in the server that needs to be synchronized to the client; and a sending module, configured to: when the determining module determines that there is no data in the server that needs to be synchronized to the client, Send ⁇ to the client!
  • the dog state response message includes: a communication control module, configured to control the client to stop communicating with the server based on the synchronization standard protocol in response to the status response message.
  • the client can notify the client that no update is needed by sending a corresponding message in the data synchronization process, so that the client can save unnecessary interaction with the server afterwards, and can ensure the server and the client.
  • the information synchronization between the server and the client is effectively reduced while the information is normally synchronized between the terminals, thereby effectively saving system overhead.
  • the drawings are intended to provide a further understanding of the invention, and are intended to be a part of the description of the invention. In the drawings: FIG.
  • FIG. 1 is a flowchart of a protocol when a server has actual synchronization data according to the related art
  • FIG. 2 is a flowchart of a method for implementing information synchronization based on a synchronization standard protocol according to an embodiment of the present invention
  • FIG. 4 is a flowchart of client processing according to an embodiment of the present invention
  • 5 is a flow chart of server-side processing according to an embodiment of the present invention.
  • FIG. 6 is a structural block diagram of an information synchronization implementing system based on a synchronization standard protocol according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of a method for implementing information synchronization based on a synchronization standard protocol according to an embodiment of the present invention.
  • the method implements synchronization of information between a server and a client based on a synchronization standard protocol. As shown in FIG. 2, the method includes the following steps.
  • Step S202 The server updates the information of the client locally on the server in response to the first synchronization data packet from the client.
  • the first synchronization data packet includes: data requested by the client to be updated (that is, the user updates on the client side) Update the data) and the corresponding LUID (locally unique identifier).
  • Step S204 if the server determines that there is no data that needs to be synchronized to the client, the server sends ⁇ to the client! The dog state response message; wherein the status response message includes only the result of the server updating the information of the client locally, and the update result includes one of the following: a successful update result after the server updates the update data locally The update failure result of the update of the update data by the server.
  • Step S206 in response to the status response message, the client stops performing communication based on the synchronization standard protocol with the server.
  • the server receives in step S202. After the third packet, if the server does not have actual synchronization data to send to the client in the fourth packet, the server sends a response message to the client in response to the third packet (the response message only carries After the synchronization update result), the synchronization protocol flow on the server side ends, otherwise step S105 to step S106 are continued.
  • the client receives the fourth packet
  • the client finds that there is no data to be updated synchronously in the fourth packet, and only includes the synchronization update result
  • the synchronization update process on the client side ends, otherwise, the client The end will build a fifth package (containing map information and client data update status information) and send the fifth package to the server. That is, the sending and receiving of the first four packets (the first packet to the fourth packet) are performed according to the synchronization protocol flow shown in FIG. 1, and the subsequent two dynamically determine whether to send the last two according to whether the server has actual synchronization data.
  • Packets (fifth packet and sixth packet), if the server needs to send synchronization data, it will be processed according to the synchronization protocol flow shown in Figure 1, otherwise the last two packets will not be sent.
  • the server determines that there is data that needs to be synchronized to the client in step S206, the information of the client needs to be further updated, wherein the update operation includes: adding new data, deleting existing data, and tampering with the existing data.
  • the update operation is to delete the existing data or modify the existing data, the server will locally find the GUID (Globally Unique Identifier) of the data requested by the server for deletion or modification, and then according to the pre-saved correspondence.
  • GUID Globally Unique Identifier
  • the relationship determines a LUID corresponding to the GUID, and sends a second synchronization data packet and a status response message to the client, where the second synchronization data packet includes: data that the server requests to update (ie, data that needs to be synchronized to the client) and determining After the client receives the second synchronization packet, the client performs a delete or modify operation on the corresponding data; on the other hand, if the update operation is to add new data, the server configures a new data for the new data requested to be added.
  • the second synchronization data packet includes: the server requests the added new data and the GUID corresponding to the new data, and the client receives the second synchronization After the packet, save the new data to the local, and configure a new LUID for the new data, and, The client will establish a correspondence between the new data corresponding to the LUID and GUID, and transmits the new relationship to months service, a new server of the correspondence relationship stored in the map information. In this way, the client can locally update the data to synchronize with the data in the server according to the synchronization packet from the server side (ie, the second synchronization packet described above).
  • the client determines that there is no need to synchronize data to the client, only the synchronization update result is sent to the client, and after receiving the synchronization update result, the client ends the synchronization process, that is, according to whether the server exists.
  • Synchronization data The synchronization packet is dynamically constructed, so that the number of interactions between the client and the server in the synchronization standard protocol is reduced to four times in the case where the server determines that there is no data to be synchronized to the client, thereby realizing the dynamic of the synchronization process.
  • the message interaction between the server and the client is effectively reduced, thereby effectively saving system overhead.
  • FIG. 3 shows a protocol flow chart when the server has no actual synchronization data according to the present invention. As shown in FIG.
  • Step S301 Client The initialization packet is sent to the server, and the initialization packet carries information such as a synchronized database, an initiated synchronization type, authentication information, and service capabilities.
  • Step S302 after receiving the initialization packet from the client, the server sends a response message of the initialization packet to the client.
  • the server sends the server's authentication information, such as synchronization stamp, device information, and the like to the client, and the server must accept the synchronization type sent by the client.
  • the two-way authentication process between the client and the server ends, and the initialization phase is completed.
  • Step S303 the client sends the update data (via the synchronization package) updated by the user on the client side to the server.
  • Step S304 the server receives the update data from the client, and performs local update on the server to obtain a synchronous update result, and if the user does not update the user data on the server side, the server only sends the synchronization update result to the client.
  • the synchronization update result includes one of the following: an update success result after the monthly server updates the update data, and an update failure result after the server updates the update data locally. That is, if there is no data that needs to be synchronized on the server side in step S304, the fourth packet sent by the server to the client includes only the status information of the server side data processing.
  • FIG. 4 is a flowchart of processing of the synchronization protocol on the client side according to the present invention, and FIG. 4 is different from the method shown in FIG. The point is: the client can dynamically negotiate the judgment of the protocol packet information. The delivery of the parcel.
  • Step S401 The client constructs a synchronization initialization packet that is sent to the server, and the initialization packet carries information such as a synchronized database, an initiated synchronization type, authentication information, and service capabilities.
  • Step S402 the client receives an initialization packet from the server, where the initialization packet carries parameters such as authentication information, synchronization stamp, device information, and the like of the server.
  • Step S403 the client constructs the synchronization data packet, and sends the synchronization data packet to the server, where the synchronization data packet includes the update data updated by the user on the client side.
  • Step S404 the client receives and analyzes the synchronization data packet from the server side.
  • Step S405 The client determines whether there is no actual synchronization data in the synchronization data packet from the server, and only includes the synchronization update result of the server. If the determination result is yes, the synchronization protocol process on the client side ends, otherwise the process proceeds to step S406.
  • Step S406 the client constructs a state and a map packet, and sends the packet to the server, and executes step S407.
  • Step S407 the client receives and processes the map information confirmation packet from the server.
  • 5 is a flow chart of the synchronization protocol processing on the server side according to the present invention. The difference between FIG. 5 and the method shown in FIG. 1 is that the server can dynamically transmit the protocol packet by judging the protocol packet information.
  • Step S501 The server receives and processes an initialization packet from the client, where the initialization packet carries information such as a synchronized database, an initiated synchronization type, authentication information, and service capabilities.
  • Step S502 in order to complete initialization, the server sends the server authentication information, synchronization stamp, device information and other parameters to the client, and the server must accept the synchronization type sent by the client, and send the initialization in step S501 to the client.
  • the response message for the package the server receives and processes the synchronization data packet from the client, and the synchronization data packet includes the update data updated by the user on the client side.
  • Step S504 the server constructs an isochronous data packet that it sends to the client.
  • Step S505 the server determines whether there is synchronization data that needs to be updated on the server side, such as If the result of the determination is YES, the process proceeds to step S506. Otherwise, the server transmits a synchronization update result in response to the synchronization packet from the client to the client, and thus, the synchronization protocol flow on the server side ends.
  • Step S506 the server receives and processes the status and map information packets from the client.
  • Step S507 the server constructs a map information confirmation packet, and sends the map information confirmation packet to the client.
  • the synchronization package can be dynamically constructed according to the analysis of whether the server has the synchronization data, and the synchronization process is dynamically optimized, so that the client can save unnecessary interaction with the server, and the server is guaranteed.
  • the information synchronization between the server and the client is effectively reduced while the information is successfully synchronized between the clients, thereby effectively saving system overhead; and the above processing can dynamically construct the package, when the user needs to synchronize the update of the client, And when there is no data update on the server, the redundant interaction process can be significantly reduced.
  • FIG. 6 shows the structure of an information synchronization implementation system based on a synchronization standard protocol according to an embodiment of the present invention. As shown in FIG. 6, the information synchronization implementation system according to the present embodiment includes a server 1 and a client.
  • the server 1 may include: an update module 11, a determination module 12, a sending module 13, a query module 14, and a configuration module 15, and the client 2 may include a communication control module 21.
  • the function of each module shown in Fig. 6 will be described in detail below.
  • the update module 11 is configured to update the information of the client locally in the server in response to the first synchronization data packet from the client; the determining module 12 is connected to the update module 11 for determining whether the server needs to be synchronized after the update module 11 performs the update.
  • a sending module 13 coupled to the determining module 12, configured to send a status response message to the client if the determining module 12 determines that there is no data in the server that needs to be synchronized to the client; and determine the server at the determining module 12
  • the second synchronization data packet and the status response message are sent to the client 2 in the case that there is a need to synchronize the data to the client 2;
  • the query module 14 is connected to the sending module 13 and the determining module 12 for determining the module 12
  • the GUID of the data is searched, and the LUID corresponding to the GUID is determined according to the pre-saved correspondence relationship to construct the second synchronization data packet;
  • the configuration module 15 Configuring a new GUID for requesting updated data for the server (ie, the data required to be synchronized to the client); the communication control module 21, configured to control the client to stop performing with the server based on the status response message from the sending
  • the first synchronization data packet may include: data requested by the client for updating and a corresponding LUID.
  • the status response message sent by the sending module 13 may include a result that the server updates the information of the client locally;
  • the second synchronization data packet sent by the sending module 13 may include at least one of the following: Updated data along with the determined LUID, the server requesting updated data, and the new GUID.
  • the synchronization system of the client information provided by the embodiment of the present invention can dynamically construct the synchronization packet according to the analysis of whether the server has the synchronization data, and dynamically optimize the synchronization process, and ensure the server and the client between the server and the client.
  • the information synchronization between the server and the client is effectively reduced while the information synchronization is completed normally, thereby effectively saving system overhead.
  • the client can notify the client that no update is needed by sending a corresponding message by the server during the data synchronization process, so that the client can save the subsequent operation with the server.
  • the necessary interaction can effectively reduce the message interaction between the server and the client while ensuring the normal synchronization of information between the server and the client, thereby effectively saving system overhead.

Landscapes

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

Description

基于同步标准协议的信息同步实现方法和系统 技术领域 本发明涉及通信领域,尤其涉及一种基于同步标准协议的信息同步实现 方法和系统。 背景技术 目 前, 开放移动联盟设备管理 ( Open Mobile Alliance Data Synchronization, 筒称为 OMA DS ) 业务是基于 OMA 信息同步标准协议 ( Synchronization Mark up Language, 筒称为 SyncML ) DS 目关标准的移动 数据增值业务, 它应用于移动设备和网络服务之间的数据同步。 除此之外, DS还可用于对等的数据同步, 如两台 PC之间。 经过同步初始化阶段的参数 协商以后, 终端和服务器互相发送各自改变的数据, 以保证双方数据的同步。 随着通信技术的快速发展,对移动终端中的相关信息的管理显得尤为重 要, 例如, 个人信息、 日程信息、 邮件信息等, 已经成为手机信息管理的一 个重要组成部分。 如何安全有效地将数据备份到网络 ^^务器中, 在更换手机 或者手机数据发生变化的时候, 可以方便地将备份数据恢复到手机成为数据 同步的主题 , SyncML协议可以实现手机终端和网络服务器的数据同步。 假设手机中的手机卡( SIM或者 USIM卡等)在某个网络服务器上注册 了一个 SyncML帐号, 则当手机的数据信息发生变化时, 用户可以直接利用 手机中的 SyncML应用进行数据同步 , 使得手机终端数据与服务器数据保持 一致。 下面结合图 1对现有技术中涉及的同步数据时的协议过程进行描述,该 流程为 SyncML协议的一种通用协议流程,已普遍应用于常规的同步过程中 , 如图 1所示, 包括以下处理步骤: 步骤 S101 , 客户端向月 务器发送用于发起同步的初始化包, 该初始化 包中携带有同步的数据库、 发起的同步类型、 鉴权信息、 业务能力等信息。 步骤 S102, 服务器接收到来自客户端的初始化包后, 会向客户端发送 该初始化包的响应消息。 另夕卜, 为了完成初始化, 服务器会向客户端发送该 服务器的鉴权信息, 同步戳、 设备信息等参数, 并且, 服务器必须接受客户 端发送的同步类型。 至此, 客户端与月 务器的双向鉴权过程结束, 完成了初始化阶段。 步骤 S103 , 客户端向服务器发送用户在客户端侧更新的更新数据, 即 封装了客户端需要进行数据同步的同步包。 步骤 S104, 服务器接收来自客户端的更新数据, 并在服务器本地进行 更新, 得到同步更新结果, 将该同步更新结果发送给客户端, 其中, 该同步 更新结果包括以下之一: 月 务器在其本地对该更新数据进行更新后的更新成 功结果、 服务器在其本地对该更新数据进行更新后的更新失败结果。 并且, 如果用户在服务器侧对用户数据进行了更新 , 则服务器将用户在服务器侧进 行更新的更新数据以及该更新数据的本地唯一标识符 ( Locally Unique Identifier, 筒称为 LUID ) 均发送给客户端, 且服务器在其本地进行 map操 作: 建立 LUID与全局唯一标识符 ( Global Unique Identifier, 筒称为 GUID ) 的映射信息,其中, LUID用于指示该更新数据在客户端侧对应的标识, GUID 用于指示该更新数据在^^务器侧对应的标识。 上述同步更新结果和更新数据 以及该更新数据的本地唯一标识符通过同步包发送给客户端。 步骤 S105 , 客户端接收来自服务器更新数据, 并在客户端本地进行更 新, 得到同步更新结果, 将该同步更新结果发送给服务器 (即客户端向服务 器发送的响应消息, 用于客户端回应 map信息给服务器), 其中, 该同步更 新结果包括以下之一: 客户端在其本地对该更新数据进行更新后的更新成功 结果、 客户端在其本地对该更新数据进行更新后的更新失败结果。 发送数据 更新状态包通知服务器数据更新的结果。 步骤 S106,月 务器向客户端发送响应于步骤 S105中的更新数据和同步 更新结果的响应消息, 即 map信息确认包。 可以看出, 在之前所描述的数据同步过程中, 不论是否有需要同步的数 据, 客户端均需要与服务器进行 6次交互 , 导致数据同步占用大量的时间 , 并且会增加网络出现故障的概率, 进而降低用户的体验。 针对相关技术中数据同步过程冗余的问题, 目前尚未提出有效的解决方 案。 发明内容 考虑到相关技术中存在的数据同步过程冗余的问题而提出本发明, 为 此, 本发明的主要目的在于提供一种基于同步标准协议的信息同步实现方法 和系统, 以解决上述问题。 才艮据本发明的一个方面 ,提供一种基于同步标准协议的服务器与客户端 之间的信息同步实现方法, 包括: 服务器响应于来自客户端的第一同步数据 包, 在服务器本地更新客户端的信息; 如果服务器确定没有需要同步到客户 端的数据, 则服务器向客户端发送状态响应消息; 响应于状态响应消息, 客 户端停止与服务器进行基于同步标准协议的通信。 根据本发明的另一个方面,提供一种基于同步标准协议的信息同步实现 系统, 包括服务器与客户端, 其中, 服务器包括: 更新模块, 用于响应于来 自客户端的第一同步数据包在服务器本地更新客户端的信息; 确定模块, 用 于在更新模块进行更新之后确定服务器中是否有需要同步到客户端的数据; 发送模块 , 用于在确定模块确定服务器中没有需要同步到客户端的数据的情 况下, 向客户端发送 ^!犬态响应消息; 客户端包括: 通信控制模块, 用于响应 于状态响应消息 , 控制客户端停止与服务器进行基于同步标准协议的通信。 借助本发明的上述至少一个技术方案,通过在数据同步过程中由服务器 发送相应消息通知客户端无需更新 , 使客户端能够省去之后与服务器进行的 不必要交互 , 能够在保证月 务器与客户端之间正常完成信息同步的同时有效 减少月 务器与客户端之间的消息交互处理, 从而有效节省了系统开销。 附图说明 附图用来提供对本发明的进一步理解, 并且构成说明书的一部分, 与本 发明的实施例一起用于解释本发明 , 并不构成对本发明的限制。 在附图中: 图 1是根据相关技术的服务器有实际同步数据时协议流程图; 图 2 是根据本发明实施例的基于同步标准协议的信息同步实现方法的 流程图; 图 3是根据本发明实施例的服务器无实际同步数据时协议流程图; 图 4是根据本发明实施例的客户端处理流程图; 图 5是根据本发明实施例的服务器端处理流程图; 图 6 是根据本发明实施例的基于同步标准协议的信息同步实现系统的 结构框图。 具体实施方式 以下结合附图对本发明的优选实施例进行说明, 应当理解, 此处所描述 的优选实施例仅用于说明和解释本发明, 并不用于限定本发明。 在以下的描述中, 为了解释的目的, 描述了多个特定的细节, 以提供对 本发明的透彻理解。 然而, 艮显然, 在没有这些特定细节的情况下, 也可以 实现本发明, 此外, 在不冲突的情况下, 即在不背离所附权利要求阐明的精 神和范围的情况下,下述实施例以及实施例中得各个细节可以进行各种组合。 图 2 是根据本发明实施例的基于同步标准协议的信息同步实现方法的 流程图 , 该方法基于同步标准协议实现服务器与客户端之间的信息同步, 如 图 2所示, 该方法包括以下步骤: 步骤 S202, 服务器响应于来自客户端的第一同步数据包, 在服务器本 地更新客户端的信息; 其中, 该第一同步数据包包括: 客户端请求更新的数据(即, 用户在客 户端侧更新的更新数据 ) 以及相应的 LUID (本地唯一标识符)。 步骤 S204, 如果服务器确定没有需要同步到客户端的数据, 则服务器 向客户端发送 ^!犬态响应消息; 其中,上述状态响应消息中仅包括服务器在其本地对客户端的信息进行 更新的结果, 该更新结果包括以下之一: 服务器在其本地对该更新数据进行 更新后的更新成功结果、 月 务器在其本地对该更新数据进行更新后的更新失 败结果。 步骤 S206, 响应于上述状态响应消息, 客户端停止与服务器进行基于 同步标准协议的通信。 考虑到数据同步业务是直接面向用户的增值业务,需要以提高用户体验 为目标对协议进行优化处理。 本发明实施例中, 服务器在步骤 S202 中接收 到第三个包之后 , 如果服务器在第四个包中并无实际的同步数据需要发送到 客户端, 服务器在向客户端发送响应于第三个包的响应消息 (该响应消息中 只携带有同步更新结果) 后, 服务器侧的同步协议流程结束, 否则继续执行 步骤 S105至步骤 S106。 相应地, 客户端接收第四个包之后, 如果客户端发 现该第四个包中并无需要同步更新的数据, 只包含有同步更新结果, 则客户 端侧的同步更新流程结束, 否则 , 客户端会构建第五个包(包含 map信息和 客户端数据更新状态信息)并将该第五个包发送给服务器。 即 , 前四个包(第 一个包至第四个包) 的发送和接收是按照图 1所示的同步协议流程进行的, 后续会根据服务器是否存在实际同步数据动态地决定是否发送最后两个包 (第五个包和第六个包), 如果月 务器需要发送同步数据, 则按照图 1 所示 的同步协议流程进行处理 , 否则不再发送最后两个包。 在步骤 S206中如果服务器确定有需要同步到客户端的数据, 即需要对 客户端的信息进行进一步更新, 其中, 该更新操作包括: 增加新数据、 删除 已有的数据、 4爹改已有的数据。 一方面, 如果更新操作为删除已有的数据或 修改已有的数据, 则服务器会在其本地查找服务器请求删除或修改的数据的 GUID (全局唯一标识符), 并才艮据预先保存的对应关系确定与该 GUID对应 的 LUID, 并向客户端发送第二同步数据包和状态响应消息, 其中, 该第二 同步数据包包括: 服务器请求更新的数据 (即需要同步到客户端的数据) 以 及确定的 LUID, 客户端接收到该第二同步数据包之后, 会对相应的数据执 行删除或修改的操作; 另一方面, 如果更新操作为增加新数据, 则服务器会 为请求增加的新数据配置新的 GUID, 并向客户端发送第二同步数据包和状 态响应消息, 其中, 该第二同步数据包包括: 服务器请求增加的新数据以及 该新数据对应的 GUID, 客户端接收到该第二同步数据包之后, 将该新数据 保存到本地, 并为该新数据配置新的 LUID, 并且, 客户端会建立新数据对 应的 GUID与 LUID之间的对应关系 , 并将该新的对应关系发送给月 务器 , 服务器将该新的对应关系保存在 map信息中。 这样, 客户端可以根据来自服 务器端的同步包 (即上述的第二同步包) 来在本地更新数据以与月 务器中的 数据保持同步。 在相关技术中不论是否有需要同步的数据,客户端均需要与服务器进行 6次交互, 导致数据同步占用大量的时间, 并且会增加网络出现故障的概率, 进而降低用户的体验。 本发明实施例提供的技术方案, 在服务器确定没有需 要同步到客户端的数据时仅向客户端发送同步更新结果, 客户端接收到该同 步更新结果后就结束同步流程, 即能够根据对服务器是否存在同步数据的分 析而动态进行同步包的构建, 从而在月 务器确定没有需要同步到客户端的数 据的情况下将同步标准协议中客户端与服务器的交互次数减少到 4次, 实现 了对同步流程的动态 4尤化, 并在保证月 务器与客户端之间正常完成信息同步 的同时有效减少服务器与客户端之间的消息交互处理, 从而有效节省了系统 开销。 下面结合图 3对图 2所示的方法进行说明,图 3示出了根据本发明的服 务器无实际同步数据时的协议流程图, 如图 3所示, 包括以下处理步骤: 步骤 S301 , 客户端向月 务器发送初始化包, 该初始化包中携带有同步 的数据库、 发起的同步类型、 鉴权信息、 业务能力等信息。 步骤 S302, 服务器接收到来自客户端的初始化包后, 会向客户端发送 该初始化包的响应消息。 另夕卜, 为了完成初始化, 服务器会向客户端发送该 服务器的鉴权信息, 如同步戳、 设备信息等参数, 并且, 服务器必须接受客 户端发送的同步类型。 至此, 客户端与月 务器的双向鉴权过程结束, 完成了初始化阶段。 步骤 S303 , 客户端向服务器发送用户在客户端侧更新的更新数据 (通 过同步包)。 步骤 S304, 服务器接收来自客户端的更新数据, 并在服务器本地进行 更新, 得到同步更新结果, 并且, 如果用户在服务器侧没有对用户数据进行 更新, 则服务器仅将该同步更新结果发送给客户端, 其中, 该同步更新结果 包括以下之一: 月 务器在其本地对该更新数据进行更新后的更新成功结果、 月 务器在其本地对该更新数据进行更新后的更新失败结果。 即, 如果在步骤 S304中, 服务器侧并无实际需要同步的数据, 则服务 器向客户端发送的第四个包中仅包含服务器侧数据处理的状态信息。 在第五 个包中并无实际的数据更新状态和 map信息,第六个包也无需进行 map确认, 在这种情况下最后两个包不再有实际的功能, 可以不再进行最后两个包的发 送。 下面结合图 4和图 5对本发明中客户端侧和服务器侧的处理流程分别进 行说明 , 图 4是根据本发明的客户端侧的同步协议处理流程图 , 图 4与图 1 所示方法的不同点在于: 客户端可以通过对协议包信息的判断动态地进行协 议包的发送。 步骤 S401 , 客户端构建其发送给月 务器的同步初始化包, 该初始化包 中携带有同步的数据库、 发起的同步类型、 鉴权信息、 业务能力等信息。 步骤 S402, 客户端接收来自服务器端的初始化包, 该初始化包中携带 有服务器的鉴权信息, 同步戳、 设备信息等参数。 步骤 S403 , 客户端构建同步数据包, 并将该同步数据包发送给服务器, 同步数据包中包括用户在客户端侧更新的更新数据。 步骤 S404, 客户端接收并分析来自服务器端的同步数据包。 步骤 S405 , 客户端判断来自服务器的同步数据包中是否无实际的同步 数据, 仅包含服务器的同步更新结果, 如果判断结果为是, 则客户端侧的同 步协议流程结束, 否则进入到步骤 S406。 步骤 S406 , 客户端构建状态和 map信息包 , 并将该信息包发送给服务 器, 并执行步骤 S407。 步骤 S407, 客户端接收并处理来自服务器的 map信息确认包。 图 5是根据本发明的服务器侧的同步协议处理流程图,图 5与图 1所示 方法的不同点在于: 服务器可以通过对协议包信息的判断动态地进行协议包 的发送。 步骤 S501 , 服务器接收并处理来自客户端的初始化包, 该初始化包中 携带有同步的数据库、 发起的同步类型、 鉴权信息、 业务能力等信息。 步骤 S502, 为了完成初始化, 服务器会向客户端发送该服务器的鉴权 信息, 同步戳、 设备信息等参数, 并且, 服务器必须接受客户端发送的同步 类型, 以及向客户端发送步骤 S501中的初始化包的响应消息。 步骤 S503 , 服务器接收并处理来自客户端的同步数据包, 该同步数据 包中包括用户在客户端侧更新的更新数据。 步骤 S504 , 服务器构建其发送给客户端的同步数据包。 步骤 S505 , 服务器判断该服务器侧是否存在需要更新的同步数据, 如 果判断结果为是, 则进入到步骤 S506 , 否则, 服务器向客户端发送响应于来 自客户端的同步数据包的同步更新结果, 至此, 月 务器侧的同步协议流程结 束。 步骤 S506 , 服务器接收并处理来自客户端的状态和 map信息包。 步骤 S507 , 服务器构建 map信息确认包, 并将该 map信息确认包发送 给客户端。 通过上述处理,能够根据对服务器是否存在同步数据的分析而动态进行 同步包的构建, 对同步的流程进行了动态的优化, 使客户端能够省去与服务 器进行的不必要交互, 在保证服务器与客户端之间正常完成信息同步的同时 有效减少服务器与客户端之间的消息交互处理, 从而有效节省了系统开销; 并且, 上述处理可以动态的进行包的构建, 当用户需要同步客户端的更新、 且服务器无数据更新时 , 能够明显减少冗余的交互流程。 图 6 示出了根据本发明实施例的基于同步标准协议的信息同步实现系 统的结构。 如图 6所示,根据本实施例的信息同步实现系统包括服务器 1和客户端
2 , 其中, 服务器 1与客户端 2能够基于同步标准协议实现彼此之间的通信。 具体地, 如图 6所示, 服务器 1可以包括: 更新模块 11、 确定模块 12、 发送 模块 13、 查询模块 14、 和配置模块 15 , 客户端 2可以包括通信控制模块 21。 下面将详细描述图 6中所示的各个模块的功能。 更新模块 11 , 用于响应于来自客户端的第一同步数据包在服务器本地 更新客户端的信息; 确定模块 12 , 连接至更新模块 11 , 用于在更新模块 11进行更新之后确 定服务器中是否有需要同步到客户端的数据; 发送模块 13 , 连接至确定模块 12 , 用于在确定模块 12确定服务器中没 有需要同步到客户端的数据的情况下, 向客户端发送状态响应消息; 以及在 确定模块 12确定服务器中有需要同步到客户端 2的数据的情况下向客户端 2 发送第二同步数据包和状态响应消息; 查询模块 14 , 连接至发送模块 13和确定模块 12 , 用于在确定模块 12 确定服务器中有需要同步到客户端 2的数据的情况下, 查找该数据的 GUID, 并才艮据预先保存的对应关系确定与该 GUID对应的 LUID, 以便构造第二同 步数据包; 配置模块 15, 用于为服务器请求更新的数据 (即上述需要同步到客户 端的数据) 配置新的 GUID; 通信控制模块 21 , 用于响应于来自发送模块 13的状态响应消息 , 控制 客户端停止与服务器进行基于同步标准协议的通信。 其中 , 上述第一同步数据包可以包括: 客户端请求更新的数据以及相应 的 LUID。 优选地, 由发送模块 13发送的状态响应消息中可以包括服务器在其本 地对客户端的信息进行更新的结果; 由发送模块 13 发送的第二同步数据包 可以包括以下至少之一: 月 务器请求更新的数据以及确定的 LUID、 服务器 请求更新的数据以及新的 GUID。 通过本发明实施例提供的客户端信息的同步系统,能够根据对服务器是 否存在同步数据的分析而动态进行同步包的构建, 对同步的流程进行了动态 的优化, 在保证服务器与客户端之间正常完成信息同步的同时有效减少服务 器与客户端之间的消息交互处理 , 从而有效节省了系统开销。 如上所述, 借助于本发明提供的客户端信息的同步方法和 /或系统, 通 过在数据同步过程中由服务器发送相应消息通知客户端无需更新 , 使客户端 能够省去之后与服务器进行的不必要交互, 能够在保证服务器与客户端之间 正常完成信息同步的同时有效减少服务器与客户端之间的消息交互处理, 从 而有效节省了系统开销。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本 领域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的^^申和 原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护 范围之内。

Claims

权 利 要 求 书
1. 一种基于同步标准协议的服务器与客户端之间的信息同步实现方法, 其 特征在于, 所述方法包括:
所述月 务器响应于来自所述客户端的第一同步数据包 ,在所述月 务 器本地更新所述客户端的信息;
如果所述月 务器确定没有需要同步到所述客户端的数据,则所述月 务器向所述客户端发送状态响应消息;
响应于所述状态响应消息 ,所述客户端停止与所述服务器进行基于 同步标准协议的通信。
2. 根据权利要求 1所述的方法, 其特征在于, 所述第一同步数据包包括: 所述客户端请求更新的数据以及相应的本地唯一标识符 LUID。
3. 才艮据权利要求 1所述的方法, 其特征在于, 所述状态响应消息中包括所 述服务器在其本地对所述客户端的信息进行更新的结果。
4. 根据权利要求 1至 3中任一项所述的方法, 其特征在于, 如果所述服务 器确定有需要同步到所述客户端的数据, 则所述服务器向所述客户端发 送第二同步数据包和所述状态响应消息。
5. 根据权利要求 4所述的方法, 其特征在于, 在发送所述第二同步数据包 之前, 所述方法还包括:
所述月 务器在其本地查找所述需要同步到所述客户端的数据的全 局唯一标识符 GUID, 并才艮据预先保存的对应关系确定与该 GUID对应 的 LUID; 和 /或,
所述服务器为所述需要同步到所述客户端的数据配置新的 GUID。
6. 根据权利要求 5所述的方法 , 其特征在于 , 所述第二同步数据包包括以 下至少之一: 所述需要同步到所述客户端的数据以及确定的所述 LUID, 所述需要同步到所述客户端的数据以及所述新的 GUID。
7. 一种基于同步标准协议的信息同步实现系统, 其特征在于, 包括服务器 与客户端, 其中, 所述服务器包括:
更新模块,用于响应于来自所述客户端的第一同步数据包在所述服 务器本地更新所述客户端的信息;
确定模块,用于在所述更新模块进行更新之后确定所述服务器中是 否有需要同步到所述客户端的数据;
发送模块,用于在所述确定模块确定所述服务器中没有需要同步到 所述客户端的数据的情况下 , 向所述客户端发送状态响应消息;
所述客户端包括:
通信控制模块, 用于响应于所述状态响应消息, 控制所述客户端停 止与所述服务器进行基于同步标准协议的通信。
8. 根据权利要求 7所述的系统, 其特征在于, 所述第一同步数据包包括: 所述客户端请求更新的数据以及相应的 LUID。
9. 根据权利要求 7所述的系统 , 其特征在于, 所述状态响应消息中包括所 述服务器在其本地对所述客户端的信息进行更新的结果。
10. 根据权利要求 7至 9中任一项所述的系统, 其特征在于,
所述发送模块还用于在所述确定模块确定所述服务器中有需要同 步到所述客户端的数据的情况下 , 向所述客户端发送第二同步数据包和 所述 ^!犬态响应消息。
11. 根据权利要求 10所述的系统, 其特征在于, 所述服务器还包括:
查询模块 , 用于查找所述需要同步到所述客户端的数据的 GUID, 并才艮据预先保存的对应关系确定与该 GUID对应的 LUID;
配置模块, 用于为所述需要同步到所述客户端的数据配置新的 GUID。
12. 根据权利要求 11所述的系统 , 其特征在于 , 所述第二同步数据包包括以 下至少之一: 所述需要同步到所述客户端的数据以及确定的所述 LUID、 所述需要同步到所述客户端的数据以及所述新的 GUID。
PCT/CN2010/072075 2009-05-06 2010-04-22 基于同步标准协议的信息同步实现方法和系统 WO2010127591A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2009101408040A CN101883419A (zh) 2009-05-06 2009-05-06 客户端信息的同步方法和系统
CN200910140804.0 2009-05-06

Publications (1)

Publication Number Publication Date
WO2010127591A1 true WO2010127591A1 (zh) 2010-11-11

Family

ID=43049966

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/072075 WO2010127591A1 (zh) 2009-05-06 2010-04-22 基于同步标准协议的信息同步实现方法和系统

Country Status (2)

Country Link
CN (1) CN101883419A (zh)
WO (1) WO2010127591A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102325367B (zh) * 2011-09-29 2013-09-11 用友软件股份有限公司 为客户端应用进行数据分组同步的装置和方法
CN107733979B (zh) * 2017-09-06 2021-05-28 中国科学院计算机网络信息中心 数据推送方法、服务器及系统
CN115242717B (zh) * 2022-09-15 2022-12-09 四川汉唐云分布式存储技术有限公司 一种基于端侧计算的中心化存储系统及控制方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1227396A1 (en) * 2001-01-24 2002-07-31 Microsoft Corporation A method, system and computer program product for synchronizing data represented by different data structures by using update notifications
CN1853428A (zh) * 2003-09-19 2006-10-25 皮科特有限公司 用于自动更新无线网络的系统的装置和方法
CN1852309A (zh) * 2005-11-16 2006-10-25 华为技术有限公司 数据同步处理方法及其客户端

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100531212C (zh) * 2006-01-21 2009-08-19 华为技术有限公司 一种协商设备信息的系统、方法
CN101110813B (zh) * 2006-07-17 2010-09-08 深圳市艾派应用系统有限公司 一种保持兼容的移动数据同步方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1227396A1 (en) * 2001-01-24 2002-07-31 Microsoft Corporation A method, system and computer program product for synchronizing data represented by different data structures by using update notifications
CN1853428A (zh) * 2003-09-19 2006-10-25 皮科特有限公司 用于自动更新无线网络的系统的装置和方法
CN1852309A (zh) * 2005-11-16 2006-10-25 华为技术有限公司 数据同步处理方法及其客户端

Also Published As

Publication number Publication date
CN101883419A (zh) 2010-11-10

Similar Documents

Publication Publication Date Title
CN111278031B (zh) Pdu类型的设置方法、ue策略的设置方法、实体及存储介质
WO2018082490A1 (zh) 用户终端位置区域更新方法、接入网实体、用户终端及核心网实体
CN103297529B (zh) 基于时间戳的树型结构数据同步方法
AU2009296436B2 (en) Trickle sync protocol
KR100978336B1 (ko) 리모트 액세스
EP1940107A1 (en) A method for processing data synchronization and client terminal, server and data synchronization system thereof
WO2013091382A1 (zh) 一种实现电器设备兼容的方法和系统、通用外设接入网关
WO2022262465A1 (zh) 基于opc ua的时间敏感网络集中用户配置方法及系统
CN101039310B (zh) 链路共享服务装置以及通信方法
WO2016100631A1 (en) Methods for enabling delay-awareness in the constrained application protocol (coap)
JP2009140515A (ja) 中断された同期プロセスに対処してデータを同期させる方法、装置、システム
WO2010028571A1 (zh) 大数据对象的传输方法、传输系统及发送设备和接收设备
JP2005537579A (ja) 中断された同期プロセスに対処してデータを同期させる方法、装置、システム
CN107820246A (zh) 用户认证的方法、装置和系统
WO2015168981A1 (zh) 属性的操作方法及装置
WO2010127591A1 (zh) 基于同步标准协议的信息同步实现方法和系统
US20050187959A1 (en) Method for transferring a message file between a client and a server
WO2012051811A1 (zh) 数据共享方法、移动终端及服务器
JP2003111136A (ja) 通信システム、ゲートウェイ、データ中継方法、プログラムおよび記録媒体
WO2013185696A2 (zh) 一种数据处理的方法与设备
JP2012105213A (ja) 無線lanアクセスポイントおよび無線端末の接続維持方法
CN117336346A (zh) 一种ippbx与pms对接状态转换方法、终端设备及介质
WO2014187241A1 (zh) 控制无线网络直连群组中无线设备断开的方法及无线设备
CN110771117B (zh) 一种采用面向id的网络的会话层通信
WO2020253330A1 (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: 10771994

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

Country of ref document: EP

Kind code of ref document: A1