CN114513481A - Multi-terminal message synchronization method and system based on instant messaging system - Google Patents
Multi-terminal message synchronization method and system based on instant messaging system Download PDFInfo
- Publication number
- CN114513481A CN114513481A CN202210070108.2A CN202210070108A CN114513481A CN 114513481 A CN114513481 A CN 114513481A CN 202210070108 A CN202210070108 A CN 202210070108A CN 114513481 A CN114513481 A CN 114513481A
- Authority
- CN
- China
- Prior art keywords
- message
- login
- equipment
- server
- online
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000013507 mapping Methods 0.000 claims abstract description 94
- 238000004891 communication Methods 0.000 claims abstract description 26
- 230000001360 synchronised effect Effects 0.000 claims description 11
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 244000062793 Sorghum vulgare Species 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 235000019713 millet Nutrition 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/04—Real-time or near real-time messaging, e.g. instant messaging [IM]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/04—Real-time or near real-time messaging, e.g. instant messaging [IM]
- H04L51/043—Real-time or near real-time messaging, e.g. instant messaging [IM] using or handling presence information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/07—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
- H04L51/18—Commands or executable codes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a multi-terminal message synchronization method and a multi-terminal message synchronization system based on an instant messaging system, belongs to the technical field of informatization software, and aims to solve the technical problem of how to realize the synchronization of messages among multi-terminal equipment. The method comprises the following steps: for each user account, configuring a registration record through an instant messaging system; for each user account, after a user logs in the instant communication system through the current equipment, the cluster server establishes connection with the current equipment and updates the mapping relation; after a user sends a message through the current equipment, the message is analyzed through the cluster server, and message content is stored; identifying the online state of other login equipment except the current equipment through a message center, and synchronizing the message content to the other online login equipment; and identifying the online states of all corresponding login equipment through the message center, and pushing the message content to the online corresponding login equipment.
Description
Technical Field
The invention relates to the technical field of informatization software, in particular to a multi-terminal message synchronization method and a multi-terminal message synchronization system based on an instant messaging system.
Background
With the development of computer technology, software technology and communication technology are more and more perfect, and users have strong demands for application message synchronization and reminding under the condition that multiple end devices APP are on-line or off-line simultaneously. A person has various office equipment, such as a mobile phone, an iPad and a PC computer, and can still receive watched and unread information when the user wants to leave the computer and log in other two kinds of equipment. In the traditional synchronization mode, most APP developers actively pull through interface roaming to achieve the synchronization purpose. For a developer, what time period needs to be calculated, records in groups need to be obtained, and the like, a client has a large amount of arithmetic logic, and when a plurality of groups of clients chat and messages exist, the APP can be started to be blocked, and user experience is influenced.
How to realize the synchronization of messages among multi-terminal equipment is a technical problem to be solved.
Disclosure of Invention
The technical task of the invention is to provide a multi-terminal message synchronization method and system based on an instant messaging system to solve the technical problem of how to realize message synchronization between multi-terminal devices.
In a first aspect, the multi-terminal message synchronization method based on the instant messaging system of the present invention is applied to an instant messaging service system comprising a cluster server, a message center and a multi-terminal device configured with an instant messaging client, and the method comprises the following steps:
for each user account, configuring equipment allowing the user account to log in an instant messaging system as login equipment through the instant messaging system, and forming a registration record based on the login equipment;
for each user account, after a user logs in an instant messaging system through current equipment, a cluster server establishes connection with the current equipment and updates a mapping relation corresponding to the user account, wherein the mapping relation is used for recording the user account, all login equipment corresponding to the user account and the login state of each login equipment, and the login state comprises online and offline;
after a user sends a message through the current equipment, the message is analyzed through the cluster server, the analyzed message identifies a message sending user account, a message receiving user account and message content, and the message content is stored;
based on a server corresponding to the current equipment, pushing the analyzed message to a corresponding message center;
identifying the online state of other login equipment except the current equipment through a message center based on the mapping relation corresponding to the message sending party user account, and synchronizing the message content to the other online login equipment;
and identifying the online states of all corresponding login equipment through the message center based on the mapping relation corresponding to the user account of the message receiver, and pushing the message content to the online corresponding login equipment.
Preferably, for each user account, when a user logs in an instant messaging system through current equipment, the type of the current equipment is identified through the instant messaging system, and whether the corresponding mapping relation exists in the current equipment is checked;
if the current equipment login status does not exist, a mapping relation is created, the current equipment login status in the mapping relation is modified to be online, the cluster server and the current equipment are connected, and a connection identification code is returned to the instant communication client configured on the current equipment;
if yes, the current equipment login state in the mapping relation is modified to be online, the cluster server and the current equipment are connected, and a connection identification code is returned to the instant messaging client configured to the current equipment;
the connection identification code is used for recording the connection relation between the current equipment and the server and is used as a session identification code of the current equipment and the server;
and searching a server corresponding to the current equipment based on the connection identification code, so as to push the analyzed message to a corresponding message center.
Preferably, after the user logs in the instant messaging system through the current device, the user notifies other online login devices in the same mapping relationship of the registration information of the current device, and the registration information is used for indicating that the current device has already joined in the corresponding mapping relationship.
Preferably, based on the mapping relationship corresponding to the account of the message sending party user, the online states of other login devices except the current device are identified through the message center, and the message content is synchronized to the other online login devices, including the following steps:
checking whether other login equipment is online or not based on the mapping relation corresponding to the account of the message sending party user;
for other online login devices, synchronizing message content to other login devices through session channels between the server and the other login devices, and if the other login devices return feedback messages to the server within preset time, identifying the corresponding message state as delivered;
for other off-line login equipment, identifying the corresponding message state as not sent, synchronizing the message content to other login equipment through a session channel between a server and the other login equipment when a message center monitors that the other off-line login equipment is in an on-line state, and identifying the corresponding message state as sent if the other login equipment returns a feedback message to the server within a preset time;
if the other login equipment does not return feedback information to the server within the preset time, the corresponding message state mark is not delivered, when the message center monitors that the conversation channel between the other login equipment is unobstructed, the message content is synchronized to the other login equipment again, if the other login equipment returns message feedback to the server within the preset time, the server modifies the message state to be delivered according to the message feedback, and if the other login equipment does not return message feedback to the service within the preset time, the step is executed again until the server receives the feedback message.
Preferably, based on the mapping relationship corresponding to the user account of the message receiver, the online states of all corresponding login devices are identified through the message center, and the message content is pushed to the online corresponding login devices, including the following steps:
checking whether the corresponding login equipment is on-line or not based on the mapping relation corresponding to the message receiver user account;
for the online login equipment, based on a session channel between the login equipment and a corresponding server, pushing message content to the login equipment through a message center, and after receiving feedback information returned by the login equipment, the corresponding server pushes the state of the received message of the login equipment to other related login equipment through the session channel between the corresponding server and other login equipment;
for each online login device, after checking the message content, the login device returns a feedback message to the corresponding server, and the corresponding server pushes the state of the message received by the login device to other related login devices through the session channel between the corresponding server and other login devices.
In a second aspect, the instant messaging system-based multi-terminal message synchronization system of the present invention, through the instant messaging system-based multi-terminal message synchronization method according to any one of the first aspects, realizes synchronization of an instant messaging system of the same user account on a multi-terminal device, and the system includes:
the instant messaging system is a software system capable of realizing instant messaging and interacts with a user in a client-side mode;
the system comprises at least one server, wherein the at least one server forms a server cluster, and a database is configured in each server;
the system comprises a multi-terminal device, a client and a server, wherein the multi-terminal device is a plurality of devices facing users, each device is provided with an instant messaging system client, and the users log in an instant messaging system arranged on the multi-terminal device through the same user account;
the message center corresponds to the server and is used for pushing messages;
the instant messaging system is used for configuring equipment which allows logging in the instant messaging system based on the user account as logging-in equipment, forming a registration record based on the logging-in equipment, and the server cluster stores the registration record through a database;
after a user logs in an instant messaging system through current equipment, the current equipment is connected with a corresponding server in a server cluster, the corresponding server is used for updating a mapping relation corresponding to a user account, the mapping relation is used for recording the user account, all login equipment corresponding to the user account and the login state of each login equipment, and the login state comprises online and offline;
after the user sends the message through the current equipment, the corresponding server is used for analyzing the message, identifying the message sending user account, the message receiving user account and the message content through the analyzed message, and storing the message content through the database; the server is used for pushing the analyzed message to a corresponding message center based on the server corresponding to the current equipment for sending the message;
based on the mapping relation corresponding to the account of the message sending party user, the message center is used for identifying the online state of other login equipment except the current equipment and synchronizing the message content to the other online login equipment;
based on the mapping relation corresponding to the user account of the message receiver, the message center is used for identifying the online states of all corresponding login devices through the message center and pushing the message content to the online corresponding login devices.
Preferably, for each user account, when a user logs in the instant messaging system through one device, the instant messaging system is used for identifying the type of the current device and checking whether the current device has a corresponding mapping relation;
if the current equipment log-in state does not exist, the instant communication system is used for creating a mapping relation, the current equipment log-in state in the mapping relation is modified to be online, the server cluster is used for establishing connection with the current equipment through a server corresponding to the current equipment, and returning a connection identification code to an instant communication client configured to the current equipment;
if the current equipment login state exists, the instant messaging system is used for modifying the current equipment login state in the mapping relation to be online, the server cluster is used for establishing connection with the current equipment through a server corresponding to the current equipment, and returning a connection identification code to an instant messaging client configured on the current equipment;
the connection identification code is used for recording the connection relation between the current equipment and the server and is used as a session identification code of the current equipment and the server;
based on the connection identification code, the instant communication system is used for searching a server corresponding to the current equipment, and the corresponding server is used for pushing the analyzed message to a corresponding message center.
Preferably, after the user logs in the instant messaging system through the current device, the instant messaging system is used for notifying other online login devices in the same mapping relationship of the registration information of the current device, and the registration information is used for indicating that the current device is already added into the corresponding mapping relationship.
Preferably, the method for identifying the online state of other login devices except the current device through the message center based on the mapping relation corresponding to the account of the message sending party user, and synchronizing the message content to the other online login devices comprises the following steps:
based on the mapping relation corresponding to the user account of the message sending party, the message center is used for checking whether other logging devices are online or not;
for other online login devices, through a session channel between the server and the other login devices, the message center is used for synchronizing the message content to the other login devices, and if the other login devices return feedback messages to the server within preset time, the server is used for identifying the corresponding message state as delivered;
for other off-line login equipment, a message center is used for identifying the corresponding message state as not sent, when monitoring that the other off-line login equipment is in an on-line state, the message center synchronizes message content to the other login equipment through a session channel between a server and the other login equipment, and if the other login equipment returns a feedback message to the server within a preset time, the server is used for identifying the corresponding message state as sent;
if the other login devices do not return feedback information to the server within the preset time, the message center is used for marking the corresponding message state as undelivered, after the message center monitors that the conversation channels between the other login devices are unobstructed, the message content is synchronized to the other login devices again, if the other login devices return message feedback to the server within the preset time, the corresponding server is used for modifying the message state as delivered according to the message feedback, if the other login devices do not return message feedback to the server within the preset time, the step is executed again until the server receives the feedback message.
Preferably, identifying the online states of all corresponding login devices through a message center based on the mapping relationship corresponding to the user account of the message receiver, and pushing the message content to the online corresponding login devices, includes:
based on the mapping relation corresponding to the user account of the message receiver, the message center is used for checking whether the corresponding logging device is online;
for the online login equipment, based on a session channel between the login equipment and the corresponding server, the message center is used for pushing message content to the login equipment, and after receiving feedback information returned by the login equipment, the corresponding server is used for pushing the state of the received message of the login equipment to other related login equipment through the session channel between the corresponding server and other login equipment;
for each online login device, after checking the message content, the login device returns a feedback message to a corresponding server, and the corresponding server is used for pushing the state of the message received by the login device to other related login devices through a session channel between the corresponding server and the other login devices.
The multi-terminal message synchronization method and the system based on the instant communication system have the following advantages that: the method comprises the steps that mapping relations among user accounts, devices and device login states are established through an instant messaging system, after a user logs in the instant messaging system through one device, the corresponding mapping relations are updated in real time, the online state of each login device can be known in time through the mapping relations, after the user sends or receives a message through one device, a message center can detect the login state of each login device in time through the mapping relations, the message is pushed to other online login devices, the mapping relations are added into the device after the message user logs in the instant messaging system through one device, the message synchronization among transversely-expanded device types and more devices can be met while the message synchronization among devices is not passed, and the consistency of the message is achieved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed for the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
The invention is further described below with reference to the accompanying drawings.
Fig. 1 is a flow chart of a multi-terminal message synchronization method based on an instant messaging system in embodiment 1;
FIG. 2 is a flow chart of a synchronization mechanism of a multi-terminal message synchronization method based on an instant messaging system according to embodiment 1;
fig. 3 is a flow diagram of the information synchronization process of the sending end in the multi-end message synchronization method based on the instant messaging system in embodiment 1;
fig. 4 is a block diagram of a receiving side information synchronization process in a multi-side message synchronization method based on an instant messaging system in embodiment 1;
fig. 5 is a block diagram of a multi-terminal message synchronization system based on an instant messaging system in embodiment 2.
Detailed Description
The present invention is further described with reference to the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and can implement the present invention, but the embodiments are not to be construed as limiting the present invention and the embodiments and technical features of the embodiments can be combined with each other without conflict.
The embodiment of the invention provides a multi-terminal message synchronization method and a multi-terminal message synchronization system based on an instant messaging system, which are used for solving the technical problem of how to realize message synchronization among multi-terminal devices.
Example 1:
the invention relates to a multi-terminal message synchronization method based on an instant communication system, which is applied to an instant communication service system consisting of a cluster server, a message center and multi-terminal equipment provided with an instant communication client, and comprises the following steps:
s100, for each user account, configuring equipment which allows the user account to log in the instant messaging system as login equipment through the instant messaging system, and forming a registration record based on the login equipment;
s200, for each user account, after a user logs in the instant communication system through the current equipment, the cluster server establishes connection with the current equipment, and updates a mapping relation corresponding to the user account, wherein the mapping relation is used for recording the user account, all login equipment corresponding to the user account and the login state of each login equipment, and the login state comprises online and offline;
s300, after a user sends a message through current equipment, the message is analyzed through a cluster server, the analyzed message identifies a message sending user account, a message receiving user account and message content, and the message content is stored;
s400, based on a server corresponding to the current equipment, pushing the analyzed message to a corresponding message center;
s500, identifying the online states of other login devices except the current device through a message center based on the mapping relation corresponding to the message sending party user account, and synchronizing the message content to other online login devices;
and identifying the online states of all corresponding login equipment through the message center based on the mapping relation corresponding to the user account of the message receiver, and pushing the message content to the online corresponding login equipment.
In the embodiment, for each user account, when a user logs in the instant messaging system through the current device, the type of the current device is identified through the instant messaging system, and whether the corresponding mapping relation exists in the current device is checked; if the current equipment login status does not exist, a mapping relation is created, the current equipment login status in the mapping relation is modified to be online, the cluster server is connected with the current equipment, and a connection identification code is returned to the instant communication client configured on the current equipment; if the current equipment login state exists, the current equipment login state in the mapping relation is changed to be on-line, the cluster server is connected with the current equipment, and a connection identification code is returned to the instant messaging client side which is configured in the current equipment.
In this embodiment, the connection identifier is used to record the connection relationship between the current device and the server, and is used as the session identifier of the current device and the server; in step S400, a server corresponding to the current device is searched based on the connection identifier, so as to push the analyzed message to the corresponding message center.
After the user logs in the instant communication system through the current equipment, the registration information of the current equipment is notified to other online login equipment in the same mapping relation, and the registration information is used for indicating that the current equipment is added into the corresponding mapping relation.
In step S500, based on the mapping relationship corresponding to the account of the message sending party user, the online status of other login devices other than the current device is identified through the message center, and the message content is synchronized to the other online login devices, including the following steps:
(1) checking whether other login equipment is online or not based on the mapping relation corresponding to the account of the message sending party user;
(2) for other online login devices, synchronizing message content to other login devices through session channels between the server and the other login devices, and if the other login devices return feedback messages to the server within preset time, identifying the corresponding message state as delivered;
for other off-line login equipment, identifying the corresponding message state as not sent, synchronizing the message content to other login equipment through a session channel between the server and the other login equipment when the message center monitors that the other off-line login equipment is in an on-line state, and identifying the corresponding message state as sent if the other login equipment returns a feedback message to the server within a preset time;
if the other login equipment does not return feedback information to the server within the preset time, the corresponding message state mark is not delivered, when the message center monitors that the conversation channel between the other login equipment is unobstructed, the message content is synchronized to the other login equipment again, if the other login equipment returns message feedback to the server within the preset time, the server modifies the message state to be delivered according to the message feedback, if the other login equipment does not return message feedback to the service within the preset time, the step is executed again until the server receives the feedback message.
In step S500, based on the mapping relationship corresponding to the user account of the message recipient, the online states of all corresponding login devices are identified through the message center, and the message content is pushed to the online corresponding login devices, including the following steps:
(1) checking whether the corresponding login equipment is online or not based on the mapping relation corresponding to the message receiver user account;
(2) for the online login equipment, based on a session channel between the login equipment and a corresponding server, pushing the content of the message to the login equipment through a message center, and after receiving feedback information returned by the login equipment, the corresponding server pushes the state of the received message of the login equipment to other related login equipment through the session channel between the corresponding server and other login equipment;
for each online login device, after the login device checks the message content, a feedback message is returned to the corresponding server, and the corresponding server pushes the state of the message received by the login device to other related login devices through the session channel between the corresponding server and other login devices.
In this embodiment, under the condition that multiple devices (mobile phone devices, PC computers, and pads) are simultaneously online or offline, the same user account can see that the information states are consistent and not lost after logging in various devices in different scenes, so that the user can switch the information states invisibly. The synchronization mechanism is shown in fig. 2.
A description is given through a specific embodiment, in this embodiment, a sending user B may log in an instant messaging system through three devices, which are B1, B2, and B3, respectively, and a receiving user a may log in the instant messaging system through three devices, which are a1, a2, and a3, respectively, and the specific flow is as follows:
firstly, establishing a registration record and mapping relation of multiple devices logged in by the same account in an instant communication system: when a user A uses a mobile phone a1 device to log in a system, firstly identifying the type of a request device and checking whether the user has other device registration relations, if not, establishing a new registration mapping relation object; if the equipment exists, the equipment is added into an existing registration mapping relation object, a label is added to the unavailable equipment, the equipment can exist with other different types of equipment at the same time, the equipment cannot be kicked off from the line (the same equipment type can only log in one equipment by one account number, brand mobile phones such as apple mobile phones, millet mobile phones and the like are regarded as one equipment, and PCs (personal computers) of Mac, windows and Linux systems are regarded as the same equipment), after the registration is successful, a unique connection identification code is returned to a client request end, and the identification code records the relation between the equipment and the service through an identification code of an instant messaging service to a client, namely, the identification code is used as a session identification of the service side. In a distributed architecture, a user's device can be quickly queried on that physical server by an identification code (which the message push program needs to use).
Secondly, when the user A performs the first step of operation through the windows computer terminal a2, the user A registers in the mapping relation of the instant messaging system and informs the user A of a1, and a2 logs in and is online; in turn, user a's ipad device a3 is also logged into the system (i.e., user a's three devices are all registered); and B, logging in the system by using the mobile phone end B1 and the windows end B2 and registering.
Thirdly, when the B user sends the communication message to the a by using B1, there are three processes of sending the message, pushing the message and synchronizing the message.
And sending a message: firstly, the B1 terminal packages the message for A and sends the packaged message to the server S, and the S receives the message sent by the B user B1 and analyzes that the message is the message sent to A. 2) And in the message analyzing process, after the message sender and the message receiver are identified, the messages are stored, and then the synchronous program is executed to push the user A, B messages respectively after the messages are successfully stored.
Pushing messages: in the pushing program, user registration information is inquired through a user identifier, the information is pushed to a message center corresponding to the service according to the position of the service position of the user, the message center identifies whether the user equipment is online, and if the user equipment is online, the pushing program is used for pushing data to the used equipment; and if the mobile terminal is not on line, the information is added with the state of the user equipment for storage.
Message synchronization needs to be divided into sender message synchronization and receiver message synchronization.
Data of sender B B1 needs to be pushed to B2 device of user B, push logic: checking whether the user B b2 equipment is on-line, when on-line, registering a session channel established by a server S and b2, sending an instruction message to b2, after the b2 receives a message instruction of S, feeding back the S message to the client b2 by b2 through the session channel, and modifying the corresponding message state to the sent state by the S end; when the b2 device is not on-line, the S-terminal directly modifies the corresponding state to delivery. When b2 logs in again, S inquires that b2 is the received data in a unified way, the data is actively sent to b2 through a session channel, b2 feeds back that the S message is received, and the state of the S-side re-modification message is sent. If b2 is not fed back, the S terminal records the response time, and the information state is not changed after 5 seconds of timeout. When the server side inquires that the b2 session is unblocked again, the push of the message to b2 is continued until b2 receives all the messages.
The three devices a1, a2 and a3 of the receiving user a receive logic, a1 receives the information of B and feeds back the information to S, the S end will synchronize the information received by a1 and push the corresponding information state through establishing a session channel with the other end, when the a1 end views the information in a certain group, the a1 will also feed back to S through the channel to inform the service S, the a1 already views the information in the certain group, and the S changes the information states of a2 and a3 according to the data stored in the background and pushes the state to the devices, so as to achieve the consistency of the information states. A
The method of the embodiment can meet the requirement of message synchronization among universal equipment and various equipment, and can also meet the requirement of message synchronization among transverse extension equipment types and more equipment when the various equipment is realized, thereby achieving the consistency of information and having higher practical value.
Example 2:
the invention relates to a multi-terminal message synchronization system based on an instant messaging system, which comprises the instant messaging system, a server, multi-terminal equipment and a message center, wherein the instant messaging system is a software system capable of realizing instant messaging and interacts with a user in a client-side mode; the system comprises at least one server, at least one server and a database, wherein the at least one server forms a server cluster, and each server is provided with the database; the multi-terminal equipment is a plurality of pieces of equipment facing the user, each piece of equipment is provided with an instant messaging system client, and the user logs in an instant messaging system arranged on the multi-terminal equipment through the same user account; the message center corresponds to the server and is used for pushing messages.
In this embodiment, the instant messaging system is configured to configure, as a login device, a device that allows logging in the instant messaging system based on the user account, and form a registration record based on the login device, where the server cluster stores the registration record through a database.
After a user logs in the instant messaging system through the current device, the current device is connected with a corresponding server in the server cluster, the corresponding server is used for updating the mapping relation corresponding to the user account, the mapping relation is used for recording the user account, all login devices corresponding to the user account and the login state of each login device, and the login state comprises online and offline.
After the user sends the message through the current equipment, the corresponding server is used for analyzing the message, identifying the message sending user account, the message receiving user account and the message content through the analyzed message, and storing the message content through the database; and the server is used for pushing the analyzed message to the corresponding message center based on the server corresponding to the current equipment for sending the message.
Based on the mapping relation corresponding to the account of the message sending party user, the message center is used for identifying the online state of other login equipment except the current equipment and synchronizing the message content to the other online login equipment. Based on the mapping relation corresponding to the user account of the message receiver, the message center is used for identifying the online states of all corresponding login devices through the message center and pushing the message content to the online corresponding login devices.
For each user account, when a user logs in an instant messaging system through one device, the instant messaging system is used for identifying the type of the current device and checking whether the current device has a corresponding mapping relation; if the current equipment is not on line, the instant communication system is used for establishing a mapping relation, modifying the login state of the current equipment in the mapping relation into on line, and the server cluster is used for establishing connection with the current equipment through a server corresponding to the current equipment and returning a connection identification code to an instant communication client configured on the current equipment; if the current equipment login state exists, the instant messaging system is used for modifying the current equipment login state into an online state in the mapping relation, the server cluster is used for establishing connection with the current equipment through a server corresponding to the current equipment, and returning a connection identification code to an instant messaging client configured on the current equipment; the connection identification code is used for recording the connection relation between the current equipment and the server and is used as the session identification code of the current equipment and the server.
Based on the connection identification code, the instant communication system is used for searching a server corresponding to the current equipment, and the corresponding server is used for pushing the analyzed message to the corresponding message center.
After the user logs in the instant communication system through the current equipment, the instant communication system is used for notifying other online login equipment in the same mapping relation of the registration information of the current equipment, and the registration information is used for indicating that the current equipment is added into the corresponding mapping relation.
Based on the mapping relation corresponding to the account of the user of the message sending party, the online states of other login devices except the current device are identified through the message center, and the message content is synchronized to the other online login devices, and the method comprises the following steps:
based on the mapping relation corresponding to the user account of the message sending party, the message center is used for checking whether other logging devices are online or not;
for other online login devices, through a session channel between the server and the other login devices, the message center is used for synchronizing the message content to the other login devices, and if the other login devices return feedback messages to the server within preset time, the server is used for identifying the corresponding message state as delivered;
for other off-line login equipment, a message center is used for identifying the corresponding message state as not sent, when monitoring that the other off-line login equipment is in an on-line state, the message center synchronizes message content to the other login equipment through a session channel between a server and the other login equipment, and if the other login equipment returns a feedback message to the server within a preset time, the server is used for identifying the corresponding message state as sent;
if the other login devices do not return feedback information to the server within the preset time, the message center is used for identifying the corresponding message state as undelivered, after the message center monitors that the conversation channel between the other login devices is unobstructed, the message content is synchronized to the other login devices again, if the other login devices return message feedback to the server within the preset time, the corresponding server is used for modifying the message state to be delivered according to the message feedback, if the other login devices do not return message feedback to the service within the preset time, the step is executed again until the server receives the feedback message.
Based on the mapping relation corresponding to the user account of the message receiver, the online states of all corresponding login devices are identified through a message center, and the message content is pushed to the online corresponding login devices, and the method comprises the following steps:
based on the mapping relation corresponding to the user account of the message receiver, the message center is used for checking whether the corresponding logging device is online;
for the online login equipment, based on a session channel between the login equipment and the corresponding server, the message center is used for pushing message content to the login equipment, and after receiving feedback information returned by the login equipment, the corresponding server is used for pushing the state of the received message of the login equipment to other related login equipment through the session channel between the corresponding server and other login equipment;
for each online login device, after the login device checks the message content, a feedback message is returned to the corresponding server, and the corresponding server is used for pushing the state of the message received by the login device to other related login devices through the session channel between the corresponding server and other login devices.
The system of this embodiment can execute the method disclosed in embodiment 1, and implement that the same user account logs in the instant messaging system on multiple different end devices, thereby implementing information synchronization.
While the invention has been shown and described in detail in the drawings and in the preferred embodiments, it is not intended to limit the invention to the disclosed embodiments, and it will be apparent to those skilled in the art that many more embodiments of the invention can be made by combining the various embodiments described above, and such embodiments are within the scope of the invention.
Claims (10)
1. A multi-terminal message synchronization method based on an instant communication system is characterized in that the method is applied to an instant communication service system which comprises a cluster server, a message center and multi-terminal equipment configured with an instant communication client, and the method comprises the following steps:
for each user account, configuring equipment allowing the user account to log in an instant messaging system as login equipment through the instant messaging system, and forming a registration record based on the login equipment;
for each user account, after a user logs in an instant messaging system through current equipment, a cluster server establishes connection with the current equipment and updates a mapping relation corresponding to the user account, wherein the mapping relation is used for recording the user account, all login equipment corresponding to the user account and the login state of each login equipment, and the login state comprises online and offline;
after a user sends a message through the current equipment, the message is analyzed through the cluster server, the analyzed message identifies a message sending user account, a message receiving user account and message content, and the message content is stored;
based on a server corresponding to the current equipment, pushing the analyzed message to a corresponding message center;
identifying the online state of other login equipment except current equipment through a message center based on the mapping relation corresponding to the message sending party user account, and synchronizing the message content to the other online login equipment;
and identifying the online states of all corresponding login equipment through the message center based on the mapping relation corresponding to the user account of the message receiver, and pushing the message content to the online corresponding login equipment.
2. The multi-terminal message synchronization method based on the instant messaging system as claimed in claim 1, wherein for each user account, when the user logs in the instant messaging system through the current device, the type of the current device is identified through the instant messaging system, and whether the current device has a corresponding mapping relationship is checked;
if the current equipment login state does not exist, a mapping relation is created, the current equipment login state in the mapping relation is modified to be online, the cluster server is connected with the current equipment, and a connection identification code is returned to the instant messaging client configured on the current equipment;
if yes, the current equipment login state in the mapping relation is modified to be online, the cluster server and the current equipment are connected, and a connection identification code is returned to the instant messaging client configured to the current equipment;
the connection identification code is used for recording the connection relation between the current equipment and the server and is used as a session identification code of the current equipment and the server;
and searching a server corresponding to the current equipment based on the connection identification code, so as to push the analyzed message to a corresponding message center.
3. The multi-terminal message synchronization method based on the instant messaging system as claimed in claim 1, wherein after the user logs in the instant messaging system through the current device, the user notifies other online login devices in the same mapping relationship of the registration information of the current device, and the registration information is used to indicate that the current device has joined in the corresponding mapping relationship.
4. The multi-terminal message synchronization method based on the instant messaging system according to any one of claims 1 to 3, characterized in that based on the mapping relationship corresponding to the account of the message sending party, the online state of other login devices except the current device is identified through the message center, and the message content is synchronized to the other online login devices, comprising the following steps:
checking whether other login equipment is online or not based on the mapping relation corresponding to the account of the message sending party user;
for other online login devices, synchronizing message content to other login devices through session channels between the server and the other login devices, and if the other login devices return feedback messages to the server within preset time, identifying the corresponding message state as delivered;
for other off-line login equipment, identifying the corresponding message state as not sent, synchronizing the message content to other off-line login equipment through a session channel between a server and the other off-line login equipment when a message center monitors that the other off-line login equipment is in an on-line state, and identifying the corresponding message state as sent if the other off-line login equipment returns a feedback message to the server within a preset time;
if the other login equipment does not return feedback information to the server within the preset time, the corresponding message state mark is not delivered, when the message center monitors that the conversation channel between the other login equipment is unobstructed, the message content is synchronized to the other login equipment again, if the other login equipment returns message feedback to the server within the preset time, the server modifies the message state to be delivered according to the message feedback, and if the other login equipment does not return message feedback to the service within the preset time, the step is executed again until the server receives the feedback message.
5. The multi-terminal message synchronization method based on the instant messaging system according to any one of claims 1 to 3, wherein based on the mapping relationship corresponding to the user account of the message receiver, the online states of all corresponding login devices are identified through the message center, and the message content is pushed to the corresponding login devices on line, comprising the steps of:
checking whether the corresponding login equipment is online or not based on the mapping relation corresponding to the message receiver user account;
for the online login equipment, based on a session channel between the login equipment and a corresponding server, pushing the content of the message to the login equipment through a message center, and after receiving feedback information returned by the login equipment, the corresponding server pushes the state of the received message of the login equipment to other related login equipment through the session channel between the corresponding server and other login equipment;
for each online login device, after checking the message content, the login device returns a feedback message to the corresponding server, and the corresponding server pushes the state of the message received by the login device to other related login devices through the session channel between the corresponding server and other login devices.
6. A multi-terminal message synchronization system based on an instant messaging system, characterized in that the multi-terminal message synchronization method based on the instant messaging system as claimed in any one of claims 1 to 5 is used to realize the synchronization of the instant messaging system of the same user account on multi-terminal equipment, and the system comprises:
the instant messaging system is a software system capable of realizing instant messaging, and interacts with a user in a client-side mode;
the system comprises at least one server, wherein the at least one server forms a server cluster, and a database is configured in each server;
the system comprises a multi-terminal device, a plurality of client terminals and a plurality of client terminals, wherein the multi-terminal device is a plurality of devices facing a user, each device is provided with an instant messaging system client, and the user logs in an instant messaging system arranged on the multi-terminal device through the same user account;
the message center corresponds to the server and is used for pushing messages;
the instant messaging system is used for configuring equipment which allows logging in the instant messaging system based on the user account as logging-in equipment, forming a registration record based on the logging-in equipment, and storing the registration record by the server cluster through a database;
after a user logs in an instant messaging system through current equipment, the current equipment is connected with a corresponding server in a server cluster, the corresponding server is used for updating a mapping relation corresponding to a user account, the mapping relation is used for recording the user account, all login equipment corresponding to the user account and the login state of each login equipment, and the login state comprises online and offline;
after the user sends the message through the current equipment, the corresponding server is used for analyzing the message, identifying the message sending user account, the message receiving user account and the message content through the analyzed message, and storing the message content through the database; the server is used for pushing the analyzed message to a corresponding message center based on the server corresponding to the current equipment for sending the message;
based on the mapping relation corresponding to the user account of the message sending party, the message center is used for identifying the online state of other login equipment except the current equipment and synchronizing the message content to the other online login equipment;
and based on the mapping relation corresponding to the user account of the message receiver, the message center is used for identifying the online states of all corresponding login equipment through the message center and pushing the message content to the online corresponding login equipment.
7. The multi-terminal message synchronization system based on instant messaging system of claim 6, wherein for each user account, when the user logs in the instant messaging system through a device, the instant messaging system is used to identify the type of the current device and check whether the current device has a corresponding mapping relationship;
if the current equipment login status does not exist, the instant messaging system is used for creating a mapping relation, the current equipment login status in the mapping relation is modified to be online, the server cluster is used for establishing connection with the current equipment through a server corresponding to the current equipment, and returning a connection identification code to an instant messaging client configured on the current equipment;
if the current equipment login state exists, the instant communication system is used for modifying the current equipment login state in the mapping relation to be online, the server cluster is used for establishing connection with the current equipment through a server corresponding to the current equipment, and returning a connection identification code to an instant communication client configured on the current equipment;
the connection identification code is used for recording the connection relation between the current equipment and the server and is used as a session identification code of the current equipment and the server;
based on the connection identification code, the instant communication system is used for searching a server corresponding to the current equipment, and the corresponding server is used for pushing the analyzed message to a corresponding message center.
8. The multi-terminal message synchronization system based on the instant messaging system as claimed in claim 6, wherein after the user logs in the instant messaging system through the current device, the instant messaging system is configured to notify other online login devices in the same mapping relationship of the registration information of the current device, and the registration information is used to indicate that the current device has joined in the corresponding mapping relationship.
9. The multi-terminal message synchronization system based on the instant messaging system as claimed in any one of claims 6 to 8, wherein the message center identifies the online status of other login devices except the current device based on the mapping relationship corresponding to the account of the message sender user, and synchronizes the message content to the other online login devices, comprising:
based on the mapping relation corresponding to the user account of the message sending party, the message center is used for checking whether other login equipment is online;
for other online login devices, through a session channel between the server and the other login devices, the message center is used for synchronizing the message content to the other login devices, and if the other login devices return feedback messages to the server within preset time, the server is used for identifying the corresponding message state as delivered;
for other off-line login equipment, a message center is used for identifying the corresponding message state as not sent, when the message center monitors that the other off-line login equipment is in an on-line state, the message center synchronizes the message content to the other login equipment through a session channel between a server and the other login equipment, and if the other login equipment returns a feedback message to the server within a preset time, the server is used for identifying the corresponding message state as sent;
if the other login devices do not return feedback information to the server within the preset time, the message center is used for identifying the corresponding message state as undelivered, after the message center monitors that the conversation channel between the other login devices is unobstructed, the message content is synchronized to the other login devices again, if the other login devices return message feedback to the server within the preset time, the corresponding server is used for modifying the message state to be delivered according to the message feedback, if the other login devices do not return message feedback to the service within the preset time, the step is executed again until the server receives the feedback message.
10. The multi-terminal message synchronization system based on the instant messaging system according to any one of claims 6 to 8, wherein based on the mapping relationship corresponding to the account of the message recipient user, the online status of all corresponding login devices is identified through the message center, and the message content is pushed to the online corresponding login devices, comprising:
the message center is used for checking whether the corresponding login equipment is online or not based on the mapping relation corresponding to the message receiver user account;
for the online login equipment, based on a session channel between the login equipment and the corresponding server, the message center is used for pushing message content to the login equipment, and after receiving feedback information returned by the login equipment, the corresponding server is used for pushing the state of the received message of the login equipment to other related login equipment through the session channel between the corresponding server and other login equipment;
for each online login device, after checking the message content, the login device returns a feedback message to a corresponding server, and the corresponding server is used for pushing the state of the message received by the login device to other related login devices through a session channel between the corresponding server and the other login devices.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210070108.2A CN114513481A (en) | 2022-01-21 | 2022-01-21 | Multi-terminal message synchronization method and system based on instant messaging system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210070108.2A CN114513481A (en) | 2022-01-21 | 2022-01-21 | Multi-terminal message synchronization method and system based on instant messaging system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114513481A true CN114513481A (en) | 2022-05-17 |
Family
ID=81550051
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210070108.2A Pending CN114513481A (en) | 2022-01-21 | 2022-01-21 | Multi-terminal message synchronization method and system based on instant messaging system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114513481A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140136638A1 (en) * | 2012-11-12 | 2014-05-15 | Tencent Technology (Shenzhen) Company Limited | Method and apparatus for message synchronization in instant messaging applications |
CN103812755A (en) * | 2012-11-12 | 2014-05-21 | 腾讯科技(深圳)有限公司 | Message synchronization method and device in instant messaging application |
CN105471716A (en) * | 2015-12-17 | 2016-04-06 | 网易(杭州)网络有限公司 | Method for achieving message synchronization across clients, user equipment and server |
CN106302138A (en) * | 2016-10-31 | 2017-01-04 | 宇龙计算机通信科技(深圳)有限公司 | A kind of method of data synchronization based on many instant communication clients, Apparatus and system |
CN108667899A (en) * | 2018-03-29 | 2018-10-16 | 挂号网(杭州)科技有限公司 | Multiple terminals message synchronization and isolation instant communication method and system |
-
2022
- 2022-01-21 CN CN202210070108.2A patent/CN114513481A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140136638A1 (en) * | 2012-11-12 | 2014-05-15 | Tencent Technology (Shenzhen) Company Limited | Method and apparatus for message synchronization in instant messaging applications |
CN103812755A (en) * | 2012-11-12 | 2014-05-21 | 腾讯科技(深圳)有限公司 | Message synchronization method and device in instant messaging application |
CN105471716A (en) * | 2015-12-17 | 2016-04-06 | 网易(杭州)网络有限公司 | Method for achieving message synchronization across clients, user equipment and server |
CN106302138A (en) * | 2016-10-31 | 2017-01-04 | 宇龙计算机通信科技(深圳)有限公司 | A kind of method of data synchronization based on many instant communication clients, Apparatus and system |
CN108667899A (en) * | 2018-03-29 | 2018-10-16 | 挂号网(杭州)科技有限公司 | Multiple terminals message synchronization and isolation instant communication method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103069755B (en) | Use the method and system that the instant message of multiple client instance transmits | |
CN102958008B (en) | Method, system and mobile terminals for realizing instant messaging | |
CN100407627C (en) | Method and system for realizing end-to-end data sharing | |
CN109246220B (en) | Message pushing system and method | |
EP1605664B1 (en) | Method for synchronizing status information of an IMPS client | |
CN111835837B (en) | Message pushing method and system with multi-terminal adaptation | |
CN101217506B (en) | Message processing method, system and client | |
US20090030917A1 (en) | Multimedia messaging service-based database synchronization | |
CN113391979A (en) | Processing method, equipment and system for monitoring data display and storage medium | |
US7801959B1 (en) | Method and system for pushing electronic messages to a wireless portable device using a standard mail server interface | |
CN110391974A (en) | A kind of message synchronization method, server-side, terminal and system | |
CN111917843A (en) | Message pushing method, computer equipment and storage medium | |
CN103457828B (en) | The instant communication method and system of a kind of inter-network | |
EP3272079B1 (en) | Method and system for transferring messages between messaging systems | |
CN111277483B (en) | Multi-terminal message synchronization method, server and storage medium | |
CN111431790B (en) | Instant messaging method, device, system and storage medium | |
CN103685357A (en) | Account multi-open message processing method and system | |
US8463857B2 (en) | Notification of internet service events using instant messaging service | |
CN111541555A (en) | Group chat optimization method and related product | |
US20120272163A1 (en) | Application-Specific Group Listing | |
US7543030B2 (en) | Peer-to-peer communication for instant messaging between different instant message application types | |
US7779115B2 (en) | Method and apparatus for processing client capability information over a network | |
JP4591117B2 (en) | Presence information distribution system | |
GB2416090A (en) | Integrated instant message system with gateway functions | |
JP4560844B2 (en) | Selective attendance management method for instant messaging service in telecommunication networks such as the Internet |
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 |