WO2011017927A1 - 短信编码处理方法、装置及系统 - Google Patents

短信编码处理方法、装置及系统 Download PDF

Info

Publication number
WO2011017927A1
WO2011017927A1 PCT/CN2010/071578 CN2010071578W WO2011017927A1 WO 2011017927 A1 WO2011017927 A1 WO 2011017927A1 CN 2010071578 W CN2010071578 W CN 2010071578W WO 2011017927 A1 WO2011017927 A1 WO 2011017927A1
Authority
WO
WIPO (PCT)
Prior art keywords
character
foreign
short message
special character
module
Prior art date
Application number
PCT/CN2010/071578
Other languages
English (en)
French (fr)
Inventor
畅博
齐迅
霰毅
李惠斌
王伟
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2011017927A1 publication Critical patent/WO2011017927A1/zh

Links

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
    • 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/06Message adaptation to terminal or network requirements
    • H04L51/066Format adaptation, e.g. format conversion or compression

Definitions

  • Short message coding processing method short message coding processing method, device and system
  • the present invention relates to the field of communications, and in particular, to a short message encoding processing method, device and system. Background technique
  • SMS Short Messaging Service
  • users for its simple and convenient use, and is rapidly becoming popular. Through this service, mobile phones can send and receive text messages to each other, and the content is mainly text, digital or binary non-text data.
  • the single length of SMS is limited to 140 bytes.
  • SMS in mobile communication has been used more and more frequently in internal communication and business cooperation among multinational companies.
  • SMS-based services With the continuous expansion of SMS-based services and penetration into various industries. Continuously deepening, the services are more closely linked to the lives of the people, and the concept of information consumption is exposed to the surface and gradually accepted by users.
  • some problems that hinder business development also arise. For example, users often need to input some special characters of foreign languages, such as ⁇ , ⁇ , ⁇ , etc., in this case, in this case, SMS content input
  • the maximum number of characters is only 70 bytes, which is half of the maximum length of a typical short message.
  • the probability of occurrence of the above special characters in the short message content is small, and the proportion in the short message content is also small. If the content of the short message is encoded by the UCS2 method only because of few special characters, the result is SMS content of more than 70 characters must be split into two SMS messages to send, which increases SMS storage cost and SMS cost, and reduces SMS reading. The user experience of the reader. Summary of the invention
  • the present invention has been made in view of the problem of increasing the cost and cost of short message storage caused by the fact that a short message containing a foreign text special character cannot be encoded by using the GSM7 encoding method in the prior art.
  • the main object of the present invention is to provide a short message.
  • the encoding processing method, apparatus and system solve the above problems in the prior art.
  • a short message encoding processing method is provided.
  • the method according to the present invention includes: the content of the short message includes a foreign text special character and a general character, and searches for a foreign text special character in the short message according to the pre-established special character table; and replaces the foreign text special character according to the preset replacement rule;
  • the general characters and the replaced foreign text special characters are encoded in GSM7 encoding to store or send text messages.
  • the foreign text special character is replaced according to the preset replacement rule, further comprising: replacing the foreign language special character by the following three characters: a flag bit, a base character, a phonetic symbol, wherein the base character is a foreign character special character, and the phonetic symbol is removed.
  • Basic foreign character the phonetic symbol is used to indicate the phonetic symbol of a special character.
  • the method for reading the short message further comprises: decoding the short message by using the GSM7 decoding method; searching for the identification bit in the decoded short message, and restoring the base character and the phonetic symbol bit after the identification bit to the foreign text special character.
  • a short message encoding processing apparatus is also provided.
  • the device includes: a search module, configured to search for a foreign text special character in a short message according to a pre-established special character table, wherein the content of the short message includes: a special character and a general character; and a replacement module, configured according to the preset The replacement rule replaces the foreign text special character; the encoding module is used to encode the general character in the short message and the replaced foreign text special character in the GSM7 encoding mode.
  • the replacement module is further configured to replace the foreign language special characters by the following three characters: The identification bit, the base character, and the phonetic symbol, wherein the base character is a foreign language special character and the basic foreign language character after the phonetic symbol is removed, and the phonetic symbol is used to represent the phonetic symbol of the special character.
  • a short message decoding processing apparatus is also provided.
  • the device includes: a decoding module, configured to decode a short message by using a GSM7 decoding method, where the content of the short message includes: a special character and a general character; and a restoration processing module, configured to find in the short message decoded by the decoding module
  • the flag is set, and the two characters after the flag are restored to foreign characters, wherein the two characters after the flag are the base character and the phonetic symbol, and the base character is a foreign character, and the basic foreign character after the phonetic symbol is removed, the phonetic position A phonetic symbol used to represent special characters.
  • a short message processing system is also provided.
  • the system includes: an encoding processing device, comprising: a searching module, configured to search for a foreign text special character in a short message according to a pre-established special character table, wherein the content of the short message comprises: a special character and a general character; , for replacing foreign language special characters by the following three characters: a flag bit, a base character, a phonetic bit position, wherein the base character is a foreign language special character and the basic foreign language character after the phonetic symbol is removed, and the phonetic symbol bit is used to represent the phonetic symbol of the special character; , used to encode the general characters in the short message and the replaced foreign text special characters by GSM7 encoding.
  • a decoding processing device comprising: a decoding module, configured to decode the short message by using a GSM7 decoding method; and a restoration processing module, configured to find the identification bit in the short message decoded by the decoding module, and restore the two characters after the identifier bit Special characters for foreign languages.
  • the short message including the foreign text special character can be encoded by the GSM7 encoding method, and the short message encoding is improved.
  • the length thus saving the cost and cost of SMS storage.
  • FIG. 1 is a flowchart of a short message encoding processing method according to an embodiment of the present invention
  • 2 is a flow chart of a method for storing foreign text special characters according to an embodiment of the present invention
  • FIG. 3 is a flow chart of a method for reading foreign text special characters according to an embodiment of the present invention
  • FIG. 4 is a short message encoding processing device according to an embodiment of the present invention
  • FIG. 5 is a structural block diagram of a short message decoding processing apparatus according to an embodiment of the present invention.
  • FIG. 6 is a structural block diagram of a short message processing system in accordance with an embodiment of the system of the present invention. detailed description
  • the main idea of the present invention is mainly to pre-establish a foreign-language special character form, and for the edited content of the short message, judge whether the character contained in the input information contains a foreign-language special character, if the foreign-language special character is included and the foreign-text special character is removed from the short message.
  • the encoding method is encoded by the GSM7 encoding method, and the foreign character special characters are replaced and then encoded by the GSM7 encoding method to store or send the short message.
  • the invention replaces the characters that cannot be directly encoded by the GSM7 encoding method, so that the entire short message can be encoded by the GSM7 encoding method, which improves the encoding length of the short message and saves the cost and cost of the short message storage.
  • a short message encoding processing method is proposed.
  • 1 is a flowchart of a short message encoding processing method according to an embodiment of the present invention.
  • the processing includes: Step S102: Searching for a foreign text special character in a short message according to a pre-established special character table; Step S104, The foreign text special character is replaced according to the preset replacement rule; in step S106, the general character in the short message and the replaced foreign text special character are encoded in the GSM7 encoding manner to store or send the short message.
  • a special character table needs to be created.
  • the special characters in the table are characters that cannot be encoded by the GSM7 encoding method, and the special characters are general foreign characters plus phonetic symbols, refer to Table 1, in the special character table.
  • Special characters include, but are not limited to, the characters shown in Table 1.
  • the foreign character special character is replaced by the following three characters: the identifier bit, the base character, and the phonetic symbol, wherein the base character is a foreign character special character and the basic character is removed.
  • Foreign characters, phonetic symbols are used to indicate the phonetic symbols of special characters.
  • the flag, base character and phonetic symbol of the foreign character special character can be encoded by the GSM7 encoding method. At this time, the entire message can also be encoded by the GSM7 encoding method.
  • the method when the short message is read, the method further includes: decoding the short message by using the GSM7 decoding mode; searching for the identifier bit in the decoded short message, and restoring the base character and the phonetic symbol bit after the identifier bit to the foreign text special character.
  • This process can be considered as the inverse of the above replacement process.
  • the application scenario of the present invention requires the support of three entities: a wireless terminal device (wireless terminal device), typically a wireless USB MODEM, a wireless data card, a mobile phone, etc., hereinafter collectively referred to as a terminal device;
  • the application is typically a human-computer interface (UI, User Interface) installed on a personal computer or a desktop computer in conjunction with a terminal device such as a mobile phone, a wireless data card, or a USB MODEM;
  • the entity 3 is various card resources, for example : User Identity Model (UIM) card, Subscriber Identity Module (SIM, Subscriber Identity Model), Universal Subscriber Identity Module (USIM) card, etc., hereinafter referred to as card device.
  • UIM User Identity Model
  • SIM Subscriber Identity Module
  • USB Universal Subscriber Identity Module
  • FIG. 2 is a flow chart of a method for storing foreign text special characters according to an embodiment of the present invention. As shown in FIG. 2, the method includes the following steps:
  • Step S202 input SMS message content information.
  • Step S204 referring to Table 1, detecting whether the information input by the short message contains foreign language special characters according to the pre-established special character table, if not, executing step S206, otherwise performing step S208.
  • step S206 the UCS2 coding mode coding or the GSM7 coding mode coding is performed according to the information content.
  • Step S208 Except that the special character of the short message is excluded from the input information of the short message, if the encoding mode of the remaining characters is UCS2 encoding mode, the entire information is encoded by UCS2; if the encoding is GSM7 encoding mode, step S210 is performed.
  • Step S210 encoding all the special characters in the short message information, and replacing each special character by the identification bit, the base character, and the phonetic symbol, wherein the first character is a flag bit, and the second character is a base after the punctuation is removed. Characters, such as ⁇ —the third is the phonetic symbol.
  • Step S212 performing GSM7 encoding mode encoding on the replaced character and the general character.
  • Step S214 transmitting or storing the encoded information.
  • FIG. 3 is a flowchart of a method for reading a foreign text special character according to an embodiment of the present invention. As shown in FIG. 3, the method includes the following steps:
  • Step S302 reading SMS message content information.
  • Step S304 4, determining the coding mode according to the coding identifier of the short message information, and if it is GSM7 coding, executing step S306, otherwise performing step S308.
  • Step S306 determining whether the information includes a special character, and determining whether there is an identifier bit in the search information, if yes, executing step S310; otherwise, executing step S308.
  • Step S308 decoding according to the information content, using UCS2 decoding mode or GSM7 decoding mode.
  • Steps S310-S312 decoding all information content by using GSM7 decoding mode, and integrating two characters after the decoded identification bit into one foreign text special character.
  • Step S314 displaying SMS information.
  • a coding and processing technique suitable for foreign characters in an SMS message according to the present invention It needs to support the relevant serial communication protocol, including the AT (Attention) and DIAG (Diagnostic Responder) protocols.
  • the following takes the AT protocol and storing an SMS message as an example.
  • the content of the SMS message is: aaaaaaaaaaabbbbbbbbbccccccccddddddddddeeeeeeeeeeeeeefffffffggggggggggggggS, a total of 71 characters.
  • the UI is run after the UI and the terminal device driver are properly installed, and the above SMS information is stored.
  • the content is encoded using the UCS2 encoding method, which is 142 bytes after encoding, and an SMS message supports the largest UCS2 encoding. If the number of bytes is 140, the message needs to be split into two for code transmission.
  • a special character table is first searched, and by looking up the table, it is found that the SMS message contains the special character " ⁇ ", and then, the encoding of the information content of the special character " ⁇ " is removed.
  • the method determines whether GSM7 encoding is used. If the result of the judgment is yes, it is split into three characters, wherein the first character value is 0X1B, and the character has no practical meaning in the GSM7 table, and is used for identification.
  • the SMS information is encoded by the GSM7 encoding method as a whole, and a total of 73 characters are required to be encoded.
  • the maximum number of characters for an SMS message to support GSM7 encoding is 160.
  • the SMS information of the above example can be stored and sent through a piece of content.
  • the flag bit "1B" detects whether the flag bit "1B" is included. If there is, the information content is restored after GSM7 decoding.
  • the bit information is directly decoded as "aaaaaaaaaaaaaaababbbbbbbbccccccccdddddddddeeeeeeeeeffffffggggggg g", and the next base character is detected as "e” according to the flag bit, and then the character " ⁇ " is restored according to the above matching criterion according to the second phonetic character "1". And it is displayed through the UI.
  • the requirement for storing and reading foreign language special characters in the short message can be implemented on the UI, and the coding length is saved.
  • a short message encoding processing apparatus is further provided.
  • FIG. 4 is a structural block diagram of a short message encoding processing apparatus according to an embodiment of the present invention. As shown in FIG. 4, the apparatus includes: a setting module 400, a searching module 410, a replacement module 420, and an encoding module 430.
  • the setting module 400 is configured to set a foreign character special character replacement rule;
  • the searching module 410 is configured to search for a foreign text special character in the short message according to the pre-established special character table, where the content of the short message includes: a special character and a general character;
  • the replacement module 420 is configured to replace the foreign text special character according to the preset replacement rule;
  • the encoding module 430 is configured to encode the general character in the short message and the replaced foreign text special character in the GSM7 encoding manner.
  • the replacement module 420 is further configured to replace the foreign language special characters by the following three characters: a flag bit, a base character, and a phonetic bit position, wherein the base character is a foreign language special character and the basic foreign language character after the phonetic symbol is removed, and the phonetic symbol bit is used to represent the special character. Phonetic symbol.
  • the above device is used for storing or transmitting SMS information containing foreign characters and special characters in the GSM7 encoding manner, which can improve the length of the short message code and save the cost and cost of the short message storage.
  • a short message decoding processing apparatus is further provided.
  • FIG. 5 is a structural block diagram of a short message decoding processing apparatus according to an embodiment of the present invention. As shown in FIG. 5, the apparatus includes: a setting module 500, a decoding module 510, and a restoration processing module 520.
  • the setting module 500 is configured to set a replacement rule for the foreign text special character; the decoding module 510 is configured to decode the short message by using the GSM7 decoding mode, where the content of the short message includes: special characters and general characters; and the restoration processing module 520 is configured to The identifier bit is found in the short message decoded by the decoding module, and the two characters after the identifier bit are restored to the foreign text special character, wherein the two characters after the identifier bit are the base character and the phonetic symbol, and the base character is a foreign character special character to remove the phonetic symbol. After the basic foreign language characters, the phonetic symbols are used to represent the phonetic symbols of special characters.
  • the above device is used for decoding the SMS information containing the foreign text special characters stored and transmitted by the GSM7 encoding method, thereby improving the user experience of the short message reader.
  • a short message processing system which can be used to implement the above method embodiments.
  • the system can be used on any terminal device that needs to be used together.
  • FIG. 6 is a structural block diagram of a short message processing system according to an embodiment of the system of the present invention. As shown in FIG. 6, the system includes: a setting module 600, an encoding processing device 610, and a decoding processing device 620.
  • the setting module 600 is configured to set a replacement rule for the foreign language special characters
  • the encoding processing device 610 includes: a lookup module 612, a replacement module 614, and an encoding module 616.
  • the decoding processing device 620 includes: a decoding module 622 and a restoration processing module 624.
  • the short message encoding processing device, the short message decoding processing device, and the short message processing system provided by the embodiments of the present invention can implement the short message encoding processing method provided by the foregoing method embodiment.
  • the device and system according to the embodiment of the present invention are the same. The processing shown in FIG. 1 to FIG. 3 can be completed, and the specific processing is not repeated here.
  • the short message of the character is encoded by the GSM7 encoding method, which improves the length of the short message encoding, thereby saving the cost and cost of the short message storage.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Document Processing Apparatus (AREA)
  • Mobile Radio Communication Systems (AREA)

Description

短信编码处理方法、 装置及系统 技术领域
本发明涉及通讯领域, 尤其涉及一种短信编码处理方法、 装置及系统。 背景技术
短信服务(SMS , Short Messaging Service ) 以简单方便的使用功能受 到广大用户的欢迎, 并迅速普及。 通过该业务移动电话之间可以互相收发 短信, 内容以文本、 数字或二进制非文本数据为主。 目前, SMS的单条长 度被限定在 140字节之内。
随着国际全球化的不断发展, 移动通讯中的短信已经在各个跨国公司 内部交流、 商务合作中使用的频率越来越高, 随着以短信为主服务范围的 不断扩大和向各行业渗透的不断深入, 各项服务与百姓的生活联系更加紧 密, 信息消费的概念露出水面, 并逐渐为用户所接受。 在业务快速发展的 同时, 一些阻碍业务发展的问题也随之出现, 比如用户在编辑短信时经常 需要输入一些外文的特殊字符, 例如 έ 、 § 、 Ϊ等, 在这种情况下, 短信内 容输入的最大字符数仅为 70字节, 即为一般短信最大长度的一半。 原因在 于, 一旦出现这些特殊字符, 短信的所有内容必须釆用 UCS2 ( 2个字节的 通用字符集(UCS , Universal Character Set ) )编码, 每个字符编码成两个 字节, 而不含有特殊字符的一般字符釆用 GSM7编码, 每个字符编码成一 个字节。
在实际使用中, 短信内容中出现上述特殊字符用的概率较小, 在短信 内容中所占的比例也较小, 如果仅仅因为很少的特殊字符就对短信整体内 容釆用 UCS2方法编码, 致使超过 70个字符的短信内容, 必须被拆分成两 条短信进行发送, 从而增加了短信存储成本和短信费用, 也降低了短信阅 读者的用户体验。 发明内容
考虑到现有技术中对包含外文特殊字符的短信不能使用 GSM7编码方 式进行编码所导致的增加短信存储成本和费用的问题而做出本发明, 为此, 本发明的主要目的在于提供一种短信编码处理方法、 装置及系统, 以解决 现有技术中的上述问题。
根据本发明的一个方面, 提供了一种短信编码处理方法。
根据本发明的方法包括: 短信的内容包括外文特殊字符和一般字符, 根据预先建立的特殊字符表查找出短信中的外文特殊字符; 根据预先设置 的替换规则对外文特殊字符进行替换; 将短信中的一般字符和经过替换的 外文特殊字符釆用 GSM7编码方式进行编码, 以存储或发送短信。
优选地, 根据预先设置的替换规则对外文特殊字符进行替换, 进一步 包括: 由以下三个字符替换外文特殊字符: 标识位、 基字符、 音标位, 其 中, 基字符为外文特殊字符去掉音标后的基本外文字符, 音标位用于表示 特殊字符的音标。
优选地, 读取短信时方法进一步包括: 釆用 GSM7解码方式对短信进 行解码; 在解码后的短信中查找标识位, 并将标识位后的基字符和音标位 还原为外文特殊字符。
根据本发明的另一方面, 还提供了一种短信编码处理装置。
根据本发明的装置包括: 查找模块, 用于根据预先建立的特殊字符表 查找出短信中的外文特殊字符, 其中, 短信的内容包括: 特殊字符和一般 字符; 替换模块, 用于根据预先设置的替换规则对外文特殊字符进行替换; 编码模块,用于将短信中的一般字符和经过替换的外文特殊字符釆用 GSM7 编码方式进行编码。
优选地, 替换模块进一步用于, 由以下三个字符替换外文特殊字符: 标识位、 基字符、 音标位, 其中, 基字符为外文特殊字符去掉音标后的基 本外文字符, 音标位用于表示特殊字符的音标。
根据本发明的另一方面, 还提供了一种短信解码处理装置。
根据本发明的装置包括: 解码模块, 用于釆用 GSM7解码方式对短信 进行解码, 其中, 短信的内容包括: 特殊字符和一般字符; 还原处理模块, 用于在解码模块解码的短信中查找到标识位, 并将标识位后的两个字符还 原为外文特殊字符, 其中, 标识位后的两个字符为基字符和音标位, 基字 符为外文特殊字符去掉音标后的基本外文字符, 音标位用于表示特殊字符 的音标。
根据本发明的另一方面, 还提供了一种短信处理系统。
根据本发明的系统包括: 编码处理装置, 其包括: 查找模块, 用于根 据预先建立的特殊字符表查找出短信中的外文特殊字符, 其中, 短信的内 容包括: 特殊字符和一般字符; 替换模块, 用于由以下三个字符替换外文 特殊字符: 标识位、 基字符、 音标位, 其中, 基字符为外文特殊字符去掉 音标后的基本外文字符, 音标位用于表示特殊字符的音标; 编码模块, 用 于将短信中的一般字符和经过替换的外文特殊字符釆用 GSM7编码方式进 行编码。 解码处理装置, 其包括: 解码模块, 用于釆用 GSM7解码方式对 短信进行解码; 还原处理模块, 用于在解码模块解码的短信中查找到标识 位, 并将标识位后的两个字符还原为外文特殊字符。
借助于本发明的上述技术方案, 通过将短信中的外文特殊字符进行替 换处理之后再釆用 GSM7编码方式进行编码, 能够对包括外文特殊字符的 短信釆用 GSM7编码方式进行编码, 提高了短信编码长度, 因此节约了短 信存储成本和费用。 附图说明
图 1是根据本发明实施例的短信编码处理方法的流程图; 图 2是根据本发明实施例的存储外文特殊字符方法的流程图; 图 3是根据本发明实施例的读取外文特殊字符方法的流程图; 图 4是根据本发明实施例的短信编码处理装置的结构框图;
图 5是根据本发明实施例的短信解码处理装置的结构框图;
图 6是根据本发明系统实施例的短信处理系统的结构框图。 具体实施方式
本发明的主要思想主要在于, 预先建立一外文特殊字符的表格, 对于 短信的编辑内容, 判断输入的信息所含字符是否含有外文特殊字符, 若包 含外文特殊字符并且短信中去除外文特殊字符的部分的编码方式釆用 GSM7 编码方式编码, 则将外文特殊字符进行替换处理之后再釆用 GSM7 编码方式进行编码, 以存储或发送短信。 本发明通过替换处理不能够直接 使用 GSM7编码方式编码的字符, 使整条短信能够釆用 GSM7编码方式进 行编码, 提高了短信的编码长度, 节约短信存储成本和费用。
为使本发明的目的、 技术方案和优点更加清楚, 以下结合附图及具体 实施例, 对本发明作进一步地详细说明。
根据本发明的实施例, 提出了一种短信编码处理方法。 图 1 是根据本 发明实施例的短信编码处理方法的流程图, 如图 1所示, 该处理过程包括: 步骤 S102 ,根据预先建立的特殊字符表查找出短信中的外文特殊字符; 步骤 S104, 根据预先设置的替换规则对外文特殊字符进行替换; 步骤 S106 , 将短信中的一般字符和经过替换的外文特殊字符釆用 GSM7编码方式进行编码, 以存储或发送短信。
下面详细描述上述各处理的细节。 首先, 需要建立特殊字符表, 该表 中的特殊字符为不能釆用 GSM7编码方式编码的字符, 并且, 该些特殊的 字符为一般的外文字符加上音标, 参考表 1 , 特殊字符表中的特殊字符包括 但不限于表 1中所示的字符。 人 AAEfii ί ϊό ό όύϋΫ aaa9eeiii'005uiiuyy
表 1
根据表 1 的特殊字符表找出短信中的外文特殊字符后, 由以下三个字 符替换该外文特殊字符: 标识位、 基字符、 音标位, 其中, 基字符为外文 特殊字符去掉音标后的基本外文字符, 音标位用于表示特殊字符的音标。 替代外文特殊字符的标识位、 基字符、 音标位都能够釆用 GSM7编码方式 进行编码, 此时, 整条短信也能够釆用 GSM7编码方式进行编码。
基于上述的处理, 读取该短信时还可以包括: 釆用 GSM7解码方式对 短信进行解码; 在解码后的短信中查找标识位, 并将标识位后的基字符和 音标位还原为外文特殊字符, 这个过程可以视为上述替换处理的逆处理。
本发明的应用场景需要以下三种实体的支持, 实体一是无线终端设备 ( Wireless Terminal Device ) , 典型的为无线 USB MODEM、 无线数据卡、 手机等,以下统称为终端设备; 实体二是 PC侧应用程序,典型的为与手机、 无线数据卡、 USB MODEM等终端设备配合使用的安装在个人电脑或者台 式机上的人机交互界面程序 (UI, User Interface ); 实体三是各种卡资源, 例如: 用户识别模块( UIM, User Identity Model )卡、客户识别模块( SIM, Subscriber Identity Model). 全球用户识别卡 (USIM, Universal Subscriber Identity Module )卡等, 以下简称为卡设备。
下面结合图 2和图 3分别描述根据本发明实施例的存储(发送)和读 取(接收)外文特殊字符的处理过程。
图 2是根据本发明实施例的存储外文特殊字符方法的流程图, 如图 2 所示, 包括以下步骤:
步骤 S202 , 输入 SMS短信内容信息。
步骤 S204, 参考表 1, 根据预先建立的特殊字符表检测短信输入的信 息中是否含有外文特殊字符,若没有,则执行步骤 S206,否则执行步骤 S208。 步骤 S206, 才艮据信息内容釆用 UCS2编码方式编码或 GSM7编码方式 编码。
步骤 S208 , 检测短信的输入信息中除外文特殊字符外, 其余字符的编 码方式,若为 UCS2编码方式编码,则整个信息釆用 UCS2编码;若为 GSM7 编码方式编码, 则执行步骤 S210。
步骤 S210, 将短信信息中所有特殊字符进行编码处理, 将每个特殊字 符由标识位、 基字符、 音标位进行替换, 其中第一个字符为标示位, 第二 个字符为去掉标点后的基字符, 例如 γ— 第三个为音标位。
步骤 S212, 对替换后的字符和一般字符进行 GSM7编码方式编码。 步骤 S214, 对编码后的信息进行发送或者存储。
图 3 是根据本发明实施例的读取外文特殊字符方法的流程图, 如图 3 所示, 包括以下步骤:
步骤 S302, 读取 SMS短信内容信息。
步骤 S304, 4艮据短信信息的编码标识判断编码方式, 若为 GSM7编码 则执行步骤 S306, 否则执行步骤 S308。
步骤 S306, 判断信息中是否包含特殊字符, 此处通过检索信息中是否 有标识位进行判断, 若有则执行步骤 S310, 否则执行步骤 S308。
步骤 S308, 根据信息内容釆用 UCS2解码方式或 GSM7解码方式进行 解码。
步骤 S310-S312 ,釆用 GSM7解码方式解码全部信息内容,对解码后的 标识位后的两个字符进行整合成一个外文特殊字符。
步骤 S314, 显示 SMS信息。
上述图 2和图 3分别给出了根据本发明实施例的存储和读取外文特殊 字符的优选处理方案。
根据本发明提出的适用于对 SMS 短信中外文特殊字符的编码处理技 术, 需要支持相关的串口通讯协议, 其中包含了 AT ( Attention )和 DIAG ( Diagnostic Responder )协议。 下面以 AT协议和存储一条 SMS信息为例 进 行 说 明 , 其 中 , SMS 信 息 内 容 为 : aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeeeffffffffffggggggggggS , 共 71个字符。
首先,在正确安装好 UI以及终端设备驱动后运行 UI,存储上述的 SMS 信息, 使用现有技术, 该内容使用 UCS2编码方式编码, 编码后为 142字 节, 而一条 SMS短信支持 UCS2编码的最大字节个数为 140, 则该短信需 要拆分成两条进行编码发送。
承上述示例, 参考表 1 , 根据本发明, 首先查找特殊字符表, 通过查找 该表,发现 SMS信息中包含特殊字符 "έ" ,接下来,对去除该特殊字符 "έ" 的信息内容的编码方式判断是否釆用 GSM7编码, 在判断的结果为是的情 况下,将 ,拆分为三个字符,其中第一个字符值为 0X1B,该字符在 GSM7 表中没有实际意义, 用来作标识位, 将 "έ" 还原成其基字符 "e" , 同时最 后一个字符标识特殊字符的音标, 此处可以用数字进行表示, 例如: 1代表 音标 "..", 2代表 "〜", 3代表 "Λ" , 4代表 "'", 5代表 " '" 等, 本发明 不限于此。 这样, 就将一个特殊字符拆分为三个字符, 并由这三个字符替 换 "έ"。对该 SMS信息整体釆用 GSM7编码方式进行编码, 共需要编码 73 个字符。 一条 SMS短信支持 GSM7编码的最大字符数量为 160, 则上述例 子的 SMS信息可以通过一条内容进行存储和发送。
经过编码后, UI 通过串口下发 SMS 内容命令: T+CMGS=75.159:
Figure imgf000009_0001
6C369BCD66B3D97C3E9FCFE7F3F97C3E836265。 釆用本专利方法编码后 为 73字节, 只需要一条短信就可以表述所有信息。 从而达到节省编码内存 空间, 并节省用户短信通讯费用的目的。 承上述示例 , 读取 SIM卡中的 SMS信息时 , 向终端设备发送 AT协议 中的读取 SMS信息的 AT指令( at+cmgr=index ), 对于 SMS信息内容根据 它的编码协议( GSM7还是 UNICODE )进行解码, 对于釆用 UNICODE的 短信信息不处理, 对于釆用 GSM7编码的短信的内容重新进行整合, 首先 检测是否含有标识位 "1B" , 若有则通过 GSM7解码后还原信息内容, 没有 标 识 位 的 信 息 直 接 解 码 为 " aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeeeffffffffffggggggggg g" , 根据标识位检测到其后一个基字符为 "e" , 再根据其后第二个音标字 符 "1" 根据上文的匹配准则恢复字符 "έ" , 并通过 UI显示出来。 通过上 述实施例, 可以在 UI上实现对短信中对外文特殊字符存储和读取的需求, 并节省了编码长度。
根据本发明实施例, 还提供一种短信编码处理装置。
图 4是根据本发明实施例的短信编码处理装置的结构框图, 如图 4所 示, 该装置包括: 设置模块 400、 查找模块 410, 替换模块 420, 编码模块 430。
其中,设置模块 400用于设置外文特殊字符的替换规则;查找模块 410, 用于根据预先建立的特殊字符表查找出短信中的外文特殊字符, 其中, 短 信的内容包括: 特殊字符和一般字符; 替换模块 420, 用于根据预先设置的 替换规则对外文特殊字符进行替换; 编码模块 430, 用于将短信中的一般字 符和经过替换的外文特殊字符釆用 GSM7编码方式进行编码。替换模块 420 进一步用于, 由以下三个字符替换外文特殊字符: 标识位、 基字符、 音标 位, 其中, 基字符为外文特殊字符去掉音标后的基本外文字符, 音标位用 于表示特殊字符的音标。
上述装置用于釆用 GSM7 编码方式存储或发送含有外文特殊字符的 SMS信息, 能够提高短信编码长度, 并节约短信存储成本和费用。 根据本发明实施例, 还提供一种短信解码处理装置。
图 5是根据本发明实施例的短信解码处理装置的结构框图, 如图 5所 示, 该装置包括: 设置模块 500、 解码模块 510, 还原处理模块 520。
设置模块 500用于设置外文特殊字符的替换规则; 解码模块 510, 用于 釆用 GSM7解码方式对短信进行解码, 其中, 短信的内容包括: 特殊字符 和一般字符; 还原处理模块 520, 用于在解码模块解码的短信中查找到标识 位, 并将标识位后的两个字符还原为外文特殊字符, 其中, 标识位后的两 个字符为基字符和音标位, 基字符为外文特殊字符去掉音标后的基本外文 字符, 音标位用于表示特殊字符的音标。
上述装置用于对釆用 GSM7编码方式存储和发送的含有外文特殊字符 的 SMS信息进行解码, 提高了短信阅读者的用户体验。
根据本发明的实施例, 还提供了一种短信处理系统, 该系统可以用于 实现上述方法实施例。 该系统可以用于任何需要配合使用的终端设备上。
图 6是根据本发明系统实施例的短信处理系统的结构框图, 如图 6所 示, 该系统包括: 设置模块 600、 编码处理装置 610和解码处理装置 620。
设置模块 600用于设置外文特殊字符的替换规则;
编码处理装置 610包括: 查找模块 612 , 替换模块 614, 编码模块 616。 解码处理装置 620包括: 解码模块 622 , 还原处理模块 624。 其中, 上述各 个模块的具体结构和功能请参考图 4和图 5 , 此处不再赘述。
本发明实施例提供的短信编码处理装置、 短信解码处理装置、 短信处 理系统可以实现上述的方法实施例提供的短信编码处理方法, 在具体实施 过程中, 根据本发明实施例提供的装置及系统同样可以完成图 1至图 3中 所示的处理, 具体处理过程此处不再重复描述。
综上所示, 根据本发明上述技术方案, 通过将短信中的外文特殊字符 进行替换处理之后再釆用 GSM7编码方式进行编码, 能够对包括外文特殊 字符的短信釆用 GSM7编码方式进行编码, 提高了短信编码长度, 因此节 约了短信存储成本和费用。
以上所述仅为本发明的实施例而已, 并不用于限制本发明, 对于本领 域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和 原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的权 利要求范围之内。

Claims

权利要求书
1、 一种短信编码处理方法, 其特征在于, 设置外文特殊字符的替换规 则; 所述方法还包括:
查找出短信中的外文特殊字符, 根据所设置的替换规则对所述外文特 殊字符进行替换; 其中, 所述短信的内容包括外文特殊字符和一般字符; 将所述短信中的一般字符和经过替换的所述外文特殊字符釆用 GSM7 编码方式进行编码。
2、 根据权利要求 1所述的方法, 其特征在于, 所述设置外文特殊字符 的替换规则为:
由标识位、 基字符以及音标位的三个字符替换所述外文特殊字符; 其 中,
所述基字符为所述外文特殊字符去掉音标后的基本外文字符; 所述音标位用于表示所述外文特殊字符的音标。
3、 一种短信解码处理方法, 其特征在于, 设置外文特殊字符的替换规 则; 所述方法包括:
釆用 GSM7解码方式对所接收的短信进行解码; 所述短信的内容包括 外文特殊字符和一般字符;
在解码后的所述短信中查找所述外文特殊字符, 并根据所设置的替换 规则还原所述外文特殊字符。
4、 根据权利要求 3所述的方法, 其特征在于, 所述设置外文特殊字符 的替换规则为:
由标识位、 基字符以及音标位的三个字符替换所述外文特殊字符; 其中, 所述基字符为所述外文特殊字符去掉音标后的基本外文字符; 所述音标位用于表示所述外文特殊字符的音标。
5、 根据权利要求 3所述的方法, 其特征在于, 在解码后的所述短信中 查找所述外文特殊字符, 并根据所设置的替换规则解码所述外文特殊字符, 为:
在解码后的所述短信中查找所述标识位, 并根据所设置的替换规则将 所述标识位后的所述基字符和所述音标位还原为所述外文特殊字符。
6、 一种短信编码处理装置, 其特征在于, 所述装置包括设置模块、 查 找模块、 替换模块和编码模块; 其中:
设置模块, 用于设置外文特殊字符的替换规则;
查找模块, 用于查找出短信中的外文特殊字符, 其中, 所述短信的内 容包括外文特殊字符和一般字符;
替换模块, 用于根据所设置的替换规则对所述外文特殊字符进行替换; 编码模块, 用于将所述短信中的一般字符和经过替换的所述外文特殊 字符釆用 GSM7编码方式进行编码。
7、 根据权利要求 6所述的装置, 其特征在于, 所述外文特殊字符的替 换规则为:
由标识位、 基字符以及音标位的三个字符替换所述外文特殊字符; 其 中, 所述基字符为所述外文特殊字符去掉音标后的基本外文字符, 所述音 标位用于表示所述外文特殊字符的音标。
8、 一种短信解码处理装置, 其特征在于, 包括设置模块、 解码模块和 还原处理模块; 其中:
设置模块, 用于设置外文特殊字符的替换规则;
解码模块, 用于釆用 GSM7解码方式对短信进行解码, 其中, 所述短 信的内容包括: 外文特殊字符和一般字符;
还原处理模块, 用于在所述解码模块解码的所述短信中查找外文特殊 字符, 根据所设置的替换规则还原所述外文特殊字符。
9、 根据权利要求 8所述的装置, 其特征在于, 所述外文特殊字符的替 换规则为:
由标识位、 基字符以及音标位的三个字符替换所述外文特殊字符; 其 中, 所述基字符为所述外文特殊字符去掉音标后的基本外文字符, 所述音 标位用于表示所述外文特殊字符的音标。
10、 根据权利要求 8所述的装置, 其特征在于, 所述还原处理模块进 一步在解码后的所述短信中查找所述标识位, 并根据所设置的替换规则将 所述标识位后的所述基字符和所述音标位还原为所述外文特殊字符。
11、 一种短信处理系统, 其特征在于, 包括: 设置模块、 编码处理装 置和解码处理装置; 其中,
设置模块, 用于设置外文特殊字符的替换规则;
所述编码处理装置包括:
查找模块, 用于查找出短信中的外文特殊字符, 其中, 所述短信的内 容包括外文特殊字符和一般字符;
替换模块, 用于根据所设置的替换规则对所述外文特殊字符进行替换; 编码模块, 用于将所述短信中的一般字符和经过替换的所述外文特殊 字符釆用 GSM7编码方式进行编码;
所述解码处理装置包括:
解码模块, 用于釆用 GSM7解码方式对短信进行解码;
还原处理模块, 用于在所述解码模块解码的所述短信中查找外文特殊 字符, 根据所设置的替换规则还原所述外文特殊字符。
12、 根据权利要求 11所述的系统, 其特征在于, 所述外文特殊字符的 替换规则为:
由标识位、 基字符以及音标位的三个字符替换所述外文特殊字符; 其 中, 所述基字符为所述外文特殊字符去掉音标后的基本外文字符, 所述音 标位用于表示所述外文特殊字符的音标。
13、 根据权利要求 12所述的系统, 其特征在于, 所述还原处理模块进 一步在解码后的所述短信中查找所述标识位, 并根据所设置的替换规则将 所述标识位后的所述基字符和所述音标位还原为所述外文特殊字符。
PCT/CN2010/071578 2009-08-12 2010-04-06 短信编码处理方法、装置及系统 WO2011017927A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2009101656430A CN101621771B (zh) 2009-08-12 2009-08-12 短信编码处理方法、装置及系统
CN200910165643.0 2009-08-12

Publications (1)

Publication Number Publication Date
WO2011017927A1 true WO2011017927A1 (zh) 2011-02-17

Family

ID=41514750

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/071578 WO2011017927A1 (zh) 2009-08-12 2010-04-06 短信编码处理方法、装置及系统

Country Status (2)

Country Link
CN (1) CN101621771B (zh)
WO (1) WO2011017927A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621771B (zh) * 2009-08-12 2012-04-11 中兴通讯股份有限公司 短信编码处理方法、装置及系统
WO2011144125A2 (zh) * 2011-05-30 2011-11-24 华为终端有限公司 短信处理方法和设备
CN103327465A (zh) * 2012-03-22 2013-09-25 吴平 一种语音信息短文本化方法和装置
CN105472107A (zh) * 2014-08-26 2016-04-06 中兴通讯股份有限公司 终端信息的处理方法及装置
CN105634674A (zh) * 2016-01-12 2016-06-01 青岛海信移动通信技术股份有限公司 一种短信处理的方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1301005A (zh) * 1999-12-21 2001-06-27 索尼国际(欧洲)股份有限公司 带有编辑预定最大长度消息的编辑方式的便携式通信系统
CN1671157A (zh) * 2004-03-16 2005-09-21 联想(北京)有限公司 解码方法及装置
CN1816170A (zh) * 2005-11-08 2006-08-09 杭州华为三康技术有限公司 短信收发的编码转换方法及其应用的网络设备
CN101621771A (zh) * 2009-08-12 2010-01-06 中兴通讯股份有限公司 短信编码处理方法、装置及系统

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100399839C (zh) * 2005-02-21 2008-07-02 宏碁股份有限公司 短信息字符串截取方法
CN101309483B (zh) * 2008-05-29 2011-07-06 华为终端有限公司 一种短信编、解码方法和终端

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1301005A (zh) * 1999-12-21 2001-06-27 索尼国际(欧洲)股份有限公司 带有编辑预定最大长度消息的编辑方式的便携式通信系统
CN1671157A (zh) * 2004-03-16 2005-09-21 联想(北京)有限公司 解码方法及装置
CN1816170A (zh) * 2005-11-08 2006-08-09 杭州华为三康技术有限公司 短信收发的编码转换方法及其应用的网络设备
CN101621771A (zh) * 2009-08-12 2010-01-06 中兴通讯股份有限公司 短信编码处理方法、装置及系统

Also Published As

Publication number Publication date
CN101621771B (zh) 2012-04-11
CN101621771A (zh) 2010-01-06

Similar Documents

Publication Publication Date Title
Shirali-Shahreza et al. Text steganography in SMS
CN100418325C (zh) 用于对电子名片进行管理的方法
CN101350858B (zh) 一种短信解码的方法和用户终端
WO2017054597A1 (zh) 表情字符串的处理方法及装置
US8473280B2 (en) System and methods for cost-effective bilingual texting
WO2011017927A1 (zh) 短信编码处理方法、装置及系统
CN103997571A (zh) 基于音频编码的名片交换方法
WO2012027932A1 (zh) 短信编码解码方法、装置以及终端
CN101345952B (zh) 客户身份识别卡的数据存储、读取方法、装置及系统
CN201286115Y (zh) 电子邮件客户端和移动通信终端
CN1444378B (zh) 超长短消息发送的方法
US20120091203A1 (en) Method of encoding and decoding text on a matrix code symbol
US9544252B2 (en) Compressing and decompressing electronic messages in message threads
WO2013178126A1 (zh) 一种编码方法、解码方法及编码系统、解码系统
CN102970661A (zh) 一种对短消息进行编码转换的方法及装置
CN102281516B (zh) 一种短信处理方法及短信处理终端
CN108108267B (zh) 数据的恢复方法和装置
WO2017071216A1 (zh) 移动终端的邮件正文的显示方法及装置
CN101702149B (zh) 一种移动终端显示电子书的方法和装置
CN112383888A (zh) 一种短信系统、方法以及设备
CN101340677B (zh) 一种移动终端中显示信息发送方姓名的方法和装置
US8970404B2 (en) Communication device and text coding and decoding method
CN103379457A (zh) 文字编码与解码系统及方法
CN101887411B (zh) 一种编码方法和编码装置
CN113490165B (zh) 一种嵌入式系统的4g模组短信息收发方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10807872

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10807872

Country of ref document: EP

Kind code of ref document: A1