CN101938719A - Method for coding and decoding short messages (SMS), device and terminal - Google Patents

Method for coding and decoding short messages (SMS), device and terminal Download PDF

Info

Publication number
CN101938719A
CN101938719A CN2010102758186A CN201010275818A CN101938719A CN 101938719 A CN101938719 A CN 101938719A CN 2010102758186 A CN2010102758186 A CN 2010102758186A CN 201010275818 A CN201010275818 A CN 201010275818A CN 101938719 A CN101938719 A CN 101938719A
Authority
CN
China
Prior art keywords
coding
note
module
national
gsm7
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
CN2010102758186A
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.)
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 CN2010102758186A priority Critical patent/CN101938719A/en
Priority to PCT/CN2010/079351 priority patent/WO2012027932A1/en
Publication of CN101938719A publication Critical patent/CN101938719A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/58Message adaptation for wireless communication

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a method for coding and decoding short messages (SMS), a device and a terminal. The method comprises the following steps: setting the SMS into a universal multiple-octet coded character set UCS2 format; identifying the coded format of each character in the SMS set as the UCS2 format; and coding the SMS with a preset coded format when all the characters in the SMS can be identified by the same preset coded format. In the invention, the availability of the terminal can be improved.

Description

Short message encoding coding/decoding method, device and terminal
Technical field
The present invention relates to the communications field, in particular to a kind of short message encoding coding/decoding method, device and terminal.
Background technology
Short message is the basic service that mobile communcations system offers the user, and this service can make and transmit text or multimedia document etc. between the portable terminal mutually.Wherein, the Short Message Service of transmitting content of text is used wider.The content of text that transmits between portable terminal and short message service center by mobile communication network must carry out Code And Decode.Third generation partner program (3rd Generation Partnership Project, abbreviate 3GPP as) agreement 23.038 regulations, the coding of short message text content has three kinds of forms, global mobile communication (Globalsystem for Mobile Communication, abbreviate GSM as) 7 codings, 8 codings, general multibyte coded character set (Universal Multiple-Octet CodedCharacter Set abbreviates UCS as) 2 codings.
The GSM7 coding uses 7 binary digits to represent a character, and the max number of characters that can represent is 127, is used for the less language of character such as English.The UCS2 coding uses 16 binary digits to represent a character, is a kind of form of Unicode, and the max number of characters that can represent is 65536, is used to represent the more language of character such as Chinese.The number of characters that also has some language is less times greater than 127, can not use GSM7, if but use UCS2, compare wasting space again, because according to 3GPP agreement 23.040 regulations, the maximum length that single sends is 140 bytes, adopts the words of UCS2 coding, the content that single sends adopts GSM7 position coding to lack more than half, so can use this time 8 codings of ISO definition to send.Adopt 8 to be coded in the short message text coding uncommonly, commonly, these countries can define the GSM7 code table voluntarily, and the acquiescence GSM7 code table of alternative still uses GSM7 position coding, for example Greece.Also have a kind of situation, 20.038 li national language extension mechanisms that also defined a kind of GSM7 of 3GPP agreement can be used to solve number of characters the GSM7 coding of many language, for example Turkish, Spanish, Portuguese etc. slightly.
In the prior art, support the terminal (for example, mobile phone, fixed station or data card) of SMS all only to support English and native language bilingual coding.So just may cause going wrong.For example, when end product need be when certain country delivers, just must change the short message module of software, to support local speech encoding, recompilate software or revise configuration in order to support local speech encoding need revise code table, so just increase software customized difficulty, also increased the probability of makeing mistakes, also needed more time to be used for software customized simultaneously and test; Again for example, for the user who often goes abroad, changes the spoken and written languages environment, because terminal can only be supported bilingual, cause in roam procedure, the user can't normally receive and dispatch the note of local language.
Summary of the invention
Main purpose of the present invention is to provide a kind of short message encoding decoding scheme, to address the above problem at least.
According to an aspect of the present invention, provide a kind of short message coding method, having comprised: note is set to general multibyte coded character set UCS2 form; Each character in the note that is set to the UCS2 form is carried out coded format identification; Under the situation that all characters in note all can be discerned by same predictive encoding form, use the predictive encoding form that note is encoded.
Further, after use predictive encoding form is encoded to note, also comprise: the maximum length of determining the maximum short message text that the predictive encoding form is supported according to the predictive encoding form; Surpass under the situation of maximum length in note, note is split as the cascade note.
Further, the predictive encoding form is one of following: global mobile communication GSM7 coding, 8 codings, UCS2 encode, wherein, GSM7 is encoded to one of following: GSM7 standard code, national custom coding, third generation partner program 3GPP national language extended coding.
Further, after each character in the note being carried out coded format identification, note is kept in the short message text buffering area array; Short message reading from short message text buffering area array, and use the predictive encoding form that note is encoded.
According to another aspect of the present invention, provide a kind of decoding short message method, this method comprises: the coded format that receives note and definite note; Use the codec format corresponding that note is decoded with coded format.
Further, the coded format of determining note comprises: obtain the information that is used to indicate coded format of carrying in the note; Determine the coded format of note according to information.
Further, the coded format of determining note comprises: each character in the note is carried out coded format identification; Under the situation that all characters in note all can be discerned by same predictive encoding form, determine that the predictive encoding form is the coded format of note.
Further, the predictive encoding form is one of following: global mobile communication GSM7 coding, 8 codings, UCS2 encode, and wherein, it is one of following that GSM7 is encoded to: GSM7 standard code, national custom coding, 3GPP national language extended coding.
Further, in the coded format of determining note is under the situation of 8 codings or national custom coding, after the use codec format corresponding with coded format decoded to note, also comprise: write down 8 codings of this use or the national codec format of national custom coding correspondence, and after receiving the note that 8 of uses are encoded or national custom coding is encoded, the national codec format of service recorder is decoded to note next time.
According to another aspect of the present invention, provide a kind of short message encoding device, this device comprises: the coded system identification module is used for each character of the note that is set to the UCS2 form is carried out coded format identification; Under the situation that coding module, all characters in note all can be discerned by same predictive encoding form, use the predictive encoding form that note is encoded.
Further, coding module comprises: GSM7 standard code module is used to use the GSM7 standard coding format that note is encoded; Country's custom coding module is used to use national custom coding form that note is encoded; 3GPP national language extended coding module is used to use 3GPP national language extended coding form that note is encoded; 8 coding modules are used to use 8 coded formats that note is encoded; And the UCS2 coding module, be used to use the UCS coding module that note is encoded.
According to another aspect of the present invention, provide a kind of decoding short message device, this device comprises: the decoding process identification module is used to determine the coded format of the note that receives; Decoder module is used to use the codec format corresponding with coded format that note is decoded.
Further, decoder module comprises: GSM7 standard decoder module is used to use the GSM7 standard coding format that note is decoded; The self-defined decoder module of country is used to use national custom coding form that note is decoded; 3GPP national language expansion decoder module is used to use 3GPP national language extended coding form that note is decoded; 8 decoder modules are used to use 8 coded formats that note is decoded; And the UCS2 decoder module, be used to use the UCS coding module that note is decoded.
According to another aspect of the present invention, provide a kind of terminal, this terminal comprises said short message code device and/or said short message decoding device.
By the present invention, adopt note to be set to the UCS2 form; Each character in this note is carried out coded format identification, under the situation that all characters in this note all can be discerned by same predictive encoding form, use this predictive encoding form that note is encoded.Solve the terminal of supporting SMS in the prior art and only supported English and native language bilingual coding might cause the problem that occurs, and then improved the availability of terminal.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute improper qualification of the present invention.In the accompanying drawings:
Fig. 1 is the flow chart according to the short message coding method of the embodiment of the invention;
Fig. 2 is the flow chart according to the decoding short message method of the embodiment of the invention;
Fig. 3 is the structured flowchart according to the short message encoding device of the embodiment of the invention;
Fig. 4 is the structured flowchart according to the decoding short message device of the embodiment of the invention;
Fig. 5 is the flow chart according to the preferred short message coding method of the embodiment of the invention;
Fig. 6 is the flow chart that becomes the GSM7 coding according to the UCS2 code conversion of the embodiment of the invention;
Fig. 7 is the flow chart that changes into 8 codings according to the UCS2 coding of the embodiment of the invention;
Fig. 8 is the flow chart according to the preferred decoding short message method of the embodiment of the invention;
Fig. 9 is the flow chart of supporting according to the newly-increased language of the expansion of the embodiment of the invention;
Figure 10 is the structured flowchart according to the coding/decoding system of the embodiment of the invention.
Embodiment
Hereinafter will describe the present invention with reference to the accompanying drawings and in conjunction with the embodiments in detail.Need to prove that under the situation of not conflicting, embodiment and the feature among the embodiment among the application can make up mutually.
In following enforcement, the coded format of being mentioned comprises: GSM7 coding, 8 codings, UCS2 encode, and wherein, the GSM7 coding comprises: GSM7 standard code, national custom coding, third generation partner program 3GPP national language extended coding.Certainly, if coded format increases to some extent with respect to above-mentioned several coded formats or changes, following embodiment also can be suitable for, and only needs to increase or revise corresponding coding/decoding module to get final product.
Fig. 1 is the flow chart according to the short message coding method of the embodiment of the invention, and as shown in Figure 1, this flow process comprises the steps:
Step S102, note is set to the UCS2 form;
Step S104 carries out coded format identification to each character in the note that is set to the UCS2 form;
Under the situation that step S106, all characters in note all can be discerned by same predictive encoding form, use the predictive encoding form that note is encoded.
Wherein, the predictive encoding form is one of following: global mobile communication GSM7 coding, 8 codings, UCS2 encode, wherein, GSM7 is encoded to one of following: GSM7 standard code, national custom coding, third generation partner program 3GPP national language extended coding.
In above-mentioned steps, by the character in the note being carried out identification one by one, determine the coded format that can both encode to all characters, use this coded format to encode then.The form that just short message encoding is supported by so automatic identifying sends then, can solve the terminal of supporting SMS in the prior art and only support English and native language bilingual coding might cause the problem that occurs.For example, the short message encoding mechanism that has overcome the country variant that exists in the prior art is inconsistent, one cover software is difficult to adaptive All Countries, thereby in the time of each releasing software, problem and the defectives that must make amendment and dispose the note relevant portion all can be automatically carried out adaptive to the short message encoding of various national languages.
Preferably, when implementing, after determining to the employed coded format of this note, can determine the maximum length of the maximum short message text that the predictive encoding form is supported according to the predictive encoding form, if the note behind the coding has surpassed maximum length, can point out, also this note can be split as the cascade note.
Preferably, when implementing, can use array to cushion, can certainly adopt the mode of other buffering.Be that example describes below with the array.After each character in the note being carried out coded format identification, just note is kept in the short message text buffering area array; Short message reading from short message text buffering area array, and use the predictive encoding form that note is encoded.
Preferably, after note is encoded, can in the note behind this coding, carry the information that is used to indicate this short message encoding mode, decode so that carry out the recipient.
Fig. 2 is the flow chart according to the decoding short message method of the embodiment of the invention, and as shown in Figure 2, this flow process comprises the steps:
Step S202 receives the coded format that note is also determined note;
Step S204 uses the codec format corresponding with coded format that note is decoded.
By above-mentioned step, can discern the coded format of note, thereby this note is carried out correct decoding.
When implementing,, so, obtain the information that is used to indicate coded format of carrying in the note if carried the information that is used to indicate this short message encoding form in the note; Determine the coded format of note according to this information.Certainly, transmit leg also can not send the information that is used to indicate coded format, at this moment, can carry out coded format identification to each character in the note; Under the situation that all characters in note all can be discerned by same predictive encoding form, determine that the predictive encoding form is the coded format of note.
Preferably, when implementing, in the coded format of determining note is under the situation of 8 codings or national custom coding, after the use codec format corresponding with coded format decoded to note, can also write down 8 codings of this use or the national codec format of national custom coding correspondence, and after receiving the note that 8 of uses are encoded or national custom coding is encoded, the national codec format of service recorder is decoded to note next time.
Fig. 3 is the structured flowchart according to the short message encoding device of the embodiment of the invention, and as shown in Figure 3, this device comprises: coded system identification module 32, coding module 34 are explained below.
Coded system identification module 32 (or abbreviating the code identification module as) is used for each character of the note that is set to the UCS2 form is carried out coded format identification; Coding module 34 is connected to coded system identification module 32, under the situation that all characters in note all can be discerned by same predictive encoding form, uses the predictive encoding form that note is encoded.
When implementing, this coding module 34 can comprise: GSM7 standard code module is used to use the GSM7 standard coding format that note is encoded; Country's custom coding module is used to use national custom coding form that note is encoded; 3GPP national language extended coding module is used to use 3GPP national language extended coding form that note is encoded; 8 coding modules are used to use 8 coded formats that note is encoded; And the UCS2 coding module, be used to use the UCS coding module that note is encoded.
Fig. 4 is the structured flowchart according to the decoding short message device of the embodiment of the invention, and as shown in Figure 4, this device comprises: decoding process identification module 42, decoder module 44 are explained below.
Decoding process identification module 42 (or abbreviate as decoding identification module) is used to determine the coded format of the note that receives; Decoder module 44 is connected to decoding process identification module 42, is used to use the codec format corresponding with coded format that note is decoded.
When implementing, decoder module 44 can comprise: GSM7 standard decoder module is used to use the GSM7 standard coding format that note is decoded; The self-defined decoder module of country is used to use national custom coding form that note is decoded; 3GPP national language expansion decoder module is used to use 3GPP national language extended coding form that note is decoded; 8 decoder modules are used to use 8 coded formats that note is decoded; And the UCS2 decoder module, be used to use the UCS coding module that note is decoded.
Need to prove that coding/decoding module can increase according to the actual needs to be revised or deletion.
Fig. 5 is the flow chart according to the preferred short message coding method of the embodiment of the invention, and as shown in Figure 5, this flow process comprises the steps:
Step S501 is UCS2 with the encoding setting of note input text frame.
Step S502, user import the text that will send in note input text frame.For what characters the prompting user has imported now, send how many bar notes altogether, behind character of every input, all to call the code identification module, judge the purpose coded format.
Step S503, the user creates a short message text buffering area array after clicking " transmission " button, and length is 160 Int type data.The reason of doing like this is that the each maximum length that sends of note is 160 characters.Obtain the character in the text box, the character in the text box is copied in the text buffer district array.
Step S504 constructs a note data structure, is used for process control.
Step S505, text buffer district array is scanned, judge whether note is the cascade note, the bar number of cascade, the foundation of judging the cascade note is: if alphabet all is GSM7 acquiescence code character or GSM7 extended code character, surpassing 160 characters is the cascade note, and the length of wall scroll is 153 in the cascade.If having a character is the UCS2 code character, surpassing 70 characters is the cascade note, and the length of wall scroll is 67 in the cascade.If alphabet does not contain the UCS2 code character, but comprise national extended code character, then surpassing 155 characters is the cascade note, and the length of cascade mid point bar is 149.These two data are write the note data structure.
Step S506 if the short message encoding type is 7, then begins to change according to Fig. 6, and the UCS2 code conversion of each character in the text buffer district is become the GSM7 coding.
Step S507 if the short message encoding type is UCS2, does not then need conversion.Still keep the UCS2 coding.
Step S508, if the short message encoding type is 8, then calling graph 7 begins conversion, and the UCS2 code conversion of each character in the text buffer district is become 8 codings.
Step S509 takes the cascade note apart, the cascade note in the text buffer district, according to the maximum length that wall scroll can send, takes apart, successively content is passed to the note transmitting system.
Fig. 6 is the flow chart that becomes the GSM7 coding according to the UCS2 code conversion of the embodiment of the invention, and as shown in Figure 6, this flow process comprises the steps:
Step S601 reads in a UCS2 character in the text buffer district.
Step S602, step S502 can inform which kind of GSM7 position coding this UCS2 character will be encoded into.
Step S603 if weave into GSM7 acquiescence sign indicating number, then calls GSM7 acquiescence coding/decoding resume module.
Step S604 if weave into the GSM7 extended code, then calls GSM7 expansion coding/decoding module.
Step S605 if weave into national extended code, then calls 3GPP national language expansion coding/decoding module.Code value is made up of two encoded radios, and first is the fixing position 0x1b that indicates, and the lookup method of second code value divides Single Shift and Lock Shift two kinds.
Step S606 if weave into national self-defined GSM7 sign indicating number, then calls national self-defined coding/decoding module.
Step S607, repeating step S401-step S406, all characters in the text buffer district are all changed and are finished.
Fig. 7 is the flow chart that changes into 8 codings according to the UCS2 coding of the embodiment of the invention, and as shown in Figure 7, this flow process comprises the steps:
Step S701 reads in a UCS2 character from the text buffer district.
Step S702 in the national language file, reads the coding schedule of the country of 8 characters of use that defined at present respectively.Concrete logic data structure is a Hash table.
Step S703 searches the UCS2 character in the step S701 in the coding Hash table, if find, just use corresponding Hash tabular value (8 codings) to substitute original UCS2 value.
Step S704 returns step S701, and all characters in the text buffer district are all changed and finished.
Fig. 8 is the flow chart according to the preferred decoding short message method of the embodiment of the invention, and as shown in Figure 8, this flow process comprises the steps:
Step S801, note PDU string to be decoded imports system into.
Step S802 calls the decoding identification module and judges the purpose codec format.
Step S803 is if 8 codings then call 8 national identification modules of coding and continue which country identification is.
Step S804 is if national language custom coding or standard GSM7 coding then call GSM7 standard and national self-defined expansion identification module continuation identification.
Step S805, structure note data structure.
Step S806 is if standard GSM7 coding/decoding module is then called in the standard of employing GSM7 decoding.
Step S807 if adopt 8 coding and decodings, then calls 8 coding/decoding modules.
Step S808 if adopt the UCS2 coding, then calls the UCS2 decoder module, is exactly to keep coding constant in fact.
Step S809 if adopt 3GPP national language extended coding, then calls 3GPP national language expansion coding and decoding module.
Step S810 if adopt national self-defined GSM7 coding, then calls national self-defined coding/decoding module decoding.
Step S811, decoded text is put into the note data structure, and the cascade note is then spliced.
Fig. 9 is the flow chart of supporting according to the newly-increased language of the expansion of the embodiment of the invention, and as shown in Figure 9, this flow process comprises the steps:
Step S901 obtains information, 8 codings that this national language coding uses, 3GPP national language extended coding, still national custom coding.
Step S902 if use is 8 codings, then makes 8 coding/decoding list files of this country, puts into 8 bit code list files folder down, for 8 coding/decoding module invokes.Make 8 codings and judge array file, put under the determination number group folders, call for the national language identification module.
Step S903 if use is national custom coding, then makes the self-defined GSM7 coding/decoding list file of this country, puts into national self-defined GSM7 codes table file underedge.Make national custom coding and judge array file, put under the determination number group folders, call for the national language identification module.
Step S904 if use is the expansion of 3GPP national language, then makes the Single Shift coding/decoding table and the Lock Shift coding/decoding table of this national 3GPP national language expansion, puts into 3GPP national language extended code list file folder down.Make the expansion of 3GPP national language and judge array, put under the determination number group folders, call for the national language identification module.
In another embodiment, also provide a kind of terminal, having comprised: above-mentioned short message encoding device and/or above-mentioned decoding short message device.Below a preferred terminal embodiment is described.
This terminal comprises: standard GSM7 coding/decoding module, and the UCS2 coding/decoding module, these modules can use existing hardware or software module to realize.
This terminal also comprises: 3GPP national language expansion coding and decoding module, and 8 coding/decoding modules, these two modules can load new code table automatically to realize the support to newly-increased language in the present embodiment.
In the following description short message encoding is divided into two processes: coded system identification, coding.Decoding short message is divided into two processes: decoding process identification, decoding.
The effect of present embodiment each module in the process of short message encoding is as follows:
Need the short message text of coding to enter system with the transmission of UCS2 (Unicode) form.
The coded system identification module reads in the judgement array, and the purpose coded format of the text is discerned.This identification once travels through, and has only each character in this short message text that is:, when all being identified as certain coded format, can think that just the target code form of whole text is certain form.
Need employing standard GSM7 coding if the coded system identification module identifies, then call standard GSM7 coding/decoding module; Need to adopt 3GPP national language extended coding if the coded system identification module is judged, then call the self-defined coding/decoding module of 3GPP country; Need to adopt national self-defined GSM7 position coding if the coded system identification module is judged, then call national self-defined coding/decoding module; Need to adopt 8 codings if the coded system identification module identifies, then call 8 coding/decoding modules; Need to adopt the UCS2 coding if the coded system identification module identifies, then call the UCS2 coding/decoding module.
After coding is finished, generate note PDU string, export to note and send software.
The effect of present embodiment each module in the process of decoding short message is as follows:
Need the PDU string of decoding to transmit system as input.The decoding process identification module is tentatively judged the target codec format of PDU string according to the DCS field of PDU string and the information unit of note head.Adopt the UCS2 sign indicating number if the decoding process identification module identifies, then call the decoding of UCS2 coding/decoding module.Adopt 8 bit codes if the decoding process identification module identifies, then further call 8 national identification modules of coding, this module sees service and remembers and arbitration functions, and which country 8 codings identify specifically is, calls 8 coding/decoding modules decodings then.Adopt 3GPP national language expansion GSM7 sign indicating number if the decoding process identification module identifies, then call 3GPP national language expansion coding and decoding module.If the decoding process identification module in the note header, is not found messaging format.Then further call national self-defined expansion identification module, this module sees service and remembers and arbitration functions, identifies and use the still self-defined expansion GSM7 sign indicating number of country of standard GSM7 coding.Need employing standard GSM7 coding if national self-defined expansion identification module identifies, then call the decoding of standard GSM7 coding/decoding module.Need to adopt the self-defined expansion GSM7 sign indicating number of country if national self-defined expansion identification module identifies, then call national self-defined coding/decoding module decoding.
In addition, also have operable configuration of encoding-decoding process and support module, the effect of this module is a management note data structure, and the text and the sign indicating number behind the coding that are used to carry before encoding are civilian, write down each management data, for example note head, cascaded message etc.In addition, this module also is in charge of the transmission of note data structure between each module, and the input and output of whole system.
Present embodiment has following technique effect:
1. need not recompilate software or revise any configuration item, automatically adaptive multi-lingual short message encoding.
2. extended capability is strong, does not need the recompility program just can add support to other countries' language fast.
3. proposed the mechanism of a kind of intelligent decision and memory, handled between 8 codings, the identification of national custom coding and standard GSM7 position coding.
4. saved the software customized time, improved the reliability of software, improved end-user experience at the country variant delivery.
In another embodiment, above-mentioned module also can be used as a system and exists, and Figure 10 is the structured flowchart according to the coding/decoding system of the embodiment of the invention, below in conjunction with Figure 10 this coding/decoding system is described.As shown in figure 10, this system is by the coded system identification module, the decoding process identification module, GSM7 standard and national self-defined expansion identification module, 8 national identification modules of coding, standard GSM7 coding/decoding module, 8 coding/decoding modules, UCS2 coding/decoding module, 3GPP national language expansion coding and decoding module, the self-defined coding/decoding module of country, configuration and support module are formed.
The code identification module is used for according to input character, identifies the purpose coded format of this note.For example, read in standard GSM7 default character array successively, standard GSM7 escape character (ESC) array, each national character array of 3GPP national language expansion, 8 national coding character arrays, national self-defining character array.When finding that all characters all fall in certain character array, just can confirm the purpose coded format, if there is any character in the character array, not find, just judge that the purpose coded format is the UCS2 coding.
Standard GSM7 coding/decoding module is used for the conversion between standard GSM7 sign indicating number and the UCS2 coding.
The self-defined coding/decoding module of country is used for the conversion between national self-defined GSM7 sign indicating number and the UCS2 coding.More than one of the code table of this module corresponding to different countries, has different code tables, can be written into the code table that increases newly dynamically.
The UCS2 coding/decoding module is used for the check and the transmission of UCS2 code character.
8 coding/decoding modules are used for the conversion between 8 bit codes and the UCS2 coding.According to the definition of ISO-8859,8 bit code tables are not unique, use the common 8 bit code tables that oneself is all arranged of country of alphabetic literal.This module can be written into the code table that increases newly dynamically.
3GPP national language expansion coding and decoding module is used for the conversion between 3GPP national language extended code and the UCS2 coding.The code table of this module corresponding to different countries, has different code tables more than one, can be written into the code table that increases newly dynamically.
The decoding identification module, be used for PDU string according to the needs decoding of input, judge the purpose codec format: according to the DCS field and the note header of PDU string, definition according to 3GPP agreement 23.040, judging the purpose coded format is the GSM7 coding, 8 codings, UCS2 coding, still 3GPP country extended coding enters corresponding decoder module then.Concrete which country the code table that adopts 8 codings, perhaps standard GSM7 and national self-defined expansion, this module is carefree, transfers to next two resume module.
GSM7 standard and national self-defined expansion identification module are used for standard GSM7 and national self-defined expansion identification are judged.This module has intelligent decision and memory function, for the first time according to the language setting (for example Locale under the (SuSE) Linux OS) of this machine and the coded system when sending short messages judge that comprehensively use standard GSM7 still is national self-defined decoding, the user can adjust behind the acquisition result, module judges to adopt which kind of decoding process when decoding next time with the adjustment of recording user.
8 national identification modules of coding are used for which country 8 bit code tables of concrete employing are judged.This module adopts intelligent decision and memory, for the first time the coded format of employing is comprehensively judged when decoding and should be adopted which country 8 bit code tables according to the language setting (as the Local linux system under) of this machine and when sending short messages, the user can adjust behind the acquisition result, module judges to adopt which kind of decoding process when decoding next time with the adjustment of recording user.
Configuration and support module are used to define the note data structure, receive short message content, fill in the note data structure, and be mutual with note reception/transmitting system.Definition note data structure, this structure is corresponding with the agreement of 3GPP messaging format, simultaneously, also some other program is realized the data field that needs.This note data structure is embodied as can hold whole cascade note.
In sum, by each above-mentioned embodiment, can support multi-lingual note encoding and decoding simultaneously, this system's support is all known coded formats at present, can be according to user's input and the short message content that receives, automatically the coding form of the current national language of coupling is called in corresponding code table and encoding and decoding program.Simultaneously, the favorable expandability of this system can be expanded support fast to the speech encoding that does not have at present to support.For the client who often goes abroad, use the end product of the foregoing description, need not change and upgrade software, in reception that all over the world can be correct with send the note of local language.In addition, by the foregoing description, to the end product of different country's deliveries, can use same set of SMS module, reduce software customized, the difficulty of speech encoding module customization especially, also can reduce the probability of makeing mistakes, guaranteed the quality and the timing node of software product.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with the general calculation device, they can concentrate on the single calculation element, perhaps be distributed on the network that a plurality of calculation element forms, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in the storage device and carry out by calculation element, and in some cases, can carry out step shown or that describe with the order that is different from herein, perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (14)

1. a short message coding method is characterized in that, comprising:
Note is set to general multibyte coded character set UCS2 form;
Each character in the described note that is set to the UCS2 form is carried out coded format identification;
Under the situation that all characters in described note all can be discerned by same predictive encoding form, use described predictive encoding form that described note is encoded.
2. method according to claim 1 is characterized in that, after the described predictive encoding form of use is encoded to described note, also comprises:
Determine the maximum length of the maximum short message text that described predictive encoding form is supported according to described predictive encoding form;
Surpass under the situation of described maximum length in described note, described note is split as the cascade note.
3. method according to claim 1, it is characterized in that, described predictive encoding form is one of following: global mobile communication GSM7 coding, 8 codings, UCS2 encode, wherein, described GSM7 is encoded to one of following: GSM7 standard code, national custom coding, third generation partner program 3GPP national language extended coding.
4. according to each described method in the claim 1 to 3, it is characterized in that,
After each character in the described note being carried out coded format identification, described note is kept in the short message text buffering area array;
From described short message text buffering area array, read described note, and use described predictive encoding form that described note is encoded.
5. a decoding short message method is characterized in that, comprising:
Receive the coded format of note and definite described note;
Use the codec format corresponding that described note is decoded with described coded format.
6. method according to claim 5 is characterized in that, determines that the coded format of described note comprises:
Obtain the information that is used to indicate described coded format of carrying in the described note;
Determine the coded format of described note according to described information.
7. method according to claim 5 is characterized in that, determines that the coded format of described note comprises:
Each character in the described note is carried out coded format identification;
Under the situation that all characters in described note all can be discerned by same predictive encoding form, determine that described predictive encoding form is the coded format of described note.
8. according to each described method in the claim 5 to 7, it is characterized in that, described predictive encoding form is one of following: global mobile communication GSM7 coding, 8 codings, UCS2 encode, wherein, described GSM7 is encoded to one of following: GSM7 standard code, national custom coding, 3GPP national language extended coding.
9. method according to claim 8, it is characterized in that, in the coded format of determining described note is under the situation of 8 codings or national custom coding, after the use codec format corresponding with described coded format decoded to described note, also comprises:
Write down 8 codings of this use or the national codec format of national custom coding correspondence, and after receiving the note that 8 of uses are encoded or national custom coding is encoded, use the national codec format of described record that described note is decoded next time.
10. a short message encoding device is characterized in that, comprising:
The coded system identification module is used for each character of the note that is set to the UCS2 form is carried out coded format identification;
Under the situation that coding module, all characters in described note all can be discerned by same predictive encoding form, use described predictive encoding form that described note is encoded.
11. device according to claim 10 is characterized in that, described coding module comprises:
GSM7 standard code module is used to use the GSM7 standard coding format that described note is encoded;
Country's custom coding module is used to use national custom coding form that described note is encoded;
3GPP national language extended coding module is used to use 3GPP national language extended coding form that described note is encoded;
8 coding modules are used to use 8 coded formats that described note is encoded; And
The UCS2 coding module is used to use the UCS coding module that described note is encoded.
12. a decoding short message device is characterized in that, comprising:
The decoding process identification module is used to determine the coded format of the note that receives;
Decoder module is used to use the codec format corresponding with described coded format that described note is decoded.
13. device according to claim 12 is characterized in that, described decoder module comprises:
GSM7 standard decoder module is used to use the GSM7 standard coding format that described note is decoded;
The self-defined decoder module of country is used to use national custom coding form that described note is decoded;
3GPP national language expansion decoder module is used to use 3GPP national language extended coding form that described note is decoded;
8 decoder modules are used to use 8 coded formats that described note is decoded; And
The UCS2 decoder module is used to use the UCS coding module that described note is decoded.
14. a terminal is characterized in that, comprising: each described decoding short message device in each described short message encoding device and/or the right 12 to 13 in the claim 10 to 11.
CN2010102758186A 2010-09-03 2010-09-03 Method for coding and decoding short messages (SMS), device and terminal Pending CN101938719A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN2010102758186A CN101938719A (en) 2010-09-03 2010-09-03 Method for coding and decoding short messages (SMS), device and terminal
PCT/CN2010/079351 WO2012027932A1 (en) 2010-09-03 2010-12-01 Method, equipment and terminal for encoding/decoding short message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010102758186A CN101938719A (en) 2010-09-03 2010-09-03 Method for coding and decoding short messages (SMS), device and terminal

Publications (1)

Publication Number Publication Date
CN101938719A true CN101938719A (en) 2011-01-05

Family

ID=43391804

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010102758186A Pending CN101938719A (en) 2010-09-03 2010-09-03 Method for coding and decoding short messages (SMS), device and terminal

Country Status (2)

Country Link
CN (1) CN101938719A (en)
WO (1) WO2012027932A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158832A (en) * 2011-04-22 2011-08-17 中兴通讯股份有限公司 Method and device for self-adaptively coding short message
CN102665184A (en) * 2012-04-24 2012-09-12 中兴通讯股份有限公司 Coding method and device for increasing short message utilization rate
CN103327459A (en) * 2012-03-23 2013-09-25 宇龙计算机通信科技(深圳)有限公司 Method and system for sharing short messages and multimedia messages, and mobile terminal
WO2015117407A1 (en) * 2014-08-26 2015-08-13 中兴通讯股份有限公司 Processing method and device for terminal information
CN104994486A (en) * 2015-06-23 2015-10-21 中国联合网络通信集团有限公司 Point-to-point short-message transmitting and receiving method and system
CN105634674A (en) * 2016-01-12 2016-06-01 青岛海信移动通信技术股份有限公司 Short message processing method and device
CN106604246A (en) * 2016-12-09 2017-04-26 惠州Tcl移动通信有限公司 Method and system for setting the short message coding range based on national codes and mobile terminal
CN108091354A (en) * 2017-12-13 2018-05-29 深圳市沃特沃德股份有限公司 Onboard system lyrics analysis method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1816170A (en) * 2005-11-08 2006-08-09 杭州华为三康技术有限公司 Code-conversion method for shortmessage receiving and transmitting and network apparatus used thereof
CN101047733A (en) * 2006-06-16 2007-10-03 华为技术有限公司 Short message processing method and device
US20080013712A1 (en) * 2006-07-11 2008-01-17 Karsten Gopinath Unified Communication Directory Service

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7489703B2 (en) * 2002-12-20 2009-02-10 Motorola, Inc. Apparatus and method for a coding scheme selection
EP1943585A4 (en) * 2005-10-31 2010-01-06 Fontip Ltd Sending and receiving text messages using a variety of fonts

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1816170A (en) * 2005-11-08 2006-08-09 杭州华为三康技术有限公司 Code-conversion method for shortmessage receiving and transmitting and network apparatus used thereof
CN101047733A (en) * 2006-06-16 2007-10-03 华为技术有限公司 Short message processing method and device
US20080013712A1 (en) * 2006-07-11 2008-01-17 Karsten Gopinath Unified Communication Directory Service

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158832A (en) * 2011-04-22 2011-08-17 中兴通讯股份有限公司 Method and device for self-adaptively coding short message
CN103327459A (en) * 2012-03-23 2013-09-25 宇龙计算机通信科技(深圳)有限公司 Method and system for sharing short messages and multimedia messages, and mobile terminal
CN102665184A (en) * 2012-04-24 2012-09-12 中兴通讯股份有限公司 Coding method and device for increasing short message utilization rate
CN102665184B (en) * 2012-04-24 2014-12-10 中兴通讯股份有限公司 Coding method and device for increasing short message utilization rate
WO2015117407A1 (en) * 2014-08-26 2015-08-13 中兴通讯股份有限公司 Processing method and device for terminal information
CN104994486A (en) * 2015-06-23 2015-10-21 中国联合网络通信集团有限公司 Point-to-point short-message transmitting and receiving method and system
CN104994486B (en) * 2015-06-23 2018-09-11 中国联合网络通信集团有限公司 A kind of point-to-point note receiving/transmission method and system
CN105634674A (en) * 2016-01-12 2016-06-01 青岛海信移动通信技术股份有限公司 Short message processing method and device
CN106604246A (en) * 2016-12-09 2017-04-26 惠州Tcl移动通信有限公司 Method and system for setting the short message coding range based on national codes and mobile terminal
CN106604246B (en) * 2016-12-09 2020-08-11 惠州Tcl移动通信有限公司 Method, system and mobile terminal for setting short message coding range based on country code
CN108091354A (en) * 2017-12-13 2018-05-29 深圳市沃特沃德股份有限公司 Onboard system lyrics analysis method and device

Also Published As

Publication number Publication date
WO2012027932A1 (en) 2012-03-08

Similar Documents

Publication Publication Date Title
CN101938719A (en) Method for coding and decoding short messages (SMS), device and terminal
KR100617237B1 (en) Method for generating multimedia event using Short Message Service
CN101854602B (en) Method for transmitting and receiving multimedia information and terminal
EP1457068B8 (en) A method of and apparatus for handling messages in a mobile communications environment
CN100461885C (en) System and method for sending short text messages in mobile communication systems
US20050251848A1 (en) Multimedia message delivery optimisation
WO2008022433A1 (en) Text messaging system and method employing predictive text entry and text compression and apparatus for use therein
EP1941685A1 (en) Delta code messaging
CN101815265B (en) Widget information transmission method and widget information transmission system
CN101621763A (en) Method and corresponding device for displaying sender Chinese name at mobile phone terminal
EP1262931A1 (en) Improvements in text messaging
CN100373962C (en) Shortmessage cluster sending method and platform therefor
CN100394812C (en) Method of transmitting multimedia short message
EP2076070B1 (en) Providing Transparent CDMA short message service using non-CDMA mobile devices, smart cards and networks
CN102970661A (en) Method and device for code conversion of short messages
US20080070607A1 (en) Apparatus and method for transmitting/receiving binary data in short message system
US7224990B2 (en) Method for transferring a message in a predetermined sending time and related communication system thereof
CN114222258B (en) Method for realizing multimedia message communication between 5G message mobile phone and Beidou terminal
CN103685665A (en) Sending method and device for text contents
CN102487493B (en) Short message processing method and international intercommunication gateway
CN113490165B (en) 4G module short message receiving and transmitting method for embedded system
CN101583103A (en) Transmitting or receiving method of short messages in text mode and device
KR100661583B1 (en) A mobile communication terminal having a function of transmitting sms message including unicode and the method thereof
TW200528996A (en) Method for transferring text messages in text mode
KR100736549B1 (en) System and method for multimedia message service

Legal Events

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

Application publication date: 20110105