Summary of the invention
The purpose of this invention is to provide a kind of method and system of in instant messaging, handling multimedia messages immediately, in instant Content of Communication, to realize multimedia instant broadcast.
For solving the problems of the technologies described above, the invention provides a kind of method of in instant messaging, handling multimedia messages immediately, comprising: the corresponding relation of 1) setting up multimedia file and definite character string; 2) receiving terminal is resolved to definite character string that transmitting terminal sends; 3) receiving terminal has judged whether to preserve this corresponding relation of determining character string and definite multimedia file, if having then play this multimedia file, otherwise carries out 4); 4) transmitting terminal send described definite character string correspondence according to the request of receiving terminal multimedia file to receiving terminal, receiving terminal is play this multimedia file.
On the said method basis, 4) further comprise in: receiving terminal is preserved described multimedia file, and the corresponding relation that should determine character string and this multimedia file; Receiving terminal is stored the described corresponding relation of each transmitting terminal respectively.
In the said method, 1) set up the mode of multimedia file and definite character string corresponding relation in and can gather the multimedia messages spanned file for transmitting terminal, and the corresponding relation of definition this document and definite character string; Perhaps, the corresponding relation of each client initialization system multimedia file and definite character string.
On the said method basis, 2) be specially in: transmitting terminal adds label in inter-area traffic interarea, the described definite character string that comprises in the sign instant messages; Receiving terminal arrives described definite character string information according to described tag extraction.
The present invention also provides a kind of system that handles multimedia messages in instant messaging immediately, comprise: the JICQ of instant communication server, client, it is characterized in that, described JICQ comprises: the object information memory cell is used to preserve the corresponding relation of determining character string and multimedia file; Data transmission unit be responsible for and instant communication server between transfer of data, comprise that transmission package contains the instant message data of determining character string, or multimedia file; Resolve the data that data transmission unit obtains the data parsing unit, comprises obtaining the definite character string that comprises in the data; Control unit, judge the information of definite character string of whether having stored the resolution unit acquisition in the object information memory cell, then obtain the multimedia file that this determines the character string correspondence if having, and then export by output unit, otherwise the control data transmission unit sends the solicited message of multimedia file to the opposite end client; And when obtaining solicited message, the control data transmission unit sends multimedia file; Output unit, output multimedia or character string information.
On the said system architecture basics, also can further comprise collecting unit, gather multimedia messages and be converted into object data, set up the corresponding relation of this multimedia information file and definite character string, and be saved in the object information memory cell.
On the said system architecture basics, comprise further that also at least one receives the object information memory cell, is used for unique storage and determines the described definite character string of opposite end client and the corresponding relation of multimedia file; Described control unit is further searched the reception object information memory cell corresponding to current opposite end client, judges whether to store the information of described definite character string that current resolution unit obtains.
Owing in a kind of instant messaging that the present invention carries, carry out in the method for multimedia file broadcast, set up the corresponding relation of specific character string and multimedia file, in carrying out instant messaging, client is obtained multimedia file according to the described specific character string that is resolved to and is play, thereby the instant messaging of having realized multimedia messages has improved the practicality of instant messaging with mutual; The invention provides the instant approach of propagating of a kind of multimedia messages, expanded new function, improved the competence for added value of instant messaging service for the instant messaging service.
Further, among the present invention, the receiving terminal client is dynamically preserved the corresponding relation (object data information) of described definite character string of each opposite end client and multimedia file respectively.This method makes each client of carrying out instant messaging not only can the described corresponding relation of initialization, but also can distinguish self-defined definite character string and multimedia corresponding relation; And, even same character string has been set up corresponding relation with different multimedia files in different clients, because receiving terminal is preserved the described corresponding relation (object data information) of opposite end respectively, thereby can correctly obtain the specific character string multimedia file pointed that current opposite end client sends, and play.Therefore, this method makes the user can carry out personal settings, has further improved practicality of the present invention, and the instant messaging that personalized multi-media information is provided.
The present invention also provides a kind of instant system that handles multimedia messages in the instant messaging that realizes, corresponding, this system has improved the practicality of instant messaging, has expanded new function for the instant messaging service, has improved the competence for added value of instant messaging service.
Embodiment
The invention provides the instant method of handling multimedia messages in a kind of instant messaging, the core concept of this method is: the corresponding relation of setting up multimedia file and definite character string; Receiving terminal is resolved to definite character string that transmitting terminal sends; Receiving terminal has judged whether to preserve this and has determined the corresponding relation of character string and definite multimedia file, if have then play this multimedia file, otherwise the multimedia file that transmitting terminal sends described definite character string correspondence according to the request of receiving terminal is to receiving terminal, and receiving terminal is play this multimedia file.
Following with reference to Fig. 1, specify implementation of the present invention.
Step 11: the corresponding relation of setting up multimedia file and definite character string.
The source of multimedia file comprises: the multimedia system file, and after system installed, a series of multimedia files of configuration during use, can directly be selected from the multimedia system storehouse automatically, but can not be to making amendment with multimedia file corresponding characters string; Perhaps, the User Defined multimedia file, the user can be saved in the multimedia file of gathering in the self-defined multimedia file storehouse, by setting the character string play multimedia files.Gathering acoustic information with client is example, and the JICQ of client provides a collecting unit, and the user can be used for setting up corresponding relation with determining character string by recorded voice; Also can from memory cell, select existing audio files (can be the audio files of any form, for example: mp3, rm etc.) to be used for setting up corresponding relation with character string.In like manner, client can be gathered multimedia file by above-mentioned method and is used to set up corresponding relation with specific character string; And for certain character string of determining, it can be respectively sets up corresponding relation, concrete mode such as following with a definite video file or audio file or picture file or animation file.
Adopt the preservation management method of object information table in the present embodiment, realize management the corresponding relation of multimedia file and definite character string.At first, client is selected definite character string; And then, preserve this character string, the selected multimedia file memory location corresponding with this character string.
Following table is used for description object information table form, the initialized multimedia file of saved system and definite character string corresponding relation in this table, and/or the self-defining multimedia file of local terminal client and definite character string corresponding relation.It is as shown in the table, and a character string is set up corresponding relation with image file and audio files respectively; Whether be that the corresponding relation that system object one row adopt logical value to distinguish this character string and multimedia file is a system initialization, or client is self-defined in the table; If this character string defines during for system initialization, show that then this character string is identical at the pairing multimedia file of all clients, thereby this character string has versatility, and any client can correctly be play its pairing multimedia file after receiving this character string.
id | Character string | The image store path | The sound store path | Whether be system object |
| | | | |
In the process of setting up this object information table, if the character string that client is determined exists in this table, and set up corresponding relation with a certain class multimedia file, promptly certain class multimedia file of this character string correspondence is not empty, then can not repeat to set up the corresponding relation of described character string and such multimedia file in this terminal, promptly at a certain terminal, the character string in the object information table and certain class multimedia file are set up relation one to one.In the last table corresponding relation of setting up character string and image file and audio files only is shown, yet this table can be according to business demand expansion or remove entries, as increase animation store path etc.
Further, each terminal can be set up respectively at the opposite end client and receive the object information table, towards the opposite end client of determining, is used for dynamically preserving the multimedia file of opposite end foundation and the corresponding relation of definite character string.For example, if the customer end A customer end B that transfers immediate news when comprising the self-defining character string in the instant message, can generate one automatically at the B end and receive the object information table, is used for preserving specially character string and the multimedia document information that customer end A sends.Receive shown in the object information sheet form following table.Following table only illustrates the corresponding relation of setting up character string and image file and audio files, yet this table can be according to business demand expansion or remove entries, as increases animation store path etc.
id | Character string | The image store path | The sound store path |
| | | |
When client C, client D...... sent the chat content that comprises self-defined object for respectively customer end B for the first time, the B end all can generate the reception object information table of user C and the reception object information table of user D respectively at different user.
In the present embodiment, set up the reception object information table of each opposite end client respectively, to make each client can carry out personal settings, even same character string in different clients corresponding to different multimedia files, because receiving terminal has been set up reception object information table towards the opposite end client respectively, thereby make receiving terminal can correctly find current opposite end to send specific character string multimedia file pointed, and play.In sum, the foundation of reception object information table makes the user can carry out personalized setting.
Step 12: the instant messaging transmitting terminal sends the instant message that comprises described definite character string, and receiving terminal is resolved and obtained described definite character string.
If customer end A input instant message comprises literal, multimedia objects such as expression, sound.The mode of inserting multimedia object can comprise: select the multimedia file object from the tabulation that system provides; Perhaps, directly multimedia file corresponding characters string is determined in input.
Behind the input instant message, customer end A is carried out the conversion of chat content form.Order reads the instant message of input, represents different data types respectively with label.
To send acoustic information with customer end A is example, adopts following tag identifier target voice before the client.
<wave sound=" miao.wave " isCustom=true img=" cat.bmp "〉mew</wave 〉
In this example, customer end A will send the acoustic information of " mew " to customer end B, and set up the corresponding relation of character string " mew " with audio files in the hypothesis client.
In the superincumbent data format, " mew " is character string described herein;<wave〉</wave〉tag identifier will play sound; IsCustom is a logical variable, and whether be self-defined audio files or system sounds file, if true then is expressed as self-defined sound if being used to identify current target voice; False then is expressed as system sounds; //img represents the file name of object picture; Promptly can show the pictorial information corresponding simultaneously, as the cartoon picture of a width of cloth cat with it corresponding to character string " mew "; //sound represents the file name of target voice.
Customer end B begins to resolve, when customer end B reads<wave after receiving the instant message that client sends〉during label, then knowing needs broadcast<wave〉the pairing audio files of character string that comprised in the label.
Step 13: receiving terminal judges whether to preserve the corresponding relation that this determines character string and multimedia file, carry out step 14 if having then, otherwise carry out step 15.
Step 14: read this multimedia file according to described corresponding relation.In the present embodiment, receiving terminal is with searching the object information table respectively and receiving the object information table, to obtain the multimedia file of described character string correspondence.
Data content with above customer end A transmission is an example.Customer end B is obtained<wave〉escape character (ESC) string " mew " that label comprised, judge whether it is self-defined sound according to attribute isCustom.If system sounds then according to this string searching object information table, finds corresponding audio files " miao.wave ", in like manner, also can obtain the picture file corresponding by this mode with character string.If self-defined sound, then customer end B judges whether to exist towards the reception object information table that receives customer end A, if do not exist, then creates the reception object information table of the character string information that is used for preserving specially customer end A, and carry out step 15; If the reception object information table of described curstomer-oriented end A exists, then customer end B is further searched this table according to escape character (ESC) string " mew ", if find the occurrence of this character string, then obtain this audio files " miao.wave ", promptly obtain this target voice according to the memory location.
Step 15: this transmitting terminal of receiving terminal request sends the multimedia file corresponding with this character string.
If do not find the occurrence with the current character string of receiving in the customer end B, then customer end B sends a request command to customer end A, and requesting client A sends the obj ect file of this character string correspondence.
Step 16: receiving terminal obtains and preserves this multimedia file.
After customer end A is received the request command of customer end B, from the object information table, get access to the memory location of multimedia file (in the present embodiment for target voice " miao.wave ") according to the character string of request, according to finding target voice in the memory location, and send to customer end B; Customer end B receives, and obj ect file is saved in the catalogue of acquiescence, and returns storing path.
In this step, the corresponding relation that customer end B is also further preserved this multimedia file store path, character string is saved in the reception object information table that receives customer end A, promptly this reception object information table is dynamically updated.
Step 17: play this multimedia file.
Customer end B is play after obtaining the audio files " miao.wave " corresponding with character string " mew ", in like manner, also can play multimedia files such as other classes corresponding with this character string such as picture in the lump.
In the foregoing description, comprise isCustom in the data format, this logical value is a non-essential content among this embodiment, if do not comprise this logical value in the data format, then receiving terminal B searches the object information table earlier, if there is not occurrence, then continues to search the reception object information table of curstomer-oriented end A.Promptly when lacking isCustom, search two tables successively and seek occurrence.
Above-mentioned is full implementation example of the present invention, there is the possibility that changes in the foregoing description for those skilled in the art, for example, as indicated above, the function that reception object information table dynamically updates the particular clients character string makes the user can carry out personal settings, has strengthened beneficial effect of the present invention, yet, also can not set up described reception object information table in client, each client is only supported the pairing multimedia file of the initialized character string of Play System in the instantaneous communication system.Therefore on the foregoing description basis, further omit with reception object information table and relevant treatment step and can realize the present invention equally.
A kind of method that adopts tag identifier to determine character string is provided in the above-described embodiments, yet, among the present invention, this data format is not limited.Wave sound=" miao.wave ", isCustom=true etc. are inessential content among the embodiment as mentioned, and receiving terminal can directly be searched by character string " mew ".And, still can adopt additive method to describe/define described character string among the present invention.
On the other hand, adopt described object information table in the foregoing description to described character string and multimedia file, however these those skilled in the art still the visitor set up the corresponding relation of character string and multimedia file by other forms or method and manage.
Below specify an application example of the present invention.
Customer end A is gathered one section mew, is saved in the self-defined sound, and with the escape character (ESC) string of character string " mew " as this section sound.And in the configuration file of self-defined sound, preserve this acoustic information.
Customer end A user imports in the chat conversations frame: " my cat is skin skin, mew "; After this section instant message data sent to customer end B by Server, B began to handle the processing of this segment data;
When customer end B reads this character string " mew " from data after, carry out following operation:
1) in the configuration file (corresponding to object information table mentioned above) in system sounds storehouse, inquires about,, read out this audio files, convert target voice to, and play if find this acoustic information.If do not find this sound, then forward 2 to);
2) customer end B is inquired about in the configuration file (corresponding to reception object information table mentioned above) of the self-defined voice bank of curstomer-oriented end A, if find this acoustic information, reads out this audio files, converts target voice to, and plays.If do not find this sound, then carry out 3);
3) customer end B sends request command to the A client, and request A end sends this section sound;
4) after customer end A receives the request of B, from the configuration file of oneself, find this sound, after this sound compression, carry out segment processing, order is discharged in the storage queue, by point-to-point mode, be transferred to customer end B, after customer end B receives each segment data in order, carry out the MD5 verification, if a certain section bust this, then to A end feedback, the data segment that requires the A end to retransfer and fail is until transmission success;
5) customer end B is organized the data that receive, and the audio files that forms behind the decompress(ion) is saved in the self-defined voice bank of curstomer-oriented end A, and relevant information is saved in the configuration file of self-defined voice bank, plays this sound;
If in one section instant message, when comprising a plurality of sound character string, program will be carried out sequential processes, play a sound after, play next sound again.
The present invention also provides a kind of instant system that handles multimedia messages in the instant messaging that realizes.Comprise: the JICQ 22 of instant communication server 21, client.Described JICQ comprises:
Object information memory cell 221 is used to preserve the corresponding relation of determining character string and multimedia file;
Data transmission unit 222, be responsible for and instant communication server between transfer of data, comprise that transmission package contains the instant message data of determining character string, or multimedia file;
The data that the 223 pairs of data transmission units in data parsing unit obtain are resolved, and comprise obtaining the definite character string that comprises in the data;
Control unit 224, judge the information of definite character string of whether having stored the resolution unit acquisition in the object information memory cell, then obtain the multimedia file that this determines the character string correspondence if having, and then export by output unit, otherwise the control data transmission unit sends the solicited message of multimedia file to the opposite end client; And when obtaining solicited message, the control data transmission unit sends multimedia file;
Output unit 225, output multimedia or character string information.
On said system embodiment basis, also can further comprise collecting unit in this system configuration, be used to gather multimedia messages and be converted into object data, set up the corresponding relation of this multimedia information file and definite character string, and be saved in the object information memory cell.
Described object information memory cell among the said system embodiment also further comprises some storing sub-units; Each subelement is used for unique storage and determines the character string of opposite end client and the corresponding relation of multimedia file; Then described control unit is also further searched the object information storing sub-units corresponding to current opposite end client, judges whether to store the information of described definite character string that current resolution unit obtains.
More than the instant method and system of handling multimedia messages in a kind of instant messaging provided by the present invention 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.