CN1794724A - Method of realizing data synchronization on SyncML layer - Google Patents
Method of realizing data synchronization on SyncML layer Download PDFInfo
- Publication number
- CN1794724A CN1794724A CN 200510116802 CN200510116802A CN1794724A CN 1794724 A CN1794724 A CN 1794724A CN 200510116802 CN200510116802 CN 200510116802 CN 200510116802 A CN200510116802 A CN 200510116802A CN 1794724 A CN1794724 A CN 1794724A
- Authority
- CN
- China
- Prior art keywords
- data
- directory
- client
- synchrodata
- deletion
- 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.)
- Pending
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明公开了一种在SyncML层实现数据同步的方法,其不但详细给出了实现数据分类同步的具体实现方式,使得针对某一目录进行同步能够得以实现,而且,还在具体实现的过程中,尽量传递编号、数据类型等信息,避免了过多的具体的数据内容进行传递,且同步数据实际占用的物理空间也较小(每个数据只有一份),因而最大限度地减少了冗余数据的存在,节省了有限的设备资源和网络资源。同时用户可以按照自己的意愿创建物理或逻辑分类,可以指定任一目录即分类进行同步,增强了用户体验感。
The invention discloses a method for realizing data synchronization at the SyncML layer, which not only provides a detailed implementation method for realizing data classification synchronization, so that synchronization for a certain directory can be realized, but also in the process of specific implementation , trying to transmit information such as number and data type, avoiding too much specific data content to be transmitted, and the actual physical space occupied by the synchronization data is also small (only one copy of each data), thus minimizing redundancy The existence of data saves limited equipment resources and network resources. At the same time, users can create physical or logical categories according to their own wishes, and can specify any directory or category for synchronization, which enhances the user experience.
Description
技术领域technical field
本发明涉及开放移动联盟定义的数据同步规范(SyncML DataSynchronization)技术领域,特别是指在SyncML层实现数据同步的方法。The invention relates to the technical field of data synchronization specification (SyncML Data Synchronization) defined by the Open Mobile Alliance, in particular to a method for realizing data synchronization at the SyncML layer.
背景技术Background technique
IBM、Nokia、Palm、Psion等公司为了制订可以在多个平台及网络之间实现个人信息及企业内数据同步的标准规格,于2000年2月份创建了业界团体SyncML iniative。开发SyncML的目的在于,使终端用户、设备开发商、基础构件开发商、数据提供商、使用软件开发商以及服务提供商协同工作,真正实现使用任何终端设备均可随时随地访问任何网络数据。SyncML数据同步的典型应用是移动设备或应用服务器、与网络服务器之间的数据同步。除此之外,SyncML还可用于对等的数据同步,如两台PC之间。IBM, Nokia, Palm, Psion and other companies created the industry group SyncML initiative in February 2000 in order to formulate standard specifications that can synchronize personal information and enterprise data between multiple platforms and networks. The purpose of developing SyncML is to enable end users, equipment developers, infrastructure developers, data providers, application software developers, and service providers to work together, so that any terminal device can be used to access any network data anytime, anywhere. A typical application of SyncML data synchronization is data synchronization between mobile devices or application servers, and network servers. In addition, SyncML can also be used for peer-to-peer data synchronization, such as between two PCs.
图1所示为实现同步的示意图。SyncML客户端与服务器经过同步初始化阶段的参数协商以后,终端和服务器互相发送各自改变的数据,以保证双方数据的同步。Figure 1 shows a schematic diagram for realizing synchronization. After the SyncML client and server negotiate parameters in the synchronization initialization phase, the terminal and the server send each other changed data to ensure data synchronization between the two parties.
同步客户端(DS Client),它通常是一个PC软件、手机或PDA等智能终端。DS Client包含一个客户端数据库(Client Database),用来存储用户所需的数据,这些数据包括:通讯录、日程、便笺、短信、电子邮件等。这些数据均有标准规范定义其格式,客户端可以将数据转换成标准的格式发送给服务器,服务器处理后可保存入自己的数据库中。Synchronization client (DS Client), which is usually a smart terminal such as PC software, mobile phone or PDA. DS Client includes a client database (Client Database), which is used to store the data required by the user, which includes: address book, schedule, note, SMS, email, etc. These data have standard specifications to define their format. The client can convert the data into a standard format and send it to the server. After the server processes it, it can save it in its own database.
同步服务器(DS Server),可接收来自DS Client的数据同步消息和同步命令,并能向同步客户端发送同步消息。这个设备可以是一个网络服务器或是一个PC。DS Server包含了一个服务器端数据库(Server Database),用来存放服务器上的数据。The synchronization server (DS Server) can receive data synchronization messages and synchronization commands from the DS Client, and can send synchronization messages to the synchronization client. This device can be a web server or a PC. DS Server includes a server-side database (Server Database), which is used to store data on the server.
客户端和服务器端都存储有用于标识数据的标识,在客户端用LUID(Local Unique Identifier)作为数据标识;在服务器端使用GUID(GlobalUnique Identifer)作为数据标识。Both the client and the server store an identifier for identifying data. The client uses LUID (Local Unique Identifier) as the data identifier; the server uses GUID (Global Unique Identifer) as the data identifier.
参见图2,图2所示为客户端和服务器端的数据存储示意。在客户端,只需维护LUID与具体实际数据的对应关系,在服务器端不仅需要维护GUID与具体实际数据的对应关系,还要维护GUID和LUID的对应关系。Referring to FIG. 2, FIG. 2 shows a schematic diagram of data storage at the client and server. On the client side, it is only necessary to maintain the corresponding relationship between LUID and specific actual data. On the server side, not only the corresponding relationship between GUID and specific actual data needs to be maintained, but also the corresponding relationship between GUID and LUID.
同步类型分为多种,具体参见表1。
表1 Table 1
SyncML规范中规定的同步流程通常分为三个阶段:The synchronization process specified in the SyncML specification is usually divided into three stages:
1、同步初始化阶段,其主要完成身份鉴权、需要同步的数据库的协商、同步能力的协商(支持同步哪些数据、支持哪些同步类型等)。该交互过程可能需要持续多次才能完成。1. In the synchronization initialization phase, it mainly completes identity authentication, negotiation of databases that need to be synchronized, and negotiation of synchronization capabilities (which data is supported for synchronization, which synchronization types are supported, etc.). This interactive process may need to continue several times to complete.
2、同步阶段,其主要用于客户端和服务器中的一端,根据数据的状态将发生改变的数据通过操作命令的方式发送到客户端和服务器中的另一端,由另一端按照这些命令进行相同的操作来达到同步的目的。2. Synchronization stage, which is mainly used for one end of the client and the server. According to the state of the data, the changed data is sent to the other end of the client and the server through operation commands, and the other end performs the same operation according to these commands. operation to achieve the purpose of synchronization.
3、同步完成阶段,其主要用于客户端和服务器端互相确认同步完成。3. The synchronization completion stage is mainly used for the client and the server to confirm the synchronization completion.
现有技术中,为实际的数据定义了Folder和File两种格式,其主要是模拟PC机上的文件夹和文件那样的树状目录结构,并定义Folder和File有类似文件系统那样的属性,如是否隐藏(h)、是否为系统目录或文件(s)、是否压缩(a)、是否删除,如果为删除状态,目录或文件可以被删除(d)、是否可写(w)、是否可读(r)、文件是否可执行(x)等。而且,在执行同步操作时,只能用于同步文件系统那样的物理方式的目录结构。In the prior art, two formats of Folder and File are defined for actual data, which mainly simulate the tree-like directory structure of folders and files on the PC, and define that Folder and File have attributes similar to the file system, such as Whether it is hidden (h), whether it is a system directory or file (s), whether it is compressed (a), whether it is deleted, if it is deleted, the directory or file can be deleted (d), whether it is writable (w), whether it is readable (r), whether the file is executable (x), etc. Moreover, when performing a synchronization operation, it can only be used to synchronize the directory structure in a physical way like a file system.
同时,在现有技术中还提供了过滤(Filtering)功能,其作用主要是在初始化协商阶段指明过滤条件。例如:在协商终端能力时,可以针对待同步数据指定过滤条件,如:At the same time, a filtering (Filtering) function is also provided in the prior art, and its function is mainly to specify filtering conditions in the initialization negotiation phase. For example: when negotiating terminal capabilities, filter conditions can be specified for the data to be synchronized, such as:
A、指定客户端不接收vCard中的PHOTO属性;A. Specify that the client does not receive the PHOTO attribute in the vCard;
B、指定客户端仅仅同步属于Business和Personal群组的联系人;B. Specify the client to only synchronize contacts belonging to the Business and Personal groups;
其中的过滤条件B可以看做是客户端和服务器端协商仅同步指定目录的过程。The filter condition B can be regarded as a process in which the client and the server negotiate to synchronize only the specified directory.
但是,即使是用于同步文件系统那样的物理方式的目录结构,在现有的规范中也没有明确说明具体的实现方法,即没有明确如何使用Folder和File进行递归同步,因而,当前各个厂商几乎都没有对某一目录进行同步的实现方法。However, even for the directory structure of a physical method used to synchronize file systems, the specific implementation method is not clearly stated in the existing specifications, that is, how to use Folder and File for recursive synchronization is not clear. Therefore, currently, almost all manufacturers There is no implementation method for synchronizing a certain directory.
再有,即使采用这种方法,也只能实现对物理方式的目录结构实现同步,而不能对逻辑方式的目录结构实现同步,无法区分递归同步和非递归同步。例如,假设用户的手机内已存在通讯录、短信、电子邮件等几个以物理方式存在的目录结构,在现有技术中,用户只能同步短信这一大类,而不能将已存储的短信分为“笑话”和“祝福”两个逻辑类,更不能只同步“笑话”这一逻辑目录。同时也不支持一个数据项同时存在于两个分类中,例如对于用户通讯簿,张三既属于“同事组”,又属于“朋友组”的需求无法实现。Furthermore, even if this method is adopted, it can only realize the synchronization of the directory structure in the physical mode, but cannot realize the synchronization of the directory structure in the logical mode, and it is impossible to distinguish between recursive synchronization and non-recursive synchronization. For example, assuming that there are several physically existing directory structures such as address book, short message, and e-mail in the user's mobile phone, in the prior art, the user can only synchronize short messages, but cannot store stored short messages. It is divided into two logical categories of "joke" and "blessing", and it is not possible to only synchronize the logical category of "joke". At the same time, it does not support a data item to exist in two categories at the same time. For example, for the user address book, the requirement that Zhang San belongs to both the "colleague group" and the "friend group" cannot be realized.
另外,在现有通讯录(vCard)规范中有group属性,可以用于分类,但是其与具体的同步内容绑定即同步指定的目录依赖于具体的数据格式,而且同一内容只能属于一个分类而不能同时属于多个分类,例如通讯录中张三的属性是“同事”,那么其就只能属于“同事”这一分类,而不能再属于“好友”这一分类。并且其他数据格式,如短信、日程等,并不支持基于group的属性。可见,该种分类并不通用。再有,基于vCard的group属性需要用户打开具体的数据格式来编辑群组名,这样可能由于误操作使得“好友”和“好友”被认为是不同的群组,且大小写敏感。而且group属性仅能够支持一级目录结构,对于多级目录是不支持的。In addition, there is a group attribute in the existing address book (vCard) specification, which can be used for classification, but it is bound to specific synchronization content, that is, the directory specified for synchronization depends on the specific data format, and the same content can only belong to one classification It cannot belong to multiple categories at the same time. For example, the attribute of Zhang San in the address book is "colleague", so he can only belong to the category of "colleague", and cannot belong to the category of "friend". And other data formats, such as text messages, schedules, etc., do not support group-based attributes. It can be seen that this classification is not universal. Furthermore, the group attribute based on vCard requires the user to open a specific data format to edit the group name, which may cause "friends" and "friends" to be considered as different groups due to misoperation, and are case-sensitive. Moreover, the group attribute can only support one-level directory structure, and does not support multi-level directories.
在现有技术中当客户端操作和服务器端操作发生冲突时,仅仅是采用以客户端数据为主、或者以服务器端数据为主的简单解决措施;当采用目录结构以后,冲突发生的情况就会变得复杂,例如:用户在客户端上移动A目录使其成为B目录的子目录,而服务器端是在A目录中增加了一个条目,二者的操作发生了冲突,如果采用现有技术,最终只能是采用客户端的操作,服务器端新增条目被丢弃;或者客户端上A目录新增一个条目,A目录移动到B目录下的操作被丢弃;而实际用户希望的情况是A目录下新增了条目,并且A目录被移动到B目录下。In the prior art, when the client operation and the server operation conflict, only a simple solution based on client data or server data is adopted; after the directory structure is adopted, the conflict occurs It will become complicated, for example: the user moves the A directory on the client to make it a subdirectory of the B directory, and the server adds an entry in the A directory, and the operations of the two conflict, if the existing technology is adopted In the end, it can only be the operation of the client, and the new entry on the server is discarded; or an entry is added to the A directory on the client, and the operation of moving the A directory to the B directory is discarded; the actual situation that the user wants is the A directory A new entry is added under , and the A directory is moved to the B directory.
发明内容Contents of the invention
有鉴于此,本发明的目的在于提供一种在SyncML层实现数据同步的方法,可以指定任意一目录进行同步,不但节省网络资源,而且增强用户体验。In view of this, the purpose of the present invention is to provide a method for realizing data synchronization at the SyncML layer, which can specify any directory for synchronization, which not only saves network resources, but also enhances user experience.
为达到上述目的,本发明的技术方案是这样实现的:In order to achieve the above object, technical solution of the present invention is achieved in that way:
一种在SyncML层实现数据同步的方法,当SyncML客户端或服务器端中的一端接收到来自用户的同步请求时,客户端和服务器端协商待同步数据所属目录;该方法包括以下步骤:A method for realizing data synchronization at the SyncML layer, when one of the SyncML client or the server receives a synchronization request from the user, the client and the server negotiate the directory to which the data to be synchronized belongs; the method comprises the following steps:
a、SyncML客户端或服务器端中的一端首先确定接收到的请求同步命令中待同步数据的类型,如果是目录项,则执行步骤b,如果是数据项目,则执行步骤c;a. One of the SyncML client or server first determines the type of data to be synchronized in the received request synchronization command, if it is a directory item, then perform step b, if it is a data item, then perform step c;
b、从已设置的目录表中获取该待同步数据的当前状态,如果当前状态指示为未变化,则不做处理,如果当前状态指示为变化,则根据该变化状态构建与之相对应的数据同步命令,将该数据同步命令发送给客户端或服务器端中的另一端;b. Obtain the current state of the data to be synchronized from the set directory table. If the current state indicates no change, do not process it. If the current state indicates change, construct the corresponding data according to the change state A synchronization command, sending the data synchronization command to the client or the other end of the server;
c、从已设置的数据条目-目录对应关系表中获取该待同步数据的变化状态,并根据该变化状态构建与之相对应的数据同步命令,将该数据同步命令发送给客户端或服务器端中的另一端;c. Obtain the change state of the data to be synchronized from the set data entry-directory correspondence table, and construct a corresponding data synchronization command according to the change state, and send the data synchronization command to the client or server the other end of the
所述所构建的命令中至少包括待同步数据的数据类型和待同步数据编号;The constructed command includes at least the data type of the data to be synchronized and the serial number of the data to be synchronized;
SyncML客户端或服务器中的另一端接收到来自对端的同步命令后,执行以下步骤:After the other end of the SyncML client or server receives the synchronization command from the opposite end, it performs the following steps:
d、根据接收到的数据同步命令,确定操作类型,更改相应表格的内容,实现数据同步。d. According to the received data synchronization command, determine the operation type, change the content of the corresponding table, and realize data synchronization.
较佳地,所述发起同步请求的为客户端,所述执行同步操作的为服务器端;Preferably, the one that initiates the synchronization request is the client, and the one that executes the synchronization operation is the server;
所述该待同步数据的变化状态为新增N,所述与该变化状态相对应的数据同步命令为增加ADD同步命令;所述该命令中的待同步数据编号是该数据在客户端的编号,且该命令中进一步包括:具体的待同步数据以及该数据所属父目录;The change state of the data to be synchronized is newly added N, and the data synchronization command corresponding to the change state is an ADD synchronization command; the number of the data to be synchronized in the order is the number of the data at the client, And the command further includes: the specific data to be synchronized and the parent directory to which the data belongs;
所述服务器端确定操作类型为增加;所述更改相应表格的内容,实现数据同步的过程包括以下步骤:The server side determines that the operation type is to increase; the process of changing the content of the corresponding table and realizing data synchronization includes the following steps:
根据接收到的数据同步命令,在本地数据库保存接收到的待同步数据,为该待同步数据分配服务器本地编号,在已设置的SyncML客户端内的编号与服务器内的编号的对应关系列表中保存该同步数据在客户端的编号与该同步数据在服务器端的编号的对应关系;并且,根据同步命令中的待同步数据的数据类型,确定该同步数据的类型,如果数据类型是目录项,则在本地已设置的目录表中增加相应条目,如果数据类型是数据项目,则在本地已设置的数据条目表和数据条目-目录对应关系索引表中增加相应条目。According to the received data synchronization command, save the received data to be synchronized in the local database, assign the local number of the server to the data to be synchronized, and save it in the corresponding relationship list between the number in the SyncML client and the number in the server that has been set The corresponding relationship between the number of the synchronization data on the client side and the number of the synchronization data on the server side; and, according to the data type of the data to be synchronized in the synchronization command, determine the type of the synchronization data, if the data type is a directory entry, then locally A corresponding entry is added to the set directory table, and if the data type is a data item, a corresponding entry is added to the locally set data entry table and data entry-directory correspondence index table.
较佳地,所述发起同步请求的为服务器端,所述执行同步操作的为客户端;Preferably, the one that initiates the synchronization request is the server, and the one that executes the synchronization operation is the client;
所述该待同步数据的变化状态为新增N,所述与该变化状态相对应的数据同步命令为增加ADD同步命令;所述该命令中的待同步数据编号是该数据在服务器端的编号,且该命令中进一步包括:具体的待同步数据以及该数据所属父目录;The change state of the data to be synchronized is new N, and the data synchronization command corresponding to the change state is an ADD synchronization command; the number of the data to be synchronized in the order is the number of the data on the server side, And the command further includes: the specific data to be synchronized and the parent directory to which the data belongs;
所述客户端确定操作类型为增加;所述更改相应表格的内容,实现数据同步的过程包括以下步骤:The client determines that the operation type is to increase; the process of changing the content of the corresponding table and realizing data synchronization includes the following steps:
根据接收到的数据同步命令,在本地数据库保存接收到的待同步数据,为该待同步数据分配客户端本地编号,并且,根据同步命令中的待同步数据的数据类型,确定该同步数据的类型,如果数据类型是目录项,则在本地已设置的目录表中增加相应条目,如果数据类型是数据项目,则在本地已设置的数据条目表和数据条目-目录对应关系索引表中增加相应条目;之后,给服务器端返回该数据客户端内的编号与服务器内的编号的对应关系,由服务器端将接收到的对应关系保存在本地已设置的SyncML客户端内的编号与服务器内的编号的对应关系列表内。According to the received data synchronization command, save the received data to be synchronized in the local database, assign the local number of the client to the data to be synchronized, and determine the type of the synchronized data according to the data type of the data to be synchronized in the synchronization command , if the data type is a directory item, add the corresponding entry in the locally set directory table, if the data type is a data item, add the corresponding entry in the locally set data entry table and data entry-directory correspondence index table ; Afterwards, return the corresponding relationship between the serial number in the data client and the serial number in the server to the server end, and store the received corresponding relationship in the locally configured SyncML client serial number and the serial number in the server Correspondence list.
较佳地,步骤b执行完毕之后,进一步包括:e判断该新增加的目录项下是否有新增加的数据项目,如果有,则重复执行步骤c,直到将所有数据项目全部同步为止,之后执行步骤f;如果没有,则直接执行步骤f;Preferably, after step b is executed, it further includes: e judging whether there is a newly added data item under the newly added directory item, and if so, repeating step c until all data items are fully synchronized, and then executing Step f; if not, then directly execute step f;
f、判断该新增加的目录项下是否有新增加的子目录项,如果有,则重复执行步骤b,直到将所有目录项全部同步为止,之后执行步骤e,如果没有,则结束。f. Determine whether there is a newly added subdirectory item under the newly added directory item, if yes, repeat step b until all directory items are fully synchronized, then perform step e, if not, then end.
较佳地,步骤b执行完毕之后,进一步包括:e判断该新增加的目录项下是否有新增加的数据项目,如果有,则重复执行步骤c,直到将所有数据项目全部同步为止。Preferably, after step b is executed, the method further includes: e judging whether there is a newly added data item under the newly added directory item, and if so, repeating step c until all data items are synchronized.
较佳地,所述该待同步数据的变化状态为更新U,所述与该变化状态相对应的数据同步命令为替换Replace同步命令,且该命令中进一步包括:具体的待同步数据,以及该数据所属父目录;Preferably, the change state of the data to be synchronized is update U, and the data synchronization command corresponding to the change state is a Replace synchronization command, and the command further includes: the specific data to be synchronized, and the The parent directory to which the data belongs;
所述另一端确定操作类型为更新;所述更改相应表格的内容,实现数据同步的过程包括以下步骤:The other end determines that the operation type is update; the process of changing the content of the corresponding table and realizing data synchronization includes the following steps:
根据接收到的数据同步命令,确定该同步数据的类型,如果数据类型是目录项,则在本地已设置的目录表中更新待同步数据在本地的编号所对应的条目,如果数据类型是数据项目,则在本地已设置的数据条目表中更新待同步数据在本地的编号所对应的条目。According to the received data synchronization command, determine the type of the synchronization data, if the data type is a directory item, update the entry corresponding to the local number of the data to be synchronized in the local directory table, if the data type is a data item , update the entry corresponding to the local number of the data to be synchronized in the locally set data entry table.
较佳地,步骤b执行完毕之后,进一步包括:g判断该已更新的目录项下是否有更新的数据项目,如果有,则重复执行步骤c,直到将所有数据项目全部同步为止,之后执行步骤h;如果没有,则直接执行步骤h;Preferably, after step b is executed, it further includes: g judging whether there is an updated data item under the updated directory item, and if so, repeating step c until all data items are fully synchronized, and then performing step h; if not, execute step h directly;
h、判断该已更新的目录项下是否存在更新的子目录项,如果有,则重复执行步骤b,直到将所有目录项全部同步为止,之后执行步骤g,如果没有,则结束。h. Determine whether there is an updated sub-directory item under the updated directory item, if yes, repeat step b until all directory items are synchronized, then perform step g, if not, then end.
较佳地,步骤b执行完毕之后,进一步包括:g判断该已更新的目录项下是否有更新的数据项目,如果有,则重复执行步骤c,直到将所有数据项目全部同步为止。Preferably, after step b is executed, the method further includes: g judging whether there is an updated data item under the updated directory item, and if so, repeating step c until all data items are synchronized.
较佳地,所述该待同步数据的变化状态为移动M,所述与该变化状态相对应的数据同步命令为移动Move同步命令;且该命令中进一步包括:变更后的该数据所属父目录;Preferably, the change state of the data to be synchronized is moving M, and the data synchronization command corresponding to the change state is a Move synchronization command; and the command further includes: the parent directory to which the changed data belongs ;
所述另一端确定操作类型为移动;所述更改相应表格的内容,实现数据同步的过程包括以下步骤:The other end determines that the operation type is mobile; the process of changing the content of the corresponding table and realizing data synchronization includes the following steps:
根据接收到的数据同步命令,确定该同步数据的类型,如果数据类型是目录项,则在本地已设置的目录表中将该待同步数据在本地的编号所对应的条目所属父目录更改为接收到的同步命令中的父目录,如果数据类型是数据项目,则在本地已设置的数据条目-目录对应关系表中将待同步数据在本地的编号所对应的条目所属父目录更改为接收到的同步命令中的父目录。According to the received data synchronization command, determine the type of the synchronization data, if the data type is a directory entry, change the parent directory of the entry corresponding to the local number of the data to be synchronized to receive in the directory table that has been set locally If the data type is a data item, change the parent directory of the entry corresponding to the local number of the data to be synchronized to the received one in the locally set data entry-directory correspondence table. Synchronize the parent directory in the command.
较佳地,步骤b所述当前状态指示为删除D,所述与该变化状态相对应的数据同步命令为删除Delete同步命令;则所述发起同步请求的一端进一步包括:判断该待删除目录下的数据项目以及该目录的子目录下的数据项目是否仅存在于该待删除目录下,如果是,则构建一条删除命令,且该删除命令中包含指示永久删除的信息;否则,针对每个数据项目和目录项分别构建一条删除命令,且仅存在于该待删除目录下的数据项目或目录项所对应的删除命令中包含指示永久删除的信息,并非仅存在于该待删除目录下的数据项目或目录项所对应的删除命令中包含指示非永久删除的信息;Preferably, the current state indicated in step b is delete D, and the data synchronization command corresponding to the changed state is a delete Delete synchronization command; then the end that initiates the synchronization request further includes: judging the Whether the data items in the data items and the data items in the subdirectories of the directory only exist in the directory to be deleted, if yes, construct a delete command, and the delete command contains information indicating permanent deletion; otherwise, for each data The project and the directory item respectively construct a delete command, and only exist in the data item in the directory to be deleted or the delete command corresponding to the directory item contains information indicating permanent deletion, not only in the data item in the directory to be deleted or the deletion command corresponding to the directory entry contains information indicating non-permanent deletion;
所述另一端确定操作类型为删除;所述更改相应表格的内容,实现数据同步的过程包括以下步骤:The other end determines that the operation type is deletion; the process of changing the content of the corresponding table and realizing data synchronization includes the following steps:
根据接收到的数据同步命令确定删除类型,以及待同步数据的数据类型,如果数据类型是目录项,则无论是删除类型为永久删除还是非永久删除,都在本地已设置的目录表中删除待同步数据在本地的编号所对应的条目;如果数据类型是数据项目,且删除类型为永久删除,则在本地数据库内删除该数据,并在本地已设置的数据条目表和数据条目-目录对应关系表中,分别删除待同步数据在本地的编号所对应的条目;如果数据类型是数据项目,且删除类型为非永久删除,则在本地的数据条目-目录对应关系表中删除待同步数据在本地的编号所对应的条目。Determine the deletion type and the data type of the data to be synchronized according to the received data synchronization command. If the data type is a directory item, whether the deletion type is permanent deletion or non-permanent deletion, it will be deleted in the locally set directory table. Synchronize the entry corresponding to the local number of the data; if the data type is a data item, and the deletion type is permanent deletion, delete the data in the local database, and set the data entry table and data entry-directory correspondence in the local In the table, delete the entries corresponding to the local numbers of the data to be synchronized; if the data type is a data item, and the deletion type is non-permanent deletion, delete the data to be synchronized locally in the local data entry-directory correspondence table The entry corresponding to the number of .
较佳地,步骤b所述当前状态指示为删除D,所述与该变化状态相对应的数据同步命令为删除Delete同步命令;Preferably, the current state indicated in step b is delete D, and the data synchronization command corresponding to the changed state is a delete Delete synchronization command;
所述另一端确定操作类型为删除;所述更改相应表格的内容,实现数据同步的过程包括以下步骤:The other end determines that the operation type is deletion; the process of changing the content of the corresponding table and realizing data synchronization includes the following steps:
根据接收到的数据同步命令确定删除类型,以及待同步数据的数据类型,如果数据类型是目录项,则再判断该待删除目录下的数据项目以及该目录的子目录及子目录下的数据项目是否仅存在于该待删除目录下,如果是,则确定该待删除目录以及该目录下的数据项目、和子目录及子目录下的数据项目均为永久删除,否则,确定针对该待删除目录以及仅存在于该待删除目录下的数据项目或目录项为永久删除,针对并非仅存在于该待删除目录下的数据项目或目录项为非永久删除;Determine the type of deletion and the data type of the data to be synchronized according to the received data synchronization command. If the data type is a directory item, then judge the data item under the directory to be deleted, the subdirectory of the directory and the data item under the subdirectory Whether it only exists under the directory to be deleted, if yes, then determine that the directory to be deleted and the data items under the directory, and the subdirectory and the data items under the subdirectory are permanently deleted, otherwise, determine the directory to be deleted and the data items under the subdirectory Data items or directory items that only exist in the directory to be deleted are permanently deleted, and data items or directory items that do not only exist in the directory to be deleted are not permanently deleted;
如果删除的是目录项,则无论是删除类型为永久删除还是非永久删除,都在本地已设置的目录表中删除待同步数据在本地的编号所对应的条目;如果删除的是数据项目,且删除类型为永久删除,则在本地数据库内删除该数据,并在本地已设置的数据条目表和数据条目-目录对应关系表中,分别删除待同步数据在本地的编号所对应的条目;如果数据类型是数据项目,且删除类型为非永久删除,则在本地的数据条目-目录对应关系表中删除待同步数据在本地的编号所对应的条目。If the deletion is a directory item, no matter whether the deletion type is permanent deletion or non-permanent deletion, the entry corresponding to the local number of the data to be synchronized will be deleted in the locally set directory table; if the deletion is a data item, and If the deletion type is permanent deletion, delete the data in the local database, and delete the entry corresponding to the local number of the data to be synchronized in the local data entry table and data entry-directory correspondence table; if the data If the type is a data item, and the deletion type is non-permanent deletion, delete the entry corresponding to the local number of the data to be synchronized in the local data entry-directory correspondence table.
较佳地,步骤c所述变化状态为删除D,所述与该变化状态相对应的数据同步命令为删除Delete同步命令;则所述发起同步请求的一端进一步包括:判断接收到的来自用户的删除命令中是否指示永久删除该数据项目,如果是,则所述删除命令中进一步包括永久删除的标识,否则,判断该待删除数据项目是否位于多个目录下,如果是,在所述删除命令中进一步包括非永久删除的标识,否则所述删除命令中进一步包括永久删除的标识;Preferably, the change state in step c is delete D, and the data synchronization command corresponding to the change state is a delete delete synchronization command; then the end that initiates the synchronization request further includes: judging the received Whether to indicate that the data item is permanently deleted in the delete command, if yes, further include the mark of permanent deletion in the delete command, otherwise, determine whether the data item to be deleted is located in multiple directories, if so, in the delete command further includes an identifier of non-permanent deletion, otherwise the deletion command further includes an identifier of permanent deletion;
所述另一端确定操作类型为删除;所述更改相应表格的内容,实现数据同步的过程包括以下步骤:The other end determines that the operation type is deletion; the process of changing the content of the corresponding table and realizing data synchronization includes the following steps:
根据接收到的数据同步命令确定数据类型为数据项目后,再确定删除类型,如果删除类型为永久删除,则在本地数据库内删除该数据,并在本地已设置的数据条目表和数据条目-目录对应关系表中,分别删除待同步数据在本地的编号所对应的条目;如果删除类型为非永久删除,则在本地的数据条目-目录对应关系表中删除待同步数据在本地的编号所对应的条目。After the data type is determined to be a data item according to the received data synchronization command, then the deletion type is determined. If the deletion type is permanent deletion, the data is deleted in the local database, and the data entry table and data entry-directory that have been set locally In the correspondence table, delete the entries corresponding to the local numbers of the data to be synchronized; if the deletion type is non-permanent deletion, delete the corresponding entries in the local data entry-directory correspondence table. entry.
较佳地,在作为执行同步操作的客户端或服务器另一端执行完毕删除同步操作后,进一步包括:发起同步请求的一端在本地已设置的相应数据表中删除相应数据项目。Preferably, after the other end of the client or server performing the synchronization operation completes the delete synchronization operation, it further includes: the end that initiates the synchronization request deletes the corresponding data item in the corresponding data table that has been set locally.
较佳地,如果所述发起同步请求的为客户端,执行同步操作的为服务器端,则所述同步命令中的待同步数据编号是该数据在客户端的编号;所述服务器端接收到数据同步命令后,确定数据类型前进一步包括:在已设置的SyncML客户端内的编号与服务器内的编号的对应关系列表中获取该更新的待同步数据在服务器本地的编号,之后再继续执行后续操作。Preferably, if the client that initiates the synchronization request and the server that performs the synchronization operation, the number of the data to be synchronized in the synchronization command is the number of the data on the client; the server receives the data synchronization After the command, before determining the data type, it further includes: obtaining the local number of the updated data to be synchronized on the server from the set correspondence list between the number in the SyncML client and the number in the server, and then continue to perform subsequent operations.
如果所述发起同步请求的为服务器端,执行同步操作的为客户端,则所述同步命令中的待同步数据编号是服务器端根据自身已设置的客户端内的编号与服务器内的编号的对应关系列表获取的该数据在客户端的编号。If the one that initiates the synchronization request is the server, and the one that executes the synchronization operation is the client, then the number of data to be synchronized in the synchronization command is the correspondence between the number in the client and the number in the server that the server has set according to itself. The number of the data obtained by the relationship list on the client side.
较佳地,所述在SyncML客户端及服务器内分别设置的目录表中,至少包括目录项编号、目录名、该目录项名所属的父目录、以及该目录项状态的对应关系;Preferably, the directory tables respectively set in the SyncML client and the server include at least the directory item number, the directory name, the parent directory to which the directory item name belongs, and the corresponding relationship of the directory item status;
所述在SyncML客户端及服务器内分别设置的数据条目-目录对应关系索引表中,至少包括数据项目编号、父目录、以及数据项目状态的对应关系。The data entry-directory correspondence index tables respectively set in the SyncML client and server include at least the correspondence between data item numbers, parent directories, and data item states.
较佳地,所述在SyncML客户端及服务器内分别设置的数据条目表中至少包括:数据项目编号以及具体的数据内容的对应关系;Preferably, the data entry tables respectively set in the SyncML client and the server at least include: the corresponding relationship between the data item number and the specific data content;
所述在服务器端已设置的SyncML客户端内的编号与服务器内的编号的对应关系列表中至少包括:数据在客户端内的编号与服务器内的编号的对应关系。The list of correspondences between numbers in the SyncML client and numbers in the server that has been set on the server side at least includes: a correspondence between numbers in the client and numbers in the server.
较佳地,所述协商待同步数据所属目录的操作在初始化阶段,包括以下步骤:对URI的格式作预定义,在目标数据库元素中通过URI的含义指明待同步目录。Preferably, the operation of negotiating the directory of the data to be synchronized includes the following steps in the initial stage: predefining the format of the URI, and specifying the directory to be synchronized by the meaning of the URI in the target database element.
较佳地,所述协商待同步数据所属目录的操作在初始化阶段,包括以下步骤:在过滤条件元素中通过过滤条件指明待同步目录。Preferably, the operation of negotiating the directory to which the data to be synchronized belongs is at the initialization stage, including the following steps: specifying the directory to be synchronized by the filter condition in the filter condition element.
较佳地,该方法进一步包括:增设以服务器端和客户端合并处理(Win-Win)的仲裁结果;Preferably, the method further includes: adding an arbitration result that is processed by combining the server and the client (Win-Win);
当服务器端和客户端的修改操作发生冲突时,客户端根据服务器端的修改执行同步操作,并且,服务器端根据客户端的修改执行同步操作;When the modification operations of the server and the client conflict, the client executes the synchronization operation according to the modification of the server, and the server executes the synchronization operation according to the modification of the client;
所述修改包括新增、更新、移动、删除、复制操作。The modification includes adding, updating, moving, deleting and copying operations.
本发明所述方法,不但详细给出了实现数据分类同步的具体实现方式,使得针对某一目录进行同步能够得以实现,而且,还在具体实现的过程中,尽量传递编号、数据类型等信息,避免了过多的具体的数据内容进行传递,且同步数据实际占用的物理空间也较小(每个数据只有一份),因而最大限度地减少了冗余数据的存在,节省了有限的设备资源和网络资源。同时用户可以按照自己的意愿创建物理或逻辑分类,可以通过拖拉操作等,将数据项目归入指定的目录,不需要手工去编辑数据项目;可以指定任一目录即分类进行递归或非递归同步,增强了用户体验感。The method of the present invention not only provides a specific implementation method for realizing data classification synchronization in detail, so that synchronization for a certain directory can be realized, but also, in the process of specific implementation, try to transmit information such as numbering and data types, It avoids the transmission of too much specific data content, and the actual physical space occupied by the synchronous data is also small (only one copy of each data), thus minimizing the existence of redundant data and saving limited device resources and network resources. At the same time, users can create physical or logical classifications according to their own wishes, and can put data items into specified directories through drag and drop operations, without manual editing of data items; any directory can be designated for recursive or non-recursive synchronization. Enhanced user experience.
附图说明Description of drawings
图1所示为实现同步的示意图;Figure 1 shows a schematic diagram for realizing synchronization;
图2所示为客户端和服务器端的数据存储示意;Fig. 2 shows the data storage of the client and the server;
图3a所示为应用本发明实施例一的用户定义的数据结构示意图;FIG. 3a is a schematic diagram of a user-defined data structure applying Embodiment 1 of the present invention;
图3b所示为应用本发明实施例一的客户端的数据存储示意图;FIG. 3b is a schematic diagram of data storage of a client applying Embodiment 1 of the present invention;
图4a所示为应用本发明实施例二的用户定义的数据结构示意图;FIG. 4a is a schematic diagram of a user-defined data structure applying Embodiment 2 of the present invention;
图4b所示为应用本发明实施例二的客户端的数据存储示意图;FIG. 4b is a schematic diagram of data storage of a client applying Embodiment 2 of the present invention;
图5a所示为应用本发明实施例三的用户定义的数据结构示意图;FIG. 5a is a schematic diagram of a user-defined data structure applying Embodiment 3 of the present invention;
图5b所示为应用本发明实施例三的客户端的数据存储示意图;FIG. 5b is a schematic diagram of data storage of a client applying Embodiment 3 of the present invention;
图6a所示为应用本发明实施例四的用户定义的数据结构示意图;FIG. 6a is a schematic diagram of a user-defined data structure applying Embodiment 4 of the present invention;
图6b所示为应用本发明实施例四的客户端的数据存储示意图;FIG. 6b is a schematic diagram of data storage of a client applying Embodiment 4 of the present invention;
图7a所示为应用本发明实施例五的用户定义的数据结构示意图;FIG. 7a is a schematic diagram of a user-defined data structure applying Embodiment 5 of the present invention;
图7b所示为应用本发明实施例五的客户端的数据存储示意图;FIG. 7b is a schematic diagram of data storage of a client applying Embodiment 5 of the present invention;
图8a所示为应用本发明实施例六的用户定义的数据结构示意图;FIG. 8a is a schematic diagram of a user-defined data structure applying Embodiment 6 of the present invention;
图8b所示为应用本发明实施例六的客户端的数据存储示意图。FIG. 8b is a schematic diagram of data storage of a client applying Embodiment 6 of the present invention.
具体实施方式Detailed ways
下面结合附图及具体实施例,对本发明再做进一步地详细说明。The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
为了实现能够使用户按照自己的意愿创建物理或逻辑分类目录,并指定任意一分类目录进行递归同步或非递归同步,需要在客户端和服务器端分别设置以下三张数据表:In order to enable users to create physical or logical categories according to their own wishes, and specify any category for recursive synchronization or non-recursive synchronization, the following three data tables need to be set on the client and server:
1、数据条目表(Data Item Table):该表用于保存所有的数据项目信息,其包括数据项目编号以及具体的数据内容(Data)的对应关系;其中,所述数据项目编号在客户端以Item LUID表示,在服务器端以Item GUID表示1. Data Item Table (Data Item Table): This table is used to save all data item information, which includes the corresponding relationship between the data item number and the specific data content (Data); wherein, the data item number starts with Item LUID is represented by Item GUID on the server side
2、目录表(Folder Table):该表用于保存所有的目录项信息,其包括目录项编号、目录名(Name)、该目录项名所属的父目录(Parent Source)、以及该目录项状态(Folder Satus)的对应关系。其中的状态主要包括现存未修改Existing(E)、新增New(N)、更新Update(U)、删除Delete(D)、移动Move(M)以及复制Copy(C)状态;其中,Delete又可以分为永久删除Delete permanetly(P-D)和非永久删除Delete non-permanetly(P-ND)两种状态;所述目录项编号在客户端以Folder LUID表示,在服务器端以Folder GUID表示。2. Folder Table: This table is used to save all directory item information, including the directory item number, directory name (Name), the parent directory (Parent Source) to which the directory item name belongs, and the status of the directory item (Folder Satus) correspondence. The states mainly include Existing (E), New (N), Update (U), Delete (D), Move (M) and Copy (C). Among them, Delete can It is divided into two states: Delete permanently (P-D) and Delete non-permanetly (P-ND). The directory entry number is represented by Folder LUID on the client side and Folder GUID on the server side.
3、数据条目-目录对应关系索引表(Index Table):该表用于保存数据项目的归属关系,其包括数据项目编号、父目录(Parent Source)以及数据项目状态(Data Satus)的对应关系;其中所述数据项目编号在客户端以ItemLUID表示,在服务器端以Item GUID表示。3. Data entry-directory correspondence index table (Index Table): This table is used to save the attribution relationship of data items, which includes the corresponding relationship between data item number, parent directory (Parent Source) and data item status (Data Satus); Wherein the data item number is represented by ItemLUD on the client side, and by Item GUID on the server side.
再有,在服务器端还需保存数据在SyncML客户端内的编号与服务器内的编号的对应关系列表,即GUID与LUID之间的对应关系。Furthermore, the server side also needs to save the corresponding relationship list between the serial number of the data in the SyncML client and the serial number in the server, that is, the corresponding relationship between GUID and LUID.
众所周知,在SyncML中实现同步分为三个阶段:同步初始化阶段、同步阶段和同步完成阶段。在本发明中同步完成阶段的处理与现有方式相同,因此,以下仅就同步初始化阶段和同步阶段进行描述。As we all know, synchronization in SyncML is divided into three phases: synchronization initialization phase, synchronization phase and synchronization completion phase. The processing of the synchronization completion stage in the present invention is the same as the existing method, so only the synchronization initialization stage and the synchronization stage will be described below.
在同步初始化阶段,除了象现有技术一样协商需要同步的数据库、终端能力之外,还要指明待同步目录,具体的可以有以下两种方式来实现:In the synchronization initialization phase, in addition to negotiating the database and terminal capabilities that need to be synchronized as in the prior art, it is also necessary to specify the directory to be synchronized. Specifically, the following two ways can be implemented:
方式一:在目标数据库元素中指明待同步目录。具体为:对统一资源标识符(URI,Uniform Resource Identifier)的格式作预定义,预先指定哪一级标识数据库地址,哪一级表示目录的地址,通过URI的标识指明待同步目录。当然,如果需要同步多个目录,可同时给出多个URI予以指明。Method 1: Indicate the directory to be synchronized in the target database element. Specifically: pre-define the format of Uniform Resource Identifier (URI, Uniform Resource Identifier), pre-designate which level identifies the database address, which level represents the address of the directory, and indicate the directory to be synchronized through the URI identification. Of course, if you need to synchronize multiple directories, you can specify multiple URIs at the same time.
方式二:在过滤条件元素中指明待同步目录。具体为:扩展现有的过滤功能,在过滤条件(如Filter)中指明待同步目录。所述待同步目录是SyncML级别的目录,是不依赖于同步数据类型的。当然,如果需要同步多个目录,可同时指出多个目录。Method 2: Indicate the directory to be synchronized in the filter condition element. Specifically: expand the existing filtering function, and specify the directory to be synchronized in the filtering condition (such as Filter). The directory to be synchronized is a SyncML-level directory, which does not depend on the type of synchronization data. Of course, if multiple directories need to be synchronized, multiple directories can be indicated at the same time.
下面结合具体实施例对同步阶段进行说明。由于客户端发起同步与服务器端发起同步的处理流程相类似,下面仅以客户端发起同步,服务器端执行数据同步操作为例进行说明。The synchronization phase will be described below in combination with specific embodiments. Since the client-initiated synchronization process is similar to the server-initiated synchronization process, the following only uses the client-initiated synchronization and the server-side data synchronization operation as an example for illustration.
实施例一:用户在短信的根目录(./sms)下增加了一个新的目录“bless”,并且,在“bless”目录下又增加了两个子目录分别为“Spring Festival”和“Mid-autumn Festival”,同时,在每个目录下分别增加了一个数据,即在“bless”目录下增加了数据N1,在“Spring Festival”目录下增加了数据N2,在“Mid-autumn Festival”目录下增加了数据N3。Embodiment 1: The user adds a new directory "bless" under the root directory (./sms) of the short message, and adds two subdirectories under the "bless" directory, namely "Spring Festival" and "Mid- "autumn Festival", at the same time, add a piece of data under each directory, that is, add data N1 under the "bless" directory, add data N2 under the "Spring Festival" directory, and add data N2 under the "Mid-autumn Festival" directory Added data N3.
参见图3a和图3b,图3a所示为应用本发明实施例一的用户定义的数据结构示意图,其中,方框表示Folder,圆圈表示data Item;实线表示的状态为Existing,虚线表示的状态为New。图3b所示为应用本发明实施例一的客户端的数据存储示意图。在客户端保存有数据条目表Data Item Table、目录表Folder Table和“数据条目-目录”对应关系索引表Index Table。各个列表所增加数据的状态在图3b都有相应的反映。Referring to Fig. 3a and Fig. 3b, Fig. 3a shows a schematic diagram of a user-defined data structure applying Embodiment 1 of the present invention, wherein, a square box represents a Folder, and a circle represents a data Item; the state represented by a solid line is Existing, and the state represented by a dotted line for New. Fig. 3b is a schematic diagram of data storage of a client applying Embodiment 1 of the present invention. The data item table Data Item Table, the directory table Folder Table and the "data item-directory" corresponding relationship index table Index Table are saved on the client side. The states of the added data in each list are correspondingly reflected in Fig. 3b.
当用户要求同步“bless”目录时,客户端顺序生成以下同步命令:When a user asks to sync the "bless" directory, the client generates the following sync commands sequentially:
首先,客户端根据接收到的来自用户的同步bless目录的命令确定同步数据是一个目录项后,从Folder Table确定该bless的状态为N,之后,构建增加(ADD)的同步命令,并且,在该构建的命令中的Meta字段指明根据Folder Table确定的数据类型为目录项Folder,LUID字段指明待同步数据的编号1006,Data字段指明具体的数据为bless,SourceParent字段指明其所属父目录为根目录。First, after the client determines that the synchronization data is a directory item according to the command received from the user to synchronize the bless directory, it determines the status of the bless from the Folder Table as N, and then constructs an increase (ADD) synchronization command, and, in The Meta field in the constructed command indicates that the data type determined according to the Folder Table is the directory item Folder, the LUID field indicates the
之后,客户端确定bless目录下数据项目状态,由于在Index Table中,数据项目2001所对应的状态为N,因此,构建ADD同步命令,并且从DataItem Table中确定2001所对应的具体数据内容为N1后,该所构建的ADD同步命令中的Meta字段指明数据类型为数据项目Item,LUID字段指明待同步数据的编号为2001,Data字段指明具体的数据为N1,SourceParent字段指明其所属父目录为1006。After that, the client determines the status of the data item in the bless directory. Since the status corresponding to the
之后,当客户端确定bless目录下没有新增加的数据项目后,索引该bless目录下子目录的状态,其具体方法与确定bless目录的方法相同,此处不再赘述。其确定的结果是构建两个ADD同步命令,其中一个命令中的Meta字段指明数据类型为目录项Folder,LUID字段指明待同步数据的编号1007,Data字段指明具体的数据为Spring Festival,SourceParent字段指明其所属父目录为1006;另一个命令中的Meta字段指明数据类型为目录项Folder,LUID字段指明待同步数据的编号1008,Data字段指明具体的数据为Mid-autumnFestival,SourceParent字段指明其所属父目录为1006。Afterwards, when the client determines that there is no newly added data item in the bless directory, it will index the status of the subdirectories under the bless directory. The specific method is the same as the method for determining the bless directory, and will not be repeated here. The determined result is to build two ADD synchronization commands. The Meta field in one of the commands indicates that the data type is the directory item Folder, the LUID field indicates the
之后,当客户端确定bless目录下没有新增加的子目录后,再确定SpringFestival目录和Mid-autumn Festival目录下的数据项目的状态,其具体方法与确定N1的方法相同,即客户端会分别再构造两条ADD同步命令,在此不再赘述。Afterwards, when the client confirms that there are no newly added subdirectories under the bless directory, then determine the status of the data items under the SpringFestival directory and the Mid-autumn Festival directory. The specific method is the same as the method for determining N1. Construct two ADD synchronous commands, which will not be repeated here.
以此类推,直到针对所有增加的数据均发出ADD同步命令为止,这样也就实现了递归同步。当然,如果只同步某一目录项,而不再同步该目录项下的数据项,实际就是实现了非递归同步。另外,还可以只同步某一目录项及该目录项下的数据项目,而不再同步该目录项下的子目录项。By analogy, until the ADD synchronization command is issued for all the added data, the recursive synchronization is realized in this way. Of course, if only a certain directory item is synchronized, and the data items under this directory item are no longer synchronized, the non-recursive synchronization is actually realized. In addition, it is also possible to only synchronize a certain directory item and the data items under the directory item without synchronizing the subdirectory items under the directory item.
之后,将所构造的ADD同步命令全部发送给服务器。如果每个ADD命令的数据量较少,可在一个消息中包含多个ADD命令,一次性交互即可;如果数据较多,需要多次交互。在实际应用中,还可以只发送一个ADD同步命令,但在一个ADD命令中包含多个目录和数据项目,即其逻辑上仍然是多个ADD命令。Afterwards, all the constructed ADD synchronization commands are sent to the server. If the amount of data in each ADD command is small, multiple ADD commands can be included in one message, and one-time interaction is enough; if there is a large amount of data, multiple interactions are required. In practical applications, only one ADD synchronization command can be sent, but multiple directories and data items are included in one ADD command, that is, it is still multiple ADD commands logically.
下面说明服务器端接收到上述ADD命令后,执行同步操作的过程。该过程所涉及的表格与图3b所示表格类似,因此图未示。The following describes the process of performing a synchronization operation after the server receives the above-mentioned ADD command. The table involved in this process is similar to the table shown in Figure 3b, so it is not shown in the figure.
当服务器端接收到增加bless目录项的同步命令后,通过接收到的同步命令中的Meta字段确定待同步数据的类型为目录项,根据LUID字段确定该待同步数据在客户端的编号为1006,根据Data字段确定其名称为bless,根据SourceParent字段确定其父目录为根目录。之后,为该待同步数据分配服务器本地编号Folder GUID,如100006。然后,在本地已设置的目录表中增加相应条目,即增加100006、bless、根目录以及该bless数据当前状态的对应关系条目。并且,在自身已设置的SyncML客户端内的编号与服务器内的编号的对应关系列表中保该同步数据在客户端的编号LUID与该同步数据在服务器端的编号GUID的对应关系,即保存1006和100006之间的对应关系。When the server receives the synchronization command to add the bless directory item, it determines the type of the data to be synchronized as a directory item through the Meta field in the received synchronization command, and determines the serial number of the data to be synchronized on the client side as 1006 according to the LUID field. The Data field determines its name as bless, and its parent directory is determined as the root directory according to the SourceParent field. Afterwards, assign the local number Folder GUID of the server to the data to be synchronized, such as 100006. Then, add a corresponding entry in the locally set directory table, that is, add 100006, bless, the root directory, and the corresponding relationship entry of the current state of the bless data. And, keep the corresponding relationship between the number LUID of the synchronization data on the client side and the number GUID of the synchronization data on the server side in the corresponding relationship list between the number in the SyncML client and the number in the server that you have set, that is, save 1006 and 100006 Correspondence between.
当服务器端接收到增加N1数据项目的同步命令后,通过接收到的同步命令中的Meta字段确定待同步数据的类型为数据项目,根据LUID字段确定该待同步数据在客户端的编号为2001,根据Data字段确定其具体的数据内容为N1,根据SourceParent字段确定其父目录为1006。之后,在本地数据库中保存该N1数据,然后为该待同步数据分配服务器本地编号FolderGUID,如200001,并在本地已设置的数据条目表Data Item Table中增加相应条目,即增加200001和N1的对应关系条目;在Index Table中增加相应条目,即增加200001、100006以及该N1数据当前状态的对应关系条目,在自身已设置的SyncML客户端内的编号与服务器内的编号的对应关系列表中保该同步数据在客户端的编号与该同步数据在服务器端的编号的对应关系,即保存2001和200001之间的对应关系。When the server receives the synchronization command to add the N1 data item, it determines the type of the data to be synchronized as a data item through the Meta field in the received synchronization command, and determines the serial number of the data to be synchronized on the client side as 2001 according to the LUID field. The specific data content determined by the Data field is N1, and its parent directory is determined as 1006 according to the SourceParent field. After that, save the N1 data in the local database, and then assign the server local number FolderGUID to the data to be synchronized, such as 200001, and add the corresponding entry in the Data Item Table that has been set locally, that is, increase the correspondence between 200001 and N1 Relationship entry; add corresponding entries in the Index Table, that is, add 200001, 100006 and the corresponding relationship entries of the current state of the N1 data, and keep the corresponding relationship list between the number in the SyncML client and the number in the server that you have set. The corresponding relationship between the serial number of the synchronization data on the client side and the serial number of the synchronization data on the server side is to store the corresponding relationship between 2001 and 200001.
服务器端增加Spring Festival目录项和Mid-autumn Festival目录项的方式与增加bless目录项的方式相同,增加N2和N3数据项目的方法与增加N1数据项目的方式相同,在此不再赘述。The method of adding Spring Festival directory items and Mid-autumn Festival directory items on the server side is the same as that of adding bless directory items, and the method of adding N2 and N3 data items is the same as that of adding N1 data items, so I won’t repeat them here.
另外,有一点需要说明的是:如果是服务器端发起同步请求,由客户端执行同步操作,则服务器端发送给客户端的同步请求中包含待同步数据在服务器端的编号,客户端执行完同步操作后,将给服务器端返回该数据客户端内的编号与服务器内的编号的对应关系即LUID与GUID的对应关系,由服务器端将接收到的对应关系保存在本地已设置的SyncML客户端内的编号与服务器内的编号的对应关系列表内。In addition, one thing that needs to be explained is: if the server initiates a synchronization request and the client performs the synchronization operation, the synchronization request sent from the server to the client includes the number of the data to be synchronized on the server. After the client completes the synchronization operation , will return to the server the corresponding relationship between the serial number in the client and the serial number in the server, that is, the corresponding relationship between LUID and GUID, and the server will save the received corresponding relationship in the locally configured serial number in the SyncML client In the list of correspondences with numbers in the server.
至此,实现了增加数据的同步操作,而且该数据可以是一个具体的数据项目,也可以是根据用户的意愿而创建的目录项,且该目录项不受系统的数据物理结构的限制。可见,应用本发明的好处是:相同的数据只需传递一份,而且,执行同步操作的一端,对相同数据也只需保存一份,大大节省了网络资源和设备本身的资源。例如,假设N1同时属于bless、Spring Festival和Mid-autumn Festival目录下,那么在服务器端的同步操作过程中,只需在Index Table中再增加两条相应条目,即增加200001、100007以及该N1数据当前状态的对应关系条目,和200001、100008以及该N1数据当前状态的对应关系条目即可。So far, the synchronization operation of adding data has been realized, and the data can be a specific data item, or a directory item created according to the user's wishes, and the directory item is not limited by the physical data structure of the system. It can be seen that the advantage of applying the present invention is that only one copy of the same data needs to be transmitted, and only one copy of the same data needs to be saved at the end performing the synchronization operation, which greatly saves network resources and resources of the device itself. For example, assuming that N1 belongs to the bless, Spring Festival and Mid-autumn Festival directories at the same time, then during the synchronization operation on the server side, only two more corresponding entries need to be added in the Index Table, that is, adding 200001, 100007 and the current N1 data The corresponding relationship entry of the state and the corresponding relationship entry of 200001, 100008 and the current state of the N1 data are sufficient.
实施例二:用户在短信的根目录(./sms)下更新了目录“bless”的属性,并更新了“bless”目录下数据U1,仅更新了“Spring Festival”目录下的数据U2。本实施例中,U2同时属于Spring Festival和Mid-autumn Festival两个目录下。Embodiment 2: The user updates the attribute of the directory "bless" under the root directory (./sms) of the short message, and updates the data U1 under the "bless" directory, and only updates the data U2 under the "Spring Festival" directory. In this embodiment, U2 belongs to both the Spring Festival and Mid-autumn Festival directories.
参见图4a和图4b,图4a所示为应用本发明实施例二的用户定义的数据结构示意图,其中,方框表示Folder,圆圈表示data Item;实线表示的状态为Existing,点画线表示的状态为Updata。图4b所示为应用本发明实施例二的客户端的数据存储示意图。在客户端保存有数据条目表Data Item Table、目录表Folder Table和“数据条目-目录”对应关系索引表Index Table。各个列表所中数据的状态在图4b都有相应的反映。Referring to Fig. 4a and Fig. 4b, Fig. 4a shows a schematic diagram of a user-defined data structure applying Embodiment 2 of the present invention, wherein, the box represents Folder, and the circle represents data Item; the state represented by the solid line is Existing, and the state represented by the dotted line The status is Updata. FIG. 4b is a schematic diagram of data storage of a client applying Embodiment 2 of the present invention. The data item table Data Item Table, the directory table Folder Table and the "data item-directory" corresponding relationship index table Index Table are saved on the client side. The status of the data in each list is reflected in Figure 4b.
当用户要求同步“bless”目录时,客户端顺序生成以下同步命令:When a user asks to sync the "bless" directory, the client generates the following sync commands sequentially:
首先,客户端根据接收到的来自用户的同步bless目录的命令确定同步数据是一个目录项后,从Folder Table确定该bless的状态为U,之后,构建替换(Replace)的同步命令,并且,在该构建的命令中的Meta字段指明根据Folder Table确定的数据类型为目录项Folder,LUID字段指明待同步数据的编号1006,Data字段指明具体的数据为bless,SourceParent字段指明其所属父目录为根目录。First, after the client determines that the synchronization data is a directory item according to the command received from the user to synchronize the bless directory, it determines the status of the bless from the Folder Table to be U, and then constructs a replacement (Replace) synchronization command, and, in The Meta field in the constructed command indicates that the data type determined according to the Folder Table is the directory item Folder, the LUID field indicates the
之后,客户端确定bless目录下数据项目状态,由于在Index Table中,1006所对应的数据项目为2001,且其状态为U,因此,构建Replace同步命令,并且从Data Item Table中确定2001所对应的具体数据内容为U1后,该所构建的Replace同步命令中的Meta字段指明数据类型为数据项目Item,LUID字段指明待同步数据的编号为2001,Data字段指明具体的数据为U1,SourceParent字段指明其所属父目录为1006。Afterwards, the client determines the status of the data item in the bless directory. Since the data item corresponding to 1006 in the Index Table is 2001, and its status is U, it constructs the Replace synchronization command and determines the corresponding data item of 2001 from the Data Item Table. After the specific data content is U1, the Meta field in the constructed Replace synchronization command indicates that the data type is Item, the LUID field indicates that the number of the data to be synchronized is 2001, the Data field indicates that the specific data is U1, and the SourceParent field indicates Its parent directory is 1006.
之后,当客户端确定bless目录下没有更新的数据项目后,索引该bless目录下子目录的状态,其具体方法与确定bless目录的方法相同,本例中,该bless目录下子目录的状态未发生变化,不做处理。After that, when the client determines that there is no updated data item in the bless directory, it will index the status of the subdirectories under the bless directory. The specific method is the same as the method for determining the bless directory. In this example, the status of the subdirectories under the bless directory has not changed. , do not process.
之后,当客户端确定bless目录下没有更新的子目录后,再确定子目录Spring Festival下的数据项目的状态,其具体方法与确定U1的方法相同。即其最终的结果是构建Replace同步命令,并且从Data Item Table中确定2002所对应的具体数据内容为U2后,该所构建的Replace同步命令中的Meta字段指明数据类型为数据项目Item,LUID字段指明待同步数据的编号为2002,Data字段指明具体的数据为U2,SourceParent字段指明其所属父目录为1007。Afterwards, when the client determines that there is no updated subdirectory under the bless directory, it determines the status of the data items under the subdirectory Spring Festival. The specific method is the same as the method for determining U1. That is, the final result is to construct the Replace synchronization command, and after determining from the Data Item Table that the specific data content corresponding to 2002 is U2, the Meta field in the constructed Replace synchronization command indicates that the data type is the data item Item, and the LUID field The number indicating the data to be synchronized is 2002, the Data field indicates the specific data is U2, and the SourceParent field indicates its parent directory is 1007.
以此类推,直到针对所有更新的数据均发出Replace同步命令为止,这样也就实现了递归同步。当然,如果只同步某一目录项,而不再同步该目录项下的数据项,实际就是实现了非递归同步。另外,还可以只同步某一目录项及该目录项下的数据项目,而不再同步该目录项下的子目录项。By analogy, until the Replace synchronization command is issued for all the updated data, the recursive synchronization is realized in this way. Of course, if only a certain directory item is synchronized, and the data items under this directory item are no longer synchronized, the non-recursive synchronization is actually realized. In addition, it is also possible to only synchronize a certain directory item and the data items under the directory item without synchronizing the subdirectory items under the directory item.
之后,将所构造的Replace同步命令全部发送给服务器,具体发送方式与发送ADD同步命令的方式相同,在此不再赘述。Afterwards, all the constructed Replace synchronization commands are sent to the server, and the specific sending method is the same as that of sending the ADD synchronization command, which will not be repeated here.
下面说明服务器端接收到上述Replace命令后,执行同步操作的过程。该过程所涉及的表格与图4b所示表格类似,因此图未示。The following describes the process of executing the synchronization operation after the server receives the above-mentioned Replace command. The table involved in this process is similar to the table shown in Figure 4b, so it is not shown in the figure.
当服务器端接收到更新bless目录项的同步命令后,通过接收到的同步命令中的Meta字段确定待同步数据的类型为目录项,根据LUID字段确定该待同步数据在客户端的编号为1006,根据Data字段确定其名称为bless,根据SourceParent字段确定其父目录为根目录。之后,在已设置的SyncML客户端内的编号与服务器内的编号的对应关系列表中获取该更新的待同步数据在服务器本地的编号;如100006。然后,在本地已设置的目录表中更新相应条目,即更新100006、bless、根目录以及该bless数据当前状态的对应关系条目中的bless的属性信息。When the server receives the synchronization command to update the bless directory item, it determines the type of the data to be synchronized as a directory item through the Meta field in the received synchronization command, and determines the serial number of the data to be synchronized on the client side as 1006 according to the LUID field. The Data field determines its name as bless, and its parent directory is determined as the root directory according to the SourceParent field. Afterwards, the local serial number of the updated data to be synchronized in the server is obtained from the set correspondence list between the serial number in the SyncML client and the serial number in the server; for example, 100006. Then, update the corresponding entry in the locally set directory table, that is, update the attribute information of bless in the corresponding relationship entry of 100006, bless, the root directory, and the current state of the bless data.
当服务器端接收到更新U1数据项目的同步命令后,通过接收到的同步命令中的Meta字段确定待同步数据的类型为数据项目,根据LUID字段确定该待同步数据在客户端的编号为2001,根据Data字段确定其具体的数据内容为U1,根据SourceParent字段确定其父目录为1006。之后,在已设置的SyncML客户端内的编号与服务器内的编号的对应关系列表中获取该更新的待同步数据在服务器本地的编号,如200001,在本地已设置的数据条目表中更新待同步数据在本地的编号所对应的条目,即更新200001与U1的对应关系条目中的U1的信息。When the server side receives the synchronization command to update the U1 data item, it determines the type of the data to be synchronized as a data item through the Meta field in the received synchronization command, and determines the serial number of the data to be synchronized on the client side as 2001 according to the LUID field. The data field determines its specific data content as U1, and its parent directory is determined as 1006 according to the SourceParent field. After that, obtain the local number of the updated data to be synchronized on the server from the corresponding list of the number in the SyncML client and the number in the server that has been set, such as 200001, and update the data to be synchronized in the locally set data entry table The entry corresponding to the local serial number of the data is to update the U1 information in the entry corresponding to 200001 and U1.
服务器端更新U2的方法与更新U1的方法相同,在此不再赘述。The method for updating U2 at the server side is the same as the method for updating U1, and will not be repeated here.
此处需要说明一点,本例中,U2既属于Spring Festival目录又Mid-autumn Festival目录,但更新U2时只需发送一次Replace命令,服务器端也只需更新一次U2,就可以使两个目录下的U2都得到更新。这是因为,在服务器端实际只保存了一份数据,该数据的隶属关系是通过Index Table表来体现的。可见,采用本发明的方法可最大限度地减少冗余数据的存在,进而最大限度地节省有限的资源。One point needs to be explained here. In this example, U2 belongs to both the Spring Festival directory and the Mid-autumn Festival directory. However, when updating U2, you only need to send the Replace command once, and the server only needs to update U2 once to make the two directories Both U2's are updated. This is because only one piece of data is actually saved on the server side, and the affiliation of the data is reflected through the Index Table. It can be seen that the use of the method of the present invention can minimize the existence of redundant data, thereby saving limited resources to the greatest extent.
实施例三:用户将“music”目录下的数据项目“M1”移动到“favoriate”目录下;将“mp3”整个目录移动到“favorite”下。Embodiment 3: The user moves the data item "M1" under the "music" directory to the "favoriate" directory; moves the entire "mp3" directory to the "favorite".
参见图5a和图5b,图5a所示为应用本发明实施例三的用户定义的数据结构示意图,其中,方框表示Folder,圆圈表示data Item;实线表示的状态为Existing,双点画线表示的状态为Move。图5b所示为应用本发明实施例三的客户端的数据存储示意图。在客户端保存有数据条目表Data Item Table、目录表Folder Table和“数据条目-目录”对应关系索引表Index Table。各个列表中数据的状态在图5b都有相应的反映。Referring to Fig. 5a and Fig. 5b, Fig. 5a shows a schematic diagram of a user-defined data structure applying Embodiment 3 of the present invention, wherein, a square box represents a Folder, and a circle represents a data Item; the state represented by a solid line is Existing, and a double-dotted line represents The status is Move. FIG. 5b is a schematic diagram of data storage of a client applying Embodiment 3 of the present invention. The data item table Data Item Table, the directory table Folder Table and the "data item-directory" corresponding relationship index table Index Table are saved on the client side. The status of data in each list is reflected in Figure 5b.
当用户要求同步根目录时,客户端顺序生成以下同步命令:When the user requests to synchronize the root directory, the client generates the following synchronization commands in sequence:
首先,客户端根据接收到的来自用户的同步根目录的命令后,索引该根目录下的所有子目录的状态,本例中,该根目录下所有子目录的状态未发生变化,因而不做处理。然后,客户端索引该根目录下的数据项目的状态是否发生变化,本例中,该根目录下的数据项目的状态也未发生变化,不做处理。First, the client indexes the status of all subdirectories under the root directory according to the command received from the user to synchronize the root directory. In this example, the status of all subdirectories under the root directory has not changed, so no deal with. Then, the client checks whether the status of the data items in the root directory changes. In this example, the status of the data items in the root directory does not change, so no processing is performed.
之后,客户端依次索引每个子目录中的子目录状态是否发生变化,本例中,客户端确定music目录下的“mp3”子目录的状态为M,之后,构建移动(Move)同步命令,并且,在该构建的命令中的Meta字段指明根据FolderTable确定的数据类型为目录项Folder,LUID字段指明待同步数据的编号1006,SourceParent字段指明其移动后所属父目录为1004。After that, the client sequentially indexes whether the status of the subdirectories in each subdirectory changes. In this example, the client determines that the status of the "mp3" subdirectory under the music directory is M. After that, the client constructs a Move (Move) synchronization command, and , the Meta field in the constructed command indicates that the data type determined according to the FolderTable is the directory item Folder, the LUID field indicates the
之后,客户端确定music目录下数据项目的状态,由于在Index Table中,1006所对应的数据项目为2001,且其状态为M,因此构建Move同步命令,并且,在该构建的命令中的Meta字段指明数据类型为数据项目Item,LUID字段指明待同步数据的编号2001,SourceParent字段指明其移动后所属的父目录为1004。Afterwards, the client determines the status of the data item in the music directory. Since the data item corresponding to 1006 in the Index Table is 2001, and its status is M, a Move synchronization command is constructed, and the Meta in the constructed command The field indicates that the data type is Item, the LUID field indicates the
以此类推,本例中没有其他发生移动的数据,因此不再处理。By analogy, there is no other data that has been moved in this case, so it will not be processed.
之后,将所构造的MOVE同步命令全部发送给服务器,具体发送方式与发送ADD同步命令的方式相同,在此不再赘述。Afterwards, all the constructed MOVE synchronization commands are sent to the server, and the specific sending method is the same as that of sending the ADD synchronization command, which will not be repeated here.
下面说明服务器端接收到上述Move命令后,执行同步操作的过程。该过程所涉及的表格与图5b所示表格类似,因此图未示。The following describes the process of performing a synchronization operation after the server receives the above-mentioned Move command. The table involved in this process is similar to the table shown in Fig. 5b, so it is not shown in the figure.
当服务器端接收到移动mp3目录项的同步命令后,通过接收到的同步命令中的Meta字段确定待同步数据的类型为目录项,LUID字段确定该待同步数据在客户端的编号为1006,SourceParent字段确定其移动后所属父目录为1004后,在已设置的SyncML客户端内的编号与服务器内的编号的对应关系列表中获取该待移动数据在服务器本地的编号,如100006,在本地已设置的Folder Table中将该待同步数据在本地的编号所对应的条目所属父目录更改为接收到的同步命令中的父目录,即将该表中的100006所对应的父目录由1005改为1004。When the server receives the synchronization command to move the mp3 directory item, the Meta field in the received synchronization command determines that the type of the data to be synchronized is a directory item, the LUID field determines that the number of the data to be synchronized on the client is 1006, and the SourceParent field After confirming that the parent directory to which it belongs after the move is 1004, obtain the local number of the data to be moved on the server from the corresponding list of the number in the SyncML client and the number in the server that has been set, such as 100006, which has been set locally In the Folder Table, change the parent directory of the entry corresponding to the local number of the data to be synchronized to the parent directory in the received synchronization command, that is, change the parent directory corresponding to 100006 in the table from 1005 to 1004.
当服务器端接收到移动M1数据项目的同步命令后,通过接收到的同步命令中的Meta字段确定待同步数据的类型为Item,LUID字段确定该待同步数据在客户端的编号为2001,SourceParent字段确定其移动后所属父目录为1004后,在已设置的SyncML客户端内的编号与服务器内的编号的对应关系列表获取该更新的待同步数据在服务器本地的编号,如200001,在本地已设置的Index Table中将该待同步数据在本地的编号所对应的条目所属父目录更改为接收到的同步命令中的父目录,即将该表中的200001所对应的父目录由1005改为1004。When the server receives the synchronization command to move the M1 data item, the Meta field in the received synchronization command determines the type of the data to be synchronized as Item, the LUID field determines that the number of the data to be synchronized on the client is 2001, and the SourceParent field determines After its parent directory after the move is 1004, obtain the local serial number of the updated data to be synchronized in the local server, such as 200001, which has been set locally. In the Index Table, change the parent directory of the entry corresponding to the local number of the data to be synchronized to the parent directory in the received synchronization command, that is, change the parent directory corresponding to 200001 in the table from 1005 to 1004.
可见,采用本发明的方法进行移动的同步操作时,仅需修改相应数据表中的对应关系,不需要对实际数据进行移动,从而最大限度节省了有限的资源。It can be seen that when the method of the present invention is used to perform the synchronization operation of movement, only the corresponding relationship in the corresponding data table needs to be modified, and the actual data does not need to be moved, thereby saving limited resources to the greatest extent.
另外需要说明一点:在移动某个目录及其下的子目录和数据项目时,比如移动mp3目录项时,只需针对mp3目录项只发送一条MOVE命令,而不需再针对mp3目录下的子目录和数据项目发送MOVE命令,因为其下的子目录和数据项目所属的父目录是未发生任何变化的。Another point needs to be explained: when moving a directory and its subdirectories and data items, such as when moving an mp3 directory item, you only need to send a MOVE command for the mp3 directory item, instead of targeting the subdirectories under the mp3 directory. Directories and data items send the MOVE command, because the parent directory to which the subdirectories and data items belong to has not changed.
实施例四:用户删除了“bless”目录下的“D1”数据项目,对“SpringFestival”目录下的数据“U2”选择了永久删除,“D3”选择了非永久删除。本例中,仅是对删除数据项目的描述。Embodiment 4: The user deletes the "D1" data item under the "bless" directory, chooses to permanently delete the data "U2" under the "SpringFestival" directory, and selects non-permanent deletion for "D3". In this example, it is only a description of the deleted data item.
参见图6a和图6b,图6a所示为应用本发明实施例四的用户定义的数据结构示意图,其中,方框表示Folder,圆圈表示data Item;实线表示的状态为Existing,点线表示的状态为Delete。图6b所示为应用本发明实施例四的客户端的数据存储示意图。在客户端保存有数据条目表Data Item Table、目录表Folder Table和“数据条目-目录”对应关系索引表Index Table。各个列表中数据的状态在图6b都有相应的反映。Referring to Figure 6a and Figure 6b, Figure 6a shows a schematic diagram of a user-defined data structure applying Embodiment 4 of the present invention, wherein, the box represents Folder, and the circle represents data Item; the state represented by the solid line is Existing, and the state represented by the dotted line Status is Delete. FIG. 6b is a schematic diagram of data storage of a client applying Embodiment 4 of the present invention. The data item table Data Item Table, the directory table Folder Table and the "data item-directory" corresponding relationship index table Index Table are saved on the client side. The status of the data in each list is reflected in Figure 6b.
当用户要求同步“bless”目录时,客户端顺序生成以下同步命令:When a user asks to sync the "bless" directory, the client generates the following sync commands sequentially:
客户端确定bless目录下数据项目状态,由于在Index Table中,数据项目为2001的状态为永久删除P-D,因此,构建删除Delete同步命令,该所构建的Delete同步命令中的Meta字段指明数据类型为数据项目Item,LUID字段指明待同步数据的编号为2001,并且在该命令中还需包括指明永久删除的标识。The client determines the status of the data item in the bless directory. Since the status of the data item in the Index Table is 2001, it is permanently deleted P-D. Therefore, the delete synchronization command is constructed. The Meta field in the constructed Delete synchronization command indicates that the data type is In the data item Item, the LUID field indicates that the serial number of the data to be synchronized is 2001, and the command also needs to include an identifier indicating permanent deletion.
之后,当客户端确定bless目录下没有删除的数据项目后,索引该bless目录下子目录的状态,本例中,该bless目录下子目录的状态未发生变化,不做处理。Afterwards, when the client determines that there is no deleted data item in the bless directory, it will index the status of the subdirectories under the bless directory. In this example, the status of the subdirectories under the bless directory has not changed and will not be processed.
当客户端确定bless目录下没有删除的子目录后,再确定子目录SpringFestival下的数据项目的状态,其具体方法与确定D1的方法相同。即其最终的结果是构建两条Delete同步命令,其中一条Delete同步命令中的Meta字段指明数据类型为数据项目Item,LUID字段指明待同步数据的编号为2002,并且在该命令中还需包括指明永久删除的标识。另一条Delete同步命令中的Meta字段指明数据类型为数据项目Item,LUID字段指明待同步数据的编号为2003,并且在该命令中还需包括指明非永久删除的标识。After the client confirms that there are no deleted subdirectories under the bless directory, it then determines the status of the data items under the subdirectory SpringFestival. The specific method is the same as the method for determining D1. That is, the final result is to construct two Delete synchronization commands. The Meta field in one of the Delete synchronization commands indicates that the data type is the data item Item, and the LUID field indicates that the number of the data to be synchronized is 2002, and the command also needs to include the specified Identifier for permanent deletion. The Meta field in another Delete synchronization command indicates that the data type is a data item, the LUID field indicates that the serial number of the data to be synchronized is 2003, and the command also needs to include an identifier indicating non-permanent deletion.
所构建的Delete命令中,不需要包含要删除的数据,只需指明要删除数据的类型、编号、以及是永久删除还是非永久删除即可。以上是Delete命令的一种实现方式,即该命令中包含类型、编号、以及是永久删除还是非永久删除三种信息;当然,还可以有其他的实现方式,比如,将Delete分为两种命令,一种永久删除P-Delete命令,另一种是非永久删除NP-Delete命令,这样,每种删除命令中只需包含待删除数据的类型、编号即可。The constructed Delete command does not need to include the data to be deleted, but only needs to indicate the type, number, and whether to delete permanently or non-permanently. The above is an implementation of the Delete command, that is, the command contains three types of information: type, number, and whether it is permanently deleted or not permanently deleted; of course, there are other implementations, for example, the Delete is divided into two commands , a P-Delete command for permanent deletion, and an NP-Delete command for non-permanent deletion. In this way, each type of deletion command only needs to include the type and number of the data to be deleted.
之后,将所构造的用于指示删除的同步命令全部发送给服务器。Afterwards, all the constructed synchronization commands for instructing deletion are sent to the server.
下面说明服务器端接收到上述Delete命令后,执行同步操作的过程。The following describes the process of performing a synchronization operation after the server receives the above-mentioned Delete command.
当服务器端接收到删除D1数据项目的同步命令后,通过接收到的同步命令中的Meta字段确定待同步数据的类型为数据项目Item,根据LUID字段确定该待同步数据在客户端的编号为2001,并确定此次删除为永久删除,之后,在已设置的SyncML客户端内的编号与服务器内的编号的对应关系列表中获取该待删除数据在服务器本地的编号,如200001,在本地的数据条目表和数据条目-目录对应关系表,分别删除待同步数据在本地的编号所对应的条目,即删除编号为200001的整个条目。同时,在本地数据库中删除D1数据。When the server side receives the synchronization command to delete the D1 data item, it determines the type of the data to be synchronized as the data item Item through the Meta field in the received synchronization command, and determines the serial number of the data to be synchronized on the client side as 2001 according to the LUID field. And confirm that this deletion is a permanent deletion, after that, obtain the local number of the data to be deleted in the server local number, such as 200001, in the local data entry Table and data entry-directory correspondence table, respectively delete the entry corresponding to the local number of the data to be synchronized, that is, delete the entire entry with the number 200001. At the same time, delete the D1 data in the local database.
当服务器端接收到删除D2数据项目的同步命令后,即删除相应数据表中的整个条目,其删除D2的方法与删除D1的方法相同,在此不再赘述。When the server side receives the synchronization command to delete the data item of D2, it deletes the entire entry in the corresponding data table. The method of deleting D2 is the same as the method of deleting D1, and will not be repeated here.
当服务器端接收到删除D3数据项目的同步命令后,通过接收到的同步命令中的Meta字段确定待同步数据的类型为数据项目Item,根据LUID字段确定该待同步数据在客户端的编号为2003,并确定此次删除为非永久删除,之后,在已设置的SyncML客户端内的编号与服务器内的编号的对应关系列表中获取该待删除数据在服务器本地的编号,如200003,只在本地的数据条目-目录对应关系表中删除待同步数据在本地的编号所对应的条目,即删除该表中编号为200003的整个条目。在本地数据库内不删除D3数据。When the server side receives the synchronization command to delete the D3 data item, the Meta field in the received synchronization command determines that the type of the data to be synchronized is the data item Item, and the serial number of the data to be synchronized on the client side is determined to be 2003 according to the LUID field. And confirm that this deletion is non-permanent deletion, after that, obtain the local number of the data to be deleted in the server local number in the corresponding list of the number in the SyncML client and the number in the server that has been set, such as 200003, only in the local Delete the entry corresponding to the local number of the data to be synchronized in the data entry-directory correspondence table, that is, delete the entire entry numbered 200003 in the table. D3 data is not deleted in the local database.
可见,采用本发明的方法进行删除的同步操作时,仅需在客户端与服务器端之间传递标识,不需要传输具体的数据内容,最大限度节省了有限的资源。It can be seen that when the method of the present invention is used to perform the synchronization operation of deletion, only the identifier needs to be transferred between the client and the server, and no specific data content needs to be transmitted, which saves limited resources to the greatest extent.
实施例五:用户删除了整个“bless”目录。这相当于同时删除了其下的所有子目录以及其下的所有数据项目。本例中,D1和D2仅存在于bless目录下,D3存在于bless和joke目录下,且本例仅是对删除目录项的描述。Embodiment 5: The user deletes the entire "bless" directory. This is equivalent to deleting all subdirectories under it and all data items under it at the same time. In this example, D1 and D2 exist only in the bless directory, and D3 exists in the bless and joke directories, and this example is only a description of deleting directory items.
参见图7a和图7b,图7a所示为应用本发明实施例五的用户定义的数据结构示意图,其中,方框表示Folder,圆圈表示data Item;实线表示的状态为Existing,点线表示的状态为Delete。图7b所示为应用本发明实施例五的客户端的数据存储示意图。在客户端保存有数据条目表Data Item Table、目录表Folder Table和“数据条目-目录”对应关系索引表Index Table。各个列表中数据的状态在图7b都有相应的反映。Referring to Fig. 7a and Fig. 7b, Fig. 7a shows a schematic diagram of a user-defined data structure applying Embodiment 5 of the present invention, wherein, a square box represents a Folder, and a circle represents a data Item; the state represented by a solid line is Existing, and the state represented by a dotted line Status is Delete. Fig. 7b is a schematic diagram of data storage of a client applying Embodiment 5 of the present invention. The data item table Data Item Table, the directory table Folder Table and the "data item-directory" corresponding relationship index table Index Table are saved on the client side. The status of the data in each list is reflected in Figure 7b.
当用户要求同步根目录时,客户端顺序生成以下同步命令:When the user requests to synchronize the root directory, the client generates the following synchronization commands in sequence:
首先,客户端根据接收到的来自用户的同步根目录的命令后,索引该根目录下的所有子目录的状态,本例中,从Folder Table表中确定bless的状态为D,则客户端还要进一步包括:判断该待删除目录下的数据项目以及该目录的子目录下的数据项目是否仅存在于该待删除目录下,如果是,则构建一条删除命令,且该删除命令中包含指示永久删除的信息;否则,针对每个数据项目和目录项分别构建一条删除命令,且仅存在于该待删除目录下的数据项目或目录项所对应的删除命令中包含指示永久删除的信息,并非仅存在于该待删除目录下的数据项目或目录项所对应的删除命令中包含指示非永久删除的信息。也就是说,如果某个数据项目或目录项,还存在于其他目录下(这里的其他目录不包括bless子目录),则将这样的数据所对应的删除命令中包含非永久删除信息,如果不是这样的数据,则其所对应的删除命令中包含永久删除信息。之后,将所构建的所有删除Delete同步命令均发送给服务器。这里,针对每个数据项目和目录项分别构建一条删除命令,实际就是一种递归的同步。First, the client indexes the status of all subdirectories under the root directory according to the command received from the user to synchronize the root directory. In this example, if the status of bless is determined to be D from the Folder Table, the client also It should further include: judging whether the data items in the directory to be deleted and the data items in the subdirectories of the directory only exist in the directory to be deleted, if so, constructing a delete command, and the delete command contains instructions to permanently information to be deleted; otherwise, construct a delete command for each data item and directory item, and only the data item or directory item corresponding to the directory to be deleted contains information indicating permanent deletion, not only The delete command corresponding to the data item or directory item existing in the directory to be deleted includes information indicating non-permanent deletion. That is to say, if a data item or directory item still exists in other directories (the other directories here do not include the bless subdirectory), the delete command corresponding to such data will include non-permanent deletion information, if not For such data, the corresponding deletion command includes permanent deletion information. Afterwards, all the constructed delete synchronization commands are sent to the server. Here, constructing a delete command for each data item and directory item is actually a recursive synchronization.
下面说明服务器端接收到上述Delete命令后,执行同步操作的过程。The following describes the process of performing a synchronization operation after the server receives the above-mentioned Delete command.
如果服务器接收到的是针对数据项目的删除命令,则与实施例四中所述的处理方式相同,不再赘述。If the server receives a delete command for a data item, the processing method is the same as that described in Embodiment 4 and will not be repeated here.
如果服务器接收到的是针对目录项的删除命令,则在已设置的SyncML客户端内的编号与服务器内的编号的对应关系列表中获取该待删除数据在服务器本地的编号,而无论是永久删除还是非永久删除都在本地已设置的目录表中删除待同步数据在本地的编号所对应的条目。If the server receives a delete command for a directory item, it will obtain the local number of the data to be deleted in the server's local number from the set correspondence list between the number in the SyncML client and the number in the server, regardless of whether it is permanently deleted Whether it is a non-permanent deletion or not, the entry corresponding to the local number of the data to be synchronized is deleted in the locally set directory table.
对于目录删除操作还有一点需要说明:作为请求发起方的客户端,在删除某个目录项时,如删除bless目录项,其可以针对该目录项只构建一条删除命令,而其所执行的其他操作,如“判断该待删除目录下的数据项目以及该目录的子目录下的数据项目是否仅存在于该待删除目录下”等,均由服务器端来执行,这样可以简化客户端的操作。当然,反之也适用。There is one more thing to explain about the directory deletion operation: as the request initiator, when deleting a certain directory item, such as deleting a bless directory item, it can only construct a delete command for this directory item, while the other commands it executes Operations, such as "judging whether the data items in the directory to be deleted and the data items in the subdirectories of the directory only exist in the directory to be deleted", etc., are all performed by the server, which can simplify the operation of the client. Of course, the reverse also applies.
在实际应用中,实施例四、五通常会结合起来同时使用。In practical applications, Embodiments 4 and 5 are usually combined and used simultaneously.
另外,对于删除操作,在服务器端完成同步操作后,客户端也会将自身相应数据表中的条目删除。In addition, for the deletion operation, after the synchronization operation is completed on the server side, the client terminal will also delete the entries in its own corresponding data table.
实施例六:用户将“music”目录下的数据项目“M1”复制到“favoriate”目录下;将“mp3”目录复制到“favorite”目录下。Embodiment 6: The user copies the data item "M1" under the "music" directory to the "favoriate" directory; copies the "mp3" directory to the "favorite" directory.
参见图8a和图8b,图8a所示为应用本发明实施例六的用户定义的数据结构示意图,其中,方框表示Folder,圆圈表示data Item;实线表示的状态为Existing,粗实线表示的状态为Copy。图8b所示为应用本发明实施例六的客户端的数据存储示意图。在客户端保存有数据条目表Data Item Table、目录表Folder Table和“数据条目-目录”对应关系索引表Index Table。各个列表所增加数据的状态在图3b都有相应的反映。Referring to Figure 8a and Figure 8b, Figure 8a shows a schematic diagram of a user-defined data structure applying Embodiment 6 of the present invention, wherein, a box represents a Folder, and a circle represents a data Item; the state represented by a solid line is Existing, and the thick solid line represents The status is Copy. FIG. 8b is a schematic diagram of data storage of a client applying Embodiment 6 of the present invention. The data item table Data Item Table, the directory table Folder Table and the "data item-directory" corresponding relationship index table Index Table are saved on the client side. The states of the added data in each list are correspondingly reflected in Fig. 3b.
当用户要求同步根目录时,客户端与服务器端的操作与实施例一的操作基本一致。所不同之处在于,在实施例一中,客户端要针对每一个数据项目和目录项都发送一次ADD命令,而在本例中,如果客户端对一目录项发出Copy命令,则不需对该目录项下的子目录项和数据项目再发命令,从而进一步减少数据量的传输,节约网络资源。而本例中服务器端的处理过程与实施例一中的处理过程是相同的,其也是针对每一个目录项和数据项目逐一地进行处理。When the user requests to synchronize the root directory, the operations of the client and the server are basically the same as those in Embodiment 1. The difference is that, in Embodiment 1, the client sends an ADD command for each data item and directory entry, but in this example, if the client sends a Copy command to a directory entry, it is not necessary to The subdirectory items and data items under the directory item will issue commands again, thereby further reducing the transmission of data volume and saving network resources. However, the processing procedure at the server side in this example is the same as that in Embodiment 1, and it also processes each directory item and data item one by one.
再有,在执行Copy同步时,用户可根据需要决定,是否在再指令复制一份实际数据,如果是,则执行同步操作的一端实现数据同步的操作进一步包括:在本地数据库内在复制一份数据,并在本地已设置的数据目录表中增加相应条目。Furthermore, when performing Copy synchronization, the user can decide according to needs whether to instruct to copy a copy of the actual data, and if so, the operation of realizing data synchronization at the end of the synchronization operation further includes: copying a copy of data in the local database , and add corresponding entries in the locally set data directory table.
如果客户端和服务器端的修改操作存在冲突,如在被移动的目录中增加、更新或者删除了一些条目,通过扩展现有的冲突机制,确保客户端和服务器端的数据完全同步。具体实现为:将现有的以客户端为主(Client-Win)和以服务器端为主(Server-Win)的仲裁结果加以扩展,增加一种以服务器端和客户端合并处理(Win-Win)的仲裁结果,通过双赢的方式来确保客户端和服务器端的数据完全一致。If there is a conflict between the modification operations of the client and the server, such as adding, updating or deleting some entries in the moved directory, the existing conflict mechanism is extended to ensure that the data on the client and server are fully synchronized. The specific implementation is: to extend the existing arbitration results based on client-side (Client-Win) and server-side (Server-Win), and add a combination of server-side and client-side (Win-Win ), through a win-win approach to ensure that the data on the client and server are completely consistent.
例如,用户在客户端上移动A目录使其成为B目录的子目录,而服务器端是在A目录中增加了一个条目,此时,在服务器端将移动A目录使其成为B目录的子目录,并且,在客户端在A目录中也增加一个条目,从而确保客户端和服务器端的数据完全一致。For example, if the user moves directory A on the client to make it a subdirectory of directory B, and the server adds an entry to directory A, at this time, directory A will be moved on the server to become a subdirectory of directory B , and also add an entry in the A directory on the client side, so as to ensure that the data on the client side and the server side are completely consistent.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of the present invention. within the scope of protection.
Claims (19)
Priority Applications (8)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 200510116802 CN1794724A (en) | 2005-10-27 | 2005-10-27 | Method of realizing data synchronization on SyncML layer |
| CN2006101095911A CN1956452B (en) | 2005-10-27 | 2006-08-14 | Method, system, user terminal and server for implementing data synchronization |
| ES06805092.1T ES2458303T3 (en) | 2005-10-27 | 2006-10-27 | Method, system, client terminal and server to perform data synchronization |
| CN200680011960.1A CN101160903B (en) | 2005-10-27 | 2006-10-27 | Method, system, client terminal and server for implementing data synchronization |
| JP2008536915A JP5294867B2 (en) | 2005-10-27 | 2006-10-27 | Method, system, client and server for performing data synchronization |
| PCT/CN2006/002887 WO2007048354A1 (en) | 2005-10-27 | 2006-10-27 | Method, system, client terminal and server for realizing data synchronization |
| EP06805092.1A EP1845688B1 (en) | 2005-10-27 | 2006-10-27 | Method, system, client terminal and server for realizing data synchronization |
| US11/848,111 US8015319B2 (en) | 2005-10-27 | 2007-08-30 | Method, system, client and server for implementing data sync |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 200510116802 CN1794724A (en) | 2005-10-27 | 2005-10-27 | Method of realizing data synchronization on SyncML layer |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN1794724A true CN1794724A (en) | 2006-06-28 |
Family
ID=36805991
Family Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN 200510116802 Pending CN1794724A (en) | 2005-10-27 | 2005-10-27 | Method of realizing data synchronization on SyncML layer |
| CN200680011960.1A Active CN101160903B (en) | 2005-10-27 | 2006-10-27 | Method, system, client terminal and server for implementing data synchronization |
Family Applications After (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN200680011960.1A Active CN101160903B (en) | 2005-10-27 | 2006-10-27 | Method, system, client terminal and server for implementing data synchronization |
Country Status (1)
| Country | Link |
|---|---|
| CN (2) | CN1794724A (en) |
Cited By (19)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2009076812A1 (en) * | 2007-12-12 | 2009-06-25 | Huawei Technologies Co., Ltd. | Method and device for realizing data synchronization |
| WO2009152708A1 (en) * | 2008-06-16 | 2009-12-23 | 华为技术有限公司 | Data soft deletion, recovery and synchronization method, terminal and system thereof |
| WO2010025677A1 (en) * | 2008-09-04 | 2010-03-11 | 华为技术有限公司 | Method, device and system for executing synchronization |
| CN101155018B (en) * | 2006-09-28 | 2010-11-03 | 华为技术有限公司 | A data synchronization method and its realization device and realization system |
| CN101923571A (en) * | 2010-07-29 | 2010-12-22 | 中兴通讯股份有限公司 | Method and device for managing terminal data records |
| CN101997829A (en) * | 2009-08-18 | 2011-03-30 | 华为终端有限公司 | Method and equipment for synchronizing hierarchical data |
| CN102291453A (en) * | 2011-08-09 | 2011-12-21 | 中兴通讯股份有限公司 | Data synchronization method and device |
| CN101610225B (en) * | 2008-06-20 | 2012-01-25 | 华为技术有限公司 | A method, system and device for synchronous processing |
| CN101102311B (en) * | 2006-07-08 | 2012-04-04 | 华为技术有限公司 | A method, client and system for negotiating data synchronization mechanism |
| CN101231656B (en) * | 2007-01-26 | 2012-05-23 | 国际商业机器公司 | Method and device for determining whether allowing specified modification in a configurable managed environment |
| CN101681320B (en) * | 2007-06-05 | 2012-06-27 | 三星电子株式会社 | Synchronizing content between content directory service and control point |
| CN102594874A (en) * | 2008-06-20 | 2012-07-18 | 华为技术有限公司 | Synchronization processing method and device |
| CN101552773B (en) * | 2008-04-03 | 2012-08-22 | 华为技术有限公司 | Method, equipment and system for processing data item identifier mapping in data synchronization |
| CN101707785B (en) * | 2009-10-31 | 2013-01-09 | 青岛海信移动通信技术股份有限公司 | Data synchronization method for mobile communication terminal |
| CN103220172A (en) * | 2013-04-08 | 2013-07-24 | 杭州华三通信技术有限公司 | Device and method based on LDAP (lightweight directory access protocol) user authorization management |
| CN103500129A (en) * | 2013-10-16 | 2014-01-08 | 华为技术有限公司 | Back-up object sending and back-up method, production end, backup-for-disaster-recovery end and system |
| CN104639613A (en) * | 2015-01-06 | 2015-05-20 | 中国农业大学 | Realizing method for mobile data synchronization middleware based on improved network protocol |
| WO2017076321A1 (en) * | 2015-11-05 | 2017-05-11 | 中兴通讯股份有限公司 | Database synchronization method and system, source data and target data synchronization device |
| CN107948220B (en) * | 2016-10-12 | 2021-01-08 | 百度在线网络技术(北京)有限公司 | Method and device for synchronizing address book cloud service |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105988997B (en) * | 2015-01-27 | 2019-11-26 | 珠海金山办公软件有限公司 | A kind of method of data synchronization and device based on hierarchy |
| CN106913465A (en) * | 2017-01-26 | 2017-07-04 | 杭州翼心信息科技有限公司 | Medication monitoring management method and device |
| CN108255434B (en) * | 2018-01-15 | 2021-11-02 | 腾讯科技(深圳)有限公司 | Label management method, management device and computer readable storage medium |
| CN112148793B (en) * | 2020-09-17 | 2024-02-20 | 广东睿住智能科技有限公司 | Data synchronization method, system and storage medium |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| FI114417B (en) * | 2001-06-15 | 2004-10-15 | Nokia Corp | Select data for synchronization |
| US6721871B2 (en) * | 2002-04-02 | 2004-04-13 | Nokia Corporation | Method and apparatus for synchronizing data stores with respect to changes in folders |
| DE60224849T2 (en) * | 2002-04-30 | 2009-01-22 | Nokia Corp. | METHOD AND DEVICE FOR MANAGING TREE DATA EXCHANGE |
-
2005
- 2005-10-27 CN CN 200510116802 patent/CN1794724A/en active Pending
-
2006
- 2006-10-27 CN CN200680011960.1A patent/CN101160903B/en active Active
Cited By (26)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101102311B (en) * | 2006-07-08 | 2012-04-04 | 华为技术有限公司 | A method, client and system for negotiating data synchronization mechanism |
| CN101155018B (en) * | 2006-09-28 | 2010-11-03 | 华为技术有限公司 | A data synchronization method and its realization device and realization system |
| CN101231656B (en) * | 2007-01-26 | 2012-05-23 | 国际商业机器公司 | Method and device for determining whether allowing specified modification in a configurable managed environment |
| CN101681320B (en) * | 2007-06-05 | 2012-06-27 | 三星电子株式会社 | Synchronizing content between content directory service and control point |
| WO2009076812A1 (en) * | 2007-12-12 | 2009-06-25 | Huawei Technologies Co., Ltd. | Method and device for realizing data synchronization |
| CN101552773B (en) * | 2008-04-03 | 2012-08-22 | 华为技术有限公司 | Method, equipment and system for processing data item identifier mapping in data synchronization |
| WO2009152708A1 (en) * | 2008-06-16 | 2009-12-23 | 华为技术有限公司 | Data soft deletion, recovery and synchronization method, terminal and system thereof |
| CN102594874B (en) * | 2008-06-20 | 2014-12-17 | 华为技术有限公司 | Synchronization processing method and device |
| CN101610225B (en) * | 2008-06-20 | 2012-01-25 | 华为技术有限公司 | A method, system and device for synchronous processing |
| CN102594874A (en) * | 2008-06-20 | 2012-07-18 | 华为技术有限公司 | Synchronization processing method and device |
| WO2010025677A1 (en) * | 2008-09-04 | 2010-03-11 | 华为技术有限公司 | Method, device and system for executing synchronization |
| CN101572599B (en) * | 2008-09-04 | 2011-12-21 | 华为技术有限公司 | Method, device and system for timing execution of synchronization |
| CN101997829A (en) * | 2009-08-18 | 2011-03-30 | 华为终端有限公司 | Method and equipment for synchronizing hierarchical data |
| CN101707785B (en) * | 2009-10-31 | 2013-01-09 | 青岛海信移动通信技术股份有限公司 | Data synchronization method for mobile communication terminal |
| CN101923571A (en) * | 2010-07-29 | 2010-12-22 | 中兴通讯股份有限公司 | Method and device for managing terminal data records |
| CN101923571B (en) * | 2010-07-29 | 2013-05-01 | 中兴通讯股份有限公司 | Method and device for managing terminal data logging |
| CN102291453B (en) * | 2011-08-09 | 2017-04-26 | 中兴通讯股份有限公司 | Data synchronization method and device |
| CN102291453A (en) * | 2011-08-09 | 2011-12-21 | 中兴通讯股份有限公司 | Data synchronization method and device |
| CN103220172A (en) * | 2013-04-08 | 2013-07-24 | 杭州华三通信技术有限公司 | Device and method based on LDAP (lightweight directory access protocol) user authorization management |
| CN103500129A (en) * | 2013-10-16 | 2014-01-08 | 华为技术有限公司 | Back-up object sending and back-up method, production end, backup-for-disaster-recovery end and system |
| CN103500129B (en) * | 2013-10-16 | 2017-08-11 | 华为技术有限公司 | A kind of transmission of backup object, backup method, the manufacturing side, the standby end of calamity and system |
| CN104639613A (en) * | 2015-01-06 | 2015-05-20 | 中国农业大学 | Realizing method for mobile data synchronization middleware based on improved network protocol |
| CN104639613B (en) * | 2015-01-06 | 2017-10-24 | 中国农业大学 | Implementation method based on the mobile data synchronization middleware for improving procotol |
| WO2017076321A1 (en) * | 2015-11-05 | 2017-05-11 | 中兴通讯股份有限公司 | Database synchronization method and system, source data and target data synchronization device |
| CN106682002A (en) * | 2015-11-05 | 2017-05-17 | 中兴通讯股份有限公司 | Database synchronization method and system, source data and target data synchronization device |
| CN107948220B (en) * | 2016-10-12 | 2021-01-08 | 百度在线网络技术(北京)有限公司 | Method and device for synchronizing address book cloud service |
Also Published As
| Publication number | Publication date |
|---|---|
| CN101160903A (en) | 2008-04-09 |
| CN101160903B (en) | 2013-03-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN1794724A (en) | Method of realizing data synchronization on SyncML layer | |
| CN1956452A (en) | Method, system, user terminal and server for implementing data synchronous | |
| CN1215415C (en) | File management method and stored information recording and playback device | |
| CN1892650A (en) | Document management server, system and method, and clients and nodes of the system | |
| CN1625865A (en) | Method and equipment for management of tree data exchange | |
| CN1695139A (en) | Method and device for defining objects to allow establishment of a device management tree for mobile communication devices | |
| CN1705946A (en) | Method and system for synchronizing identity information | |
| CN1549981A (en) | Method and apparatus for improved document management | |
| CN1701326A (en) | Collaborative email | |
| CN1606300A (en) | Image distribution for dynamic server pages | |
| CN1713177A (en) | File Sharing System and Client Devices | |
| CN1613240A (en) | Network-based software extensions | |
| CN1754166A (en) | Navigation of the Dossier Content Space | |
| CN1224200A (en) | Data communication device and method | |
| CN1852137A (en) | Method for realizing synchronization of client end data and server end data | |
| CN1745370A (en) | Information processing device, content management method, content information management method, and computer program | |
| CN1301475C (en) | Active data replication method for wireless devices | |
| CN1374587A (en) | Information management arrangement for obtaining data bank matching and medium for recording the same bank program | |
| CN1873673A (en) | Managing digital documents in a computer system | |
| CN1839413A (en) | Creating volume images | |
| CN1277210C (en) | Method of document synchronization | |
| CN1859379A (en) | Method and system for managing expandable mark language file | |
| CN1545048A (en) | A Method for Storage and Access of Tree Realized by Two-Dimensional Table | |
| CN1215414C (en) | File management method and content recording/playback device | |
| CN1684059A (en) | Editing method and device for multimedia information files |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
| WD01 | Invention patent application deemed withdrawn after publication |