CN102684865B - Method, system and device for data synchronization - Google Patents

Method, system and device for data synchronization Download PDF

Info

Publication number
CN102684865B
CN102684865B CN201110053760.5A CN201110053760A CN102684865B CN 102684865 B CN102684865 B CN 102684865B CN 201110053760 A CN201110053760 A CN 201110053760A CN 102684865 B CN102684865 B CN 102684865B
Authority
CN
China
Prior art keywords
message
length
data synchronization
synchronization request
client
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.)
Active
Application number
CN201110053760.5A
Other languages
Chinese (zh)
Other versions
CN102684865A (en
Inventor
俞小良
刘霖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Co Ltd
Original Assignee
China Mobile Communications Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Co Ltd filed Critical China Mobile Communications Co Ltd
Priority to CN201110053760.5A priority Critical patent/CN102684865B/en
Priority to PCT/CN2012/072028 priority patent/WO2012119547A1/en
Publication of CN102684865A publication Critical patent/CN102684865A/en
Application granted granted Critical
Publication of CN102684865B publication Critical patent/CN102684865B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/24Negotiation of communication capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/40Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass for recovering from a failure of a protocol instance or entity, e.g. service redundancy protocols, protocol state redundancy or protocol service redirection

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer And Data Communications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method, a system and a device for data synchronization. The method mainly includes: using a server to detect message length of an executing state message returning to a client side, and when the message length of the executing state message is large than the maximum message length recognizable to the client side, giving up a current synchronous request of the client side (namely, not returning the executing state message generated currently to the client side), and requesting the client side to resend a data synchronization request decreased in message length for resuming synchronous operation by returning a state code to the client side. By means of circular execution of the scheme of an embodiment, the message length of the executing state message generated by the server is gradually approximate to and smaller than the maximum message length recognizable to the client side until the data synchronization process between the client side and the server is completed, and the problem of interruption of the synchronization process due to the fact that the client side cannot correctly recognize the executing state message is avoided.

Description

A kind of method of data syn-chronization, system and equipment
Technical field
The present invention relates to the communications field, particularly relate to a kind of method of data syn-chronization, system and equipment.
Background technology
Current mobile data synchronizationization is based upon on incompatible proprietary protocol mostly, often kind of agreement can only support the equipment of limited kinds, system and data type, these incompatible agreements add the complexity that each side (user, manufacturer, service provider, developer) works, and these incompatible agreements also can the use of limiting mobile device, the access of data and distribution.
In order to solve the problem of above-mentioned mobile data synchronization, industry proposes a kind of synchronizing information standard agreement (Synchronization Markup Language, SyncML), SyncML agreement is a kind of standard agreement haveing nothing to do with platform, open, and can carry out data syn-chronization between the equipment of compatibility, program and network.
Such as, carry out between client (SyncML Client) based on SyncML agreement and the server (SyncML Server) based on SyncML agreement data (as the data such as address book, calendar) synchronous time process as shown in Figure 1, comprise the following steps:
Step 101:SyncML Client sends data initialization (InitializationPackage) request to SyncML Server, MaxMsgSize parameter is carried, for representing that SyncML Client can identify the maximum message length of SyncML Server return messages in data initialization request.
Step 102:SyncML Server stores the MaxMsgSize parameter that described SyncML Client sends, and after completing initialization operation, returns initialization response to SyncML Client.
Above-mentioned steps 101 and step 102 are initialization operation processes that SyncML Client and SyncML Server carry out before data syn-chronization, and the relevant information of self is sent to SyncMLServer by SyncML Client.
Step 103:SyncML Client sends data syn-chronization (Sync Package) request of carrying operation information to SyncML Server, the message-length of described data synchronization request is not more than the maximum message length represented by MaxMsgSize parameter.
Described operation information is the simultaneous operation that SyncML Client asks SyncML Server and performs, as by the synchronizing information in the address book of SyncML Client to SyncML Server operation information, the calendar information after upgrading in SyncML Client is synchronized to the operation information etc. of SyncML Server.
Step 104:SyncML Server performs operation corresponding to described operation information, generate the executing state message (Status package) of described operation, and described execution state information is returned to SyncMLClient, complete the data synchronization process between this SyncML Client and SyncML Server.
In the ordinary course of things, the message-length of the executing state message that SyncML Server generates is less than the message-length of the data synchronization request received, and be not more than the maximum message length represented by MaxMsgSize parameter due to the message-length of data synchronization request, the message-length of executing state message that then SyncML Server returns to SyncML Client is also not more than the maximum message length represented by MaxMsgSize parameter, therefore, SyncML Client correctly can identify the executing state message received.
But, when described operation information is deletion action information, the message-length of the executing state message generated after the information deletion of specifying will be greater than the message-length of data synchronization request by SyncML Server, when particularly carrying many deletion action information in data synchronization request, because SyncML Server will generate corresponding status message for every bar deletion action information, the message-length that then SyncML Server returns to the executing state message of SyncMLClient may be greater than the maximum message length represented by MaxMsgSize parameter, cause SyncML Client correctly cannot identify the executing state message received, and then make data syn-chronization operation failure.
To ask in SyncML Server synchronization removal database the 1st article to be recorded as example to the 8th article with SyncML Client, illustrate that the message-length of the executing state message that SyncML Server returns may be greater than the situation of the maximum message length represented by MaxMsgSize parameter.
SyncML Client to the content of the data synchronization request that SyncML Server sends is:
When SyncML Server receives the data synchronization request of SyncML Client transmission, perform corresponding deletion action, deleted by the 5th article to the 12nd article record in database, the executing state message of generation is as follows:
It should be noted that, the same data recorded in SyncML Client and SyncML Server positional information in a database may be different, such as: the positional information recorded in SyncML Client is the record of 1, the positional information recorded in SyncML Server is 5, the positional information recorded in SyncML Client is the record of 2, the positional information recorded in SyncML Server is 6, by that analogy, the executing state message of the 5th article to the 12nd article record in the delete database that SyncML Server generates, namely delete the executing state message of the 1st article to the 8th article record in the database of SyncML Client request.
As can be seen from upper example, the message-length of the data synchronization request that SyncML Client sends is 592 bytes, and the message-length of the executing state message that SyncML Server returns is 1036 bytes, if when the maximum message length that SyncML Client can identify is between 592 bytes and 1036 bytes, SyncML Client normally can send data synchronization request to SyncML Server, but correctly can not identify the executing state message that SyncML Server returns, make data syn-chronization operation failure.
Summary of the invention
The embodiment of the present invention provides a kind of method of data syn-chronization, system and equipment, in order to solve exist in prior art when the message-length of executing state message that server generates is greater than the maximum message length that client can identify, cause the problem of data syn-chronization operation failure.
A method for data syn-chronization, described method comprises:
Server, when receiving the data synchronization request that client sends, determines the message-length of the executing state message generated after responding the operation information in described data synchronization request;
Server is when determining that the message-length of executing state message generated is greater than the maximum message length that client can identify, to client return state code, after instruction client reduces the message-length of described data synchronization request, send the data synchronization request of minimizing message-length to server and re-start data syn-chronization.
A kind of server, described server comprises:
Request receiving module, for receiving data synchronization request;
Judge module, whether the message-length for the executing state message generated after judging to respond the operation information in described data synchronization request is greater than the maximum message length that client can identify;
Return module, for in judged result be the message-length of executing state message generated be greater than the maximum message length that client can identify time, to client return state code, after instruction client reduces the message-length of described data synchronization request, send the data synchronization request of minimizing message-length to server and re-start data syn-chronization.
A kind of client, described client comprises:
Request sending module, for sending data synchronization request;
Conditional code receiver module, for accepting state code;
Adjusting module, for reducing the message-length of the described data synchronization request of current transmission, and utilize the data synchronization request trigger request sending module reducing message-length, request and server re-start data syn-chronization.
A system for data syn-chronization, described system comprises:
Client, for sending data synchronization request, and when receiving conditional code, after reducing the message-length of described data synchronization request, again sending the data synchronization request reducing message-length and re-starting data syn-chronization;
Server, for when receiving data synchronization request, the message-length of the executing state message generated after determining the operation information in the described data synchronization request of response, when determining that the message-length of executing state message generated is greater than the maximum message length that client can identify, return state code.
In the scheme of the embodiment of the present invention, the message-length of server to the executing state message returning to client detects, when determining that the message-length of executing state message is greater than the maximum message length that client can identify, abandon the synchronization request (namely not returning this executing state message produced to client) of this client, but pass through to client return state code, require that client resends the data synchronization request of message-length minimizing to re-start simultaneous operation, the scheme of the embodiment of the present invention is performed by circulation, the message-length of the executing state message that server is generated progressively close to and be less than the maximum message length that client identifies, until data synchronization process completes between client and server, avoid the problem causing synchronizing process to be interrupted because client cannot correctly identify executing state message.
Accompanying drawing explanation
Fig. 1 is the step schematic diagram carrying out data syn-chronization in background technology between SyncML Client and SyncML Server;
Fig. 2 is the method step schematic diagram of data syn-chronization in the embodiment of the present invention one;
Fig. 3 is the method step schematic diagram of data syn-chronization in the embodiment of the present invention two;
Fig. 4 is the system configuration schematic diagram of data syn-chronization in the embodiment of the present invention three;
Fig. 5 is the structural representation of server in the embodiment of the present invention four;
Fig. 6 is the structural representation of client in the embodiment of the present invention 5.
Embodiment
In order to realize the object of the invention, in the scheme of the embodiment of the present invention, server initiatively detects the message-length of the executing state message returning to client, when determining that the message-length of executing state message is greater than the maximum message length that client can identify, abandon the synchronization request (namely not returning this executing state message produced to client) of this client, but pass through to client return state code, require that client resends the data synchronization request of message-length minimizing, due to the message-length minimizing of the data synchronization request that server receives again, the message-length of the executing state message therefore regenerated also can reduce, when the message-length of the executing state message regenerated is not more than the maximum message length that client can identify, complete the operation of this data syn-chronization, otherwise repeat request client sends the data synchronization request that message-length constantly reduces, until the message-length of the final executing state message generated is not more than the maximum message length that client can identify.Pass through the present invention program, server is when executing state message correctly can not be identified by client, require that client readjusts data synchronization request, until complete the process of passing through, overcome server in prior art and send executing state message to client blindly, cause the synchronizing process between client and server may occur interrupting.
Scheme in various embodiments of the present invention can be applied in SyncML agreement, and involved server can be SyncML Server, and involved client can be SyncML Client.
Below in conjunction with Figure of description, the embodiment of the present invention is described in detail.
Embodiment one:
As shown in Figure 2, be the method step schematic diagram of data syn-chronization in the embodiment of the present invention one, said method comprising the steps of:
Step 201: the data initialization request that server receives client sends, carries MaxMsgSize parameter in described data initialization request.
Step 202: MaxMsgSize parameter described in server stores, and return initialization response.
Above-mentioned steps 201 and step 202 carry out initialized process between server and client side, is the preferred steps of the present embodiment.
In the scheme of the present embodiment, server and client side can carry out above-mentioned initialization operation before carrying out data syn-chronization first, without the need to performing above-mentioned initialization operation in each data synchronization process.
Server can by determining and recording described MaxMsgSize parameter in the initialization procedure of above-mentioned steps 201 and step 202, and then determine the maximum message length that client can identify, also the maximum message length that client can identify can be determined by other means, as the maximum message length that self can identify is sent to server by other instructions by client.
Step 203: the data synchronization request that server receives client sends.
In this step, the data synchronization request that server receives can be that client is first to the data synchronization request that server sends, also can be due to after the synchronous serviced device of adjacent last secondary data abandons, the data synchronization request again sent after the message-length of data synchronization request is readjusted in client adjustment.
Described data synchronization request comprises at least one operation information, in the present embodiment, can comprise 8 articles of deletion action information of the 1st article to the 8th article record in requirement delete database.
Step 204: the message-length of the executing state message that server generates after determining the operation information in the described data synchronization request of response.
Suppose that the data synchronization request that client sends in step 203 comprises 8 operation informations, require to delete except the 1st article to the 8th article record in database, then in this step, server determines that the message-length of the executing state message generated is 1036 bytes.
Step 205: server judges the maximum message length whether message-length of executing state message generated is greater than client and can identifies if so, then to perform step 206; Otherwise, the executing state message of generation is returned to client, completes this data synchronization process.
In the scheme of the present embodiment, server does not return to client immediately after generation executing state message, but judge the maximum message length whether message-length of described executing state message is greater than client and can identifies, namely judge that client correctly can identify the executing state message of generation.When determining that client correctly can not identify described executing state message, abandon this data synchronization process, namely do not return this executing state message generated to client, avoid the problem causing synchronizing process to be interrupted because client cannot correctly identify executing state message.
Step 206: before server judges, whether return state synchronous codes number reaches setting threshold value continuously, if reach, then terminates this data synchronization process; Otherwise, perform step 207.
Wherein, the last return state code in continuous return state code to this to client return state code between, server did not return executing state message to client.Such as, if this to be server receive for the 15th time data synchronization request that described client sends, and all return conditional code when the 14th time to the 10th time continuous receives the data synchronization request that same client sends for 5 times, but be executing state message what to return for the 9th time, before then representing, return state synchronous codes number is 5 times continuously, and the data synchronization process of the 9th time is successfully completed.
If whether return state synchronous codes number reaches setting threshold value continuously before, then notice client is terminated this data synchronization process by server, requires that client no longer needs synchronous event to send data synchronization request for this.If client wishes the new data synchronization request initiated for other events, then client can send new data synchronization request to server again for other events.
Step 206 is preferred steps of the embodiment of the present invention, by setting the threshold value of number of retransmissions, avoiding synchronizing process to occur endless loop and the problem that cannot stop, meanwhile, also avoiding number of retransmissions too much to cause the problem of the excess waste of the communication resource.
It should be noted that, the message-length of executing state message that retransmission processes in step 206 may generate due to server is greater than the maximum message length that client can identify and occurs, also may be poor and occur due to network environment, in the present embodiment, though can set which kind of reason cause server judge before when continuously return state synchronous codes number has reached setting threshold value, all requires this data synchronization process of end; Also can set: with " message-length of executing state message that server generates is greater than the maximum message length that client can identify " this reason cause server judge before return state synchronous codes number has reached setting threshold value continuously time, just require this data synchronization process of end.
Step 207: server to client return state code (Alert Code), and jumps to step 203, waits for the data synchronization request that the message-length again receiving client transmission decreases.
Described conditional code represents the maximum message length that the message-length of executing state message generated due to server is greater than client and can identifies, server abandons the data synchronization request of this client, server will wait for the data synchronization request that the message-length that client retransmits decreases, circulation performs the operation of above-mentioned steps 203 ~ step 207, until the data synchronization process between client can be completed in step 205, or determine that continuous return state synchronous codes number has reached setting threshold value and exited data synchronization process in step 206.
In this step, server is after client return state code, server is by the continuous return state synchronous codes base plinth that relates in step 206, increase continuous return state synchronous codes number again, and utilize the continuous return state synchronous codes number again increased as the Rule of judgment performing step 206 next time.
By the scheme of the embodiment of the present invention one, describe the process that server side carries out data syn-chronization, because server does not return to client immediately after generating executing state message, but when determining that the message-length of described executing state message is greater than the maximum message length that client can identify, abandon this data synchronization process, require the message-length of client adjustment data synchronization request, until just complete data synchronization process with client when the message-length of executing state message generated is not more than the maximum message length that client can identify, avoid the problem causing synchronizing process to be interrupted because client cannot correctly identify executing state message.
Embodiment two:
The embodiment of the present invention two is from client-side to describe the method for data synchronization of the embodiment of the present invention, and the scheme of the embodiment of the present invention two is corresponding with the scheme of embodiment one, below for Fig. 3, is described the scheme of the embodiment of the present invention two.
The scheme of the embodiment of the present invention two comprises the following steps:
Step 301: user end to server sends data initialization request, carries MaxMsgSize parameter in described data initialization request.
This step is corresponding with the step 201 in embodiment one and step 202, is the initialization procedure between client and server, and this step is also the preferred steps of the present embodiment.
Step 302: user end to server sends data synchronization request.
This step is corresponding with the step 203 in embodiment one, client can first and send data synchronization request to server when carrying out data syn-chronization between server, also can be after receiving the conditional code that server returns, after adjusting the message-length of the data synchronization request that the adjacent last time sends, send the data synchronization request after message-length minimizing to server.
Step 303: what client judged that server returns is conditional code or executing state message, if what return is conditional code, then performs step 304; Otherwise, complete this data synchronization process.
This step is corresponding with the step 204 ~ step 207 of embodiment one, the maximum message length that client can identify is greater than at the message-length of server determination executing state message, when namely determining that client correctly can not identify described executing state message, to client return state code.
In this step, if client receives the conditional code that server returns, represent that server abandons this data synchronization request, then client needs data retransmission synchronization request; If client receives the executing state message that server returns, represent that server side has completed this data synchronization process, after the executing state message that client identification receives, complete this data synchronization process.
Step 304: client reduces the message-length of the data synchronization request that the adjacent last time sends, and jumps to step 302, sends the data synchronization request reducing message-length to server.
After client eliminates M bar deletion action information, will carry (L-M) bar deletion action information in the data synchronization request sent in step 205, request and server re-start data syn-chronization.
Because the message-length of data synchronization request decreases, server needs the deletion action content performed to decrease, therefore, the message-length of the executing state message of generation also will reduce relative to the last time, improve the possibility that between server and client side, data syn-chronization successfully realizes.
The M bar deletion action information that client is removed after this data synchronization process successful execution, then can carry out the corresponding operation of requirement server response by the data synchronization request of carrying described M bar deletion action information.
Suppose client send in the data synchronization request of server can carry L (L be greater than 1 positive integer) bar deletion action information, the specific implementation of this step comprises but first following two kinds of modes:
Mode one:
Client determines the message-length of every bar deletion action information, and removes the longest N bar deletion action information of message-length, and described N is the positive integer being greater than 0 and being less than L
Mode two:
Client removes the M bar deletion action information in described data synchronization request, and described M is the positive integer being greater than 0 and being less than L.
Particularly, client can remove wherein M bar deletion action information according to the quantity of the deletion action information of carrying in data synchronization request, also can remove wherein M bar deletion action information according to the message-length of data synchronization request, be illustrated respectively below:
1, wherein M bar deletion action information is removed according to the quantity of the deletion action information of carrying in data synchronization request.
First, the first ratio range that client presets, as cut down the deletion action information of 8% ~ 12% number at every turn.
Then, client determines the M bar deletion action information needing to remove, and the ratio of described M and L is in described first ratio range.
Such as, when L=10, client is determined as M=1, the number of reduction be the ratio of 10%, M and L in the first ratio range, therefore, client removes 1 deletion action information in 10 deletion action information.
2, wherein M bar deletion action information is removed according to the message-length of data synchronization request.
First, the second ratio range that client presets, the message-length as each data synchronization request cuts down 8% ~ 12%.
Then, client is determined in L bar deletion action information, the message-length of every bar deletion action information.
Then, client is according to the second ratio range of setting, determine the M bar deletion action information needing to remove, the ratio of the message-length of the data synchronization request before the message-length of the M bar deletion action information of described removal and message-length reduce is in described second ratio range.
Such as, when the deletion action information of carrying is L bar, the message-length of data synchronization request is a, then according to the message-length of every bar deletion action information, M bar deletion action information is selected from L bar deletion action information, the message-length of requirement M bar deletion action information is b, and the ratio of b and a is in the second ratio range.
It should be noted that, after no matter being removed the deletion action information in data synchronization request by which kind of mode above-mentioned, if the data synchronization request removing deletion action information is sent to server, and after client receives the executing state message (representing that client and server completes the data syn-chronization operation for the data synchronization request removing deletion action information) that server returns, the deletion action that the deletion action information of client removal is corresponding still needs to carry out synchronous with server, therefore, user end to server sends the data synchronization request comprising the deletion action information of removal, for the data synchronization request of deletion action information comprising removal, the scheme of the present embodiment two can be re-executed, carry out simultaneous operation.
By the scheme of the embodiment of the present invention two, describe the process that client-side carries out data syn-chronization, due to client determine when receiving the conditional code that server returns server due to the message-length of executing state message long and abandon this data synchronization process, therefore, client will resend to server after the message-length of minimizing data synchronization request, require that server carries out data synchronization process according to the data synchronization request again received, circulation like this, until data synchronization process completes between client and server, avoid the problem causing synchronizing process to be interrupted because client cannot correctly identify executing state message.Further, the embodiment of the present invention two additionally provides the mode that multiple client reduces the message-length of data synchronization request, the message-length of the executing state message that server is generated progressively close to and be less than the maximum message length that client identifies, when guaranteeing that synchronizing process correctly performs, the operation that server is responded simultaneously reaches maximization, reduce the synchronizing process between client and server, improve data synchronization efficiency.
Embodiment three:
The embodiment of the present invention three also provides a kind of system of data syn-chronization, described system comprises client 11 and server 12, wherein: client 11 is for sending data synchronization request, and when receiving conditional code, after reducing the message-length of described data synchronization request, again send the data synchronization request reducing message-length and re-start data syn-chronization; Server 12 is for when receiving data synchronization request, the message-length of the executing state message generated after determining the operation information in the described data synchronization request of response, when determining that the message-length of executing state message generated is greater than the maximum message length that client can identify, return state code.
Whether server 12 also reaches setting threshold value for return state synchronous codes number continuous before judgement, when not reaching threshold value, to client return state code, and increases continuous return state synchronous codes number.
Wherein, the last return state code in continuous return state code to this to client return state code between, server did not return executing state message to client;
Server 12, also for carrying out initialization operation with client 11, stores the maximum message length that in the data initialization request that client 11 sends, the client of carrying can identify.
Client 12 in the present embodiment can reduce the message-length of data synchronization request according to the various ways in embodiment two.
Concrete, in the present embodiment three, the reciprocal process of the client 11 of the system of data syn-chronization and server 12 is as shown in Figure 4:
The first step, initialization operation is carried out between client 11 and server 12, client 11 sends data initialization (Initialization Package) request to server 12, MaxMsgSize parameter is carried, for representing that client 11 can the maximum message length of identified server 12 return messages in Initialization Package asks; Server 12 stores described MaxMsgSize parameter, and after completing initialization operation, returns initialization response to client 11.
Second step, when needs carry out data syn-chronization, client 11 sends data syn-chronization (Sync Package) request to server 12, and the message-length of described data synchronization request is not more than the maximum message length represented by MaxMsgSize parameter.
3rd step, performs by server 12 operation that client 11 asks, and generates executing state message (Status package).If the message-length of the executing state message generated is greater than the maximum message length represented by MaxMsgSize parameter, then server 12 is to client 11 return state code (Alert Code), and the message-length of the executing state message of the current generation of notice client 11 is greater than the maximum message length represented by MaxMsgSize parameter; If the message-length of the executing state message generated is not more than the maximum message length represented by MaxMsgSize parameter, then the execution state information of generation is returned to client 11 by server 12, completes this data synchronization process.
4th step, client 11, when receiving conditional code, after reducing the message-length of data synchronization request, again sends the data synchronization request reducing message-length and re-starts data syn-chronization, and jumping to the 3rd step.
Embodiment four:
The embodiment of the present invention four also provides a kind of server, as shown in Figure 5, comprising: request receiving module 21, judge module 22 and return module 23, wherein: request receiving module 21 is for receiving data synchronization request; Whether judge module 22 is greater than for the message-length of the executing state message generated after judging to respond the operation information in described data synchronization request the maximum message length that client can identify; Return module 23 in judged result be the message-length of executing state message generated be greater than the maximum message length that client can identify time, to client return state code, after instruction client reduces the message-length of described data synchronization request, send the data synchronization request of minimizing message-length to server and re-start data syn-chronization.
Described server also comprises counting module 24, for return state synchronous codes number continuous before record, wherein, the last return state code in continuous return state code to this to client return state code between, server did not return executing state message to client.
Whether described judge module 22 also reaches setting threshold value for return state synchronous codes number continuous before judgement, when judged result is not for reaching setting threshold value, triggers and returning module 23.
Return module 23 after client return state code, flip-flop number module 24 increases continuous return state synchronous codes number.
Described server also comprises: initialization module 25 and memory module 26, wherein, the data initialization request that initialization module 25 sends for receiving client, carries the maximum message length that client can identify, and returns initialization response in described data initialization request; Memory module 26 stores the maximum message length that described client can identify.
Also comprise the functional module that can realize each step of embodiment one in the invention process four, repeat no more herein.
Embodiment five:
The embodiment of the present invention five also provides a kind of client, as shown in Figure 6, comprising: request sending module 31, conditional code receiver module 32 and adjusting module 33, wherein: request sending module 31 is for sending data synchronization request; Conditional code receiver module 32, for after transmission data synchronization request, receives the conditional code returned; Adjusting module 33 for reducing the message-length of the described data synchronization request of current transmission, and utilizes the data synchronization request trigger request sending module reducing message-length, and request and server re-start data syn-chronization.
Described adjusting module 33 can reduce the message-length of data synchronization request according to the various ways in embodiment two.
Also comprise the functional module that can realize each step of embodiment two in the invention process five, repeat no more herein.
Those skilled in the art should understand, the embodiment of the application can be provided as method, system or computer program.Therefore, the application can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the application can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) of computer usable program code.
The application describes with reference to according to the flow chart of the method for the embodiment of the present application, equipment (system) and computer program and/or block diagram.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame.These computer program instructions can being provided to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computer or other programmable data processing device produce device for realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computer or other programmable devices is provided for the step realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
Although described the preferred embodiment of the application, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising preferred embodiment and falling into all changes and the amendment of the application's scope.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (8)

1. a method for data syn-chronization, is characterized in that, described method comprises:
Server is when receiving the data synchronization request that client sends, the message-length of the executing state message generated after determining the operation information in the described data synchronization request of response, carry L bar deletion action information in described data synchronization request, described L be greater than 1 positive integer;
Server is when determining that the message-length of executing state message generated is greater than the maximum message length that client can identify, to client return state code, after instruction client reduces the message-length of described data synchronization request, send the data synchronization request of minimizing message-length to server and re-start data syn-chronization, wherein, the step that client reduces the message-length of described data synchronization request comprises: the quantity according to the deletion action information of carrying in data synchronization request or the message-length according to data synchronization request remove the M bar deletion action information in data synchronization request, specifically comprise: client is according to the first ratio range of setting, determine the M bar deletion action information needing to remove, the ratio of described M and L is in described first ratio range, or client determines the message-length of every bar deletion action information, according to the second ratio range of setting, determine the M bar deletion action information needing to remove, the ratio of the message-length of the data synchronization request before the message-length of the M bar deletion action information of described removal and message-length reduce is in described second ratio range, or determine the message-length of every bar deletion action information, and remove the longest N bar deletion action information of message-length, described M is the positive integer being greater than 0 and being less than L, and described N is the positive integer being greater than 0 and being less than L.
2. the method for claim 1, is characterized in that, server is after determining that the message-length of executing state message generated is greater than the maximum message length that client can identify, and to before client return state code, described method also comprises:
Server before determining continuously return state synchronous codes number do not reach setting threshold value;
Server this after client return state code, described method also comprises:
Server increases continuous return state synchronous codes number.
3. method as claimed in claim 1 or 2, is characterized in that, before server receives data synchronization request, described method also comprises:
The data initialization request that server receives client sends, carries the maximum message length that client can identify in described data initialization request;
The maximum message length that client described in server stores can identify, and return initialization response.
4. a method for data syn-chronization, is characterized in that, described method comprises:
User end to server send data synchronization request, carry L bar deletion action information in described data synchronization request, described L be greater than 1 positive integer;
Client is when receiving the conditional code that server returns, reduce the message-length of described data synchronization request, and the data synchronization request reducing message-length is sent to server, request and server re-start data syn-chronization, wherein, the step reducing the message-length of described data synchronization request comprises: the quantity according to the deletion action information of carrying in data synchronization request or the message-length according to data synchronization request remove the M bar deletion action information in data synchronization request, specifically comprise: client is according to the first ratio range of setting, determine the M bar deletion action information needing to remove, the ratio of described M and L is in described first ratio range, or client determines the message-length of every bar deletion action information, according to the second ratio range of setting, determine the M bar deletion action information needing to remove, the ratio of the message-length of the data synchronization request before the message-length of the M bar deletion action information of described removal and message-length reduce is in described second ratio range, or determine the message-length of every bar deletion action information, and remove the longest N bar deletion action information of message-length, described M is the positive integer being greater than 0 and being less than L, and described N is the positive integer being greater than 0 and being less than L.
5. method as claimed in claim 4, is characterized in that, after user end to server sends the data synchronization request reducing message-length, described method also comprises:
Client, when receiving the executing state message that server returns, sends the data synchronization request comprising the deletion action information of removal to server.
6. a server, is characterized in that, described server comprises:
Request receiving module, for receiving data synchronization request, carries L bar deletion action information in described data synchronization request, described L be greater than 1 positive integer;
Judge module, whether the message-length for the executing state message generated after judging to respond the operation information in described data synchronization request is greater than the maximum message length that client can identify;
Return module, for in judged result be the message-length of executing state message generated be greater than the maximum message length that client can identify time, to client return state code, after instruction client reduces the message-length of described data synchronization request, send the data synchronization request of minimizing message-length to server and re-start data syn-chronization, wherein, the step that client reduces the message-length of described data synchronization request comprises: the quantity according to the deletion action information of carrying in data synchronization request or the message-length according to data synchronization request remove the M bar deletion action information in data synchronization request, specifically comprise: client is according to the first ratio range of setting, determine the M bar deletion action information needing to remove, the ratio of described M and L is in described first ratio range, or client determines the message-length of every bar deletion action information, according to the second ratio range of setting, determine the M bar deletion action information needing to remove, the ratio of the message-length of the data synchronization request before the message-length of the M bar deletion action information of described removal and message-length reduce is in described second ratio range, or determine the message-length of every bar deletion action information, and remove the longest N bar deletion action information of message-length, described M is the positive integer being greater than 0 and being less than L, and described N is the positive integer being greater than 0 and being less than L.
7. a client, is characterized in that, described client comprises:
Request sending module, for sending data synchronization request, carries L bar deletion action information in described data synchronization request, described L be greater than 1 positive integer;
Conditional code receiver module, for accepting state code;
Adjusting module, for reducing the message-length of the described data synchronization request of current transmission, and utilize the data synchronization request trigger request sending module reducing message-length, request and server re-start data syn-chronization, wherein, the message-length reducing described data synchronization request comprises: the quantity according to the deletion action information of carrying in data synchronization request or the message-length according to data synchronization request remove the M bar deletion action information in data synchronization request, specifically comprise: client is according to the first ratio range of setting, determine the M bar deletion action information needing to remove, the ratio of described M and L is in described first ratio range, or client determines the message-length of every bar deletion action information, according to the second ratio range of setting, determine the M bar deletion action information needing to remove, the ratio of the message-length of the data synchronization request before the message-length of the M bar deletion action information of described removal and message-length reduce is in described second ratio range, or determine the message-length of every bar deletion action information, and remove the longest N bar deletion action information of message-length, described M is the positive integer being greater than 0 and being less than L, and described N is the positive integer being greater than 0 and being less than L.
8. a system for data syn-chronization, is characterized in that, described system comprises:
Client, for sending data synchronization request, carries L bar deletion action information in described data synchronization request, described L be greater than 1 positive integer, and when receiving conditional code, after reducing the message-length of described data synchronization request, again send the data synchronization request reducing message-length and re-start data syn-chronization, wherein, the message-length reducing described data synchronization request comprises: the quantity according to the deletion action information of carrying in data synchronization request or the message-length according to data synchronization request remove the M bar deletion action information in data synchronization request, specifically comprise: client is according to the first ratio range of setting, determine the M bar deletion action information needing to remove, the ratio of described M and L is in described first ratio range, or client determines the message-length of every bar deletion action information, according to the second ratio range of setting, determine the M bar deletion action information needing to remove, the ratio of the message-length of the data synchronization request before the message-length of the M bar deletion action information of described removal and message-length reduce is in described second ratio range, or determine the message-length of every bar deletion action information, and remove the longest N bar deletion action information of message-length, described M is the positive integer being greater than 0 and being less than L, and described N is the positive integer being greater than 0 and being less than L,
Server, for when receiving data synchronization request, the message-length of the executing state message generated after determining the operation information in the described data synchronization request of response, when determining that the message-length of executing state message generated is greater than the maximum message length that client can identify, return state code.
CN201110053760.5A 2011-03-07 2011-03-07 Method, system and device for data synchronization Active CN102684865B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201110053760.5A CN102684865B (en) 2011-03-07 2011-03-07 Method, system and device for data synchronization
PCT/CN2012/072028 WO2012119547A1 (en) 2011-03-07 2012-03-07 Data synchronization method, system and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110053760.5A CN102684865B (en) 2011-03-07 2011-03-07 Method, system and device for data synchronization

Publications (2)

Publication Number Publication Date
CN102684865A CN102684865A (en) 2012-09-19
CN102684865B true CN102684865B (en) 2015-05-27

Family

ID=46797494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110053760.5A Active CN102684865B (en) 2011-03-07 2011-03-07 Method, system and device for data synchronization

Country Status (2)

Country Link
CN (1) CN102684865B (en)
WO (1) WO2012119547A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105827736B (en) * 2016-05-20 2019-01-25 上海画擎信息科技有限公司 A kind of message method and system
CN111666340B (en) * 2020-05-27 2023-10-27 中国平安财产保险股份有限公司 Synchronous data proofreading method and device based on big data and computer equipment
CN112783972A (en) * 2020-12-31 2021-05-11 武汉工程大学 Method and system for synchronizing image characteristic value data
CN114449034B (en) * 2022-01-28 2024-06-25 湖南快乐阳光互动娱乐传媒有限公司 Service calling system and method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744561A (en) * 2004-09-01 2006-03-08 华为技术有限公司 Super-long message processing method during message conversion process
CN101399656A (en) * 2007-09-27 2009-04-01 华为技术有限公司 Data synchronization method and system in synchronization makeup language
CN101877862A (en) * 2009-04-30 2010-11-03 中兴通讯股份有限公司 Large object transmission method and server

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7570668B2 (en) * 2001-10-03 2009-08-04 Nokia Corporation Data synchronization
US7155521B2 (en) * 2001-10-09 2006-12-26 Nokia Corporation Starting a session in a synchronization system
CN100481837C (en) * 2005-09-30 2009-04-22 北京邮电大学 Synchronous processing method of mobile user personal data between terminal and server
CN101442397B (en) * 2007-11-23 2012-07-04 中兴通讯股份有限公司 Transmission method for reason value

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744561A (en) * 2004-09-01 2006-03-08 华为技术有限公司 Super-long message processing method during message conversion process
CN101399656A (en) * 2007-09-27 2009-04-01 华为技术有限公司 Data synchronization method and system in synchronization makeup language
CN101877862A (en) * 2009-04-30 2010-11-03 中兴通讯股份有限公司 Large object transmission method and server

Also Published As

Publication number Publication date
WO2012119547A1 (en) 2012-09-13
CN102684865A (en) 2012-09-19

Similar Documents

Publication Publication Date Title
CN109451032B (en) Message transmission system
CN102684865B (en) Method, system and device for data synchronization
CN109802995B (en) Message pushing method, device, equipment and storage medium
CN112261142B (en) RDMA network data retransmission method, device and FPGA
CN103701867A (en) Method, system and central server for processing call requests
CN111416823A (en) Data transmission method and device
CN109391593B (en) Retry time determination method and device for media session, storage medium and terminal
CN106790354B (en) Communication method and device for preventing data congestion
CN111698281B (en) Resource downloading method and device, electronic equipment and storage medium
CN110569115B (en) Multi-point deployment process management method and process competing method
CN109905459B (en) Data transmission method and device
CN111885564A (en) Data transmission method, equipment upgrading method and computer readable storage medium
CN112911659B (en) NR-based information reporting method and device
CN104038328A (en) Multi-screen interaction message transmission method, device and system
CN114726711A (en) Method and system for cooperative processing service between devices
KR20180045235A (en) Method and system for data synchronization based on event message
CN105701109A (en) File multiplex sending method and device
CN104753826A (en) Bandwidth allocation method and device
CN110784518A (en) Static resource acquisition method and device
CN104581978A (en) User terminal and channel access method
CN114143300B (en) Transaction request sending method and device
CN113316101B (en) Short message sending method, short message sending device, short message sending equipment and storage medium
CN112888032B (en) Lossless switching method, target base station and lossless switching system
CN110995463B (en) AP self-recovery method and device
CN108696382B (en) Link recovery method, device and communication node

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant