CN104184672A - Method and device of transmitting message - Google Patents

Method and device of transmitting message Download PDF

Info

Publication number
CN104184672A
CN104184672A CN201410458167.2A CN201410458167A CN104184672A CN 104184672 A CN104184672 A CN 104184672A CN 201410458167 A CN201410458167 A CN 201410458167A CN 104184672 A CN104184672 A CN 104184672A
Authority
CN
China
Prior art keywords
data
coding
information
message
coded data
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
CN201410458167.2A
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.)
Sichuan Jiuzhou Electric Group Co Ltd
Original Assignee
Sichuan Jiuzhou Electric Group 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 Sichuan Jiuzhou Electric Group Co Ltd filed Critical Sichuan Jiuzhou Electric Group Co Ltd
Priority to CN201410458167.2A priority Critical patent/CN104184672A/en
Publication of CN104184672A publication Critical patent/CN104184672A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a method and device of transmitting a message, and belongs to the communication field. The method comprises the steps of carrying out BCD coding on the information just composed of figures to obtain first coded data among the information to be sent, carrying out GBK coding on the other information except for the information just composed of the figures to obtain second coded data, obtaining the length of the first coded data and the length of the second coded data, filling the message with the first coded data, the length of the first coded data, the second coded data and the length of the second coded data, and sending the message to a receiving end. The length of the first coded data obtained through BCD coding is smaller than the length of the data obtained by carrying out GBK coding on the information just composed of figures, and therefore the data size of the message is reduced, in the process of transmitting the message, the network resource occupancy is reduced, the time for transmission is shortened, and the transmission time and the network resources are saved.

Description

A kind of method of message transmission and device
Technical field
The present invention relates to the communications field, particularly a kind of method of message transmission and device.
Background technology
Along with developing rapidly of the communication technology, Beidou satellite navigation system is widely used in people's work and life.For example, the Big Dipper short message communication function in Beidou satellite navigation system is usually applied to the fields such as missile guidance, auto navigation, emergent search, to people, brings great convenience.
Wherein, in the communication of Big Dipper short message, the message content of Big Dipper short message is filled in the communication text field of Big Dipper short message, when transmitting terminal need to send content to be sent to receiving terminal, content to be sent is encoded, content after coding is filled in the communication text field of Big Dipper short message, sends this Big Dipper short message to receiving terminal, so realize and send content to be sent to receiving terminal.
In realizing process of the present invention, inventor finds that prior art at least exists following problem:
When receiving terminal need to obtain the positional information of transmitting terminal, transmitting terminal cannot send to receiving terminal by the positional information of self when sending content to be sent simultaneously; If transmitting terminal is encoded positional information and is added in this communication text field, increased the data volume of Big Dipper short message, along with data volume increases, in transmitting procedure, need to take more Internet resources and spend the more time, causing resource and waste of time.
Summary of the invention
In order to solve the problem of prior art, the embodiment of the present invention provides a kind of method and device of message transmission.Described technical scheme is as follows:
First aspect, a kind of method that sends message, described method comprises step:
In information to be sent, the information being only comprised of numeral is carried out to BCD BCD coding and obtain first coding data, other information except the described information being only comprised of numeral are carried out to Chinese Internal Code Specification GBK coding and obtain the second coded data;
Obtain the data length of described first coding data and the data length of described the second coded data;
The data length of the data length of described first coding data, described first coding data, described the second coded data and described the second coded data is filled in message, and sends described message to receiving terminal.
In conjunction with first aspect, in the possible implementation of the first of first aspect, the described data length by the data length of described first coding data, described first coding data, the second coded data and described the second coded data is filled in message, comprises step:
Data length according to the data length of described first coding data and described the second coded data, carries out segmentation by described message, obtains the first field, the second field, the first subsidiary field and the second subsidiary field;
The data length of described first coding data is filled in described the first subsidiary field, described first coding data is filled in described the first field, the data length of described the second coded data is filled in described the second subsidiary field, and described the second coded data is filled in described the second field.
Second aspect, a kind of method that receives message, described method comprises step:
The message that receiving end/sending end sends, described message carries the data length of data length, the second coded data and described second coded data of first coding data, described first coding data, described first coding data obtains data for the information being only comprised of numeral being carried out to BCD BCD coding, and described the second coded data obtains data for other information except the described information being only comprised of numeral being carried out to Chinese Internal Code Specification GBK coding;
Obtain described first coding data and described the second coded data in described message;
The information that described first coding data is decoded and is only comprised of numeral described in obtaining, and described the second coded data is decoded and obtained other information except the described information being only comprised of numeral.
In conjunction with second aspect, in the possible implementation of the first of second aspect, described in obtain described first coding data and described the second coded data in described message, comprise step:
Extract the data length of the described first coding data in described message;
According to the data length of described first coding data, obtain described first coding data;
Extract the data length of described the second coded data in described message;
According to the data length of described the second coded data, obtain described the second coded data.
In conjunction with second aspect, in the possible implementation of the second of second aspect, the described information that described first coding data is decoded and is only comprised of numeral described in obtaining, and described the second coded data is decoded and obtained other information except the described information being only comprised of numeral, comprise step:
Described first coding data is carried out to the information that BCD decoding is only comprised of numeral described in obtaining; And described the second coded data is carried out to GBK decoding obtain other information except the described information only being formed by numeral.
The third aspect, a kind of device that sends message, described device comprises:
Coding module, be used in information to be sent, the information being only comprised of numeral is carried out to BCD BCD coding and obtain first coding data, other information except the described information being only comprised of numeral are carried out to Chinese Internal Code Specification GBK coding and obtain the second coded data;
The first acquisition module, for obtaining the data length of described first coding data and the data length of described the second coded data;
Packing module, for being filled in message by the data length of the data length of described first coding data, described first coding data, described the second coded data and described the second coded data;
Sending module, for sending described message to receiving terminal.
In conjunction with the third aspect, in the possible implementation of the first of the third aspect, described packing module comprises:
Segmenting unit, for according to the data length of the data length of described first coding data and described the second coded data, carries out segmentation by described message, obtains the first field, the second field, the first subsidiary field and the second subsidiary field;
Filler cells, for the data length of described first coding data is filled in to described the first subsidiary field, described first coding data is filled in described the first field, the data length of described the second coded data is filled in described the second subsidiary field, and described the second coded data is filled in described the second field.
Fourth aspect, a kind of device that receives message, described device comprises:
Receiver module, the message sending for receiving end/sending end, described message carries the data length of data length, the second coded data and described second coded data of first coding data, described first coding data, described first coding data obtains data for the information being only comprised of numeral being carried out to BCD BCD coding, and described the second coded data obtains data for other information except the described information being only comprised of numeral being carried out to Chinese Internal Code Specification GBK coding;
The second acquisition module, for obtaining described first coding data and described second coded data of described message;
Decoder module, the information only being formed by numeral described in obtaining for described first coding data is decoded, and described the second coded data is decoded and obtained other information except the described information being only comprised of numeral.
In conjunction with fourth aspect, in the possible implementation of the first of fourth aspect, described acquisition module comprises:
The first extraction unit, for extracting the data length of the described first coding data of described message;
The first acquiring unit, for obtaining described first coding data according to the data length of described first coding data;
The second extraction unit, for extracting the data length of described second coded data of described message;
Second acquisition unit, for obtaining described the second coded data according to the data length of described the second coded data.
In conjunction with fourth aspect, in the possible implementation of the second of fourth aspect, described decoder module comprises:
The first decoding unit, the information only being formed by numeral described in obtaining for described first coding data being carried out to BCD decoding;
The second decoding unit, obtains other information except the described information being only comprised of numeral for described the second coded data being carried out to GBK decoding.
In the present invention, transmitting terminal carries out BCD coding by the information being only comprised of numeral in information to be sent and obtains first coding data, other information except the information being only comprised of numeral in information to be sent are carried out to GBK coding and obtain the second coded data, by the data length of first coding data, first coding data, the data length of the second coded data and the second coded data are filled in respectively in message, this message is sent to receiving terminal, when receiving terminal receives this message, obtain first coding data and second coded data of this message, and first coding data is carried out to the information that BCD decoding obtains being only comprised of numeral, and the second coded data is carried out to GBK decoding obtain other information except the information only being formed by numeral.Wherein, the data length of the first coding data obtaining through BCD coding is less than the data length that the information being only comprised of numeral is carried out to the data that GBK coding obtains, therefore reduced the data volume of message, and in the process of message transmission, the occupancy of Internet resources still less, the time of transmission cost still less, has so been saved transmission time and Internet resources.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing of required use during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is a kind of method flow diagram that sends message that the embodiment of the present invention 1 provides;
Fig. 2 is a kind of method flow diagram that receives message that the embodiment of the present invention 2 provides;
Fig. 3-1st, the method flow diagram of a kind of message transmission that the embodiment of the present invention 3 provides;
Fig. 3-2nd, a kind of field schematic diagram that the embodiment of the present invention 3 provides;
Fig. 3-3rd, a kind of field schematic diagram of having filled data that the embodiment of the present invention 3 provides;
Fig. 4 is a kind of apparatus structure schematic diagram that sends message that the embodiment of the present invention 4 provides;
Fig. 5 is a kind of apparatus structure schematic diagram that receives message that the embodiment of the present invention 5 provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment 1
Referring to Fig. 1, the embodiment of the present invention 1 provides a kind of method that sends message, and the method comprising the steps of:
Step 101: in information to be sent, the information being only comprised of numeral is carried out to BCD (Binary Coded Decimal, BCD) coding obtains first coding data, other information except the information being only comprised of numeral in information to be sent is carried out to GBK (Chinese Internal Code Specification coding) and obtain the second coded data;
Step 102: obtain the data length of first coding data and the data length of the second coded data;
Step 103: the data length of the data length of first coding data, first coding data, the second coded data and the second coded data is filled in message, and sends this message to receiving terminal.
Wherein, the executive agent of the embodiment of the present invention 1 can be transmitting terminal.
In the embodiment of the present invention 1, transmitting terminal carries out BCD coding by the information being only comprised of numeral in information to be sent and obtains first coding data, the data length of the first coding data obtaining through BCD coding is less than the data length that the information being only comprised of numeral is carried out to the data that GBK coding obtains, therefore reduced the data volume of message, and in the process of message transmission, still less, the time of transmission cost still less, has so been saved transmission time and Internet resources to the occupancy of Internet resources.
Embodiment 2
Referring to Fig. 2, the embodiment of the present invention 2 provides a kind of method that receives message, and the method comprising the steps of:
Step 201: the message that receiving end/sending end sends, this message carries the data length of data length, the second coded data and second coded data of first coding data, first coding data, first coding data obtains data for the information being only comprised of numeral being carried out to BCD coding, and the second coded data obtains data for other information the information being only comprised of numeral except this being carried out to GBK coding;
Step 202: obtain first coding data and the second coded data in this message;
Step 203: first coding data is decoded and obtained the information that this is only comprised of numeral, and the second coded data is decoded and obtained other information except the information that this is only comprised of numeral.
Wherein, the executive agent of the embodiment of the present invention 2 can be receiving terminal.
In the embodiment of the present invention 2, when receiving message, can extract first coding data and the second coded data in message, and can be to first coding data and the second coded data decode the respectively information that obtains only being formed by numeral and other information except the information that this is only comprised of numeral, thereby support transmitting terminal that the information being only comprised of numeral in information to be sent is carried out to BCD coding to obtain first coding data, the data length of the first coding data obtaining through BCD coding is less than the data length that the information being only comprised of numeral is carried out to the data that GBK coding obtains, therefore reduced the data volume of message, and in the process of message transmission, the occupancy of Internet resources still less, the time of transmission cost still less, transmission time and Internet resources have so been saved.
Embodiment 3
Referring to Fig. 3-1, the embodiment of the present invention 3 provides a kind of method of message transmission, and the method comprises:
Step 301: in the time need to sending information to be sent, transmitting terminal obtains the information being only comprised of numeral in information to be sent;
For example, suppose that emergency repair personnel are on-the-spot three the wounded of discovery that speedily carry out rescue work, and scene need to be had three the wounded's information to send command centre.Emergency repair personnel input message on transmitting terminal " has three the wounded herein ", and click " transmission " button " has three the wounded herein " to receiving terminal to trigger transmitting terminal transmission information.
The information that transmitting terminal obtains user's input " has three the wounded herein ", simultaneously, when transmitting terminal also needs the positional information of self to send to receiving terminal, GPS (the Global Positioning System that transmitting terminal can be equipped with according to self, global positioning system) obtain the position coordinates of self, the longitude in the position coordinates of supposing to obtain is 104 ° 34 ' 28 " and latitude is 35 ° 27 ' 42 ".
Transmitting terminal by information " have three the wounded herein ", " 104 ° 34 ' 28 " " and " 35 ° 27 ' 42 " " form information to be sent, and the information that " 104 ° 34 ' 28 " " and " 35 ° 27 ' 42 " " conduct is only comprised of numeral, and will " the information that 104 ° 34 ' 28 " " and " 35 ° 27 ' 42 " composition is only comprised of numeral.
Step 302: transmitting terminal carries out BCD coding by the information being only comprised of numeral of obtaining and obtains first coding data;
For example, send and the information being only comprised of numeral " 104 ° 34 ' 28 " " and " 35 ° 27 ' 42 " " to be carried out to BCD encode and obtain first coding data " 10434283527420 ".
Step 303: transmitting terminal carries out GBK coding by other information except the information being only comprised of numeral in information to be sent and obtains the second coded data;
Particularly, transmitting terminal is removed the information being only comprised of numeral from information to be sent, obtains other information except the information being only comprised of numeral, other information the information except being only comprised of numeral is carried out to GBK coding and obtain the second coded data.
For example, transmitting terminal by information to be sent " have three the wounded herein ", " information being only comprised of numeral in 104 ° 34 ' 28 " " and " 35 ° 27 ' 42 " " remove from information to be sent by 104 ° 34 ' 28 " " and " 35 ° 27 ' 42 ", the information obtaining except the information being only comprised of numeral " has three the wounded herein ", and " has three the wounded herein " and carry out GBK coding to obtain the second coded data " B4 CB B4 A6 D3 D0 C8 FD C3 FB C9 CB D5 DF " to information.
Step 304: transmitting terminal obtains the data length of first coding data and the data length of the second coded data;
For example, to obtain the data length of first coding data " 10 43 42 83 52 74 20 " be 7 bytes to transmitting terminal; And the data length that obtains the second coded data " B4 CB B4 A6 D3 D0 C8 FD C3 FB C9 CB D5 DF " is 14 bytes.
Step 305: transmitting terminal is according to the data length of the data length of first coding data and the second coded data, content field in message is carried out to segmentation, obtain the first subsidiary field, the first field, the second subsidiary field and the second field, this content field is for storing content to be sent;
Wherein, the first subsidiary field, the first field, the second subsidiary field and the second field position are each other as shown in Fig. 3-2, the first subsidiary field is at Far Left, adjacent the first subsidiary field and the field on first subsidiary field the right are the first fields, adjacent the first field and the field on first field the right are the second subsidiary fields, and rightmost field is the second field.
Step 306: transmitting terminal is filled in the data length of first coding data in described the first subsidiary field, first coding data is filled in the first field, the data length of the second coded data is filled in the second subsidiary field, and the second coded data is filled in the second field;
For example, because the data length of first coding data is 7 bytes, transmitting terminal is filled in the data length of first coding data " 07 " in the first subsidiary field, and first coding data " 10 43 42 83 52 7420 " is filled in the first field; Because the data length of the second coded data is 14 bytes, transmitting terminal is filled in the data length of the second coded data " 0E " in the second subsidiary field again, and the second coded data " B4 CB B4 A6 D3 D0 C8 FD C3 FB C9 CB D5 DF " is filled in the second field.
Wherein, filled the field after data as shown in Fig. 3-3.
Step 307: transmitting terminal sends this message to receiving terminal;
Step 308: the message that receiving terminal receiving end/sending end sends;
Step 309: receiving terminal extracts the data length of the first coding data in this message, and obtain first coding data according to the data length of first coding data;
Particularly, receiving terminal gets after this message, by order from left to right, travel through successively each field, when traveling through to the first subsidiary field, obtain the data of storing in the first subsidiary field, this data representative data length, then according to this data length from obtaining the data that this data length is corresponding, and as first coding data.
For example, receiving terminal gets after this message, by order from left to right, travel through successively each field, when traveling through to the first subsidiary field, the data 07,07 of obtaining in the first subsidiary field represent 7 bytes, the data " 10 43 42 83 52 74 20 " in 7 bytes after reading, the data of storing in the first field, and as first coding data.
Step 310: receiving terminal extracts the data length of the second coded data in this message, and obtain the second coded data according to the data length of the second coded data;
Particularly, after having obtained first coding data, receiving terminal will travel through to the second subsidiary field, obtain data 0E in the second subsidiary field, 0E represents 14 bytes, data " B4 CB B4 A6 D3 D0 C8 FD C3 FB C9 CB D5 DF " in 14 bytes after reading, i.e. data in the second field, and as the second coded data.
Step 311: receiving terminal carries out to first coding data the information that BCD decoding obtains being only comprised of numeral; And the second coded data is carried out to GBK decoding obtain other information except the information only being formed by numeral.
For example, receiving terminal carries out BCD decoding to first coding data " 10 43 42 83 52 74 20 " and obtains information " 104 ° 34 ' 28 " " and " 35 ° 27 ' 42 " ", and the position coordinates of known transmitting terminal is 104 ° 34 ' 28 of longitude " and latitude " 35 ° 27 ' 42 " "; And, to the second coded data B4 CB B4 A6 D3 D0C8 FD C3 FB C9 CB D5 DF " carry out GBK coding and obtain information and " have three the wounded herein ".
In the embodiment of the present invention 3, transmitting terminal carries out BCD coding by the information being only comprised of numeral in information to be sent and obtains first coding data, other information except the information being only comprised of numeral in information to be sent are carried out to GBK coding and obtain the second coded data, by the data length of first coding data, first coding data, the data length of the second coded data and the second coded data are filled in respectively in message, this message is sent to receiving terminal, when receiving terminal receives this message, obtain first coding data and second coded data of this message, and first coding data is carried out to the information that BCD decoding obtains being only comprised of numeral, and the second coded data is carried out to GBK decoding obtain other information except the information only being formed by numeral.Wherein, the data length of the first coding data obtaining through BCD coding is less than the data length that the information being only comprised of numeral is carried out to the data that GBK coding obtains, therefore reduced the data volume of message, and in the process of message transmission, the occupancy of Internet resources still less, the time of transmission cost still less, has so been saved transmission time and Internet resources.
Embodiment 4
Referring to Fig. 4, the embodiment of the present invention 4 provides a kind of device that sends message, and this device comprises:
Coding module 401, for the information to be sent, carries out BCD coding by the information being only comprised of numeral and obtains first coding data, other information except the described information being only comprised of numeral is carried out to GBK coding and obtain the second coded data;
The first acquisition module 402, for obtaining the data length of described first coding data and the data length of described the second coded data;
Packing module 403, for being filled in message by the data length of the data length of described first coding data, described first coding data, described the second coded data and described the second coded data;
Sending module 404, for sending described message to receiving terminal.
Preferably, packing module 403 comprises:
Segmenting unit, for according to the data length of the data length of described first coding data and described the second coded data, carries out segmentation by described message, obtains the first field, the second field, the first subsidiary field and the second subsidiary field;
Filler cells, for the data length of described first coding data is filled in to described the first subsidiary field, described first coding data is filled in described the first field, the data length of described the second coded data is filled in described the second subsidiary field, and described the second coded data is filled in described the second field.
In the embodiment of the present invention 4, transmitting terminal carries out BCD coding by the information being only comprised of numeral in information to be sent and obtains first coding data, the data length of the first coding data obtaining through BCD coding is less than the data length that the information being only comprised of numeral is carried out to the data that GBK coding obtains, therefore reduced the data volume of message, and in the process of message transmission, still less, the time of transmission cost still less, has so been saved transmission time and Internet resources to the occupancy of Internet resources.
Embodiment 5
Referring to Fig. 5, the embodiment of the present invention 5 provides a kind of device that receives message, and this device comprises:
Receiver module 501, the message sending for receiving end/sending end, described message carries the data length of data length, the second coded data and described second coded data of first coding data, described first coding data, described first coding data obtains data for the information being only comprised of numeral being carried out to BCD coding, and described the second coded data obtains data for other information except the described information being only comprised of numeral being carried out to GBK coding;
The second acquisition module 502, for obtaining described first coding data and described second coded data of described message;
Decoder module 503, the information only being formed by numeral described in obtaining for described first coding data is decoded, and described the second coded data is decoded and obtained other information except the described information being only comprised of numeral.
Preferably, acquisition module 502 comprises:
The first extraction unit, for extracting the data length of the described first coding data of described message;
The first acquiring unit, for obtaining described first coding data according to the data length of described first coding data;
The second extraction unit, for extracting the data length of described second coded data of described message;
Second acquisition unit, for obtaining described the second coded data according to the data length of described the second coded data.
Preferably, decoder module 503 comprises:
The first decoding unit, the information only being formed by numeral described in obtaining for described first coding data being carried out to BCD decoding;
The second decoding unit, obtains other information except the described information being only comprised of numeral for described the second coded data being carried out to GBK decoding.
In the embodiment of the present invention 5, when receiving message, can extract first coding data and the second coded data in message, and can be to first coding data and the second coded data decode the respectively information that obtains only being formed by numeral and other information except the information that this is only comprised of numeral, thereby support transmitting terminal that the information being only comprised of numeral in information to be sent is carried out to BCD coding to obtain first coding data, the data length of the first coding data obtaining through BCD coding is less than the data length that the information being only comprised of numeral is carried out to the data that GBK coding obtains, therefore reduced the data volume of message, and in the process of message transmission, the occupancy of Internet resources still less, the time of transmission cost still less, transmission time and Internet resources have so been saved.
One of ordinary skill in the art will appreciate that all or part of step that realizes above-described embodiment can complete by hardware, also can come the hardware that instruction is relevant to complete by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (10)

1. a method that sends message, is characterized in that, described method comprises step:
In information to be sent, the information being only comprised of numeral is carried out to BCD BCD coding and obtain first coding data, other information except the described information being only comprised of numeral are carried out to Chinese Internal Code Specification GBK coding and obtain the second coded data;
Obtain the data length of described first coding data and the data length of described the second coded data;
The data length of the data length of described first coding data, described first coding data, described the second coded data and described the second coded data is filled in message, and sends described message to receiving terminal.
2. the method for claim 1, is characterized in that, in described method, the data length of the data length of described first coding data, described first coding data, the second coded data and described the second coded data is filled in message, comprises step:
Data length according to the data length of described first coding data and described the second coded data, carries out segmentation by described message, obtains the first field, the second field, the first subsidiary field and the second subsidiary field;
The data length of described first coding data is filled in described the first subsidiary field, described first coding data is filled in described the first field, the data length of described the second coded data is filled in described the second subsidiary field, and described the second coded data is filled in described the second field.
3. a method that receives message, is characterized in that, described method comprises step:
The message that receiving end/sending end sends, described message carries the data length of data length, the second coded data and described second coded data of first coding data, described first coding data, described first coding data obtains data for the information being only comprised of numeral being carried out to BCD BCD coding, and described the second coded data obtains data for other information except the described information being only comprised of numeral being carried out to Chinese Internal Code Specification GBK coding;
Obtain described first coding data and described the second coded data in described message;
The information that described first coding data is decoded and is only comprised of numeral described in obtaining, and described the second coded data is decoded and obtained other information except the described information being only comprised of numeral.
4. method as claimed in claim 3, is characterized in that, in described method, obtains described first coding data and described the second coded data in described message, comprises step:
Extract the data length of the described first coding data in described message;
According to the data length of described first coding data, obtain described first coding data;
And, extract the data length of described the second coded data in described message;
According to the data length of described the second coded data, obtain described the second coded data.
5. method as claimed in claim 3, it is characterized in that, in described method, the information that described first coding data is decoded and is only comprised of numeral described in obtaining, and described the second coded data is decoded and obtained other information except the described information being only comprised of numeral, comprise step:
Described first coding data is carried out to the information that BCD decoding is only comprised of numeral described in obtaining; And described the second coded data is carried out to GBK decoding obtain other information except the described information only being formed by numeral.
6. a device that sends message, is characterized in that, described device comprises:
Coding module, be used in information to be sent, the information being only comprised of numeral is carried out to BCD BCD coding and obtain first coding data, other information except the described information being only comprised of numeral are carried out to Chinese Internal Code Specification GBK coding and obtain the second coded data;
The first acquisition module, for obtaining the data length of described first coding data and the data length of described the second coded data;
Packing module, for being filled in message by the data length of the data length of described first coding data, described first coding data, described the second coded data and described the second coded data;
Sending module, for sending described message to receiving terminal.
7. device as claimed in claim 6, is characterized in that, described packing module comprises:
Segmenting unit, for according to the data length of the data length of described first coding data and described the second coded data, carries out segmentation by described message, obtains the first field, the second field, the first subsidiary field and the second subsidiary field;
Filler cells, data length for just described first coding data is filled in described the first subsidiary field, described first coding data is filled in described the first field, the data length of described the second coded data is filled in described the second subsidiary field, and described the second coded data is filled in described the second field.
8. a device that receives message, is characterized in that, described device comprises:
Receiver module, the message sending for receiving end/sending end, described message carries the data length of data length, the second coded data and described second coded data of first coding data, described first coding data, described first coding data obtains data for the information being only comprised of numeral being carried out to BCD BCD coding, and described the second coded data obtains data for other information except the described information being only comprised of numeral being carried out to Chinese Internal Code Specification GBK coding;
The second acquisition module, for obtaining described first coding data and described second coded data of described message;
Decoder module, the information only being formed by numeral described in obtaining for described first coding data is decoded, and described the second coded data is decoded and obtained other information except the described information being only comprised of numeral.
9. device as claimed in claim 8, is characterized in that, described acquisition module comprises:
The first extraction unit, for extracting the data length of the described first coding data of described message;
The first acquiring unit, for obtaining described first coding data according to the data length of described first coding data;
The second extraction unit, for extracting the data length of described second coded data of described message;
Second acquisition unit, for obtaining described the second coded data according to the data length of described the second coded data.
10. device as claimed in claim 8, is characterized in that, described decoder module comprises:
The first decoding unit, the information only being formed by numeral described in obtaining for described first coding data being carried out to BCD decoding;
The second decoding unit, obtains other information except the described information being only comprised of numeral for described the second coded data being carried out to GBK decoding.
CN201410458167.2A 2014-09-10 2014-09-10 Method and device of transmitting message Pending CN104184672A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410458167.2A CN104184672A (en) 2014-09-10 2014-09-10 Method and device of transmitting message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410458167.2A CN104184672A (en) 2014-09-10 2014-09-10 Method and device of transmitting message

Publications (1)

Publication Number Publication Date
CN104184672A true CN104184672A (en) 2014-12-03

Family

ID=51965430

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410458167.2A Pending CN104184672A (en) 2014-09-10 2014-09-10 Method and device of transmitting message

Country Status (1)

Country Link
CN (1) CN104184672A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107544381A (en) * 2017-08-31 2018-01-05 珠海格力电器股份有限公司 Energy management method and device
CN111064782A (en) * 2019-12-12 2020-04-24 腾讯科技(深圳)有限公司 Method and device for transmitting data, electronic equipment and storage medium
CN112286698A (en) * 2019-07-23 2021-01-29 北京地平线机器人技术研发有限公司 Remote procedure call method and device and remote procedure call execution method
CN112888024A (en) * 2019-11-29 2021-06-01 腾讯科技(深圳)有限公司 Data processing method, data processing device, storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0124788A1 (en) * 1983-04-09 1984-11-14 Nec Corporation Radio paging system and receiver therefor
CN101291237A (en) * 2007-04-18 2008-10-22 华为技术有限公司 Downlink data transmission method and apparatus for multicast and broadcast service
CN101674552A (en) * 2009-09-25 2010-03-17 中兴通讯股份有限公司 Short message coding method and terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0124788A1 (en) * 1983-04-09 1984-11-14 Nec Corporation Radio paging system and receiver therefor
CN101291237A (en) * 2007-04-18 2008-10-22 华为技术有限公司 Downlink data transmission method and apparatus for multicast and broadcast service
CN101674552A (en) * 2009-09-25 2010-03-17 中兴通讯股份有限公司 Short message coding method and terminal

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107544381A (en) * 2017-08-31 2018-01-05 珠海格力电器股份有限公司 Energy management method and device
CN112286698A (en) * 2019-07-23 2021-01-29 北京地平线机器人技术研发有限公司 Remote procedure call method and device and remote procedure call execution method
CN112888024A (en) * 2019-11-29 2021-06-01 腾讯科技(深圳)有限公司 Data processing method, data processing device, storage medium and electronic equipment
CN112888024B (en) * 2019-11-29 2023-03-21 腾讯科技(深圳)有限公司 Data processing method, data processing device, storage medium and electronic equipment
CN111064782A (en) * 2019-12-12 2020-04-24 腾讯科技(深圳)有限公司 Method and device for transmitting data, electronic equipment and storage medium
CN111064782B (en) * 2019-12-12 2021-09-03 腾讯科技(深圳)有限公司 Method and device for transmitting data, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN104184672A (en) Method and device of transmitting message
CN105450289A (en) Multichannel Beidou satellite communication method
CN103986966A (en) System and method for pushing intelligent television images to mobile terminal for display
CN111262876B (en) Data processing method, device and equipment based on block chain and storage medium
CN103346800B (en) A kind of data compression method and device
CN110958024A (en) Serial port data encoding method and device, embedded device and communication system
CN104272774B (en) System and method for handling encoded data stream
CN103532564A (en) Two-dimensional code data encoding method, decoding method, system and intelligent device
CN110298896A (en) Picture code-transferring method, device and electronic equipment
CN106209942B (en) Data compression transmission method and system, terminal and server thereof
CN103674013A (en) Public transportation navigation system and method for blindmen
CN102131161B (en) Method, device and system for encoding short message
CN103595415A (en) Coding method, decoding method, coding system and decoding system
CN105139683A (en) Road condition information pushing method and device
CN104184545A (en) Method for data transmission, and decoding terminal and coding terminal
CN104270223A (en) Message transmitting method and device
WO2018090953A1 (en) On-board terminal, terminal, vehicle information transmitting and collecting method
CN113014551B (en) Data decompression method, data transmission method based on data decompression method, computer device and readable storage medium
CN114495081A (en) Text recognition method and device, readable medium and electronic equipment
CN103139757B (en) A kind of data transmission system of application program for mobile terminal is unified method
CN110851155A (en) Method and device for changing theme colors of set top box interface
CN111010366A (en) Data transmission method and system based on reverse isolation technology
CN113490165B (en) 4G module short message receiving and transmitting method for embedded system
KR20170004292A (en) Map information providing devices using image code
EP4141731A1 (en) Semantic communication for low bit rate applications

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20141203

RJ01 Rejection of invention patent application after publication