Summary of the invention
In view of this, the application provides a kind of instant communicating method and device.
Specifically, the application is achieved by the following technical solution:
A kind of instant communicating method, is applied in server-side, which comprises
It receives and sends the conversation message that the client of member is sent;
Judge whether the target members of the conversation message had read the conversation message;
If the target members of the conversation message had read the conversation message, add in the conversation message
Add the client that the target members are transmitted to after having read mark, so that the client of the target members has been read to mark according to described
Know and does not read to prompt for conversation message addition.
Further, the method also includes:
After receiving the conversation message that the client for sending member is sent, content identification is generated for the conversation message;
By content identification addition in the conversation message;
The notice of reading that the client of target members is sent after target members read the conversation message is received, it is described
The content identification that the conversation message is carried in notice is read;
The content identification is stored in the corresponding buffer area of the target members.
Further, whether the target members for judging the conversation message had read the conversation message packet
It includes:
Judge the content identification that the conversation message whether is cached in the corresponding buffer area of the target members;
If being cached with the content identification of the conversation message in the corresponding buffer area of the target members, described in confirmation
The target members of conversation message had read the conversation message.
Further, the method also includes:
After the content identification is stored in the corresponding buffer area of the target members, start the preset timing of target members
Device;
In the timer expiry, the content identification is deleted in the corresponding buffer area of the target members.
Further, described to include: for conversation message generation content identification
It is that the conversation message generates content identification by hash algorithm.
Further, described to include: for conversation message generation content identification
When the size of chat content is more than preset thresholding in the conversation message, content is generated for the conversation message
Mark.
A kind of instant communicating method, using on the client, which comprises
Receive the conversation message of server-side forwarding;
Judge whether to carry in the conversation message and has read to identify;
It has read to identify if carried in the conversation message, has not read to prompt for conversation message addition.
Further, it if having read to identify without carrying in the conversation message, is not read for conversation message addition
Prompt, to prompt user to read;
After user reads the conversation message, transmission has been read to notify to server-side, described to have read to carry in notice
The content identification of conversation message is stated, so that server-side saves the content identification.
Further, the method also includes:
After user reads the conversation message, removes the conversation message and do not read to prompt;
Check to have to whether there is in the conversation message for not reading prompt have conversation message identical with the conversation message;
If in the conversation message for not reading prompt there are conversation message identical with the conversation message content,
Removing conversation message identical with the conversation message is not read to prompt.
A kind of immediate communication device, is applied in server-side, and described device includes:
First receiving unit receives and sends the conversation message that the client of member is sent;
First judging unit, judges whether the target members of the conversation message had read the conversation message;
First adding unit, when the target members of the conversation message had read the conversation message, described
The client that the target members are transmitted to after having read mark is added in conversation message, for the client root of the target members
According to it is described read mark for the conversation message addition do not read to prompt.
Further, described device further include:
Identification generation unit is the conversation message after receiving the conversation message that the client for sending member is sent
Generate content identification;
Second adding unit, by content identification addition in the conversation message;
Notification receiving unit receives what the client of target members was sent after target members read the conversation message
It has read to notify, the content identification for having read to carry the conversation message in notice;
Cache unit is identified, the content identification is stored in the corresponding buffer area of the target members.
Further, first judging unit specifically judges whether cache in the corresponding buffer area of the target members
There is the content identification of the conversation message;If being cached with the interior of the conversation message in the corresponding buffer area of the target members
Hold mark, then confirms that the target members of the conversation message had read the conversation message.
Further, described device further include:
Start by set date unit after the content identification is stored in the corresponding buffer area of the target members, starts target
The preset timer of member;
Caching deletes unit, in the timer expiry, in the corresponding buffer area of the target members described in deletion
Content identification.
Further, the identification generation unit is that the conversation message generates content identification especially by hash algorithm.
Further, the identification generation unit, specifically the size of chat content is more than default in the conversation message
Thresholding when, for the conversation message generate content identification.
A kind of immediate communication device, using on the client, described device includes:
Second receiving unit receives the conversation message of server-side forwarding;
Whether second judgment unit judges to carry in the conversation message and has read to identify;
Prompt adding unit, carried in the conversation message read mark when, not for the conversation message addition not
Read prompt.
Further, the prompt adding unit is the meeting when having read to identify without carrying in the conversation message
Words message addition does not read to prompt, to prompt user to read;
Described device further include:
Notification unit is read, after user reads the conversation message, transmission has been read to notify to server-side, described to have read to lead to
The content identification of the conversation message is carried in knowing, so that server-side saves the content identification.
Further, described device further include:
Clearing cell is prompted, after user reads the conversation message, the conversation message is removed and does not read to prompt;
Unit is checked in prompt, is checked with identical as the conversation message with the presence or absence of having in the conversation message for not reading prompt
Conversation message;
The prompt clearing cell, with do not read prompt conversation message in there are with the conversation message content phase
With conversation message when, remove identical with conversation message conversation message and do not read to prompt.
It can be seen from above description the application server-side for instant messaging transmission member forward conversation message when,
Judge whether the target members of the conversation message had read the conversation message, had been read in the target members
When the conversation message, the client for target members is read to identify identifying by adding in the conversation message
It states and does not read to prompt for conversation message addition after having read mark, receive repetition conversation message not to avoid target members
Prompt is read, is greatly enhanced the user experience.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the application.
It is only to be not intended to be limiting the application merely for for the purpose of describing particular embodiments in term used in this application.
It is also intended in the application and the "an" of singular used in the attached claims, " described " and "the" including majority
Form, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein refers to and wraps
It may be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application
A little information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not departing from
In the case where the application range, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as
One information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ...
When " or " in response to determination ".
In view of the above-mentioned problems, the application provides a kind of instant messaging scheme.
Referring to FIG. 1, the application provides a kind of instant communicating method, apply in server-side, the method includes following
Step:
Step 101, it receives and sends the conversation message that the client of member is sent.
Step 102, judge whether the target members of the conversation message had read the conversation message.
Step 103, if the target members of the conversation message had read the conversation message, in the session
Added in message and be transmitted to the client of the target members after having read mark, for the target members client according to institute
Stating and having read mark not is that conversation message addition does not read to prompt.
Referring to FIG. 2, the application provides a kind of instant communicating method, using on the client, the method includes following
Step:
Step 201, the conversation message of server-side forwarding is received.
Step 202, judge whether to carry in the conversation message and read to identify.
Step 203, it has read to identify if carried in the conversation message, has not read to mention for conversation message addition
Show.
It can be seen from above description the application server-side for instant messaging transmission member forward conversation message when,
Judge whether the target members of the conversation message had read the conversation message, had been read in the target members
When the conversation message, the client for target members is read to identify identifying by adding in the conversation message
It states and does not read to prompt for conversation message addition after having read mark, receive repetition conversation message not to avoid target members
Prompt is read, is greatly enhanced the user experience.
The specific implementation of the application is described in detail below with reference to embodiment.
Referring to FIG. 3, in a kind of embodiment of the application instant communicating method flow diagram, the method includes following
Step:
Step 301, server-side is the conversation message after receiving the conversation message that the client for sending member is sent
Generate content identification.
During instant messaging, the client of instant messaging both ends member is conversated the turning of message by server-side
Hair.Generally, it sends to carry in the conversation message that member sends and sends the identity of member and target members, chats
The conversation message is transmitted to target members' according to the identity of the target members by the information such as its content, server-side
Client.For group chatting, sends in the conversation message that member sends and also carry group identification, for server-side root
The member of the group is searched according to the group identification and carries out the forwarding of the conversation message.The processing of this part and realization can be with
With reference to the prior art, the application is no longer described in detail one by one herein.
In this application, server-side is the session after receiving the conversation message that the client for sending member is sent
Message generates content identification.The content identification is the unique identification of chat content in the conversation message, in identical chat
The content identification of appearance is identical.In this step, server-side adds the content identification in the conversation message, such as: it will
The content identification is added in the preset field of communication message so that client and server-side is subsequent can be according to described interior
Hold mark to distinguish identical chat content.
Specifically, server-side, can be from the meeting according to the communication protocol of itself and client after receiving conversation message
It is parsed in words message and sends the chat content that member sends, may then pass through hash algorithm as the chat content and generate institute
State content identification.Such as: server-side can be the cryptographic Hash that the chat content generates one 16 by double hash algorithms, and
Using the cryptographic Hash as the content identification.Certainly, those skilled in the art can also be generated by other means in described
Hold mark, the application is without limitation.
In a preferred embodiment of the present application, server-side first determines whether the session after receiving conversation message
The size of chat content in message, and when the size of the chat content is more than preset thresholding, it is raw for the chat content
At content identification.The size of the chat content can be serviced with the number of words of secondary indication text chat content, in the present embodiment
End only generates the content identification more than the text chat content of folio, such as: more than 40 words.This is because in sight
It is that notice, the probability of advertisement are larger more than the text chat content of folio, the attention rate of user is lower, right in Shi Tongxin
In this chat content, the same or different probability for sending member's repetition transmission is higher.In addition to this, the application server-side
Or specific chat content generates content identification, and such as: hypertext link, picture, video etc., the application does not do this
Limitation.
Step 302, server-side judges whether the target members of the conversation message had read the conversation message, such as
Fruit is to then follow the steps 303.
In this step, server-side judges whether the target members had read the conversation message and refer to and judges institute
State the chat content whether target members had read the conversation message.The server-side can be by judging the target
Whether whether the content identification of the conversation message is cached in the corresponding buffer area of member to judge the target members
Read the conversation message.
Specifically, in server-side, one corresponding buffer area can be set for each target members, for storing target
The content identification for the conversation message that the client of member reports after target members read conversation message.Server-side is connecing
It receives after sending the conversation message that member sends, generates content identification for the conversation message, then judge the conversation message
Target members buffer zone in whether preserve the content identification, can be true if preserving the content identification
Recognize the target members and read the conversation message, executes step 303.If not saving the content identification,
It can be confirmed that the target members read the conversation message not yet, then server-side will directly carry the institute of content identification
State the client that conversation message is transmitted to target members.
Step 303, server-side adds the client for having read that the target members are transmitted to after identifying in the conversation message
End.
In this step, a field can be preset in the conversation message that client is communicated with server-side for carrying institute
It states and has read to identify.Such as: a flag bit can be preset in the conversation message, the flag bit is defaulted as not reading, citing
For, the flag bit is defaulted as 0, and expression is not read.After server-side judges that target members had read the conversation message,
It can be 1 by the mark position, indicate described with 1 and read to identify.Certainly, those skilled in the art can also take other
Mode come add it is described read to identify, the application compares with no restrictions.
Step 304, client judges whether take in the conversation message after the conversation message for receiving server-side forwarding
With having read to identify.If not, thening follow the steps 305.If so, thening follow the steps 309.
Step 305, client is that conversation message addition does not read to prompt, to prompt user to read.
In instant communication process, generally, after client receives the conversation message of server-side forwarding, all can be
The conversation message addition does not read to prompt, such as: the group belonging to the conversation message sends on the session column of member
Red dot is marked, has the unread message from the group or transmission member to prompt user currently.
Step 306, client is after user reads the conversation message, removes the conversation message and does not read to prompt,
And it sends and has read notice to server-side.
User can read the conversation message that do not read by clicking to open with the session column for not reading prompt, in user's point
It hits after opening the session column, client will remove the red dot on the session column.The processing of this part can be joined with realization
The prior art is examined, the application is no longer described in detail one by one herein.
In this step, for client after user reads the conversation message, transmission has read notice to server-side, notice clothes
Business end subscriber had read the conversation message.Specifically, client obtains the content identification of the conversation message, then will
The content identification is carried has read to be sent to server-side in notice described, so that the content identification is stored in institute by server-side
It states in the corresponding buffer area of user.
Further, client remove the conversation message read of user do not read prompt after, check and currently have
Do not read in the conversation message of prompt whether there is also have conversation message identical with the conversation message.Specifically, client by
A content identification for checking conversation message that the current content identification with the conversation message for not reading prompt and user were read is
It is no consistent, if unanimously, illustrating the session that current agent does not read the chat content of the conversation message of prompt and user read
The chat content of message is consistent, and removing is described currently not to be read to prompt with the conversation message for not reading prompt, to avoid user's weight
It is multiple to read.
For example, server-side receives the conversation message 1 for being sent to target members A, and the session is obtained by calculation
Then the content identification B of message is checked without caching the content identification B in the corresponding buffer area of the target members A, then
It is sent to target members A after the conversation message 1 is added content identification B, the client of target members A is the conversation message
1 generation does not read to prompt.Server-side receives the conversation message 2 for being sent to target members A in turn, and the meeting is obtained by calculation
Then the content identification B for talking about message checks no caching content identification B in the corresponding buffer area of the target members A, in
It is that the conversation message 2 addition content identification B is sent to target members A, the client of target members A is the conversation message
2 generations do not read to prompt.If target members have read conversation message 2, client removes the conversation message 2 and does not read to prompt
Afterwards, the notice of reading that generation carries content identification B is sent to server-side, and content identification B is stored in target members A by server-side
Corresponding buffer area.And at this point, client through checked can find with do not read prompt conversation message 1 content identification with it is described
The content identification of conversation message 2 is consistent, then client removes the conversation message 1 and do not read to prompt.Subsequent, server-side receives again
To content identification be B the conversation message for being sent to target members A when, will be added in the conversation message and read to prompt,
It is not that the conversation message addition does not read to prompt to prompt the client of target members A.
Step 307, the client that server-side receives target members is sent after target members read the conversation message
The notice of reading, it is described to have read to carry the content identification of the conversation message in notice.
Step 308, the content identification is stored in the corresponding buffer area of the target members by server-side.
In this step, the content identification is stored in the corresponding buffer area of the target members by server-side, so as to
It has read to identify in the conversation message addition read for target members.
Further, the application supports user's self-setting not read duplicate conversation message the duration of prompt.
Specifically, user can be configured the duration by the option that client provides.Such as: user can be set 24 hours
Within duplicate conversation message is not read to prompt.In practical applications, the duration can be sent to clothes by client
Business end, server-side is after the content identification read in notice for sending client is stored in corresponding buffer area, Ke Yitong
Starting timer is crossed to realize the process of timing, to be previously described as being example, 24 hours when the duration of the timer, described fixed
When device time-out when, server-side deletes the content identification in the buffer area.In this way, server-side receives content identification phase again
With session information when, be through 302 judging result of abovementioned steps it is no, do not added in the session information and read to identify, in turn
So that client is that session information addition does not read to prompt.
Step 309, client is not that the conversation message addition does not read to prompt.
Based on abovementioned steps 304, client carries in judging the conversation message read mark after, be not the meeting
Words message addition does not read to prompt, i.e., does not mark on the session column of the group belonging to the conversation message or transmission member red
Point, to avoid user's repeat reading.It should be noted that the chat content that client still can will carry in the conversation message
It is presented in corresponding chat record, if user, which clicks, checks the chat record, still it can be seen that the chat content.
It can be seen from above description the application server-side for instant messaging transmission member forward conversation message when,
Judge whether the target members of the conversation message had read the conversation message, had been read in the target members
When the conversation message, the client for target members is read to identify identifying by adding in the conversation message
It states and does not read to prompt for conversation message addition after having read mark, receive repetition conversation message not to avoid target members
Prompt is read, is greatly enhanced the user experience.
It should be noted that the application does not distinguish the identity for sending member, does not also distinguish the session that transmission member sends and disappear
Breath is cluster conversation message or single chat conversation message.In this application, only with the content identification of conversation message to identify object,
If the content identification for being sent to the conversation message of the same target members is identical, so that it may according to above-mentioned realization process, avoid
Target members receive repetition conversation message and do not read to prompt, and promote usage experience.
Corresponding with the embodiment of the application instant communicating method, present invention also provides a kind of immediate communication devices, divide
It does not apply in server-side and client.Device described herein can by software realization, can also by hardware or
The mode of software and hardware combining is realized.Taking software implementation as an example, the application calibration equipment is as the device on a logical meaning
Computer program instructions corresponding in nonvolatile memory are read into memory operation by the processor of equipment where it
It is formed.
Fig. 4 and Fig. 5 are please referred to, a kind of immediate communication device 400 provided by the present application is applied in server-side, the dress
Setting 400 includes: the first receiving unit 401, the first judging unit 402, the first adding unit 403, identification generation unit 404,
Second adding unit 405, notification receiving unit 406, mark cache unit 407, start by set date unit 408 and caching are deleted single
Member 409.
First receiving unit 401 receives and sends the conversation message that the client of member is sent.
First judging unit 402, judges whether the target members of the conversation message had read the session
Message.
First adding unit 403, when the target members of the conversation message had read the conversation message,
The client that the target members are transmitted to after having read mark is added, in the conversation message for the visitor of the target members
Mark has been read according to and has not read to prompt for conversation message addition in family end.
The identification generation unit 404 is the meeting after receiving the conversation message that the client for sending member is sent
It talks about message and generates content identification.
Second adding unit 405, by content identification addition in the conversation message.
The notification receiving unit 406, the client for receiving target members read the conversation message in target members
The notice of reading sent afterwards, the content identification for having read to carry the conversation message in notice.
The content identification is stored in the corresponding buffer area of the target members by the mark cache unit 407.
Whether first judging unit 401 specifically judges to be cached in the corresponding buffer area of the target members described
The content identification of conversation message;If being cached with the content mark of the conversation message in the corresponding buffer area of the target members
Know, then confirms that the target members of the conversation message had read the conversation message.
The start by set date unit 408 opens after the content identification is stored in the corresponding buffer area of the target members
The preset timer of moving-target member;
The caching is deleted unit 409 and is deleted in the corresponding buffer area of the target members in the timer expiry
Except the content identification.
Further, the identification generation unit 404 is that the conversation message generates content mark especially by hash algorithm
Know.
Further, the identification generation unit 404, specifically the size of chat content is more than pre- in the conversation message
If thresholding when, for the conversation message generate content identification.
Please refer to Fig. 6 and Fig. 7, a kind of immediate communication device 600 provided by the present application, using on the client, the dress
Setting 600 includes: the second receiving unit 601, second judgment unit 602, prompt adding unit 603, read notification unit 604,
Unit 606 is checked in prompt clearing cell 605 and prompt.
Second receiving unit 601 receives the conversation message of server-side forwarding.
Whether the second judgment unit 602 judges to carry in the conversation message and has read to identify.
The prompt adding unit 603, carried in the conversation message read mark when, be not the conversation message
Addition does not read to prompt.
The prompt adding unit 603 is the conversation message when having read to identify without carrying in the conversation message
Addition does not read to prompt, to prompt user to read.
Described to have read notification unit 604, after user reads the conversation message, transmission has read notice to server-side, institute
The content identification for having read that the conversation message is carried in notice is stated, so that server-side saves the content identification.
The prompt clearing cell 605 removes the conversation message and does not read to mention after user reads the conversation message
Show.
Unit 606 is checked in the prompt, and checking to have to whether there is in the conversation message for not reading prompt has and the session
The identical conversation message of message.
The prompt clearing cell 605, with do not read prompt conversation message in there are with the conversation message in
When holding identical conversation message, removing conversation message identical with the conversation message is not read to prompt.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus
Realization process, details are not described herein.
The foregoing is merely the preferred embodiments of the application, not to limit the application, all essences in the application
Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the application protection.