Detailed description of the invention
Refer to the schematic flow sheet that Fig. 1, Fig. 1 are instant messaging control method one embodiments of the present invention。
Described instant messaging control method comprises the following steps:
S101, display controls interface, and described control interface at least includes input frame and Chat mode switching push button;
S102, when receiving information and sending instruction, obtains the information of input in described input frame;
S103, it is judged that current Chat mode, wherein, described Chat mode includes public merely pattern and private chat pattern;
S104, if Chat mode is public merely pattern, then sends public affairs according to the information of input in described input frame to server request and chats information;If Chat mode is private chat pattern, then send private chat information according to the information of input in described input frame to server request;
S105, when described Chat mode switching push button is triggered, switches described Chat mode。
Wherein, described control interface preferably employs and realizes without Windowing control, draws out, according to the operation content Real-time and Dynamic of user, the control interface represented。In one embodiment, after corresponding instant messaging scene loads, for instance the video capture Room, described control interface is drawn at the edge of described instant messaging scene。In present embodiment, the schematic diagram at described control interface is as shown in Figure 2。
Described control interface at least includes input frame and Chat mode switching push button, also can farther include but be not limited in following various element one or more:
Information display frames, userspersonal information's control, present list control, application center control, notification icon and volume control control and extension button etc.。
Described Chat mode switching push button can adopt various different control knob set-up mode。In one embodiment, described Chat mode switching push button includes public merely button and private chat button;When described public affairs chat button clicked time, described Chat mode is switched to and public chats pattern;When described private chat button is clicked, described Chat mode is switched to private chat pattern。
In one embodiment, it is judged that the method for current Chat mode is: read the state of the flag bit preset, the condition adjudgement Chat mode according to described flag bit;When described Chat mode switching push button is triggered, switch the state of described flag bit。
Described flag bit is the data bit of the Chat mode (private chat or public affairs are chatted) of the record active user that internal system is arranged, and it includes two states, and corresponding described public affairs chat pattern and described private chat pattern respectively;When user triggers described Chat mode switching push button switching Chat mode, change the state of described flag bit simultaneously。When user clicks transmission message, then read the state of described flag bit, it is judged that current Chat mode。
In one embodiment, send the public step chatting information to server request to include:
The public affairs that described input frame inputs are chatted information, and the public affairs at ID place are chatted channel number and sent to server;
Server is chatted the channel number acquisition described public affairs of addition according to described public affairs and is chatted each ID of channel and the IP address of correspondence thereof, and information of described public affairs being chatted sends to IP address each described。
Subscriber equipment corresponding to each described IP address receives chats information in locally displayed described public affairs after described public affairs chat information, therefore, adds public affairs and chats each user of channel and can both see that described public affairs chat information。
The step sending private chat information to server request includes:
The private chat information that described input frame is inputted, and the ID of private chat object sends to server;
Server searches the IP address of described private chat object according to the ID of described private chat object, and sends described private chat information to described IP address。
Subscriber equipment corresponding to described IP address receives after described private chat information locally displayed, and user corresponding to only described IP address sees described private chat information, and other users cannot see this private chat information。
Described step S105 and other steps are concurrency relations, can perform in the execution process of other any one steps simultaneously, that is, as long as described Chat mode switching push button is triggered, carry out the switching of Chat mode, therefore, it is possible to realize the public and private switching easily and fast chatted。
In one embodiment, monitor further input equipment operation information, judge that whether described input frame selected according to the operation information of input equipment;If described input frame is not selected, then in described input frame, show Chat mode information;If described input frame is selected, then do not show described Chat mode information。
Described input frame is selected includes that described input frame is clicked or described input frame has word to input, or editor's cursor is sitting in described input frame。In described input frame, the Chat mode information of display can be " being public merely pattern now ", or " being private chat pattern now " etc., remind the Chat mode that user is current。
In one embodiment, described control interface can farther include expression interpolation control, shows that an expression adds symbol in described input frame, when described expression interpolation symbol is clicked, open described expression and add control, the expression that user selects is added in the input information of described input frame。
Refer to the schematic flow sheet that Fig. 3, Fig. 3 are instant messaging another embodiments of control method of the present invention。
Differring primarily in that in present embodiment: described control interface farther includes information display frames;Increase the schematic diagram controlling interface after described information display frames as shown in Figure 4。
Described instant messaging control method further includes steps of
If Chat mode is public merely pattern, then in described information display frames, show that the public affairs of ID place channel chat information;
If Chat mode is private chat pattern, then in described information display frames, show the private chat information of ID and private chat object。
The public affairs receiving and preserving ID place channel chat information, when being switched to public merely pattern, show that described public affairs chat information in described information display frames;Receive and preserve the private chat information of ID and private chat object, when being switched to private chat pattern, described information display frames shows described private chat information。
In one embodiment, if Chat mode is private chat pattern, then obtain all private chat objects of described ID further, and show private chat list object in described information display frames, when the private chat object in described private chat list object is selected, described information display frames shows the private chat information of ID and described private chat object。
Meanwhile, if described information display frames includes scroll bar, then by the bottom of described scroll bar location to described information display frames while showing described private chat information。
In one embodiment, described information display frames is hidden when not in use or closes, and opens in use。
In one embodiment, described instant messaging control method further comprising the steps in one or more:
Described control interface shows user's head portrait, when described user's head portrait is clicked, opens default userspersonal information's control;
Described control interface shows present List icon, when described present List icon is clicked, opens default present list control;
Described control interface shows application central icon, when described application central icon is clicked, described in open default application center control;
Described control interface shows notification icon, when described notification icon is clicked, opens described information display frames, and in described information alert frame display system announcement information;
Described control interface showing, volume controls icon, when described volume control icon is clicked, opens default volume and control control。
Further, at hiding described control interface portion interface content, and show extension button, when described extension button is clicked, launch the part interface content hidden。The position control that additionally can also pass through to monitor mouse launches or hides described part interface content, such as mouse leaves the time at described control interface and exceedes Preset Time, after 5 seconds, the part interface content hidden, when controlling the region at interface described in click, launch the part interface content hidden。
Schematic diagram such as Fig. 5 of described extension button。Control interface described in Fig. 5 and include notification icon 51, private chat button 52, public merely button 53, present List icon 54 and input frame 55, user's head portrait 56 and extension button 57。
When user clicks described extension button 57, launching to hide interface content, described hiding interface content includes: application central icon 58 and volume control icon 59。
In one embodiment, when notifications information having been detected, further at described notification icon content of announcement frame displayed above, the display time can be 5 seconds。Described content of announcement frame is provided with X button, can click and described content of announcement frame is closed。When user clicks described notification icon, obtain all of content of announcement, and according to after issuing time sequence, described information alert frame shows described content of announcement, and, the content of announcement that preferential display issuing time is up-to-date。
In one embodiment, the private chat information number do not read is shown in the upper right corner of described private chat button。When private chat number is more than preset value, show N。If the private chat object number that private chat object can show more than described information display frames, then in described private chat list object, show the head portrait of each private chat object, and the context arranging the scroll bar described private chat list object of control is shown。
When mouse moves to the head portrait of described private chat object, close the button of this private chat object in the display of the left side of described head portrait, when described button is clicked, from described private chat list object, delete the head portrait of described private chat object。If there being unread message, then not reading private chat object number subtracts one accordingly;The chat content before closedown is not shown time again with same private chat object private chat, after deleting the head portrait of this private chat object, if also having the head portrait of other private chat objects below described private chat list object, then the head portrait of the private chat object of lower section is automatically upper moves, if lower section does not have the head portrait of other private chat objects, but top also has the head portrait of other private chat objects, then the head portrait of top private chat object is moved down。
Under private chat pattern, show X button in the described information display frames upper right corner, when described X button is clicked, close described information display frames;
If all private chat information are all read, click described private chat button, opening described information display frames, in described information display frames, the private chat list object of display is locked in private chat object when once closing described information display frames, the right lock content when last time closes described information display frames;If the head portrait of the described private chat object on the left of click, then the chat content district on right side switches to the chat content of the private chat object of current selected, if chat content is more than a screen, then a piece of news is shown in screen bottom recently;
If there being the private chat message do not read, clicking described private chat button, opening described information display frames, private chat list object is locked on user's head portrait of the private chat object sending a nearest unread message, and right side scroll bar is locked in chat content bottom;If the head portrait of the described private chat object on the left of click, then the chat content district on right side switches to the chat content of the private chat object of current selected, if chat content is more than a screen, then a piece of news is shown in screen bottom recently;
All unread messages of described private chat object all show after completely on screen, and in Chat button, the object number of not reading of display subtracts 1。
In one embodiment, application scenarios is divided into multiple subregion, and each user is located in one of subregion;Then click described public affairs and chat button, open described information display frames, described information display frames showing, the public affairs of ID place subregion chat content real-time update;Acquiescence shows that 30 last row public affairs chat information, loads public affairs earlier and chat information record when mouse scrolls up or click on scroll bar pulls up, and user exits the channel then historical record of this application scenarios and empties;
User carries out subregion and peeps or during subregion switching, show that the public affairs in the subregion of ID place chat information in described information display frames, and the public affairs of the subregion distinguishing subregion switching front and back with cut-off rule chat information。Wherein, subregion is peeped and is not changed ID place subregion, switching ID place subregion while subregion switching。
When peeping that under state, user's public affairs are chatted, acquiescence launches chat content, and scroll bar is locked in bottom;If local area chat message has renewal, display reminding mark on local area chat message icon when peeping。Launching after click, chat content is locked in last column。
Referring to Fig. 6, Fig. 6 is the structural representation that instant messaging of the present invention controls device one embodiment。
Described instant messaging controls device and includes:
Interface module 11, is used for showing control interface, wherein, described control interface at least includes input frame and Chat mode switching push button;
Data obtaining module 12, for when receiving information and sending instruction, obtaining the information of input in described input frame;
Judge module 13, for judging current Chat mode, wherein, described Chat mode includes public merely pattern and private chat pattern;
Information sending module 14, if Chat mode is public merely pattern, then sends public affairs according to the information of input in described input frame to server request and chats information;If Chat mode is private chat pattern, then send private chat information according to the information of input in described input frame to server request;
Mode switch module 15, for when described Chat mode switching push button is triggered, switching described Chat mode。
Wherein, described control interface preferably employs and realizes without Windowing control, draws out, according to the operation content Real-time and Dynamic of user, the control interface represented。In one embodiment, after corresponding instant messaging scene loads, for instance the video capture Room, described control interface is drawn at the edge of described instant messaging scene。
Described control interface at least includes input frame and Chat mode switching push button, also can farther include but be not limited in following various element one or more:
Information display frames, userspersonal information's control, present list control, application center control, notification icon and volume control control and extension button etc.。
Described Chat mode switching push button can adopt various different control knob set-up mode。In one embodiment, described Chat mode switching push button includes public merely button and private chat button;When described public affairs chat button clicked time, described Chat mode is switched to and public chats pattern;When described private chat button is clicked, described Chat mode is switched to private chat pattern。
In one embodiment, described judge module 13 judges that the method for current Chat mode is: read the state of the flag bit preset, the condition adjudgement Chat mode according to described flag bit;When described Chat mode switching push button is triggered, switch the state of described flag bit。
Described flag bit is the data bit of the Chat mode (private chat or public affairs are chatted) of the record active user that internal system is arranged, and it includes two states, and corresponding described public affairs chat pattern and described private chat pattern respectively;When user triggers described Chat mode switching push button switching Chat mode, change the state of described flag bit simultaneously。When user clicks transmission message, then read the state of described flag bit, it is judged that current Chat mode。
In one embodiment, when described information sending module 14 is to server request transmission public affairs merely information, the public affairs that described input frame inputs are chatted information, and the public affairs at ID place are chatted channel number and sent to server;Server is chatted the channel number acquisition described public affairs of addition according to described public affairs and is chatted each ID of channel and the IP address of correspondence thereof, and information of described public affairs being chatted sends to IP address each described。
Subscriber equipment corresponding to each described IP address receives chats information in locally displayed described public affairs after described public affairs chat information, therefore, adds public affairs and chats each user of channel and can both see that described public affairs chat information。
Described information sending module 14 to server request send private chat information time, the private chat information that described input frame is inputted, and the ID of private chat object sends to server;Server searches the IP address of described private chat object according to the ID of described private chat object, and sends described private chat information to described IP address。
Subscriber equipment corresponding to described IP address receives after described private chat information locally displayed, and user corresponding to only described IP address sees described private chat information, and other users cannot see this private chat information。
Described mode switch module 15 is triggered at described Chat mode switching push button, performs the switching of Chat mode, therefore, it is possible to realize the public and private switching easily and fast chatted。
In one embodiment, described interface module 11 monitors the operation information of input equipment further, judges that whether described input frame is selected according to the operation information of input equipment;If described input frame is not selected, then in described input frame, show Chat mode information;If described input frame is selected, then do not show described Chat mode information。
Described input frame is selected includes that described input frame is clicked or described input frame has word to input, or editor's cursor is sitting in described input frame。In described input frame, the Chat mode information of display can be " being public merely pattern now ", or " being private chat pattern now " etc., remind the Chat mode that user is current。
In one embodiment, described control interface can farther include expression interpolation control, shows that an expression adds symbol in described input frame, when described expression interpolation symbol is clicked, open described expression and add control, the expression that user selects is added in the input information of described input frame。
Referring to Fig. 7, Fig. 7 is the structural representation that instant messaging of the present invention controls another embodiment of device。
Differring primarily in that in present embodiment: described control interface farther includes information display frames;
Described instant messaging controls device and farther includes information display module 16, if Chat mode is public merely pattern, then shows in described information display frames that the public affairs of ID place channel chat information;If Chat mode is private chat pattern, then in described information display frames, show the private chat information of ID and private chat object。
The public affairs receiving and preserving ID place channel chat information, when being switched to public merely pattern, show that described public affairs chat information in described information display frames;Receive and preserve the private chat information of ID and private chat object, when being switched to private chat pattern, described information display frames shows described private chat information。
In one embodiment, if Chat mode is private chat pattern, then obtain all private chat objects of described ID further, and show private chat list object in described information display frames, when the private chat object in described private chat list object is selected, described information display frames shows the private chat information of ID and described private chat object。
Meanwhile, if described information display frames includes scroll bar, then by the bottom of described scroll bar location to described information display frames while showing described private chat information。
In one embodiment, described information display frames is hidden when not in use or closes, and opens in use。
In one embodiment, described instant messaging control device farther includes one or more in following submodule:
Personal information control module, shows user's head portrait in described control interface, when described user's head portrait is clicked, opens default userspersonal information's control;
Present list control module, shows present List icon in described control interface, when described present List icon is clicked, opens default present list control;
Application center control module, show in described control interface application central icon, when described application central icon is clicked, described in open default application center control;
Notification module, shows notification icon in described control interface, when described notification icon is clicked, opens described information display frames, and in described information alert frame display system announcement information;
Volume control module, shows that in described control interface volume controls icon, when described volume control icon is clicked, opens default volume and controls control。
Further, at hiding described control interface portion interface content, and show extension button, when described extension button is clicked, launch the part interface content hidden。The position control that additionally can also pass through to monitor mouse launches or hides described part interface content, such as mouse leaves the time at described control interface and exceedes Preset Time, after 5 seconds, the part interface content hidden, when controlling the region at interface described in click, launch the part interface content hidden。
In one embodiment, when notifications information having been detected, further at described notification icon content of announcement frame displayed above, the display time can be 5 seconds。Described content of announcement frame is provided with X button, can click and described content of announcement frame is closed。When user clicks described notification icon, obtain all of content of announcement, and according to after issuing time sequence, described information alert frame shows described content of announcement, and, the content of announcement that preferential display issuing time is up-to-date。
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-mentioned embodiment, can be by the hardware that computer program carrys out instruction relevant to complete, described program can be stored in a computer read/write memory medium, this program is upon execution, it may include such as the flow process of the respective embodiments described above。Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-OnlyMemory, ROM) or random store-memory body (RandomAccessMemory, RAM) etc.。
Invention described above embodiment, is not intended that limiting the scope of the present invention。Any amendment, equivalent replacement and improvement etc. made within the spirit and principles in the present invention, should be included within the claims of the present invention。