Information processing method and device, electronic equipment and storage medium

By using message identifiers in the service cluster of the instant messaging system for in-site diffusion and broadcasting, and determining message recipients and processing, the problems of low message delivery efficiency and high performance consumption in the existing technology are solved, and efficient message interaction and high performance are achieved. Availability.

CN118540295APending Publication Date: 2024-08-23JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310189111.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-23
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Existing instant messaging systems have problems such as cumbersome service deployment, low message interaction efficiency, and high performance consumption when delivering messages, especially when multiple middlewares search for message receivers layer by layer.

Method used

By using the message identifier in the service cluster to diffuse and broadcast messages within the site, determine the message recipient, and pull the message to be forwarded in the target cache, reducing middleware search processing, improving search speed and convenience, and only transmitting the message identifier to Reduce performance consumption.

Benefits of technology

The message interaction efficiency is improved, the performance consumption of the service cluster is reduced, high availability is enhanced, and the problems of low message transmission efficiency and high performance consumption in the existing technology are solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118540295A
    Figure CN118540295A
Patent Text Reader

Abstract

The embodiment of the invention discloses an information processing method and device, electronic equipment and a storage medium, and relates to the technical field of the Internet, and the method comprises the steps: carrying out the in-station message diffusion of a message identifier corresponding to a to-be-forwarded message when the to-be-forwarded message of a message sender is received based on a first server side, determining a message receiver corresponding to the message identifier; when the message receiver is not determined, the message identifier is broadcasted to each second server in a broadcasting mode, and each second server performs message diffusion in the station to determine the message receiver; based on the fact that a message receiver pulls a to-be-forwarded message from a target cache and processes the to-be-forwarded message, by adopting the technical scheme of the embodiment of the invention, the problems of tedious service deployment, low data interaction efficiency and high performance consumption caused by searching the message receiver layer by layer through various middleware and transmitting the message layer by layer in the prior art can be solved; the effects of improving the message interaction efficiency, improving the high availability of the service cluster and reducing the performance consumption are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of Internet technology, and in particular, to an information processing method, device, electronic device, and storage medium. Background Art

[0002] At present, instant messaging (IM) systems are usually deployed under the service cluster architecture. The service routing will assign a server to the started client. Each client may connect to a different server. When connecting, the server will generate a Session (i.e., a conversation) and assemble the client's information into a Session object, which is saved locally on the server. The Session is also saved in the cluster shared cache. If client 1 and client 2 connected to different servers communicate with each other, client 1 needs to send a message to server 1 with which it communicates. Server 1 cannot find the session information of client 2 in the local server, so it needs to obtain server 2 to which client 2 is connected from the cluster shared cache and forward the message to server 2. After receiving the message, server 2 obtains the session of client 2 from its own local server, and then server 2 sends the message to client 2.

[0003] However, in the process of implementing the present invention, it is found that there are at least the following problems in the prior art:

[0004] When sending a message to a message recipient, it is not only necessary to go through multiple middlewares to find the message recipient layer by layer, but also to pass the message layer by layer until it is finally forwarded to the message recipient. This results in cumbersome service deployment, low message interaction efficiency, and high performance consumption. Summary of the invention

[0005] The embodiments of the present invention provide an information processing method, device, electronic device and storage medium to improve message interaction efficiency, improve the high availability of service clusters, and achieve the technical effect of reducing performance consumption.

[0006] In a first aspect, an embodiment of the present invention provides an information processing method, which is applied in a service cluster, and the method includes:

[0007] When the first server receives a message to be forwarded sent by a message sender, determining a message identifier corresponding to the message to be forwarded, so that the first server performs in-station message diffusion based on the message identifier and determines a message recipient corresponding to the message identifier;

[0008] When the message receiver corresponding to the message identifier is not determined, broadcasting the message identifier to each second server by broadcasting, so that each second server performs message diffusion within the station to determine the message receiver corresponding to the message identifier;

[0009] Pull the message to be forwarded from the target cache based on the message recipient and process it.

[0010] Optionally, the method also includes: when a connection request corresponding to the triggered message sender and / or message receiver is detected, establishing communication between the message sender and / or message receiver and the corresponding server, so as to send the message to be forwarded to the corresponding message receiver based on the established communication.

[0011] Optionally, before the first server performs intra-site message diffusion based on the message identifier and determines the message recipient corresponding to the message identifier, it also includes: storing message association information corresponding to the message to be forwarded in a target cache, so that when the message recipient is determined, the message to be forwarded is pulled from the target cache based on the message recipient.

[0012] Optionally, the message association information includes at least one of a message identifier, a message sender identifier, a message receiver identifier, a message type, a sending timestamp corresponding to the message to be forwarded, a message content, and a message version number.

[0013] Optionally, the first server performs intra-site message diffusion based on the message identifier to determine a message recipient corresponding to the message identifier, including: diffusing the message identifier within the site based on the first server so that when the message recipient establishes communication with the first server, the message recipient can be found from the first server.

[0014] Optionally, when the message recipient corresponding to the message identifier is not determined, the message identifier is broadcast to each second server by broadcasting, including: when the message recipient corresponding to the message identifier is not found from the first server, the message identifier is broadcast to each second server based on RPC communication, so that each second server performs in-site message diffusion.

[0015] Optionally, pulling the message to be forwarded from the target cache and processing it based on the message recipient includes: based on the message recipient and according to the message version number corresponding to the currently received message, pulling the message content of the message to be forwarded from the target cache and processing it.

[0016] In a second aspect, an embodiment of the present invention further provides an information processing device, which is configured in a service cluster, and includes:

[0017] A message identifier determination module, configured to determine a message identifier corresponding to the message to be forwarded when the first server receives a message to be forwarded sent by a message sender, so that the first server performs in-station message diffusion based on the message identifier and determines a message recipient corresponding to the message identifier;

[0018] A message identifier broadcasting module, used for broadcasting the message identifier to each second server by broadcasting when the message receiver corresponding to the message identifier is not determined, so that each second server performs message diffusion in the station to determine the message receiver corresponding to the message identifier;

[0019] The message processing module is used to pull the message to be forwarded from the target cache and process it based on the message recipient.

[0020] In a third aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:

[0021] one or more processors;

[0022] A memory for storing one or more programs;

[0023] When the one or more programs are executed by the one or more processors, the one or more processors implement the information processing method provided by any embodiment of the present invention.

[0024] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an information processing method as provided in any embodiment of the present invention.

[0025] The technical solution of the embodiment of the present invention adopts a technical means for performing in-station message diffusion based on the message identifier of the message to be forwarded sent by the message sender by the first server to determine the message recipient corresponding to the message identifier, and when the message recipient is not determined, broadcasting the message identifier to each second server in the service cluster by broadcasting, each second server diffuses the message in the station, determines the message recipient corresponding to the message identifier, and enables the message recipient to pull the message to be forwarded from the target cache and process it. Therefore, it overcomes the technical problems of the prior art of searching for the message recipient layer by layer through multiple middleware and delivering the message to the message recipient layer by layer, which has cumbersome service deployment, low data interaction efficiency, and high performance consumption. It further realizes message diffusion and message identifier broadcasting through the server to search for the message recipient, eliminating the search processing of the middleware, and improving the quickness and convenience of the search. At the same time, in the process of diffusion or broadcasting, only the message identifier needs to be transmitted, which reduces the performance consumption between the terminals, improves the high availability of the service cluster, and achieves the technical effect of improving the efficiency of message interaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required to describe the embodiments. Obviously, the drawings introduced are only drawings of a part of the embodiments to be described in the present invention, rather than all the drawings. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0027] Figure 1 It is a flowchart of an information processing method provided by an embodiment of the present invention;

[0028] Figure 2 is a schematic diagram of an information processing method provided by an embodiment of the present invention;

[0029] Figure 3 is a schematic diagram of an information processing method provided by an embodiment of the present invention;

[0030] Figure 4 is a structural schematic diagram of an information processing device provided by an embodiment of the present invention;

[0031] Figure 5 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0032] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0033] Figure 1 The present invention provides a flowchart of an information processing method provided by an embodiment of the present invention. This embodiment is applicable to the case where information is exchanged between clients. The method can be applied to a service cluster. The method can be performed by an integrated information processing device. The device can be implemented by software and / or hardware.

[0034] It should be noted that the technical solution provided in the embodiment of the present invention can be applied to a service cluster, which is composed of a small number of server ends. For example, the number of server ends may be 5 or less.

[0035] like Figure 1 As shown, the method specifically comprises the following steps:

[0036] S110. When the first server receives a message to be forwarded sent by a message sender, determine a message identifier corresponding to the message to be forwarded, so that the first server performs in-site message diffusion based on the message identifier and determines a message recipient corresponding to the message identifier.

[0037] Among them, the first server can be a device with communication, computing, and storage functions, which can be a server, such as an application server, a Web server, etc., but not limited to this. In actual applications, multiple servers can jointly perform the same service. The cluster composed of each server is a service cluster. Each server under the service cluster is independent, and each server may be the first server corresponding to the message sender. The message sender refers to the client that sends the message. The message receiver refers to the client that receives the message sent by the message sender. The client can be a computer device such as a desktop computer, a notebook computer, or a mobile terminal such as a mobile phone, a tablet computer, a multimedia player, or an Internet of Things device such as a smart TV, industrial control equipment, but not limited to this. Applications can also be installed in the client, such as shopping applications, information applications, instant messaging applications, etc. In actual applications, if client A sends a message to client B, client A can be used as the message sender and client B can be used as the message receiver. The message to be forwarded can be understood as the content of the message body corresponding to the message sent by the message sender, such as a text message, a voice message, a picture message, etc. The message identifier can be used to characterize the uniqueness of the message.

[0038] In this embodiment, when the user triggers the message sending control in the IM application of the message sender, the message sender sends the message to the first server communicating with it, and it is considered that the first server has received the message to be forwarded; or, it can also be automatically triggered when the message edited in the IM application of the message sender reaches the preset time, and it is considered that the first server has received the message to be forwarded. The first server can parse the message to be forwarded to determine the message identifier carried in the message to be forwarded, or it can also assign a corresponding message identifier to it based on the message attribute of the message to be forwarded. Further, the first server diffuses the message identifier within the station, searches for a client matching the message identifier, and uses the found client as the message recipient. Exemplarily, when client A sends a communication message to client B, client A will send the communication message (i.e., the message to be forwarded) to server 1 (i.e., the first server) communicating with it, and server 1 will diffuse the message identifier of the message to be forwarded locally to find client B based on the message identifier.

[0039] It should be noted that, in order to ensure the accuracy of the determination of the message recipient, the communication between the message sender and the server and the communication between the message recipient and the server can be established before the message sender and the message recipient interact with each other. For example, in an instant messaging scenario, client A can establish a connection with a server in the service cluster when it starts. After the connection is established, the server will save the information of client A, so that when determining the message recipient corresponding to the message identifier, client B that is in conversation with client A can be found based on the message identifier or the message session corresponding to the message identifier.

[0040] In this embodiment, before determining the message sender and / or message receiver, it is also possible to establish communication between the message sender and / or message receiver and the corresponding server when a connection request corresponding to the triggering message sender and / or message receiver is detected, so as to send the message to be forwarded to the corresponding message receiver based on the established communication.

[0041] The connection request may be a program or code requesting to connect to the server, and is used to request to establish communication with the server.

[0042] Specifically, a connection request may be generated when a user clicks a communication control on a client page, or when the client is started. After the system receives the connection request, communication may be established between the client and a server in the service cluster. The client may be a message sender or a message receiver, so that in subsequent communication, the message to be forwarded is sent to the corresponding message receiver.

[0043] In order to improve the accuracy and speed of message pulling, the first server can perform in-site message diffusion based on the message identifier, and store the message association information corresponding to the message to be forwarded in the target cache before determining the message recipient corresponding to the message identifier, so that when the message recipient is determined, the message to be forwarded can be pulled from the target cache based on the message recipient.

[0044] The message association information includes at least one of a message identifier, a message sender identifier, a message receiver identifier, a message type, a sending timestamp corresponding to the message to be forwarded, a message content, and a message version number. The message identifier can be used to characterize the uniqueness of a message. There may be multiple messages in each session, and each message has unique identification information. The message identifier can be a unique ID of the message, such as a UUID (Universally Unique Identifier). The message sender identifier can be used to characterize the uniqueness of the message sender user, such as the UID (User Identification) of the message sender. The message receiver identifier can be used to characterize the uniqueness of the message receiver user, such as the UID of the message sender. The message type can be a session type, such as a multi-user interactive session, or a one-to-one session. The message content can refer to the specific content of the message. The message version number can be used to represent the order in which the messages are sent by the message sender. For example, if message A is the first message sent, its version number can be 1, message B is the next message of message A, its version number can be 2, and message C is the next message of message B, its version number can be 3. Accordingly, based on the order in which each message is sent, a corresponding version number can be assigned to each message in turn. The rule for generating the version number can be that the earlier it is sent, the smaller the version number, and the later it is sent, the larger the version number; or, it can be assigned a timestamp to each message, sort the messages according to the timestamp, and generate the corresponding version number. The target cache can be a hazelcast cache, which is used to implement the storage of distributed data in the service cluster.

[0045] In this embodiment, after receiving the message to be forwarded, the first server can determine the message association information corresponding to the message to be forwarded, and store the message association information in the target cache, so that after determining the message recipient, the message recipient can pull the message to be forwarded from the cache.

[0046] Exemplarily, the event bus can be recorded using the hazelcast cache. The data structure of the event bus can be: 1) msgId: represents the unique ID of the message (i.e., the message identifier), which can be represented by UUID; 2) fromUid: the UID of the message sender (i.e., the message sender identifier); 3) toUid: the UID of the message receiver (i.e., the message receiver identifier); 4) chatType: message type; 6) timestamp: the sending timestamp of the message; 7) body: the specific content of the message 8) version number (i.e., the message version number), which is used to distinguish the order of the messages; 9) timestamp, time. According to the data structure of the event bus, the message association message can be recorded in the hazelcast cache so that the message receiver can pull the message to be forwarded from the event bus.

[0047] It should be noted that when the client establishes communication with the server, the server will save the session information of the message recipient locally, so that if the message sender and the message recipient are connected to the same server later, the server can search for the message recipient corresponding to the message sender locally, thereby improving the search efficiency.

[0048] In this embodiment, the first server end diffuses the message within the site based on the message identifier, and the implementation method for determining the message recipient corresponding to the message identifier may be: based on the first server end, the message identifier is diffused within the site, so that when the message recipient establishes communication with the first server end, the message recipient can be found from the first server end.

[0049] In actual applications, after receiving the message identifier, the first server can perform a diffusion search for the message identifier within the site (i.e. locally), and by comparing the session corresponding to the message identifier with the session information stored locally on the server, find the client in the same session as the message sender as the message receiver.

[0050] S120: When the message recipient corresponding to the message identifier is not determined, broadcast the message identifier to each second server by broadcasting, so that each second server diffuses the message within the station to determine the message recipient corresponding to the message identifier.

[0051] Among them, the second server end is relative to the first server end. The server end corresponding to the message sender is regarded as the first server end, and the server end corresponding to the message receiver is regarded as the second server end. Correspondingly, the first server end can be corresponding to either the message sender or the message receiver.

[0052] It should be noted that if the message receiver has not established communication with the first server, that is, the message receiver and the message sender are connected to different servers, the first server does not store the session information corresponding to the message receiver.

[0053] In this embodiment, if the first server does not find information that the message session corresponding to the message identifier belongs to the same session in the local cache, it means that the message receiver and the message sender are connected to two different servers respectively. The broadcast component can be used to broadcast the message identifier to each second server. After knowing the message identifier, each second server can search in its local cache whether there is session information corresponding to the message identifier. If so, the client corresponding to the selected session information can be used as the message receiver.

[0054] In order to improve the security and speed of data transmission, optionally, when the message recipient corresponding to the message identifier is not determined, the message identifier is broadcast to each second server by broadcasting, including: when the message recipient corresponding to the message identifier is not found from the first server, the message identifier is broadcast to each second server based on RPC communication, so that each second server can diffuse the message within the site.

[0055] Among them, RPC (Remote Procedure Call Protocol) is a protocol that can request services from a remote computer program through the network without having to understand the underlying network technology. It can be used for communication between servers.

[0056] In this embodiment, if the message recipient corresponding to the message identifier is not found from the first server end, RPC can be used to broadcast the message identifier to each second server end within the service cluster. After receiving the message identifier, each second server end internally diffuses the message identifier within the site. In this way, no matter which server end in the service cluster the message recipient is connected to, the message identifier can be monitored. At the same time, the server end only needs to broadcast the message identifier to determine the message recipient, thereby reducing performance consumption between servers.

[0057] S130: Pull the message to be forwarded from the target cache based on the message recipient and process it.

[0058] Specifically, after receiving the notification from the first server, the message recipient can pull the message to be forwarded from the target cache and display the message to be forwarded in the conversation window.

[0059] In order to improve the accuracy of message pulling and ensure the integrity and continuity of the session, when pulling the messages to be forwarded from the target cache, the messages can be pulled based on the order in which the messages were sent, such as pulling the messages that were sent first, pulling the messages that are after the currently received messages, and displaying the pulled messages in order to prevent missing or repeated pulling. Optionally, the method of pulling and processing the messages to be forwarded from the target cache based on the message receiver can be: based on the message receiver according to the message version number corresponding to the currently received message, the message content of the message to be forwarded is pulled from the target cache and processed.

[0060] In this embodiment, after determining the message recipient corresponding to the message identifier, the message recipient can actively pull the message body itself, that is, the message content, and pull the message content corresponding to the version number after the message version number of the currently received message. For example, the message version number of the currently received message is 3, and the target cache contains message version numbers 3, 4, 5, and 6. The message content of the to-be-forwarded messages corresponding to message version numbers 4, 5, and 6 can be pulled out, and the message content corresponding to each message version number can be displayed in sequence.

[0061] The technical solution of this embodiment is to perform in-station message diffusion based on the message identifier of the message to be forwarded sent by the message sender, determine the message recipient corresponding to the message identifier, and when the message recipient is not determined, broadcast the message identifier to each second server in the service cluster by broadcasting. Each second server diffuses the message in the station, determines the message recipient corresponding to the message identifier, and enables the message recipient to pull the message to be forwarded from the target cache and process it. This overcomes the technical problems of the prior art of searching for message recipients layer by layer through multiple middlewares and delivering the messages to the message recipients layer by layer, which has cumbersome service deployment, low data interaction efficiency, and high performance consumption. This realizes message diffusion and message identifier broadcasting through the server to search for message recipients, eliminates the search processing of the middleware, and improves the speed and convenience of the search. At the same time, in the process of diffusion or broadcasting, only the message identifier needs to be transmitted, which reduces the performance consumption between the terminals, improves the high availability of the service cluster, and achieves the technical effect of improving the efficiency of message interaction.

[0062] Figure 2 is a schematic diagram of an information processing method provided by an embodiment of the present invention, such as Figure 2As shown in the figure, in cluster mode, client 1 and client 2 are connected to the same IM server 1. After the connection is established, if client 1 sends a communication message to client 2, client 1 will first send the message to be forwarded to server 1, and server 1 will record the message association message corresponding to the message to be forwarded in the hazelcast cache. Server 1 will diffuse the message identifier of the message to be forwarded for the first time within the node, and server 1 can find client 2 in the station. After receiving the notification from server 1, client 2 will actively pull the message content of the message to be forwarded from the hazelcast cache.

[0063] Figure 3 is a schematic diagram of an information processing method provided by Embodiment 2 of the present invention, such as Figure 3 As shown in the figure, in cluster mode, if client 1 is connected to IM server 1, client 2 is connected to IM server 2. When client 1 sends a message to client 2, client 1 will first send the message to be forwarded to server 1 (i.e., the first server), and server 1 will record the message association message corresponding to the message to be forwarded in the hazelcast cache. Server 1 will diffuse the message identifier of the message to be forwarded for the first time inside the node. Because client 2 is not connected to server 1, server 1 cannot find client 2 in the station. Further, it will use the RPC communication method within the cluster to pass the message identifier to other servers within the cluster (i.e., the second server). Other servers within the cluster will diffuse the received message identifier once, so that no matter which server within the IM service cluster client 2 is connected to, it can monitor the message identifier from the server. After receiving the notification from the server, client 2 will actively pull the message content of the message to be forwarded from the hazelcast cache.

[0064] It should be noted that in order to reduce the performance consumption during internal communication of the server, the distributed, efficient and high-performance hazelcast cache can be used to record the event bus. The data structure of the event bus can be: 1) msgId: the unique ID of the message (i.e., the message identifier), which can be represented by UUID; 2) fromUid: the UID of the message sender (i.e., the message sender identifier); 3) toUid: the UID of the message receiver (i.e., the message receiver identifier); 4) chatType: message type; 6) timestamp: the sending timestamp of the message; 7) body: the specific content of the message 8) version number (i.e., the message version number), which is used to distinguish the order of the messages; 9) timestamp, time. According to the data structure of the event bus, the message association message corresponding to the message to be forwarded can be recorded in the hazelcast cache, so that the client can actively pull the message content from the event bus after receiving the notification from the IM server. In this technical solution, the IM server only broadcasts the message identifier of the message, and does not broadcast the specific content in the message body. Compared with the prior art, it reduces the performance consumption of the server interaction and the use of various middleware when forwarding messages.

[0065] The technical solution of this embodiment is to perform in-station message diffusion based on the message identifier of the message to be forwarded sent by the message sender, determine the message recipient corresponding to the message identifier, and when the message recipient is not determined, broadcast the message identifier to each second server in the service cluster by broadcasting. Each second server diffuses the message in the station, determines the message recipient corresponding to the message identifier, and enables the message recipient to pull the message to be forwarded from the target cache and process it. This overcomes the technical problems of the prior art of searching for message recipients layer by layer through multiple middlewares and delivering the messages to the message recipients layer by layer, which has cumbersome service deployment, low data interaction efficiency, and high performance consumption. This realizes message diffusion and message identifier broadcasting through the server to search for message recipients, eliminates the search processing of the middleware, and improves the speed and convenience of the search. At the same time, in the process of diffusion or broadcasting, only the message identifier needs to be transmitted, which reduces the performance consumption between the terminals, improves the high availability of the service cluster, and achieves the technical effect of improving the efficiency of message interaction.

[0066] Figure 4 Schematic diagram of the structure of an information processing device provided by an embodiment of the present invention. Figure 4 As shown, the device includes: a message identification determination module 410, a message identification broadcasting module 420 and a message processing module 430.

[0067] Among them, the message identifier determination module 410 is used to determine the message identifier corresponding to the message to be forwarded when the first server receives the message to be forwarded sent by the message sender, so that the first server can diffuse the message within the station based on the message identifier and determine the message recipient corresponding to the message identifier; the message identifier broadcasting module 420 is used to broadcast the message identifier to each second server by broadcasting when the message recipient corresponding to the message identifier is not determined, so that each second server can diffuse the message within the station to determine the message recipient corresponding to the message identifier; the message processing module 430 is used to pull the message to be forwarded from the target cache and process it based on the message recipient.

[0068] The technical solution of this embodiment is to perform in-station message diffusion based on the message identifier of the message to be forwarded sent by the message sender, determine the message recipient corresponding to the message identifier, and when the message recipient is not determined, broadcast the message identifier to each second server in the service cluster by broadcasting. Each second server diffuses the message in the station, determines the message recipient corresponding to the message identifier, and enables the message recipient to pull the message to be forwarded from the target cache and process it. This overcomes the technical problems of the prior art of searching for message recipients layer by layer through multiple middlewares and delivering the messages to the message recipients layer by layer, which has cumbersome service deployment, low data interaction efficiency, and high performance consumption. This realizes message diffusion and message identifier broadcasting through the server to search for message recipients, eliminates the search processing of the middleware, and improves the speed and convenience of the search. At the same time, in the process of diffusion or broadcasting, only the message identifier needs to be transmitted, which reduces the performance consumption between the terminals, improves the high availability of the service cluster, and achieves the technical effect of improving the efficiency of message interaction.

[0069] On the basis of the above-mentioned device, optionally, the device also includes: a communication establishment module, wherein the communication establishment module is used to establish communication between the message sender and / or the message receiver and the corresponding server when a connection request corresponding to the trigger message sender and / or the message receiver is detected, so as to send the message to be forwarded to the corresponding message receiver based on the established communication.

[0070] Based on the above-mentioned device, optionally, the device also includes: an information storage module, wherein the information storage module is used to store message association information corresponding to the message to be forwarded in the target cache, so that when determining the message recipient, the message to be forwarded is pulled from the target cache based on the message recipient.

[0071] Based on the above device, optionally, the message association information includes at least one of a message identifier, a message sender identifier, a message receiver identifier, a message type, a sending timestamp corresponding to the message to be forwarded, a message content, and a message version number.

[0072] Based on the above-mentioned device, optionally, the message identifier determination module 410 is specifically used to diffuse the message identifier within the station based on the first server, so as to find the message recipient from the first server when the message recipient establishes communication with the first server.

[0073] Based on the above-mentioned device, optionally, the message identifier broadcast module 420 is specifically used to broadcast the message identifier to each second server based on RPC communication when the message recipient corresponding to the message identifier is not found from the first server, so that each second server can spread the message within the site.

[0074] On the basis of the above-mentioned device, optionally, the message processing module 430 is specifically used to pull the message content of the message to be forwarded from the target cache and process it based on the message version number corresponding to the currently received message by the message recipient.

[0075] The information processing device provided in the embodiment of the present invention can execute the information processing method provided in the first embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the information processing method.

[0076] Figure 5 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 5 A block diagram of an exemplary server 12 suitable for use in implementing embodiments of the present invention is shown. Figure 5 The server 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0077] like Figure 5 As shown, the server 12 is in the form of a general purpose computing device. The components of the server 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).

[0078] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0079] The server 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the server 12, including volatile and non-volatile media, removable and non-removable media.

[0080] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The server 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 not shown, usually called a "hard drive"). Although Figure 5 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0081] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0082] The server 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the server 12, and / or may communicate with any device that enables the server 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. In addition, the server 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the server 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the server 12, including, but not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0083] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing the steps of an information processing method provided in the first embodiment of the present invention, the method comprising:

[0084] When the first server receives a message to be forwarded sent by a message sender, determining a message identifier corresponding to the message to be forwarded, so that the first server performs in-station message diffusion based on the message identifier and determines a message recipient corresponding to the message identifier;

[0085] When the message receiver corresponding to the message identifier is not determined, broadcasting the message identifier to each second server by broadcasting, so that each second server performs message diffusion within the station to determine the message receiver corresponding to the message identifier;

[0086] Pull the message to be forwarded from the target cache based on the message recipient and process it.

[0087] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the information processing method provided by any embodiment of the present invention.

[0088] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps of an information processing method provided in the above embodiment of the present invention are implemented. The method includes:

[0089] When the first server receives a message to be forwarded sent by a message sender, determining a message identifier corresponding to the message to be forwarded, so that the first server performs in-station message diffusion based on the message identifier and determines a message recipient corresponding to the message identifier;

[0090] When the message receiver corresponding to the message identifier is not determined, broadcasting the message identifier to each second server by broadcasting, so that each second server performs message diffusion within the station to determine the message receiver corresponding to the message identifier;

[0091] Pull the message to be forwarded from the target cache based on the message recipient and process it.

[0092] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0093] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0094] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0095] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0096] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0097] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. An information processing method, characterized in that: Applied in a service cluster, the method includes: When the first server receives a message to be forwarded sent by a message sender, determining a message identifier corresponding to the message to be forwarded, so that the first server performs in-station message diffusion based on the message identifier and determines a message recipient corresponding to the message identifier; When the message receiver corresponding to the message identifier is not determined, broadcasting the message identifier to each second server by broadcasting, so that each second server performs message diffusion within the station to determine the message receiver corresponding to the message identifier; Pull the message to be forwarded from the target cache based on the message recipient and process it.

2. The method according to claim 1, characterized in that Also includes: When a connection request corresponding to a triggering message sender and / or message receiver is detected, communication is established between the message sender and / or message receiver and the corresponding server, so that the message to be forwarded is sent to the corresponding message receiver based on the established communication.

3. The method according to claim 1, characterized in that Before the first server performs intra-station message diffusion based on the message identifier and determines a message recipient corresponding to the message identifier, the method further includes: The message association information corresponding to the message to be forwarded is stored in the target cache, so that when the message recipient is determined, the message to be forwarded is pulled from the target cache based on the message recipient.

4. The method according to claim 3, characterized in that The message association information includes at least one of a message identifier, a message sender identifier, a message receiver identifier, a message type, a sending timestamp corresponding to the message to be forwarded, a message content, and a message version number.

5. The method according to claim 1, characterized in that The first server performs intra-station message diffusion based on the message identifier and determines a message receiver corresponding to the message identifier, including: The message identifier is diffused within the station based on the first server, so that when the message receiver establishes communication with the first server, the message receiver can be found from the first server.

6. The method according to claim 1, characterized in that When the message recipient corresponding to the message identifier is not determined, broadcasting the message identifier to each second server by broadcasting, includes: When the message recipient corresponding to the message identifier is not found from the first server, the message identifier is broadcast to each second server based on the RPC communication method, so that each second server performs in-site message diffusion.

7. The method according to claim 1, characterized in that Pulling the message to be forwarded from the target cache based on the message recipient and processing it includes: Based on the message version number corresponding to the currently received message, the message recipient pulls the message content of the message to be forwarded from the target cache and processes it.

8. An information processing device, characterized in that: Configured in a service cluster, the device includes: A message identifier determination module, configured to determine a message identifier corresponding to the message to be forwarded when the first server receives a message to be forwarded sent by a message sender, so that the first server performs in-station message diffusion based on the message identifier and determines a message recipient corresponding to the message identifier; A message identifier broadcasting module, used for broadcasting the message identifier to each second server by broadcasting when the message receiver corresponding to the message identifier is not determined, so that each second server performs message diffusion in the station to determine the message receiver corresponding to the message identifier; The message processing module is used to pull the message to be forwarded from the target cache and process it based on the message recipient.

9. An electronic device, characterized in that: The electronic device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the information processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the information processing method according to any one of claims 1 to 7 is implemented.