CN107040455B - Instant message communication method and system based on redis - Google Patents

Instant message communication method and system based on redis Download PDF

Info

Publication number
CN107040455B
CN107040455B CN201710390911.3A CN201710390911A CN107040455B CN 107040455 B CN107040455 B CN 107040455B CN 201710390911 A CN201710390911 A CN 201710390911A CN 107040455 B CN107040455 B CN 107040455B
Authority
CN
China
Prior art keywords
message
instant
instant message
list
visitor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710390911.3A
Other languages
Chinese (zh)
Other versions
CN107040455A (en
Inventor
陆洋智
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Si Tech Information Technology Co Ltd
Original Assignee
Beijing Si Tech Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Si Tech Information Technology Co Ltd filed Critical Beijing Si Tech Information Technology Co Ltd
Priority to CN201710390911.3A priority Critical patent/CN107040455B/en
Publication of CN107040455A publication Critical patent/CN107040455A/en
Application granted granted Critical
Publication of CN107040455B publication Critical patent/CN107040455B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Abstract

The invention relates to an instant message communication method and system based on redis. The method comprises the following steps: creating a session according to a communication request sent by a visitor, and creating a customer service list, a visitor list and a Hash entity according to the session; receiving an instant message sent by one end of a visitor end or a customer service end, generating a message ID and instant information according to the instant message, inserting the message ID into a list corresponding to the other end and inserting the instant information into a hash entity, wherein the message ID corresponds to the instant information; and receiving a reading request sent by the other end, acquiring a message ID from a list corresponding to the other end according to the reading request, acquiring instant information from the hash entity according to the message ID, sending the instant information to the other end, and deleting the message ID and the instant information. The invention realizes the improvement of the stability and the performance of the processing of the instant message communication service and improves the user experience.

Description

Instant message communication method and system based on redis
Technical Field
The invention belongs to the technical field of communication, and particularly relates to an instant message communication method and system based on redis.
Background
In an online customer service system, the most core service includes instant messaging, the traditional online customer service systems are all deployed by adopting a single server, and an instant messaging program is stored in a JVM memory of the single server, which has the following defects: when a single server is down, the whole instant message communication service is interrupted, and the system for processing the instant message communication has poor stability; when the amount of the instant message data to be processed is huge, a single server cannot meet the requirement, the processing capacity of the single server is poor, the sending speed and the receiving speed of the instant message are slow, and the user experience is poor; instant messaging programs are all stored in a single server, and instant messaging cannot be deployed independently.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide an instant messaging method and system based on redis, aiming at the defects of the prior art.
The technical scheme for solving the technical problems is as follows: an instant message communication method based on redis, comprising the steps of:
s1, creating a session according to the communication request sent by the visitor, and creating a service list, a visitor list and a hash entity according to the session;
s2, receiving the instant message sent by one end of the visitor end or the customer service end, generating a message ID and instant message according to the instant message, wherein the message ID corresponds to the instant message, inserting the message ID into a list corresponding to the other end, and inserting the instant message into the hash entity;
s3, receiving the reading request sent by the other end, obtaining the message ID from the list corresponding to the other end according to the reading request, obtaining the instant message from the hash entity according to the message ID and sending the instant message to the other end, and deleting the message ID and the instant message.
The invention has the beneficial effects that: by creating a session, creating a customer service list, a visitor list and a hash entity according to the session, inserting a message ID generated according to a sent instant message into the list, inserting instant information generated according to the sent instant message into the hash entity, rapidly acquiring the instant information according to the message ID, independently processing the instant message communication of each session, and enhancing the processing capacity, the instant information is acquired according to the message ID when a receiver wants to read the instant information and is sent to the receiver, the stability and the performance of processing an instant message communication service are improved, the user experience is improved, and the instant message communication can be independently deployed.
On the basis of the technical scheme, the invention can be further improved as follows:
further, the step of S2 includes:
s21, receiving at least one instant message sent by one of the visitor end and the customer service end;
s22, generating at least one message ID and at least one piece of instant message according to at least one piece of instant message, wherein one message ID in the at least one message ID corresponds to one instant message in the at least one piece of instant message;
s23, according to the order of receiving at least one instant message, each message ID in the at least one message ID is inserted into the list corresponding to the other end in turn, and the at least one instant message is inserted into the hash entity.
Further, the step of S3 includes:
s31, receiving a reading request sent by the other end;
s32, obtaining a message ID from the list corresponding to the other end according to the reading request;
s33, obtaining an instant message corresponding to the message ID from the hash entity according to the message ID and sending the instant message to the other end;
s34, deleting the message ID from the list corresponding to the other end, and deleting an instant message corresponding to the message ID from the hash entity.
Further, the instant message includes: sender, instant message, time of transmission of instant message and instant message type.
Further, when the visitor side is the one side, the other side is a customer service side, and a list corresponding to the other side is a customer service list; and when the customer service side is the one end, the other end is a visitor side, and the list corresponding to the other end is a visitor list.
The technical scheme for solving the technical problems is as follows: a redis-based instant messaging system, comprising:
the system comprises a creating module, a sending module and a receiving module, wherein the creating module is used for creating a session according to a communication request sent by a visitor and creating a customer service list, a visitor list and a Hash entity according to the session;
the inserting module is used for receiving the instant message sent by one end of the visitor end or the customer service end, generating a message ID and instant information according to the instant message, inserting the message ID into a list corresponding to the other end and inserting the instant information into the Hash entity, wherein the message ID corresponds to the instant information;
and the taking-out module is used for receiving the reading request sent by the other end, acquiring the message ID from the list corresponding to the other end according to the reading request, acquiring the instant message from the hash entity according to the message ID, sending the instant message to the other end, and deleting the message ID and the instant message.
The invention has the beneficial effects that: by creating a session, creating a customer service list, a visitor list and a hash entity according to the session, inserting a message ID generated according to a sent instant message into the list, inserting instant information generated according to the sent instant message into the hash entity, rapidly acquiring the instant information according to the message ID, independently processing the instant message communication of each session, and enhancing the processing capacity, the instant information is acquired according to the message ID when a receiver wants to read the instant information and is sent to the receiver, the stability and the performance of processing an instant message communication service are improved, the user experience is improved, and the instant message communication can be independently deployed.
On the basis of the technical scheme, the invention can be further improved as follows:
further, the insertion module includes:
the first receiving module is used for receiving at least one instant message sent by one of the visitor end and the customer service end;
the generating module is used for generating at least one message ID and at least one piece of instant information according to at least one piece of instant information, wherein one message ID in the at least one message ID corresponds to one piece of instant information in the at least one piece of instant information;
and the first processing module is used for sequentially inserting each message ID in the at least one message ID into a list corresponding to the other end according to the sequence of receiving the at least one instant message and inserting the at least one instant message into the hash entity.
Further, the take-out module includes:
the second receiving module is used for receiving the reading request sent by the other end;
the acquisition module is used for acquiring a message ID from the list corresponding to the other end according to the reading request;
the second processing module is used for acquiring instant information corresponding to the message ID from the hash entity according to the message ID and sending the instant information to the other end;
and the deleting module is used for deleting the message ID from the list corresponding to the other end and deleting the instant message corresponding to the message ID from the hash entity.
Further, the instant message includes: sender, instant message, time of transmission of instant message and instant message type.
Further, when the visitor side is the one side, the other side is a customer service side, and a list corresponding to the other side is a customer service list; and when the customer service side is the one end, the other end is a visitor side, and the list corresponding to the other end is a visitor list.
Drawings
Fig. 1 is a schematic flowchart of an instant messaging method based on redis according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a step 2 in a redis-based instant messaging method according to another embodiment of the present invention;
fig. 3 is a flowchart illustrating step 3 of a redis-based instant messaging method according to another embodiment of the present invention;
fig. 4 is a schematic structural diagram of an instant messaging system based on redis according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an insertion module in a redis-based instant messaging system according to another embodiment of the present invention;
fig. 6 is a schematic structural diagram of a fetch module in a redis-based instant messaging system according to another embodiment of the present invention.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth by way of illustration only and are not intended to limit the scope of the invention.
All the examples in the embodiments of the present invention are described with one end being a guest end and the other end being a customer service end.
As shown in fig. 1, the instant messaging method based on redis according to the embodiment of the present invention includes the following steps:
s1, creating a session according to the communication request sent by the visitor, and creating a service list, a visitor list and a hash entity according to the session;
s2, receiving the instant message sent by one end of the visitor end or the customer service end, generating a message ID and instant message according to the instant message, wherein the message ID corresponds to the instant message, inserting the message ID into a list corresponding to the other end, and inserting the instant message into the hash entity;
s3, receiving the reading request sent by the other end, obtaining the message ID from the list corresponding to the other end according to the reading request, obtaining the instant message from the hash entity according to the message ID and sending the instant message to the other end, and deleting the message ID and the instant message.
In this embodiment, the list names of the customer service list are customer service ID and session ID, and the list names of the visitor list are visitor ID and session ID. A session refers to the process of a visitor establishing a connection with a service until the connection is broken. And setting a storage position after the session is established, wherein the storage position is used for storing all data related to the instant message communication process of a visitor terminal and a customer service terminal.
In step S1, a service list, a visitor list and hash entities are created according to a session, where a service list is used to store message IDs corresponding to all unread instant messages of a service end, and a visitor list is used to store message IDs corresponding to all unread instant messages of a visitor end. The customer service list and visitor list have no capacity limitations.
The following describes the step S2 with a specific example: the method comprises the steps of receiving an instant message sent by a visitor terminal, wherein the instant message comprises a visitor ID and a session ID, generating a message ID and an instant message according to the instant message, wherein the message ID corresponds to the instant message, inserting the message ID into a customer service list according to the visitor ID and the session ID, and inserting the instant message into a Hash entity.
According to the redis-based instant message communication method provided by the embodiment of the invention, the session is created, the customer service list, the visitor list and the hash entity are created according to the session, the message ID generated according to the sent instant message is inserted into the list, and the instant message generated according to the sent instant message is inserted into the hash entity, so that the instant message can be quickly acquired according to the message ID, the instant message communication of each session is independently processed, the processing capacity is enhanced, the instant message is acquired according to the message ID and sent to a receiver when the receiver wants to read the instant message, the processing stability and performance of the instant message communication service are improved, the user experience degree is improved, and the instant message communication can be independently deployed.
As shown in fig. 2, based on the previous embodiment, the step S2 of the instant messaging method based on redis according to the embodiment of the present invention includes:
s21, receiving at least one instant message sent by one of the visitor end and the customer service end;
s22, generating at least one message ID and at least one piece of instant message according to at least one piece of instant message, wherein one message ID in the at least one message ID corresponds to one instant message in the at least one piece of instant message;
s23, according to the order of receiving at least one instant message, each message ID in the at least one message ID is inserted into the list corresponding to the other end in turn, and the at least one instant message is inserted into the hash entity.
In this embodiment, one of the guest side or the customer service side may send one instant message, may send two instant messages, and may also send multiple instant messages, and the following is to send two instant messages, where the two instant messages are a first instant message and a second instant message, respectively, and the specific flow of the step S2 is described as an example that the sending time of the first instant message is earlier than the sending time of the second instant message:
receiving a first instant message and a second instant message sent by a visitor end;
generating a first message ID and first instant information according to the first instant message, and generating a second message ID and second instant information according to the second instant message, wherein the first message ID corresponds to the first instant information, and the second message ID corresponds to the second instant information;
the first message ID and the second message ID are sequentially inserted into a customer service list according to the sequence of receiving the first instant message and the second instant message, the first instant message and the second instant message are inserted into a Hash entity, and the first instant message is sent earlier than the second instant message, so that the sequence of receiving the instant messages is that the first instant message is received first and then the second instant message is received, and the sequence of inserting the message IDs into the customer service list is that the first message ID is inserted first and then the second message ID is inserted.
According to the redis-based instant message communication method provided by the embodiment of the invention, at least one instant message is received, at least one message ID and at least one piece of instant message are generated according to the at least one instant message, the message ID is inserted into the corresponding list at the other end according to the order of receiving the instant messages, and the instant message is inserted into the hash entity, so that the orderliness and orderliness of instant message communication are realized, the instant message can be quickly obtained according to the message ID, the instant message communication of each session is independently processed, the processing capacity is enhanced, and the user experience is improved.
Optionally, in this embodiment of the present invention, before the step of S1, a step of building a distributed environment in a cluster server is further included.
After a distributed environment is built in a cluster server, the storage positions of a customer service list, a visitor list and a hash entity are automatically determined, and an instant message communication program is not fixedly stored in a memory of a single server any more. The following is a specific example: the method comprises the steps of configuring three hosts as cluster servers to realize the functions of the embodiment of the invention, building a distributed environment on the three hosts, setting two nodes on each host, wherein the two nodes are respectively a main node and a standby node, the main node is used for processing the instant message communication service, and the standby node is used for synchronizing data.
In the embodiment, by building the distributed environment in the cluster server, the data related to the instant messaging is not stored in the memory of a single server any more, the stability and the performance of processing the instant messaging service are improved, the occurrence of service interruption caused by downtime is avoided, and the user experience is improved.
Optionally, as shown in fig. 3, in the embodiment of the present invention, the step S3 includes:
s31, receiving a reading request sent by the other end;
s32, obtaining a message ID from the list corresponding to the other end according to the reading request;
s33, obtaining an instant message corresponding to the message ID from the hash entity according to the message ID and sending the instant message to the other end;
s34, deleting the message ID from the list corresponding to the other end, and deleting an instant message corresponding to the message ID from the hash entity.
In this embodiment, when the customer service list includes a plurality of message IDs, the customer service side has a plurality of pieces of instant information that are not read; when the visitor list contains a plurality of message IDs, the visitor has a plurality of instant messages which are not read. The following example illustrates the specific process of step S3:
receiving a reading request sent by a customer service end, wherein the reading request comprises a customer service ID and a session ID;
determining a customer service list according to the customer service ID and the session ID included in the reading request, and acquiring a message ID inserted firstly from the customer service list;
acquiring instant information corresponding to the message ID from the hash entity according to the message ID, and sending the instant information to the customer service end;
and deleting the message ID from the customer service list and deleting the instant message from the hash entity.
In this embodiment, the instant message corresponding to the message ID inserted first is taken out in advance and sent to the recipient, thereby realizing the ordered execution of the instant message communication.
In the embodiment, the message ID is acquired through the reading request, the instant message is acquired according to the message ID and is sent to the other end, the instant message is quickly read, complete instant message communication is realized by deleting the message ID and the instant message, the instant message can be quickly acquired according to the message ID, the instant message communication of each session is independently processed, the processing capacity is enhanced, and the user experience is improved.
Optionally, in this embodiment of the present invention, a step S312 is further included between the step S31 and the step S32, where the step S312 includes: and judging whether the service list or the visitor list has the message ID according to the reading request, if so, executing S32, and otherwise, ending.
In the embodiment, whether the message ID exists in the customer service list or the visitor list is judged according to the reading request, so that whether unread instant messages exist or not is quickly determined, the processing capacity is enhanced, and the user experience is improved.
Optionally, in this embodiment of the present invention, the instant message includes: sender, instant message, time of transmission of instant message and instant message type.
In this embodiment, the content included in the instant message is described below by using a specific example: the sender is a visitor, the instant message is the content of communication between the user of the visitor and the user of the customer service terminal, the sending time of the instant message is the receiving time of the instant message sent by the receiving terminal, and the type of the instant message can be character strings, pictures, videos and the like.
The following describes a storage manner of the instant message, taking an example that a sender is a client of JACK, the content of the instant message is hello, the sending time of the instant message is 3, 5, 3 and 5 months in 2012, 17 o 5 min, and the type of the instant message is a character string:
the sender: JACK; instant messaging: you are good; sending time of instant message: day 17, month 5, 2012, point 5, instant message type: a character string.
In the embodiment, the complete instant message communication is realized through the content included by the instant message, and the user experience is improved.
Optionally, in the embodiment of the present invention, when the guest end is the one end, the other end is a customer service end, and a list corresponding to the other end is a customer service list; and when the customer service side is the one end, the other end is a visitor side, and the list corresponding to the other end is a visitor list.
As shown in fig. 4, an instant messaging system based on redis provided in an embodiment of the present invention includes:
the system comprises a creating module, a sending module and a receiving module, wherein the creating module is used for creating a session according to a communication request sent by a visitor and creating a customer service list, a visitor list and a Hash entity according to the session;
the inserting module is used for receiving the instant message sent by one end of the visitor end or the customer service end, generating a message ID and instant information according to the instant message, inserting the message ID into a list corresponding to the other end and inserting the instant information into the Hash entity, wherein the message ID corresponds to the instant information;
and the taking-out module is used for receiving the reading request sent by the other end, acquiring the message ID from the list corresponding to the other end according to the reading request, acquiring the instant message from the hash entity according to the message ID, sending the instant message to the other end, and deleting the message ID and the instant message.
According to the redis-based instant message communication system provided by the embodiment of the invention, by creating a session, creating a customer service list, a visitor list and a hash entity according to the session, inserting a message ID generated according to a sent instant message into the list, and inserting the instant message generated according to the sent instant message into the hash entity, the instant message can be quickly acquired according to the message ID, the instant message communication of each session is independently processed, and the processing capacity is enhanced, so that the instant message is acquired according to the message ID and sent to a receiver when the receiver wants to read the instant message, the stability and performance of instant message communication service processing are improved, the user experience degree is improved, and the instant message communication can be independently deployed.
As shown in fig. 5, in the instant messaging system based on redis provided in the embodiment of the present invention, on the basis of the previous embodiment, the inserting module includes:
the first receiving module is used for receiving at least one instant message sent by one of the visitor end and the customer service end;
the generating module is used for generating at least one message ID and at least one piece of instant information according to at least one piece of instant information, wherein one message ID in the at least one message ID corresponds to one piece of instant information in the at least one piece of instant information;
and the first processing module is used for sequentially inserting each message ID in the at least one message ID into a list corresponding to the other end according to the sequence of receiving the at least one instant message and inserting the at least one instant message into the hash entity.
According to the redis-based instant message communication system provided by the embodiment of the invention, at least one instant message is received, at least one message ID and at least one piece of instant message are generated according to the at least one instant message, the message ID is inserted into the corresponding list at the other end according to the order of receiving the instant messages, and the instant message is inserted into the hash entity, so that the orderliness and orderliness of instant message communication are realized, the instant message can be quickly obtained according to the message ID, the instant message communication of each session is independently processed, the processing capacity is enhanced, and the user experience is improved.
Optionally, as shown in fig. 6, in an embodiment of the present invention, the removing module includes:
the second receiving module is used for receiving the reading request sent by the other end;
the acquisition module is used for acquiring a message ID from the list corresponding to the other end according to the reading request;
the second processing module is used for acquiring instant information corresponding to the message ID from the hash entity according to the message ID and sending the instant information to the other end;
and the deleting module is used for deleting the message ID from the list corresponding to the other end and deleting the instant message corresponding to the message ID from the hash entity.
Optionally, in this embodiment of the present invention, the instant message includes: sender, instant message, time of transmission of instant message and instant message type.
Optionally, in the embodiment of the present invention, when the guest end is the one end, the other end is a customer service end, and a list corresponding to the other end is a customer service list; and when the customer service side is the one end, the other end is a visitor side, and the list corresponding to the other end is a visitor list.
The functions executed and the effects generated by each module in the redis-based instant messaging system in the embodiment of the present invention have been described in detail in the redis-based instant messaging method in the above embodiment, and are not described again here.
All the embodiments of the invention can be applied to the online customer service system, the memory in a single server is set as the distributed memory in the cluster server, the redis-based instant message communication is separately deployed, and the redis-based instant message communication is independent and can be continuously expanded.
Redis is an open-source log-type and Key-Value database which is written by using ANSI C language, supports network, can be based on memory and can also be persistent, namely distributed cache.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (8)

1. An instant message communication method based on redis, characterized by comprising the following steps:
s1, creating a session according to the communication request sent by the visitor, and creating a service list, a visitor list and a hash entity according to the session;
s2, receiving the instant message sent by one end of the visitor end or the customer service end, generating a message ID and instant message according to the instant message, wherein the message ID corresponds to the instant message, inserting the message ID into a list corresponding to the other end, and inserting the instant message into the hash entity;
the step of S2 includes:
s21, receiving at least one instant message sent by one of the visitor end and the customer service end;
s22, generating at least one message ID and at least one piece of instant message according to at least one piece of instant message, wherein one message ID in the at least one message ID corresponds to one instant message in the at least one piece of instant message;
s23, inserting each message ID in the at least one message ID into a list corresponding to the other end in sequence according to the sequence of receiving at least one instant message, and inserting the at least one instant message into a hash entity;
s3, receiving the reading request sent by the other end, obtaining the message ID from the list corresponding to the other end according to the reading request, obtaining the instant message from the hash entity according to the message ID and sending the instant message to the other end, and deleting the message ID and the instant message.
2. The redis-based instant messaging method of claim 1, wherein the step S3 comprises:
s31, receiving a reading request sent by the other end;
s32, obtaining a message ID from the list corresponding to the other end according to the reading request;
s33, obtaining an instant message corresponding to the message ID from the hash entity according to the message ID and sending the instant message to the other end;
s34, deleting the message ID from the list corresponding to the other end, and deleting an instant message corresponding to the message ID from the hash entity.
3. The redis-based instant messaging method of claim 2, wherein the instant message comprises: sender, instant message, time of transmission of instant message and instant message type.
4. A redis-based instant messaging method according to any of claims 1-3, wherein when the guest side is the one side, the other side is a customer service side, and the corresponding list at the other side is a customer service list; and when the customer service side is the one end, the other end is a visitor side, and the list corresponding to the other end is a visitor list.
5. A redis-based instant messaging system, comprising:
the system comprises a creating module, a sending module and a receiving module, wherein the creating module is used for creating a session according to a communication request sent by a visitor and creating a customer service list, a visitor list and a Hash entity according to the session;
the inserting module is used for receiving the instant message sent by one end of the visitor end or the customer service end, generating a message ID and instant information according to the instant message, inserting the message ID into a list corresponding to the other end and inserting the instant information into the Hash entity, wherein the message ID corresponds to the instant information;
the insertion module includes:
the first receiving module is used for receiving at least one instant message sent by one of the visitor end and the customer service end;
the generating module is used for generating at least one message ID and at least one piece of instant information according to at least one piece of instant information, wherein one message ID in the at least one message ID corresponds to one piece of instant information in the at least one piece of instant information;
the first processing module is used for sequentially inserting each message ID in the at least one message ID into a list corresponding to the other end according to the sequence of receiving the at least one instant message and inserting the at least one instant message into the Hash entity;
and the taking-out module is used for receiving the reading request sent by the other end, acquiring the message ID from the list corresponding to the other end according to the reading request, acquiring the instant message from the hash entity according to the message ID, sending the instant message to the other end, and deleting the message ID and the instant message.
6. The redis-based instant messaging system of claim 5, wherein the retrieval module comprises:
the second receiving module is used for receiving the reading request sent by the other end;
the acquisition module is used for acquiring a message ID from the list corresponding to the other end according to the reading request;
the second processing module is used for acquiring instant information corresponding to the message ID from the hash entity according to the message ID and sending the instant information to the other end;
and the deleting module is used for deleting the message ID from the list corresponding to the other end and deleting the instant message corresponding to the message ID from the hash entity.
7. The redis-based instant messaging system of claim 6, wherein the instant message comprises: sender, instant message, time of transmission of instant message and instant message type.
8. A redis-based instant messaging system according to any of claims 5 to 7, wherein when the guest peer is the one peer, the other peer is a customer service peer and the corresponding list at the other peer is a customer service list; and when the customer service side is the one end, the other end is a visitor side, and the list corresponding to the other end is a visitor list.
CN201710390911.3A 2017-05-27 2017-05-27 Instant message communication method and system based on redis Active CN107040455B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710390911.3A CN107040455B (en) 2017-05-27 2017-05-27 Instant message communication method and system based on redis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710390911.3A CN107040455B (en) 2017-05-27 2017-05-27 Instant message communication method and system based on redis

Publications (2)

Publication Number Publication Date
CN107040455A CN107040455A (en) 2017-08-11
CN107040455B true CN107040455B (en) 2021-05-11

Family

ID=59539020

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710390911.3A Active CN107040455B (en) 2017-05-27 2017-05-27 Instant message communication method and system based on redis

Country Status (1)

Country Link
CN (1) CN107040455B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109347935B (en) * 2018-09-30 2021-08-03 珠海信达九州科技有限公司 Method for realizing real-time communication message synchronization based on block chain
CN109522116B (en) * 2018-10-11 2020-11-10 北京达佳互联信息技术有限公司 Object attention method, device and server

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741758A (en) * 2008-11-19 2010-06-16 多友科技(北京)有限公司 Method for realizing tag type list for enterprise instant messaging system
CN101778101A (en) * 2009-12-31 2010-07-14 卓望数码技术(深圳)有限公司 Message transmission method and message transmission system
CN103870464A (en) * 2012-12-10 2014-06-18 腾讯科技(北京)有限公司 Unread message processing method, display method and device
CN104022938A (en) * 2013-02-28 2014-09-03 腾讯科技(深圳)有限公司 Message synchronization method, system, server and client end
CN104052723A (en) * 2013-03-15 2014-09-17 联想(北京)有限公司 Information processing method and server
CN104683288A (en) * 2013-11-26 2015-06-03 腾讯科技(北京)有限公司 Message continuous transmission method and device
CN105242975A (en) * 2015-08-27 2016-01-13 浪潮软件股份有限公司 Message transmission method and message middleware
CN106130868A (en) * 2016-06-02 2016-11-16 腾讯科技(深圳)有限公司 A kind of processing method adjusting back message and queue management system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4557318B2 (en) * 1997-08-21 2010-10-06 キヤノン株式会社 Image file communication system by e-mail and control method thereof
CN101783740B (en) * 2009-01-21 2012-02-15 大唐移动通信设备有限公司 Method and device for managing message file
CN103379021B (en) * 2012-04-24 2017-02-15 中兴通讯股份有限公司 Method and system for achieving distributed message queue
CN104660594B (en) * 2015-02-09 2018-01-09 中国科学院信息工程研究所 A kind of virtual malicious node and its Network Recognition method towards social networks
US9979692B2 (en) * 2015-03-06 2018-05-22 Oracle International Corporation Method and system for providing message recall functionality
CN104717133A (en) * 2015-03-16 2015-06-17 墨仕(厦门)电子商务有限公司 Distributed message push system and method
CN105119810A (en) * 2015-08-06 2015-12-02 北京农信互联科技有限公司 Instant communication method based on XMPP protocol and system thereof

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741758A (en) * 2008-11-19 2010-06-16 多友科技(北京)有限公司 Method for realizing tag type list for enterprise instant messaging system
CN101778101A (en) * 2009-12-31 2010-07-14 卓望数码技术(深圳)有限公司 Message transmission method and message transmission system
CN103870464A (en) * 2012-12-10 2014-06-18 腾讯科技(北京)有限公司 Unread message processing method, display method and device
CN104022938A (en) * 2013-02-28 2014-09-03 腾讯科技(深圳)有限公司 Message synchronization method, system, server and client end
CN104052723A (en) * 2013-03-15 2014-09-17 联想(北京)有限公司 Information processing method and server
CN104683288A (en) * 2013-11-26 2015-06-03 腾讯科技(北京)有限公司 Message continuous transmission method and device
CN105242975A (en) * 2015-08-27 2016-01-13 浪潮软件股份有限公司 Message transmission method and message middleware
CN106130868A (en) * 2016-06-02 2016-11-16 腾讯科技(深圳)有限公司 A kind of processing method adjusting back message and queue management system

Also Published As

Publication number Publication date
CN107040455A (en) 2017-08-11

Similar Documents

Publication Publication Date Title
CN1988535B (en) Synchronous method, system for file storage and customer terminal
US8510404B2 (en) Peer to peer Synchronization system and method
WO2016061898A1 (en) Method and system for accessing channel of live broadcast room
US9426102B1 (en) Efficient conversation transmission to mobile clients
CN110134648A (en) Log processing method, device, equipment, system and computer readable storage medium
US8595303B2 (en) Thread data aggregation
CN108712457B (en) Method and device for adjusting dynamic load of back-end server based on Nginx reverse proxy
JP2014523568A (en) Efficient conditioning
US9246859B2 (en) Peer-to-peer collaboration of publishers in a publish-subscription environment
CN104348859B (en) File synchronisation method, device, server, terminal and system
CN105653198A (en) Data processing method and device
CN105450682B (en) Method, device and system for synchronously storing data and synchronizing data to client
CN101667976B (en) Method for determining mail push mode, pushing method, pushing device
CN105868251A (en) Cache data updating method and device
US20140052793A1 (en) Message synchronization with extended properties
CN113886494A (en) Message storage method, device, equipment and computer readable medium for instant messaging
CN107040455B (en) Instant message communication method and system based on redis
US20180121531A1 (en) Data Updating Method, Device, and Related System
CN112527530B (en) Message processing method, device, apparatus, storage medium and computer program product
CN109600423A (en) Method of data synchronization, device, electronic equipment and storage medium
CN102164152A (en) Method and system for remotely processing files
CN107104889B (en) Draft mail synchronization method, draft mail synchronization device and draft mail synchronization terminal based on IMAP protocol
WO2019242279A1 (en) Message processing method and device
CN104580276A (en) Information pushing method, device and system, as well as information access device
CN105207884A (en) Method of acquiring E-mail delivery state and apparatus thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant