Summary of the invention
Technical matters to be solved by this invention is to provide a kind of instant messaging, particularly a kind of in instant chat the method and system of return information.
The object of the invention is to be achieved through the following technical solutions:
A method for return information in instant chat, said method comprising the steps of:
Step a: receive the request that enters instant chat that user sends;
Step b: response described request, pushes up-to-date information recording in described instant chat information list to user;
Step c: judge whether user clicks the reply button of a certain chat message, click and continue steps d, otherwise go to step f;
Steps d: the reply content data of obtaining user's input;
Step e: described reply content data are pushed to immediately to all users that comprise in described instant chat;
Step f: obtain the chat message data of user's input and immediately push to all users that comprise in described instant chat.
In technical scheme of the present invention, described step e further comprises:
Obtain all user ID that the user list of described instant chat comprises;
Judge that respectively whether each user that described user list comprises is online;
Send described reply content data according to described user ID to online user.
In technical scheme of the present invention, described step e further comprises: judge described reply content data for information whether be presented in the current screen of subscription client, directly below described information, to show described reply content, otherwise the user that prompting is associated with described information, comprises the user who sends described information and the user who replys described information with the user of described information association.
In technical scheme of the present invention, described method further comprises:
After user's click information polymerization button, obtain user ID;
Search and the information of user-association by described user ID;
Show and the information of described user-association with new page window, comprise the information of described user's transmission and the information that described user replied with the information of described user-association.
In technical scheme of the present invention, the word content, attachment content, described reply that described reply content data comprise reply for Information ID and the user's that replys ID.
A kind of in instant chat the system of return information, described system comprises asks to accept module, request respond module, judge module, reply acquisition module, reply pushing module and information pushing module, described request is accepted the request that enters instant chat that module is sent for receiving user, described request respond module is used for responding described request, push up-to-date information recording in described instant chat information list to user, described judge module judges whether user clicks the reply button of a certain chat message, and according to replying acquisition module and the work of described information pushing module described in judged result control, described reply acquisition module is for obtaining the reply content data of user's input, described reply pushing module is for immediately pushing to by described reply content data all users that described instant chat comprises, described information pushing module is for obtaining the chat message data of user's input and immediately pushing to all users that described instant chat comprises.
In technical scheme of the present invention, described reply pushing module further comprises the first acquisition module, User Status judge module and sending module, all user ID that described the first acquisition module comprises for obtaining the user list of described instant chat, whether described User Status judge module is online for each user who judges respectively described user list and comprise, and described sending module is for sending described reply content data according to described user ID to online user.
In technical scheme of the present invention, described system also comprises an information indicating module, described information indicating module for judge described reply content data for information whether be presented at the current screen of subscription client, directly below described information, to show described reply content, otherwise the user that prompting is associated with described information, comprises the user who sends described information and the user who replys described information with the user of described information association.
In technical scheme of the present invention, described system further comprises an information fusion module, described information fusion module comprises the second acquisition module, searches module and display module, described the second acquisition module for obtaining user ID after user's click information polymerization button, the described module of searching is for searching by described user ID and the information of user-association, described display module, for showing with new page window and the information of described user-association, comprises the information of described user's transmission and the information that described user replied with the information of described user-association.
In technical scheme of the present invention, the word content, attachment content, described reply that described reply content data comprise reply for Information ID and the user's that replys ID.
Technical scheme of the present invention can, under the communication environment of instant chat, for the function that user provides information-reply, improve the experience of user to instant chat product.In addition, also provide information fusion function, be convenient to user and carry out information management.
?
Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
Refer to Fig. 1, of the present invention in instant chat the method for return information comprise the following steps:
Step S101: receive the request that enters instant chat that user sends;
As user does not send chat request, can not in current instant chat, make a speech.
Step S102: respond this chat request, push up-to-date information recording in this instant chat information list to user;
In the chat request that user sends, include the hardware data of the client that user uses, as screen specification etc.Server is receiving after chat request, the chat message according to this hardware data to the up-to-date one page of client push (adjusting voluntarily according to client screen specification).
This information comprises chat message and reply content thereof.
Step S103: judge whether user clicks the reply button of a certain chat message, click and continue step S104, otherwise go to step S106;
In technical scheme of the present invention, each chat message below is provided with reply button, and user clicks this button and can reply this information.
Step S104: the reply content data of obtaining user's input;
When user replys, the word content, attachment content (if there is), this reply that client can transmit this reply to server for the data such as Information ID and user ID.
Server receives data that this reply is relevant storage, send and process successfully or failed response, if successfully, according to this reply for Information ID this reply content is appended to below this information; If failure, sends and replys failed prompting user.
Step S105: these reply content data are pushed to immediately to all users that comprise in this instant chat;
Refer to Fig. 2, the process of this propelling movement is:
Obtain all user ID that comprise in the user list in this instant chat;
Judge that respectively whether each user who comprises in user list is online;
Send this reply content data according to user ID to online user.
Because technical scheme of the present invention is for instant chat environment, therefore, server is receiving after reply content, this content-data can be pushed immediately.
Other users are after receiving the reply content data of above-mentioned propelling movement, and its client is made following processing:
Judge these reply content data for information whether be presented in current screen, be directly thereunder to show reply content, otherwise point out by flashing the modes such as a certain mark in this chat page the user who is associated with this information.
Comprise with the user of this information association the user who sends this information, and reply the user of this information.User checks after reply content, can select as required to continue to reply, or new transmission chat message separately.
For single information, only show former the reply contents (adjusting voluntarily according to client screen specification) to this information.In the time that user selects to check all replies, show to eject stacking diagram's layer or newly to open the modes such as page window.
Step S106: obtain the chat message data of user's input and immediately push to all users that comprise in this instant chat.
In preferred embodiments of the present invention, information fusion function is also provided, above the chat page, be provided with the button of " relevant to me ".Refer to Fig. 3, the process of this information fusion is:
Click after this button user, obtain user ID;
Search and the information of this user-association by user ID;
Comprise with the information of this user-association the information that this user sends, and this user information of replying.
Information with the demonstration of new page window with this user-association.
Refer to Fig. 4, of the present invention in instant chat the system of return information mainly comprise that request accepts module, request respond module, judge module, reply acquisition module, replys pushing module and information pushing module.
Wherein, the request that enters instant chat that module is sent for receiving user is accepted in this request.
As user does not send chat request, can not in current instant chat, make a speech.
This request respond module is used for responding this chat request, pushes up-to-date information recording in this instant chat information list to user;
In the chat request that user sends, include the hardware data of the client that user uses, as screen specification etc.Server is receiving after chat request, the chat message according to this hardware data to the up-to-date one page of client push (adjusting voluntarily according to client screen specification).
This information comprises chat message and reply content thereof.
This judge module is used for judging whether user clicks the reply button of a certain chat message, and replys acquisition module and the work of information pushing module according to judged result control.
In technical scheme of the present invention, each chat message below is provided with reply button, and user clicks this button and can reply this information.
This reply acquisition module is for obtaining the reply content data of user's input.
When user replys, the word content, attachment content (if there is), this reply that client can transmit this reply to server for the data such as Information ID and user ID.
Server receives data that this reply is relevant storage, send and process successfully or failed response, if successfully, according to this reply for Information ID this reply content is appended to below this information; If failure, sends and replys failed prompting user.
This reply pushing module is for immediately pushing to by these reply content data all users that this instant chat comprises.
Refer to Fig. 5, this reply pushing module further comprises the first acquisition module, User Status judge module and sending module.
Wherein, this first acquisition module is for obtaining all user ID that comprise in the user list of this instant chat.Whether this User Status judge module is online for each user who judges respectively user list and comprise.This sending module is for sending this reply content data according to user ID to online user.
Because technical scheme of the present invention is for instant chat environment, therefore, server is receiving after reply content, this content-data can be pushed immediately.
In preferred embodiments of the present invention, this system also comprises an information indicating module.This information indicating module for judge these reply content data for information whether be presented at current screen, be directly thereunder to show reply content, otherwise point out by flashing the modes such as a certain mark in this chat page the user who is associated with this information.
Comprise with the user of this information association the user who sends this information, and reply the user of this information; If these reply content data for information be still presented in current screen, directly thereunder show reply content.User checks after reply content, can select as required to continue to reply, or new transmission chat message separately.
For single information, only show former the reply contents (adjusting voluntarily according to client screen specification) to this information.In the time that user selects to check all replies, show to eject stacking diagram's layer or newly to open the modes such as page window.
This information pushing module is for obtaining the chat message data of user's input and immediately pushing to all users that this instant chat comprises.
In preferred embodiments of the present invention, this system also comprises an information fusion module.Refer to Fig. 5, this information fusion module comprises the second acquisition module, searches module and display module.Wherein, this second acquisition module, for clicking after this button user, obtains user ID.This searches module for searching by user ID and the information of this user-association.This display module is for the information with this user-association with the demonstration of new page window.
Comprise with the information of this user-association the information that this user sends, and this user information of replying.
Technical scheme of the present invention can, under the communication environment of instant chat, for the function that user provides information-reply, improve the experience of user to instant chat product.In addition, also provide information fusion function, be convenient to user and carry out information management.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.