Summary of the invention
Technical problem to be solved by this invention is to provide a kind of method for synchronous and portable terminal and server thereof that utilizes error check code, mobile communication terminal is to server transmissioning data and carry out when synchronous, if synchronization failure, when descending subsynchronous startup, only the data with failure are sent to server, carry out synchronously.
For achieving the above object, the invention provides a kind of method of data synchronization that utilizes error check code, be used at mobile communication terminal to server transmissioning data and carry out comprising synchronously: comprise the more than one identifying information that needs data in synchronization, each data at least, show that the first synchronization request data of the error check code of each data mode are sent to server and the synchronous first step of request msg; Reception comprises the syn ack result of error check code and second step of storage, and wherein, the server of reception data synchronization request transmits the above-mentioned syn ack result who comprises error check code after carrying out data sync; Extract the data of synchronization failure according to the error check code that receives, and the identifying information of the data of synchronization failure, each data, the second synchronization request data that comprise the error check code of each data are sent to server, the third step that request msg is synchronous.
Error check code be the video data init state situation, add data or more news, data normal synchronized to the value of setting of the situation of the situation of server, failure of data synchronization.
Second step comprises: receive the syn ack result's who comprises error check code step, wherein, transmit the above-mentioned syn ack result who comprises error check code after the execution data sync; Extract the step of pressing the different error check code of each data from the syn ack result who receives; Will be by the different error check code steps that are stored in tables of data corresponding of each data with each data.
Third step comprises: the step of extracting the data of the error check code with display synchronization failure from tables of data; The second synchronization request data of error check code that will comprise identifying information, the display synchronization failure of data, each data of extraction are sent to server and the synchronous step of request msg.
And, the present invention also provides the method for data synchronization that utilizes error check code, be used for receiving data and carrying out comprising synchronously from mobile communication terminal at server: receive from mobile communication terminal comprise more than one first identifying information that needs data in synchronization, each data at least, show each data mode error check code the first synchronization request data and carry out first step to each data synchronization; According to each data synchronization execution result error check code is set, transmits syn ack result's second step to mobile communication terminal; Receive from the mobile communication terminal that receives the syn ack result data that comprise synchronization failure, each data first identifying information, each data error check code the second synchronization request data and carry out third step to this data synchronization.
First step comprises: receive the step of the first synchronization request data comprise more than one first identifying information that needs data in synchronization, each data at least, to show the error check code of each data mode from mobile communication terminal; The step that first identifying information of each data that the first synchronization request data that receive are comprised mates corresponding second identifying information; By the step of second identifying information execution of mating to each data synchronization.
Second step comprises: according to each data synchronization execution result error check code is stored in tables of data by second identifying information of coupling step is set; To comprise first identifying information of each data that receives from mobile communication terminal, transmit the step of mobile communication terminal corresponding to the syn ack result of the error check code of each first identifying information.
Error check code be the video data init state situation, add data or more news, data normal synchronized to the value of setting of the situation of the situation of server, failure of data synchronization.
The present invention also provides mobile communication terminal, be used for to server transmissioning data and carry out data sync, comprising: storage comprises the more than one identifying information that needs data in synchronization, each data at least, show the memory of tables of data of the error check code of each data mode; Identifying information, the error check code that needs data in synchronization, each data is sent to server and request msg is synchronous, receive the syn ack result of the syn ack code of the identifying information comprise each data, error check code from server, and from tables of data, select the data of synchronization failure according to error check code, to the control part of server requests to this data synchronization.
Control part comprises: the collection of letters handling part that receives the error check code of syn ack result and extraction expression success synchronously or failure; According to error check code updated data table that extracts by collection of letters handling part and the management department that manages; Expression is included in the portion that is provided with that the error check code of each data mode of tables of data is provided with; From tables of data, select the selection portion of needs request data in synchronization according to the error check code that is included in tables of data; To all data selected by selection portion or the synchronous transmission handling part of request of data of synchronization failure.
The present invention also provides server, be used for receiving data and carrying out data sync, comprise from mobile communication terminal: storage comprise at least more than one data, each data first identifying information, show the memory of tables of data of the error check code of each data mode; Comprise error check code, ask synchronization request data from the mobile communication terminal reception at least more than one data synchronization, execution is to each data synchronization, according to the error check code that each data synchronization execution result is provided with expression success synchronously or fails, transmit syn ack result's control part to mobile communication terminal.
Control part comprises: receive the collection of letters handling part of the first synchronization request data comprise more than one first identifying information that needs data in synchronization, each data at least, to show the error check code of each data mode from mobile communication terminal; The matching part of corresponding second identifying information of first identifying information of each data that comprises in the first synchronization request data that coupling receives; Carry out each data synchronization and be stored in the management department of tables of data by second identifying information of coupling by second identifying information of coupling; Be included in the portion that is provided with of the error check code of tables of data according to each data synchronization execution result setting; To comprise first identifying information of each data that receives from mobile communication terminal, be sent to the transmission handling part of mobile communication terminal corresponding to the syn ack result of the error check code of each first identifying information.
Adopt the present invention, when from mobile communication terminal when server is carried out data sync and failure is taken place, when subsynchronous down the data of failure only taking place synchronously, thereby saves time and reduce expenses.
Embodiment
Following with reference to description of drawings one embodiment of the invention.
Fig. 1 is the structured flowchart of the mobile communication terminal of one embodiment of the invention.
As shown in Figure 1, the mobile communication terminal 100 of one embodiment of the invention comprises: storage comprises the memory 110 of the tables of data of error check code; The control part 120 of the data sync that tables of data comprised of memory 110 to server 200 will be stored in; RF portion 130; Speech processes portion 140; Loud speaker 150; Microphone 160; Key input part 170; Display part 180.
Memory 110 storages are used for control part 120 and carry out the various programs of action or the data that interim stored program is handled.
In addition, memory 110 is stored the identifying information that needs data in synchronization, each data that comprises at least on, the tables of data that shows the error check code of each data mode.
Wherein, the identifying information of each data comprises: mobile communication terminal 100 is given the local unique identification (LUID:Local Unique Identifier) of each data in the tables of data for management data; Be sent to the data transfer time of server 200 for above-mentioned data synchronization.
For carrying out data sync, mobile communication terminal 100 transmits LUID, the delivery time that needs data in synchronization, 100 pairs of above-mentioned data of mobile communication terminal to give to server 200.
Server 200 is used for the data identifier-global unique identification symbol (GUID:Global Unique Identifier) of the above-mentioned data of server 200 management for the LUID coupling of the above-mentioned data that are sent to server 200.
The server 200 that receives the LUID that needs data in synchronization and these data from mobile communication terminal 100 mate and the corresponding GUID of LUID of mobile communication terminal 100 and above-mentioned data are added to the tables of data that is stored in server 200 again.
Error check code is to be used to confirm whether mobile communication terminal 100 successfully adds the identifier of server 200 to server 200 request data in synchronization.
Error check code for the state (status) of each data of expression mobile communication terminal 100 and server 200 as giving a definition:
0X00: expression data initialization state
0X01: expression is added or the renewal data conditions
0X02: the expression data successfully are synchronized to server
0X03: expression failure of data synchronization
For example, if successfully add server 200 to from the data of mobile communication terminal 100 transmission, server 200 sends the LUID and the error check code 0X02 of above-mentioned data to mobile communication terminal 100 as the syn ack result.
But if add failure from the data of mobile communication terminal 100 transmission to server 200, server 200 sends the LUID and the error check code 0X03 of above-mentioned data to mobile communication terminal 100 as the syn ack result.
Afterwards, the error check code updated stored that mobile communication terminal 100 will receive from server 200 is to the tables of data that is stored in memory 110, and success is synchronously to judge each data.
If to the failure of data synchronization of arbitrary data, next time synchronously the time, it is that the data of 0X03 send server 200 and request to synchronously that 100 of mobile communication terminals will be stored in error check code in the tables of data of memory 120.
The synchronization request data that control part 120 will comprise the identifying information that needs data in synchronization, each data in the tables of data that is stored in memory 110, error check code are sent to server 200 and request to above-mentioned data synchronization.
In addition, after control part 120 comprises the syn ack result of each data identification information, error check code from server 200 receptions, select the data of synchronization failure from the tables of data of memory 110 storages according to the error check code that receives, to be used to ask synchronous selected data synchronization request msg to be sent to server 200, request synchronously.
For this reason, control part 120 comprises: collection of letters handling part 121, management department 122, portion 123, selection portion 124 are set, transmit handling part 125.
Collection of letters handling part 121 receives the syn ack result who transmits from server 200 by RF portion 130, and extracts the error check code of expression success synchronously or failure.
The error check code that management department 122 extracts according to collection of letters handling part 121 updates stored in the tables of data of memory 110 and manages.
That is, management department 122 upgrades or updates stored in the 0X03 that represents synchronization failure each data of tables of data according to the syn ack result who receives from server 200 with the 0X02 that represents normal synchronized.
Portion 123 is set the error check code that expression is stored in the state of each data that is comprised in the tables of data of memory 110 is set.
For example, when the arbitrary data that is stored in tables of data is not selected as synchronization object, the 0X00 that portion's 123 error check codes are set to represent the data initialization state is set.
In addition, to being stored in the data that need to add or be updated to server 200 in the tables of data data, portion's 123 its error check codes being set being set to represent the 0X01 that adds or upgrade.
The error check code that is comprised in the tables of data of selection portion 124 according to memory 110 storages selects needs to be included in to asking to be sent to synchronously the data of the synchronization request data of server 200 from tables of data.
That is, selection portion 124 is in being stored in the data of tables of data, and the data that error check code is set to represent to add or more the data of the 0X01 of new data or error check code are set to represent the 0X03 of synchronization failure are chosen as and need data in synchronization.
Selection portion 124 will need synchronous all data to be chosen as the data of needs transmission originally synchronously the time in the tables of data.That is, error check code be set to represent to add or more the data of the 0X01 of new data be chosen as the data that tendency to develop is sent.
But if synchronization failure takes place, with reference to error check code, a data with synchronization failure is chosen as need be to the data of server 200 transmission.That is, error check code is set to represent that the data of the 0X03 of synchronization failure are chosen as the data that needs transmit.
Transmit synchronous synchronization request data of request of data that handling part 125 will be used for all data that selection portion 124 is selected from the tables of data that is stored in memory 110 or synchronization failure and send server 200 and request to synchronously.
If by the frequency signal of antenna reception by the wireless channel transmission of frequency range, RF130 is with attenuation transform and grouped data kind with it, and outputs to control part 120 or output to speech processes portion 130.
The data that RF portion 130 outputs to control part 120 have, syn ack result, lteral data or the paging signal that receives by paging signal.The data that output to speech processes portion 140 have the speech data that receives when audio call is set.
In addition, RF portion 130 is with to strengthen conversion and convert wireless signal and output to by antenna in order to send from control part 120 comprising at least of the receiving more than one identifying information that needs data in synchronization, each data, the synchronization request data of error check code of state of representing each data or the speech data of the documentation that receives from speech processes portion 140.
Speech processes portion 140 is usually by vocoder formations such as (VOCODER), according to the control startup of control part 120.Speech processes portion 140 modulates by the signal of telecommunication of microphone 160 inputs and is transformed into speech data, outputs to RF portion 130.In addition, speech processes portion 140 will be demodulated to the signal of telecommunication and output to loud speaker 150 from the speech data of the coding of RF portion 130 input, and loud speaker 150 is transformed into audible sound and output with it.
Key input part 170 is matrix shape normally.The function key that key input part 170 is carried out various functions by a plurality of numerical keys and being used to constitutes, and according to user's input the signal of telecommunication of key data is outputed to control part 120.
The variation of the state that display part 180 display terminals are current or the operation conditions of program also shows the short message of reception etc.Above-mentioned display unit is made of the display unit as liquid crystal indicator (LCD).
Fig. 2 is the flow chart that the mobile communication terminal of one embodiment of the invention is carried out data sync.
As shown in Figure 2, portion 123 receives the user by key input part 170 synchronous fill order (step S1) is set.Receiving synchronously, the exectorial portion 123 that is provided with judges whether to receive the select command (step S2) that needs data in synchronization by key input part 170.When needing the select command of data in synchronization, be provided with that needs in portion 123 is stored in memory 110 according to the select command of user's input the tables of data data add or the error check code that is updated to the data of server 200 is set to represent to add or the 0X01 of new data (step S3) more by key input part 170 input.
In addition, the 0X00 (step S4) that the error check code that is not selected as the data of synchronization object in portion's 123 tables of data is set to represent the data initialization state is set.
The data (step S5) that selection portion 124 retrieval error from the data that are stored in tables of data confirms that code is set to represent to add or more the data of the 0X01 of new data or error check code are set to represent the 0X03 of synchronization failure.
When result for retrieval was arranged to the data of 0X01 or is arranged to the data of 0X03 for existing, these data are chosen as needed data in synchronization (step S6).
Transmit handling part 125 will comprise selection portion 124 from the tables of data of memory 110 storages, be chosen as the LUID that needs data in synchronization, above-mentioned data and, the synchronization request data of delivery time, error check code are sent to server 200 and request (step S7) synchronously.
Transmitted to server 200 under the state of synchronization request data at transmission handling part 125, collection of letters handling part 121 judges whether to receive the syn ack result (step S8) who transmits from server 200 by RF portion 130.
When judged result is to receive the syn ack that transmits from server 200 as a result the time, collection of letters handling part 121 extracts the synchronous success of expression that is included in the syn ack result or the error check code (step S9) of synchronization failure.
The error check code that management department 122 extracts according to collection of letters handling part 121 is used and is represented the 0X02 of normal synchronized or represent that the 0X03 of synchronization failure updates stored in the data of the tables of data of memory 110 (step S10).
The synchronous fill order (step S11) that portion 123 judges whether to receive by key input part 170 user is set.When judged result when receiving synchronous fill order, the portion of setting carries out the S1 step.
Receive the synchronously exectorial portion 123 that is provided with by the S1 step and carry out the S2 step, judge whether to receive the select command that needs data in synchronization by key input part 170.
When the judged result that portion 123 is set for do not receive by key input part 170 need the select command of data in synchronization the time, selection portion is carried out the S5 step, and retrieval error is confirmed that code is set to show and added or data that more data of the 0X01 of new data or error check code are set to represent the 0X03 of synchronization failure in the data of data table stores.
Wherein, under the state of the select command that does not need synchronous new data,, the data that error check code is set to 0X01 can be do not retrieved, only 0X00,0X02,0X03 can be retrieved if retrieve by key input part 170 inputs.
Transmit handling part 125 and carry out the S5 steps, comprise the synchronization request data that are chosen as LUID, delivery time, the error check code of data that the error check code that needs data in synchronization is set to 0X03, these data from the tables of data of memory 110 storages by selection portion 124 and be sent to server 200 and request synchronously.
Therefore, when starting for the second time synchronously, only to for the first time synchronously in the data of synchronization failure carry out synchronously.
Fig. 3 is the structured flowchart of the server of one embodiment of the invention.
As shown in Figure 3, the server of one embodiment of the invention comprises: storage comprises the memory 210 of the tables of data of error check code; Receiving to comprise from mobile communication terminal 100 needs the synchronization request of data in synchronization data and with the control part 220 of this data sync to the tables of data that is stored in memory 210.
Memory 210 storage comprise at least more than one data, each data identifying information, represent the tables of data of error check code of the state of each data.
The tables of data of memory 210 storages is included as the data that comprise synchronously from the synchronization request data that mobile communication terminal 100 receives.
The identifying information that is stored in each data of tables of data comprises: the LUID that server 200 is given these data corresponding to mobile communication terminal mates data identifier GUID to these data, from delivery time that mobile communication terminal 100 transmits these data.GUID is the data identifier that 200 pairs of servers need the data in synchronization coupling.
Control part 220 receives from mobile communication terminal and comprises error check data, request to the synchronization request data of at least more than one data synchronization and carry out each data synchronization, be set to represent synchronous success or synchronization failure according to each data synchronization execution result error check code, and send mobile communication terminal to as the syn ack result.
That is, each LUID that needs data in synchronization that the synchronization request data that control part 220 corresponding mobile communication terminals 100 transmit comprise mates GUID again, these data is added to the tables of data of memory 210.
At this moment, if these data are successfully added the tables of data of memory 210 to, control part 220 with error check code 0X02 as comprising that the syn ack result corresponding to the LUID of the mobile communication terminal 100 of the GUID of server 200 management sends mobile communication terminal 100 to.
But, if fail during the tables of data that the data that transmit from mobile communication terminal 100 are added memory 210 to, error check code 0X03 is sent to mobile communication terminal 100 as the syn ack result of the LUID of the mobile communication terminal 100 that comprises the GUID that manages corresponding to server 200.
For this reason, control part 220 comprises: collection of letters handling part 221, matching part 222, management department 223, portion 224 is set, transmits handling part 225.
Collection of letters handling part 221 receives the identifying information that needs data in synchronization, each data that comprises at least more than one, the synchronization request data of representing the error check code of each data mode from mobile communication terminal 100.
Matching part 222 couplings are corresponding to the GUID of the LUID of each data that comprises in the synchronization request data that receive.
Management department 223 carries out respectively each data synchronization by the GUID of matching part 222 couplings to the data that transmit from mobile communication terminal 100, and stores the tables of data of memory 210 into.
Portion 224 is stored in memory 210 according to each data synchronization execution result setting the error check code that tables of data comprised is set.
That is,, portion 224 is set the error check code of these data is arranged to 0X02, if failure is arranged to 0X03 with the error check code of these data if add to storage 210 tables of data from the data success sky that mobile communication terminal 100 transmits.
Transmission handling part 225 will comprise from the identifying information of each data of mobile communication terminal 100 receptions with each identifying information corresponding error confirms that the syn ack result of code sends mobile communication terminal to.
Fig. 4 is the action flow chart that the server of one embodiment of the invention is carried out data sync.
As shown in Figure 4, collection of letters handling part 221 receives identifying information-LUID that needs data in synchronization, each data and the delivery time information that comprises at least more than one, the synchronization request data (step S21) of representing the error check code of each data mode from mobile communication terminal 100.
The corresponding GUID of LUID (step S22) of each data that comprises in the synchronization request data of matching part 222 couplings and reception.
Management department 223 carries out each data synchronization for the GUID of the data that mobile communication terminal 100 transmits respectively by matching part 222 coupling and is stored in the tables of data (step S23) of memory 210.
If the tables of data that the data that mobile communication terminal 100 transmits are successfully added memory 210 to, the error check code that portion's 224 these data are set is set to 0X02, if failure, the error check code of these data is set to 0X03 (step S24).
Transmission handling part 225 will comprise from the identifying information of each data of mobile communication terminal 100 receptions with each identifying information corresponding error confirms that the syn ack result of code 0X02 or 0X03 is sent to mobile communication terminal 100 (step S25).
After the syn ack result was sent to mobile communication terminal 100, collection of letters handling part 221 judged whether to receive synchronization request data (step S26) from mobile communication terminal 100.
If the judged result of collection of letters handling part 221 is for receiving the synchronization request data, matching part 222 judges whether the data in these synchronization request data have mated GUID (step S27).
If the judged result of matching part 222 has the GUID that has mated for these data, management department's 223 misjudgments confirm whether code is 0X03 (step S28).
If whether judged result is 0X03 for the error check code of these data, management department 223 carries out this data synchronization and is stored in the tables of data (step S29) of memory 210.
If the tables of data that the data that mobile communication terminal 100 transmits are successfully added memory 210 to, the error check code that portion's 224 these data are set is set to 0X02, if failure, the error check code of these data is set to 0X03 (step S30).
Transmit handling part 225 will comprise each data that receives from mobile communication terminal 100 identifying information and with confirm that by each identifying information corresponding error that portion 224 is provided with is set the syn ack result of code 0X02 or 0X03 is sent to mobile communication terminal 100 (step S31) in the S30 step.
Fig. 5 to Fig. 8 is the schematic diagram of the method for data synchronization of one embodiment of the invention.
As shown in Figure 5, initial, mobile communication terminal 100 selects Zhang San, Li Si, king five as data in synchronization and synchronous to server 200 requests from tables of data 101.Therefore, Zhang San, Li Si, king's five error check code respectively is set to 0X01.
Server 200 receives from mobile communication terminal 100 needs data in synchronization, and Zhang San, Li Si, king five receive separately LUID and delivery time simultaneously.
Server 200 is carried out synchronously tables of data 202 by 201 pairs of each LUID couplings of matching list GUID, is stored in tables of data 202.
At this moment, tentation data Zhang San, king five success synchronously, Li Si's synchronization failure.
200 couples of data Zhang San of server, king five success synchronously, therefore the synchronously successful error check code 0X02 of expression is set and stores tables of data 202 into, as for data Li Si's synchronization failure, therefore the error check code 0X03 of expression synchronization failure is set and stores tables of data 202 into.
As shown in Figure 6, the error check code 0X02 that server is synchronous successful with the expressions that are provided with owing to Zhang San, king five success synchronously in the tables of data 204 and, the LUID of these data in the matched data table 203 is sent to mobile communication terminal 100, for data Li Si, the error check code 0X03 of the expression synchronization failure that will be provided with owing to synchronization failure and corresponding LUID are sent to mobile communication terminal.
Therefore, mobile communication terminal 100 is provided with expression successful error check code 0X02 synchronously to data Zhang San, king five in tables of data 102, data Li Si is provided with the error check code 0X03 of expression synchronization failure.
As shown in Figure 7, failing during owing to mobile communication terminal synchrodata Li Si, when the synchronous startup of next time, is the Li Si of 0X03 to error check code in the tables of data 103 only, to server 200 requests synchronously.
Owing to mated data Li Si's the corresponding GUID of LUID in the matched data table 205, server 200 is carried out the synchronous of data Li Si and is stored in tables of data 206.
At this moment, when data Li Si synchronous successful, server 200 is provided with the synchronously successful error check code 0X02 of expression and is stored in tables of data 206.
As shown in Figure 8, the LUID of server 200 error check code 0X02 that the expression of data Li Si in the tables of data 208 is synchronously successful and these data of finding by matching list 207 sends mobile communication terminal 100 to.
Therefore, data Li Si is provided with expression successful error check code 0X02 synchronously in 100 pairs of tables of data 104 of mobile communication terminal.
Below for example understand preferred embodiment of the present invention, but scope of the present invention is not limited to above-mentioned specific embodiment, the present invention can revise change or improvement in a variety of forms in the scope of thought of the present invention and claim record.
For example, mobile communication terminal is to server transmissioning data and carry out in the synchronous process, if power supply exhausts, judge the error check code of each data in the tables of data, error check code is arranged to represent the data of synchronously successful 0X02 do not carry out synchronously, a data that error check code is set to the 0X03 of synchronization failure is carried out synchronously.