CN101753626B - Method, device and client end for constructing data packet - Google Patents

Method, device and client end for constructing data packet Download PDF

Info

Publication number
CN101753626B
CN101753626B CN 200910265739 CN200910265739A CN101753626B CN 101753626 B CN101753626 B CN 101753626B CN 200910265739 CN200910265739 CN 200910265739 CN 200910265739 A CN200910265739 A CN 200910265739A CN 101753626 B CN101753626 B CN 101753626B
Authority
CN
China
Prior art keywords
encoded
order
space encoder
client
needs
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.)
Expired - Fee Related
Application number
CN 200910265739
Other languages
Chinese (zh)
Other versions
CN101753626A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN 200910265739 priority Critical patent/CN101753626B/en
Priority to PCT/CN2010/072292 priority patent/WO2010148774A1/en
Publication of CN101753626A publication Critical patent/CN101753626A/en
Application granted granted Critical
Publication of CN101753626B publication Critical patent/CN101753626B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/22Parsing or analysis of headers

Abstract

The invention provides a method, a device and a client end for constructing a data packet, belonging to the field of mobile communication. The method for constructing the data packet comprises the following steps: the client end acquires residual coding space of a buffer zone; the client end calculates the coding space required by an order to be coded; if the residual coding space is not less than the coding space required by the order to be coded, the client end codes the order to be coded; if the residual coding space is less than the coding space required by the order to be coded, the client end establishes a SyncML data packet according to the coded order in the buffer zone. The embodiments of the invention can increase the efficiency of data synchronization. The technical scheme can be widely applied to the client end which supports SyncML protocol.

Description

Make up method, device and the client of packet
Technical field
The present invention relates to moving communicating field, particularly a kind of method, device and client that makes up packet.
Background technology
The management of mobile phone personal information, calendar information and e-mail messages etc. becomes more and more important, and has become an important component part of cellphone information management.Synchronization makeup language (Synchronization MarkupLanguage is hereinafter to be referred as SyncML) agreement can realize the data sync between mobile phone terminal and the webserver, PC, the mobile phone terminal.The user can backup to the data on the mobile phone terminal in the webserver and the computer through the client on the mobile phone terminal, when changing mobile phone or data in mobile phone and changing, can easily Backup Data be returned to mobile phone terminal
At present in the SyncML agreement; Usually being divided into six bags carries out alternately; Wherein first bag and second bag are the initialization bags; Be used for the client and server end and carry out initialization synchronizing information exchange, the 3rd bag and the 4th bag are that client and server is intercoursed synchrodata, and latter two bag is that synchronizing information is confirmed and same EOS.Before client is sent the 3rd bag and is carried out synchrodata exchange; Need obtain the relevant information of order to be encoded earlier; Wherein, Order to be encoded comprises treats data in synchronization and information such as local unified sign, the unified sign of reciever, afterwards order to be encoded is encapsulated as forms such as electronic business card (vCard) or vCalendar.Because the resource-constraineds such as internal memory at terminal, the buffer size when making up packet has restriction, adopts the method for restriction business card data information number to make up packet, and promptly each packet to be sent only comprises the business card data information of given number.
Shown in Figure 1 is the method flow sketch map of static construction SyncML packet in the prior art; Include a coded command in the business card data information; A packet that makes up only comprises the business card data information of fixed number, generally is that a packet comprises 10 business card data information.
The inventor is in realizing process of the present invention; Find that there is following defective in prior art: the one, because packet only comprises the business card data information of fixed number; If business card data information is excessive, a packet does not just make up the business card data information of fixed number so; The 2nd, if business card data information is all very little, the business card data information that makes up fixed number has so just increased the number of times that makes up the transmission packet, and being divided into repeatedly of once can having sent originally sent, and reduced data synchronization efficiency; The 3rd, the size of every kind of data format is also inconsistent, if packet only comprises the business card data information of fixed number, to various data formats a unified delivery plan just can not be arranged, and makes that the versatility of data sync is bad.
Summary of the invention
The technical problem that the present invention will solve provides a kind of method, device and client that makes up packet, can improve the efficient that client is carried out data sync.
For solving the problems of the technologies described above, embodiments of the invention provide technical scheme following:
On the one hand, the embodiment of the invention provides a kind of method that makes up packet, comprising:
Client is obtained the residue space encoder of buffering area;
Said client is calculated the space encoder that order to be encoded needs;
If said residue space encoder is not less than the space encoder that said order to be encoded needs, said client is encoded to said order to be encoded; If the space encoder that said residue space encoder needs less than said order to be encoded, said client makes up the SyncML packet according to the coded command in the said buffering area.
Wherein, also comprise after the step that said client is encoded to said order to be encoded:
The order of said client behind said buffer stores coding, and upgrade the residue space encoder of said buffering area.
Wherein, said client also comprises before obtaining the step of residue space encoder of buffering area:
Said client is obtained the relevant information of said order to be encoded, and said relevant information comprises the unified sign in this locality of data to be transmitted, the unified sign of reciever, and obtains corresponding said data to be transmitted according to said local unified sign.
Wherein, the said client step of calculating the space encoder that order to be encoded needs comprises:
Said client is calculated the space encoder that order to be encoded needs through following computing formula: space encoder=said data to be transmitted length that the said order to be encoded needs+said local unified sign length+unified sign of said reciever length+preset coding keeps surplus.
The embodiment of the invention also provides a kind of device that makes up packet, comprising:
Acquisition module is used to obtain the residue space encoder of buffering area;
Computing module is used to calculate the space encoder of order needs to be encoded;
Processing module is used for if said residue space encoder is not less than the space encoder of said order needs to be encoded said order to be encoded being encoded; If said residue space encoder makes up the SyncML packet less than the space encoder that said order to be encoded needs according to the coded command in the said buffering area.
Wherein, said processing module comprises:
The coding submodule is used for if said residue space encoder is not less than the space encoder of said order needs to be encoded said order to be encoded being encoded;
Make up submodule, be used for if said residue space encoder less than the space encoder of said order needs to be encoded, makes up the SyncML packet according to the coded command in the said buffering area.
Wherein, said device also comprises:
The storage update module is used for after said coding submodule is encoded to said order to be encoded, and the order behind said buffer stores coding is also upgraded the residue space encoder of said buffering area.
Wherein, said device also comprises:
Obtain information module, be used to obtain the relevant information of said order to be encoded, said relevant information comprises the unified sign in this locality of data to be transmitted, the unified sign of reciever, and obtains corresponding said data to be transmitted according to said local unified sign.
Wherein, said computing module comprises:
The addition submodule; Be used for the relevant information of obtaining the said order to be encoded that information module obtains according to said, calculate the space encoder that order to be encoded needs through following computing formula: space encoder=said data to be transmitted length that the said order to be encoded needs+said local unified sign length+unified sign of said reciever length+preset coding keeps surplus.
The embodiment of the invention also provides a kind of client, comprises the device of above-mentioned structure packet, and the device of said structure packet is used to make up the SyncML packet that said client is sent.
Embodiments of the invention have following beneficial effect:
In the such scheme; Client is at first obtained the residue space encoder of buffering area, and calculates the space encoder that order to be encoded needs, and comes the dynamic construction synchronization packets according to the space encoder that remains space encoder and order needs to be encoded; The embodiment of the invention can dynamically be adjusted the order number that is structured in the SyncML packet; Can effectively utilize SyncML packet space, reduce the interaction times between client and the server as far as possible, improve data synchronization efficiency.The embodiment of the invention can also be unified delivery plan to different data types, improves the versatility of SyncML data sync.
Description of drawings
Fig. 1 is the method flow sketch map of static construction SyncML packet in the prior art;
Fig. 2 makes up the schematic flow sheet of the method for packet for embodiments of the invention;
Fig. 3 makes up the internal structure sketch map of the device of packet for embodiments of the invention;
Fig. 4 makes up another schematic flow sheet of the method for packet for embodiments of the invention.
Embodiment
For technical problem, technical scheme and advantage that embodiments of the invention will be solved is clearer, will combine accompanying drawing and specific embodiment to be described in detail below.
Embodiments of the invention can only comprise the problem of the business card data information of fixed number to SyncML packet in the prior art, and a kind of method, device and client that makes up packet is provided, and can improve the efficient that client is carried out data sync.
The embodiment of the invention provides a kind of method that makes up packet, and as shown in Figure 2, present embodiment comprises:
Step 201: client is obtained the residue space encoder of buffering area;
Step 202: client is calculated the space encoder that order to be encoded needs;
Step 203: if the residue space encoder is not less than the space encoder that order to be encoded needs, client is treated coded command and is encoded; If the space encoder that the residue space encoder needs less than order to be encoded, client makes up the SyncML packet according to the coded command in the buffering area.
The method of the structure packet of present embodiment; Client is at first obtained the residue space encoder of buffering area; And calculate the space encoder that order to be encoded needs, and come the dynamic construction synchronization packets according to the space encoder that remains space encoder and order needs to be encoded, can effectively utilize SyncML packet space; Reduce the interaction times between client and the server as far as possible, improve data synchronization efficiency.
The embodiment of the invention also provides a kind of device that makes up packet, and as shown in Figure 3, present embodiment comprises:
Acquisition module 30 is used to obtain the residue space encoder of buffering area;
Computing module 31 is used to calculate the space encoder of order needs to be encoded;
Processing module 32 is used for treating coded command and encoding if the residue space encoder is not less than the space encoder of order needs to be encoded; If the space encoder that the residue space encoder needs less than order to be encoded makes up the SyncML packet according to the coded command in the buffering area.
Wherein, processing module 32 comprises:
Coding submodule 33 is used for treating coded command and encoding if the residue space encoder is not less than the space encoder of order needs to be encoded;
Make up submodule 34, be used for if the residue space encoder less than the space encoder of order needs to be encoded, makes up the SyncML packet according to the coded command in the buffering area.
Wherein, this device also comprises:
Storage update module 35 is used for treating after coded command encodes at coding submodule 33, and the order behind the buffer stores coding is also upgraded the residue space encoder of buffering area.
When obtaining the residue space encoder of buffering area next time, acquisition module 30 can utilize the residue space encoder of the buffering area of storage update module 35 renewals.
Further, this device also comprises:
Obtain information module 37; Be used for before acquisition module 30 obtains the residue space encoder of buffering area; Obtain the relevant information of order to be encoded, comprise the unified sign in this locality, the unified sign of reciever of data to be transmitted, and obtain corresponding data to be transmitted according to the unified sign in this locality.
Wherein, computing module 31 comprises:
Addition submodule 36; Be used for calculating the space encoder that order to be encoded needs through following computing formula: space encoder=data to be transmitted length that the order to be encoded needs+this locality unified sign length+unified sign of reciever length+preset coding reservation surplus according to the relevant information of obtaining the order to be encoded that information module 37 obtains.
The device of the structure packet of present embodiment; Space encoder according to residue space encoder and order needs to be encoded comes the dynamic construction synchronization packets; Thereby dynamically adjustment is structured in the order number in the SyncML packet; Can effectively utilize SyncML packet space, reduce the interaction times between client and the server as far as possible, improve data synchronization efficiency.The embodiment of the invention can also be unified delivery plan to different data types, improves the versatility of SyncML data sync.
The embodiment of the invention also provides a kind of client; The device that comprises structure packet shown in Figure 3; After this device that makes up packet made up the SyncML packet, client just can be sent to server or mobile phone terminal carries out data sync with the SyncML packet.
Further introduce in the face of the method for structure packet provided by the invention down, as shown in Figure 4, present embodiment comprises:
Step 401: the relevant information of obtaining order to be encoded;
When client is prepared to carry out data sync, at first obtain the relevant information of order to be encoded.The relevant information of order to be encoded comprises the unified sign of reciever of unified sign in this locality of data to be transmitted (being synchrodata), data to be transmitted and data to be transmitted etc.Client is at first obtained the unified sign in this locality of data to be transmitted, and obtains corresponding data to be transmitted according to the unified sign in this locality;
Step 402: the residue space encoder that obtains buffering area;
The space size of buffering area is deducted coded command occupation space, just obtain the residue space encoder of buffering area;
Step 403: calculate the space encoder that order to be encoded needs;
When calculating the needed space encoder of order to be encoded; Because in the SyncML agreement, a synch command has a lot of information sources, and the number of information source also is uncertain; But have only local unified sign (being called for short Source), the unified sign of reciever (being called for short Target) and the needed space encoder of synchrodata (being called for short Data) to change greatly in the synch command; Whether sufficient therefore the space encoder demand relative fixed of other information, and needed space encoder is also little only need consider this three factors when in the calculation code space; So both simplify the calculating of space encoder, and can effectively utilize the space of SyncML packet again.The formula that calculates the space encoder that order to be encoded needs is: space encoder=data to be transmitted length that the order to be encoded needs+this locality unified sign length+unified sign of reciever length+preset coding reservation surplus;
Step 404: judge the space encoder whether above-mentioned residue space encoder needs less than order to be encoded, if turn to step 407, otherwise turn to step 405;
Step 405: this order to be encoded is encoded;
Step 406: the order behind the buffer stores coding, and the residue space encoder of renewal buffering area turn to step 401;
Client turns to step 401 after to current command code to be encoded, order to be encoded is handled to next bar.When order to be encoded is handled to next bar, can utilize in the step 406 the residue space encoder of the buffering area that upgrades to obtain the residue space encoder of buffering area;
Step 407: stop this order to be encoded is encoded, make up the SyncML packet.
Client makes up the SyncML packet according to the coded command in the buffering area, and the SyncML packet that builds is sent to server carries out data sync.
The method of the structure packet of present embodiment; Client is at first obtained the residue space encoder of buffering area, and calculates the space encoder that order to be encoded needs, and comes the dynamic construction synchronization packets according to the space encoder that remains space encoder and order needs to be encoded; Present embodiment can dynamically be adjusted the order number that is structured in the SyncML packet; Can effectively utilize SyncML packet space, reduce the number of times that client makes up and sends packet as far as possible, improve data synchronization efficiency.Present embodiment can also be unified delivery plan to different data types, improves the versatility of SyncML data sync.
Said method embodiment is corresponding with said device embodiment; The description of relevant portion gets final product among the part comparable device embodiment that in method embodiment, does not describe in detail, and the description of relevant portion gets final product among the part reference method embodiment that in device embodiment, does not describe in detail.
One of ordinary skill in the art will appreciate that; Realize that all or part of step in the foregoing description method is to instruct relevant hardware to accomplish through program; Described program can be stored in the computer read/write memory medium, and this program comprises the step like above-mentioned method embodiment when carrying out; Described storage medium; As: magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
In each method embodiment of the present invention; The sequence number of said each step can not be used to limit the sequencing of each step; For those of ordinary skills, under the prerequisite of not paying creative work, the priority of each step is changed also within protection scope of the present invention.
The above is a preferred implementation of the present invention; Should be pointed out that for those skilled in the art, under the prerequisite that does not break away from principle according to the invention; Can also make some improvement and retouching, these improvement and retouching also should be regarded as protection scope of the present invention.

Claims (10)

1. a method that makes up packet is characterized in that, comprising:
Client is obtained the residue space encoder of buffering area;
Said client is calculated the space encoder that order to be encoded needs;
If said residue space encoder is not less than the space encoder that said order to be encoded needs, said client is encoded to said order to be encoded; If the space encoder that said residue space encoder needs less than said order to be encoded, said client makes up the SyncML packet according to the coded command in the said buffering area.
2. the method for structure packet according to claim 1 is characterized in that, said client also comprises after said order to be encoded is encoded:
The order of said client behind said buffer stores coding, and upgrade the residue space encoder of said buffering area.
3. the method for structure packet according to claim 1 is characterized in that, the residue space encoder that said client is obtained buffering area also comprises before:
Said client is obtained the relevant information of said order to be encoded, and said relevant information comprises the unified sign in this locality of data to be transmitted, the unified sign of reciever, and obtains corresponding said data to be transmitted according to said local unified sign.
4. the method for structure packet according to claim 3 is characterized in that, the space encoder that said client is calculated order to be encoded to be needed comprises:
Said client is calculated the space encoder that order to be encoded needs through following computing formula: space encoder=said data to be transmitted length that the said order to be encoded needs+said local unified sign length+unified sign of said reciever length+preset coding keeps surplus.
5. a device that makes up packet is characterized in that, comprising:
Acquisition module is used to obtain the residue space encoder of buffering area;
Computing module is used to calculate the space encoder of order needs to be encoded;
Processing module is used for if said residue space encoder is not less than the space encoder of said order needs to be encoded said order to be encoded being encoded; If said residue space encoder makes up the SyncML packet less than the space encoder that said order to be encoded needs according to the coded command in the said buffering area.
6. the device of structure packet according to claim 5 is characterized in that, said processing module comprises:
The coding submodule is used for if said residue space encoder is not less than the space encoder of said order needs to be encoded said order to be encoded being encoded;
Make up submodule, be used for if said residue space encoder less than the space encoder of said order needs to be encoded, makes up the SyncML packet according to the coded command in the said buffering area.
7. the device of structure packet according to claim 6 is characterized in that, said device also comprises:
The storage update module is used for after said coding submodule is encoded to said order to be encoded, and the order behind said buffer stores coding is also upgraded the residue space encoder of said buffering area.
8. the device of structure packet according to claim 5 is characterized in that, said device also comprises:
Obtain information module, be used to obtain the relevant information of said order to be encoded, said relevant information comprises the unified sign in this locality of data to be transmitted, the unified sign of reciever, and obtains corresponding said data to be transmitted according to said local unified sign.
9. the device of structure packet according to claim 8 is characterized in that, said computing module comprises:
The addition submodule; Be used for the relevant information of obtaining the said order to be encoded that information module obtains according to said, calculate the space encoder that order to be encoded needs through following computing formula: space encoder=said data to be transmitted length that the said order to be encoded needs+said local unified sign length+unified sign of said reciever length+preset coding keeps surplus.
10. a client is characterized in that, comprises the device like the described structure packet of claim 5-9, and the device of said structure packet is used to make up the SyncML packet that said client is sent.
CN 200910265739 2009-12-29 2009-12-29 Method, device and client end for constructing data packet Expired - Fee Related CN101753626B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN 200910265739 CN101753626B (en) 2009-12-29 2009-12-29 Method, device and client end for constructing data packet
PCT/CN2010/072292 WO2010148774A1 (en) 2009-12-29 2010-04-28 Method, device and client for constructing data packets

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200910265739 CN101753626B (en) 2009-12-29 2009-12-29 Method, device and client end for constructing data packet

Publications (2)

Publication Number Publication Date
CN101753626A CN101753626A (en) 2010-06-23
CN101753626B true CN101753626B (en) 2012-12-19

Family

ID=42480015

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200910265739 Expired - Fee Related CN101753626B (en) 2009-12-29 2009-12-29 Method, device and client end for constructing data packet

Country Status (2)

Country Link
CN (1) CN101753626B (en)
WO (1) WO2010148774A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2557752B1 (en) 2011-08-11 2017-09-27 Siemens Aktiengesellschaft Method and device for producing an end-to-end communication between two networks
CN114244488B (en) * 2021-10-27 2024-02-20 三维通信股份有限公司 Method and system for selecting data synchronous coding domain of server cluster

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1550112A (en) * 2001-08-30 2004-11-24 ��˹��ŵ�� Message transfer from a source device via a mobile terminal device to a third device and data synchronization between terminal devices
CN101582927A (en) * 2009-06-10 2009-11-18 中兴通讯股份有限公司 Server, movable terminal and method used for information backup and restoration

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009694A (en) * 2006-01-25 2007-08-01 宇龙计算机通信科技(深圳)有限公司 Cooperation system among the handset, computer and synchronization server and its method
EP1883257A1 (en) * 2006-07-28 2008-01-30 Gemplus Method for synchronisation between a mobile equipment and a smart card
US7774464B2 (en) * 2006-12-28 2010-08-10 Nokia Corporation Automatic syncML client profile creation for new servers

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1550112A (en) * 2001-08-30 2004-11-24 ��˹��ŵ�� Message transfer from a source device via a mobile terminal device to a third device and data synchronization between terminal devices
CN101582927A (en) * 2009-06-10 2009-11-18 中兴通讯股份有限公司 Server, movable terminal and method used for information backup and restoration

Also Published As

Publication number Publication date
CN101753626A (en) 2010-06-23
WO2010148774A1 (en) 2010-12-29

Similar Documents

Publication Publication Date Title
CN105308672A (en) Electronic device and method for video decoding
CN100472445C (en) Configuring load application method and system of communication apparatus
CN101582092B (en) Method and device for realizing the store of date in memory
MY127816A (en) Method for facilitating electronic communications
SE0004672D0 (en) A method and system for real-time updating of available network service access in a communications network
CN104980190A (en) Data transmission system and transmission method of Bluetooth interface
CN102609479B (en) A kind of memory database node clone method
CN101741569B (en) Data synchronization method, data synchronization system, client and server
TWI349208B (en) Method and system and computer program product for data logging that utilized a schedule of data transfer periods
CN101340425A (en) Method and apparatus for data synchronization between terminals
CN101753626B (en) Method, device and client end for constructing data packet
CN102299947A (en) Touch digital newspaper-reading high-definition interactive advertising system and data updating method thereof
CN102073521B (en) Software updating system of plug-in card type machine and software updating method
CN105578585A (en) Method and apparatus for determining link delay, and communication device
CN103297183A (en) Data communication method and device
CN111026755B (en) Transaction sequence number acquisition method and device based on full sequence number generator
CN101179798B (en) Operation method and device for transmitting data between mobile phones
CN106598548A (en) Solution method and device for read-write conflict of storage unit
CN103327133A (en) Method and device for updating geographic position information
CN102937862B (en) System and method for managing mobile terminal by browser
CN102238012A (en) Charging method and system
CN101702732A (en) Document synchronous method and document synchronous system
CN100525208C (en) Data synchronization method
CN105607037A (en) Intelligent positioning system and information coding method
CN102567285A (en) Document loading method and device

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20121219

Termination date: 20201229