Embodiment
The embodiment of the invention provides a kind of method of text message transmission and the method that text message shows.The embodiment of the invention also provides the terminal of corresponding text information transmission and the terminal that text message shows.Below be elaborated respectively.
The embodiment of the invention is encoded to method and the terminal that method that information that the example explanation embodiment of the invention improves transmits and terminal, information show with UNICODE, but the realization principle of the embodiment of the invention and thought are not limited to and are applied to UNICODE coding, can be applicable to coded systems such as GB2312 yet.
Embodiment one
This embodiment comprises at the text-string of conversion: the data bitmap of encoding of graphs and this figure in the process that information shows, directly converts the data bitmap of this figure to graphical content and shows and get final product.This embodiment converts user's editing graph to comprise the coding and the data bitmap of figure text character string format, directly according to the data bitmap display graphics content in the text-string, has realized the transmission and the demonstration of user-defined figure during the information demonstration.The embodiment of the invention transmits and the self-defined figure of explicit user by text-string, and the embodiment of the invention is simple, realizes easily, to realizing that demanding terminal is not high, saves resource, and improves user experience.
For convenience, the terminal that the embodiment of the invention transmits flow process with execution information is called information and transmits terminal, and the terminal of the information of execution flow for displaying is called Message Display Terminal.
Fig. 1 is that the information that the embodiment of the invention provides transmits and demonstration embodiment one flow chart.
The information that step 101, collection user edit;
The graphical information that the user edits comprises: the user-defined figure that does not have standard code.
Step 102, the information translation that the user is edited become text-string;
The User Defined figure is converted to the text-string of the data bitmap that comprises coding and this figure.
The coding of user-defined figure specifically can be defined as: E000 to the F8FF section of Unicode coding, and this does not define any literal, and the coding that can be used as the graphical information that does not have standard code uses, and is used for representing to be inserted into the graphic symbol in the text.The form of expanded text character string is: graphic symbol encoded, is numbered E000+n respectively, and n=0,1,2,3 ...; Promptly first graphic symbol of Cha Ruing is encoded to E000, and second is encoded to E001, and the like.
Fig. 2 is first kind of text character string format that the embodiment of the invention provides.
The text character string format, from left to right, the Unicode coding of " XXXX " expression standard, E000, E001 are the codings of the graphical information that does not have standard code of insertion, " 0000 " is the terminating symbol of text character string encoding; The coding of the user-defined figure of storage in the remaining space of character string, and the data bitmap of this figure corresponding with it.The coding that the present embodiment text-string only carries user-defined figure with and data bitmap, " XXXX " of the Unicode coding of expression standard be empty or by the coding covering of user-defined figure; And the coding that the present embodiment text-string only carries user-defined figure with and data bitmap, the length of data bitmap partly is empty.
Data bitmap is: the graph data of this figure by pixel, vector representation.For example: dot matrix word library, dot matrix are a kind of forms of digitlization character library, and each font is formed with black and white picture element matrix; Vector font library, vector font library are preserved is descriptor to each Chinese character, such as a stroke initial, stop coordinate, radius, radian etc.
Step 103, transmission text-string;
Text message transmits terminal execution in step 101, step 102 and step 103, finishes the transmission of information, and text-string is sent to the text message display terminal by network, text message display terminal execution in step 104 and later step.
Step 104, reception text-string;
Text-string comprises: the data bitmap of the coding of User Defined figure and User Defined figure.The data bitmap of user-defined figure is: the graphical content of this graphical information by pixel, vector representation.For example: dot matrix word library, dot matrix are a kind of forms of digitlization character library, and each font is formed with black and white picture element matrix; Vector font library, vector font library are preserved is descriptor to each Chinese character, such as a stroke initial, stop coordinate, radius, radian etc.Execution in step 106.
Step 105, according to the self-defining figure of data bitmap explicit user;
According to the self-defining figure of data bitmap explicit user that receives.
As one embodiment of the present of invention, the information of editing as the user also comprises: when having the text of standard code, the information translation that described step 102 is edited the user becomes in the text-string, further the text-converted that the user is edited becomes text-string, has " XXXX " of the Unicode coding of expression standard in the text-string of first kind of form.
Accordingly, receive when comprising text with standard code at the text message display terminal, the text display terminal before execution in step 105, execution in step also: search the local character library data bitmap corresponding with standard code according to the standard code of text; Step 105 shows the text with standard code simultaneously.
Because text that the user edit and user-defined figure are changed and shown simultaneously, enlarge the text message transmission that present embodiment proposes and the range of application of display packing.
As one embodiment of the present of invention, add the length of data bitmap in the text-string, make text character string conveniently check in the process of storage and transmission and demonstration.
Embodiment two
This embodiment, in the transmission course of text message, text-string includes only: the coding of user-defined figure and/or have the standard code of the text of standard code.When display message, if there is not the data bitmap of above-mentioned coding correspondence in the local character library, then sends and ask for data bitmap message, show that according to the data bitmap that gets access to corresponding user-defined figure is or/and text again.The content that present embodiment, text-string carry takies less Internet resources with respect to embodiment one minimizing, when not having this coding in the character library of text display terminal, sends and asks for the corresponding data bitmap message of this coding, so that demonstration.And the non-existent coding and the corresponding data bitmap of should encoding are expanded local character library in the local character library of text display terminal storage, keep transmitting with text the consistency of terminal data bitmap at any time, conveniently the transmission and the demonstration of user-defined figure or text.
Fig. 3 is the second embodiment flow chart that the information that provides of the embodiment of the invention transmits and shows.
The information that step 201, collection user edit;
The graphical information that the user edits comprises: user-defined figure.
Step 202, the information translation that the user is edited become text-string;
The User Defined figure is converted to the text-string that comprises coding.
Wherein, the coding of user-defined figure specifically can be defined as: E000 to the F8FF section of Unicode coding, this section does not define any literal, and the coding that can be used as the graphical information that does not have standard code uses, and is used for representing to be inserted into the graphic symbol in the text.The form of expanded text character string is: graphic symbol encoded, is numbered E000+n respectively, and n=0,1,2,3 ...; Promptly first graphic symbol of Cha Ruing is encoded to E000, and second is encoded to E001, and the like.
Fig. 4 is second kind of text character string format that the embodiment of the invention provides.
The text character string format, from left to right, the Unicode coding of " XXXX " expression standard, " E000 " and " E001 " is the coding of the user-defined figure of insertion, " 0000 " is the terminating symbol of string encoding.The present embodiment text-string only carries user-defined coding, and " XXXX " field of the Unicode coding of expression standard be empty or by the coding covering of user-defined figure.
Step 203, transmission text-string.
Information transmits the transmission that terminal execution in step 201, step 202 and step 203 are finished information, and information is sent to the text message display terminal by network, execution in step 203, step 204 and step 205.
Step 204, reception text-string;
Text-string comprises: the coding of User Defined figure.
Step 205, in local character library, search coding;
In local character library, search the coding of user-defined figure and have the standard code of the text of standard code.If above-mentioned being coded in the local character library exists, then direct execution in step 206.
Step 206, according to the self-defining figure of data bitmap explicit user;
According in the local character library with the coding of user-defined figure.
As one embodiment of the present of invention, if the information that the user edits also comprises: text with standard code; So, the text-converted that text message transmission terminal is further edited the user becomes text-string, has " XXXX " field of the Unicode coding of expression standard in the text-string of second kind of form.
Carry the coding of text in the text-string that corresponding text Message Display Terminal receives with standard code, the text message display terminal is searched the standard code of the text with standard code simultaneously in local character library, and shows the text with standard code according to the data bitmap of the standard code correspondence that exists in the local character library.
Because text that the user edit and user-defined figure are changed and shown simultaneously, enlarge the text message transmission that present embodiment proposes and the range of application of display packing.
As one embodiment of the present of invention, add the length of data bitmap in the text-string, make text character string conveniently check in the process of storage and transmission and demonstration.
As one embodiment of the present of invention, or/and have the standard code of the text of standard code and do not exist in local character library, then execution in step 207 at the coding of searching user-defined figure for the text message display terminal.The embodiment of the invention provides step 207,208,209,210, guarantees that when there was not corresponding data bitmap in the local character library of text display terminal, the information of transmission can normally show, the range of application of expansion project and increase user's experience.
The message of data bitmap is asked in step 207, transmission;
The text message display terminal transmits terminal to text message and sends the message of asking for data bitmap.Text message transmits terminal execution in step 208, step 209.
Step 208, receive and to ask for the data bitmap of user-defined figure or/and have the message of data bitmap of the text of standard code;
The data bitmap of step 209, the user-defined figure of transmission is or/and have the data bitmap of the text of standard code;
Text message display terminal execution in step 210 and step 211.
The data bitmap of step 210, the user-defined figure of reception is or/and have the data bitmap of the text of standard code;
This data bitmap be with local character library in the data bitmap of non-existent coding graph of a correspondence information.Step 206, further according to the data bitmap of the user-defined figure that receives or/and have the self-defining figure of data bitmap explicit user and the text of the text of standard code.
As one embodiment of the present of invention, be convenient data bitmap by this figure of coding lookup or text.
The text message that the embodiment of the invention provides transmits and display packing also comprises:
Step 211, with the data bitmap of user-defined figure or/and have the coding of the data bitmap of text of standard code and user-defined figure or/and have the standard code corresponding stored of the text of standard code.
The data bitmap corresponding stored of the coding of user-defined figure and this user-defined figure has the standard code of text of standard code and the data bitmap corresponding stored of this text with standard code.Need to prove: information transmits at two terminal rooms, has conversation procedure between two terminals, and can there be certain hour in this conversation procedure; Non-existent coding and corresponding data bitmap thereof can exist in this conversation procedure in the local character library of terminal storage.Behind this conversation end, the non-existent coding of script may be defined as the new user-defined figure or the coding of text in the local character library of terminal.The embodiment of the invention also provides the terminal of using said method.
Embodiment three
This embodiment text message transmission terminal when the text message display terminal transmits text-string, adopts first kind of text character string format for the first time, and the text message display terminal is preserved non-existent encoding of graphs and corresponding data bitmap thereof in the local character library; When text message transmits terminal and sends the identical data bitmap of identical encoding of graphs correspondence once more, adopt second kind of text character string format, the text message display terminal is searched local character library, if the encoding of graphs and the corresponding data bitmap thereof that do not exist text-string to carry then transmit terminal to text-string and send the message of asking for data bitmap.
Text information transmits terminal for the first time when the text message display terminal sends text-string, carry data bitmap, when sending the corresponding identical data bitmap of identical encoding of graphs once more, text-string no longer carries data bitmap, reduce the data bitmap translation burden that text message transmits terminal, and reduce the size of data of carrying of text-string, reduce in the transmission course taking too much bandwidth, thereby reduce network burden.
As shown in Figure 5, embodiment of the invention text message transmission that provides and embodiment three flow charts that are earlier;
Step 301, text message transmit terminal and gather the information that the user edits;
The graphical information that the user edits comprises: have the text of standard code and do not have the user-defined figure of standard code.
Step 302, text message transmit terminal the information translation that the user edits are become text-string;
Information according to the user who collects edits if only comprise the text with standard code, then converts the text to the text-string that comprises standard code; If the information that the user edits includes only the user-defined figure that does not have standard code, then the User Defined figure is converted to the text-string of the data bitmap that comprises coding and this figure; If the information that the user edits includes the text of standard code and does not have the user-defined figure of standard code, the information translation of then this user being edited becomes to comprise: the coding that the text of standard code is arranged, and, the coding of User Defined figure and the data bitmap of this self-defined figure.
Wherein, the coding of user-defined figure specifically can be defined as: E000 to the F8FF section of Unicode coding, this does not define any literal, and the coding that can be used as the graphical information that does not have standard code uses, and is used for representing to be inserted into the graphic symbol in the text.The form of expanded text character string is: graphic symbol encoded, is numbered E000+n respectively, and n=0,1,2,3 ...; Promptly first graphic symbol of Cha Ruing is encoded to E000, and second is encoded to E001, and the like.
This embodiment text message transmits terminal when the data bitmap of coding that transmits user-defined figure for the first time and correspondence thereof, uses first kind of text character string format, carries the data bitmap of user-defined figure.When the data bitmap of coding that transmits identical user-defined figure for the second time and correspondence thereof, use text character string format shown in Figure 4, the text-string that text message transmits the terminal transmission includes only: the coding of user-defined figure.
Step 303, text message transmit terminal and send text-string;
Text-string is sent to the text message display terminal by network.
Step 304, text message display terminal receive text-string;
Execute routine text message and transmit terminal when the data bitmap of coding that transmits user-defined figure for the first time and correspondence thereof, the text-string of the reception during text message transmits comprises: the data bitmap of the coding of User Defined figure and User Defined figure.When the data bitmap of coding that transmits identical user-defined figure for the second time and correspondence thereof, the text-string of the reception during text message transmits comprises: the coding of User Defined image.Simultaneously, the text-string that receives of text message display terminal also may comprise the coding of the figure with standard code.The data bitmap of the user-defined figure of text is: the graphical content of this graphical information by pixel, vector representation.For example: dot matrix word library, dot matrix are a kind of forms of digitlization character library, and each font is formed with black and white picture element matrix; Vector font library, vector font library are preserved is descriptor to each Chinese character, such as a stroke initial, stop coordinate, radius, radian etc.
Step 305, text message display terminal are searched coding in local character library;
In local character library, search the coding of user-defined figure and have the standard code of the text of standard code.If above-mentioned being coded in the local character library exists, then direct execution in step 310.For the text-string of the first kind of form of employing that receives, if above-mentioned coding has any coding not exist, then execution in step 311, simultaneously execution in step 310.For the text-string of the second kind of form of employing that receives, if above-mentioned coding has arbitrary coding not exist, then execution in step 306.
Step 306, text message display terminal send the message of asking for data bitmap;
The text message display terminal transmits terminal to text message and sends the message of asking for data bitmap.
This data bitmap may be the data bitmap of user-defined figure, also may be the data bitmap of non-existent standard code correspondence on the text display terminal.
Step 307, text message transmit terminal and receive and ask for the data bitmap of user-defined figure or/and have the message of data bitmap of the text of standard code;
Text message transmits terminal when converting user-defined figure to text-string, preserves the data bitmap of this user-defined figure.
Step 308, text message transmit terminal and send the data bitmap of user-defined figure or/and have the data bitmap of the text of standard code;
Step 309, text message display terminal receive the data bitmap of user-defined figure or/and have the data bitmap of the text of standard code;
This data bitmap be with local character library in the data bitmap of non-existent coding graph of a correspondence information.
Step 310, according to the self-defining figure of data bitmap explicit user or/and text;
According in the local character library with the coding of user-defined figure or/and have the corresponding data bitmap of standard code of the text of standard code, or transmit user-defined figure that data bitmap that terminal sends shows that non-existent coding is corresponding in the local character library or/and text according to text message.
Step 311, with the data bitmap of user-defined figure or/and have the coding of the data bitmap of text of standard code and user-defined figure or/and have the standard code corresponding stored of the text of standard code.
The data bitmap corresponding stored of the coding of user-defined figure and this user-defined figure has the standard code of text of standard code and the data bitmap corresponding stored of this text with standard code; Convenient data bitmap by this figure of coding lookup or text.
Need to prove: information transmits at two terminal rooms, has conversation procedure between two terminals, and can there be certain hour in this conversation procedure; Non-existent coding and corresponding data bitmap thereof can exist in this conversation procedure in the local character library of terminal storage.Behind this conversation end, the non-existent coding of script may be defined as the new user-defined figure or the coding of text in the local character library of terminal.The embodiment of the invention also provides the terminal of using said method.
Fig. 6 is that the information that provides of the embodiment of the invention transmits first of terminal and implements illustration.
This embodiment converts user's editing graph to comprise the coding and the data bitmap of figure text character string format, has realized the transmission of user-defined figure.The embodiment of the invention transmits and the self-defined figure of explicit user by text-string, and the embodiment of the invention is simple, realizes easily, to realizing that demanding terminal is not high, saves resource, and improves user experience.
Text message transmits terminal and comprises:
Collecting unit 510 is used to gather the information that the user edits, and the information that described user edits comprises: user-defined figure;
First converting unit 521 is used for converting the user-defined figure of described collecting unit collection to text-string, and described text-string comprises: the coding of described user-defined figure and the data bitmap of described user-defined figure;
Transmitting element 530 is used to send described text-string.
Further, described text transmission terminal also comprises: second converting unit 522;
The information that the user that described collecting unit 510 is gathered edits also comprises: the text with standard code;
Described second converting unit 522 is used for the text-converted that described user edits is become text-string, and described text-string also comprises: the standard code of the text that described user edits.
This embodiment text transmits terminal increases by second converting unit, the standard code of converting users editor's text simultaneously, text transmits terminal not only can be used for the self-defining figure of converting users, the standard code of text that simultaneously can the converting users editor increases the range of application that text transmits terminal.
According to method embodiment, the present invention also provides second embodiment of the terminal of text message transmission.
Fig. 7 is that the text message that provides of the embodiment of the invention transmits second of terminal and implements illustration;
Text message transmits second embodiment of terminal with respect to embodiment one, the text-string that transmitting element sends includes only the coding of User Defined figure and has the coding of the text of standard code, when receive that the text display terminal sends ask for data bitmap message the time, just send data bitmap to the text display terminal.The content that the text-string that the terminal that transmits present embodiment, text message transmits carries has reduced the Internet resources that take.
The terminal that a kind of text message transmits comprises:
Collecting unit 510 is used to gather the information that the user edits, and the information that described user edits comprises: user-defined figure;
First converting unit 521 is used for converting the user-defined figure of described collecting unit collection to text-string, and described text-string comprises: the coding of described user-defined figure;
Transmitting element 530 is used to send described text-string.
Further, the terminal of described text message transmission also comprises: second converting unit 522;
The information that the user that described collecting unit 510 is gathered edits also comprises: the text with standard code;
Described second converting unit 522, the user becomes text-string with the text-converted with standard code of described collecting unit collection, and described text-string also comprises: the standard code of the text that described user edits.
This embodiment text transmits terminal increases by second converting unit, the standard code of converting users editor's text simultaneously, text transmits terminal not only can be used for the self-defining figure of converting users, the standard code of text that simultaneously can the converting users editor increases the range of application that text transmits terminal.
After the information translation that text message transmission terminal will be used to edit becomes text-string, preserve the data bitmap of user-defined figure simultaneously.
Further, the terminal of described information transmission also comprises:
Message sink unit 540 is used to receive the data bitmap of asking for described user-defined figure or/and the message of the data bitmap of described text with standard code;
Data transmission unit 550 is used to send the data bitmap of described user-defined figure or/and described data bitmap with text of standard code.
According to the description of method, the terminal that the embodiment of the invention provides text message to show.
Fig. 8 is that first of the text message display terminal that provides of the embodiment of the invention is implemented illustration.
This embodiment information terminal directly according to the data bitmap display graphics content in the text-string, has been realized the demonstration of user-defined figure when information shows.The embodiment of the invention is by the self-defined figure of text-string explicit user, and the embodiment of the invention is simple, realizes easily, to realizing that demanding terminal is not high, saves resource, and improves user experience.
The terminal that a kind of text message shows comprises:
Receiving element 610 is used to receive text-string, and described text-string comprises: the coding of user-defined figure and the data bitmap of described user-defined figure;
Display unit 620 is used for showing described figure according to the data bitmap of described user-defined figure.
Further, described text message display terminal also comprises: search unit 630;
The text-string that described receiving element 610 receives also comprises: the standard code of the text that the user edits;
The local character library data bitmap corresponding with described standard code searched according to the standard code of described text in the described unit 630 of searching;
Described display unit 620 is used for searching the data bitmap that the unit finds and showing described text according to described.
The unit is searched in this embodiment text terminal increase before this, search the standard code of the text that the user edits simultaneously, the text display terminal not only can be used for the self-defining figure of explicit user, and the standard code of text that simultaneously can the explicit user editor increases the range of application of text display terminal.
According to method embodiment, the present invention also provides second embodiment of the terminal of text message demonstration.
Fig. 9 is that second of the text message display terminal that provides of the embodiment of the invention is implemented illustration;
Second embodiment of text message display terminal is with respect to embodiment one, the text-string that receiving element receives includes only the coding of User Defined figure or/and have the coding of the text of standard code, when the coding that do not exist in the local character library in the text-string, message sending unit sends asks for data bitmap message, the content that text-string carries takies less Internet resources with respect to embodiment one minimizing.And the corresponding data bitmap of non-existent coding in the local character library of the cell stores of text display terminal, maintenance and text transmit the consistency of terminal data bitmap at any time, the transmission and the demonstration of convenient user-defined figure or text.
The terminal that a kind of text message shows comprises:
Receiving element 610 is used for receiving and deposits text-string, and described text-string comprises: user-defined encoding of graphs;
Search unit 630, be used for searching the coding of described user-defined figure in local character library;
Display unit 620 is used for when the local character library of being coded in of described user-defined figure exists, and then the data bitmap of the coding correspondence of the described figure of foundation shows described user-defined figure.
Further, the text-string of described receiving element reception 610 also comprises: the text with standard code;
Described standard code with text of standard code is further searched in local character library in the described unit 630 of searching;
Described display unit, when searching the unit and searching described standard code and exist in local character library, then the data bitmap according to described standard code correspondence shows described text with standard code described.
Further, described text message display terminal also comprises:
Message sending unit 640, be used for searching the coding of described user-defined figure or/and described standard code with text of standard code does not exist in local character library, send the data bitmap ask for described user-defined figure or/and the message of the data bitmap of described text with standard code in the described unit of searching;
Data Receiving unit 650, be used to receive described user-defined figure data bitmap or/described data bitmap with text of standard code;
Display unit 620, be used for according to the data bitmap of described user-defined figure or/the self-defining figure of data bitmap explicit user of described text with standard code is or/and described text with standard code.
As one embodiment of the present of invention, message sending unit is asked for non-existent data bitmap in the local character library, the Data Receiving unit receives this data bitmap, guarantee when there is not corresponding data bitmap in the local character library of text display terminal, the information that transmits can normally show, the range of application of expansion project and increase user's experience.
Further, described text message display terminal also comprises:
Memory cell 660, described search the unit search described user-defined figure coding or/and described standard code with text of standard code in local character library, do not exist, described Data Receiving unit receive described user-defined figure data bitmap or/data bitmap of described text with standard code with the data bitmap of described user-defined figure or/and the coding of the data bitmap of described text with standard code and described user-defined figure or/and have the standard code corresponding stored of the text of standard code.
This embodiment text message display terminal increases memory cell, it is convenient when user-defined figure is used again, the text message display terminal can directly be searched the data bitmap that local character library is sought this user-defined figure, needn't send the message of asking for data bitmap again, reduce the terminal processes flow process, convenient quick videotex information.
More than text message that the embodiment of the invention provided is transmitted and the method that shows and text message transmit and the terminal that shows is described in detail, used specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.