Summary of the invention
The objective of the invention is in the text chat of instant messaging, solve the problem of the simple displaying of existing text chat content literal, provide a kind of when text chat, can be according to mood, and the topic of chat, select different chat scenarios, build the method for varying environment for chat.
Another object of the present invention is to make the text chat both sides use same chat environment synchronously, and can be by carrying out action, make the chat both sides can carry out the action of same chat but scene synchronously, thereby make chat environment carry out dynamic change synchronously the chat both sides.
Another object of the present invention is that the user can oneself make scene, by the file chat, just can automatically new document scene be sent to chat correspondent.
Technical scheme provided by the invention is a kind of method that realizes sight chat between the instantaneous communication system client, it is characterized in that two instantaneous communication system clients comprise background at the text chat window, animation, when the sight of sound is chatted, as follows:
At first, transmit leg obtains sender-selected chat scenario title, and the chat content that comprises literal, picture and animation of transmit leg input and/or selection, and these information datas packings are sent by the transmit leg computer network interface;
Through the transmission of network, read by recipient's computer network interface, after the bag data that receive were unpacked, whether the scene of judging recipient's present chatting window by both sides' chat scenario title relatively was identical with scene from transmit leg;
If scene is identical, then directly the chat content of receiving dynamically is presented in the chat content viewing area of recipient's present chatting window; If scene is inequality, then chat content dynamically is presented in the chat content viewing area of recipient's present chatting window, and in recipient's chat window, loads the scene identical with transmit leg.
Show the scene actions menu of this scene in the described text chat window, after a scene action in the described scene actions menu of sender-selected execution, described scene action dynamically is presented in the scene of local chat window at first at once, by the transmit leg network interface, scene title and scene denomination of dive are arrived the recipient by Network Transmission simultaneously;
The recipient receives described information by its network interface, if both sides' chat window has loaded identical scene, then the recipient selects scene action that transmit leg sends so that its execution in its scene actions menu; If, then in recipient's chat window, load the scene identical earlier with transmit leg when both sides' chat window has loaded different scenes.
Describedly in recipient's chat window, load the scene identical and further comprise the steps: with transmit leg
At first, according to the chat scenario title in the transmit leg chat content, judge whether recipient this locality exists this chat scenario file; If have this chat scenario file, then this chat scenario be loaded into chat window; If there is no this chat scenario file inquires then whether the recipient receives this chat scenario;
If the recipient agrees to receive, then the recipient asks transmit leg that the chat scenario file is sended over by the file transfer passage, receive described document scene after, described chat scenario is loaded into chat window; If recipient's rejection, then recipient's scene does not change.
Described chat scenario file comprises resource file used in scene master file and the scene, and described each file all is stored in the computer and is called under the catalogue of directory name with scene; Described resource file comprises picture file, audio files and animation file.
Described recipient judges local whether have the chat scenario file further following steps identical with the used chat scenario of transmit leg: at first check the catalogue that whether has this scene title under the scene catalogue of TALKER installation directory, if there is described catalogue, reexamine and whether contain the scene master file under the described catalogue, if contain, then show local this scene that exists of recipient, otherwise, show the local not chat scenario file identical of recipient with the used chat scenario of transmit leg.
Described transmit leg further comprises the steps: the chat scenario file by the method that the file transfer passage sends
1) transmit leg and recipient set up the interface channel of file transfer;
2) transmit leg is packaged into a file with the chat scenario master file under the described scene catalogue and all resource file compressions of scene, sends to the recipient by the file transfer passage;
3) after the recipient receives the file of described compression, decompress, in computer, create the catalogue that is called directory name with the scene name according to the title of scene, and the All Files after will decompressing is stored under this catalogue.
Chat scenario master file of the present invention is the file that generates with HTML, it uses HTML that background image, the background color of chat are set, the font color of chat literal, the chat content viewing area, picture outside the chat content viewing area and animation, and/or the file that plays sound; Described scene master file utilizes the function of HTML to define scene and moves, when carrying out the scene action, and the described function of routine call, thus realize that picture changes, sound playing, and/or the function of animation demonstration.
The text chat window of instant messaging of the present invention is presented on the calculator display organization, described text chat window is made up of chat content input area and chat content viewing area, and described chat content viewing area is to utilize browser control part to show the chat content of described transmission or reception.
Use the method for the invention in instantaneous communication system after, the user can oneself make chat scenario, perhaps downloads other scene from the Internet, (comprises the chat background by the cyberchat environment that uses scene to change me in the text chat process.Chat animation, music etc.), also can the synchronous change chat correspondent cyberchat environment (needing the other side to agree to accept scene), thereby make text chat vivid and interesting more in the instant messaging.
Embodiment
Further specify implementation method of the present invention below in conjunction with accompanying drawing.
In an embodiment of the present invention, the method for the invention is that instantaneous communication system product UC by Lang Ma Information Technology Co., Ltd realizes that this product has been created the UC chat scenario in instantaneous communication system.
Common instantaneous communication system can be supported the text chat between the user, after the user opens the text chat window, the user can input characters, click " transmission ", can send to the other side by network, the other side can see the literal that oneself sends in the text chat window; Equally, the literal that the other side sends also can be presented in we's the chat window.
The transmission frame of common text chat window and reception display box, all be to use the RICHEDIT control to realize, so in receiving display box, the chat literal of receiving (can only be comprised content of text, font, color etc.) directly be inserted in the sink block and show.
The invention of UC chat scenario has realized being not limited between the user interchange of literal, the reception display box of the text chat window of UC itself is exactly the control of a web browser (IE), because web browser can be explained HTML(Hypertext Markup Language), and html language has been created lively Internet just, so the reception display box of the chat window of UC also can be explained html language, like this, UC document scene with the html language generation, just can be presented in the chat window of UC, thereby demonstrate various dynamic effects.
In the chat process of UC, the user can select the document scene of UC, behind the use document scene, the sink block of local chat window just can demonstrate the scene that this document scene comprises, and can comprise picture, animation, sound can simulate colourful life scene.
If the user wishes chat correspondent and oneself and uses same scene, so in the process of text chat, except the chat content of sending out me, also scene can be sent to the other side goes (if there is not this document scene to exist in the other side's computer, then can send document scene to the other side simultaneously), like this, just can reach the literal of client's chat on the basis of plain text chat, color, figure, animation, the interchange of sound, the level that the text chat rising scene between the client is chatted is in same scene, can browse identical animation background between the user, hear interesting to listen to background music, can send the literal of the five colours to the other side, and the emotion icons of animation, even can initiate to move in the scene, bring the enjoyment of scene variation to the other side.
Fig. 1 has showed a kind of general computer environment of fundamental sum, and the present invention realizes on this environment or more senior or complex environment.
As shown in Figure 1, personal computer 20 comprises a central processor CPU 21, and Installed System Memory 22, system bus 23 are used for connecting several computers and form part.Installed System Memory 22 has then comprised read-only memory (ROM) 24, random access memory (RAM) 25, basic input output system (BIOS) 26.
Personal computer also comprises input-output apparatus, for example be used for data are read in and write the hard disk drive 28 of hard disk, and the disc driver 29 that is used for reading or writing disk, be used for reading the CD drive 31 of CD in addition, these several equipment are by hard disk drive interface 33, disk drive interface 34, CD-ROM driver interface 35 links to each other with system bus 23.These drivers can provide different data, program etc. to personal computer 20 by reading corresponding media.
Other IO equipment, for example display 36, keyboard 37, mouse 38, sound card 39 all is the assembling commonly used of personal computer 20, and the picture joystick, other equipment such as audio amplifier can be used as the apolegamy of personal computer.
If personal computer need carry out network operation, for example be connected with the computer 41 and/or 46 of or many far-ends, just must possess network interface 40.Far-end computer may be other personal computers, or a station server, and a router, or a network PC, common ground are that these possible far-end computers all contain the composition roughly the same with personal computer 20.Fig. 1 comprises that also local network connects 43, and the logic signal of wide area network connection 44, as office's local area network (LAN), and enterprise's broadband networks, the Internet all is that such network is formed.
In being in LAN environment, personal computer 20 has been connected on the local area network (LAN) 43, thereby has communicated by letter with other local area network (LAN) computers 41 by local area network (LAN) by network interface 40.When using wan environment, personal computer can use modulator-demodulator 45 or other wide area network connection devices and wide area network 44 to connect generally speaking, and like this, personal computer 20 just can carry out communication with far-end computer 46.
When network data need send, data can be passed through network interface with the form of network packet, send to local area network (LAN) 43 or wide area network 44, equally, from network interface 40, also can receive the data from local area network (LAN) 43 or wide area network 44, the transmission of these data and reception are handled and are being discussed in detail with the lower part.
Fig. 2 has showed the logical schematic of the transfer of data in the practical communication process.This logic diagram has showed the data transmission procedure between local personal computer 20 and the far-end computer 46.Local personal computer 20 connects by local area network (LAN) or wide area network physical equipment 44 by computer network interface 40, and network data is not described in detail by the process that the actual physical circuit transmits herein.
UC client program module 80 is the software modules that can move on computers, during this module operation, is loaded in the internal memory 22 of computer.The UC client program module mainly comprises text chat 90 and file transfer 91 modules.
Wherein text chat module 90 is responsible for chat content, and obtaining of contents such as the title of chat scenario and scene denomination of dive packed, and sends.Be responsible for reception in the other direction, unpack, show.User A is positioned at local computer 20, remote subscriber B is positioned at far-end computer 46, when carrying out text chat, user A is by keyboard input devices 37, perhaps mouse device 38 can be imported the chat literal, perhaps select chat scenario, the chat action, the text chat module 90 of UC client program module 80 can obtain the content of user's input, and, data are packed, after the packing according to the bag transformat of UC software, to wrap data and give TCP/IP module 50, with the network address of the far-end computer 46 of remote subscriber B, the network port is assigned to the TCP/IP module, is sent by the TCP/IP module simultaneously, the TCP/IP module is the module that operating system is responsible for Network Transmission, and this module can send the data that the user need be transmitted by computer network interface 40.After the bag data of reality send to object-computer 46, can be read by TCP/IP module 50 by computer network interface 40, the TCP/IP module can be wrapped this data and be passed to text chat module 90, the text chat module is by after unpacking, in the chat window that is presented at remote subscriber B that content is correct.Conversely, user B also is like this to the transmission course of the text chat of user A transmission.
Document transmission module 91 then is responsible for the document transmission process of the whole file between the user, when user A need send file to user B, and user B is when agree receiving, the content that reads the file that needs transmission of document transmission module meeting block-by-block (512 bytes are), and pack, to wrap data and give TCP/IP module 50, the network address and the network port with the REMOTE MACHINE 46 of remote subscriber B is assigned to the TCP/IP module simultaneously, sent by computer network interface 40 by the TCP/IP module.After the packet of reality arrives far-end computer 46, can be read by TCP/IP module 50 by computer network interface 40, the TCP/IP module can be given document transmission module with the file transfer bag data that read, unpack by document transmission module, subsequently with the storage received in the file that receives.Like this, when all pieces of the transmission file of user A all were transferred to user B, whole file just transmission had been finished.
Fig. 3 has showed the manufacturing process of UC document scene.UC chat scenario file be the text chat of UC system in order to realize a kind of file of the present invention, the chat scenario file comprises employed resource file in scene master file and the scene master file, comprises picture file, audio files, animation file etc.
The core of UC chat scenario file is the scene master file, and this file is the file that is generated with HTML(Hypertext Markup Language), is the document scene of tcv through having generated suffix after encrypting.
Generating UC chat scenario file can realize by UC scene tools, can certainly directly write html source code and realize, uses the generation document scene that UC scene tools can What You See Is What You Get.
Make the process of document scene, be actually the process that generates the html file content, on the html file 100 of blank, the user in no particular order order carry out following several operation:
● the position and the size of chat content viewing area can be set: when carrying out text chat with the other side, after using the scene chat, can contain background patterns or other animations etc. in the scene, after being provided with the chat content viewing area, the literal of both sides' chat will only appear at the zone of setting in the text chat window.
● font color that the other side says and the font color of oneself saying can be set: when carrying out text chat with the other side, because the speech of oneself and the other side's speech all can be presented in the chat content viewing area of text chat window, so can show automatically all on the speech content each time of oneself one " the own pet name is said " that these several words will show with the font color that oneself that is provided with in the scene said; And on the other side's speech content each time, all can show one " the other side's pet name is said " automatically, the font color that these several words can be said with the other side who is provided with in the scene shows.In the process of chat, just can tell speech content of oneself and the other side's speech content very clearly like this.
● can increase multimedia documents such as picture, sound, background color: html language can show various pictures, and animation can play sound, and is same, and the scene of using html language to generate also can reach this effect.
When inserting picture back.gif in scene, what generate in fact is a html language code:
<img?border=″0″src=″back.gif″width=″449″height=″51″>
When background color is set, also be modification in fact to the scene html file:
<body?bgcolor=″#0000FF″>
● can increase the scene action:
The scene action is part and parcel among the present invention.
All actions in the scene, all form in accordance with regulations is stored in the html file, and for example in the scene of " spring is green ", the HMTL statement of storage scenarios action is:
<input type=hidden id=" SEND_ACTION_LIST " value=" spring rain; It is fine " 〉
<input type=" hidden " id=" it is fine " name=" it is fine " onclick=" javascript:jump (0) " 〉
<input type=" hidden " id=" spring rain " name=" spring rain " onclick=" javascript:jump (1) " 〉
These several HTML statements, represent to contain in this scene two actions: " spring rain ", the action of " day fine " scene is actually that the function code used in the html file realizes, in this function code, can carry out multiple dynamic operation, playing animation for example, stops animation plays sound, stop sound, the action of " it is fine " in the above example, is carried out in multiple behaviors such as changing background color, be exactly the code that has called " javascript:jump (0) " in fact, and in " spring is green " document scene, jump is a function, and being has following code to constitute:
function jump(type) { if(type=="1") { cloudy0.width=0; cloudy1.width=0; window.clearInterval(interval); bg_d.background="spring_rain.gif"; cat.src="raincat.gif"; cat.width=107; cat.height=131; bg_s.src="rain.wav"; <!-- SIPO <DP n="7"> --> <dp n="d7"/> bg_s.loop=-1; }else if(type=="0") { cloudy0.width=120; cloudy1.width=120; bg_d.background="" cat.src="cat.gif"; cat.width=76; cat.height=99; bg_s.src=""; bg_s.loop=0; start(); } }
When the text chat window uses scene, will at first read the place of the description scene action form in the scene html file, after all actions are read out, be presented in the action lists menu of text chat window, when carrying out text chat with the other side like this, can select to carry out any one action in the action lists menu, this action can at first be carried out in this locality, the scene denomination of dive can be arrived the other side by Network Transmission simultaneously, in the other side's text chat window scene, also carry out this scene action.Carry out the real process of this scene action, be invoked at the function of the html file when bearing scene exactly, just can carry out this function, so, the various statements in this function all can be carried out, thereby demonstrate the various effects when designing this action.
Fig. 4 has showed the loading of text chat window and has used the process of scene.Load certain scene in the text chat window by two kinds of situations, a kind of may be certain scene that the local user has selected this machine; Another kind may be in text chat, and the other side selects to have used certain scene, can do by myself and uses the scene identical with the other side.
The transmission of scene is transmitted in and has detailed description among Fig. 5 in the concrete text chat.
When the text chat window will load certain scene, at first can read the scene master file (suffix is the file of tcv) under the catalogue that is stored in this scene in the computer, after this file is decrypted, generate a html file, this process is the anti-process of making scene described above.
Chat content viewing area in the text chat window is a browser control part in essence.This control can be finished the function of browser, can explain and show html file, the browser control part that the html file that deciphering is generated behind the document scene is given chat window reads and shows, just the scene of before having made can be presented at the text chat window.Make the designed picture of this scene, audio files is because also be stored under the scene catalogue, so the text chat window just can demonstrate the background in the scene, picture, effects such as animation when loading HTML code.
When in the text chat window, the user sends chat content (comprising literal, picture or animation) to the other side, when perhaps receiving the other side's chat content 145, at this moment, the text chat window can be according to the form of text, picture or the animation of html language, the dynamic HTML content that loads in the browser control part of revising so just can reach the effect in the chat zone that the chat content that will receive is presented at (comprising literal, picture or animation) scene dynamically.
Fig. 5-a has showed that user A is when user B carries out text chat use chat scenario, as the flow chart of transmit leg.
When user A opens text chat window with user B 120, expression user A has begun the text chat process with user B.
User A can choose any one scene 121 that has been installed on the local computer, and concrete loading procedure and method are described in Fig. 4.After loading is finished, this scene just is presented in the chat window 123, input equipment by computer, the user can be in the input frame of text chat window input text chat content (perhaps selecting picture, animation to be inserted into input frame) 122, after input is finished, click " transmission " key 127 of text chat window, will be with text chat content (or picture, animation), and the title of scene sends to the other side (user B), and concrete scene process of transmitting is referring to the description of Fig. 2.
After information sent, the input frame of text chat window can be cleared, and user A can continue to import other guide, also can select other scenes, as above-described process, can repeat.
When user A closes chat window with user B 127, this chat process finishes.
And the other side's of text chat (user B) receiving course is described in detail in Fig. 5-b.
With reference to figure 2, can recognize that text chat information that user A sends by the process of Network Transmission to user B, just no longer describes herein.
When user B receives chat message from user A 130, at first judge whether to have opened text chat window 132 with user A, if this window is not also opened, can point out the user to open, perhaps open automatically with the chat window 133 of user A (according to the user be provided with different), after the text chat window is opened, need judge, whether the scene of user B present chatting window is with identical from the scene of user A, if scene is identical, then directly the chat content of receiving (literal, picture or animation) is shown to dynamically in the scene 145.
If scene is inequality, then check the scene whether user B this locality exists user A to send, concrete determination methods is, at first check under the scene catalogue of UC program installation directory whether have the catalogue of this scene title,, reexamine whether contain the scene master file that suffix is tcv under this catalogue if this catalogue is arranged, if contain, then show local this scene that exists of user B, otherwise, the scene that user B this locality does not have user A to send shown.
If the scene that user B this locality exists user A to send after then the text chat window of user B reloads this scene, dynamically is presented in the scene 145 with the chat content of receiving (comprising literal, picture or animation).
If the scene that user B this locality does not exist user A to send, can inquire in the text chat window then whether user B agrees to receive document scene 140, the user can select by clicking " agreement " or " refusal ", no matter clicking, the user agrees or refusal that the chat content of receiving all can be presented at (comprising literal, picture or animation) the chat content viewing area of former scene.
If user B agree to receive document scene, then will call the subprocess 160 that receives document scene from user A, subprocess 160 turns to the inlet of Fig. 7 with follow-up flow process, and detailed document scene transmission course is referring to the process introduction of Fig. 7.
When user A sent the text chat content constantly for user B, said process can repeat, and closed text chat window with user A up to user B.
Fig. 6-a has described the process of using the scene action in the text chat process.
When user A opens text chat window with user B 120, expression user A has begun the text chat process with user B.
User A can choose any one scene 121 that has been installed on the local computer, and concrete loading procedure and method are described in Fig. 4.After loading is finished, the scene action that comprises in this scene can be listed in the scene actions menu of text chat window, the user can select one of them scene action to carry out 124, the scene action at first can be carried out in local scene, effect can be presented in the scene of chat window 125 at once, simultaneously, can be by the text chat communication process, scene title and scene denomination of dive are transferred to the other side (user B) 128, as long as do not close text chat window with user B, user A can continue to select other scenes, perhaps carries out other actions in the scene.
Behind the text chat window of closing with user B 129, local text chat process finishes.
Fig. 6-b has described in the text chat process, as the recipient, receives the process of scene action.
With reference to figure 2, can recognize that text chat information that user A sends by the process of Network Transmission to user B, just no longer describes herein.
The information that user B receives from user A is scene title and scene denomination of dive.The text chat module of user B at first judges whether to have opened the text chat window 132 with user A, if this window is not also opened, can point out the user to open, perhaps open automatically with the chat window 133 of user A (according to the user be provided with different), after the text chat window is opened, need judge that whether the scene of user B present chatting window is with identical from the scene of user A, if scene is identical, then directly in scene, carry out the action 146 that user A sends.
The execution principle of moving in the scene is discussed referring to the detailed description of Fig. 3.
If scene is inequality, then check the scene whether user B this locality exists user A to send, concrete determination methods is, at first check under the scene catalogue of UC program installation directory whether have the catalogue of this scene title,, reexamine whether contain the scene master file that suffix is tcv under this catalogue if this catalogue is arranged, if contain, then show local this scene that exists of user B, otherwise, the scene that user B this locality does not have user A to send shown.
If the scene that user B this locality exists user A to send after then the text chat window of user B reloads this scene, is then directly carried out the action 146 that user A sends in scene.
If the scene that user B this locality does not exist user A to send, can inquire in the text chat window then whether user B agrees to receive document scene 140, the user can select by clicking " agreement " or " refusal ", because user B this locality this moment does not also have this scene, so the scene that user A sends action just can't be carried out.
If user B agree to receive document scene, then will call the subprocess 160 that receives document scene from user A, subprocess 160 turns to the inlet of Fig. 7 with follow-up flow process, and detailed document scene transmission course is referring to the process introduction of Fig. 7.
When user A sent the text chat content constantly for user B, said process can repeat, and closed text chat window with user A up to user B.
If Fig. 7 has described recipient this locality when not having scene that transmit leg transmits, receive the process of document scene by the file transfer passage from transmit leg.
In the introduction of Fig. 2, described by computer hardware, network, and software module carries out the process of file transfer, in the present invention, the transmission of scene is finished by the file transfer passage.
When user B with the text chat process of user A in, chat message or scene action that user A sends have been received, and the scene title that user A sends does not exist in this locality of user B, at this moment, user B can select directly to receive document scene itself from user A, be stored in the local computer, like this, in the chat process afterwards, oneself just can use this scene, also can send this scene to other user.
User B at first sends scene transmission request to user A, scene title and other information 150 that can comprise the transmission of asking in this request, user A receives the scene transmission request back 151 from user B, will be with all scene associated documents (the scene master files under the catalogue of scene catalogue by name, resource files such as other pictures), compress packing, become a file 152, by the file transfer passage this file is sent to user B155 subsequently, finish up to transmission, this transport process of user A finishes.
User B is by the file transfer passage, the reception that does not stop is from the file data 156 of user A, after the whole file of reception is finished, the file that receives is decompressed, be stored in the scene name and be called under the catalogue of directory name untiing All Files that the back generates, subsequently, reinform the text chat window and open the scene of having received.