CN116389400A - Instant messaging data interaction method, device, equipment and storage medium - Google Patents

Instant messaging data interaction method, device, equipment and storage medium Download PDF

Info

Publication number
CN116389400A
CN116389400A CN202310205762.4A CN202310205762A CN116389400A CN 116389400 A CN116389400 A CN 116389400A CN 202310205762 A CN202310205762 A CN 202310205762A CN 116389400 A CN116389400 A CN 116389400A
Authority
CN
China
Prior art keywords
target
target client
server
long connection
instant messaging
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
Application number
CN202310205762.4A
Other languages
Chinese (zh)
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 VRV Software Corp Ltd
Original Assignee
Beijing VRV Software Corp 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 VRV Software Corp Ltd filed Critical Beijing VRV Software Corp Ltd
Priority to CN202310205762.4A priority Critical patent/CN116389400A/en
Publication of CN116389400A publication Critical patent/CN116389400A/en
Pending legal-status Critical Current

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
    • 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]
    • H04L51/046Interoperability with other network applications or services
    • 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
    • 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/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the disclosure discloses an interaction method, device, equipment and storage medium of instant messaging data. Wherein the method comprises the following steps: after the login success information of the target client is detected, selecting a target IM server from a plurality of IM servers of a distributed application coordination service software Zookeeper cluster; acquiring an IP address of a target IM server and sending the IP address to a target client; the target IM server receives a long connection request sent by a target client; when the target IM server verifies the long connection request, the long connection with the target client is established, and the heartbeat connection with the target client is maintained. The method can improve the distribution efficiency of single chat messages and group chat messages, improve the performance load of the IM server, and improve the single chat message experience of users in the distribution process of a large number of group chat messages.

Description

Instant messaging data interaction method, device, equipment and storage medium
Technical Field
The disclosure relates to the technical field of instant messaging, and in particular relates to an interaction method, device and equipment of instant messaging data and a storage medium.
Background
The existing instant messaging software is increasingly applied to interactive information by more enterprises and individuals, the instant messaging functions are increasingly abundant, and the instant messaging software is usually attached with other functions during real information interaction, for example, besides text chat, emotion marks, text transmission, voice and video chat can be sent, so that social demands of people are met.
Instant messaging has become an indispensable important component in our daily life, and many users are reluctant to supervise chat content of instant messaging by a third party in consideration of the safety of instant messaging data, so that the application of IM communication software meets the safety communication demands of some users.
In the related art, IM communication software has the problems that the efficiency is lower in the distribution process of single chat and group chat messages, the single chat message experience of users is affected in the distribution process of a large number of group chat messages, and the performance load of an IM server is lower under the condition of a large number of group chat message emergencies.
Disclosure of Invention
In view of this, the embodiments of the present disclosure provide an interaction method, apparatus, device, and storage medium for instant messaging data, which can relieve load pressure when an IM server forwards single chat messages and group chat messages, improve distribution efficiency of single chat messages and group chat messages, and improve performance load of the IM server, so as to improve single chat message experience of users in a large number of group chat message distribution processes.
In a first aspect, an embodiment of the present disclosure provides an interaction method for instant messaging data, which adopts the following technical scheme:
after the login success information of the target client is detected, selecting a target IM server from a plurality of IM servers of a distributed application coordination service software Zookeeper cluster;
acquiring an IP address of the target IM server and sending the IP address to the target client;
the target IM server receives a long connection request sent by the target client;
and when the target IM server verifies the long connection request, establishing long connection with the target client and maintaining heartbeat connection with the target client.
In some embodiments, the method further comprises:
after the login success information of the target client is detected, the login state information and the routing information of the target client are stored into a Redis; or,
and after detecting the offline information of the target client, clearing the state information and the routing information of the target client on a Redis.
In some embodiments, the method further comprises:
and when the target IM server does not verify the long connection request within a preset time threshold, sending prompt information, wherein the prompt information is used for prompting that the long connection request fails to verify or prompting whether the target client continues to verify the long connection request.
In some embodiments, the method further comprises:
receiving a service verification request of the target client through a login interface of a routing server;
and when the service verification request meets a preset condition, forwarding the long connection request sent by the target client to the target IM server.
In some embodiments, when the target IM server verifies the long connection request, establishing a long connection with the target client comprises:
when the long connection request passes verification, establishing a mapping relation between ID information of the target client and a channel, and storing the mapping relation;
and caching the ID information and the user name information of the target client.
In some embodiments, the method further comprises:
traversing all channels of the routing server through the scan command;
and sequentially calling the HTTP interfaces of the servers corresponding to the clients connected with each channel, and sending communication messages to the clients through the HTTP interfaces.
In some embodiments, the method further comprises:
acquiring all online clients through olu commands input by a user;
and receiving a keyword input by a user, and triggering to send the communication message to a target client corresponding to the keyword, wherein the target client is one of all online clients.
In a second aspect, an embodiment of the present disclosure further provides an interaction device for instant messaging data, which adopts the following technical scheme:
the screening unit is configured to select a target IM server from a plurality of IM servers of the distributed application coordination service software Zookeeper cluster after the login success information of the target client is detected;
an acquisition unit configured to acquire an IP address of the target IM server and transmit the IP address to the target client;
a receiving unit configured to receive a long connection request sent by the target client by the target IM server;
and the long connection establishing unit is configured to establish a long connection with the target client and keep heartbeat connection between the target IM server and the target client when the target IM server passes the long connection request verification.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, which adopts the following technical scheme:
the electronic device includes:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform any of the above methods of interacting instant messaging data.
In a fourth aspect, the embodiments of the present disclosure further provide a computer readable storage medium storing computer instructions for causing a computer to perform any one of the above methods for interacting instant messaging data.
According to the interactive method, the device, the equipment and the storage medium for the instant messaging data, after login success information of a target client is detected, a target IM server is selected from a plurality of IM servers of a distributed application coordination service software Zookeeper cluster; acquiring an IP address of a target IM server and sending the IP address to a target client; the target IM server receives a long connection request sent by a target client; when the target IM server verifies the long connection request, the long connection with the target client is established, and the heartbeat connection with the target client is maintained. The method and the device solve the problem of load pressure of forwarding the single chat message and the group chat message by the IM server, improve the distribution efficiency of the single chat message and the group chat message, improve the performance load of the IM server, and improve the single chat message experience of users in the distribution process of a large number of group chat messages.
The foregoing description is only an overview of the disclosed technology, and may be implemented in accordance with the disclosure of the present disclosure, so that the above-mentioned and other objects, features and advantages of the present disclosure can be more clearly understood, and the following detailed description of the preferred embodiments is given with reference to the accompanying drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
Fig. 1 is a flow chart of an interaction method of instant messaging data according to an embodiment of the disclosure;
fig. 2 is a schematic structural diagram of an interactive device for instant messaging data according to an embodiment of the present disclosure;
fig. 3 is a schematic block diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
It should be appreciated that the following specific embodiments of the disclosure are described in order to provide a better understanding of the present disclosure, and that other advantages and effects will be apparent to those skilled in the art from the present disclosure. It will be apparent that the described embodiments are merely some, but not all embodiments of the present disclosure. The disclosure may be embodied or practiced in other different specific embodiments, and details within the subject specification may be modified or changed from various points of view and applications without departing from the spirit of the disclosure. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the following claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the present disclosure, one skilled in the art will appreciate that one aspect described herein may be implemented independently of any other aspect, and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. In addition, such apparatus may be implemented and/or such methods practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
It should also be noted that the illustrations provided in the following embodiments merely illustrate the basic concepts of the disclosure by way of illustration, and only the components related to the disclosure are shown in the drawings and are not drawn according to the number, shape and size of the components in actual implementation, and the form, number and proportion of the components in actual implementation may be arbitrarily changed, and the layout of the components may be more complicated.
In addition, in the following description, specific details are provided in order to provide a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects may be practiced without these specific details.
As shown in fig. 1, an embodiment of the present disclosure provides an interaction method for instant messaging data, including the following steps:
s101, after login success information of a target client is detected, selecting a target IM server from a plurality of IM servers of a distributed application coordination service software Zookeeper cluster.
The message of each client is forwarded to the corresponding IM server by the Route server Route of the Route layer, and the communication message is transmitted between the client and the IM server by the transmission control protocol TCP.
Each Zookeeper node in the Zookeeper cluster is an IM server, the IM server distributes own service information to a registry (namely the Zookeeper cluster), and a client can acquire the currently available IM server for starting the Zookeeper service by monitoring the Zookeeper nodes.
Optionally, asynchronous save processing is performed on communication messages such as chat content between the client and the IM server.
S102, the IP address of the target IM server is obtained, and the IP address is sent to the target client.
S103, the target IM server receives the long connection request sent by the target client.
And S104, when the target IM server verifies the long connection request, establishing long connection with the target client, and maintaining heartbeat connection between the target IM server and the target client.
After login success information of a target client is detected, selecting a target IM server from a plurality of IM servers of a distributed application coordination service software Zookeeper cluster; acquiring an IP address of a target IM server and sending the IP address to a target client; the target IM server receives a long connection request sent by a target client; when the target IM server verifies the long connection request, the long connection with the target client is established, and the heartbeat connection with the target client is maintained. The method solves the load pressure of forwarding single chat messages and group chat messages by the IM server, improves the distribution efficiency of the single chat messages and the group chat messages, improves the performance load of the IM server, and can improve the single chat message experience of users in the distribution process of a large number of group chat messages.
In some embodiments, the method further comprises:
after the target IM server detects the login success information of the target client, the login state information and the routing information of the target client are stored into the Redis; or,
and after the target IM server detects the offline information of the target client, the state information and the routing information of the target client are cleared on the Redis.
Optionally, the login state information and the routing information of the target client are stored mainly by processing session, and the token is obtained by encryption and is used for accessing the data of the Redis.
Optionally, in order to ensure secure data transmission between the target client and the target IM server, when the target client goes offline, basic information of the target client, such as state information and routing information of the target client, is cleared in the Redis.
In some embodiments, the method further comprises:
when the target IM server does not verify the long connection request within a preset time threshold, prompt information is sent out at the target client, wherein the prompt information is used for prompting that the long connection request fails to verify or prompting whether the target client continues to verify the long connection request.
For example, the preset time threshold may be set to 5 seconds, and when the target IM server fails to verify the long connection request within 5 seconds, a prompt message is sent out on the display interface of the target client. The security data may be prompted and processed, for example, the security data may include friend information, authentication information, and the like. It should be noted that, the user may set the security data according to the actual requirement, which is not limited by the embodiment of the present disclosure.
In some embodiments, the method further comprises:
the target IM server receives the service verification request of the target client through a login interface of the routing server;
and when the service verification request meets the preset condition, forwarding the long connection request sent by the target client to the target IM server.
Optionally, after determining that the service authentication request meets the preset condition, it is confirmed that the service authentication request has passed the authentication.
In some embodiments, when the target IM server verifies the long connection request, establishing a long connection with the target client comprises:
when the long connection request passes the verification, the target IM server establishes the mapping relation between the ID information of the target client and the channel, and stores the mapping relation;
and caching the ID information and the user name information of the target client to the target IM server.
Optionally, the target client sends the long connection request to the target IM server by sending a special message, where the long connection request carries ID information and user name information of the target client.
In some embodiments, the method further comprises:
traversing all channels of the route server by the target IM server through a scan command;
and sequentially calling the HTTP interfaces of the servers corresponding to the clients connected with each channel, and sending communication messages to the clients through the HTTP interfaces.
Optionally, because the Redis is in a single-thread access manner, if the keys are adopted to match all channel data of the routing server, the Redis cannot process other requests, so that the embodiment of the disclosure traverses all channels of the routing server through the scan command, and the distribution efficiency of forwarding single chat messages or group chat messages by the target IM server can be improved, so that the load pressure of the target IM server is relieved.
In some embodiments, the method further comprises:
the target IM server obtains all online clients through olu commands input by a user;
and the target IM server receives the keywords input by the user and triggers the communication message to be sent to the target client corresponding to the keywords, wherein the target client is one of all online clients.
Alternatively, the keyword may employ "user ID: message content ", etc., and embodiments of the present disclosure are not limited in this regard.
As shown in fig. 2, the embodiment of the present disclosure further provides an interaction device for instant messaging data, including:
a screening unit 21 configured to select a target IM server from a plurality of IM servers of the distributed application coordination service software Zookeeper cluster upon detection of login success information of the target client;
an acquisition unit 22 configured to acquire an IP address of a target IM server and transmit the IP address to a target client;
a receiving unit 23 configured to receive a long connection request sent by a target client by a target IM server;
a long connection establishment unit 24 configured to establish a long connection with the target client and to maintain a heartbeat connection with the target client when the target IM server verifies the long connection request.
In some embodiments, the apparatus further comprises:
an information saving unit configured to save login status information and routing information of the target client to the dis after detecting login success information of the target client; or,
and the information clear unit is configured to clear the state information and the routing information of the target client after detecting the offline information of the target client.
In some embodiments, the apparatus further comprises:
and the information prompting unit is configured to send out prompting information when the target IM server fails to verify the long connection request within a preset time threshold, wherein the prompting information is used for prompting that the long connection request fails to verify or prompting whether the target client continues to verify the long connection request.
In some embodiments, the apparatus further comprises:
a service request receiving unit configured to receive a service verification request of the target client through a login interface of a routing server;
and the long connection request forwarding unit is configured to forward the long connection request sent by the target client to the target IM server after the service verification request meets a preset condition.
In some embodiments, the apparatus further comprises:
a traversing unit configured to traverse all channels of the routing server through the scan command;
and the sending unit is configured to call HTTP interfaces of servers corresponding to the clients connected with each channel in turn, and send communication messages to the clients through the HTTP interfaces.
In some embodiments, the apparatus further comprises:
an acquisition unit configured to acquire all online clients through olu commands input by a user;
and the message triggering unit is configured to receive the keywords input by the user and trigger to send the communication message to a target client corresponding to the keywords, wherein the target client is one of all online clients.
An electronic device according to an embodiment of the present disclosure includes a memory and a processor. The memory is for storing non-transitory computer readable instructions. In particular, the memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, random Access Memory (RAM) and/or cache memory (cache), and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like.
The processor may be a Central Processing Unit (CPU) or other form of processing unit having data processing and/or instruction execution capabilities, and may control other components in the electronic device to perform the desired functions. In one embodiment of the present disclosure, the processor is configured to execute the computer readable instructions stored in the memory, so that the electronic device performs all or part of the steps of the foregoing interactive method for instant messaging data in embodiments of the present disclosure.
It should be understood by those skilled in the art that, in order to solve the technical problem of how to obtain a good user experience effect, the present embodiment may also include well-known structures such as a communication bus, an interface, and the like, and these well-known structures are also included in the protection scope of the present disclosure.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure. A schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure is shown. The electronic device shown in fig. 3 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 3, the electronic device may include a processing means (e.g., a central processing unit, a graphic processor, etc.) that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) or a program loaded from a storage means into a Random Access Memory (RAM). In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, ROM and RAM are connected to each other via a bus. An input/output (I/O) interface is also connected to the bus.
In general, the following devices may be connected to the I/O interface: input means including, for example, sensors or visual information gathering devices; output devices including, for example, display screens and the like; storage devices including, for example, magnetic tape, hard disk, etc.; a communication device. The communication means may allow the electronic device to communicate wirelessly or by wire with other devices, such as edge computing devices, to exchange data. While fig. 3 shows an electronic device having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from ROM. When the computer program is executed by the processing device, all or part of the steps of the method for interacting instant messaging data in the embodiments of the present disclosure are performed, for example, including:
after the login success information of the target client is detected, selecting a target IM server from a plurality of IM servers of a distributed application coordination service software Zookeeper cluster;
acquiring an IP address of the target IM server and sending the IP address to the target client;
the target IM server receives a long connection request sent by the target client;
and when the target IM server verifies the long connection request, establishing long connection with the target client and maintaining heartbeat connection with the target client.
The detailed description of the present embodiment may refer to the corresponding description in the foregoing embodiments, and will not be repeated herein.
A computer-readable storage medium according to an embodiment of the present disclosure has stored thereon non-transitory computer-readable instructions. When the non-transitory computer readable instructions are executed by the processor, all or part of the steps of the method for interacting instant messaging data of the embodiments of the present disclosure described above are performed, for example, including:
after the login success information of the target client is detected, selecting a target IM server from a plurality of IM servers of a distributed application coordination service software Zookeeper cluster;
acquiring an IP address of the target IM server and sending the IP address to the target client;
the target IM server receives a long connection request sent by the target client;
and when the target IM server verifies the long connection request, establishing long connection with the target client and maintaining heartbeat connection with the target client.
The computer-readable storage medium described above includes, but is not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or removable hard disk), media with built-in rewritable non-volatile memory (e.g., memory card), and media with built-in ROM (e.g., ROM cartridge).
The detailed description of the present embodiment may refer to the corresponding description in the foregoing embodiments, and will not be repeated herein.
The basic principles of the present disclosure have been described above in connection with specific embodiments, however, it should be noted that the advantages, benefits, effects, etc. mentioned in the present disclosure are merely examples and not limiting, and these advantages, benefits, effects, etc. are not to be considered as necessarily possessed by the various embodiments of the present disclosure. Furthermore, the specific details disclosed herein are for purposes of illustration and understanding only, and are not intended to be limiting, since the disclosure is not necessarily limited to practice with the specific details described.
In this disclosure, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions, and the block diagrams of devices, apparatuses, devices, systems involved in this disclosure are merely illustrative examples and are not intended to require or implicate that connections, arrangements, configurations must be made in the manner shown in the block diagrams. As will be appreciated by one of skill in the art, the devices, apparatuses, devices, systems may be connected, arranged, configured in any manner. Words such as "including," "comprising," "having," and the like are words of openness and mean "including but not limited to," and are used interchangeably therewith. The terms "or" and "as used herein refer to and are used interchangeably with the term" and/or "unless the context clearly indicates otherwise. The term "such as" as used herein refers to, and is used interchangeably with, the phrase "such as, but not limited to.
In addition, as used herein, the use of "or" in the recitation of items beginning with "at least one" indicates a separate recitation, such that recitation of "at least one of A, B or C" for example means a or B or C, or AB or AC or BC, or ABC (i.e., a and B and C). Furthermore, the term "exemplary" does not mean that the described example is preferred or better than other examples.
It is also noted that in the systems and methods of the present disclosure, components or steps may be disassembled and/or assembled. Such decomposition and/or recombination should be considered equivalent to the present disclosure.
Various changes, substitutions, and alterations are possible to the techniques described herein without departing from the teachings of the techniques defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the particular aspects of the process, machine, manufacture, composition of matter, means, methods and acts described above. The processes, machines, manufacture, compositions of matter, means, methods, or acts, presently existing or later to be developed that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein may be utilized. Accordingly, the appended claims are intended to include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or acts.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the disclosure to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, a person of ordinary skill in the art will recognize certain variations, modifications, alterations, additions, and subcombinations thereof.

Claims (10)

1. An interactive method of instant messaging data is characterized by comprising the following steps:
after the login success information of the target client is detected, selecting a target IM server from a plurality of IM servers of a distributed application coordination service software Zookeeper cluster;
acquiring an IP address of the target IM server and sending the IP address to the target client;
the target IM server receives a long connection request sent by the target client;
and when the target IM server verifies the long connection request, establishing long connection with the target client and maintaining heartbeat connection with the target client.
2. The method for interacting instant messaging data according to claim 1, further comprising:
after the login success information of the target client is detected, the login state information and the routing information of the target client are stored into a Redis; or,
and after detecting the offline information of the target client, clearing the state information and the routing information of the target client.
3. The method for interacting instant messaging data according to claim 1, further comprising:
and when the target IM server does not verify the long connection request within a preset time threshold, sending prompt information, wherein the prompt information is used for prompting that the long connection request fails to verify or prompting whether the target client continues to verify the long connection request.
4. The method for interacting instant messaging data according to claim 1, further comprising:
receiving a service verification request of the target client through a login interface of a routing server;
and when the service verification request meets a preset condition, forwarding the long connection request sent by the target client to the target IM server.
5. The method for interaction of instant messaging data according to claim 1, wherein establishing a long connection with the target client when the target IM server verifies the long connection request comprises:
when the long connection request passes verification, establishing a mapping relation between ID information of the target client and a channel, and storing the mapping relation;
and caching the ID information and the user name information of the target client.
6. The method for interacting instant messaging data according to claim 1, further comprising:
traversing all channels of the routing server through the scan command;
and sequentially calling the HTTP interfaces of the servers corresponding to the clients connected with each channel, and sending communication messages to the clients through the HTTP interfaces.
7. The method of interaction of instant messaging data of claim 6, further comprising:
acquiring all online clients through olu commands input by a user;
and receiving a keyword input by a user, and triggering to send the communication message to a target client corresponding to the keyword, wherein the target client is one of all online clients.
8. An interactive apparatus for instant messaging data, comprising:
the screening unit is configured to select a target IM server from a plurality of IM servers of the distributed application coordination service software Zookeeper cluster after the login success information of the target client is detected;
an acquisition unit configured to acquire an IP address of the target IM server and transmit the IP address to the target client;
a receiving unit configured to receive a long connection request sent by the target client by the target IM server;
and the long connection establishing unit is configured to establish a long connection with the target client and keep heartbeat connection between the target IM server and the target client when the target IM server passes the long connection request verification.
9. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of interaction of instant messaging data according to any of claims 1 to 7.
10. A computer readable storage medium storing computer instructions for causing a computer to perform the method of interaction of instant messaging data according to any of claims 1 to 7.
CN202310205762.4A 2023-03-03 2023-03-03 Instant messaging data interaction method, device, equipment and storage medium Pending CN116389400A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310205762.4A CN116389400A (en) 2023-03-03 2023-03-03 Instant messaging data interaction method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310205762.4A CN116389400A (en) 2023-03-03 2023-03-03 Instant messaging data interaction method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116389400A true CN116389400A (en) 2023-07-04

Family

ID=86962432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310205762.4A Pending CN116389400A (en) 2023-03-03 2023-03-03 Instant messaging data interaction method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116389400A (en)

Similar Documents

Publication Publication Date Title
CN105847988B (en) Video sharing method and apparatus
US10880239B2 (en) Information transmission control method, apparatus, and system
US7949704B2 (en) Administration of a broker-based publish/subscribe messaging system
CN108476165B (en) Information interaction method, client and device
JP2007534076A (en) System and method for chat load management in a network chat environment
KR20170110612A (en) Highly Scalable, Fault Tolerant Remote Access Architecture and Access Method
US11558322B2 (en) Communication management system
JP6492198B2 (en) Information processing method, terminal, and computer storage medium
WO2014183427A1 (en) Method and apparatus for displaying webcast rooms
JP2009541902A (en) Remote update of user status on presence server
US20160043924A1 (en) System and method for monitoring user activity on a plurality of networked computing devices
US10038664B2 (en) Terminal status subscription method, apparatus, and system
CN112988013B (en) Information interaction method and device and storage medium
US7643473B2 (en) Instant messaging with audio connection formation
CN106411713B (en) State notification method and server
WO2015010644A1 (en) Method, apparatus, and system for achieving privilege separation
US9628490B2 (en) Trusted contact name validation
WO2019071857A1 (en) Method and device preventing gift giving on live streaming platform
CN116389400A (en) Instant messaging data interaction method, device, equipment and storage medium
CN113132745B (en) Live broadcast service system, method and server
CN113225247B (en) Group chat processing method and system, electronic device and computer readable storage medium
CN111478782B (en) Chat room control method, server, electronic equipment and storage medium
US10791069B2 (en) Method, apparatus, and storage medium for processing data with multiple clients having friend association relationship
CN112600683B (en) Cloud conference signaling control method and system and readable storage medium
CN109889439B (en) Cross-platform multi-scene instant messaging method

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