WO2011150765A1 - Synchronization method of contacts information - Google Patents
Synchronization method of contacts information Download PDFInfo
- Publication number
- WO2011150765A1 WO2011150765A1 PCT/CN2011/074747 CN2011074747W WO2011150765A1 WO 2011150765 A1 WO2011150765 A1 WO 2011150765A1 CN 2011074747 W CN2011074747 W CN 2011074747W WO 2011150765 A1 WO2011150765 A1 WO 2011150765A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- contact
- information
- terminal
- server
- group
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W99/00—Subject matter not provided for in other groups of this subclass
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
- H04L67/306—User profiles
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/26—Devices for calling a subscriber
- H04M1/27—Devices whereby a plurality of signals may be stored simultaneously
- H04M1/274—Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc
- H04M1/2745—Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc using static electronic memories, e.g. chips
- H04M1/2753—Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc using static electronic memories, e.g. chips providing data content
- H04M1/2757—Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc using static electronic memories, e.g. chips providing data content by data transmission, e.g. downloading
Definitions
- the personal information of the contact can be stored in the terminal.
- the terminal may upload the personal information of the contact stored by the terminal to the server, so that the server stores the personal information of the contact, thereby making the server The user can download the personal information of the contact stored by the server from the server through another terminal.
- the existing terminal or server may further store the group information of the contact according to the setting of the user, and store the personal information of the contact in groups.
- the terminal cannot upload the group information of the contact stored by the terminal to the server, and cannot download the group information of the contact stored by the server from the server, thereby failing to accurately synchronize the contact information between the terminal and the server, thereby reducing the contact.
- Embodiments of the present invention provide a method for synchronizing contact information, which is used to implement a terminal and a server. Accurate synchronization of contact information between contacts, improving the accuracy of contact information synchronization.
- the embodiment of the invention provides a method for synchronizing contact information, including:
- the terminal and the server synchronize the personal information of the contact
- An embodiment of the present invention provides another method for synchronizing contact information, including:
- the terminal and the server synchronize the personal information of the contact
- the terminal stores the stored personal information of the contact according to the grouping information of the contact.
- the embodiment of the invention provides another method for synchronizing contact information, including:
- the terminal and the server synchronize the personal information of the contact
- the server sends, by the terminal, an add command based on an Open Mobile Alliance data synchronization protocol to the server, where the add command includes packet information of a contact, so that the server stores the location according to the grouping information of the contact The personal information of the contact is stored in a group; or the server sends an add command based on the Open Mobile Alliance data synchronization protocol to the terminal, where the add command includes group information of the contact, so that the terminal according to the The grouping information of the contact is stored, and the stored personal information of the contact is stored in groups.
- the embodiment of the present invention sends a connection to the server through the terminal.
- the packet of the grouping information of the person uploads the request message, so that the server can store the personal information of the stored contact according to the grouping information of the contact, thereby realizing the synchronization of the grouping information of the contact of the terminal to the server, thereby
- the terminal-to-server contact information personal information of the contact and the grouping information of the contact
- the terminal-to-server contact information can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved; or the grouping of the grouping information including the contact from the server is received by the terminal.
- the terminal can store the personal information of the stored contact according to the grouping information of the contact, and realize the synchronization of the packet information of the server-to-terminal contact, thereby making the server-to-terminal contact
- the person information personal information of the contact person and the grouping information of the contact person
- the terminal sends an increase command including the grouping information of the contact to the server, thereby enabling the server to
- the grouping information of the contact storing the personal information of the stored contact in groups, realizing the synchronization of the grouping information of the terminal-to-server contact, thereby making the terminal-to-server contact information (contact person's personal information and contact)
- the grouping information of the person can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved; or the server sends an increase command including the grouping information of the contact to the terminal, so that the terminal can store the information according to the grouping information of the
- the personal information of the contact is stored in a group, and the grouping information of the contact of the server to the terminal is synchronized, so that the contact information of the server to the terminal (the personal information of the contact and the grouping information of the contact) can be accurately synchronized and improved.
- the opposite end can Said personal information storage identification information and said contact members to the group name with the group corresponding to the above-described contacts are established, the terminal to achieve
- the server or server-to-terminal contact information contact's personal information and contact grouping information
- FIG. 1 is a schematic flow chart of a method for synchronizing contact information according to Embodiment 1 of the present invention
- FIG. 2 is a schematic flow chart of a method for synchronizing contact information according to Embodiment 2 of the present invention
- FIG. 3 is a schematic flowchart of another method for synchronizing contact information according to Embodiment 3 of the present invention.
- FIG. 4 is a schematic flowchart of another method for synchronizing contact information according to Embodiment 4 of the present invention.
- FIG. 5 is a schematic flowchart of still another method for synchronizing contact information according to Embodiment 5 of the present invention.
- FIG. 6 is a schematic flowchart of still another method for synchronizing contact information according to Embodiment 6 of the present invention.
- FIG. 7 is a schematic structural diagram of a terminal according to Embodiment 7 of the present invention.
- FIG. 8 is a schematic structural diagram of a server according to Embodiment 8 of the present invention
- FIG. 9 is a schematic structural diagram of another terminal according to Embodiment 9 of the present invention
- FIG. 8 is a schematic structural diagram of a server according to Embodiment 8 of the present invention
- FIG. 9 is a schematic structural diagram of another terminal according to Embodiment 9 of the present invention
- FIG. 8 is a schematic structural diagram of a server according to Embodiment 8 of the present invention
- FIG. 9 is a schematic structural diagram of another terminal according to Embodiment 9 of the present invention
- FIG. 10 is a schematic structural diagram of another server according to Embodiment 10 of the present invention.
- FIG. 1 is a schematic structural diagram of still another terminal according to Embodiment 11 of the present invention.
- FIG. 12 is a schematic structural diagram of still another server according to Embodiment 12 of the present invention
- FIG. 13 is a schematic structural diagram of still another terminal according to Embodiment 13 of the present invention
- FIG. 14 is a schematic structural diagram of still another server according to Embodiment 14 of the present invention
- FIG. 15 is a schematic structural diagram of still another terminal according to Embodiment 15 of the present invention
- FIG. 16 is a schematic structural diagram of a server according to Embodiment 16 of the present invention
- FIG. 17 is a schematic structural diagram of a terminal according to Embodiment 17 of the present invention
- FIG. 18 is a schematic structural diagram of still another server according to Embodiment 18 of the present invention. detailed description
- FIG. 1 is a schematic flowchart of a method for synchronizing contact information according to Embodiment 1 of the present invention. This embodiment is applicable to a scenario in which a terminal-to-server one-way synchronization is performed. As shown in FIG. 1, the method for synchronizing contact information in this embodiment may include the following steps:
- Step 101 The terminal and the server synchronize the personal information of the contact;
- the terminal and the server can synchronize the personal information of the contact, and refer to the terminal in the prior art.
- Step 102 The terminal sends a packet upload request message to the server, where the packet upload request message includes packet information of the contact, so that the server stores the personal information of the contact according to the group information of the contact. Perform group storage.
- the grouping information of the contact may include a group name and member identification information corresponding to the group name.
- the member identification information may be a Locally Unique Identifier (LUID) of the terminal.
- the terminal sends a packet upload request message including the grouping information of the contact to the server, so that the server can store the personal information of the stored contact according to the grouping information of the contact, and implement the terminal.
- the synchronization of the grouping information of the contacts to the server enables the terminal-to-server contact information (personal information of the contact and the grouping information of the contacts) to be accurately synchronized, improving the accuracy of the synchronization of the contact information.
- FIG. 2 is a schematic flowchart of a method for synchronizing contact information according to Embodiment 2 of the present invention. This embodiment is applicable to a scenario in which a terminal-to-server one-way synchronization is performed. As shown in FIG. 2, the method for synchronizing contact information in this embodiment may include the following steps:
- Step 201 The terminal and the server synchronize the personal information of the contact;
- Step 202 The terminal sends a packet upload request message to the server, where the packet upload request message includes group information of the contact;
- the grouping information of the contact may include a group name and member identification information corresponding to the group name.
- the member identification information may be a Locally Unique Identifier (LUID) of the terminal.
- the hypertext transfer protocol (HTTP) header of the foregoing packet upload request message needs to upload an x-ds-data-type extension field, an x-ds-oper-type extension field, and an x-up- The calling-line-id field, where the value of the x-ds-data-type extension field is grp (contact grouping), for example: x-ds-data-type: grp, x-ds-oper-type extension field
- the value can be up (upload), for example: x-ds-oper-type: up
- the value of the x-up-calling-line-id field is the user name of the terminal ( user id ), for example: x-up -calling-line-id: 139111 1111 1.
- the content of the foregoing packet upload request message can be seen in Table 1.
- Cred Type 1 String Type of authentication type, including MD5 type authentication, SHA-1, SHA-256, and so on.
- Cred Format 1 String Authentication format The format of the authentication information, including b64, binary, and so on.
- Cred Data 1 String Authentication Number The data used for authentication.
- UpDataReq DevID 1 String Terminal Set An IMEI backup identification number information that is filled in as a terminal to uniquely identify an end device.
- UpDataReq DataType 1 String Data class The data type carried by this message.
- Type grp contact grouping
- n UpDataReq Grp One-to-one contact terminal has 0 to more group grouping information locally.
- Grp N 1 String Contact Contact group name not allowed Group name Duplicate.
- Grp M 1 String Contacts A contact can belong to multiple groups.
- LUIDs are separated by ",", for example:
- Step 203 The server performs group storage on the stored personal information of the contact according to the grouping information of the contact.
- the server may further perform authentication on the received packet upload request message, and after the authentication is passed, store the stored personal information of the contact.
- the foregoing authentication process is as follows:
- the terminal sends the packet upload request message, the terminal includes the authentication information in the packet upload request message, where the authentication information may include an authentication format, an authentication type, and authentication data, and the terminal may be based on the terminal.
- the algorithm specified by the user name, password, authentication random number (Nonce), and authentication type (Type field, for example: MD5 authentication)
- generates the specified identification Authentication data Data field, for example: a string
- Form field for example: b64.
- the server may obtain the user name of the terminal in the x-up-calling-line-id field of the HTTP header, and corresponding to the user name of the terminal and the user name stored by the terminal according to the user name of the terminal.
- the password, the authentication random number, and the authentication type (Type field) included in the packet upload request packet, and the authentication data of the specified authentication format (Format field) included in the packet upload request packet is generated, and the server generates the authentication generated by itself.
- the data is compared with the authentication data (Data field) included in the packet upload request message. If the two fields are the same, the authentication succeeds, otherwise the authentication fails.
- the server may indicate the result of this authentication in the packet upload response message returned to the terminal.
- Step 204 The server returns a packet upload response message to the terminal.
- Cred Type String Type of authentication, including MD5 authentication type, SHA-SHA-256, etc.
- Cred Format 1 String The format of the authentication information, including the format b64, binary, etc.
- Cred Data 1 String Authentication Data used for authentication.
- Contact group name # three digit error code 10# three digit error code, where "#,” and ",” are separators. For example, classmate #400, colleague #400.
- the server If the server returns a 420 error code, it indicates that the server has insufficient storage space and the server will end the session. That is, when there is a 420 error code in the response message, the value of the IsSessionEnd tag must be y.
- the terminal may send the following to the server: Packet upload request message:
- the server receives the packet upload request packet, and authenticates the packet upload request packet. After the authentication is passed, the stored personal information of the contact is stored in a packet, and the following packet upload response message is returned to the terminal:
- the terminal may send the following packet upload request message to the server:
- the server receives the packet upload request packet and performs authentication (simplely according to the session identifier included in the packet, which is similar to the prior art, and is not described here). After the authentication is passed, the storage is performed. The personal information of the remaining contacts is stored in a packet, and the following packet upload response message is returned to the terminal:
- authentication authentication information that is, a ⁇ 0 ⁇ 3> field
- the receiver authenticates the sender.
- the two parties only need to send the session identifier, that is, the ⁇ 8688101 10> field, and the receiver can simply authenticate the sender. Because this session is authenticated, subsequent messages from both parties in this session are trustworthy.
- the user or the service provider can also initiate synchronization of the group information of the contact from the server side by logging in to the portal (Web Portal).
- the server may send a notification message to the terminal to notify the terminal to initiate synchronization with the server for the group information of the contact, and the notification message needs to include the synchronization identifier of the group information of the contact.
- the terminal may send a packet upload request message to the server according to the received notification message, and synchronize the group information of the contact.
- the foregoing notification message may be carried by a short message, a Wireless Application Protocol (WAP) Push message, or the like.
- WAP Wireless Application Protocol
- the terminal may send the group information of all contacts after the terminal update to the server by using the packet upload request message.
- member name information corresponding to the group name and the group name and storing the personal information of the contact stored by the user according to the grouping information of the contact from the terminal, for example: if the terminal updates the group name and/or the group name corresponding to the group name Member identification information, you can send a packet message containing the contact after the update to the server.
- the packet uploading request message of the information the server also updates the member identification information corresponding to the group name and/or the group name in the personal information of the contact stored by the server.
- the server can synchronize the grouping information of the contact by maintaining a Change Log.
- This modification record table is a record that maintains the modification of the grouping information of the contacts by the server since the last synchronization.
- the server compares the grouping information of the contact stored by the server with the grouping information of the contact sent by the terminal, and can obtain the grouping information of the contact updated by the terminal.
- the server can obtain the group information of the contact that is updated by itself from its own modification record table (ie, Change Log). According to the obtained grouping information of the contact updated by the terminal and the server, the server can perform a corresponding synchronization operation.
- the terminal and the server may perform synchronization of the contact information (personal information of the contact and the group information of the contact)
- the terminal may be in the grouping from the server.
- the upload request message includes the grouping information of the updated contact and the identification information of the range of the grouping information for identifying the contact in the message, and the identifier information may identify the grouping information of the contact in the message as the total contact. Grouping information of a person or grouping information of an updated contact.
- the server may perform a judgment according to the conflict processing policy configured by the server, and determine whether the update of the terminal is correct or the update of the server itself. Synchronize. For example: The terminal deletes a packet, and the server modifies the packet by modifying the packet name. If the server determines that the update is based on the terminal, the server deletes the packet.
- the terminal may further send an active cancellation notification message, which is used to cancel the grouping information of the uploading contact, and specifically, cancel the HTTP message of the notification text.
- the control parameter "X-DS-Abort-Sync" needs to be added to the header. If the user cancels the synchronization through the terminal, the parameter is carried and the parameter value is "True", and the message body is empty; otherwise, this parameter is not carried.
- abnormal conditions can include, but are not limited to, the following:
- the WAP gateway IP address through which the request packet passes is illegal
- the related parameters in the HTTP header of the request packet do not exist or are illegal.
- the request message corresponds to the session expiration or does not exist
- the terminal sends a packet upload request message including the grouping information of the contact to the server, so that the server can store the personal information of the stored contact according to the grouping information of the contact, and implement the terminal.
- the synchronization of the grouping information of the contacts to the server enables the terminal-to-server contact information (personal information of the contact and the grouping information of the contacts) to be accurately synchronized, improving the accuracy of the synchronization of the contact information.
- FIG. 3 is a schematic flowchart of another method for synchronizing contact information according to Embodiment 3 of the present invention. This embodiment is applicable to a scenario in which a server-to-terminal one-way synchronization is performed. As shown in Figure 3, this The method for synchronizing contact information of an embodiment may include the following steps:
- Step 301 The terminal and the server synchronize the personal information of the contact;
- Step 302 The terminal sends a packet download request message to the server.
- Step 303 The terminal receives the packet download response message returned by the server, where the packet download response message includes packet information of the contact;
- Step 304 The terminal stores the stored personal information of the contact according to the grouping information of the contact.
- the grouping information of the contact may include a group name and member identification information corresponding to the group name.
- the member identification information may be a Locally Unique Identifier (LUID) of the terminal.
- the terminal receives the packet download response message from the server that includes the packet information of the contact, so that the terminal can store the personal information of the stored contact according to the grouping information of the contact, thereby realizing
- the synchronization of the grouping information of the server-to-terminal contact enables the server-to-terminal contact information (personal information of the contact and the grouping information of the contact) to be accurately synchronized, improving the accuracy of the synchronization of the contact information.
- FIG. 4 is a schematic flowchart of another method for synchronizing contact information according to Embodiment 4 of the present invention. This embodiment is applicable to a scenario in which a server-to-terminal one-way synchronization is performed. As shown in FIG. 4, the method for synchronizing contact information in this embodiment may include the following steps:
- Step 401 The terminal and the server synchronize the personal information of the contact;
- the synchronization of the personal information of the contact between the terminal and the server refer to the method for downloading the personal information of the contact from the server by the terminal in the prior art, and the one-way synchronization between the server and the terminal is implemented, and details are not described herein again.
- Step 402 The terminal sends a packet download request message to the server.
- the hypertext transfer protocol (HTTP) header of the foregoing packet download request message needs to upload an x-ds-data-type extension field, an x-ds-oper-type extension field, and an x-up- The calling-line-id field, where the value of the x-ds-data-type extension field is grp (contact grouping), for example: x-ds-data-type: grp, x-ds-oper-type extension field
- the value can be dn (download), for example: x-ds-oper-type: dn
- the value of the x-up-calling-line-id field is the user name of the terminal ( user id ), for example: x-up -calling-line-id: 139111 1111 1.
- the content of the foregoing packet download request message can be seen in Table 3.
- DnDataReq MsgID 1 String Message number message ID, the message ID is incremented from 1 in each session.
- DnDataReq Cred 0..1 —— Authentication Information Authentication and authentication information.
- Cred Type 1 String Authentication Type
- the type of authentication including
- MD5 authentication SHA-1, SHA-256, etc.
- Cred Format 1 String - Authentication format
- the format of the authentication information including b64, binary, etc.
- Cred Data 1 String - Authentication data Data used for authentication.
- DnDataReq DevID 1 String Terminal device Generally filled in as the terminal's identification IMEI number information, used to uniquely identify a terminal device.
- DnDataReq DataType 1 String Data Type The type of data carried by this message.
- the server needs to end the session. That is, when there is 420 error code in the terminal request message, the server must set the value of the IsSessionEnd tag in the next response message. y.
- Step 403 The server returns a packet download response message to the terminal, where the packet download response message includes packet information of the contact.
- the grouping information of the contact may include a group name and member identification information corresponding to the group name.
- the member identification information may be a Locally Unique Identifier (LUID) of the terminal.
- the server may further authenticate the received packet download request message, and after the authentication is passed, return a packet download response message to the terminal.
- Cred Type 1 String Type of authentication type, including MD5 type authentication, SHA-1, SHA-256, and so on.
- Cred Format 1 String Authentication format The format of the authentication information, including b64, binary, and so on.
- Cred Data 1 String Authentication Number The data used for authentication.
- DnDataRes MsgID 1 String Messages Each session is incremented from 1.
- the target URI address of the subsequent request message of the URI terminal is the target URI address of the subsequent request message of the URI terminal.
- DnDataRes IsFinal 1 String Fl Sending a knot Contact group data download end flag Bundle flag.
- DnDataRes Status 1 The status of the processing of the message uploaded by the terminal to the terminal. Status Code String F3 401 - Authentication failed.
- Three-digit error code where " #,, and ", " are separators. For example, 1001#400,1002#400 may be separators. For example, 1001#400,1002#400 may be separators. For example, 1001#400,1002#400 may be separators. For example, 1001#400,1002#400 may be separators. For example, 1001#400,1002#400 may be separators. For example, 1001#400,1002#400 may be separators.
- Grp N 1 String Contact Contact group name not allowed Group name Duplicate.
- Grp M 1 String Contact A contact can belong to multiple groups.
- the shell contact group members are represented by the terminal local LUID, and the multiple LUIDs are separated by ",", for example: 1001, 1002, 1003, 1004.
- the authentication method of the terminal is similar to the authentication method of the server, and the authentication process is also referred to the related description in the second embodiment of the present invention, and details are not described herein again.
- the terminal may send the following packet download request message to the server:
- the server receives the packet download request packet, and authenticates the packet download request packet. After the authentication is passed, the following group download response message is returned to the terminal:
- the terminal receives the packet download response message, and authenticates the packet download response message. After the authentication is passed, the stored personal information of the contact is stored in groups, and the group information of the currently downloaded contact is returned to the server. Processing the result, and continuing to prepare to download the group information of the remaining contacts stored by the server from the server, and the terminal may send the following group download request message to the server:
- the server receives the packet download request packet, and performs the authentication on the packet download request packet.
- the authentication may be performed according to the session identifier included in the packet, which is similar to the prior art, and is not described here.
- the terminal receives the packet download response message, and authenticates the packet download response message (simplely according to the session identifier included in the packet, which is similar to the prior art, and is not described here).
- the stored personal information of the remaining contacts is stored in groups, the processing result of the group information of the currently downloaded remaining contacts is returned to the server, and the group information of the remaining contacts stored by the server is continuously prepared to be downloaded from the server, the terminal
- the following packet download request message can be sent to the server:
- the server receives the packet download request packet, and performs the authentication on the packet download request packet.
- the authentication may be performed according to the session identifier included in the packet, which is similar to the prior art, and is not described here.
- authentication authentication information that is, a ⁇ 0 ⁇ field
- the receiver authenticates the sender.
- the two parties only need to send the session identifier, that is, the ⁇ 8688101 10> field, and the receiver can simply authenticate the sender. Because this session is authenticated, subsequent messages from both parties in this session are trustworthy.
- the user or the service provider can also initiate synchronization of the group information of the contact from the server side by logging in to the portal (Web Portal).
- the server may send a notification message to the terminal, to notify the terminal to initiate a grouping message with the server for the contact. Synchronization of the information, the notification message needs to include the synchronization identifier of the group information of the contact.
- the terminal may send a packet download request message to the server according to the received notification message, and synchronize the group information of the contact.
- the notification message may be carried by a short message, a Wireless Application Protocol (WAP) push message, or the like.
- WAP Wireless Application Protocol
- the server may send the group of all contacts after the server terminal is updated to the terminal by using the group download response message.
- Information group name and member identification information corresponding to the group name
- personal information of the contact stored by itself is stored according to the grouping information of the contact from the server, for example: if the server updates the group name and/or the group name corresponding
- the member identification information may send a notification message to the terminal to notify the terminal to initiate synchronization of the group information of the contact with the server.
- the terminal may send a packet download request message to the server, so that the server may send a packet download response message including the group information of the contact after the update to the terminal, and the terminal also correspondingly in the personal information of the contact stored by the terminal.
- the terminal can implement grouping information of the synchronization contact by maintaining a change log (Change Log).
- This modification record table is a record for maintaining the modification of the grouping information of the contacts by the terminal terminal since the last synchronization.
- the terminal compares the grouping information of the contact stored by the terminal with the grouping information of the contact sent by the server, and can obtain the grouping information of the contact updated by the server.
- the terminal can learn the grouping information of the contact that is updated by itself from its own modification record table (ie, Change Log). According to the obtained grouping information of the contact updated by the terminal and the server, the terminal can perform a corresponding synchronization operation.
- the terminal and the server may perform synchronization of the contact information (personal information of the contact and the group information of the contact)
- the server may be in the grouping from the terminal.
- the download response message includes the grouping information of the updated contact and the identification information of the range of the grouping information for identifying the contact in the message, and the identifier information may identify the grouping information of the contact in the message as the total contact. Grouping information of a person or grouping information of an updated contact.
- the terminal may perform a judgment according to the conflict processing policy configured by the terminal, and determine whether the update of the server is correct or the update of the terminal itself. Synchronize. For example, the server deletes a packet, and the terminal modifies the packet by modifying the packet name. If the terminal determines that the update is based on the server, the terminal deletes the packet.
- the terminal may further send an active cancellation notification message, which is used to cancel the grouping information of the downloaded contact.
- the HTTP message header of the active cancellation of the notification message needs to add a control parameter "X-DS- Abort-Sync". If the user cancels the synchronization through the terminal, the parameter is carried and the parameter value is "True", and the message body is empty; otherwise, this parameter is not carried.
- abnormal conditions can include, but are not limited to, the following:
- the WAP gateway IP address through which the request packet passes is illegal
- the related parameters in the HTTP header of the request packet do not exist or are illegal.
- the request message corresponds to the session expiration or does not exist
- the terminal receives the packet download response message from the server that includes the packet information of the contact, so that the terminal can store the personal information of the stored contact according to the grouping information of the contact, thereby realizing
- the synchronization of the grouping information of the server-to-terminal contact enables the server-to-terminal contact information (personal information of the contact and the grouping information of the contact) to be accurately synchronized, improving the accuracy of the synchronization of the contact information.
- the synchronization of the group information of the contacts involved in the first embodiment and the second embodiment of the present invention can be regarded as “one-way synchronization from the terminal to the server”, for example: data backup, only the upload operation is required.
- the server can directly overlay the group information uploaded by the terminal to the group information stored by the server.
- the synchronization of the grouping information of the contacts involved in the third and fourth embodiments of the present invention can be regarded as "one-way synchronization from the server to the terminal", for example: data recovery, only the download operation is required, and at this time, the terminal can The group information downloaded by the server directly covers the group information stored by the terminal.
- first and second embodiments of the present invention can further implement the "one-way synchronization of the server to the terminal", so that the two-way synchronization between the terminal and the server can be realized.
- the third and fourth embodiments of the present invention refer to the third and fourth embodiments of the present invention.
- the related content in the content is not described herein again; the third and fourth embodiments of the present invention further implement "one-way synchronization from the terminal to the server".
- the related content in the first and second embodiments of the present invention and details are not described herein again.
- the server needs to compare the information of the two parties one by one to identify whether the terminal needs to be notified to perform the download operation; or after the terminal performs the download operation, the terminal needs to perform information on both parties. One by one comparison to identify whether an upload operation needs to be performed.
- the above-mentioned first to fourth embodiments of the present invention can implement "two-way synchronization between the terminal and the server", that is, synchronization of group information of contacts between the terminal and the server can be realized, thereby making contact information between the terminal and the server (contact The personal information of the person and the grouping information of the contact) can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved.
- FIG. 5 is a schematic flowchart of a method for synchronizing contact information according to Embodiment 5 of the present invention.
- the method for synchronizing contact information in this embodiment may include the following steps: Step 501: Terminal and server Synchronize the personal information of the contact;
- synchronization of the personal information of the contact between the terminal and the server refer to the method for uploading the personal information of the contact to the server by the terminal in the prior art, to implement one-way synchronization from the terminal to the server, or to refer to the downloading from the server by the terminal in the prior art.
- the method of personal information of the contact person realizes one-way synchronization from the server to the terminal, and details are not described herein again.
- Step 502 The terminal sends an Add (Add) command based on an Open Mobile Alliance (OMA)-based Data Synchronization (DS) protocol to the server, where the add command includes packet information of the contact, So that the server stores the stored personal information of the contact according to the grouping information of the contact; or
- the server sends an Add (Add) command based on the Data Synchronization (DS) protocol of the Open Mobile Alliance (OMA) to the terminal, where the added command includes the grouping information of the contact, so that the foregoing
- the terminal stores the stored personal information of the contact according to the grouping information of the contact.
- OMA Open Mobile Alliance
- DS Data Synchronization
- OMA Open Mobile Alliance
- the grouping information of the contact may include a group name and member identification information corresponding to the group name.
- the member identification information may be a Locally Unique Identifier (LUID) of the terminal.
- the terminal sends an add command including the group information of the contact to the server, so that the server can store the personal information of the stored contact according to the group information of the contact, and implement the terminal to the server.
- the synchronization of the contact information of the contact so that the contact information of the terminal to the server (the personal information of the contact and the group information of the contact) can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved; or the server sends the information to the terminal.
- An increase command of the grouping information of the contact is included, so that the terminal can store the personal information of the stored contact according to the grouping information of the contact, thereby realizing the synchronization of the grouping information of the server-to-terminal contact, thereby
- the server-to-terminal contact information (contact's personal information and contact grouping information) can be accurately synchronized, improving the accuracy of contact information synchronization.
- This embodiment uses the existing Open Mobile Alliance (OMA) Synchronization Markup Language (SyncML) Data Synchronization (DS) protocol command to implement contact information.
- OMA Open Mobile Alliance
- SyncML Synchronization Markup Language
- DS Data Synchronization
- Accurate synchronization specifically by using different message headers for synchronizing the personal information of the contact and synchronizing the grouping information of the contact, so the receiving party can distinguish the ones that are synchronized
- the person information, or the group information group information of the contact may include, but is not limited to, the following forms:
- the add command can include the grouping information of the contact through the existing field
- the ⁇ 1>/ ⁇ 16> field may be used to indicate that the data is grouping information of the contact, and the ⁇ Item>/ ⁇ Source> field is used to carry the group name, using ⁇ 0>/ ⁇ 0 1> Field to carry member identification information.
- a ⁇ 0 ⁇ > field may be added to indicate that the data is the grouping information of the contact, the ⁇ N> field is used to carry the group name, and the ⁇ 1> field is used to carry the member identification information.
- the terminal when the terminal updates the group information of the contact (including adding, deleting, and modifying), the terminal may send an increase command, a delete command, and a modification according to the OMA-based DS protocol to the server. Replace ) command so that the server can perform the corresponding synchronization operation.
- the server compares the grouping information of the contact sent by the terminal by the add command, the delete command, and the replace command, the server identifies that the contact information of the contact needs to be sent to the terminal (because the terminal contacts the contact The grouping information is updated.)
- the grouping information of the contact is sent to the terminal by adding a command, a delete command, and a replace command. In this way, the contact group of the contact can be realized between the terminal and the server.
- the interest is synchronized.
- the OMA-based DS protocol may be sent to the terminal by adding, deleting, and modifying the The ⁇ Replace> command, so that the terminal can perform the corresponding synchronization operation.
- the terminal compares the grouping information of the contact sent by the server by the add command, the delete command, and the replace command, the terminal identifies the group information that needs to be sent to the server (because the terminal contacts the contact The grouping information is updated.)
- the grouping information of the contact is sent to the server by adding a command, a delete command, and a replace command. In this way, the grouping information of the contacts can be synchronized between the terminal and the server.
- Add a new grouping information (may be empty), add the command can be as follows:
- group member of the new group can be empty ⁇ /Grp>
- Modifying a member of a group to modify the member identification information in the group information can be: ⁇ shown below:
- the modification is a modification of the entire group member. After the modification, the group has only these two members.
- Modify the name of a group to modify the group name in the group information, and the modification command can be as Shown below:
- the modification of the packet can be divided into two cases: one is that the packet to be modified must exist, otherwise the modification fails; the other is that the modified packet is created if it does not exist.
- the terminal and the server In order to avoid the ambiguity of the command, the terminal and the server must agree on one in advance.
- Deleting a member of a group deletes the member identification information in the group information, and the delete command can be: ⁇
- Deleting a group means deleting the group name and member identification information in the group information.
- the delete command can be as follows:
- the grouping information of the contact may also be queried, and may be implemented by using an OMA-based DS protocol (Get) command.
- the command to query a group may be as follows:
- the receiver returns a list of member identification information for the packet, using the Results command. ⁇ Results> ; returns group members
- the grouping information of the contact may also be queried, and may be implemented by using an OMA-based DS protocol (Get) command, and the query for querying all the packets (equivalent download) may be as follows:
- the terminal may also send a delete command to the server to delete the group information of all contacts on the server, and then send an add command to the server to add group information of all contacts on the server (equivalent upload).
- the delete command can be as follows:
- the group name is "./", which means that it is the root directory, that is, the operation for all groupings.
- the searching and filtering of the grouping information of the contact may be further implemented.
- a search (Search) command and a Filter (Filter) command based on the OMA-based DS protocol can be utilized.
- Filter command you can use the "GrpName" keyword to indicate the group name, and the "Group” keyword to indicate a group.
- search command can look like this:
- the filtering command can be as follows:
- the contact group name of the contact cannot be duplicated, and for the same group, the server name and the client group name must be the same, which can satisfy most of the actual scenarios, and can reduce the local unique identifier and global uniqueness for the packet.
- the mapping process between the identifiers is not limited to:
- the packets can be nested, ie there can be sub-packets below the packets.
- the operation of the sub-packet is similar to the operation of the grouping, and will not be described here.
- a group and two subgroups below it can be structured as follows: ⁇ Grp> ⁇ N>Classmates ⁇ /N;>
- the group is nested inside another group, it means that it is a sub-group, for example, "college classmate” is in the “classmate”, that is, sub-grouping; if the grouping is juxtaposed to another group, it means that it is juxtaposed. Grouping, for example: “University classmates” and “high school classmates” are juxtaposed, and are grouped in parallel.
- the personal information of the contact person and the group information of the contact are in a synchronized order. That is: If the terminal adds several contacts locally, and adds them to the A group. During the synchronization process, the personal information of the newly added contacts of the terminal needs to be added to the server to save and establish a mapping relationship through the ⁇ 1 ⁇ 2 ⁇ 11> command, and the terminal synchronizes the group information of the contact to the server to implement the server. Synchronization of contact information between.
- FIG. 6 is a flowchart showing still another method for synchronizing contact information according to Embodiment 6 of the present invention.
- the method for synchronizing the contact information in this embodiment may include the following steps: Step 601: The terminal sends a first increase command to the server, where the first increase command includes a group name of the contact, so that the foregoing The server establishes a packet corresponding to the group name; or the server sends a first adding command to the terminal, where the first adding command includes a group name of the contact, so that the terminal establishes a packet corresponding to the group name;
- Step 602 The terminal sends a second increase command to the server, where the second increase command includes member identifier information corresponding to the group name and personal information of the contact, so that the server sends the member identifier information and the contact information.
- the second increase command includes member identifier information corresponding to the group name and personal information of the contact, so that the server sends the member identifier information and the contact information.
- Personal information is stored in the above group; or
- the server sends a second increase command to the terminal, where the second increase command includes member identification information corresponding to the group name and personal information of the contact, so that the terminal stores the member identification information and the personal information of the contact. Go to the above grouping.
- the member identification information may be a Locally Unique Identifier (LUID) of the terminal.
- LID Locally Unique Identifier
- the adding command of the packet name including the contact and the adding command including the member identification information corresponding to the grouping name and the personal information of the contact, which are sequentially sent to the opposite end, enable the opposite end to
- the member identification information and the personal information of the above contact are stored in the established group corresponding to the group name of the contact, and the terminal-to-server or server-to-terminal contact information is realized (personal information of the contact and grouping of the contact) Information) Accurate synchronization, improving the accuracy of contact information synchronization.
- the grouping information of the contact is treated as a special data element, for example: Folder.
- Each group is a Folder.
- JDataStore/Contact/Grp_A indicates A group
- JDataStore/Contact/Grp_B indicates B group
- JDataStore/Contact/Grp_B/l 0011 indicates 1001 1 contacts under B group.
- the above-mentioned increase command includes the group name of the contact or the member identification information corresponding to the group name and the form of the personal information of the contact, which may include, but are not limited to, the following forms:
- the add command may include the group name of the contact or the member identification information corresponding to the group name and the personal information of the contact through the existing field;
- the ⁇ Item>/ ⁇ Meta>/ ⁇ Type> field may be used to indicate that the information is the grouping information of the contact, and the ⁇ 11:>/ ⁇ 80111 ⁇ ;> field is used.
- the ⁇ : ⁇ 11:>/ ⁇ 0&1&;> field to carry the member identification information.
- the ⁇ Item>/ ⁇ Meta>/ ⁇ Type> field to indicate that the information is the contact's personal information
- use the ⁇ 0>/ ⁇ 0 1> field to carry the contact's personal. information.
- the add command may include the group name of the contact or the member identification information corresponding to the group name and the personal information of the contact through the added field.
- the ⁇ Grp> field may be used to indicate that the information is the group information of the contact, and the ⁇ Grp>/ ⁇ N> field is used to carry the group name, and ⁇ Grp>/ ⁇ M is used.
- the ⁇ field carries the member identification information.
- the grouping information of the contact can be treated as a special data element, such as a Folder.
- Each group is a Folder.
- the hierarchical relationship between Folders is indicated by the hierarchy of the directory.
- JDataStore/Contact/Grp_A is indicated as A group
- JDataStore/Contact/Grp_B is indicated as B group
- JDataStore/Contact/Grp_B/l 0011 indicates 1001 1 contact under group B.
- You only need to agree on a special identifier to indicate that it is a group for example: Use the Grp_ prefix.
- the receiver When the receiver receives the Grp_ prefix, or receives ⁇ Meta>/ ⁇ Type> to indicate a packet, the corresponding data is processed as a packet.
- the operation of grouped data elements and groups can be done very well by reusing the commands of the existing OMA SyncML DS protocol.
- the add command can be as follows: ⁇ Add> ; Add member contacts to B group
- the modification command can be as follows: s/Du Oss-oosId ssnoiAV
- the delete command to delete a group can be as follows:
- the grouping information of the contact may also be queried, and may be implemented by using a Get command.
- the command to query the grouping information of a group may be as follows:
- the personal information of the contact person and the group information of the contact are not synchronized. That is: If the terminal adds several contacts locally, and adds them to the A group. During the synchronization process, the personal information of the newly added contacts of the terminal does not need to be added to the server for storage and the mapping relationship is established by the ⁇ 1 ⁇ 2 11611:> command. As long as the terminal synchronizes the group name of the contact to the server, the server establishes a correspondence. The grouping, the terminal then synchronizes the corresponding member identification information and the contact's personal information to the server, in order to synchronize the contact information with the server.
- the contact information actually includes information in two formats, one is a personal information of a contact in a vCard format, and one is a group information of a contact in a Folder format.
- a personal information of a contact in a vCard format is a personal information of a contact in a vCard format
- a group information of a contact in a Folder format you can choose to store the data in either of these formats, or store them together.
- FIG. 7 is a schematic structural diagram of a terminal according to Embodiment 7 of the present invention.
- the terminal in this embodiment may include a personal information synchronization module 71 and a packet information synchronization module 72.
- the personal information synchronization module 71 synchronizes the personal information of the contact with the server, and the packet information synchronization module 72 sends a packet upload request message to the server, where the packet upload request message includes the group information of the contact, so that the The server stores the stored personal information of the contact according to the grouping information of the contact.
- the functions of the terminal in the first embodiment and the second embodiment of the present invention can be implemented by the terminal provided by the embodiment of the present invention.
- the packet information synchronization module sends a packet upload request message including the packet information of the contact to the server, so that the server can store the personal information of the stored contact according to the group information of the contact.
- the synchronization of the group information of the terminal-to-server contact is realized, so that the terminal-to-server contact information (personal information of the contact and the grouping information of the contact) can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved.
- FIG. 8 is a schematic structural diagram of a server according to Embodiment 8 of the present invention.
- the server in this embodiment may include a personal information synchronization module 81 and a packet information synchronization module 82.
- the personal information synchronization module 81 synchronizes the personal information of the contact with the terminal, and the group information synchronization module 82 compares the group information of the contact included in the packet upload request message from the terminal to the stored personal person of the contact. Information is stored in groups.
- the functions of the server in the first embodiment and the second embodiment of the present invention can be implemented by the server provided by the embodiment of the present invention.
- the packet information synchronization module receives the packet upload request message from the terminal that includes the packet information of the contact, so that the stored personal information of the contact is stored in groups according to the group information of the contact.
- the synchronization of the group information of the terminal-to-server contact is realized, so that the terminal-to-server contact information (personal information of the contact and the grouping information of the contact) can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved.
- FIG. 9 is a schematic structural diagram of another terminal according to Embodiment 9 of the present invention.
- the terminal in this embodiment may include a personal information synchronization module 91 and a packet information synchronization module 92.
- the personal information synchronization module 91 synchronizes the personal information of the contact with the server, and the packet information synchronization module 92 sends a packet download request message to the server, and receives a packet download response message returned by the server, and the packet download response message.
- the text includes grouping information of the contact, and the stored personal information of the contact is stored in groups according to the grouping information of the contact.
- the functions of the terminals in the third and fourth embodiments of the present invention can be implemented by the terminal provided by the embodiment of the present invention.
- the packet information response module receives the packet download response message from the server including the packet information of the contact, thereby enabling the group information according to the contact,
- the personal information of the stored contacts is stored in groups, and the grouping information of the contacts of the server to the terminal is synchronized, so that the contact information of the server to the terminal (the personal information of the contact and the grouping information of the contact) can be accurately Synchronization improves the accuracy of contact information synchronization.
- FIG. 10 is a schematic structural diagram of another server according to Embodiment 10 of the present invention.
- the server in this embodiment may include a personal information synchronization module 1001 and a packet information synchronization module 1002.
- the personal information synchronization module 1001 synchronizes the personal information of the contact with the terminal, and the packet information synchronization module 1002 returns a packet download response message to the terminal according to the packet download request message from the terminal, and the packet download response message.
- the grouping information of the contact is included in the terminal, so that the terminal stores the stored personal information of the contact according to the grouping information of the contact.
- the functions of the servers in the third and fourth embodiments of the present invention can be implemented by the server provided by the embodiment of the present invention.
- the packet information synchronization module sends a packet download response message including the packet information of the contact to the terminal, so that the terminal can store the personal information of the stored contact according to the group information of the contact.
- the synchronization of the grouping information of the server-to-terminal contact is realized, so that the server-to-terminal contact information (personal information of the contact and the grouping information of the contact) can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved.
- FIG. 11 is a schematic structural diagram of still another terminal according to Embodiment 11 of the present invention.
- the terminal in this embodiment may include a personal information synchronization module 1101 and a packet information synchronization module 1102.
- the personal information synchronization module 1101 and the server perform personal information of the contact person.
- the packet information synchronization module 1 102 sends an increase command to the server, where the increase command includes group information of the contact, so that the server groups the stored personal information of the contact according to the group information of the contact. storage.
- the functions of the terminal in the fifth embodiment of the present invention can be implemented by the terminal provided by the embodiment of the present invention.
- the group information synchronization module sends an increase command including the group information of the contact to the server, so that the server can store the personal information of the stored contact according to the group information of the contact, thereby realizing the terminal.
- the synchronization of the grouping information of the contacts to the server enables the terminal-to-server contact information (personal information of the contact and the grouping information of the contacts) to be accurately synchronized, improving the accuracy of the synchronization of the contact information.
- FIG. 12 is a schematic structural diagram of still another server according to Embodiment 12 of the present invention.
- the server in this embodiment may include a personal information synchronization module 1201 and a packet information synchronization module 1202.
- the personal information synchronization module 1201 synchronizes the personal information of the contact with the terminal, and the group information synchronization module 1202 groups the stored personal information of the contact according to the group information of the contacts included in the increase command from the terminal. storage.
- the functions of the server in the fifth embodiment of the present invention can be implemented by the server provided by the embodiment of the present invention.
- the group information synchronization module receives an increase command of the packet information of the contact from the terminal, so that the stored personal information of the contact is stored in groups according to the group information of the contact, thereby realizing the terminal.
- the synchronization of the grouping information of the contacts to the server enables the terminal-to-server contact information (personal information of the contact and the grouping information of the contacts) to be accurately synchronized, improving the accuracy of the synchronization of the contact information.
- FIG. 13 is a schematic structural diagram of still another terminal according to Embodiment 13 of the present invention.
- the terminal in this embodiment may include a personal information synchronization module 1301 and a packet information synchronization module 1302.
- the personal information synchronization module 1301 synchronizes the personal information of the contact with the server, and the group information synchronization module 1302 groups the stored personal information of the contact according to the group information of the contacts included in the increase command from the server. storage.
- the functions of the terminal in the fifth embodiment of the present invention can be implemented by the terminal provided by the embodiment of the present invention.
- the group information synchronization module receives an increase command of the packet information of the contact from the server, so that the personal information of the stored contact is group-stored according to the group information of the contact, and the server is implemented.
- the synchronization of the grouping information of the contacts to the terminal enables the server-to-terminal contact information (personal information of the contact and the grouping information of the contacts) to be accurately synchronized, improving the accuracy of the synchronization of the contact information.
- FIG. 14 is a schematic structural diagram of still another server according to Embodiment 14 of the present invention.
- the server in this embodiment may include a personal information synchronization module 1401 and a packet information synchronization module 1402.
- the personal information synchronization module 1401 synchronizes the personal information of the contact with the terminal, and the packet information synchronization module 1402 sends an increase command to the terminal, where the increase command includes the group information of the contact, so that the terminal is based on the contact.
- the group information stores the stored personal information of the above contacts in groups.
- the functions of the server in the fifth embodiment of the present invention can be implemented by the server provided by the embodiment of the present invention.
- the group information synchronization module sends an add command including the group information of the contact to the terminal, so that the terminal can store the information according to the group information of the contact.
- the personal information of the contact is stored in a group, and the grouping information of the contact of the server to the terminal is synchronized, so that the contact information of the server to the terminal (the personal information of the contact and the grouping information of the contact) can be accurately synchronized and improved.
- the accuracy of contact information synchronization is a group, and the grouping information of the contact of the server to the terminal.
- FIG. 15 is a schematic structural diagram of a terminal according to Embodiment 15 of the present invention.
- the terminal in this embodiment may include a first synchronization module 1501 and a second synchronization module 1502.
- the first synchronization module 1501 sends a first increase command to the server, where the first increase command includes the group name of the contact, so that the server establishes the packet corresponding to the group name, and the second synchronization module 1502 sends the second message to the server.
- the second adding command includes the member identification information corresponding to the group name and the personal information of the contact, so that the server stores the member identification information and the personal information of the contact in the group.
- the first synchronization module sends an increase command including the group name of the contact to the server
- the second synchronization module sends an increase command to the server that includes the member identification information corresponding to the group name and the personal information of the contact.
- the server can store the above-mentioned member identification information and the personal information of the contact mentioned above into the established group corresponding to the group name of the contact, and realize the terminal-to-server contact information (personal information and contact of the contact person)
- the grouping information of the person can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved.
- FIG. 16 is a schematic structural diagram of a server according to Embodiment 16 of the present invention.
- the server in this embodiment may include a first synchronization module 1601 and a second synchronization module 1602.
- the first synchronization module 1601 is configured according to the association included in the first increase command from the terminal.
- the group name of the person, the group corresponding to the group name is established, and the second synchronization module 1602 associates the member according to the member identification information corresponding to the group name and the personal information of the contact included in the second addition command from the terminal.
- the identification information and the personal information of the above contact are stored in the above group.
- the functions of the server in the sixth embodiment of the present invention can be implemented by the server provided by the embodiment of the present invention.
- the first synchronization module receives an increase command of the packet name of the contact from the terminal, so that the server can establish a packet corresponding to the packet name of the contact, and receive the second synchronization module from the terminal.
- An increase command including the member identification information corresponding to the group name and the personal information of the contact, so that the server can store the member identification information and the personal information of the contact in the established group, and implement the terminal-to-server connection.
- the person information personal information of the contact person and the grouping information of the contact person
- FIG. 17 is a schematic structural diagram of a terminal according to Embodiment 17 of the present invention.
- the terminal in this embodiment may include a first synchronization module 1701 and a second synchronization module 1702.
- the first synchronization module 1701 establishes a packet corresponding to the group name according to the group name of the contact included in the first addition command from the server, and the second synchronization module 1702 according to the second update command included in the server from the server.
- the member identification information corresponding to the group name and the personal information of the contact store the member identification information and the personal information of the contact person in the group.
- the first synchronization module receives an increase command of the packet name of the contact from the server, so that the terminal can establish a packet corresponding to the packet name of the contact, and receive the second synchronization module from the server.
- An increase command including the member identification information corresponding to the group name and the personal information of the contact, so that the terminal can store the member identification information and the personal information of the contact in the established group, thereby implementing server-to-terminal contact.
- the person information personal information of the contact person and the grouping information of the contact person
- FIG. 18 is a schematic structural diagram of still another server according to Embodiment 18 of the present invention, as shown in FIG.
- the server of this embodiment may include a first synchronization module 1801 and a second synchronization module 1802.
- the first synchronization module 1801 sends a first increase command to the terminal, where the first increase command includes a packet name of the contact, so that the terminal establishes a packet corresponding to the packet name, and the second synchronization module 1802 sends a second message to the terminal.
- the second adding command includes the member identification information corresponding to the group name and the personal information of the contact, so that the terminal stores the member identification information and the personal information of the contact in the group.
- the functions of the server in the sixth embodiment of the present invention can be implemented by the server provided by the embodiment of the present invention.
- the first synchronization module sends an increase command including the group name of the contact to the terminal
- the second synchronization module sends an increase command to the terminal that includes the member identification information corresponding to the group name and the personal information of the contact.
- the terminal can store the member identification information and the personal information of the contact to the established group corresponding to the group name of the contact, and implement the server-to-terminal contact information (personal information and contact of the contact).
- the grouping information of the person can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
联系人信息的同步方法 Contact information synchronization method
本申请要求于 2010 年 10 月 18 日提交中国专利局、 申请号为 201010515611.1、 发明名称为 "联系认信息的同步方法" 的中国专利申请 的优先权, 其全部内容通过引用结合在本申请中。 技术领域 本发明实施例涉及通信技术, 尤其涉及联系人信息的同步方法。 背景技术 The present application claims priority to Chinese Patent Application No. 201010515611.1, the entire disclosure of which is hereby incorporated by reference. TECHNICAL FIELD Embodiments of the present invention relate to communication technologies, and in particular, to a method for synchronizing contact information. Background technique
用户通过终端进行通信业务过程中, 可以将联系人的个人信息存储到 终端中。 为了防止用户由于损坏终端、 丟失终端或更换终端导致的联系人 的个人信息的丟失, 终端可以向服务器上传终端所存储的联系人的个人信 息, 以使服务器存储上述联系人的个人信息, 从而使得用户可以通过另一 个终端从服务器下载服务器所存储的联系人的个人信息。 During the communication service of the user through the terminal, the personal information of the contact can be stored in the terminal. In order to prevent the user from losing the personal information of the contact due to damage to the terminal, loss of the terminal or replacement of the terminal, the terminal may upload the personal information of the contact stored by the terminal to the server, so that the server stores the personal information of the contact, thereby making the server The user can download the personal information of the contact stored by the server from the server through another terminal.
现有的终端或服务器还可以根据用户的设置, 进一步存储联系人的分 组信息, 将联系人的个人信息进行分组存储。 但是, 终端无法向服务器上 传终端所存储的联系人的分组信息, 也无法从服务器下载服务器所存储的 联系人的分组信息, 从而无法实现终端与服务器之间联系人信息的准确同 步, 降低了联系人信息同步的准确性。 发明内容 The existing terminal or server may further store the group information of the contact according to the setting of the user, and store the personal information of the contact in groups. However, the terminal cannot upload the group information of the contact stored by the terminal to the server, and cannot download the group information of the contact stored by the server from the server, thereby failing to accurately synchronize the contact information between the terminal and the server, thereby reducing the contact. The accuracy of human information synchronization. Summary of the invention
本发明实施例提供联系人信息的同步方法, 用以实现终端与服务器之 间联系人信息的准确同步, 提高联系人信息同步的准确性。 Embodiments of the present invention provide a method for synchronizing contact information, which is used to implement a terminal and a server. Accurate synchronization of contact information between contacts, improving the accuracy of contact information synchronization.
本发明实施例提供了一种联系人信息的同步方法, 包括: The embodiment of the invention provides a method for synchronizing contact information, including:
终端与服务器进行联系人的个人信息的同步; The terminal and the server synchronize the personal information of the contact;
所述终端向所述服务器发送分组上传请求报文, 所述分组上传请求报 文中包含联系人的分组信息, 以使所述服务器根据所述联系人的分组信息, 对存储的所述联系人的个人信息进行分组存储。 Sending, by the terminal, a packet upload request message to the server, where the packet upload request message includes packet information of the contact, so that the server searches the stored contact according to the grouping information of the contact Personal information is stored in groups.
本发明实施例提供了另一种联系人信息的同步方法, 包括: An embodiment of the present invention provides another method for synchronizing contact information, including:
终端与服务器进行联系人的个人信息的同步; The terminal and the server synchronize the personal information of the contact;
所述终端向所述服务器发送分组下载请求报文; Sending, by the terminal, a packet download request message to the server;
所述终端接收所述服务器返回的分组下载应答报文, 所述分组下载应 答报文中包含联系人的分组信息; Receiving, by the terminal, a packet download response message returned by the server, where the packet download response message includes group information of a contact;
所述终端根据所述联系人的分组信息, 对存储的所述联系人的个人信 息进行分组存储。 The terminal stores the stored personal information of the contact according to the grouping information of the contact.
本发明实施例提供了再一种联系人信息的同步方法, 包括: The embodiment of the invention provides another method for synchronizing contact information, including:
终端与服务器进行联系人的个人信息的同步; The terminal and the server synchronize the personal information of the contact;
所述终端向所述服务器发送基于开放移动联盟的数据同步协议的增加 命令, 所述增加命令中包含联系人的分组信息, 以使所述服务器根据所述 联系人的分组信息, 对存储的所述联系人的个人信息进行分组存储; 或者 所述服务器向所述终端发送基于开放移动联盟的数据同步协议的增加 命令, 所述增加命令中包含联系人的分组信息, 以使所述终端根据所述联 系人的分组信息, 对存储的所述联系人的个人信息进行分组存储。 Sending, by the terminal, an add command based on an Open Mobile Alliance data synchronization protocol to the server, where the add command includes packet information of a contact, so that the server stores the location according to the grouping information of the contact The personal information of the contact is stored in a group; or the server sends an add command based on the Open Mobile Alliance data synchronization protocol to the terminal, where the add command includes group information of the contact, so that the terminal according to the The grouping information of the contact is stored, and the stored personal information of the contact is stored in groups.
由上述技术方案可知, 本发明实施例通过终端向服务器发送包含联系 人的分组信息的分组上传请求报文, 从而使得服务器能够根据上述联系人 的分组信息, 对存储的联系人的个人信息进行分组存储, 实现了终端到服 务器的联系人的分组信息的同步,从而使得终端到服务器的联系人信息(联 系人的个人信息和联系人的分组信息) 能够准确同步, 提高了联系人信息 同步的准确性; 或者通过终端接收来自服务器的包含联系人的分组信息的 分组下载应答报文, 从而使得终端能够根据上述联系人的分组信息, 对存 储的联系人的个人信息进行分组存储, 实现了服务器到终端的联系人的分 组信息的同步, 从而使得服务器到终端的联系人信息 (联系人的个人信息 和联系人的分组信息) 能够准确同步, 提高了联系人信息同步的准确性; 或者通过终端向服务器发送包含联系人的分组信息的增加命令, 从而使得 服务器能够根据上述联系人的分组信息, 对存储的联系人的个人信息进行 分组存储, 实现了终端到服务器的联系人的分组信息的同步, 从而使得终 端到服务器的联系人信息 (联系人的个人信息和联系人的分组信息) 能够 准确同步, 提高了联系人信息同步的准确性; 或者通过服务器向终端发送 包含联系人的分组信息的增加命令, 从而使得终端能够根据上述联系人的 分组信息, 对存储的联系人的个人信息进行分组存储, 实现了服务器到终 端的联系人的分组信息的同步, 从而使得服务器到终端的联系人信息 (联 系人的个人信息和联系人的分组信息) 能够准确同步, 提高了联系人信息 同步的准确性; 或者通过向对端依次发送的包含联系人的分组名称的增加 命令, 以及包含与上述分组名称对应的成员标识信息和联系人的个人信息 的增加命令, 从而使得对端能够将上述成员标识信息和上述联系人的个人 信息存储到建立的与上述联系人的分组名称对应的分组中, 实现了终端到 服务器或服务器到终端的联系人信息 (联系人的个人信息和联系人的分组 信息) 能够准确同步, 提高了联系人信息同步的准确性。 附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对 实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地, 下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。 According to the foregoing technical solution, the embodiment of the present invention sends a connection to the server through the terminal. The packet of the grouping information of the person uploads the request message, so that the server can store the personal information of the stored contact according to the grouping information of the contact, thereby realizing the synchronization of the grouping information of the contact of the terminal to the server, thereby The terminal-to-server contact information (personal information of the contact and the grouping information of the contact) can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved; or the grouping of the grouping information including the contact from the server is received by the terminal. Downloading the response message, so that the terminal can store the personal information of the stored contact according to the grouping information of the contact, and realize the synchronization of the packet information of the server-to-terminal contact, thereby making the server-to-terminal contact The person information (personal information of the contact person and the grouping information of the contact person) can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved; or the terminal sends an increase command including the grouping information of the contact to the server, thereby enabling the server to The grouping information of the contact, storing the personal information of the stored contact in groups, realizing the synchronization of the grouping information of the terminal-to-server contact, thereby making the terminal-to-server contact information (contact person's personal information and contact) The grouping information of the person can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved; or the server sends an increase command including the grouping information of the contact to the terminal, so that the terminal can store the information according to the grouping information of the contact. The personal information of the contact is stored in a group, and the grouping information of the contact of the server to the terminal is synchronized, so that the contact information of the server to the terminal (the personal information of the contact and the grouping information of the contact) can be accurately synchronized and improved. The accuracy of the synchronization of the contact information; or an increase command including the name of the group of the contact sequentially sent to the opposite end, and an increase command including the member identification information corresponding to the group name and the personal information of the contact, thereby The opposite end can Said personal information storage identification information and said contact members to the group name with the group corresponding to the above-described contacts are established, the terminal to achieve The server or server-to-terminal contact information (contact's personal information and contact grouping information) can be accurately synchronized, improving the accuracy of contact information synchronization. BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description of the drawings used in the embodiments or the prior art description will be briefly described below. The drawings are some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative work.
图 1为本发明实施例一提供的一种联系人信息的同步方法的流程示意 图; 1 is a schematic flow chart of a method for synchronizing contact information according to Embodiment 1 of the present invention;
图 2为本发明实施例二提供的一种联系人信息的同步方法的流程示意 图; 2 is a schematic flow chart of a method for synchronizing contact information according to Embodiment 2 of the present invention;
图 3为本发明实施例三提供的另一种联系人信息的同步方法的流程示 意图; FIG. 3 is a schematic flowchart of another method for synchronizing contact information according to Embodiment 3 of the present invention; FIG.
图 4为本发明实施例四提供的另一种联系人信息的同步方法的流程示 意图; 4 is a schematic flowchart of another method for synchronizing contact information according to Embodiment 4 of the present invention;
图 5为本发明实施例五提供的再一种联系人信息的同步方法的流程示 意图; FIG. 5 is a schematic flowchart of still another method for synchronizing contact information according to Embodiment 5 of the present invention; FIG.
图 6为本发明实施例六提供的又一种联系人信息的同步方法的流程示 意图; FIG. 6 is a schematic flowchart of still another method for synchronizing contact information according to Embodiment 6 of the present invention; FIG.
图 7为本发明实施例七提供的一种终端的结构示意图; FIG. 7 is a schematic structural diagram of a terminal according to Embodiment 7 of the present invention;
图 8为本发明实施例八提供的一种服务器的结构示意图; 图 9为本发明实施例九提供的另一种终端的结构示意图; FIG. 8 is a schematic structural diagram of a server according to Embodiment 8 of the present invention; FIG. FIG. 9 is a schematic structural diagram of another terminal according to Embodiment 9 of the present invention; FIG.
图 10为本发明实施例十提供的另一种服务器的结构示意图; FIG. 10 is a schematic structural diagram of another server according to Embodiment 10 of the present invention; FIG.
图 1 1为本发明实施例十一提供的再一种终端的结构示意图; FIG. 1 is a schematic structural diagram of still another terminal according to Embodiment 11 of the present invention;
图 12为本发明实施例十二提供的再一种服务器的结构示意图; 图 13为本发明实施例十三提供的又一种终端的结构示意图; FIG. 12 is a schematic structural diagram of still another server according to Embodiment 12 of the present invention; FIG. 13 is a schematic structural diagram of still another terminal according to Embodiment 13 of the present invention;
图 14为本发明实施例十四提供的又一种服务器的结构示意图; 图 15为本发明实施例十五提供的还一种终端的结构示意图; 14 is a schematic structural diagram of still another server according to Embodiment 14 of the present invention; FIG. 15 is a schematic structural diagram of still another terminal according to Embodiment 15 of the present invention;
图 16为本发明实施例十六提供的还一种服务器的结构示意图; 图 17为本发明实施例十七提供的还一种终端的结构示意图; FIG. 16 is a schematic structural diagram of a server according to Embodiment 16 of the present invention; FIG. 17 is a schematic structural diagram of a terminal according to Embodiment 17 of the present invention;
图 18为本发明实施例十八提供的还一种服务器的结构示意图。 具体实施方式 FIG. 18 is a schematic structural diagram of still another server according to Embodiment 18 of the present invention. detailed description
为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本 发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描 述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提 下所获得的所有其他实施例, 都属于本发明保护的范围。 The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is a partial embodiment of the invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
图 1为本发明实施例一提供的一种联系人信息的同步方法的流程示意 图, 本实施例适用于终端到服务器的单向同步的场景。 如图 1 所示, 本实 施例的联系人信息的同步方法可以包括以下步骤: FIG. 1 is a schematic flowchart of a method for synchronizing contact information according to Embodiment 1 of the present invention. This embodiment is applicable to a scenario in which a terminal-to-server one-way synchronization is performed. As shown in FIG. 1, the method for synchronizing contact information in this embodiment may include the following steps:
步骤 101、 终端与服务器进行联系人的个人信息的同步; Step 101: The terminal and the server synchronize the personal information of the contact;
终端与服务器进行联系人的个人信息的同步可以参考现有技术中终端 向服务器上传联系人的个人信息的方法, 实现终端到服务器的单向同步, 此处不再赘述。 The terminal and the server can synchronize the personal information of the contact, and refer to the terminal in the prior art. A method for uploading personal information of a contact to a server to implement one-way synchronization from the terminal to the server, which is not described here.
步骤 102、 上述终端向上述服务器发送分组上传请求报文, 上述分组 上传请求报文中包含联系人的分组信息, 以使上述服务器根据上述联系人 的分组信息, 对存储的上述联系人的个人信息进行分组存储。 Step 102: The terminal sends a packet upload request message to the server, where the packet upload request message includes packet information of the contact, so that the server stores the personal information of the contact according to the group information of the contact. Perform group storage.
其中, 上述联系人的分组信息可以包括分组名称和与上述分组名称对 应的成员标识信息。上述成员标识信息可以为终端的本地唯一标识( Locally Unique Identifier, 简称 LUID ) 。 The grouping information of the contact may include a group name and member identification information corresponding to the group name. The member identification information may be a Locally Unique Identifier (LUID) of the terminal.
本实施例中, 通过终端向服务器发送包含联系人的分组信息的分组上 传请求报文, 从而使得服务器能够根据上述联系人的分组信息, 对存储的 联系人的个人信息进行分组存储, 实现了终端到服务器的联系人的分组信 息的同步, 从而使得终端到服务器的联系人信息 (联系人的个人信息和联 系人的分组信息) 能够准确同步, 提高了联系人信息同步的准确性。 In this embodiment, the terminal sends a packet upload request message including the grouping information of the contact to the server, so that the server can store the personal information of the stored contact according to the grouping information of the contact, and implement the terminal. The synchronization of the grouping information of the contacts to the server enables the terminal-to-server contact information (personal information of the contact and the grouping information of the contacts) to be accurately synchronized, improving the accuracy of the synchronization of the contact information.
图 2为本发明实施例二提供的一种联系人信息的同步方法的流程示意 图, 本实施例适用于终端到服务器的单向同步的场景。 如图 2所示, 本实 施例的联系人信息的同步方法可以包括以下步骤: FIG. 2 is a schematic flowchart of a method for synchronizing contact information according to Embodiment 2 of the present invention. This embodiment is applicable to a scenario in which a terminal-to-server one-way synchronization is performed. As shown in FIG. 2, the method for synchronizing contact information in this embodiment may include the following steps:
步骤 201、 终端与服务器进行联系人的个人信息的同步; Step 201: The terminal and the server synchronize the personal information of the contact;
终端与服务器进行联系人的个人信息的同步可以参考现有技术中终端 向服务器上传联系人的个人信息的方法, 实现终端到服务器的单向同步, 此处不再赘述。 For the synchronization of the personal information of the contact between the terminal and the server, refer to the method for uploading the personal information of the contact to the server by the terminal in the prior art, and the one-way synchronization of the terminal to the server is implemented, and details are not described herein again.
步骤 202、 终端向服务器发送分组上传请求报文, 上述分组上传请求 报文中包含联系人的分组信息; 其中, 上述联系人的分组信息可以包括分组名称和与上述分组名称对 应的成员标识信息。上述成员标识信息可以为终端的本地唯一标识( Locally Unique Identifier, 简称 LUID ) 。 Step 202: The terminal sends a packet upload request message to the server, where the packet upload request message includes group information of the contact; The grouping information of the contact may include a group name and member identification information corresponding to the group name. The member identification information may be a Locally Unique Identifier (LUID) of the terminal.
具体地,上述分组上传请求报文的超文本传输协议( HyperText Transfer Protocol,简称 HTTP )头中需要上传 x-ds-data-type扩展字段、 x-ds-oper-type 扩展字段和 x-up-calling-line-id字段, 其中, x-ds-data-type扩展字段的取值 为 grp (联系人分组) , 例如: x-ds-data-type: grp, x-ds-oper-type扩展字段 的取值可以为 up (上传) , 例如: x-ds-oper-type: up , x-up-calling-line-id 字段的取值为终端的用户名 ( user id ) , 例如: x-up-calling-line-id: 139111 1111 1。 具体地, 上述分组上传请求 文的内容可以参见表 1所示。 Specifically, the hypertext transfer protocol (HTTP) header of the foregoing packet upload request message needs to upload an x-ds-data-type extension field, an x-ds-oper-type extension field, and an x-up- The calling-line-id field, where the value of the x-ds-data-type extension field is grp (contact grouping), for example: x-ds-data-type: grp, x-ds-oper-type extension field The value can be up (upload), for example: x-ds-oper-type: up , the value of the x-up-calling-line-id field is the user name of the terminal ( user id ), for example: x-up -calling-line-id: 139111 1111 1. Specifically, the content of the foregoing packet upload request message can be seen in Table 1.
表 1 分组上传请求报文的内容 Table 1 Contents of the packet upload request message
Cred Type 1 String 认证类 认证的类型, 包括 MD5 型 认证、 SHA-1、 SHA-256 等。 Cred Type 1 String Type of authentication type, including MD5 type authentication, SHA-1, SHA-256, and so on.
Cred Format 1 String 认证格 认证信息的格式, 包括 式 b64、 binary等。 Cred Format 1 String Authentication format The format of the authentication information, including b64, binary, and so on.
Cred Data 1 String 认证数 用于认证的数据。 Cred Data 1 String Authentication Number The data used for authentication.
据 According to
UpDataReq MsgID 1 String 报文编 每次会话从 1开始递增。 UpDataReq MsgID 1 String Messages Each session is incremented from 1.
号 number
UpDataReq MaxMsgSize 1 String 终端支 压缩前的消息长度, 单 持的最 位: 字节。 UpDataReq MaxMsgSize 1 String Terminal length The length of the message before compression, the most held: Bytes.
大消息 Big news
长度 Length
UpDataReq DevID 1 String 终端设 一 填写为终端的 IMEI 备标识 号信息,用于唯一标识一 个终端设备。 UpDataReq DevID 1 String Terminal Set An IMEI backup identification number information that is filled in as a terminal to uniquely identify an end device.
UpDataReq DataType 1 String 数据类 该报文承载的数据类型。 UpDataReq DataType 1 String Data class The data type carried by this message.
型 grp: 联系人分组 Type grp: contact grouping
UpDataReq IsFinal 1 String Fl 发送结 联系人分组数据上传结 束标志 束标志。 UpDataReq IsFinal 1 String Fl Sending a knot Contact packet data upload end flag Bundle flag.
结束: y End: y
未结束: n UpDataReq Grp 一 一 联系人 终端本地有 0 到多个联 分组 系人分组信息。 Not ended: n UpDataReq Grp One-to-one contact terminal has 0 to more group grouping information locally.
Grp N 1 String 联系人 联系人分组名称不允许 分组名 重复。 Grp N 1 String Contact Contact group name not allowed Group name Duplicate.
称 Weigh
Grp M 1 String 联系人 一个联系人可以属于多 分组成 个分组。 Grp M 1 String Contacts A contact can belong to multiple groups.
贝 联系人分组成员用终端 本地 LUID 表示, 多个 Bay contact group member with terminal local LUID representation, multiple
LUID之间用 "," 分隔, 例 如 :LUIDs are separated by ",", for example:
1001, 1002,1003,1004 » 注: 如果是空分组, 则取值为空。 1001, 1002, 1003, 1004 » Note: If it is a null group, the value is null.
步骤 203、 服务器根据上述联系人的分组信息, 对存储的上述联系人 的个人信息进行分组存储; Step 203: The server performs group storage on the stored personal information of the contact according to the grouping information of the contact.
进一步地, 本步骤中, 服务器还可以对接收到的分组上传请求报文进 行鉴权, 鉴权通过之后, 对存储的上述联系人的个人信息进行分组存储。 具体地, 上述鉴权过程如下: 终端在发送分组上传请求报文时, 在上述分 组上传请求报文中包含认证信息, 其中, 认证信息可以包括认证格式、 认 证类型、认证数据,终端可以根据终端的用户名、密码、认证随机数( Nonce ) 以及认证类型 (Type字段, 例如: MD5认证)所指定的算法, 生成指定认 证格式 (Format 字段, 例如: b64 ) 的认证数据 ( Data 字段, 例如: 一个 字符串) 。 服务器接收到分组上传请求报文之后, 可以在其 HTTP 头的 x-up-calling-line-id字段中获取终端的用户名, 根据上述终端的用户名、 自 身存储的与上述终端的用户名对应的密码、 认证随机数、 上述分组上传请 求报文中包含的认证类型 (Type字段) , 生成上述分组上传请求报文中包 含的指定认证格式 (Format字段) 的认证数据, 服务器将自身生成的认证 数据和上述分组上传请求报文中包含的认证数据 (Data字段) 进行比较, 如果两字段相同, 则认证成功, 否则认证失败。 服务器在向终端返回的分 组上传应答报文中可以指明此认证的结果。 Further, in this step, the server may further perform authentication on the received packet upload request message, and after the authentication is passed, store the stored personal information of the contact. Specifically, the foregoing authentication process is as follows: When the terminal sends the packet upload request message, the terminal includes the authentication information in the packet upload request message, where the authentication information may include an authentication format, an authentication type, and authentication data, and the terminal may be based on the terminal. The algorithm specified by the user name, password, authentication random number (Nonce), and authentication type (Type field, for example: MD5 authentication), generates the specified identification Authentication data (Data field, for example: a string) of the format (Format field, for example: b64). After receiving the packet upload request message, the server may obtain the user name of the terminal in the x-up-calling-line-id field of the HTTP header, and corresponding to the user name of the terminal and the user name stored by the terminal according to the user name of the terminal. The password, the authentication random number, and the authentication type (Type field) included in the packet upload request packet, and the authentication data of the specified authentication format (Format field) included in the packet upload request packet is generated, and the server generates the authentication generated by itself. The data is compared with the authentication data (Data field) included in the packet upload request message. If the two fields are the same, the authentication succeeds, otherwise the authentication fails. The server may indicate the result of this authentication in the packet upload response message returned to the terminal.
步骤 204、 服务器向终端返回分组上传应答报文。 Step 204: The server returns a packet upload response message to the terminal.
具体地, 上述分组上传应答报文的内容可以参见表 2所示。 Specifically, the content of the foregoing packet upload response message can be seen in Table 2.
表 2 分组上传应答报文的内容 Table 2 Contents of the packet upload response message
UpDataRes Cred 0 认 证 鉴权认证信息。 UpDataRes Cred 0 Authentication authentication information.
1 自、、 1 from,
1 1
Cred Type String 认 证 认证的类型, 包括 MD5认 类型 证、 SHA- SHA-256等。 Cred Type String Type of authentication, including MD5 authentication type, SHA-SHA-256, etc.
Cred Format 1 String 认 证 认证信息的格式, 包括 格式 b64、 binary等。 Cred Format 1 String The format of the authentication information, including the format b64, binary, etc.
Cred Data 1 String 认 证 用于认证的数据。 Cred Data 1 String Authentication Data used for authentication.
数据 Data
UpDataRes RespURI 0 String 后 续 在第一个应答报文中填 请 求 写。 UpDataRes RespURI 0 String Continued Fill in the first response message.
1 URI 终端后续请求消息的目的 地址 URI地址。 1 Destination address URI address of the subsequent request message of the URI terminal.
DnDataRes IsSessionEnd 1 String Fl 会 话 会话结束标志。 DnDataRes IsSessionEnd 1 String Fl Session End of session flag.
结 束 结束: y End of the end: y
标志 未结束: n Flag not closed: n
UpDataRes Status 1 状 态 服务器对终端上传数据的 报告 处理结果。 Status Code String F3 返 回 401 -鉴权失败。 UpDataRes Status 1 Status report processing result of the terminal uploading data to the terminal. Status Code String F3 Returns 401 - Authentication failed.
代码 400 -请求报文格式错误 Code 400 - Request message format error
( 如 Msgld isFinal,DataType,MaxMsg Size,Type,Code 等字段未 按规范格式填写) 。 (Fields such as Msgld isFinal, DataType, MaxMsg Size, Type, Code are not filled in the specification format).
510 -服务器数据操作失 败。 510 - Server data operation failed.
900 -用户数据同步锁存 在 (如用户正使用其它终 端进行操作) 。 900 - User data sync latching (if the user is using another terminal to operate).
000 -成功。 000 - successful.
999 -部分成功。 999 - Partially successful.
说明: 当返回 000 时表示 完全成功, 操作可以继续; 当返回 999 时表示部分成 功, 需要查看 Fail字段了 解详细信息; 当返回其它 错误码时, 表示本次会话 失败, 需要关闭。 Status Fail String 失 败 当部分成功时填写。 NOTE: When returning 000, it means complete success, the operation can continue; when it returns 999, it means partial success, you need to check the Fail field for details; when returning other error codes, it means that this session fails and needs to be closed. Status Fail String Failure to fill in when the part is successful.
信息 格式: 联系人分组名称#三 位错误码, 10#三位错误 码, 其中 "#,' 和 "," 为分 隔符。 如同学 #400,同事 #400。 Information Format: Contact group name # three digit error code, 10# three digit error code, where "#," and "," are separators. For example, classmate #400, colleague #400.
400 -数据格式错误。 400 - The data format is incorrect.
420 -服务器存储空间不 足。 420 - Server storage space is insufficient.
注: 如果服务器返回 420 错误码, 则表示服务器存 储空间不足, 服务器将结 束本次会话, 即当应答报 文中存在 420 错误码时 IsSessionEnd 标签取值必 然是 y。 Note: If the server returns a 420 error code, it indicates that the server has insufficient storage space and the server will end the session. That is, when there is a 420 error code in the response message, the value of the IsSessionEnd tag must be y.
500 -服务器内部错误。 510 -服务器数据库操作 失败。 500 - Server internal error. 510 - Server database operation failed.
下面可以通过一个具体实施例, 来说明本发明实施例的详细过程。 例 如: 当终端与服务器之间联系人的个人信息的同步完成之后, 终端准备向 服务器发送终端存储的联系人的分组信息时, 终端可以向服务器发送如下 分组上传请求报文: The detailed process of the embodiment of the present invention will be described below by way of a specific embodiment. For example: After the synchronization of the personal information of the contact between the terminal and the server is completed, when the terminal is ready to send the group information of the contact stored by the terminal to the server, the terminal may send the following to the server: Packet upload request message:
POST http://pim. monternet. com/yjb/sync POST http://pim. monternet. com/yjb/sync
x-ds-data-type: grp X-ds-data-type: grp
x-ds-oper-type: up X-ds-oper-type: up
<?xml version:" 1.0" encoding="UTF-8"?> <?xml version:" 1.0" encoding="UTF-8"?>
<UpDataReq>〈!—上传联系人分组—〉 <UpDataReq><! - Upload contact grouping ->
<SessionID>K/SessionID> <SessionID>K/SessionID>
<MsgID>K/MsgID> <MsgID>K/MsgID>
<Cred> <Cred>
<Type xmlns= ' sync ml: metinf >syncml: auth-md5</Type> <Format xmlns= ' syncml: metinf >b64</Format> <Type xmlns= ' sync ml: metinf >syncml: auth-md5</Type> <Format xmlns= ' syncml: metinf >b64</Format>
<Data>Zz6EivR3yeaaENcRN61pAQ==</Data> <Data>Zz6EivR3yeaaENcRN61pAQ==</Data>
</Cred> </Cred>
<MaxMsgSize> 100000</MaxMsgSize> <!--终端支持的最大消息长度, 压缩前的消息长度, 单位: 字节 〉 <MaxMsgSize> 100000</MaxMsgSize> <!--Maximum message length supported by the terminal, length of message before compression, unit: Byte 〉
<DevID〉IMEI: 1234567890123456</DevID〉 <! --终端设备标识—〉 <DevID>IMEI: 1234567890123456</DevID> <! -- Terminal Equipment Identification ->
<DataType>grp</DataType> <!~grp: 联系人分组—〉 <DataType>grp</DataType> <!~grp: Contact grouping ->
<Grp> <!—联系人分组—〉 <Grp> <!—Contact Grouping—>
<N〉同学<^> <!--联系人分组名称—〉 <N>Classmate <^> <!--Contact Group Name ->
<M〉10001, 10002, 10003, 10004</M〉<—联系人分组成员, LUID之间用 <M>10001, 10002, 10003, 10004</M><—Contact group members, used between LUIDs
"," 分隔—〉 </Grp> "," Separation -> </Grp>
<Grp> <!—联系人分组—〉 <Grp> <!—Contact Grouping—>
<N>同事<^> <! --联系人分组名称—〉 <N>Colleague <^> <! -- Contact group name ->
<M>20001 , 10002, 10003 ,20004</M> <—联系人分组成员, LUID之间用 <M>20001 , 10002, 10003 , 20004</M> <—contact group members, used between LUIDs
"," 分隔—〉 "," Separation ->
</Grp> </Grp>
<Grp> <!—联系人分组—〉 <Grp> <!—Contact Grouping—>
<N〉足球队 </N〉 <!--联系人分组名称—〉 <N> football team </N> <!--contact group name->
<M>20001 , 10002,30003 ,40004</M> <—联系人分组成员, LUID之间用 <M>20001, 10002,30003,40004</M> <—Contact group members, used between LUIDs
"," 分隔—〉 "," Separation ->
</Grp> </Grp>
<Grp> <!—联系人分组—〉 <Grp> <!—Contact Grouping—>
<N〉魔兽 </N〉 <!--联系人分组名称—〉 <N>Warcraft </N> <!--Contact Group Name ->
<M〉</M〉<—空分组, 没有任何成员 LUID- -〉 <M></M><—empty group, no member LUID-->
</Grp> </Grp>
<IsFinal>n</IsFinal> <!--表示数据尚未全部发完—〉 <IsFinal>n</IsFinal> <!-- indicates that the data has not been completely sent yet ->
</UpDataReq> </UpDataReq>
服务器接收到上述分组上传请求报文, 对上述分组上传请求报文进行 鉴权, 鉴权通过之后, 对存储的联系人的个人信息进行分组存储, 并向终 端返回如下分组上传应答报文: The server receives the packet upload request packet, and authenticates the packet upload request packet. After the authentication is passed, the stored personal information of the contact is stored in a packet, and the following packet upload response message is returned to the terminal:
<?xml version:" 1.0" encoding="UTF-8"?> <?xml version:" 1.0" encoding="UTF-8"?>
<UpDataRes> <SessionID>K/SessionID> <UpDataRes> <SessionID>K/SessionID>
<MsgID>K/MsgID> <MsgID>K/MsgID>
<Cred> <Cred>
<Type xmlns= ' sync ml: metinf >syncml: auth-md5</Type> <Format xmlns= ' syncml: metinf >b64</Format> <Type xmlns= ' sync ml: metinf >syncml: auth-md5</Type> <Format xmlns= ' syncml: metinf >b64</Format>
<Data>adggjtrtryeaa356ssrtnrr==</Data> <Data>adggjtrtryeaa356ssrtnrr==</Data>
</Cred> </Cred>
<Is S e s s ionEnd>n</Is S e s s ionEnd> <!--会话结束标志: y—结束、 n—未 结束 --〉 <Is S e s s ionEnd>n</Is S e s s ionEnd> <!--session end flag: y-end, n-not ended->
<Status> <Status>
<Code>999</Code> <!—响应结果, 401 -鉴权失败, 000 -成功, 999 -部分成功 〉 <Code>999</Code> <!—Response to the result, 401 - Authentication failed, 000 - Success, 999 - Partially successful 〉
<Fail〉同学 #400,同事 #400</Fail〉 <!--失败数据, 联系人分组名称#三位 错误码, 联系人分组名称#三位错误码, 其中 #和,为分隔符。 400 -数据格式 错误, 420 -服务器存储空间不足 〉 <Fail> Classmate #400, Colleague #400</Fail> <!--Failure data, contact group name # three digits Error code, contact group name # three digit error code, where # and are separators. 400 - Data format error, 420 - insufficient server storage space 〉
</Status> </Status>
<RespURI>http://10.0.0.1 :80/yjb/sync?sid=1400MjAwODA5MjctMDIyN TE4LTU0MS0yMTEuMTM4LjE4NC4yMDE</RespURI> 〈!—终端后续请求 消息的目的 URI地址, 其中 sid为服务器分配的本次会话 ID, 负载均衡器 根据 sid中的服务器模块 ID (如 1400 ) 分发消息 〉 <RespURI>http://10.0.0.1 :80/yjb/sync?sid=1400MjAwODA5MjctMDIyN TE4LTU0MS0yMTEuMTM4LjE4NC4yMDE</RespURI> 〈! - Terminal subsequent request The destination URI address of the message, where sid is the current session ID assigned by the server, and the load balancer distributes the message according to the server module ID (such as 1400) in the sid.
</UpDataRes> </UpDataRes>
终端接收到上述分组上传应答报文, 对上述分组上传应答报文进行鉴 权, 鉴权通过之后, 继续向服务器发送终端存储的剩余联系人的分组信息, 终端可以向服务器发送如下分组上传请求报文: Receiving, by the terminal, the packet upload response message, and performing the packet upload response message After the authentication is passed, the packet information of the remaining contacts stored in the terminal is continuously sent to the server, and the terminal may send the following packet upload request message to the server:
POST POST
http://10.0.0.1 :80/yjb/sync/?sid=1400MjAwODA5MjctMDIyNTE4LTU0 MS0yMTEuMTM4LjE4NC4yMDE Http://10.0.0.1 :80/yjb/sync/?sid=1400MjAwODA5MjctMDIyNTE4LTU0 MS0yMTEuMTM4LjE4NC4yMDE
x-ds-data-type: grp X-ds-data-type: grp
x-ds-oper-type: up X-ds-oper-type: up
<?xml version:" 1.0" encoding="UTF-8"?> <?xml version:" 1.0" encoding="UTF-8"?>
<UpDataReq>〈!—上传联系人分组—〉 <UpDataReq><! - Upload contact grouping ->
<SessionID>K/SessionID> <SessionID>K/SessionID>
<MsgID>2</MsgID> <MsgID>2</MsgID>
<MaxMsgSize> 100000</MaxMsgSize> <!--终端支持的最大消息长度, 压缩前的消息长度, 单位: 字节 〉 <MaxMsgSize> 100000</MaxMsgSize> <!--Maximum message length supported by the terminal, length of message before compression, unit: Byte 〉
<DevID〉IMEI: 1234567890123456</DevID〉 <! --终端设备标识—〉 <DevID>IMEI: 1234567890123456</DevID> <! -- Terminal Equipment Identification ->
<DataType>grp</DataType> <!― gr : 联系人分组 --〉 <DataType>grp</DataType> <! ― gr : contact group -->
<Grp> <!—联系人分组—〉 <Grp> <!—Contact Grouping—>
<N〉家人 </N〉 <!--联系人分组名称—〉 <N>Family </N> <!--Contact Group Name ->
<M>50001,50002,50003,50004</M>〈—联系人分组成员, LUID之间用 <M>50001,50002,50003,50004</M><—Contact group members, used between LUIDs
"," 分隔—〉 "," Separation ->
</Grp> </Grp>
<Grp> <!—联系人分组—〉 <N>^f^</N> <!—联系人分组名称—〉 <Grp><!—ContactGrouping—> <N>^f^</N><!—Contact Group Name—〉
<M>60001,60002,60003,60004</M> <—联系人分组成员, LUID之间用 <M>60001,60002,60003,60004</M> <—Contact group members, used between LUIDs
"," 分隔—〉 "," Separation ->
</Grp> </Grp>
<Grp> <!—联系人分组—〉 <Grp> <!—Contact Grouping—>
<N〉飞信好友< 〉 <!--联系人分组名称—〉 <N>Fetion friend < 〉 <!--Contact group name ->
<M>70001,70002,70003,70004</M>〈—联系人分组成员, LUID之间用 <M>70001,70002,70003,70004</M><—Contact group members, used between LUIDs
"," 分隔—〉 "," Separation ->
</Grp> </Grp>
<IsFinal>y</IsFinal> <!- 表示数据已经全部发完 --〉 <IsFinal>y</IsFinal> <!- indicates that the data has been completely sent -->
</UpDataReq> </UpDataReq>
服务器接收到上述分组上传请求报文, 进行鉴权(简单根据报文中包 含的会话标识进行鉴权即可, 与现有技术类似, 此处不再赘述) , 鉴权通 过之后, 对存储的剩余联系人的个人信息进行分组存储, 并向终端返回如 下分组上传应答报文: The server receives the packet upload request packet and performs authentication (simplely according to the session identifier included in the packet, which is similar to the prior art, and is not described here). After the authentication is passed, the storage is performed. The personal information of the remaining contacts is stored in a packet, and the following packet upload response message is returned to the terminal:
<?xml version:" 1.0" encoding="UTF-8"?> <?xml version:" 1.0" encoding="UTF-8"?>
<UpDataRes> <UpDataRes>
<SessionID>K/SessionID> <SessionID>K/SessionID>
<MsgID>2</MsgID> <MsgID>2</MsgID>
<Is S e s s ionEnd>y</Is S e s s ionEnd> <!--会话结束标志: y—结束、 n—未 结束 --〉 <Is S e s s ionEnd>y</Is S e s s ionEnd> <!--session end flag: y-end, n-not ended->
<Status> <Code〉000</Code〉<!—响应结果, 000 -成功, 999 -部分成功—〉<Status> <Code>000</Code><!—Response results, 000 - success, 999 - partial success ->
</Status> </Status>
</UpDataRes> </UpDataRes>
需要说明的是: 本实施例中, 在同一个会话中, 对于双方的第一个消 息, 需要发送鉴权认证信息, 即<0^3〉字段, 接收方对发送方进行认证。 在认证通过后的消息中, 双方只需要发送会话标识, 即<8688101 10〉字段, 接收方对发送方进行简单认证即可。 因为此会话是经过认证了的, 双方在 此会话中的后续的消息是可以信任的。 It should be noted that, in this embodiment, in the same session, for the first message of both parties, authentication authentication information, that is, a <0^3> field, is required, and the receiver authenticates the sender. In the message after the authentication is passed, the two parties only need to send the session identifier, that is, the <8688101 10> field, and the receiver can simply authenticate the sender. Because this session is authenticated, subsequent messages from both parties in this session are trustworthy.
进一步地, 用户或业务提供商也可以通过登陆门户网站 (Web Portal ) 的方式从服务器侧主动发起联系人的分组信息的同步。 具体地, 服务器可 以向终端发送通知消息, 用以通知终端发起与服务器进行联系人的分组信 息的同步, 上述通知消息中需要包含联系人的分组信息的同步标识。 终端 可以根据接收到的上述通知消息, 向服务器发送分组上传请求报文, 进行 联系人的分组信息的同步。 其中, 上述通知消息可以通过短消息、 无线应 用协议( Wireless Application Protocol , 简称 WAP )推送( Push ) 消息等进 行承载。 Further, the user or the service provider can also initiate synchronization of the group information of the contact from the server side by logging in to the portal (Web Portal). Specifically, the server may send a notification message to the terminal to notify the terminal to initiate synchronization with the server for the group information of the contact, and the notification message needs to include the synchronization identifier of the group information of the contact. The terminal may send a packet upload request message to the server according to the received notification message, and synchronize the group information of the contact. The foregoing notification message may be carried by a short message, a Wireless Application Protocol (WAP) Push message, or the like.
进一步地, 本实施例中, 当终端对联系人的分组信息进行更新 (包括 增加、 删除以及修改) 时, 终端可以通过分组上传请求报文向服务器发送 终端更新之后的全部的联系人的分组信息 (分组名称及分组名称对应的成 员标识信息) , 根据来自终端的联系人的分组信息对自身存储的联系人的 个人信息进行分组存储, 例如: 如果终端更新了分组名称和 /或分组名称对 应的成员标识信息, 则可以向服务器发送包含更新之后的联系人的分组信 息的分组上传请求报文, 则服务器在自身存储的联系人的个人信息中也相 应地更新分组名称和 /或分组名称对应的成员标识信息。 具体地, 服务器可 以通过维护一个修改记录表(Change Log ) , 来实现同步联系人的分组信 息。 这个修改记录表是维护从上次同步以来服务器端对联系人的分组信息 作的修改的一个记录。 服务器将自身存储的联系人的分组信息与终端发送 来的联系人的分组信息进行比较, 即可获知终端更新的联系人的分组信息。 而服务器从自身的修改记录表(即 Change Log ) 中, 则可获知自身更新的 联系人的分组信息。 根据获知的上述终端和服务器更新的联系人的分组信 息, 服务器则可以进行相应的同步操作。 Further, in this embodiment, when the terminal updates the group information of the contact (including adding, deleting, and modifying), the terminal may send the group information of all contacts after the terminal update to the server by using the packet upload request message. (member name information corresponding to the group name and the group name), and storing the personal information of the contact stored by the user according to the grouping information of the contact from the terminal, for example: if the terminal updates the group name and/or the group name corresponding to the group name Member identification information, you can send a packet message containing the contact after the update to the server. The packet uploading request message of the information, the server also updates the member identification information corresponding to the group name and/or the group name in the personal information of the contact stored by the server. Specifically, the server can synchronize the grouping information of the contact by maintaining a Change Log. This modification record table is a record that maintains the modification of the grouping information of the contacts by the server since the last synchronization. The server compares the grouping information of the contact stored by the server with the grouping information of the contact sent by the terminal, and can obtain the grouping information of the contact updated by the terminal. The server can obtain the group information of the contact that is updated by itself from its own modification record table (ie, Change Log). According to the obtained grouping information of the contact updated by the terminal and the server, the server can perform a corresponding synchronization operation.
可选地, 在终端与服务器进行联系人信息 (联系人的个人信息和联系 人的分组信息) 的同步之后, 若终端对联系人的分组信息进行了更新, 则 终端可以在向来自服务器的分组上传请求报文中包含更新的联系人的分组 信息和用于标识报文中的联系人的分组信息的范围的标识信息, 上述标识 信息可以标识报文中的联系人的分组信息为全部的联系人的分组信息或更 新的联系人的分组信息。 Optionally, after the terminal and the server perform synchronization of the contact information (personal information of the contact and the group information of the contact), if the terminal updates the group information of the contact, the terminal may be in the grouping from the server. The upload request message includes the grouping information of the updated contact and the identification information of the range of the grouping information for identifying the contact in the message, and the identifier information may identify the grouping information of the contact in the message as the total contact. Grouping information of a person or grouping information of an updated contact.
需要说明的是: 如果终端上的更新与服务器上的更新相沖突, 则服务 器可以根据自身配置的沖突处理策略来进行判断,判定以终端的更新为准, 还是以服务器自身的更新为准, 从而进行同步。 例如: 终端把某个分组删 除了, 而服务器把这个分组修改了分组名称即对此分组进行了修改, 如果 服务器的判断结果是以终端的更新为准, 则服务器会删除此分组。 It should be noted that: if the update on the terminal conflicts with the update on the server, the server may perform a judgment according to the conflict processing policy configured by the server, and determine whether the update of the terminal is correct or the update of the server itself. Synchronize. For example: The terminal deletes a packet, and the server modifies the packet by modifying the packet name. If the server determines that the update is based on the terminal, the server deletes the packet.
进一步地, 本发明实施例中, 终端还可以发送主动取消通知报文, 用 以取消上传联系人的分组信息, 具体地, 主动取消通知 文的 HTTP 消息 头中需要增加控制参数 "X-DS-Abort-Sync" 。 如果用户通过终端取消同步 则携带该参数且参数值为 "True" , 消息体为空; 否则, 不携带此参数。 例如: Further, in the embodiment of the present invention, the terminal may further send an active cancellation notification message, which is used to cancel the grouping information of the uploading contact, and specifically, cancel the HTTP message of the notification text. The control parameter "X-DS-Abort-Sync" needs to be added to the header. If the user cancels the synchronization through the terminal, the parameter is carried and the parameter value is "True", and the message body is empty; otherwise, this parameter is not carried. E.g:
POST POST
http://10.0.0.1 :80/yjb/sync?sid=1400MjAwODA5MjctMDIyNTE4LTU0M S0yMTEuMTM4LjE4NC4yMDE Http://10.0.0.1 :80/yjb/sync?sid=1400MjAwODA5MjctMDIyNTE4LTU0M S0yMTEuMTM4LjE4NC4yMDE
X-DS-Abort-Sync: True X-DS-Abort-Sync: True
需要说明的是: 当服务器遇到如下异常情况时, 服务器将直接返回 HTTP 400错误, 不会返回应答报文, 终端接收到 HTTP 400错误之后, 将 终止本次操作并向用户提示失败信息。 异常情况可以包括但不限于以下情 况: It should be noted that: When the server encounters the following abnormal conditions, the server will directly return an HTTP 400 error and will not return a response message. After receiving the HTTP 400 error, the terminal will terminate the operation and prompt the user with the failure information. Abnormal conditions can include, but are not limited to, the following:
请求报文经过的 WAP网关 IP地址非法; The WAP gateway IP address through which the request packet passes is illegal;
请求报文的 HTTP头中的相关参数不存在或取值非法; The related parameters in the HTTP header of the request packet do not exist or are illegal.
请求报文对应会话过期或不存在; The request message corresponds to the session expiration or does not exist;
请求报文码流解析失败。 The request packet stream resolution failed.
本实施例中, 通过终端向服务器发送包含联系人的分组信息的分组上 传请求报文, 从而使得服务器能够根据上述联系人的分组信息, 对存储的 联系人的个人信息进行分组存储, 实现了终端到服务器的联系人的分组信 息的同步, 从而使得终端到服务器的联系人信息 (联系人的个人信息和联 系人的分组信息) 能够准确同步, 提高了联系人信息同步的准确性。 In this embodiment, the terminal sends a packet upload request message including the grouping information of the contact to the server, so that the server can store the personal information of the stored contact according to the grouping information of the contact, and implement the terminal. The synchronization of the grouping information of the contacts to the server enables the terminal-to-server contact information (personal information of the contact and the grouping information of the contacts) to be accurately synchronized, improving the accuracy of the synchronization of the contact information.
图 3为本发明实施例三提供的另一种联系人信息的同步方法的流程示 意图, 本实施例适用于服务器到终端的单向同步的场景。 如图 3所示, 本 实施例的联系人信息的同步方法可以包括以下步骤: FIG. 3 is a schematic flowchart of another method for synchronizing contact information according to Embodiment 3 of the present invention. This embodiment is applicable to a scenario in which a server-to-terminal one-way synchronization is performed. As shown in Figure 3, this The method for synchronizing contact information of an embodiment may include the following steps:
步骤 301、 终端与服务器进行联系人的个人信息的同步; Step 301: The terminal and the server synchronize the personal information of the contact;
终端与服务器进行联系人的个人信息的同步可以参考现有技术中终端 从服务器下载联系人的个人信息的方法, 实现服务器到终端的单向同步, 此处不再赘述。 For the synchronization of the personal information of the contact between the terminal and the server, refer to the method for downloading the personal information of the contact from the server by the terminal in the prior art, and the one-way synchronization between the server and the terminal is implemented, and details are not described herein.
步骤 302、 上述终端向上述服务器发送分组下载请求报文; Step 302: The terminal sends a packet download request message to the server.
步骤 303、 上述终端接收上述服务器返回的分组下载应答报文, 上述 分组下载应答报文中包含联系人的分组信息; Step 303: The terminal receives the packet download response message returned by the server, where the packet download response message includes packet information of the contact;
步骤 304、 上述终端根据上述联系人的分组信息, 对存储的上述联系 人的个人信息进行分组存储。 Step 304: The terminal stores the stored personal information of the contact according to the grouping information of the contact.
其中, 上述联系人的分组信息可以包括分组名称和与上述分组名称对 应的成员标识信息。上述成员标识信息可以为终端的本地唯一标识( Locally Unique Identifier, 简称 LUID ) 。 The grouping information of the contact may include a group name and member identification information corresponding to the group name. The member identification information may be a Locally Unique Identifier (LUID) of the terminal.
本实施例中, 通过终端接收来自服务器的包含联系人的分组信息的分 组下载应答报文, 从而使得终端能够根据上述联系人的分组信息, 对存储 的联系人的个人信息进行分组存储, 实现了服务器到终端的联系人的分组 信息的同步, 从而使得服务器到终端的联系人信息 (联系人的个人信息和 联系人的分组信息) 能够准确同步, 提高了联系人信息同步的准确性。 In this embodiment, the terminal receives the packet download response message from the server that includes the packet information of the contact, so that the terminal can store the personal information of the stored contact according to the grouping information of the contact, thereby realizing The synchronization of the grouping information of the server-to-terminal contact enables the server-to-terminal contact information (personal information of the contact and the grouping information of the contact) to be accurately synchronized, improving the accuracy of the synchronization of the contact information.
图 4为本发明实施例四提供的另一种联系人信息的同步方法的流程示 意图, 本实施例适用于服务器到终端的单向同步的场景。 如图 4所示, 本 实施例的联系人信息的同步方法可以包括以下步骤: FIG. 4 is a schematic flowchart of another method for synchronizing contact information according to Embodiment 4 of the present invention. This embodiment is applicable to a scenario in which a server-to-terminal one-way synchronization is performed. As shown in FIG. 4, the method for synchronizing contact information in this embodiment may include the following steps:
步骤 401、 终端与服务器进行联系人的个人信息的同步; 终端与服务器进行联系人的个人信息的同步可以参考现有技术中终端 从服务器下载联系人的个人信息的方法, 实现服务器到终端的单向同步, 此处不再赘述。 Step 401: The terminal and the server synchronize the personal information of the contact; For the synchronization of the personal information of the contact between the terminal and the server, refer to the method for downloading the personal information of the contact from the server by the terminal in the prior art, and the one-way synchronization between the server and the terminal is implemented, and details are not described herein again.
步骤 402、 终端向服务器发送分组下载请求报文; Step 402: The terminal sends a packet download request message to the server.
具体地,上述分组下载请求报文的超文本传输协议( HyperText Transfer Protocol,简称 HTTP )头中需要上传 x-ds-data-type扩展字段、 x-ds-oper-type 扩展字段和 x-up-calling-line-id字段, 其中, x-ds-data-type扩展字段的取值 为 grp (联系人分组) , 例如: x-ds-data-type: grp, x-ds-oper-type扩展字段 的取值可以为 dn (下载) , 例如: x-ds-oper-type: dn, x-up-calling-line-id 字段的取值为终端的用户名 ( user id ) , 例如: x-up-calling-line-id: 139111 1111 1。 具体地, 上述分组下载请求报文的内容可以参见表 3所示。 Specifically, the hypertext transfer protocol (HTTP) header of the foregoing packet download request message needs to upload an x-ds-data-type extension field, an x-ds-oper-type extension field, and an x-up- The calling-line-id field, where the value of the x-ds-data-type extension field is grp (contact grouping), for example: x-ds-data-type: grp, x-ds-oper-type extension field The value can be dn (download), for example: x-ds-oper-type: dn, the value of the x-up-calling-line-id field is the user name of the terminal ( user id ), for example: x-up -calling-line-id: 139111 1111 1. Specifically, the content of the foregoing packet download request message can be seen in Table 3.
表 3 分组下载请求报文的内容 Table 3 Contents of the packet download request message
DnDataReq MsgID 1 String 报文编号 消息标识, 每次会话 中, 消息标识从 1开 始递增。 DnDataReq MsgID 1 String Message number message ID, the message ID is incremented from 1 in each session.
DnDataReq Cred 0..1 —— —— 认证信息 鉴权认证信息。 DnDataReq Cred 0..1 —— —— Authentication Information Authentication and authentication information.
Cred Type 1 String 认证类型 认证的类型, 包括 Cred Type 1 String Authentication Type The type of authentication, including
MD5认证、 SHA-1、 SHA-256等。 MD5 authentication, SHA-1, SHA-256, etc.
Cred Format 1 String - 认证格式 认证信息的格式, 包 括 b64、 binary等。 Cred Format 1 String - Authentication format The format of the authentication information, including b64, binary, etc.
Cred Data 1 String - 认证数据 用于认证的数据。Cred Data 1 String - Authentication data Data used for authentication.
DnDataReq MsgID 1 String - 报文编号 每次会话从 1开始递 增。 DnDataReq MsgID 1 String - Message number Each session is incremented from 1 onwards.
DnDataReq MaxMsgSize 1 String 终端支持 压缩前的消息长度, 的最大消 单位: 字节。 DnDataReq MaxMsgSize 1 String Terminal support The length of the message before compression, the maximum unit of elimination: Byte.
息长度 Interest length
DnDataReq DevID 1 String 终端设备 一般填写为终端的 标识 IMEI 号信息, 用于 唯一标识一个终端 设备。 DnDataReq DevID 1 String Terminal device Generally filled in as the terminal's identification IMEI number information, used to uniquely identify a terminal device.
DnDataReq DataType 1 String 数据类型 该报文承载的数据 类型。 DnDataReq DataType 1 String Data Type The type of data carried by this message.
grp: 联系人分组。 Grp: Contact grouping.
Status Fail String 错误信息 当部分成功时填写。 Status Fail String Error message Fill in when the part is successful.
格式: 联系人分组名 称#三位错误码, 联 系人分组名称 #三位 错误码, 其中 #和,为 分隔符。如同学 #400, 同事 #400。 Format: Contact group name #三位错误码, contact group name #三位 Error code, where #和, is the separator. Such as classmate #400, colleague #400.
400 - 数据格式错 误。 420 -终端存储 空间不足。 400 - Data format error. 420 - The terminal storage space is insufficient.
注: 如果终端返回 420错误码, 则表示 终端存储空间不足, 服务器需要结束本 次会话, 即当终端请 求报文中存在 420错 误码时, 服务器在下 一个应答 4艮文中必 须设置 IsSessionEnd 标签取值为 y。 Note: If the terminal returns 420 error code, it means that the terminal has insufficient storage space. The server needs to end the session. That is, when there is 420 error code in the terminal request message, the server must set the value of the IsSessionEnd tag in the next response message. y.
步骤 403、 服务器向终端返回分组下载应答报文, 上述分组下载应答 报文中包含联系人的分组信息; 其中, 上述联系人的分组信息可以包括分组名称和与上述分组名称对 应的成员标识信息。上述成员标识信息可以为终端的本地唯一标识( Locally Unique Identifier, 简称 LUID ) 。 Step 403: The server returns a packet download response message to the terminal, where the packet download response message includes packet information of the contact. The grouping information of the contact may include a group name and member identification information corresponding to the group name. The member identification information may be a Locally Unique Identifier (LUID) of the terminal.
进一步地, 本步骤中, 服务器还可以对接收到的分组下载请求报文进 行鉴权, 鉴权通过之后, 向终端返回分组下载应答报文。 Further, in this step, the server may further authenticate the received packet download request message, and after the authentication is passed, return a packet download response message to the terminal.
具体地, 上述鉴权过程可以参见上述本发明实施例二中的相关描述, 此处不再赘述。 For details, refer to the related description in the foregoing Embodiment 2 of the present invention, and the details are not described herein again.
具体地, 上述分组下载应答报文的内容可以参见表 4所示。 Specifically, the content of the foregoing packet download response message can be seen in Table 4.
表 4 分组下载应答报文的内容 Table 4 Contents of the group download response message
Cred Type 1 String 认证类 认证的类型, 包括 MD5 型 认证、 SHA-1、 SHA-256 等。 Cred Type 1 String Type of authentication type, including MD5 type authentication, SHA-1, SHA-256, and so on.
Cred Format 1 String 认证格 认证信息的格式, 包括 式 b64、 binary等。 Cred Format 1 String Authentication format The format of the authentication information, including b64, binary, and so on.
Cred Data 1 String 认证数 用于认证的数据。 Cred Data 1 String Authentication Number The data used for authentication.
据 According to
DnDataRes MsgID 1 String 报文编 每次会话从 1开始递增。 DnDataRes MsgID 1 String Messages Each session is incremented from 1.
号 number
DnDataRes RespURI ? String 后续请 在第一个应答报文中填 求 目 标 写。 DnDataRes RespURI ? String Follow-up Please fill in the target message in the first response message.
URI 终端后续请求消息的目 标 URI地址。 The target URI address of the subsequent request message of the URI terminal.
DnDataRes IsFinal 1 String Fl 发送结 联系人分组数据下载结 束标志 束标志。 DnDataRes IsFinal 1 String Fl Sending a knot Contact group data download end flag Bundle flag.
结束: y End: y
未结束: n Not ended: n
DnDataRes IsSessionEn 1 String 会话结 会话结束标志。 DnDataRes IsSessionEn 1 String Session End Session End Flag.
d 1 束标志 结束: y d 1 bundle sign end: y
未结束: n Not ended: n
DnDataRes Status 1 一 一 状态报 服务器对终端上传报文 的处理结果。 Status Code String F3 401 -鉴权失败。 DnDataRes Status 1 The status of the processing of the message uploaded by the terminal to the terminal. Status Code String F3 401 - Authentication failed.
400 -请求报文格式错误 400 - Request message format error
( 如 Msgld isFinal,DataType,MaxMsg Size,Type,Code 等字段未 按规范格式填写) 。(Fields such as Msgld isFinal, DataType, MaxMsg Size, Type, Code are not filled in the specification format).
510 -服务器数据操作失 败。 510 - Server data operation failed.
900 -用户数据同步锁存 在(如用户正使用其它终 端进行操作) 。 900 - User data sync latching (if the user is using another terminal to operate).
000 -成功。 000 - successful.
999 -部分成功。 999 - Partially successful.
说明: 当返回 000时表示 完全成功, 操作可以继 续; 当返回 999时表示部 分成功, 需要查看 Fail字 段了解详细信息; 当返回 其它错误码时, 表示本次 会话失败, 需要关闭。 Status Fail ? String 失败信 当部分成功时填写。 NOTE: When returning 000, it means complete success, the operation can continue; when it returns 999, it means partial success, you need to check the Fail field for detailed information; when returning other error codes, it means that this session fails and needs to be closed. Status Fail ? String Failure letter is filled in when the part is successful.
自、、 格式: ID#三位错误码, ID# From, format: ID# three-digit error code, ID#
三位错误码, 其中 " #,, 和 ", " 为分隔符。 如 1001#400,1002#400„ 400 -数据格式错误。 Three-digit error code, where " #,, and ", " are separators. For example, 1001#400,1002#400„ 400 - Data format error.
500 -服务器内部错误。 500 - Server internal error.
510 -服务器数据库操作 失败。 510 - Server database operation failed.
DnDataRes Grp 一 一 联系 人 服务器上有 0到多个联系 分组 人分组信息。 DnDataRes Grp One Contact There are 0 or more contacts on the server. Grouping information.
Grp N 1 String 联系 人 联系人分组名称不允许 分组名 重复。 Grp N 1 String Contact Contact group name not allowed Group name Duplicate.
称 Weigh
Grp M 1 String 联系 人 一个联系人可以属于多 分组成 个分组。 Grp M 1 String Contact A contact can belong to multiple groups.
贝 联系人分组成员用终端 本地 LUID 表示, 多个 LUID之间用 ","分隔, 例 如: 1001,1002,1003,1004。 步骤 404、 终端根据上述联系人的分组信息, 对存储的上述联系人的 个人信息进行分组存储。 进一步地, 本步骤中, 终端还可以对接收到的分组下载应答报文进行 鉴权, 鉴权通过之后, 对存储的上述联系人的个人信息进行分组存储。 The shell contact group members are represented by the terminal local LUID, and the multiple LUIDs are separated by ",", for example: 1001, 1002, 1003, 1004. Step 404: The terminal stores the stored personal information of the contact according to the grouping information of the contact. Further, in this step, the terminal may further perform authentication on the received packet download response message, and after the authentication is passed, store the stored personal information of the contact.
具体地, 终端的鉴权方法与服务器的鉴权方法类似, 其鉴权过程也同 样可以参见上述本发明实施例二中的相关描述, 此处不再赘述。 Specifically, the authentication method of the terminal is similar to the authentication method of the server, and the authentication process is also referred to the related description in the second embodiment of the present invention, and details are not described herein again.
下面可以通过一个具体实施例, 来说明本发明实施例的详细过程。 例 如: 当终端与服务器之间联系人的个人信息的同步完成之后, 终端准备从 服务器下载服务器存储的联系人的分组信息时, 终端可以向服务器发送如 下分组下载请求报文: The detailed process of the embodiment of the present invention will be described below by way of a specific embodiment. For example: After the synchronization of the personal information of the contact between the terminal and the server is completed, when the terminal prepares to download the group information of the contact stored by the server from the server, the terminal may send the following packet download request message to the server:
POST http://pim. monternet. com/yjb/sync POST http://pim. monternet. com/yjb/sync
x-ds-data-type: grp X-ds-data-type: grp
x-ds-oper-type: dn X-ds-oper-type: dn
<?xml version:" 1.0" encoding="UTF-8"?> <?xml version:" 1.0" encoding="UTF-8"?>
<DnDataReq> <!--下载联系人分组—〉 <DnDataReq> <!--Download contact grouping ->
<SessionID>2</SessionID> <SessionID>2</SessionID>
<MsgID>K/MsgID> <MsgID>K/MsgID>
<Cred> <Cred>
<Type xmlns= ' sync ml: metinf >syncml: auth-md5</Type> <Format xmlns= ' syncml: metinf >b64</Format> <Type xmlns= ' sync ml: metinf >syncml: auth-md5</Type> <Format xmlns= ' syncml: metinf >b64</Format>
<Data> aklj ahlg; kfdaj; oiduao d==</Data> <Data> aklj ahlg; kfdaj; oiduao d==</Data>
</Cred> </Cred>
<MaxMsgSize> 100000</MaxMsgSize> <!--终端支持的最大消息长度, 压缩前的消息长度, 单位: 字节 〉 <MaxMsgSize>100000</MaxMsgSize><!--The maximum message length supported by the terminal, Length of message before compression, unit: Byte>
<DevID>IMEI: 1234567890123456</DevID> <! - 终端设备标识 --〉 <DataType>grp</DataType> <!― gr : 联系人分组 --〉 <DevID>IMEI: 1234567890123456</DevID> <! - Terminal device identification --> <DataType>grp</DataType> <! ― gr : contact group -->
</DnDataReq> </DnDataReq>
服务器接收到上述分组下载请求报文, 对上述分组下载请求报文进行 鉴权, 鉴权通过之后, 向终端返回如下分组下载应答报文: The server receives the packet download request packet, and authenticates the packet download request packet. After the authentication is passed, the following group download response message is returned to the terminal:
<DnDataRes> <!--下载联系人分组—〉 <DnDataRes> <!--Download contact grouping ->
<SessionID>2</SessionID> <SessionID>2</SessionID>
<MsgID>K/MsgID> <MsgID>K/MsgID>
<IsSessionEnd>n</IsSessionEnd> <!--会话结束标志: y—结束、 n—未 结束 --〉 <IsSessionEnd>n</IsSessionEnd> <!--session end flag: y-end, n-not ended->
<Cred> <Cred>
<Type xmlns= ' sync ml: metinf >syncml: auth-md5</Type> <Format xmlns= ' syncml: metinf >b64</Format> <Type xmlns= ' sync ml: metinf >syncml: auth-md5</Type> <Format xmlns= ' syncml: metinf >b64</Format>
<Data>aakljagiuoiaeuaiojdg;ajg=</Data> <Data>aakljagiuoiaeuaiojdg;ajg=</Data>
</Cred> </Cred>
<Status> <Status>
<Code>000</Code> <!—响应结果, 401 -鉴权失败, 000 -成功, 999 -部分成功 〉 <Code>000</Code> <!—Response to the result, 401 - Authentication failed, 000 - Success, 999 - Partially successful 〉
</Status> </Status>
<RespURI>http://10.0.0.1 :80/yjb/sync?sid=1400MjAwODA5MjctMDIyN TE4LTU0MS0yMTEuMTM4LjE4NC4yMDE</RespURI> <! --终端后续请求 消息的目的 URI地址, 其中 sid为服务器分配的本次会话 ID, 负载均衡器 根据 sid中的服务器模块 ID (如 1400 ) 分发消息 〉 <RespURI>http://10.0.0.1 :80/yjb/sync?sid=1400MjAwODA5MjctMDIyN TE4LTU0MS0yMTEuMTM4LjE4NC4yMDE</RespURI><! -- Terminal follow-up request The destination URI address of the message, where sid is the current session ID assigned by the server, and the load balancer distributes the message according to the server module ID (such as 1400) in the sid.
<Grp> <!—联系人分组—〉 <Grp> <!—Contact Grouping—>
<N〉同学<^> <!--联系人分组名称—〉 <N>Classmate <^> <!--Contact Group Name ->
<M〉10001, 10002, 10003,10004</M〉<—联系人分组成员, LUID之间用 <M>10001, 10002, 10003, 10004</M><—Contact group members, used between LUIDs
"," 分隔—〉 "," Separation ->
</Grp> </Grp>
<Grp> <!—联系人分组—〉 <Grp> <!—Contact Grouping—>
<N>同事<^> <! --联系人分组名称—〉 <N>Colleague <^> <! -- Contact group name ->
<M>20001 , 10002, 10003 ,20004</M> <—联系人分组成员, LUID之间用 <M>20001 , 10002, 10003 , 20004</M> <—contact group members, used between LUIDs
"," 分隔—〉 "," Separation ->
</Grp> </Grp>
<Grp> <!—联系人分组—〉 <Grp> <!—Contact Grouping—>
<N〉足球队 </N〉 <!--联系人分组名称—〉 <N> football team </N> <!--contact group name->
<M>20001 , 10002,30003 ,40004</M> <—联系人分组成员, LUID之间用 <M>20001, 10002,30003,40004</M> <—Contact group members, used between LUIDs
"," 分隔—〉 "," Separation ->
</Grp> </Grp>
<Grp> <!—联系人分组—〉 <Grp> <!—Contact Grouping—>
<N〉魔兽 </N〉 <!--联系人分组名称—〉 <N>Warcraft </N> <!--Contact Group Name ->
<M></M> <- 空分组, 没有任何成员 LUID- -〉 <M></M> <- Empty group, no members LUID- ->
</Grp> </Grp>
<IsFinal>n</IsFinal> <!--表示数据尚未全部发完—〉 </DnDataRes> <IsFinal>n</IsFinal><!-- indicates that the data has not been completely sent yet -> </DnDataRes>
终端接收到上述分组下载应答报文, 对上述分组下载应答报文进行鉴 权, 鉴权通过之后, 对存储的联系人的个人信息进行分组存储, 向服务器 返回当前下载的联系人的分组信息的处理结果, 并继续准备从服务器下载 服务器存储的剩余联系人的分组信息, 终端可以向服务器发送如下分组下 载请求报文: The terminal receives the packet download response message, and authenticates the packet download response message. After the authentication is passed, the stored personal information of the contact is stored in groups, and the group information of the currently downloaded contact is returned to the server. Processing the result, and continuing to prepare to download the group information of the remaining contacts stored by the server from the server, and the terminal may send the following group download request message to the server:
POST POST
http://10.0.0.1 :80/yjb/sync/?sid=1400MjAwODA5MjctMDIyNTE4LTU0 MS0yMTEuMTM4LjE4NC4yMDE Http://10.0.0.1 :80/yjb/sync/?sid=1400MjAwODA5MjctMDIyNTE4LTU0 MS0yMTEuMTM4LjE4NC4yMDE
x-ds-data-type: grp X-ds-data-type: grp
x-ds-oper-type: dn X-ds-oper-type: dn
<?xml version:" 1.0" encoding="UTF-8"?> <?xml version:" 1.0" encoding="UTF-8"?>
<DnDataReq> <!--下载联系人分组—〉 <DnDataReq> <!--Download contact grouping ->
<SessionID>2</SessionID> <SessionID>2</SessionID>
<MsgID>2</MsgID> <MsgID>2</MsgID>
<MaxMsgSize> 100000</MaxMsgSize> <!--终端支持的最大消息长度, 压缩前的消息长度, 单位: 字节 〉 <MaxMsgSize> 100000</MaxMsgSize> <!--Maximum message length supported by the terminal, length of message before compression, unit: Byte 〉
<DevID〉IMEI: 1234567890123456</DevID〉 <! --终端设备标识—〉 <DataType>grp</DataType> <!― gr : 联系人分组 --〉 <DevID>IMEI: 1234567890123456</DevID> <! -- Terminal device identification —> <DataType>grp</DataType> <! ― gr : contact group -->
<Status> <Status>
<Code>999</Code> <!—响应结果, 401 -鉴权失败, 000 -成功, 999 -部分成功 〉 <Code>999</Code><!—Response to the result, 401 - Authentication failed, 000 - Success, 999 - Partial success>
<Fail〉同学 #400,同事 #400</Fail〉 <!--失败数据, 联系人分组名称#三位 错误码, 联系人分组名称#三位错误码, 其中 #和,为分隔符。 400 -数据格式 错误, 420 -终端存储空间不足 〉 <Fail> Classmate #400, Colleague #400</Fail> <!--Failure data, contact group name # three digits Error code, contact group name # three digit error code, where # and are separators. 400 - data format error, 420 - insufficient terminal storage space 〉
</Status> </Status>
</DnDataReq> </DnDataReq>
服务器接收到上述分组下载请求报文, 对上述分组下载请求报文进行 鉴权(简单根据报文中包含的会话标识进行鉴权即可, 与现有技术类似, 此处不再赘述) , 鉴权通过之后, 向终端返回如下分组下载应答报文: The server receives the packet download request packet, and performs the authentication on the packet download request packet. The authentication may be performed according to the session identifier included in the packet, which is similar to the prior art, and is not described here. After the right is passed, the following group download response message is returned to the terminal:
<DnDataRes> <!--下载联系人分组—〉 <DnDataRes> <!--Download contact grouping ->
<SessionID>2</SessionID> <SessionID>2</SessionID>
<MsgID>2</MsgID> <MsgID>2</MsgID>
<IsSessionEnd>n</IsSessionEnd> <!--会话结束标志: y—结束、 n—未 结束 --〉 <IsSessionEnd>n</IsSessionEnd> <!--session end flag: y-end, n-not ended->
<Status> <Status>
<Code>000</Code> <!—响应结果, 401 -鉴权失败, 000 -成功, 999 -部分成功 〉 <Code>000</Code> <!—Response to the result, 401 - Authentication failed, 000 - Success, 999 - Partially successful 〉
</Status> </Status>
<Grp> <!—联系人分组—〉 <Grp> <!—Contact Grouping—>
<N〉家人 </N〉 <!--联系人分组名称—〉 <N>Family </N> <!--Contact Group Name ->
<M>50001,50002,50003,50004</M> <—联系人分组成员, LUID之间用 <M>50001,50002,50003,50004</M> <—Contact group members, used between LUIDs
"," 分隔—〉 </Grp> "," Separation -> </Grp>
<Grp> <!—联系人分组—〉 <Grp> <!—Contact Grouping—>
<Ν> <ίΝ> <!--联系人分组名称—〉 <Ν> <ίΝ> <!--Contact group name ->
<Μ>60001,60002,60003,60004</Μ> <—联系人分组成员, LUID之间用 <Μ>60001,60002,60003,60004</Μ> <—Contact group members, used between LUIDs
"," 分隔—〉 "," Separation ->
</Grp> </Grp>
<Grp> <!—联系人分组—〉 <Grp> <!—Contact Grouping—>
<N〉飞信好友< 〉 <!--联系人分组名称—〉 <N>Fetion friend < 〉 <!--Contact group name ->
<M>70001,70002,70003,70004</M>〈—联系人分组成员, LUID之间用 <M>70001,70002,70003,70004</M><—Contact group members, used between LUIDs
"," 分隔—〉 "," Separation ->
</Grp> </Grp>
<IsFinal>n</IsFinal> <!--表示数据尚未全部发完—〉 <IsFinal>n</IsFinal> <!-- indicates that the data has not been completely sent yet ->
</DnDataRes> </DnDataRes>
终端接收到上述分组下载应答报文, 对上述分组下载应答报文进行鉴 权(简单根据报文中包含的会话标识进行鉴权即可, 与现有技术类似, 此 处不再赘述) , 鉴权通过之后, 对存储的剩余联系人的个人信息进行分组 存储, 向服务器返回当前下载的剩余联系人的分组信息的处理结果, 并继 续准备从服务器下载服务器存储的剩余联系人的分组信息, 终端可以向服 务器发送如下分组下载请求报文: The terminal receives the packet download response message, and authenticates the packet download response message (simplely according to the session identifier included in the packet, which is similar to the prior art, and is not described here). After the right is passed, the stored personal information of the remaining contacts is stored in groups, the processing result of the group information of the currently downloaded remaining contacts is returned to the server, and the group information of the remaining contacts stored by the server is continuously prepared to be downloaded from the server, the terminal The following packet download request message can be sent to the server:
POST POST
http://10.0.0.1 :80/yjb/sync/?sid=1400MjAwODA5MjctMDIyNTE4LTU0 MS0yMTEuMTM4LjE4NC4yMDE x-ds-data-type: grp Http://10.0.0.1 :80/yjb/sync/?sid=1400MjAwODA5MjctMDIyNTE4LTU0 MS0yMTEuMTM4LjE4NC4yMDE X-ds-data-type: grp
x-ds-oper-type: dn X-ds-oper-type: dn
<?xml version:" 1.0" encoding="UTF-8"?> <?xml version:" 1.0" encoding="UTF-8"?>
<DnDataReq> <!--下载联系人分组—〉 <DnDataReq> <!--Download contact grouping ->
<SessionID>2</SessionID> <SessionID>2</SessionID>
<MsgID>3</MsgID> <MsgID>3</MsgID>
<MaxMsgSize> 100000</MaxMsgSize> <!--终端支持的最大消息长度, 压缩前的消息长度, 单位: 字节 〉 <MaxMsgSize> 100000</MaxMsgSize> <!--Maximum message length supported by the terminal, length of message before compression, unit: Byte 〉
<DevID〉IMEI: 1234567890123456</DevID〉<!—终端设备标识—〉 <DataType>grp</DataType> <!― gr : 联系人分组 --〉 <DevID>IMEI: 1234567890123456</DevID><!—Terminal Device Identification—> <DataType>grp</DataType> <! ― gr : contact group -->
<Status> <Status>
<Code>000</Code> <!—响应结果, 401 -鉴权失败, 000 -成功, 999 -部分成功 〉 <Code>000</Code> <!—Response to the result, 401 - Authentication failed, 000 - Success, 999 - Partially successful 〉
</Status> </Status>
</DnDataReq> </DnDataReq>
服务器接收到上述分组下载请求报文, 对上述分组下载请求报文进行 鉴权(简单根据报文中包含的会话标识进行鉴权即可, 与现有技术类似, 此处不再赘述) , 鉴权通过之后, 向终端返回如下分组下载应答报文: The server receives the packet download request packet, and performs the authentication on the packet download request packet. The authentication may be performed according to the session identifier included in the packet, which is similar to the prior art, and is not described here. After the right is passed, the following group download response message is returned to the terminal:
<?xml version:" 1.0" encoding="UTF-8"?> <?xml version:" 1.0" encoding="UTF-8"?>
<DnDataRes> <!--下载联系人分组—〉 <DnDataRes> <!--Download contact grouping ->
<SessionID>2</SessionID> <MsgID>3</MsgID> <SessionID>2</SessionID> <MsgID>3</MsgID>
<Grp> <!—联系人分组—〉 <Grp> <!—Contact Grouping—>
<N>MSN好友 </N〉 <!—联系人分组名称—〉 <N>MSN Friends </N> <!—Contact Group Name—>
<M>80001,80002,80003</M> <—联系人分组成员, LUID 之间用 ",,, 分隔 --〉 <M>80001,80002,80003</M> <—Contact group members, separated by LUD with ",,, -->
</Grp> </Grp>
<IsFinal>y</IsFinal> <!—表示数据已经全部发完—〉 <IsFinal>y</IsFinal> <!—Indicates that the data has all been sent—>
<Is S e s s ionEnd>y</I s S e s s ionEnd> <!--会话结束标志: y—结束、 n—未 结束 --〉 <Is S e s s ionEnd>y</I s S e s s ionEnd> <!--session end flag: y - end, n - not ended -->
<Status> <Status>
<Code>000</Code> <!—响应结果, 401 -鉴权失败, 000 -成功, 999 -部分成功 〉 <Code>000</Code> <!—Response to the result, 401 - Authentication failed, 000 - Success, 999 - Partially successful 〉
</Status> </Status>
</DnDataRes> </DnDataRes>
需要说明的是: 本发明实施例中, 在同一个会话中, 对于双方的第一 个消息, 需要发送鉴权认证信息, 即<0^ 字段, 接收方对发送方进行认 证。 在认证通过后, 双方只需要发送会话标识, 即<8688101 10〉字段, 接收 方对发送方进行简单认证即可。 因为此会话是经过认证了的, 双方在此会 话中的后续的消息是可以信任的。 It should be noted that, in the embodiment of the present invention, in the same session, for the first message of both parties, authentication authentication information, that is, a <0^ field, is required, and the receiver authenticates the sender. After the authentication is passed, the two parties only need to send the session identifier, that is, the <8688101 10> field, and the receiver can simply authenticate the sender. Because this session is authenticated, subsequent messages from both parties in this session are trustworthy.
进一步地, 用户或业务提供商也可以通过登陆门户网站 (Web Portal ) 的方式从服务器侧主动发起联系人的分组信息的同步。 具体地, 服务器可 以向终端发送通知消息, 用以通知终端发起与服务器进行联系人的分组信 息的同步, 上述通知消息中需要包含联系人的分组信息的同步标识。 终端 可以根据接收到的上述通知消息, 向服务器发送分组下载请求报文, 进行 联系人的分组信息的同步。 其中, 上述通知消息可以通过短消息、 无线应 用协议( Wireless Application Protocol , 简称 WAP )推送( Push ) 消息等进 行承载。 Further, the user or the service provider can also initiate synchronization of the group information of the contact from the server side by logging in to the portal (Web Portal). Specifically, the server may send a notification message to the terminal, to notify the terminal to initiate a grouping message with the server for the contact. Synchronization of the information, the notification message needs to include the synchronization identifier of the group information of the contact. The terminal may send a packet download request message to the server according to the received notification message, and synchronize the group information of the contact. The notification message may be carried by a short message, a Wireless Application Protocol (WAP) push message, or the like.
进一步地, 本实施例中, 当服务器对联系人的分组信息进行更新 (包 括增加、 删除以及修改) 时, 服务器可以通过分组下载应答报文向终端发 送服务器终端更新之后的全部的联系人的分组信息 (分组名称及分组名称 对应的成员标识信息) , 根据来自服务器的联系人的分组信息对自身存储 的联系人的个人信息进行分组存储, 例如: 如果服务器更新了分组名称和 / 或分组名称对应的成员标识信息, 则可以向终端发送通知消息, 用以通知 终端发起与服务器进行联系人的分组信息的同步。 终端则可以向服务器发 送分组下载请求报文, 从而使得服务器可以向终端发送包含更新之后的联 系人的分组信息的分组下载应答报文, 则终端在自身存储的联系人的个人 信息中也相应地更新分组名称和 /或分组名称对应的成员标识信息。 具体 地, 终端可以通过维护一个修改记录表(Change Log ) , 来实现同步联系 人的分组信息。 这个修改记录表是维护从上次同步以来终端端对联系人的 分组信息作的修改的一个记录。 终端将自身存储的联系人的分组信息与服 务器发送来的联系人的分组信息进行比较, 即可获知服务器更新的联系人 的分组信息。 而终端从自身的修改记录表(即 Change Log ) 中, 则可获知 自身更新的联系人的分组信息。 根据获知的上述终端和服务器更新的联系 人的分组信息, 终端则可以进行相应的同步操作。 可选地, 在终端与服务器进行联系人信息 (联系人的个人信息和联系 人的分组信息) 的同步之后, 若服务器对联系人的分组信息进行了更新, 则服务器可以在向来自终端的分组下载应答报文中包含更新的联系人的分 组信息和用于标识报文中的联系人的分组信息的范围的标识信息, 上述标 识信息可以标识报文中的联系人的分组信息为全部的联系人的分组信息或 更新的联系人的分组信息。 Further, in this embodiment, when the server updates the group information of the contact (including adding, deleting, and modifying), the server may send the group of all contacts after the server terminal is updated to the terminal by using the group download response message. Information (group name and member identification information corresponding to the group name), and personal information of the contact stored by itself is stored according to the grouping information of the contact from the server, for example: if the server updates the group name and/or the group name corresponding The member identification information may send a notification message to the terminal to notify the terminal to initiate synchronization of the group information of the contact with the server. The terminal may send a packet download request message to the server, so that the server may send a packet download response message including the group information of the contact after the update to the terminal, and the terminal also correspondingly in the personal information of the contact stored by the terminal. Update the member identification information corresponding to the group name and/or the group name. Specifically, the terminal can implement grouping information of the synchronization contact by maintaining a change log (Change Log). This modification record table is a record for maintaining the modification of the grouping information of the contacts by the terminal terminal since the last synchronization. The terminal compares the grouping information of the contact stored by the terminal with the grouping information of the contact sent by the server, and can obtain the grouping information of the contact updated by the server. The terminal can learn the grouping information of the contact that is updated by itself from its own modification record table (ie, Change Log). According to the obtained grouping information of the contact updated by the terminal and the server, the terminal can perform a corresponding synchronization operation. Optionally, after the terminal and the server perform synchronization of the contact information (personal information of the contact and the group information of the contact), if the server updates the group information of the contact, the server may be in the grouping from the terminal. The download response message includes the grouping information of the updated contact and the identification information of the range of the grouping information for identifying the contact in the message, and the identifier information may identify the grouping information of the contact in the message as the total contact. Grouping information of a person or grouping information of an updated contact.
需要说明的是: 如果终端上的更新与服务器上的更新相沖突, 则终端 可以根据自身配置的沖突处理策略来进行判断,判定以服务器的更新为准, 还是以终端自身的更新为准, 从而进行同步。 例如: 服务器把某个分组删 除了, 而终端把这个分组修改了分组名称即对此分组进行了修改, 如果终 端的判断结果是以服务器的更新为准, 则终端会删除此分组。 It should be noted that: if the update on the terminal conflicts with the update on the server, the terminal may perform a judgment according to the conflict processing policy configured by the terminal, and determine whether the update of the server is correct or the update of the terminal itself. Synchronize. For example, the server deletes a packet, and the terminal modifies the packet by modifying the packet name. If the terminal determines that the update is based on the server, the terminal deletes the packet.
进一步地, 本发明实施例中, 终端还可以发送主动取消通知报文, 用 以取消下载联系人的分组信息, 具体地, 主动取消通知 文的 HTTP 消息 头中需要增加控制参数 "X-DS-Abort-Sync" 。 如果用户通过终端取消同步 则携带该参数且参数值为 "True" , 消息体为空; 否则, 不携带此参数。 例如: Further, in the embodiment of the present invention, the terminal may further send an active cancellation notification message, which is used to cancel the grouping information of the downloaded contact. Specifically, the HTTP message header of the active cancellation of the notification message needs to add a control parameter "X-DS- Abort-Sync". If the user cancels the synchronization through the terminal, the parameter is carried and the parameter value is "True", and the message body is empty; otherwise, this parameter is not carried. E.g:
POST POST
http://10.0.0.1 :80/yjb/sync?sid=1400MjAwODA5MjctMDIyNTE4LTU0M S0yMTEuMTM4LjE4NC4yMDE Http://10.0.0.1 :80/yjb/sync?sid=1400MjAwODA5MjctMDIyNTE4LTU0M S0yMTEuMTM4LjE4NC4yMDE
X-DS -Abort- Sync: True X-DS -Abort- Sync: True
需要说明的是: 当服务器遇到如下异常情况时, 服务器将直接返回 HTTP 400错误, 不会返回应答报文, 终端接收到 HTTP 400错误之后, 将 终止本次操作并向用户提示失败信息。 异常情况可以包括但不限于以下情 况: It should be noted that: When the server encounters the following abnormal conditions, the server will directly return an HTTP 400 error, and will not return a response message. After receiving the HTTP 400 error, the terminal will Terminate this operation and prompt the user for the failure message. Abnormal conditions can include, but are not limited to, the following:
请求报文经过的 WAP网关 IP地址非法; The WAP gateway IP address through which the request packet passes is illegal;
请求报文的 HTTP头中的相关参数不存在或取值非法; The related parameters in the HTTP header of the request packet do not exist or are illegal.
请求报文对应会话过期或不存在; The request message corresponds to the session expiration or does not exist;
请求报文码流解析失败。 The request packet stream resolution failed.
本实施例中, 通过终端接收来自服务器的包含联系人的分组信息的分 组下载应答报文, 从而使得终端能够根据上述联系人的分组信息, 对存储 的联系人的个人信息进行分组存储, 实现了服务器到终端的联系人的分组 信息的同步, 从而使得服务器到终端的联系人信息 (联系人的个人信息和 联系人的分组信息) 能够准确同步, 提高了联系人信息同步的准确性。 In this embodiment, the terminal receives the packet download response message from the server that includes the packet information of the contact, so that the terminal can store the personal information of the stored contact according to the grouping information of the contact, thereby realizing The synchronization of the grouping information of the server-to-terminal contact enables the server-to-terminal contact information (personal information of the contact and the grouping information of the contact) to be accurately synchronized, improving the accuracy of the synchronization of the contact information.
需要说明的是: 上述本发明实施例一、 二所涉及的联系人的分组信息 的同步可以看作是 "终端到服务器的单向同步" , 例如: 数据备份, 则只 需要上传操作, 此时, 服务器可以将终端上传的分组信息直接覆盖服务器 存储的分组信息即可。 上述本发明实施例三、 四所涉及的联系人的分组信 息的同步可以看作是 "服务器到终端的单向同步" , 例如: 数据恢复, 则 只需要下载操作, 此时, 终端可以将从服务器下载的分组信息直接覆盖终 端存储的分组信息即可。 It should be noted that: the synchronization of the group information of the contacts involved in the first embodiment and the second embodiment of the present invention can be regarded as “one-way synchronization from the terminal to the server”, for example: data backup, only the upload operation is required. The server can directly overlay the group information uploaded by the terminal to the group information stored by the server. The synchronization of the grouping information of the contacts involved in the third and fourth embodiments of the present invention can be regarded as "one-way synchronization from the server to the terminal", for example: data recovery, only the download operation is required, and at this time, the terminal can The group information downloaded by the server directly covers the group information stored by the terminal.
进一步地, 上述本发明实施例一、 二进一步还可以实现 "服务器到终 端的单向同步" , 从而可以实现 "终端与服务器的双向同步" , 具体实现 方法可以参见上述本发明实施例三、 四中的相关内容, 此处不再赘述; 上 述本发明实施例三、 四进一步还可以实现 "终端到服务器的单向同步" , 具体实现方法可以参见上述本发明实施例一、 二中的相关内容, 此处不再 赘述。 Further, the above-mentioned first and second embodiments of the present invention can further implement the "one-way synchronization of the server to the terminal", so that the two-way synchronization between the terminal and the server can be realized. For the specific implementation method, refer to the third and fourth embodiments of the present invention. The related content in the content is not described herein again; the third and fourth embodiments of the present invention further implement "one-way synchronization from the terminal to the server". For details, refer to the related content in the first and second embodiments of the present invention, and details are not described herein again.
需要说明的是: 在终端执行上传操作之后, 服务器需要对双方的信息 进行逐一的比较, 从而才能识别出是否需要通知终端执行下载操作; 或者 在终端执行下载操作之后, 终端需要对双方的信息进行逐一的比较, 从而 才能识别出是否需要执行上传操作。 It should be noted that after the terminal performs the upload operation, the server needs to compare the information of the two parties one by one to identify whether the terminal needs to be notified to perform the download operation; or after the terminal performs the download operation, the terminal needs to perform information on both parties. One by one comparison to identify whether an upload operation needs to be performed.
因此,上述本发明实施例一至四可以实现"终端与服务器的双向同步", 即可以实现终端与服务器之间的联系人的分组信息的同步, 从而使得终端 与服务器之间的联系人信息 (联系人的个人信息和联系人的分组信息) 能 够准确同步, 提高了联系人信息同步的准确性。 Therefore, the above-mentioned first to fourth embodiments of the present invention can implement "two-way synchronization between the terminal and the server", that is, synchronization of group information of contacts between the terminal and the server can be realized, thereby making contact information between the terminal and the server (contact The personal information of the person and the grouping information of the contact) can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved.
图 5为本发明实施例五提供的再一种联系人信息的同步方法的流程示 意图, 如图 5所示, 本实施例的联系人信息的同步方法可以包括以下步骤: 步骤 501、 终端与服务器进行联系人的个人信息的同步; FIG. 5 is a schematic flowchart of a method for synchronizing contact information according to Embodiment 5 of the present invention. As shown in FIG. 5, the method for synchronizing contact information in this embodiment may include the following steps: Step 501: Terminal and server Synchronize the personal information of the contact;
终端与服务器进行联系人的个人信息的同步可以参考现有技术中终端 向服务器上传联系人的个人信息的方法, 实现终端到服务器的单向同步, 或者还可以参考现有技术中终端从服务器下载联系人的个人信息的方法, 实现服务器到终端的单向同步, 此处不再赘述。 For the synchronization of the personal information of the contact between the terminal and the server, refer to the method for uploading the personal information of the contact to the server by the terminal in the prior art, to implement one-way synchronization from the terminal to the server, or to refer to the downloading from the server by the terminal in the prior art. The method of personal information of the contact person realizes one-way synchronization from the server to the terminal, and details are not described herein again.
步骤 502、上述终端向上述服务器发送基于开放移动联盟(Open Mobile Alliance, 简称 OMA ) 的数据同步 ( Data Synchronization, 简称 DS )协议 的增加(Add )命令, 上述增加命令中包含联系人的分组信息, 以使上述服 务器根据上述联系人的分组信息, 对存储的上述联系人的个人信息进行分 组存储; 或者 上述服务器向上述终端发送基于开放移动联盟( Open Mobile Alliance, 简称 OMA )的数据同步( Data Synchronization,简称 DS )协议的增加( Add ) 命令, 上述增加命令中包含联系人的分组信息, 以使上述终端根据上述联 系人的分组信息, 对存储的上述联系人的个人信息进行分组存储。 Step 502: The terminal sends an Add (Add) command based on an Open Mobile Alliance (OMA)-based Data Synchronization (DS) protocol to the server, where the add command includes packet information of the contact, So that the server stores the stored personal information of the contact according to the grouping information of the contact; or The server sends an Add (Add) command based on the Data Synchronization (DS) protocol of the Open Mobile Alliance (OMA) to the terminal, where the added command includes the grouping information of the contact, so that the foregoing The terminal stores the stored personal information of the contact according to the grouping information of the contact.
其中, 上述联系人的分组信息可以包括分组名称和与上述分组名称对 应的成员标识信息。上述成员标识信息可以为终端的本地唯一标识( Locally Unique Identifier, 简称 LUID ) 。 The grouping information of the contact may include a group name and member identification information corresponding to the group name. The member identification information may be a Locally Unique Identifier (LUID) of the terminal.
本实施例中, 通过终端向服务器发送包含联系人的分组信息的增加命 令, 从而使得服务器能够根据上述联系人的分组信息, 对存储的联系人的 个人信息进行分组存储, 实现了终端到服务器的联系人的分组信息的同步, 从而使得终端到服务器的联系人信息 (联系人的个人信息和联系人的分组 信息) 能够准确同步, 提高了联系人信息同步的准确性; 或者通过服务器 向终端发送包含联系人的分组信息的增加命令, 从而使得终端能够根据上 述联系人的分组信息, 对存储的联系人的个人信息进行分组存储, 实现了 服务器到终端的联系人的分组信息的同步, 从而使得服务器到终端的联系 人信息 (联系人的个人信息和联系人的分组信息) 能够准确同步, 提高了 联系人信息同步的准确性。 In this embodiment, the terminal sends an add command including the group information of the contact to the server, so that the server can store the personal information of the stored contact according to the group information of the contact, and implement the terminal to the server. The synchronization of the contact information of the contact, so that the contact information of the terminal to the server (the personal information of the contact and the group information of the contact) can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved; or the server sends the information to the terminal. An increase command of the grouping information of the contact is included, so that the terminal can store the personal information of the stored contact according to the grouping information of the contact, thereby realizing the synchronization of the grouping information of the server-to-terminal contact, thereby The server-to-terminal contact information (contact's personal information and contact grouping information) can be accurately synchronized, improving the accuracy of contact information synchronization.
本实施例使用现有的开放移动联盟( Open Mobile Alliance ,简称 OMA ) 同步标 i己语言 ( Synchronization Markup Language , 简称 SyncML )数据同 步 ( Data Synchronization, 简称 DS ) 协议的命令来实现对联系人信息的准 确同步, 具体可以通过对联系人的个人信息的同步和联系人的分组信息的 同步分别使用不同的消息头, 因此接收方可以区分开同步的是联系人的个 人信息, 还是联系人的分组信息群组信息。 具体地, 上述增加命令包含联 系人的分组信息的形式可以包括但不限于以下几种形式: This embodiment uses the existing Open Mobile Alliance (OMA) Synchronization Markup Language (SyncML) Data Synchronization (DS) protocol command to implement contact information. Accurate synchronization, specifically by using different message headers for synchronizing the personal information of the contact and synchronizing the grouping information of the contact, so the receiving party can distinguish the ones that are synchronized The person information, or the group information group information of the contact. Specifically, the form in which the above-mentioned increase command includes the group information of the contact may include, but is not limited to, the following forms:
A、 增加命令可以通过现有的字段包含联系人的分组信息; A. The add command can include the grouping information of the contact through the existing field;
具体地, 可以用 <^^1〉/<1 6〉字段来指明数据是联系人的分组信息, 用 <Item〉/<Source〉字段来携带分组名称, 用 <^0〉/<0 1〉字段来携带成员 标识信息。 例如: Specifically, the <^^1>/<16> field may be used to indicate that the data is grouping information of the contact, and the <Item>/<Source> field is used to carry the group name, using <^0>/<0 1> Field to carry member identification information. E.g:
<Add> ; 增加分组成员 <Add> ; Add group members
<CmdID>12345</CmdID> ; 命 令 标 识 <CmdID>12345</CmdID> ; Command ID
<Cred> ; 认证信息 <Cred> ; Certification information
<Meta> <Meta>
<Type xmlns= ' syncml: metinf >syncml: auth-md5</Type> <Type xmlns= ' syncml: metinf >syncml: auth-md5</Type>
<Format xmlns= ' syncml: metinf >b64</Format> <Format xmlns= ' syncml: metinf >b64</Format>
</Meta> </Meta>
<Data>Zz6EivR3yeaaENcRN61pAQ==</Data> <Data>Zz6EivR3yeaaENcRN61pAQ==</Data>
</Cred> </Cred>
<Meta> ; 数据的描述信息 <Meta> ; Description of the data
<Format xmlns= ' syncml: metinf >chr</Format> <Format xmlns= ' syncml: metinf >chr</Format>
<Type xmlns=' syncml: metinf >text/x-group</Type> ; 表明是分组信 <Type xmlns=' syncml: metinf >text/x-group</Type> ; indicates that it is a group letter
</Meta> </Meta>
<Item> <Item>
<Source〉<LocURI〉.^i^</LocURI〉</Source〉 分组名 <Data> 10003 , 10004</Data> ; 分组的成员<Source><LocURI>.^i^</LocURI></Source> Group Name <Data> 10003 , 10004</Data>; members of the group
</Item> </Item>
</Add> </Add>
B、 增加命令可以通过新增的字段包含联系人的分组信息。 B. Add a command to include the grouping information of the contact through the newly added field.
具体地, 可以新增<0卬〉字段来指明数据是联系人的分组信息, 用 <N〉 字段来携带分组名称, 用<^1〉字段来携带成员标识信息。 例如: Specifically, a <0卬> field may be added to indicate that the data is the grouping information of the contact, the <N> field is used to carry the group name, and the <^1> field is used to carry the member identification information. E.g:
<Add> ; 增加分组成员 <Add> ; Add group members
<Grp> ; 表明是对分组的操作 <Grp> ; indicates that the operation is on the group
<N〉朋友 </N〉 ; 分组名称 <N>Friends </N> ; Group name
<M>10003 , 10004</M> ;增加分组成员,其标识分别为 10003 和 10004, 其他成员不变 <M>10003, 10004</M> ; Add group members with their IDs 10003 and 10004 respectively, other members are unchanged
</Grp> </Grp>
</Add> </Add>
进一步地, 本实施例中, 当终端对联系人的分组信息进行更新 (包括 增加、 删除以及修改)时, 可以通过向服务器发送基于 OMA的 DS协议的 增加命令、 删除(Delete )命令以及修改 ( Replace ) 命令, 从而服务器可 以进行相应的同步操作。 Further, in this embodiment, when the terminal updates the group information of the contact (including adding, deleting, and modifying), the terminal may send an increase command, a delete command, and a modification according to the OMA-based DS protocol to the server. Replace ) command so that the server can perform the corresponding synchronization operation.
进一步地, 当服务器逐个比较完终端通过增加命令、 删除(Delete )命 令以及修改(Replace )命令发送的联系人的分组信息之后, 识别出需要向 终端发送联系人的分组信息(由于终端对联系人的分组信息进行了更新), 通过增加命令、 删除 (Delete ) 命令以及修改 ( Replace ) 命令向终端发送 联系人的分组信息。 这样, 终端与服务器之间就可以实现联系人的分组信 息的同步了。 Further, after the server compares the grouping information of the contact sent by the terminal by the add command, the delete command, and the replace command, the server identifies that the contact information of the contact needs to be sent to the terminal (because the terminal contacts the contact The grouping information is updated.) The grouping information of the contact is sent to the terminal by adding a command, a delete command, and a replace command. In this way, the contact group of the contact can be realized between the terminal and the server. The interest is synchronized.
进一步地, 本实施例中, 当服务器对联系人的分组信息进行更新 (包 括增加、 删除以及修改 )时, 可以通过向终端发送基于 OMA的 DS协议的 增加命令、 删除(Delete )命令以及修改( <Replace〉)命令, 从而终端可 以进行相应的同步操作。 Further, in this embodiment, when the server updates the group information of the contact (including adding, deleting, and modifying), the OMA-based DS protocol may be sent to the terminal by adding, deleting, and modifying the The <Replace> command, so that the terminal can perform the corresponding synchronization operation.
进一步地, 当终端逐个比较完服务器通过增加命令、 删除(Delete )命 令以及修改(Replace )命令发送的联系人的分组信息之后, 识别出需要向 服务器发送联系人的分组信息 (由于终端对联系人的分组信息进行了更 新) , 通过增加命令、 删除 (Delete )命令以及修改(Replace ) 命令向服 务器发送联系人的分组信息。 这样, 终端与服务器之间就可以实现联系人 的分组信息的同步了。 Further, after the terminal compares the grouping information of the contact sent by the server by the add command, the delete command, and the replace command, the terminal identifies the group information that needs to be sent to the server (because the terminal contacts the contact The grouping information is updated.) The grouping information of the contact is sent to the server by adding a command, a delete command, and a replace command. In this way, the grouping information of the contacts can be synchronized between the terminal and the server.
下面可以通过几个具体实施例, 来说明本发明实施例的详细过程。 例 如: 增加一个新的分组信息 (可以为空) , 增加命令可以如下所示: The detailed process of the embodiment of the present invention will be described below by way of several specific embodiments. For example: Add a new grouping information (may be empty), add the command can be as follows:
<Add> ; 增加新的分组 <Add> ; Add a new group
<Grp> ; 表明是对分组的操作 <Grp> ; indicates that the operation is on the group
<N〉同学 </N〉 ; 新分组所在的父分组名称 <N>Classmate </N> ; the name of the parent group where the new group is located
<Grp> <Grp>
<N〉大学同学<^> ; 要增加的新的分组 <N>University classmates <^> ; new group to be added
<M>10003 , 10004</M> ; 新分组的分组成员, 可为空 </Grp> <M>10003, 10004</M> ; group member of the new group, can be empty </Grp>
</Grp> </Grp>
</Add> 或者增加命令还可以如下所示: </Add> Or add a command can also be as follows:
<Add> ; 增力口分组 <Add> ; Power port grouping
<Meta> 数据的描述信息 <Meta> Description of the data
<Format xmlns= ' syncml: metinf >chr</Format> <Format xmlns= ' syncml: metinf >chr</Format>
<Type xmlns= ' sync ml: metinf >text/x -group</Type> ; 表明是分组信息 </Meta> <Type xmlns= ' sync ml: metinf >text/x -group</Type> ; indicates grouping information </Meta>
<Item> <Item>
; 增力口 "大学 同学" 的分组 ; Grouping of "Liu University Students"
<Data> 10003 , 10004</Data>; 新分组的分组成员, 可为空 <Data> 10003 , 10004</Data>; group member of the new group, can be empty
</Item> </Item>
</Add> </Add>
修改一个分组中的成员即修改分组信息中的成员标识信息, 修改命令 可以: ^下所示: Modifying a member of a group to modify the member identification information in the group information, the modification command can be: ^ shown below:
<Replace> ; 爹改分组成员 <Replace> ; Tampering with group members
<Grp> ; 表明是对分组的操作 <Grp> ; indicates that the operation is on the group
<N〉朋友 </N〉 分组名称 <N>Friends </N> Group Name
<M>10003 , 10004</M> ; 修改是对整个分组成员的修改, 修改 后该分组只有这两个成员 <M>10003, 10004</M> ; The modification is a modification of the entire group member. After the modification, the group has only these two members.
</Grp> </Grp>
</Replace> </Replace>
修改一个分组的名称即修改分组信息中的分组名称, 修改命令可以如 下所示: Modify the name of a group to modify the group name in the group information, and the modification command can be as Shown below:
<Replace> ; 修改分组名称 <Replace> ; modify the group name
<Grp> ; 表明是对分组的操作 <Grp> ; indicates that the operation is on the group
<N〉朋友 </N〉 ; 分组的旧名称 <N>Friends </N> ; the old name of the group
<NewName〉好朋友 </NewName〉 ; 分组的新名称 <NewName>Good friend </NewName> ; new name for grouping
</Grp> </Grp>
</Replace> </Replace>
需要说明的是: 对分组的修改可以分为两种情况: 一种是要修改的分 组必须存在, 否则修改失败; 另一种是修改的分组如果不存在, 则创建该 分组。 为避免命令的二义性, 终端与服务器必须事先约定好一种。 It should be noted that the modification of the packet can be divided into two cases: one is that the packet to be modified must exist, otherwise the modification fails; the other is that the modified packet is created if it does not exist. In order to avoid the ambiguity of the command, the terminal and the server must agree on one in advance.
删除一个分组中的成员即删除分组信息中的成员标识信息, 删除命令 可以: ^下所示: Deleting a member of a group deletes the member identification information in the group information, and the delete command can be: ^
<Delete> ; 删除分组成员 <Delete> ; delete group members
<Grp> ; 表明是对分组的操作 <Grp> ; indicates that the operation is on the group
<N〉朋友 </N〉 ; 分组名称 <N>Friends </N> ; Group name
<M>10003 , 10004</M> ; 删除分组中的成员 <M>10003, 10004</M> ; delete members from the group
</Grp> </Grp>
</Delete> </Delete>
删除一个分组 (包括分组名称和成员 ) 即删除分组信息中的分组名称 和成员标识信息, 删除命令可以如下所示: Deleting a group (including group name and member) means deleting the group name and member identification information in the group information. The delete command can be as follows:
<Delete> ; 删除分组 <Delete> ; delete group
<Grp> ; 表明是对分组的操作 <N〉朋友 </N〉 ; 分组名称 <Grp>; indicates that the operation is on the group <N>Friends</N>; Group name
</Grp> </Grp>
</Delete> </Delete>
进一步地, 本实施例中, 还可以对联系人的分组信息进行查询, 可以 使用基于 OMA的 DS协议的获取(Get )命令来实现, 查询一个分组的获 取命令可以:^下所示: Further, in this embodiment, the grouping information of the contact may also be queried, and may be implemented by using an OMA-based DS protocol (Get) command. The command to query a group may be as follows:
<Get> ; 对分组成员的查询 <Get> ; query for group members
<Grp> ; 表明是对分组的操作 <Grp> ; indicates that the operation is on the group
<N〉朋友 </N〉 ; 分组名称 <N>Friends </N> ; Group name
</Grp> </Grp>
</Get> </Get>
接收方则返回该分组的成员标识信息列表, 使用结果(Results )命令。 <Results> ; 返回分组成员 The receiver returns a list of member identification information for the packet, using the Results command. <Results> ; returns group members
<Grp> ; 表明是对分组的操作 <Grp> ; indicates that the operation is on the group
<N〉朋友 </N〉 ; 分组名称 <N>Friends </N> ; Group name
<M>10003 , 10004</M> ; 删除分组中的成员 <M>10003, 10004</M> ; delete members from the group
</Grp> </Grp>
</Results> </Results>
进一步地, 本实施例中, 还可以对联系人的分组信息进行查询, 可以 使用基于 OMA的 DS协议的获取(Get )命令来实现, 查询所有分组 (等 同下载) 的获取命令可以如下所示: Further, in this embodiment, the grouping information of the contact may also be queried, and may be implemented by using an OMA-based DS protocol (Get) command, and the query for querying all the packets (equivalent download) may be as follows:
<Get> ; 对所有联系人的分组信息的查询 <Grp> ; 表明是对分组的操作 <Get>; query for grouping information for all contacts <Grp>; indicates that the operation is on the group
<N>J</N> ; 表明为根目录, 即所有联系人的分组信息 <N>J</N> ; indicates the root directory, that is, the grouping information of all contacts
</Grp> </Grp>
</Get> </Get>
本实施例中, 终端还可以先向服务器发送删除命令, 用以删除服务器 端所有联系人的分组信息, 再向服务器发送增加命令, 用以在服务器端增 加所有联系人的分组信息 (等同上传)。 删除命令可以如下所示: In this embodiment, the terminal may also send a delete command to the server to delete the group information of all contacts on the server, and then send an add command to the server to add group information of all contacts on the server (equivalent upload). . The delete command can be as follows:
<Delete> ; 对所有联系人的分组信息的删除 <Delete> ; delete group information for all contacts
<Grp> ; 表明是对分组的操作 <Grp> ; indicates that the operation is on the group
<N>J</N> ; 表明为根目录, 即所有的分组信息 <N>J</N> ; indicates the root directory, that is, all group information
</Grp> </Grp>
</Delete> </Delete>
注意: 分组名称为 "./", 即表明是根目录, 即对所有分组的操作。 Note: The group name is "./", which means that it is the root directory, that is, the operation for all groupings.
需要说明的是: 对所有联系人的分组信息的增加, 还可以先增加一个 空的分组, 再对各个分组增加成员, 详细过程可以参见之前的命令的描述, 此处不再赘述。 It should be noted that: for the addition of the grouping information of all the contacts, an empty group may be added first, and then the members are added to the respective groups. For details, refer to the description of the previous commands, and details are not described herein.
进一步地, 本实施例中, 如果只删除一个分组, 但其成员不删除, 而 是成为未分组的成员。 为了与现有的命令区分开, 则需要一个单独的参数 ( </DelGrp〉字段) 来指示, 例如: Further, in this embodiment, if only one packet is deleted, but its members are not deleted, but become members of the ungrouped. In order to distinguish from existing commands, a separate parameter ( </DelGrp> field) is required to indicate, for example:
<Delete> ; 删除 A分组 <Delete> ; delete group A
</DelGrp> ; 表明只删除分组 </DelGrp> ; indicates that only the group is deleted
<Meta> ; 数据的描述信息 <Format xmlns= ' sync ml: metinf >chr</Format> <Meta>; Description of the data <Format xmlns= ' sync ml: metinf >chr</Format>
<Type xmlns= ' sync ml: metinf >text/x -group</Type> ;表明是 分组信息 <Type xmlns= ' sync ml: metinf >text/x -group</Type> ; indicates yes grouping information
</Meta> </Meta>
<Item> <Item>
<Source><LocURI>JA</LocURI></Source> ; <Source><LocURI>JA</LocURI></Source> ;
</Item> </Item>
</Delete> </Delete>
进一步地, 本实施例中, 如果将一个联系人从 A分组转移到 B分组, 则需要包括两个操作: 先从 A分组里面把联系人删除, 再将此联系人添加 到 B分组: Further, in this embodiment, if a contact is transferred from the A packet to the B packet, two operations need to be included: first delete the contact from the A packet, and then add the contact to the B packet:
<Delete> ; 删除 A分组的成员 <Delete> ; delete members of group A
<Meta> ; 数据的描述信息 <Meta> ; Description of the data
<Format xmlns='syncml:metinf >chr</Format> <Format xmlns='syncml:metinf >chr</Format>
<Type xmlns= ' syncml: metinf >text/x -group</Type> ; 表明是 分组信息 <Type xmlns= ' syncml: metinf >text/x -group</Type> ; indicates yes grouping information
</Meta> </Meta>
<Item> <Item>
<Source><LocURI>JA</LocURI></Source> ; <Data>1001 </Data> <Source><LocURI>JA</LocURI></Source> ; <Data>1001 </Data>
</Item> </Item>
</Delete> <Add> ; 增加成员到 B分组</Delete> <Add>; Add member to group B
<Meta> 数据的描述信息 <Meta> Description of the data
<Format xmlns= ' syncml: metinf >chr</Format> <Format xmlns= ' syncml: metinf >chr</Format>
<Type xmlns='syncml:metinf >text/x-group</Type> 是分组信息 <Type xmlns='syncml:metinf >text/x-group</Type> Is group information
</Meta> </Meta>
<Item> <Item>
<Source><LocURI>./B</LocURI></Source> ; <Source><LocURI>./B</LocURI></Source> ;
<Data>1001 </Data> <Data>1001 </Data>
</Item> </Item>
</Add> </Add>
需要说明的是: 如果需要对联系人的分组信息进行同步, 则在命令外 面添加 <Sync〉命令; 如果不进行同步, 只进行管理, 则不需要添加 <Sync〉 命令。 例如: 对分组信息的查询, 不需要进行同步, 则不需要添加 <Sync〉 命令。 It should be noted that if you need to synchronize the group information of the contact, add the <Sync> command outside the command; if you do not synchronize, only manage, you do not need to add the <Sync> command. For example: For querying group information, you do not need to synchronize, you do not need to add the <Sync> command.
进一步地, 本实施例中, 还可以进一步实现对联系人的分组信息的搜 索、 过滤。 具体地, 可以利用基于 OMA的 DS协议的搜索( Search )命令、 过滤 (Filter )命令。 在搜索命令、 过滤命令中, 可以使用 "GrpName" 关 键字来指示分组名称, 用 "Group" 关键字来指示是一个分组。 Further, in this embodiment, the searching and filtering of the grouping information of the contact may be further implemented. Specifically, a search (Search) command and a Filter (Filter) command based on the OMA-based DS protocol can be utilized. In the search command, filter command, you can use the "GrpName" keyword to indicate the group name, and the "Group" keyword to indicate a group.
例如: 对群组名称 "Friend" 的搜索, 搜索命令可以如下所示: For example: For a search for the group name "Friend", the search command can look like this:
<Search> <Search>
<Source><LocURI>Jbrucel/emp_tabl.db</LocURI></Source> <Meta> <Source><LocURI>Jbrucel/emp_tabl.db</LocURI></Source> <Meta>
<Type xmlns= ' syncml: metinf >application/s ql</Type> <Type xmlns= ' syncml: metinf >application/s ql</Type>
</Meta> </Meta>
<Data>SELECT EQ * WHERE "GrpName" EQ "Friend"</Data> </Search> <Data>SELECT EQ * WHERE "GrpName" EQ "Friend"</Data> </Search>
对分组 "business" 的过滤, 过滤命令可以如下所示: : For the filtering of the group "business", the filtering command can be as follows:
<Filter> <Filter>
<Record> <Record>
<Item> <Item>
<Meta><Type>syncml:filtertype-cgi</Type></Meta> <Data〉GROUP&iCON;business </Data> <Meta><Type>syncml:filtertype-cgi</Type></Meta> <Data>GROUP&iCON;business </Data>
</Item> </Item>
</Record> </Record>
</Filter> </Filter>
需要说明的是: 联系人的分组名称不能重复, 而且对于同一个分组, 服务器端与客户端的分组名称必须一致, 这样可以满足大部分实际场景, 而且可以减少了对于分组的本地唯一标识和全局唯一标识之间的映射流 程。 It should be noted that: the contact group name of the contact cannot be duplicated, and for the same group, the server name and the client group name must be the same, which can satisfy most of the actual scenarios, and can reduce the local unique identifier and global uniqueness for the packet. The mapping process between the identifiers.
进一步地, 分组可以嵌套, 即分组下面可以有子分组。 对于子分组的 操作与分组的操作类似, 此处不再赘述。 Further, the packets can be nested, ie there can be sub-packets below the packets. The operation of the sub-packet is similar to the operation of the grouping, and will not be described here.
例如: 一个分组以及其下面的两个子分组, 其结构可以如下所示: <Grp> <N〉同学</N;> For example: A group and two subgroups below it can be structured as follows: <Grp> <N>Classmates</N;>
<Grp> <Grp>
<N〉大学同学<^> <N>University classmates <^>
<M>1001,1002</N> <M>1001,1002</N>
</Grp> </Grp>
<Grp> <Grp>
<N〉中学同学< 〉 <N>Secondary classmates < 〉
<M>1003,1004</N> <M>1003,1004</N>
</Grp> </Grp>
</Grp> </Grp>
也就是说, 如果分组嵌套于另一个分组里面, 则表明是子分组, 例如 "大学同学" 在 "同学" 里面, 即是子分组; 如果分组是并列于另一个分 组, 则表明是并列的分组, 例如: "大学同学" 与 "中学同学" 是并列的, 是并列的分组。 That is to say, if the group is nested inside another group, it means that it is a sub-group, for example, "college classmate" is in the "classmate", that is, sub-grouping; if the grouping is juxtaposed to another group, it means that it is juxtaposed. Grouping, for example: "University classmates" and "high school classmates" are juxtaposed, and are grouped in parallel.
这些结构可以用在 <Add〉、 <Replace〉、 <Delete〉等命令中, 与非嵌套 的群组类似。 These structures can be used in commands such as <Add>, <Replace>, <Delete>, etc., similar to non-nested groups.
本实施例中, 联系人的个人信息和联系人的分组信息是有同步顺序。 也就是说: 如果终端在本地增加几个联系人, 并把他们加入到 A分组。 在 同步过程中, 终端新增的联系人的个人信息需要先增加到服务器保存并通 过<^½ ^11〉命令建立映射关系, 终端再把上述联系人的分组信息同步到 服务器, 才能实现与服务器之间的联系人信息的同步。 In this embodiment, the personal information of the contact person and the group information of the contact are in a synchronized order. That is: If the terminal adds several contacts locally, and adds them to the A group. During the synchronization process, the personal information of the newly added contacts of the terminal needs to be added to the server to save and establish a mapping relationship through the <^1⁄2^11> command, and the terminal synchronizes the group information of the contact to the server to implement the server. Synchronization of contact information between.
图 6为本发明实施例六提供的又一种联系人信息的同步方法的流程示 意图, 如图 6所示, 本实施例的联系人信息的同步方法可以包括以下步骤: 步骤 601、 终端向服务器发送第一增加命令, 上述第一增加命令包含 联系人的分组名称, 以使上述服务器建立上述分组名称对应的分组; 或者 服务器向终端发送第一增加命令, 上述第一增加命令包含联系人的分 组名称, 以使上述终端建立上述分组名称对应的分组; FIG. 6 is a flowchart showing still another method for synchronizing contact information according to Embodiment 6 of the present invention; The method for synchronizing the contact information in this embodiment may include the following steps: Step 601: The terminal sends a first increase command to the server, where the first increase command includes a group name of the contact, so that the foregoing The server establishes a packet corresponding to the group name; or the server sends a first adding command to the terminal, where the first adding command includes a group name of the contact, so that the terminal establishes a packet corresponding to the group name;
步骤 602、 上述终端向上述服务器发送第二增加命令, 上述第二增加 命令包含与上述分组名称对应的成员标识信息和联系人的个人信息, 以使 上述服务器将上述成员标识信息和上述联系人的个人信息存储到上述分组 中; 或者 Step 602: The terminal sends a second increase command to the server, where the second increase command includes member identifier information corresponding to the group name and personal information of the contact, so that the server sends the member identifier information and the contact information. Personal information is stored in the above group; or
上述服务器向上述终端发送第二增加命令, 上述第二增加命令包含与 上述分组名称对应的成员标识信息和联系人的个人信息, 以使上述终端将 上述成员标识信息和上述联系人的个人信息存储到上述分组中。 The server sends a second increase command to the terminal, where the second increase command includes member identification information corresponding to the group name and personal information of the contact, so that the terminal stores the member identification information and the personal information of the contact. Go to the above grouping.
其中, 上述成员标识信息可以为终端的本地唯一标识 ( Locally Unique Identifier, 简称 LUID ) 。 The member identification information may be a Locally Unique Identifier (LUID) of the terminal.
本实施例中, 通过向对端依次发送的包含联系人的分组名称的增加命 令, 以及包含与上述分组名称对应的成员标识信息和联系人的个人信息的 增加命令, 从而使得对端能够将上述成员标识信息和上述联系人的个人信 息存储到建立的与上述联系人的分组名称对应的分组中, 实现了终端到服 务器或服务器到终端的联系人信息 (联系人的个人信息和联系人的分组信 息) 能够准确同步, 提高了联系人信息同步的准确性。 In this embodiment, the adding command of the packet name including the contact, and the adding command including the member identification information corresponding to the grouping name and the personal information of the contact, which are sequentially sent to the opposite end, enable the opposite end to The member identification information and the personal information of the above contact are stored in the established group corresponding to the group name of the contact, and the terminal-to-server or server-to-terminal contact information is realized (personal information of the contact and grouping of the contact) Information) Accurate synchronization, improving the accuracy of contact information synchronization.
本实施例是把联系人的分组信息当作一个特殊的数据元素来处理, 例 如: Folder。 每一个分组即为一个 Folder。 Folder之间的层级关系用目录的 层 级 来指 示 。 比 如 : JDataStore/Contact/Grp_A 指 示 为 A 分 组 ; JDataStore/Contact/Grp_B 指 示 为 B 分 组; JDataStore/Contact/Grp_B/l 0011指示为 B分组下的 1001 1联系人。 只 需要约定一个特殊的标识符来指示其为分组即可, 比如使用 Grp_前缀。 同 样, 在同步时, 也可以使用 <^^1〉元素来指明此数据元素为一个分组。 In this embodiment, the grouping information of the contact is treated as a special data element, for example: Folder. Each group is a Folder. Hierarchical relationship between Folders Level to indicate. For example: JDataStore/Contact/Grp_A indicates A group; JDataStore/Contact/Grp_B indicates B group; JDataStore/Contact/Grp_B/l 0011 indicates 1001 1 contacts under B group. You only need to agree on a special identifier to indicate that it is a group, for example using the Grp_ prefix. Similarly, when synchronizing, you can also use the <^^1> element to indicate that this data element is a group.
对于具备分组的数据元素和群组的操作可以很好的重用现有的 DS 协 议来进行。 具体地, 上述增加命令包含联系人的分组名称或与所述分组名 称对应的成员标识信息和联系人的个人信息的形式可以包括但不限于以下 几种形式: The operation of grouped data elements and groups can be done very well by reusing existing DS protocols. Specifically, the above-mentioned increase command includes the group name of the contact or the member identification information corresponding to the group name and the form of the personal information of the contact, which may include, but are not limited to, the following forms:
A、 增加命令可以通过现有的字段包含联系人的分组名称或与所述分 组名称对应的成员标识信息和联系人的个人信息; A. The add command may include the group name of the contact or the member identification information corresponding to the group name and the personal information of the contact through the existing field;
具体地 , 对联 系 人 的 分组信 息进行操作 时 , 可 以 用 <Item>/<Meta>/<Type>字段来指明信息是联系人的分组信息, 用 < ^11:>/<80111^;>字段来携带分组名称, 用 <:^11:>/<0&1&;>字段来携带成员标 识信息。 对联系人的个人信息进行操作时, 用 <Item〉/<Meta〉/<Type〉字段 来指明信息是联系人的个人信息, 用 <^0〉/<0 1〉字段来携带联系人的个 人信息。 Specifically, when the grouping information of the contact is operated, the <Item>/<Meta>/<Type> field may be used to indicate that the information is the grouping information of the contact, and the <^11:>/<80111^;> field is used. To carry the group name, use the <:^11:>/<0&1&;> field to carry the member identification information. When operating the contact's personal information, use the <Item>/<Meta>/<Type> field to indicate that the information is the contact's personal information, and use the <^0>/<0 1> field to carry the contact's personal. information.
B、增加命令可以通过新增的字段包含联系人的分组名称或与所述分组 名称对应的成员标识信息和联系人的个人信息。 B. The add command may include the group name of the contact or the member identification information corresponding to the group name and the personal information of the contact through the added field.
具体地, 对联系人的分组信息进行操作时, 可以用 <Grp〉字段来指明 信息是联系人的分组信息, 用 <Grp〉/<N〉字段来携带分组名称, 用 <Grp〉/<M〉字段来携带成员标识信息。 对联系人的个人信息进行操作时, 用 <Item〉/<Meta〉/<Type〉字段来指明信息是联系人的个人信息, 用 <^11〉/<0 1〉字段来携带联系人的个人信息。 Specifically, when the group information of the contact is operated, the <Grp> field may be used to indicate that the information is the group information of the contact, and the <Grp>/<N> field is used to carry the group name, and <Grp>/<M is used. The 〉 field carries the member identification information. When working with a contact’s personal information, Use the <Item>/<Meta>/<Type> field to indicate that the information is the personal information of the contact, and use the <^11>/<0 1> field to carry the personal information of the contact.
具体地, 可以把联系人的分组信息当作一个特殊的数据元素来处理, 例如 Folder。每一个分组即为一个 Folder。 Folder之间的层级关系用目录的 层 级 来指 示 。 例 如 : JDataStore/Contact/Grp_A 指 示 为 A 分 组 ; JDataStore/Contact/Grp_B 指 示 为 B 分 组; JDataStore/Contact/Grp_B/l 0011指示为 B分组下的 1001 1联系人。 只 需要约定一个特殊的标识符来指示其为分组即可, 例如: 使用 Grp_前缀。 同样, 在同步时, 也可以使用 <^^1〉元素来指明此数据元素为一个分组。 当接收方接收到 Grp_前缀, 或是接收到 <Meta〉/<Type〉指示一个分组时, 则将相应的数据作为分组来处理。 对于具备分组的数据元素和群组的操作 可以很好的重用现有的 OMA SyncML DS协议的命令来进行。 Specifically, the grouping information of the contact can be treated as a special data element, such as a Folder. Each group is a Folder. The hierarchical relationship between Folders is indicated by the hierarchy of the directory. For example: JDataStore/Contact/Grp_A is indicated as A group; JDataStore/Contact/Grp_B is indicated as B group; JDataStore/Contact/Grp_B/l 0011 indicates 1001 1 contact under group B. You only need to agree on a special identifier to indicate that it is a group, for example: Use the Grp_ prefix. Similarly, when synchronizing, you can also use the <^^1> element to indicate that this data element is a group. When the receiver receives the Grp_ prefix, or receives <Meta>/<Type> to indicate a packet, the corresponding data is processed as a packet. The operation of grouped data elements and groups can be done very well by reusing the commands of the existing OMA SyncML DS protocol.
下面可以通过几个具体实施例, 来说明本发明实施例的详细过程。 首 先, 增加一个空的分组, 增加命令可以如下所示: The detailed process of the embodiment of the present invention will be described below by way of several specific embodiments. First, add an empty grouping. Add the command as follows:
<Add> ; 增加 B分组 <Add> ; Add B group
<Meta> ; 数据的描述信息 <Meta> ; Description of the data
<Format xmlns= ' sync ml: metinf >chr</Format> <Format xmlns= ' sync ml: metinf >chr</Format>
<Type xmlns='syncml:metinf >text/x-folder</Type> ; 表明 是分组信息 <Type xmlns='syncml:metinf >text/x-folder</Type> ; indicates yes grouping information
</Meta> </Meta>
<Item> <Item>
<Source> <LocURI>JDataStore/Contacts/Grp_B</LocURI> <Source> <LocURI>JDataStore/Contacts/Grp_B</LocURI>
</Source> ; B分组 </Source> ; Group B
<Data> —分组的描述信息― </Data〉 <Data> - description of the group - </Data>
</Item> </Item>
</Add> </Add>
进一步再对上述增加的分组增加相应的成员,增加命令可以如下所示: <Add> ; 给 B分组增加成员联系人 Further add the corresponding members to the above added packets. The add command can be as follows: <Add> ; Add member contacts to B group
<Meta> ; 数据的描述信息 <Meta> ; Description of the data
<Format xmlns= ' syncml: metinf >chr</Format> <Format xmlns= ' syncml: metinf >chr</Format>
<Type xmlns= ' syncml: metinf >text/x- vCard</Type> ;表明是联 系人信息 <Type xmlns= ' syncml: metinf >text/x- vCard</Type> ; indicates contact information
</Meta> </Meta>
<Item> <Item>
<Source> <Source>
<LocURI>JDataStore/Contacts/Grp_B/ 1001 1 </LocURI> <LocURI>JDataStore/Contacts/Grp_B/ 1001 1 </LocURI>
</Source> </Source>
<Data> - 联系人 vCard信息 ― </Data〉 <Data> - Contact vCard information ― </Data>
</Item> </Item>
</Add> </Add>
对于其他的修改命令、 删除命令、 获取命令等命令也类似。 The commands for other modification commands, delete commands, and acquisition commands are similar.
修改一个分组及其成员信息即联系人的个人信息, 修改命令可以如下 所示: s/Du O-s-s-oosId ssnoiAV Modify a group and its member information, that is, the personal information of the contact. The modification command can be as follows: s/Du Oss-oosId ssnoiAV
/ //¾/ ΐ ΐ 00 ΐos <5¾Ίaa:2¾ll><>0&suolo。.l </Source> / //3⁄4/ ΐ ΐ 00 ΐos <53⁄4Ίaa:23⁄4ll><>0&suolo. .l </Source>
<Data> - 联系人 vCard信息 ― </Data〉 <Data> - Contact vCard information ― </Data>
</Item> </Item>
</Update> </Update>
删除一个分组的删除命令可以如下所示: The delete command to delete a group can be as follows:
<Delete> ; 删除 B分组 <Delete> ; Delete B group
<Meta> ; 数据的描述信息 <Meta> ; Description of the data
<Format xmlns= ' sync ml: metinf >chr</Format> <Format xmlns= ' sync ml: metinf >chr</Format>
<Type xmlns='syncml:metinf >text/x-folder</Type> ; 表明 是分组信息 <Type xmlns='syncml:metinf >text/x-folder</Type> ; indicates yes grouping information
</Meta> </Meta>
<Item> <Item>
<Source> <Source>
<LocURI>JDataStore/Contacts/Grp_B</LocURI> <LocURI>JDataStore/Contacts/Grp_B</LocURI>
</Source> ; B分组 </Source> ; Group B
</Item> </Item>
</Delete> </Delete>
进一步地, 本实施例中, 还可以对联系人的分组信息进行查询, 可以 使用获取(Get )命令来实现, 查询某个分组的分组信息的获取命令可以如 下所示: Further, in this embodiment, the grouping information of the contact may also be queried, and may be implemented by using a Get command. The command to query the grouping information of a group may be as follows:
<Get> ; 获取 B分组的信息 <Get> ; Get information about group B
<Meta> 数据的描述信息 <Format xmlns= ' sync ml: metinf >chr</Format> <Meta> Description of the data <Format xmlns= ' sync ml: metinf >chr</Format>
<Type xmlns='syncml:metinf >text/x-folder</Type> ; 表明 是分组信息 <Type xmlns='syncml:metinf >text/x-folder</Type> ; indicates yes grouping information
</Meta> </Meta>
<Item> <Item>
<Source> <Source>
<LocURI>JDataStore/Contacts/Grp_B</LocURI> <LocURI>JDataStore/Contacts/Grp_B</LocURI>
</Source> ; B分组 </Source> ; Group B
</Item> </Item>
</Get> </Get>
本实施例中, 联系人的个人信息和联系人的分组信息没有同步顺序。 也就是说: 如果终端在本地增加几个联系人, 并把他们加入到 A分组。 在 同步过程中, 终端新增的联系人的个人信息不需要先增加到服务器保存并 通过 <^½ 11611:>命令建立映射关系, 只要终端把上述联系人的分组名称同 步到服务器, 服务器建立对应的分组, 终端再把对应的成员标识信息和联 系人的个人信息同步到服务器, 才能实现与服务器之间的联系人信息的同 步。 In this embodiment, the personal information of the contact person and the group information of the contact are not synchronized. That is: If the terminal adds several contacts locally, and adds them to the A group. During the synchronization process, the personal information of the newly added contacts of the terminal does not need to be added to the server for storage and the mapping relationship is established by the <^1⁄2 11611:> command. As long as the terminal synchronizes the group name of the contact to the server, the server establishes a correspondence. The grouping, the terminal then synchronizes the corresponding member identification information and the contact's personal information to the server, in order to synchronize the contact information with the server.
需要说明的是: 本实施例中, 上述联系人信息实际上包含两种格式的 信息, 一个是 vCard格式的联系人的个人信息、 一个是 Folder格式的联系 人的分组信息。 在终端和服务器实现上, 可以选择分别存储这两种格式的 数据, 或是存储在一起。 It should be noted that, in this embodiment, the contact information actually includes information in two formats, one is a personal information of a contact in a vCard format, and one is a group information of a contact in a Folder format. In terminal and server implementations, you can choose to store the data in either of these formats, or store them together.
需要说明的是: 对于前述的各方法实施例, 为了简单描述, 故将其都 表述为一系列的动作组合, 但是本领域技术人员应该知悉, 本发明并不受 所描述的动作顺序的限制, 因为依据本发明, 某些步骤可以采用其他顺序 或者同时进行。 其次, 本领域技术人员也应该知悉, 说明书中所描述的实 施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。 It should be noted that: for the foregoing method embodiments, for the sake of simple description, The description is a series of combinations of actions, but those skilled in the art will appreciate that the present invention is not limited by the described order of the acts, as some steps may be performed in other sequences or concurrently in accordance with the present invention. In addition, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
在上述实施例中, 对各个实施例的描述都各有侧重, 某个实施例中没 有详述的部分, 可以参见其他实施例的相关描述。 In the above embodiments, the descriptions of the various embodiments are different, and the details are not described in detail in an embodiment, and the related descriptions of other embodiments can be referred to.
图 7为本发明实施例七提供的一种终端的结构示意图, 如图 7所示, 本实施例的终端可以包括个人信息同步模块 71 和分组信息同步模块 72。 其中, 个人信息同步模块 71与服务器进行联系人的个人信息的同步, 分组 信息同步模块 72向上述服务器发送分组上传请求报文,上述分组上传请求 报文中包含联系人的分组信息, 以使上述服务器根据上述联系人的分组信 息, 对存储的上述联系人的个人信息进行分组存储。 FIG. 7 is a schematic structural diagram of a terminal according to Embodiment 7 of the present invention. As shown in FIG. 7, the terminal in this embodiment may include a personal information synchronization module 71 and a packet information synchronization module 72. The personal information synchronization module 71 synchronizes the personal information of the contact with the server, and the packet information synchronization module 72 sends a packet upload request message to the server, where the packet upload request message includes the group information of the contact, so that the The server stores the stored personal information of the contact according to the grouping information of the contact.
上述本发明实施例一、 二中终端的功能均可以由本发明实施例提供的 终端实现。 The functions of the terminal in the first embodiment and the second embodiment of the present invention can be implemented by the terminal provided by the embodiment of the present invention.
本实施例中, 通过分组信息同步模块向服务器发送包含联系人的分组 信息的分组上传请求报文, 从而使得服务器能够根据上述联系人的分组信 息, 对存储的联系人的个人信息进行分组存储, 实现了终端到服务器的联 系人的分组信息的同步, 从而使得终端到服务器的联系人信息 (联系人的 个人信息和联系人的分组信息) 能够准确同步, 提高了联系人信息同步的 准确性。 In this embodiment, the packet information synchronization module sends a packet upload request message including the packet information of the contact to the server, so that the server can store the personal information of the stored contact according to the group information of the contact. The synchronization of the group information of the terminal-to-server contact is realized, so that the terminal-to-server contact information (personal information of the contact and the grouping information of the contact) can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved.
图 8为本发明实施例八提供的一种服务器的结构示意图,如图 8所示, 本实施例的服务器可以包括个人信息同步模块 81和分组信息同步模块 82。 其中, 个人信息同步模块 81与终端进行联系人的个人信息的同步, 分组信 息同步模块 82 根据来自上述终端的分组上传请求报文中包含的联系人的 分组信息, 对存储的上述联系人的个人信息进行分组存储。 FIG. 8 is a schematic structural diagram of a server according to Embodiment 8 of the present invention. As shown in FIG. 8, the server in this embodiment may include a personal information synchronization module 81 and a packet information synchronization module 82. The personal information synchronization module 81 synchronizes the personal information of the contact with the terminal, and the group information synchronization module 82 compares the group information of the contact included in the packet upload request message from the terminal to the stored personal person of the contact. Information is stored in groups.
上述本发明实施例一、 二中服务器的功能均可以由本发明实施例提供 的服务器实现。 The functions of the server in the first embodiment and the second embodiment of the present invention can be implemented by the server provided by the embodiment of the present invention.
本实施例中, 通过分组信息同步模块接收来自终端的包含联系人的分 组信息的分组上传请求报文, 从而使得能够根据上述联系人的分组信息, 对存储的联系人的个人信息进行分组存储, 实现了终端到服务器的联系人 的分组信息的同步, 从而使得终端到服务器的联系人信息 (联系人的个人 信息和联系人的分组信息) 能够准确同步, 提高了联系人信息同步的准确 性。 In this embodiment, the packet information synchronization module receives the packet upload request message from the terminal that includes the packet information of the contact, so that the stored personal information of the contact is stored in groups according to the group information of the contact. The synchronization of the group information of the terminal-to-server contact is realized, so that the terminal-to-server contact information (personal information of the contact and the grouping information of the contact) can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved.
图 9为本发明实施例九提供的另一种终端的结构示意图,如图 9所示, 本实施例的终端可以包括个人信息同步模块 91 和分组信息同步模块 92。 其中, 个人信息同步模块 91与服务器进行联系人的个人信息的同步, 分组 信息同步模块 92向上述服务器发送分组下载请求报文, 以及接收上述服务 器返回的分组下载应答报文, 上述分组下载应答报文中包含联系人的分组 信息, 并根据上述联系人的分组信息, 对存储的上述联系人的个人信息进 行分组存储。 FIG. 9 is a schematic structural diagram of another terminal according to Embodiment 9 of the present invention. As shown in FIG. 9, the terminal in this embodiment may include a personal information synchronization module 91 and a packet information synchronization module 92. The personal information synchronization module 91 synchronizes the personal information of the contact with the server, and the packet information synchronization module 92 sends a packet download request message to the server, and receives a packet download response message returned by the server, and the packet download response message. The text includes grouping information of the contact, and the stored personal information of the contact is stored in groups according to the grouping information of the contact.
上述本发明实施例三、 四中终端的功能均可以由本发明实施例提供的 终端实现。 The functions of the terminals in the third and fourth embodiments of the present invention can be implemented by the terminal provided by the embodiment of the present invention.
本实施例中, 通过分组信息同步模块接收来自服务器的包含联系人的 分组信息的分组下载应答报文,从而使得能够根据上述联系人的分组信息, 对存储的联系人的个人信息进行分组存储, 实现了服务器到终端的联系人 的分组信息的同步, 从而使得服务器到终端的联系人信息 (联系人的个人 信息和联系人的分组信息) 能够准确同步, 提高了联系人信息同步的准确 性。 In this embodiment, the packet information response module receives the packet download response message from the server including the packet information of the contact, thereby enabling the group information according to the contact, The personal information of the stored contacts is stored in groups, and the grouping information of the contacts of the server to the terminal is synchronized, so that the contact information of the server to the terminal (the personal information of the contact and the grouping information of the contact) can be accurately Synchronization improves the accuracy of contact information synchronization.
图 10为本发明实施例十提供的另一种服务器的结构示意图, 如图 10 所示,本实施例的服务器可以包括个人信息同步模块 1001和分组信息同步 模块 1002。 其中, 个人信息同步模块 1001 与终端进行联系人的个人信息 的同步, 分组信息同步模块 1002根据来自上述终端的分组下载请求报文, 向上述终端返回分组下载应答报文, 上述分组下载应答报文中包含联系人 的分组信息, 以使上述终端根据上述联系人的分组信息, 对存储的上述联 系人的个人信息进行分组存储。 FIG. 10 is a schematic structural diagram of another server according to Embodiment 10 of the present invention. As shown in FIG. 10, the server in this embodiment may include a personal information synchronization module 1001 and a packet information synchronization module 1002. The personal information synchronization module 1001 synchronizes the personal information of the contact with the terminal, and the packet information synchronization module 1002 returns a packet download response message to the terminal according to the packet download request message from the terminal, and the packet download response message. The grouping information of the contact is included in the terminal, so that the terminal stores the stored personal information of the contact according to the grouping information of the contact.
上述本发明实施例三、 四中服务器的功能均可以由本发明实施例提供 的服务器实现。 The functions of the servers in the third and fourth embodiments of the present invention can be implemented by the server provided by the embodiment of the present invention.
本实施例中, 通过分组信息同步模块向终端发送包含联系人的分组信 息的分组下载应答报文, 从而使得终端能够根据上述联系人的分组信息, 对存储的联系人的个人信息进行分组存储, 实现了服务器到终端的联系人 的分组信息的同步, 从而使得服务器到终端的联系人信息 (联系人的个人 信息和联系人的分组信息) 能够准确同步, 提高了联系人信息同步的准确 性。 In this embodiment, the packet information synchronization module sends a packet download response message including the packet information of the contact to the terminal, so that the terminal can store the personal information of the stored contact according to the group information of the contact. The synchronization of the grouping information of the server-to-terminal contact is realized, so that the server-to-terminal contact information (personal information of the contact and the grouping information of the contact) can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved.
图 11 为本发明实施例十一提供的再一种终端的结构示意图, 如图 11 所示,本实施例的终端可以包括个人信息同步模块 1101和分组信息同步模 块 1 102。 其中, 个人信息同步模块 1101 与服务器进行联系人的个人信息 的同步, 分组信息同步模块 1 102向上述服务器发送增加命令, 上述增加命 令中包含联系人的分组信息,以使上述服务器根据上述联系人的分组信息, 对存储的上述联系人的个人信息进行分组存储。 FIG. 11 is a schematic structural diagram of still another terminal according to Embodiment 11 of the present invention. As shown in FIG. 11, the terminal in this embodiment may include a personal information synchronization module 1101 and a packet information synchronization module 1102. The personal information synchronization module 1101 and the server perform personal information of the contact person. Synchronization, the packet information synchronization module 1 102 sends an increase command to the server, where the increase command includes group information of the contact, so that the server groups the stored personal information of the contact according to the group information of the contact. storage.
上述本发明实施例五中终端的功能均可以由本发明实施例提供的终端 实现。 The functions of the terminal in the fifth embodiment of the present invention can be implemented by the terminal provided by the embodiment of the present invention.
本实施例中, 通过分组信息同步模块向服务器发送包含联系人的分组 信息的增加命令, 从而使得服务器能够根据上述联系人的分组信息, 对存 储的联系人的个人信息进行分组存储, 实现了终端到服务器的联系人的分 组信息的同步, 从而使得终端到服务器的联系人信息 (联系人的个人信息 和联系人的分组信息) 能够准确同步, 提高了联系人信息同步的准确性。 In this embodiment, the group information synchronization module sends an increase command including the group information of the contact to the server, so that the server can store the personal information of the stored contact according to the group information of the contact, thereby realizing the terminal. The synchronization of the grouping information of the contacts to the server enables the terminal-to-server contact information (personal information of the contact and the grouping information of the contacts) to be accurately synchronized, improving the accuracy of the synchronization of the contact information.
图 12 为本发明实施例十二提供的再一种服务器的结构示意图, 如图 12所示, 本实施例的服务器可以包括个人信息同步模块 1201 和分组信息 同步模块 1202。 其中, 个人信息同步模块 1201 与终端进行联系人的个人 信息的同步,分组信息同步模块 1202根据来自上述终端的增加命令中包含 的联系人的分组信息, 对存储的上述联系人的个人信息进行分组存储。 FIG. 12 is a schematic structural diagram of still another server according to Embodiment 12 of the present invention. As shown in FIG. 12, the server in this embodiment may include a personal information synchronization module 1201 and a packet information synchronization module 1202. The personal information synchronization module 1201 synchronizes the personal information of the contact with the terminal, and the group information synchronization module 1202 groups the stored personal information of the contact according to the group information of the contacts included in the increase command from the terminal. storage.
上述本发明实施例五中服务器的功能均可以由本发明实施例提供的服 务器实现。 The functions of the server in the fifth embodiment of the present invention can be implemented by the server provided by the embodiment of the present invention.
本实施例中, 通过分组信息同步模块接收来自终端的包含联系人的分 组信息的增加命令, 从而使得能够根据上述联系人的分组信息, 对存储的 联系人的个人信息进行分组存储, 实现了终端到服务器的联系人的分组信 息的同步, 从而使得终端到服务器的联系人信息 (联系人的个人信息和联 系人的分组信息) 能够准确同步, 提高了联系人信息同步的准确性。 图 13 为本发明实施例十三提供的又一种终端的结构示意图, 如图 13 所示,本实施例的终端可以包括个人信息同步模块 1301和分组信息同步模 块 1302。 其中, 个人信息同步模块 1301 与服务器进行联系人的个人信息 的同步,分组信息同步模块 1302根据来自上述服务器的增加命令中包含的 联系人的分组信息, 对存储的上述联系人的个人信息进行分组存储。 In this embodiment, the group information synchronization module receives an increase command of the packet information of the contact from the terminal, so that the stored personal information of the contact is stored in groups according to the group information of the contact, thereby realizing the terminal. The synchronization of the grouping information of the contacts to the server enables the terminal-to-server contact information (personal information of the contact and the grouping information of the contacts) to be accurately synchronized, improving the accuracy of the synchronization of the contact information. FIG. 13 is a schematic structural diagram of still another terminal according to Embodiment 13 of the present invention. As shown in FIG. 13, the terminal in this embodiment may include a personal information synchronization module 1301 and a packet information synchronization module 1302. The personal information synchronization module 1301 synchronizes the personal information of the contact with the server, and the group information synchronization module 1302 groups the stored personal information of the contact according to the group information of the contacts included in the increase command from the server. storage.
上述本发明实施例五中终端的功能均可以由本发明实施例提供的终端 实现。 The functions of the terminal in the fifth embodiment of the present invention can be implemented by the terminal provided by the embodiment of the present invention.
本实施例中, 通过分组信息同步模块接收来自服务器的包含联系人的 分组信息的增加命令, 从而使得能够根据上述联系人的分组信息, 对存储 的联系人的个人信息进行分组存储, 实现了服务器到终端的联系人的分组 信息的同步, 从而使得服务器到终端的联系人信息 (联系人的个人信息和 联系人的分组信息) 能够准确同步, 提高了联系人信息同步的准确性。 In this embodiment, the group information synchronization module receives an increase command of the packet information of the contact from the server, so that the personal information of the stored contact is group-stored according to the group information of the contact, and the server is implemented. The synchronization of the grouping information of the contacts to the terminal enables the server-to-terminal contact information (personal information of the contact and the grouping information of the contacts) to be accurately synchronized, improving the accuracy of the synchronization of the contact information.
图 14 为本发明实施例十四提供的又一种服务器的结构示意图, 如图 14所示, 本实施例的服务器可以包括个人信息同步模块 1401 和分组信息 同步模块 1402。 其中, 个人信息同步模块 1401 与终端进行联系人的个人 信息的同步, 分组信息同步模块 1402向上述终端发送增加命令, 上述增加 命令中包含联系人的分组信息, 以使上述终端根据上述联系人的分组信息, 对存储的上述联系人的个人信息进行分组存储。 FIG. 14 is a schematic structural diagram of still another server according to Embodiment 14 of the present invention. As shown in FIG. 14, the server in this embodiment may include a personal information synchronization module 1401 and a packet information synchronization module 1402. The personal information synchronization module 1401 synchronizes the personal information of the contact with the terminal, and the packet information synchronization module 1402 sends an increase command to the terminal, where the increase command includes the group information of the contact, so that the terminal is based on the contact. The group information stores the stored personal information of the above contacts in groups.
上述本发明实施例五中服务器的功能均可以由本发明实施例提供的服 务器实现。 The functions of the server in the fifth embodiment of the present invention can be implemented by the server provided by the embodiment of the present invention.
本实施例中, 通过分组信息同步模块向终端发送包含联系人的分组信 息的增加命令, 从而使得终端能够根据上述联系人的分组信息, 对存储的 联系人的个人信息进行分组存储, 实现了服务器到终端的联系人的分组信 息的同步, 从而使得服务器到终端的联系人信息 (联系人的个人信息和联 系人的分组信息) 能够准确同步, 提高了联系人信息同步的准确性。 In this embodiment, the group information synchronization module sends an add command including the group information of the contact to the terminal, so that the terminal can store the information according to the group information of the contact. The personal information of the contact is stored in a group, and the grouping information of the contact of the server to the terminal is synchronized, so that the contact information of the server to the terminal (the personal information of the contact and the grouping information of the contact) can be accurately synchronized and improved. The accuracy of contact information synchronization.
图 15 为本发明实施例十五提供的还一种终端的结构示意图, 如图 15 所示, 本实施例的终端可以包括第一同步模块 1501和第二同步模块 1502。 其中, 第一同步模块 1501向服务器发送第一增加命令, 上述第一增加命令 包含联系人的分组名称, 以使上述服务器建立上述分组名称对应的分组, 第二同步模块 1502向上述服务器发送第二增加命令,上述第二增加命令包 含与上述分组名称对应的成员标识信息和联系人的个人信息, 以使上述服 务器将上述成员标识信息和上述联系人的个人信息存储到上述分组中。 FIG. 15 is a schematic structural diagram of a terminal according to Embodiment 15 of the present invention. As shown in FIG. 15, the terminal in this embodiment may include a first synchronization module 1501 and a second synchronization module 1502. The first synchronization module 1501 sends a first increase command to the server, where the first increase command includes the group name of the contact, so that the server establishes the packet corresponding to the group name, and the second synchronization module 1502 sends the second message to the server. And adding the command, the second adding command includes the member identification information corresponding to the group name and the personal information of the contact, so that the server stores the member identification information and the personal information of the contact in the group.
上述本发明实施例六中终端的功能均可以由本发明实施例提供的终端 实现。 The functions of the terminal in the foregoing embodiment of the present invention can be implemented by the terminal provided by the embodiment of the present invention.
本实施例中, 通过第一同步模块向服务器发送包含联系人的分组名称 的增加命令, 以及第二同步模块向服务器发送包含与上述分组名称对应的 成员标识信息和联系人的个人信息的增加命令, 从而使得服务器能够将上 述成员标识信息和上述联系人的个人信息存储到建立的与上述联系人的分 组名称对应的分组中, 实现了终端到服务器的联系人信息 (联系人的个人 信息和联系人的分组信息) 能够准确同步, 提高了联系人信息同步的准确 性。 In this embodiment, the first synchronization module sends an increase command including the group name of the contact to the server, and the second synchronization module sends an increase command to the server that includes the member identification information corresponding to the group name and the personal information of the contact. So that the server can store the above-mentioned member identification information and the personal information of the contact mentioned above into the established group corresponding to the group name of the contact, and realize the terminal-to-server contact information (personal information and contact of the contact person) The grouping information of the person can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved.
图 16 为本发明实施例十六提供的还一种服务器的结构示意图, 如图 16所示, 本实施例的服务器可以包括第一同步模块 1601 和第二同步模块 1602。 其中, 第一同步模块 1601根据来自终端的第一增加命令中包含的联 系人的分组名称, 建立上述分组名称对应的分组, 第二同步模块 1602根据 来自上述终端的第二增加命令中包含的与上述分组名称对应的成员标识信 息和联系人的个人信息, 将上述成员标识信息和上述联系人的个人信息存 储到上述分组中。 FIG. 16 is a schematic structural diagram of a server according to Embodiment 16 of the present invention. As shown in FIG. 16, the server in this embodiment may include a first synchronization module 1601 and a second synchronization module 1602. The first synchronization module 1601 is configured according to the association included in the first increase command from the terminal. The group name of the person, the group corresponding to the group name is established, and the second synchronization module 1602 associates the member according to the member identification information corresponding to the group name and the personal information of the contact included in the second addition command from the terminal. The identification information and the personal information of the above contact are stored in the above group.
上述本发明实施例六中服务器的功能均可以由本发明实施例提供的服 务器实现。 The functions of the server in the sixth embodiment of the present invention can be implemented by the server provided by the embodiment of the present invention.
本实施例中, 通过第一同步模块接收来自终端的包含联系人的分组名 称的增加命令, 从而使得服务器能够建立与上述联系人的分组名称对应的 分组, 以及通过第二同步模块接收来自终端的包含与上述分组名称对应的 成员标识信息和联系人的个人信息的增加命令, 从而使得服务器能够将上 述成员标识信息和上述联系人的个人信息存储到建立的分组中, 实现了终 端到服务器的联系人信息 (联系人的个人信息和联系人的分组信息) 能够 准确同步, 提高了联系人信息同步的准确性。 In this embodiment, the first synchronization module receives an increase command of the packet name of the contact from the terminal, so that the server can establish a packet corresponding to the packet name of the contact, and receive the second synchronization module from the terminal. An increase command including the member identification information corresponding to the group name and the personal information of the contact, so that the server can store the member identification information and the personal information of the contact in the established group, and implement the terminal-to-server connection. The person information (personal information of the contact person and the grouping information of the contact person) can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved.
图 17为本发明实施例十七提供的还一种终端的结构示意图, 如图 17 所示, 本实施例的终端可以包括第一同步模块 1701和第二同步模块 1702。 其中,第一同步模块 1701根据来自服务器的第一增加命令中包含的联系人 的分组名称, 建立上述分组名称对应的分组, 第二同步模块 1702根据来自 上述服务器的第二增加命令中包含的与上述分组名称对应的成员标识信息 和联系人的个人信息, 将上述成员标识信息和上述联系人的个人信息存储 到上述分组中。 FIG. 17 is a schematic structural diagram of a terminal according to Embodiment 17 of the present invention. As shown in FIG. 17, the terminal in this embodiment may include a first synchronization module 1701 and a second synchronization module 1702. The first synchronization module 1701 establishes a packet corresponding to the group name according to the group name of the contact included in the first addition command from the server, and the second synchronization module 1702 according to the second update command included in the server from the server. The member identification information corresponding to the group name and the personal information of the contact store the member identification information and the personal information of the contact person in the group.
上述本发明实施例六中终端的功能均可以由本发明实施例提供的终端 实现。 本实施例中, 通过第一同步模块接收来自服务器的包含联系人的分组 名称的增加命令, 从而使得终端能够建立与上述联系人的分组名称对应的 分组, 以及通过第二同步模块接收来自服务器的包含与上述分组名称对应 的成员标识信息和联系人的个人信息的增加命令, 从而使得终端能够将上 述成员标识信息和上述联系人的个人信息存储到建立的分组中, 实现了服 务器到终端的联系人信息 (联系人的个人信息和联系人的分组信息) 能够 准确同步, 提高了联系人信息同步的准确性。 The functions of the terminal in the foregoing embodiment of the present invention can be implemented by the terminal provided by the embodiment of the present invention. In this embodiment, the first synchronization module receives an increase command of the packet name of the contact from the server, so that the terminal can establish a packet corresponding to the packet name of the contact, and receive the second synchronization module from the server. An increase command including the member identification information corresponding to the group name and the personal information of the contact, so that the terminal can store the member identification information and the personal information of the contact in the established group, thereby implementing server-to-terminal contact The person information (personal information of the contact person and the grouping information of the contact person) can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved.
图 18 为本发明实施例十八提供的还一种服务器的结构示意图, 如图 FIG. 18 is a schematic structural diagram of still another server according to Embodiment 18 of the present invention, as shown in FIG.
18所示, 本实施例的服务器可以包括第一同步模块 1801 和第二同步模块 1802。 其中, 第一同步模块 1801向终端发送第一增加命令, 上述第一增加 命令包含联系人的分组名称, 以使上述终端建立上述分组名称对应的分组, 第二同步模块 1802向上述终端发送第二增加命令,上述第二增加命令包含 与上述分组名称对应的成员标识信息和联系人的个人信息, 以使上述终端 将上述成员标识信息和上述联系人的个人信息存储到上述分组中。 As shown in FIG. 18, the server of this embodiment may include a first synchronization module 1801 and a second synchronization module 1802. The first synchronization module 1801 sends a first increase command to the terminal, where the first increase command includes a packet name of the contact, so that the terminal establishes a packet corresponding to the packet name, and the second synchronization module 1802 sends a second message to the terminal. And adding the command, the second adding command includes the member identification information corresponding to the group name and the personal information of the contact, so that the terminal stores the member identification information and the personal information of the contact in the group.
上述本发明实施例六中服务器的功能均可以由本发明实施例提供的服 务器实现。 The functions of the server in the sixth embodiment of the present invention can be implemented by the server provided by the embodiment of the present invention.
本实施例中, 通过第一同步模块向终端发送包含联系人的分组名称的 增加命令, 以及第二同步模块向终端发送包含与上述分组名称对应的成员 标识信息和联系人的个人信息的增加命令, 从而使得终端能够将上述成员 标识信息和上述联系人的个人信息存储到建立的与上述联系人的分组名称 对应的分组中, 实现了服务器到终端的联系人信息 (联系人的个人信息和 联系人的分组信息) 能够准确同步, 提高了联系人信息同步的准确性。 本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步 骤可以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计算机 可读取存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤; 而前述的存储介质包括: ROM、 RAM , 磁碟或者光盘等各种可以存储程序 代码的介质。 In this embodiment, the first synchronization module sends an increase command including the group name of the contact to the terminal, and the second synchronization module sends an increase command to the terminal that includes the member identification information corresponding to the group name and the personal information of the contact. So that the terminal can store the member identification information and the personal information of the contact to the established group corresponding to the group name of the contact, and implement the server-to-terminal contact information (personal information and contact of the contact). The grouping information of the person can be accurately synchronized, and the accuracy of the synchronization of the contact information is improved. A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to program instructions, and the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed. The foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修 改, 或者对其中部分技术特征进行等同替换; 而这些修改或者替换, 并不 使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。 It should be noted that the above embodiments are only for explaining the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that: The technical solutions described in the foregoing embodiments are modified, or some of the technical features are equivalently replaced. The modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201010515611.1 | 2010-10-18 | ||
| CN2010105156111A CN102148853A (en) | 2010-10-18 | 2010-10-18 | Method for synchronizing contact information |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2011150765A1 true WO2011150765A1 (en) | 2011-12-08 |
Family
ID=44422842
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2011/074747 Ceased WO2011150765A1 (en) | 2010-10-18 | 2011-05-27 | Synchronization method of contacts information |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN102148853A (en) |
| WO (1) | WO2011150765A1 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104902057A (en) * | 2015-06-25 | 2015-09-09 | 三星电子(中国)研发中心 | Information processing method and device of mobile communication terminal |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102984240B (en) * | 2012-11-21 | 2016-08-31 | 华为技术有限公司 | A kind of importing, the method and device of derivation contact person |
| CN103561148B (en) * | 2013-10-30 | 2016-05-04 | 宇龙计算机通信科技(深圳)有限公司 | Method and the terminal of contact person's grouping |
| CN113596175B (en) * | 2014-03-18 | 2024-12-06 | 小米科技有限责任公司 | Scene synchronization method, terminal, server and system |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1558342A (en) * | 2004-01-16 | 2004-12-29 | 旭 张 | Method for realizing synchronous update of address book information utilizing public information network |
| CN101022612A (en) * | 2006-02-16 | 2007-08-22 | 杭州波导软件有限公司 | Mobile terminal user information data duplicate method |
| CN101527901A (en) * | 2008-03-03 | 2009-09-09 | 张岩 | Method for mobile phone online address book |
-
2010
- 2010-10-18 CN CN2010105156111A patent/CN102148853A/en active Pending
-
2011
- 2011-05-27 WO PCT/CN2011/074747 patent/WO2011150765A1/en not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1558342A (en) * | 2004-01-16 | 2004-12-29 | 旭 张 | Method for realizing synchronous update of address book information utilizing public information network |
| CN101022612A (en) * | 2006-02-16 | 2007-08-22 | 杭州波导软件有限公司 | Mobile terminal user information data duplicate method |
| CN101527901A (en) * | 2008-03-03 | 2009-09-09 | 张岩 | Method for mobile phone online address book |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104902057A (en) * | 2015-06-25 | 2015-09-09 | 三星电子(中国)研发中心 | Information processing method and device of mobile communication terminal |
Also Published As
| Publication number | Publication date |
|---|---|
| CN102148853A (en) | 2011-08-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8024290B2 (en) | Data synchronization and device handling | |
| EP2404457B1 (en) | Device determination | |
| US8219664B2 (en) | Defining nodes in device management system | |
| US8073432B2 (en) | Data synchronization | |
| US10009707B2 (en) | Interworking light weight machine-to-machine protocol with device management protocol | |
| CN101431413B (en) | Authentication method, system, server and terminal | |
| CN103491055B (en) | A kind of method of the synchronizing information between multiple client, client and server | |
| US9258132B2 (en) | NETCONF SNMP gateway | |
| CN101640867B (en) | Method and system for updating equipment configuration information of message-type application gateway | |
| US20120059924A1 (en) | Method and apparatus for performing device management through a gateway device, and device management server | |
| CN101610276A (en) | Data soft deletion, recovery and synchronization method, terminal and system | |
| US20100287253A1 (en) | Method, apparatus, and system for data synchronization | |
| KR101389101B1 (en) | Method and apparatus for tracking device management data changes | |
| WO2008144992A1 (en) | A method and device for processing the notification message | |
| WO2012069997A1 (en) | Xdms for resource management in m2m | |
| WO2010028571A1 (en) | Large data object transmission method, transmission system, transmitting device and receiving device | |
| WO2011150765A1 (en) | Synchronization method of contacts information | |
| US7734728B2 (en) | Addressing a management object | |
| US8204898B2 (en) | Multi-site common directory and method for using the multi-site common directory | |
| BR112012001464B1 (en) | METHOD FOR OPERATING A TELECOMMUNICATION NETWORK FOR MOBILE TELECOMMUNICATION AND TELECOMMUNICATION NETWORK | |
| CN102726030A (en) | Method and apparatus for routing XCAP requests | |
| EP1709548B1 (en) | Defining nodes in device management system | |
| Tsiridis et al. | Adding an unusual transport to the serval project | |
| WO2025013012A1 (en) | Method and system for barring of short message service (sms) | |
| CN110022283A (en) | Decrypt information processing method and device and decryption method and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 11789144 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 11789144 Country of ref document: EP Kind code of ref document: A1 |