Summary of the invention
The invention provides the method to the note number decoding, in order to the solution prior art sending side terminal number in the note being decoded exists incompatible problem.
The invention provides portable terminal, in order to support described method to the note number decoding.
The present invention also provides a kind of method to the short message content decoding, and in order to the solution prior art short message content in the note being decoded the problem of mess code to occur.
The present invention also provides a kind of portable terminal, in order to support described method to the short message content decoding.
The present invention check numbers the decoding method comprise step:
Receiving side terminal extracts the sending side terminal number information after receiving note;
Described receiving side terminal is decoded to the sending side terminal number information with first decoding policy;
If decode successfully, then on this receiving side terminal, show the sending side terminal number; Otherwise, with second decoding policy sending side terminal number information is decoded, and decoded result is presented on the described receiving side terminal.
Described first decoding policy is and the corresponding number decoding policy of the number coding strategy of receiving side terminal.
Described first decoding policy is two-stage dialing decoding policy (DTMF).
Described second decoding policy is the corresponding number decoding policy of sender number coding strategy.
Described second decoding policy is binary-coded decimal system decoding policy (BCD).
Whether there to be the character that does not belong to termination number in the decoded information, judge whether the decoding of first decoding policy is successful.
Another kind of the present invention comprises the following steps: the method for note number decoding
Receiving side terminal extracts the sending side terminal number information after receiving note;
Judge whether to be fit to utilize first decoding policy to decode;
If then the sending side terminal number information is decoded with first decoding policy;
Otherwise, the sending side terminal number information is decoded with second decoding policy.
Described first decoding policy is and the corresponding number decoding policy of the number coding strategy of receiving side terminal.
Whether to have the character that does not belong to first decoding policy in the sending side terminal number information behind the described coding, judge whether decode with first decoding policy can be successful.
The portable terminal of support number decoding of the present invention comprises:
Receiver module is used to receive note; First decoder module links to each other with described receiver module, and it utilizes built-in number decoding policy that described sending side terminal number information is decoded.
Described portable terminal also comprises: judge module, and it links to each other with first decoder module, is used to judge whether first decoder module is successful to the termination number information decoding of transmit leg; Second decoder module, it links to each other with described judge module, is used for utilizing its built-in number decoding policy that described sending side terminal number information is decoded once more after the termination number information decoding failure of described first decoder module to transmit leg.
The built-in number decoding policy of described first decoder module is and the corresponding number decoding policy of receiving side terminal number coding strategy.
The built-in DTMF decoding policy of described first decoder module.
The built-in BCD decoding policy of described second decoder module.
The another kind of portable terminal of support number decoding of the present invention comprises:
Receiver module is used to receive note; First decoder module, it utilizes built-in number decoding policy that described sending side terminal number information is decoded.
Described portable terminal also comprises: judge module, it links to each other with first decoder module with described receiver module, be used to judge whether to be fit to utilize the built-in number decoding policy of first decoder module to decode, and according to judged result described sending side terminal number information sent to corresponding decoder module and decode; Second decoder module, it links to each other with described judge module, and it utilizes built-in number decoding policy that described sending side terminal number information is decoded.
The built-in number decoding policy of described first decoder module is and the corresponding number decoding policy of receiving side terminal number coding strategy.
The present invention comprises step to the method for content decoding:
If it is to encode with 7 coding strategies of global mobile communication (gsm7bit) that receiving side terminal is apprised of the short message content of the note that receives, then whether this receiving side terminal length of judging original contents is identical with content-length behind the coding, and judge in the message flow behind the coding whether have the compensation position;
If length is identical and do not have the compensation position, then described short message content is decoded, and decoded result is presented on this receiving side terminal with ASCII(American Standard Code for information interchange) decoding policy (ascii);
Otherwise, with the gsm7bit decoding policy described short message content is decoded, and decoded result is presented on this receiving side terminal.
Described content-length is unit with the byte.
Described receiving side terminal obtains the length information of original contents from the message flow behind the coding.
Judge whether to exist the compensation position according to the content that is used for carrying the field that compensates position information in the message flow behind the described coding.
The portable terminal of support content decoding of the present invention comprises:
Receiver module is used to receive note;
The 3rd decoder module is used for the gsm7bit decoding policy short message content of the note that receives being decoded;
Described portable terminal also comprises: the 4th decoder module is used for the ascii decoding policy short message content of the note that receives being decoded;
Compare judge module, it is connected between described receiver module and the gsm7bit decoder module, and link to each other with described ascii decoder module, content-length behind the coding that is used for the length of comparison note original contents and receives, and judge whether there is the compensation position, and according to judged result relatively the short message content that receives is forwarded to corresponding decoder module and decodes.
Beneficial effect of the present invention is as follows:
After the inventive method is decoded to the sender number information in the note with the number decoding policy of the number coding strategy correspondence of receiving side terminal employing, judge whether decoding is successful, if it is unsuccessful, then adopt the second number decoding policy that described number information is decoded again, improved the compatibility of the information decoding of checking numbers like this.
The present invention provides a kind of portable terminal in order to support described number coding/decoding method, and it has added judge module, is used to judge whether first decoder module is successful to the termination number information decoding of transmit leg; And second decoder module, be used for after of the termination number information decoding failure of described first decoder module, utilizing its built-in number decoding policy that described sending side terminal number information is decoded once more to transmit leg.
The check numbers method of decoding of the present invention also can adopt and judges whether earlier to be fit to utilize first decoding policy to decode before decoding, if be not suitable for, then directly decodes with second decoding policy.
To should method, the present invention also provides another kind of portable terminal, it has added judge module, be used to judge whether to be fit to utilize the built-in number decoding policy of first decoder module to decode, and according to judged result described sending side terminal number information sent to corresponding decoder module and decode; Second decoder module, it links to each other with described judge module, and it utilizes built-in number decoding policy that described sending side terminal number information is decoded.
The inventive method is before decoding to the short message content of the note received, relatively whether there are differences between the length of the length of note original contents and coding back content earlier, and judge whether there is the compensation position, and decide according to judged result relatively and to adopt any decoding policy to decode, having avoided blindly like this, decoding causes the situation that mess code occurs.
The present invention provides a kind of portable terminal in order to support described content decoding method, and it has added the 4th decoder module, is used for the ascii decoding policy short message content of the note that receives being decoded; Content-length behind the judge module relatively, the length that is used for comparison note original contents and the coding that receives, and judge whether there is the compensation position, and according to judged result relatively the short message content that receives is forwarded to corresponding decoder module and decodes.
Embodiment
In order to improve compatibility,, the invention provides a kind of portable terminal and comprise referring to Fig. 1 to sender number information decoding in the note:
Receiver module is used to receive note.
First decoder module links to each other with described receiver module, and it utilizes built-in number decoding policy that described sending side terminal number information is decoded.
Judge module, it links to each other with first decoder module, is used to judge whether first decoder module is successful to the termination number information decoding of transmit leg;
Second decoder module, it links to each other with described judge module, is used for utilizing its built-in number decoding policy that the number information of described sending side terminal is decoded once more after the number information decoding failure of described first decoder module to sending side terminal.
Utilize above-mentioned portable terminal, correspondence of the present invention provides a kind of method to the decoding of sending side terminal number information, referring to Fig. 2, comprises the following steps:
After S101, receiving side terminal are received note by receiver module, obtain the sending side terminal number information in the described note;
S102, receiving side terminal utilize the first number decoding policy that is provided with in first decoder module, and promptly the number decoding policy of local terminal number coding strategy correspondence is decoded to described number information;
Whether S103, judgement decode successful;
S104, if the success, then show decoded number;
S105, if unsuccessful, then utilize the second number decoding policy that is provided with in second decoder module once more described number information to be decoded, and show decoded number.
Below send note to the CDMA2000 portable terminal, specifically describe the inventive method by the WCDMA portable terminal.
Described WCDMA portable terminal adopts 4 BCD number coding strategies; The CDMA2000 portable terminal adopts 4 DTMF number coding strategies.
The termination number of-WCDMA portable terminal is 103, according to 4 BCD coding strategies:
Numeral `1`-`9` is encoded to 1-9;
Numeral `0` is encoded to 0;
Symbol `*` is encoded to 0xA;
Symbol `#` is encoded to 0xB.
Described number 103 is encoded, and coding result is 103.
After coding work was finished, described WCDMA portable terminal sent to recipient CDMA2000 portable terminal with the described note that includes the sending side terminal number information.
After-CDMA2000 portable terminal utilizes receiver module to receive this note, therefrom obtain the number information of sending side terminal, i.e. information " 103 " behind the coding.
-CDMA2000 portable terminal adopts the number decoding policy of the local terminal number coding strategy correspondence that is provided with in first decoder module that described number information is decoded, promptly the decoding policy of 4 DTMF number coding strategy correspondences is 4 DTMF number decoding policies, according to described 4 DTMF number decoding policies:
Numeral `1`-`9` is encoded to 1-9;
Numeral `0` is encoded to 0xA;
Symbol `*` is encoded to 0xB;
Symbol `#` is encoded to 0xC.
The number information " 103 " that obtains is decoded, and decoded result is 10xA3.
-according to whether there being the character that does not belong to termination number in the decoded information, judge whether the decoding of first decoding policy is successful.Have " xA " in the obvious decoded information, it does not belong to the character of termination number.Judge that in view of the above decoding is unsuccessful.
-once more described number information is decoded with the second number decoding policy that is provided with in second decoder module, promptly once more described number information to be decoded with the BCD decoding policy, decoded result is 103.And be presented on the CDMA2000 portable terminal 103.Finish the demonstration of number part.
In order to improve compatibility to sender number information decoding in the note, referring to Fig. 3, the invention provides another kind of portable terminal, comprising:
Receiver module is used to receive note;
Judge module, it links to each other with described receiver module, is used to judge whether to be fit to utilize the built-in number decoding policy of first decoder module to decode, and according to judged result described sending side terminal number information is sent to corresponding decoder module and decode;
First decoder module, it links to each other with described judge module, and it utilizes built-in number decoding policy that described sending side terminal number information is decoded;
Second decoder module, it links to each other with described judge module, and it utilizes built-in number decoding policy that described sending side terminal number information is decoded.
Utilize above-mentioned portable terminal, correspondence of the present invention provides another kind of method to the decoding of sending side terminal number information, referring to Fig. 4, comprises the following steps:
After S201, receiving side terminal are received note by receiver module, obtain the sending side terminal number information in the described note;
S202, judge whether to be fit to utilize first decoding policy to decode, if, then change step S203 over to, otherwise, change step S204 over to;
S203, receiving side terminal utilize the first number decoding policy that is provided with in first decoder module, and promptly the number decoding policy of local terminal number coding strategy correspondence is decoded to described number information;
S204, utilize the second number decoding policy that is provided with in second decoder module that described number information is decoded.
Below send note to the CDMA2000 portable terminal, specifically describe the inventive method by the WCDMA portable terminal.
Described WCDMA portable terminal adopts 4 BCD number coding strategies; The CDMA2000 portable terminal adopts 4 DTMF number coding strategies.
The termination number of-WCDMA portable terminal is 103, according to 4 BCD coding strategies:
Numeral `1`-`9` is encoded to 1-9;
Numeral `0` is encoded to 0;
Symbol `*` is encoded to 0xA;
Symbol `#` is encoded to 0xB.
Described number 103 is encoded, and coding result is 103.
After coding work was finished, described WCDMA portable terminal sent to recipient CDMA2000 portable terminal with the described note that includes the sending side terminal number information.
After-CDMA2000 portable terminal utilizes receiver module to receive this note, therefrom obtain the number information of sending side terminal, i.e. information " 103 " behind the coding.
Whether there is the character that does not belong to first decoding policy in the sending side terminal number information of-CDMA2000 portable terminal after, judges whether to be fit to utilize first decoding policy to decode with described coding.This example first decoding policy is 4 DTMF number decoding policies, according to described 4 DTMF number decoding policies:
Numeral `1`-`9` is encoded to 1-9;
Numeral `0` is encoded to 0xA;
Symbol `*` is encoded to 0xB;
Symbol `#` is encoded to 0xC.
Judge whether to be fit to utilize decoding.
There is " 0 " character in the sending side terminal number information behind the obvious described coding, but in the DTMF strategy, do not have the code character of " 0 ".Judge that in view of the above decoding can not be successful.
-once more described number information is decoded with the second number decoding policy that is provided with in second decoder module, promptly once more described number information to be decoded with the BCD decoding policy, decoded result is 103.And be presented on the CDMA2000 portable terminal 103.Finish the demonstration of number part.
In order to solve the problem that may occur mess code to the short message content in note decoding,, the invention provides a kind of portable terminal and comprise referring to Fig. 5:
Receiver module is used to receive note.
Compare judge module, it is connected in described receiver module and links to each other, short message content length behind the coding that is used for the length of comparison note original contents and receives, and judge whether there is the compensation position, and according to judged result relatively the short message content that receives is forwarded to corresponding decoder module and decodes.
The 4th decoder module links to each other with described relatively judge module.Judge that at described relatively judge module the length of note original contents is identical with short message content length behind the coding that receives, and when not having the compensation position, the note that reception is sent.And the short message content of the note that receives is decoded with the ascii decoding policy.
The 3rd decoder module links to each other with described relatively judge module.Judge that at described relatively judge module the length of note original contents is different with short message content length behind the coding that receives, when perhaps having the compensation position, the note that reception is sent.And the short message content of the note that receives is decoded with the gsm7bit decoding policy.
Utilize above-mentioned portable terminal, correspondence of the present invention provides a kind of method to the short message content decoding, referring to Fig. 6, comprises the following steps:
After S301, receiving side terminal are received note by receiver module, obtain the short message content information in the described note;
Whether the content-length behind the length that S302, comparison judge module are judged the note original contents and the coding is identical, if identically change step S303 over to, otherwise changes step S305 over to;
S303, comparison judge module judge whether to exist the compensation position, do not change step S204 over to if do not exist, otherwise change step S305 over to;
S304, decode with the ascii decoding policy;
S305, decode with the gsm7bit decoding policy.
Below send note to the CDMA2000 portable terminal, specifically describe the inventive method by the WCDMA portable terminal.
Example one: the WCDMA portable terminal adopts gsm7bit content encoding strategy; The CDMA2000 portable terminal adopts gsm7bit decoding policy or ascii decoding policy that short message content is decoded.
-WCDMA portable terminal is encoded to short message content to be sent with gsm7bit content encoding strategy, and finishes the described note of coding back transmission.
-CDMA2000 portable terminal obtains the short message content information in the described note, promptly with the content behind the gsm7bit coding strategy coding.
-Ruo recipient CDMA2000 portable terminal is apprised of short message content when receiving note be to encode with the gsm7bit coding strategy, then described CDMA2000 portable terminal obtains the length of this note original contents from the short message stream of receiving, and whether has difference in length between short message content length behind the more described coding of utilization comparison judge module and the note original contents length.
Because transmit leg WCDMA portable terminal adopts the gsm7bit coding strategy, so after comparison, can know and there are differences.Recipient CDMA2000 portable terminal judges that transmit leg WCDMA portable terminal is with the gsm7bit coding strategy short message content to be encoded really in view of the above.Afterwards, this note is sent to the 3rd decoder module.
-recipient CDMA2000 portable terminal utilizes the gsm7bit decoding policy that is provided with in the 3rd decoder module that short message content is decoded, and decoded result is presented on this CDMA2000 portable terminal.
Example two: the WCDMA portable terminal adopts ascii content encoding strategy; The CDMA2000 portable terminal adopts gsm7bit decoding policy or ascii decoding policy that short message content is decoded.
-WCDMA portable terminal is with the content encoding of ascii content encoding strategy to note to be sent, and sends described note finishing the coding back.
-CDMA2000 portable terminal obtains the short message content information in the described note, promptly with the content behind the ascii coding strategy coding.
-Ruo recipient CDMA2000 portable terminal is apprised of short message content when receiving note be to encode with the gsm7bit coding strategy, then described CDMA2000 portable terminal obtains the length of this note original contents from the short message stream of receiving, and whether has difference in length between short message content length behind the more described coding of utilization comparison judge module and the note original contents length.
Because transmit leg WCDMA portable terminal adopts the ascii coding strategy, so can know there is not difference after comparison.
There is the specific fields that is used to carry compensation position information in the short message stream behind the-coding.The comparison judge module that is provided with in the recipient CDMA2000 portable terminal judges whether to exist the compensation position according to the information in the described field.
Because transmit leg WCDMA portable terminal adopts the ascii coding strategy,, the information in the described field do not have the compensation position so showing.
Relatively judge according to above-mentioned, learn that content-length is identical and do not have the compensation position.Recipient CDMA2000 portable terminal judges that transmit leg WCDMA portable terminal is not with the gsm7bit coding strategy short message content to be encoded in view of the above, but with the ascii coding strategy short message content is encoded.Afterwards, this note is sent to the 4th decoder module.
-recipient CDMA2000 portable terminal utilizes the ascii decoding policy that is provided with in the 4th decoder module that short message content is decoded, and decoded result is presented on this CDMA2000 portable terminal.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.