CN1933479A - Method for transmitting data in communication system and system thereof - Google Patents

Method for transmitting data in communication system and system thereof Download PDF

Info

Publication number
CN1933479A
CN1933479A CN 200510037395 CN200510037395A CN1933479A CN 1933479 A CN1933479 A CN 1933479A CN 200510037395 CN200510037395 CN 200510037395 CN 200510037395 A CN200510037395 A CN 200510037395A CN 1933479 A CN1933479 A CN 1933479A
Authority
CN
China
Prior art keywords
data
length
type
value
read
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN 200510037395
Other languages
Chinese (zh)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN 200510037395 priority Critical patent/CN1933479A/en
Publication of CN1933479A publication Critical patent/CN1933479A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Communication Control (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

A method for transmitting data in communication system includes judging whether data is on fixed length or not according to type of data when data is transmitted and received, applying type plus value mode to carry out coding if it is on fixed length or otherwise applying type plus length plus value mode to carry out coding.

Description

The method and the system thereof of transmission data in the communication system
Technical field
The present invention relates to the communication technology, particularly the coding techniques in the communication system.
Background technology
In wireless telecommunication system, participate in the both sides of communication or need transmit and receive data according to an operating process of appointing in advance in many ways; Need understand the data that receive according to a mode of appointing in advance simultaneously.We are referred to as agreement to these operating processes reserved in advance in advance and data deciphering mode.The agreement specified in more detail execution sequence of each step in the operating process, also stipulated simultaneously the implication of each bit of the data that pass, each byte.Therefore have only and just can carry out the active data transmission between the entity that adopts same protocol.
TLV is a kind of digital coding mode commonly used in agreement, and it is the acronym of three English words: Type (types of data), Length (length of data), Value (values of data) in fact.
Type is in order to allow the implication of machine or these data of procedure identification, knows the function of this data difference and other data or effect and the numbering of carrying out, and that is to say that what Type represented is the implication of data.
What Length represented is the length of these data.Because each data all is to be made of a series of binary digits, the length of data is the number of the shared binary digit of these data just in fact.When transmission and deal with data all is to carry out with the integral multiple byte of 8 binary numbers, so the unit definition of length is a byte.
What Value represented is the value of data, just the content of data.
As seen, TLV coding is exactly a kind of coded system of coming the information that data of description itself will transmit by tlv triple (Type, Length, Value) in fact.The define method of TLV coding uses the mode of form usually, and is as shown in table 1.
Type (Type) Length (Length) Value (Value) Implication
101 102 103 104 105 Uncertain 1111 " Wei Er-Smith " " man " " 180 " " 30 " " 75 " Name (character string) sex height (cm) age (year) body weight (kg)
Type is that the implication of these data of data representation of 101 is the names with string representation, and length is uncertain, is worth to be " Wei Er-Smith "; Type is that the implication of these data of data representation of 102 is sexes, and length is 1, is worth to be " man "; Type is that the implication of these data of data representation of 103 is to be the height of unit with cm, and length is 1, is worth to be " 180 " ... the rest may be inferred, can be informed in defined all TLV codings in the form.
At present, if communicating pair is to encode by TLV to transmit data, so, the transmit leg of data and recipient must preserve a TLV definition list respectively.Next, specifically introduce the process of communicating pair transmission data.
At first, data receiver is determined the data that will send, and these data are sent according to the definition list of the TLV back of encoding.Such as transmit leg will send name, age and sex, so, according to table 1 carry out behind the TLV coding schematic diagram as shown in Figure 1, the data behind this coding are sent.
Then, the data receiver receives this data.
At last, the recipient contrasts the coded data that receives and the TLV definition list of preservation, finishes the TLV decoding, obtains the data message that transmit leg sends, and finishes a TLV flow process.Such as the data that the recipient receives as shown in Figure 1.Because the recipient has preserved TLV definition list as shown in table 1 equally, therefore, it is 101 o'clock that the recipient reads first byte value that receives data, can learn that 101 implication is to represent name by question blank 1, is a uncertain character string of length.Read second byte 6 that receives data then, know that six follow-up bytes are concrete values of name; Continue then to read the 9th byte 104 that receives data, can know that by question blank 1 104 implication is to represent the age, length is by the tenth byte representation, and length is 1, and promptly the value at the 11 byte representation age is " 30 "; The value that continues to read the 12 byte then is 102, and tabling look-up 1 by inquiry, what learn 102 expressions is sex, and its length is by the 13 byte representation, and length is 1, and promptly the value of the 14 byte representation name is " man ".So the recipient can correctly obtain the data message that transmit leg sends:
Name: Wei Er-Smith
Age: 30
Sex: man
In actual applications, there is following problem in such scheme: adopt the efficient of TLV coded system lower.And,, in transmission, wasted interface-free resources through having unnecessary bytes in the TLV coded data.
Causing the main cause of this situation to be, after the recipient receives through the TLV coded data, is the length of obtaining the data that pass by the byte value that reads length field.But in fact, because the recipient preserves the TLV definition list equally, therefore, when the length of biography data is regular length, after reading types value and inquiring about the TLV definition list, can obtain the length of the data that pass equally, thereby not need to use a special length field to come the length of designation data in addition.As seen, when to have only length when the data that pass be uncertain, just needs use length field was told the physical length of current these data of recipient.
But in the prior art, no matter whether the length of the data that pass is fixing, all needs the byte of length field to define the length of these data, makes that efficient when coding is lower and have unnecessary bytes in transmission course, wasted interface-free resources.
Summary of the invention
In view of this, main purpose of the present invention is to provide the method for transmission data in a kind of communication system, makes it possible to improve the efficient of TLV coded system.
For achieving the above object, the invention provides the method for transmission data in a kind of communication system, comprise following steps:
Transmit leg judges according to the type of outgoing data whether this outgoing data should be regular length, if the mode of then using " type+value " encodes obtaining first coding data to this outgoing data, otherwise the mode of employing " type+length+value " is encoded to obtain second coded data to this outgoing data;
The recipient read after the type of the first coding data of receiving or second coded data, judge according to the type that reads whether this first coding data or second coded data should be regular length, if then read the value of this first coding data according to the length of predefined the type, otherwise read the length of this second coded data earlier, read the value of this second coded data again according to the length that is read.
Wherein, described recipient searches the definition list of type length and value according to the first coding data that is read or the second coded data type, know from searching the result whether the first coding data or the second coded data type that are read are regular length, and the concrete data length when being regular length.
In this external described method, the definition list of described type length and value is containing type and two fields of length at least in part, have defined type code and corresponding data length that each class needs outgoing data in this definition list.
In this external described method, the pairing data length of the type of described outgoing data and coded data is predesignated by the agreement of these data of transmission.
In this external described method, described outgoing data is regular length or variable-length.
The present invention also provides the system of transmission data in a kind of communication system, and transmit leg comprises:
Memory module is wherein preserved the definition of the type and the length of outgoing data;
Coding module, be used for searching corresponding length from the memory module of transmit leg according to the type of outgoing data, if that finds is regular length then adopts the mode of " type+value " that this outgoing data is encoded, if find be variable-length then adopt the mode of " type+length+value " that this outgoing data is encoded;
Sending module is used for the coded data behind described coding module coding is sent to the recipient;
The recipient comprises:
Memory module is wherein preserved the definition of the type and the length of coded data;
Decoder module, be used for searching corresponding length from recipient's memory module according to the type of the coded data that is read, if that finds is regular length then reads the value of this coded data according to the length that finds, if that finds is variable-length then reads the length of this coded data earlier, read the value of this coded data again according to the length that is read;
Receiver module, the coded data that is used to receive from transmit leg reads for described decoder module.
By relatively finding, the main distinction of technical scheme of the present invention and prior art is, type according to data during transceive data judges whether to be regular length, if regular length is then carried out encoding and decoding in " type+value " mode (TV), if variable-length is then carried out encoding and decoding in " type+length+value " mode (TLV).
Difference on this technical scheme has brought comparatively significantly beneficial effect, has promptly improved the efficient of TLV coded system effectively, and the wireless communication system very valuable for interface-free resources especially has great importance.This is because of after using the TV mode to carry out encoding and decoding to the data type of regular length, can save the byte of designation data length, so the efficient of coding has improved.If the data type of regular length is more in the data of transmission, can save down appreciable bandwidth.
Description of drawings
Fig. 1 carries out schematic diagram behind the TLV coding according to data in the prior art;
Fig. 2 is according to transmitting in the communication system of a better embodiment of the present invention in the method for data, variable length data being carried out TLV coding schematic diagram;
Fig. 3 is according to transmitting in the communication system of a better embodiment of the present invention in the method for data, fixed-length data being carried out TV coding schematic diagram;
Fig. 4 is according to transmitting in the communication system of a better embodiment of the present invention in the method for data, to the schematic diagram data after fixed-length data and the merging of variable length data coding;
Fig. 5 is the method flow schematic diagram according to transmission data in the communication system of a better embodiment of the present invention;
Fig. 6 is the system construction drawing according to transmission data in the communication system of a better embodiment of the present invention.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, the present invention is described in further detail below in conjunction with accompanying drawing.
Generally speaking, principle of the present invention is judge at transmitting terminal whether the data that need to send are regular length, if then use the TV coding to send, otherwise use the TLV coding to send.Judge whether to be regular length at receiving terminal according to the type of data, if, then from its length of TLV table inquiry, otherwise, the length of data obtained by the value that reads length field.Because the data of regular length are used the encoding and decoding of TV mode, therefore save the byte of designation data length, thereby effectively improved the efficient of TLV coded system, significant to the wireless communication system of interface-free resources preciousness.
Be illustrated in figure 5 as the method for transmission data in the communication system of first execution mode of the present invention.It is pointed out that in the present embodiment, need that the data of transmission contain regular length and variable-length.
At first, in step 510, transmit leg judges according to the type of outgoing data whether these data should be regular length.If then execution in step 520, use the mode of " type+value " that these data are encoded, otherwise execution in step 530 adopt the mode of " type+length+value " that these data are encoded.
Thus, present embodiment is divided into two classes with it earlier before outgoing data is encoded: the outgoing data of regular length and the outgoing data of variable-length, to the outgoing data omission length field of regular length, and to the outgoing data of variable-length, by the physical length of length field designation data.Persons skilled in the art can be understood, and do like this and can effectively save the byte of data length that data are used to indicate the data of regular length, improve code efficiency.
For instance, the transmitting terminal outgoing data is:
-name: Wei Er-Smith
-the age: 30
-sex: man
At first outgoing data is classified, wherein,
Variable-length class: name
Regular length class: age, sex
Adopt TLV coding and TV to encode respectively to two class data then, coding result as shown in Figures 2 and 3, after the merging as shown in Figure 4.
After this, as shown in Figure 5, enter step 540, the data after transmit leg will be encoded send to the recipient.
Then, in step 550, the recipient reads the value of first byte of the code data of incorporating into own forces earlier, obtains the type field of data.In the present embodiment, the value of first byte is 101.
After this, in step 560, the recipient is according to the Class1 01 that reads, the local TLV definition list of preserving of inquiry, judge whether these data should be regular length, in other words, know according to searching the result whether the data type that is read is regular length, and know the concrete data length when these data are regular length.If regular length, then execution in step 570, otherwise, execution in step 580.
It is pointed out that in the present embodiment that the TLV definition list is containing type (Type) and two fields of length (Length) at least in part, wherein defined the type code and the corresponding data length of the data that each class need transmit.In the present embodiment, by inquiring about the local TLV definition list of preserving, the data that can know Class1 01 are the uncertain character strings of length,, need know concrete length by reading length field that is, therefore with execution in step 580.
In step 580, read the value of a byte after the type field earlier, obtain the physical length of these data, read the concrete value of these data again according to this length.Specifically, read the value 6 of second byte among Fig. 4, that is to say, follow-up 6 bytes are character strings, read the deciphering of just having finished after follow-up 6 bytes name information.
And then read the value 104 of the 9th byte, by inquiring about the local TLV table of preserving, judge that these data are regular length.Then execution in step 560, know that by tabling look-up these data are data of the regular length at an expression age, and its length is 1.Read the concrete value of these data in this case according to this length.That is to say, directly read the value of the value of the tenth byte as age field.Similarly mode can obtain to represent the value of sex, does not do at this and gives unnecessary details.So far receiving terminal has been finished the decode operation to the TLV coded data, has correctly obtained the information that transmitting terminal sends.
This shows that the present invention uses the TV mode to carry out encoding and decoding to the data type of regular length, has saved the byte of designation data length, therefore improved code efficiency.Persons skilled in the art can be understood, if the data type of regular length is more in the data of transmission, can save down appreciable bandwidth.
Among the present invention, the pairing data length of data type is predesignated by the agreement of these data of transmission.
Below in conjunction with accompanying drawing 6, the system of transmitting data in the communication system of a better embodiment of the present invention is described.
As shown in Figure 6, in this system, comprise two parts: transmit leg and recipient.
In transmit leg, comprise memory module, coding module and sending module.Wherein, memory module is used to preserve the definition of the type and the length of outgoing data; Coding module is used for searching corresponding length according to the type of outgoing data from the memory module of transmit leg, if that finds is regular length then adopts the mode of " type+value " that this outgoing data is encoded, if find be variable-length then adopt the mode of " type+length+value " that this outgoing data is encoded; Sending module is used for and will sends to the recipient through the coded data behind the coding module coding.
In the recipient, comprise memory module, decoder module and receiver module.Wherein, memory module is used to preserve the definition of the type and the length of coded data; Decoder module is used for searching corresponding length according to the type of the coded data that is read from recipient's memory module, if that finds is regular length then reads the value of this coded data according to the length that finds, if that finds is variable-length then reads the length of this coded data earlier, read the value of this coded data again according to the length that is read; The coded data that receiver module is used to receive from transmit leg reads for described decoder module.
Next, the dynamic duty process of each intermodule is once simply described.
After the coding module of transmit leg receives outgoing data, from the memory module of transmit leg, search corresponding length according to the type of outgoing data earlier, according to the corresponding length situation that finds this outgoing data is encoded again.Such as, in the memory module of transmit leg, with the corresponding length of the type of this outgoing data be regular length, then adopt the mode of " type+value " that this outgoing data is encoded, if in the memory module of transmit leg, with the corresponding length of the type of this outgoing data be variable-length, then adopt the mode of " type+length+value " that this outgoing data is encoded.
The coding module of transmit leg by the sending module of transmit leg, sends to the recipient with this coded data after this outgoing data is encoded.
Recipient's receiver module supplies recipient's decoder module to read after receiving this coded data.This decoder module is searched corresponding length according to the type of the coded data that is read from recipient's memory module earlier, according to the corresponding length situation that finds this coded data is decoded again.Such as, in recipient's memory module, with the corresponding length of the type of this coded data be regular length, then read the value of this coded data according to the length that finds, if in recipient's memory module, with the corresponding length of the type of this coded data be variable-length, then read the length of this coded data earlier, read the value of this coded data again according to the length that is read.
Recipient's decoder module after coded data is decoded sends decoded data.
Above-mentioned only is better embodiment of the present invention, but those of ordinary skill in the art should be understood that and can do various changes to it in the form and details, and without departing from the spirit and scope of the present invention.

Claims (6)

1. the method for transmission data in the communication system is characterized in that, comprises following steps:
Transmit leg judges according to the type of outgoing data whether this outgoing data should be regular length, if the mode of then using " type+value " encodes obtaining first coding data to this outgoing data, otherwise the mode of employing " type+length+value " is encoded to obtain second coded data to this outgoing data;
The recipient read after the type of the first coding data of receiving or second coded data, judge according to the type that reads whether this first coding data or second coded data should be regular length, if then read the value of this first coding data according to the length of predefined the type, otherwise read the length of this second coded data earlier, read the value of this second coded data again according to the length that is read.
2. the method for transmission data in the communication system according to claim 1, it is characterized in that, described recipient searches the definition list of type length and value according to the first coding data that is read or the second coded data type, know from searching the result whether the first coding data or the second coded data type that are read are regular length, and the concrete data length when being regular length.
3. the method for transmission data in the communication system according to claim 2, it is characterized in that, the definition list of described type length and value is containing type and two fields of length at least in part, have defined the type code and the corresponding data length of each class coded data in this definition list.
4. the method for transmission data is characterized in that in the communication system according to claim 1, and the pairing data length of the type of described outgoing data and coded data is predesignated by the agreement of these data of transmission.
5. the method for transmission data is characterized in that described outgoing data is regular length or variable-length in the communication system according to claim 1.
6. the system of transmission data in the communication system is characterized in that transmit leg comprises:
Memory module is wherein preserved the definition of the type and the length of outgoing data;
Coding module, be used for searching corresponding length from the memory module of transmit leg according to the type of outgoing data, if that finds is regular length then adopts the mode of " type+value " that this outgoing data is encoded, if find be variable-length then adopt the mode of " type+length+value " that this outgoing data is encoded;
Sending module is used for the coded data behind described coding module coding is sent to the recipient;
The recipient comprises:
Memory module is wherein preserved the definition of the type and the length of coded data;
Decoder module, be used for searching corresponding length from recipient's memory module according to the type of the coded data that is read, if that finds is regular length then reads the value of this coded data according to the length that finds, if that finds is variable-length then reads the length of this coded data earlier, read the value of this coded data again according to the length that is read;
Receiver module, the coded data that is used to receive from transmit leg reads for described decoder module.
CN 200510037395 2005-09-16 2005-09-16 Method for transmitting data in communication system and system thereof Pending CN1933479A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200510037395 CN1933479A (en) 2005-09-16 2005-09-16 Method for transmitting data in communication system and system thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200510037395 CN1933479A (en) 2005-09-16 2005-09-16 Method for transmitting data in communication system and system thereof

Publications (1)

Publication Number Publication Date
CN1933479A true CN1933479A (en) 2007-03-21

Family

ID=37879095

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200510037395 Pending CN1933479A (en) 2005-09-16 2005-09-16 Method for transmitting data in communication system and system thereof

Country Status (1)

Country Link
CN (1) CN1933479A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101179580B (en) * 2007-12-12 2010-08-11 北京北方烽火科技有限公司 Method for implementing encoding/decoding of WiMAX system information
CN102843345A (en) * 2011-06-24 2012-12-26 中怡(苏州)科技有限公司 Remote communication method and computer program product thereof
CN103297183A (en) * 2012-03-05 2013-09-11 腾讯科技(深圳)有限公司 Data communication method and device
CN106254392A (en) * 2016-09-28 2016-12-21 天津轻工职业技术学院 Communication means based on the exTLV Message Protocol that dynamically can customize
CN107315623A (en) * 2017-06-21 2017-11-03 广州华多网络科技有限公司 A kind of method and apparatus for reporting statistics
CN107995206A (en) * 2017-12-13 2018-05-04 大唐融合通信股份有限公司 Realization device and method for the TLV communications protocol formats of industrial big data

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101179580B (en) * 2007-12-12 2010-08-11 北京北方烽火科技有限公司 Method for implementing encoding/decoding of WiMAX system information
CN102843345A (en) * 2011-06-24 2012-12-26 中怡(苏州)科技有限公司 Remote communication method and computer program product thereof
US9065789B2 (en) 2011-06-24 2015-06-23 Sernet (Suzhou) Technologies Corporation Remote communication method
CN102843345B (en) * 2011-06-24 2015-07-22 中磊电子(苏州)有限公司 Remote communication method and computer program product thereof
CN103297183A (en) * 2012-03-05 2013-09-11 腾讯科技(深圳)有限公司 Data communication method and device
CN103297183B (en) * 2012-03-05 2016-02-03 腾讯科技(深圳)有限公司 Data communications method and device
CN106254392A (en) * 2016-09-28 2016-12-21 天津轻工职业技术学院 Communication means based on the exTLV Message Protocol that dynamically can customize
CN107315623A (en) * 2017-06-21 2017-11-03 广州华多网络科技有限公司 A kind of method and apparatus for reporting statistics
CN107315623B (en) * 2017-06-21 2020-08-11 广州华多网络科技有限公司 Method and device for reporting statistical data
CN107995206A (en) * 2017-12-13 2018-05-04 大唐融合通信股份有限公司 Realization device and method for the TLV communications protocol formats of industrial big data

Similar Documents

Publication Publication Date Title
CN1933479A (en) Method for transmitting data in communication system and system thereof
CN103475448B (en) Method for determining transport block size and signal transmission method using the same
EP1326346A3 (en) Turbo-coding with staged data transmission and processing
CN1261487A (en) Sequence numbering range extending method and system for selecting repeat transmission protocols
CN1335002A (en) Signaling method in incremental redundancy communication system whereby data blocks can be combined
CN1237722C (en) Method and appts. for puncturing code symbols in communications system
CN101044710A (en) A method of formatting and encoding uplink short length data in a wireless communication system
CN1459179A (en) Header compression method for network protocols
CN101034953A (en) Method for carrying out data transmission using the low-density parity check code
CN1385990A (en) Grouping receiver and transmission method thereof
CN101079889A (en) Data transmission system and its transmission method
CN1529944A (en) Method for transmitting real-time data on radio packet communication network
WO2023088021A1 (en) Data compression method and apparatus based on preset rule, device, and medium
CN1835511A (en) Sip message and processing method thereof in mobile communication system
CN1422471A (en) Error correcting/decoding method
CN103036641A (en) Method and system of data exchange and deserialization method
CN1252187A (en) Method and device for coding data sequences
CN1458764A (en) Forward error correcting method in one-way broadcast file transmission
CN1748369A (en) Method and device for text data compression
CN1747568A (en) Method for base station to transmitting feedback data of multiple clients by sorted combinations
CN1645750A (en) Coding and decoding method for variable long code
CN1881866A (en) Data transmission fault monitoring and correcting method and its structure
CN1845535A (en) Message matching method and system
CN1115782C (en) Compression method suitable for wide character set document
CN1551512A (en) CDMA receiver and method of judging tfci candidates of the same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20070321