Message distribution system and method, computing device, storage medium and program product
By disconnecting the communication connection with the message processing end from the non-instant messaging page and using the server-side callback interface to detect message events, generate and transmit notifications, the problem of high communication costs in instant messaging services is solved, and low-cost instant messaging is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING CHENGSHI WANGLIN INFORMATION TECH CO LTD
- Filing Date
- 2026-03-11
- Publication Date
- 2026-05-01
AI Technical Summary
The message distribution method of existing instant messaging services results in high communication costs, mainly because a persistent two-way communication connection with the third-party instant messaging service needs to be maintained on all pages.
The second communication connection with the message processing end is disconnected when the message is not in the instant messaging page. The second communication connection is established only when the message is in the instant messaging page. The message event is detected through the callback interface of the server, the message notification is generated and transmitted, and the real-time communication is maintained by using the first communication connection.
It significantly reduces the number of concurrent communication connections, lowers communication costs, and ensures the real-time performance of instant messaging functionality.
Smart Images

Figure CN121967369A_ABST
Abstract
Description
Message distribution systems, methods, computing devices, storage media, and program products Technical Field
[0001] This application relates to the field of computer technology, and in particular to a message distribution system, method, computing device, storage medium, and program product. Background Technology
[0002] With the rapid development of mobile internet, instant messaging (IM) has become a core component of current applications. To reduce development complexity and improve system reliability, more and more applications are choosing to integrate third-party instant messaging services (such as GetStream, Sendbird, etc.) to implement instant messaging functionality.
[0003] To maintain real-time communication, during actual message distribution, the client maintains persistent bidirectional communication connections (such as WebSocket long connections) with the corresponding message processing end of the third-party instant messaging service for all its pages. However, since third-party instant messaging services typically charge based on the number of concurrent connections, this approach results in high communication costs. Summary of the Invention
[0004] This application provides a message distribution system, method, computing device, storage medium, and program product to solve the problem of high communication costs in existing message distribution methods.
[0005] In a first aspect, this application provides a message distribution system, including a client, a server, and a message processing terminal. The client is configured to establish a first communication connection with the server and receive message notifications sent by the server based on the first communication connection; when displaying an instant messaging page, establish a second communication connection with the message processing terminal and receive communication messages sent by the message processing terminal based on the second communication connection; when displaying a non-instant messaging page, disconnect the second communication connection; and display the received message notifications or communication messages. The server is configured to request a registered callback interface from the message processing terminal and, based on the callback interface, detect whether a message event exists from the message processing terminal; if the message event exists, generate a message notification and send the message notification to the client based on the first communication connection. The message processing terminal is configured to receive communication messages to be transmitted to the client and generate message events; when establishing a second communication connection with the client, send the communication messages to the client based on the second communication connection.
[0006] Secondly, this application provides a message distribution method applied to a client of a message distribution system, the message distribution system further including a server and a message processing terminal; the method includes: establishing a first communication connection with the server and receiving a message notification sent by the server based on the first communication connection; the message notification is generated by the server when it detects a message event from the message processing terminal based on a callback interface; the callback interface is registered by the server to the message processing terminal; when an instant messaging page is displayed, establishing a second communication connection with the message processing terminal and receiving a communication message sent by the message processing terminal based on the second communication connection; the second communication connection is disconnected when a non-instant messaging page is displayed; and displaying the received message notification or communication message.
[0007] Thirdly, this application provides another message distribution method applied to the server side of a message distribution system, which further includes a client and a message processing terminal. When the client displays an instant messaging page, it establishes a second communication connection with the message processing terminal and receives communication messages sent by the message processing terminal based on the second communication connection. When a non-instant messaging page is displayed, the client disconnects the second communication connection. The method includes: requesting the message processing terminal to register a callback interface; establishing a first communication connection with the client; detecting whether a message event exists from the message processing terminal based on the callback interface; if so, generating a message notification and sending the message notification to the client based on the first communication connection.
[0008] Fourthly, this application provides a computing device, including a processing component and a storage component; the storage component stores a computing program; the computer program is invoked and executed by the processing component to implement the message distribution method as described in the second or third aspect above.
[0009] Fifthly, this application provides a computer storage medium storing a computer program thereon, which, when executed by a processing component, implements the message distribution method as described in the second or third aspect above.
[0010] Sixthly, this application provides a computer program product, including a computer program or instructions, which, when executed by a processing component, implement the message distribution method as described in the second or third aspect above.
[0011] This application provides a message distribution system comprising a client, a server, and a message processing terminal. The client establishes a first communication connection with the server and receives message notifications from the server based on this first communication connection. When an instant messaging page is displayed, the client establishes a second communication connection with the message processing terminal and receives communication messages from the message processing terminal based on this second communication connection. When a non-instant messaging page is displayed, the client disconnects the second communication connection and displays the received message notifications or communication messages. The server requests a callback interface registration from the message processing terminal and detects the existence of a message event from the message processing terminal based on this callback interface. If a message event exists, the server generates a message notification and sends it to the client based on the first communication connection. The message processing terminal receives communication messages to be transmitted to the client and generates message events. When a second communication connection is established with the client, the server sends communication messages to the client based on the second communication connection.
[0012] This embodiment implements hierarchical management of client communication connections in the message distribution system. Only in scenarios displaying instant messaging pages is a communication connection (i.e., a second communication connection) established with the corresponding message processing end of the third-party instant messaging service. In other page display scenarios, the second communication connection is disconnected. The server detects message events based on its registered callback interface with the message processing end, generates message notifications, and sends these notifications to the client through its self-established communication connection with the client (i.e., a first communication connection). This ensures that even in non-instant messaging page scenarios, where the communication connection with the message processing end is disconnected, the client can still receive message notifications instantly via server forwarding, guaranteeing the real-time performance of the instant messaging function. Since each client of the application establishes a second communication connection with the message processing end for only a small number of instant messaging pages, the number of concurrent connections between the application and the third-party instant messaging service is significantly reduced. Furthermore, the cost of the first communication connection is much lower than that of the second communication connection. Therefore, the message distribution method implemented based on the communication connection method of this embodiment greatly reduces communication costs.
[0013] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description
[0014] The accompanying drawings, which are included to provide a further understanding of this application and constitute a part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 shows a schematic structural diagram of an embodiment of the message distribution system provided by this application; Figure 2 shows a schematic diagram of the connection and message distribution principle of the message distribution system provided by this application; Figure 3 shows a schematic diagram of the message distribution process of the message distribution system provided by this application; Figure 4 shows a flowchart of an embodiment of the message distribution method provided by this application; Figure 5 shows a flowchart of another embodiment of the message distribution method provided by this application; Figure 6 shows a schematic structural diagram of an embodiment of the message distribution device provided by this application; Figure 7 shows a schematic structural diagram of another embodiment of the message distribution device provided by this application; Figure 8 shows a schematic structural diagram of a computing device provided by this application. Detailed Implementation
[0015] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0016] It should be noted that, in the cases involving user information in the embodiments of this application, the data involved in the embodiments of this application (including but not limited to data used for analysis, data stored, data displayed, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0017] Additionally, it should be noted that when user interaction operations or triggering operations are involved in the embodiments of this application, these operations include, but are not limited to, various interaction methods such as touch operations, gesture operations, voice operations, head movement operations, and eye movement operations. Touch operations include, but are not limited to, click operations, double-click operations, long-press operations, swipe operations, pinch operations, or mouse hover operations. Swipe operations include, but are not limited to, straight-line swipes and curved-line swipes.
[0018] It should be noted that the technical solutions in this application are applicable to virtual network environments, and the users described generally refer to "virtual users." Real users can register user accounts on the server through registration to obtain user identities in the network environment. The same user account can log in to the server through different types of clients, enabling the server to identify the same user.
[0019] Interactions between the server or message processing client and the user can be based on user accounts. The data received or sent by the server or message processing client to the user is also based on the user account; in reality, the client corresponding to the user account receives or sends data to the server or message processing client. Furthermore, users can also communicate with each other through user accounts. Here, "user" can refer to an individual or an organization, such as a company; this application does not impose specific restrictions.
[0020] As described in the background technology introduction above, an increasing number of applications are choosing to integrate third-party instant messaging services to implement their real-time message distribution process. In other words, the message processing end of the instant messaging service acts as the core processing node of the message distribution service, receiving messages from the sending client and transmitting them to the corresponding receiving client. To maintain real-time communication between different clients of the application, each client maintains a persistent bidirectional communication connection (such as a WebSocket long connection) with the corresponding message processing end of the third-party instant messaging service for all pages within the client. However, since third-party instant messaging services typically charge based on the number of concurrent connections, this approach results in high communication costs.
[0021] To address the high cost of existing communication technologies, this application provides a solution. The basic idea is as follows: For a message distribution system comprising a client, a server, and a message processing terminal, the client establishes a first communication connection with the server and receives message notifications from the server based on this first communication connection; when displaying an instant messaging page, it establishes a second communication connection with the message processing terminal and receives communication messages from the message processing terminal based on this second communication connection; when displaying a non-instant messaging page, it disconnects the second communication connection; and displays the received message notifications or communication messages. The server requests a callback interface registration from the message processing terminal and, based on this callback interface, detects the existence of message events from the message processing terminal; if a message event exists, it generates a message notification and sends the message notification to the client based on the first communication connection. The message processing terminal receives communication messages to be transmitted to the client and generates message events; when establishing a second communication connection with the client, it sends communication messages to the client based on the second communication connection.
[0022] This embodiment implements hierarchical management of client communication connections in the message distribution system. Only in scenarios displaying instant messaging pages is a communication connection (i.e., a second communication connection) established with the corresponding message processing end of the third-party instant messaging service. In other page display scenarios, the second communication connection is disconnected. The server detects message events based on its registered callback interface with the message processing end, generates message notifications, and sends these notifications to the client through its self-established communication connection with the client (i.e., a first communication connection). This ensures that even in non-instant messaging page scenarios, where the communication connection with the message processing end is disconnected, the client can still receive message notifications instantly via server forwarding, guaranteeing the real-time performance of the instant messaging function. Since each client of the application only establishes a second communication connection with the message processing end for a limited number of instant messaging pages, the number of concurrent connections between the application and the third-party instant messaging service is significantly reduced. Furthermore, the cost of the first communication connection is much lower than that of the second communication connection. Therefore, the message distribution method implemented based on this embodiment's communication connection method greatly reduces communication costs.
[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0024] The implementation details of the technical solutions in the embodiments of this application are described in detail below.
[0025] Figure 1 shows a schematic diagram of an embodiment of the message distribution system provided in this application. This message distribution system is responsible for message distribution operations during the implementation of instant messaging functionality in an application. The system includes a client 101, a server 102, and a message processing terminal 103. The client 101 and server 102 can be the client and server of an application with instant messaging functionality.
[0026] Client 101 can be an APP (Application), a web application such as an H5 (HyperTextMarkup Language 5) application, a lightweight application (also known as a mini-program), or a cloud application, etc. Client 101 can be deployed in an electronic device and needs to rely on the device to run or some APPs on the device to run. Electronic devices can refer to devices used by users that have the computing, internet access, and communication functions required by the user, such as mobile phones, tablets, personal computers, wearable devices, etc. Electronic devices typically include at least one processing component and at least one storage component. Electronic devices may also include basic configurations such as network card chips, I / O (input / output) buses, audio and video components, etc., which are not limited in this application. Optionally, depending on the implementation of the electronic device, it may also include some peripheral devices, such as keyboards, mice, input pens, printers, etc., which are not limited in this application. For ease of understanding, the client is mainly represented by a device image in Figure 1. It should be understood that the client 101 in Figure 1 is merely illustrative. Depending on the implementation needs, there can be any number of clients.
[0027] The server 102 may include a server that provides application-related services. For example, if the application is an e-commerce application, the server 102 can provide commodity transaction services to the user corresponding to the client 101, and send instant messaging service message notifications to the client 101 when the client 101 is on a non-instant messaging page.
[0028] The message processing end 103 can be a processor or server integrated into a third-party instant messaging service in the application, which is responsible for message distribution service (i.e., receiving messages from the sending client and transmitting them to the corresponding receiving client).
[0029] It should be noted that server 102 and message processing terminal 103 can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. The server can also be a server in a distributed system, or a server integrated with blockchain. The server can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0030] In a real-world message distribution scenario, client 101 is used to establish a first communication connection with server 102 and receive message notifications sent by server 102 based on the first communication connection; when displaying an instant messaging page, client 101 establishes a second communication connection with message processing terminal 103 and receives communication messages sent by message processing terminal based on the second communication connection; when displaying a non-instant messaging page, client 101 disconnects the second communication connection; and displays the received message notifications or communication messages.
[0031] In this embodiment, the instant messaging page can be a page related to the instant messaging service that can be displayed by the client 101, such as an instant messaging conversation page (i.e., a chat page), a conversation list page, etc. The non-instant messaging page in this embodiment can be other pages that the client can display besides the instant messaging page, such as a product search page, product details page, or order page displayed by the client of an e-commerce application.
[0032] The first communication connection established between client 101 and server 102 can be a persistent bidirectional communication connection (such as a WebSocket long connection) or a push channel connection. It should be noted that the first communication connection between client 101 and server 102 needs to be maintained when client 101 displays a non-instant messaging page, and can be maintained or disconnected when client 101 displays an instant messaging page. That is, client 101 can establish the first communication connection with server 102 only when displaying a non-instant messaging page, or it can maintain the first communication connection with server 102 continuously after startup. Therefore, one implementation of this embodiment is that client 101 establishes the first communication connection with server 102 after startup, which avoids repeatedly establishing the first communication connection. In another implementation, client 101 can disconnect the second communication connection and establish the first communication connection with server 102 when jumping from an instant messaging page to a non-instant messaging page, which can further reduce communication costs. Optionally, the client 101 may establish a first communication connection with the server 102 by sending a first communication connection request to the server 102 to request the server 102 to establish a first communication connection with the client 101.
[0033] After establishing a first communication connection between client 101 and server 102, client 101 can receive message notifications sent by server 102 based on this first communication connection. These message notifications are used to provide relevant notification content for instant messaging services when the client is on a non-instant messaging page, such as the number of new messages received or unread messages. It should be noted that the specific method for the server to generate message notifications will be described in detail in subsequent embodiments and will not be repeated here.
[0034] The second communication connection established between client 101 and message processing terminal 103 can be a persistent bidirectional communication connection (such as a WebSocket long connection). To reduce the number of concurrent connections between the application's client and the third-party instant messaging service, this embodiment can disconnect the second communication connection with message processing terminal 103 when client 101 displays a non-instant messaging page. It should be noted that the connection cost of the first communication connection is much lower than that of the second communication connection. Optionally, in this example, when client 101 jumps from a non-instant messaging page to an instant messaging page, a communication connection tool from the third-party instant messaging service can be used to establish a second communication connection with message processing terminal 103. For example, a second communication connection request can be sent to message processing terminal 103 through the communication connection tool to request message processing terminal 103 to establish a second communication connection with client 101.
[0035] After establishing a second communication connection with the message processing terminal 103, the client 101 can receive communication messages sent by the message processing terminal 103 based on the second communication connection. The communication messages can be instant messaging messages sent to the client by other clients received by the message processing terminal 103.
[0036] In practical applications, client 101 can also send communication messages to other clients to message processing terminal 103 based on the second communication connection. Optionally, when the instant messaging page is a session page, client 101 is also used to respond to the user's input operation on the session page, determine the message to be sent, and send the message to be sent to message processing terminal 103 based on the second communication connection. Specifically, when a user wants to communicate with a certain session party on client 101, they can enter the session page with that session party and perform an input operation on that page, that is, input the message they want to send. Client 101 can respond to the input operation to obtain the message input by the user as the message to be sent. In addition, client 101 also needs to determine the recipient information of the message to be sent (i.e., the party the user wants to have a session with). Since the currently displayed session page is an instant messaging page, client 101 establishes a second communication connection with message processing terminal 103 at this time, so client 101 can send the message to be sent and the recipient information to message processing terminal 103 based on the second communication connection. The message processing terminal 103 needs to transmit the message to be sent to the client of the message recipient so that the user can send and receive messages in real time on the client's instant messaging page with low communication cost.
[0037] In this embodiment, if the client 101 only establishes a first communication connection with the server 102 when displaying a non-instant messaging page (i.e., disconnects the first communication connection when displaying an instant messaging page), the client 101 will not receive both message notifications and communication messages simultaneously. If the client 101 receives a communication notification, it can display the notification on the current display interface via a system notification bar, prompt, card, etc. If the client 101 receives a communication message, it can determine the corresponding conversation partner. If the current display page is a conversation page with that partner, the communication message is directly displayed on the current display page. If the current display page is not a conversation page with that partner (e.g., a conversation page with other partners or a conversation list page), the client can jump to the conversation page with that partner to display the communication message. Alternatively, the communication message can be displayed on the current display page via a pop-up prompt, or loaded and displayed in the corresponding conversation metadata in the conversation list.
[0038] If client 101 maintains a second communication connection with server 102 after startup, then when client 101 displays the instant messaging page, message processing terminal 103 may send a communication message to client 101 via the second communication connection. Simultaneously, the server may also detect the message event corresponding to this communication message and generate a corresponding message notification, which will be sent to client 101 via the first communication connection. That is, client 101 simultaneously receives both the communication message and its corresponding message notification. In this case, client 101 can either display both the communication message and its corresponding message notification on the instant messaging page, or it can only display the received communication message on the instant messaging page (the specific display method has been described in the above embodiments). No limitation is imposed on this.
[0039] Server 102 is used to request the registration of a callback interface from message processing terminal 103, and based on the callback interface, to detect whether a message event exists from message processing terminal 103; if a message event exists, it generates a message notification and sends the message notification to client 101 based on the first communication connection.
[0040] In this embodiment, the server 102 needs to request the message processing terminal 103 to register a callback (Webhook) interface in advance. After registering the callback interface, message events related to the client 101 can be detected from the message processing terminal 103. For example, the message event may include, but is not limited to, one or more event types such as: new message generation event, message sending success event, etc. The specific event types that can be detected depend on the event types registered when registering the callback interface.
[0041] The server 102 can detect from the message processing terminal 103 whether there is a message event related to the client 101 with which it has established the first communication connection. If a message event is detected, one implementation method is to directly generate a message notification corresponding to the message event, such as "You have received a new message".
[0042] Another implementation method is to determine whether the message event meets the notification requirements. If the message event meets the notification requirements, the key information of the message event is extracted, and a message notification is generated based on the key information.
[0043] Since client 101 is decoupled from the message processing terminal 103 of the third-party instant messaging service when displaying a non-instant messaging page, server 102 can pre-set notification requirements according to its own actual needs. These requirements can be the type of event requiring notification (such as a new message generation event); whether the user level of the client corresponding to the message event meets the notification level; or whether the client corresponding to the message event is on a non-instant messaging page. If the message event meets the notification requirements, the event metadata is parsed, and key information (such as message sender information, number of unread messages, sending time, etc.) is extracted according to the message notification display format and content requirements, and encapsulated into a message notification. Then, based on the first communication connection with client 101, the message notification is sent to client 101. In this embodiment, server 102, with client 101 decoupled from message processing terminal 103, can filter message events according to its own service strategy, freely control the push frequency and message format, and improve the flexibility and personalized sending needs of message notifications.
[0044] The message processing terminal 103 is used to receive communication messages to be transmitted to the client 101 and generate message events; when a second communication connection is established with the client 101, it sends communication messages to the client 101 based on the second communication connection.
[0045] It should be noted that after the message processing terminal 103 receives a communication message to be transmitted to the client 101 (i.e., a communication message sent by another client that is communicating instantly with the client), it generates a message event (such as a new message generation event) for that communication message, which the server can detect through a callback interface. If the client 101 is on a non-instant messaging page at this time, and the message processing terminal 103 has established a second communication connection with the client 101, then the message processing terminal 103 can also send the communication message to the client 101 based on the second communication connection. If the client 101 is on a non-instant messaging page at this time, that is, the second communication connection is broken, then the message processing terminal 103 cannot send the communication message to the client 101.
[0046] In some embodiments, the client 101 of this embodiment is further configured to, in response to a trigger operation for a message notification, jump from the current page (i.e., a non-instant messaging page) to the instant messaging page corresponding to the message notification, disconnect the first communication connection, establish a second communication connection with the message processing terminal 103, and obtain the communication message corresponding to the message notification from the message processing terminal 103 based on the second communication connection, and display the communication message on the instant messaging page. Specifically, after the client 101 displays the message notification on the non-instant messaging page, if the user has a need to view the specific message, they will trigger the message notification (e.g., click on the message notification). The client 101 will, in response to the trigger operation for the message notification, determine the instant messaging page corresponding to the message notification. For example, if the message notification is a new message notification, its corresponding instant messaging page is the session page. When the client 101 jumps from the current page to the determined instant messaging page, it can also disconnect the first communication connection with the server 102 and establish a second communication connection with the message processing terminal 103 in the manner described in the above embodiment. One implementation method for obtaining message notifications based on the second communication connection is that client 101 sends a message retrieval request to message processing terminal 103 based on relevant information of the communication message (such as sending time, session information, etc.), so that message processing terminal 103 can send the corresponding communication message to client 101 based on the second communication connection. Another implementation method is that after establishing the second communication connection with client 101, message processing terminal 103 retransmits all communication messages to be sent to client 101 during the period when the second communication connection was interrupted. At this time, client 101 can find the corresponding communication message from the received communication messages based on the relevant information of the message notification. Then, the communication message is displayed on the instant messaging page as described in the above embodiment. By triggering a jump to the instant messaging page through message notification, the second communication connection between the client and message processing terminal is restored in a timely manner when a message event occurs, so as to receive and display the communication message and ensure real-time communication.
[0047] This embodiment implements hierarchical management of client communication connections in the message distribution system. Only in scenarios displaying instant messaging pages is a communication connection (i.e., a second communication connection) established with the corresponding message processing end of the third-party instant messaging service. In other page display scenarios, the second communication connection is disconnected. The server detects message events based on its registered callback interface with the message processing end, generates message notifications, and sends these notifications to the client through its self-established communication connection with the client (i.e., a first communication connection). This ensures that even in non-instant messaging page scenarios, where the communication connection with the message processing end is disconnected, the client can still receive message notifications instantly via server forwarding, guaranteeing the real-time performance of the instant messaging function. Since each client of the application only establishes a second communication connection with the message processing end for a limited number of instant messaging pages, the number of concurrent connections between the application and the third-party instant messaging service is significantly reduced. Furthermore, the cost of the first communication connection is much lower than that of the second communication connection. Therefore, the message distribution method implemented based on this embodiment's communication connection method greatly reduces communication costs.
[0048] In a practical application scenario, this embodiment of the application takes a message distribution system of an e-commerce application with instant messaging functionality as an example. The message processing end can be a server in a third-party instant messaging service (such as GetStream IM cloud service) used for message distribution. When the client of the e-commerce application displays the instant messaging page (i.e., the session page and the session list page), it can establish a WebSocket long connection (i.e., a second communication connection) for the IM service based on the message processing end of the GetStream IM cloud service; the message processing end can then transmit communication messages with the client based on this WebSocket long connection.
[0049] When displaying a non-instant messaging page, a long WebSocket connection is established with the server. The server pre-registers a callback interface with the message processing end of the GetStream IM cloud service. Subsequently, based on this callback interface, the server can detect the corresponding message events from the client, filter and encapsulate them as described in the above embodiment, and generate message notifications. The message notifications are then sent to the client based on the self-established WebSocket connection with the client. The client can display the message notifications on the non-instant messaging page via pop-up notifications.
[0050] Next, referring to Figure 3, we will introduce the actual interaction flow between the client, processor, and server. Assume that while browsing products, a user needs to communicate with a merchant. This triggers the client to enter the merchant's chat interface (i.e., the instant messaging page), where the user performs a message input operation. In response to this input, the client obtains the communication message to be sent to the merchant (i.e., the message to be sent) entered by the user. Through a long WebSocket connection (the long connection of the instant messaging page) with the message processing end, the message to be sent is transmitted to the message processing end for forwarding to the merchant's corresponding client. Similarly, the merchant's reply message through their client is also sent to the message processing end. If the user's client is still in the chat interface, the client and message processing end maintain the same long WebSocket connection. Therefore, the message processing end can directly transmit the merchant's reply message to the user's client through its long WebSocket connection for display.
[0051] Because the message processing end generates a new message event upon receiving a reply from the merchant, even if the user navigates to a non-real-time communication page (such as a product details page), the server can still detect the message event from the message processing end through a registered callback interface, generate a corresponding message notification, and transmit the notification to the client via a self-established WebSocket long connection (a long connection for non-real-time communication pages) for the client to display. If the user wants to view the corresponding communication message, they can trigger the message notification to enter the session page, re-establish the WebSocket long connection with the message processing end, and receive and view the communication message.
[0052] The detailed implementation methods and beneficial effects of this embodiment have been described in detail in the foregoing embodiments, and will not be elaborated here.
[0053] In practical applications, instant messaging pages include a session list page. This page centrally displays session metadata for multiple communication sessions a user participates in and provides an interactive interface for accessing specific session interfaces. This session metadata can be issued by the message processing end and may include, but is not limited to, session party identifiers, session party information, session message identifiers, and session message content. The session party identifier can be a unique identifier for the session party, such as an account. Session party information can be personal information such as the session party's avatar and name. The session message identifier can be a unique identifier for the session message, such as the result of encoding the session message content (e.g., hash calculation), or the message processing end can maintain an independent message sequence number space for each point-to-point (i.e., any two session parties) or group session. Whenever a new message is generated in a session, it is assigned a session message identifier. This identifier can be an integer starting from a certain value (e.g., 1) and monotonically increasing (e.g., increasing by 1) strictly according to the message generation order throughout the session's lifecycle. The session message identifier is unique only within the corresponding session to ensure the temporal consistency of messages within the session. Optionally, the session metadata may also include key contextual information such as message timestamps and the number of unread messages. Its core function is to achieve efficient aggregation, state awareness, and fast access of multiple sessions.
[0054] Because the second communication connection between the client and the message processing terminal is disconnected when the client is on a non-instant messaging page in this embodiment, meaning that the client can only receive related message notifications through the server during the time the client displays the non-instant messaging page, but cannot receive specific communication messages, the session metadata displayed (i.e., loaded) on the session list page remains unchanged during this period. Therefore, when the client jumps from the non-instant messaging page to the session list page in the instant messaging page, the client needs to update the session list page, that is, to update the session metadata displayed on the session list page. The following section describes how the message distribution system addresses this need.
[0055] Optionally, the message processing end of the message distribution system is also used to maintain multiple session metadata records associated with the client; these session metadata records are arranged in reverse chronological order of their generation time. In this embodiment, the generation time of the session metadata can be approximately selected from the time corresponding to the message timestamp in the session metadata. The reverse chronological order means that session metadata records whose generation time is closer to the current time are ranked higher.
[0056] The client is further configured to, when navigating from a non-instant messaging page to the session list page, perform at least one data retrieval operation to obtain at least one candidate session metadata record, and update the loaded session metadata on the session list page based on the obtained candidate session metadata record. The loaded session metadata record can be session metadata already loaded onto the session list page. After performing at least one retrieval operation, based on the loaded session metadata record, deduplication is performed on the at least one candidate session metadata record obtained in the at least one data retrieval operation; that is, candidate session metadata records already existing in the loaded session metadata record are removed. The remaining candidate session metadata records are then added to the session list page and displayed in reverse chronological order.
[0057] The client's data acquisition operation includes the following sub-steps: Sub-step 1: Determine the data acquisition starting point; the first data acquisition starting point is the first session metadata maintained by the message processing terminal.
[0058] Sub-step 2: Based on the second communication connection, starting from the data acquisition starting point, sequentially acquire at least one candidate session metadata from multiple session metadata maintained by the message processing terminal. For example, a preset number (e.g., 30) candidate session metadata can be acquired each time.
[0059] In practical applications, if the client is logging in for the first time or logging in again after logging out, its session list page may be empty, meaning there is no loaded session metadata. To improve the update efficiency of the session list page, in this embodiment, the client is further configured to: determine whether the session list page contains loaded session metadata; wherein, if the loaded session metadata exists, the client performs an operation to determine whether the last obtained candidate session metadata exists in the loaded session metadata of the session list page (i.e., sub-step 3); if the loaded session metadata does not exist, the client stops the data acquisition operation (i.e., sub-step 5).
[0060] Sub-step 3: Determine whether the last candidate session metadata obtained exists in the session metadata already loaded on the session list page.
[0061] One implementation method is to compare the last acquired candidate session metadata with the data content of the session metadata already loaded on the session list page to determine whether it exists in the loaded session metadata.
[0062] Another approach is to select one or more key data items (such as session identifier, session message identifier, etc.) from the session metadata, and then compare the key data items in the last candidate session metadata with the key data items in the session metadata already loaded on the session list page to determine whether they exist in the loaded session metadata.
[0063] Sub-step 4: If not, then the next session metadata of the last candidate session metadata will be used as the starting point for the next data acquisition, and the next data acquisition operation will continue. For example, if the current data acquisition operation acquires session metadata records 1-30 maintained by the message processing end, then the starting point for the next data acquisition will be 31, that is, the next data acquisition operation will acquire session metadata records 31-60.
[0064] Sub-step 5: If yes, then stop the data acquisition operation.
[0065] In an optional embodiment, to further improve the efficiency of determining whether the last candidate session metadata exists in the loaded session metadata, the client in this embodiment can also make the determination in the following way: determine whether there is matching session metadata in the loaded session metadata of the session list page whose session party identifier is the same as the last session metadata. If not, it is determined that the last candidate session metadata does not exist in the loaded session metadata. If it exists, it is determined whether the last candidate session metadata is the same as the session message identifier of the matching session metadata; if they are different, it is determined that the last candidate session metadata does not exist in the loaded session metadata; if they are the same, it is determined that the last candidate session metadata exists in the loaded session metadata. This embodiment proposes a dynamic boundary detection mechanism based on dual identifier (i.e., session identifier and session message identifier) matching to determine whether the last candidate session metadata belongs to the loaded session metadata, which ensures the integrity and accuracy of data comparison and saves computational costs.
[0066] Figure 4 shows a flowchart of an embodiment of the message distribution method provided in this application. The message distribution method of this embodiment can be executed by the client of the message distribution system described above. The message distribution system also includes a server and a message processing terminal. The method may include the following steps: S401, establishing a first communication connection with the server and receiving message notifications sent by the server based on the first communication connection.
[0067] The communication message is generated by the server when it detects a message event from the message processing end based on the callback interface; the callback interface is registered by the server when it requests registration from the message processing end.
[0068] S402, when the instant messaging page is displayed, a second communication connection is established with the message processing terminal, and communication messages sent by the message processing terminal are received based on the second communication connection.
[0069] The second communication connection is disconnected when a non-real-time communication page is displayed.
[0070] S403 displays received message notifications or communication messages.
[0071] In an optional embodiment, the instant messaging page includes a session list page; the message processing terminal maintains multiple session metadata associated with the client; the multiple session metadata are arranged in reverse chronological order of generation time; the method further includes: when jumping from a non-instant messaging page to the session list page, performing at least one data acquisition operation to obtain at least one candidate session metadata, and updating the session metadata already loaded on the session list page based on the obtained at least one candidate session metadata; wherein, the data acquisition operation includes: determining the data acquisition starting point; the first data acquisition starting point is the first session metadata maintained by the message processing terminal; based on the second communication connection, starting from the data acquisition starting point, sequentially acquiring at least one candidate session metadata from the multiple session metadata maintained by the message processing terminal; determining whether the last acquired candidate session metadata exists in the session metadata already loaded on the session list page; if not, then taking the next session metadata of the last candidate session metadata as the next data acquisition starting point and continuing to perform the next data acquisition operation; if yes, then stopping the data acquisition operation.
[0072] In an optional embodiment, the session metadata includes: session party identifier, session party information, session message identifier, and session message content; determining whether the last candidate session metadata exists in the loaded session metadata of the session list page includes: determining whether there is a matching session metadata in the loaded session metadata of the session list page with the same session party identifier as the last session metadata; if not, then determining that the last candidate session metadata does not exist in the loaded session metadata; if it exists, then determining whether the session message identifier of the last candidate session metadata is the same as that of the matching session metadata; if they are different, then determining that the last candidate session metadata does not exist in the loaded session metadata; if they are the same, then determining that the last candidate session metadata exists in the loaded session metadata.
[0073] In an optional embodiment, the method further includes: determining whether the session list page has loaded session metadata; wherein, if the loaded session metadata exists, an operation is performed to determine whether the last obtained candidate session metadata exists in the loaded session metadata of the session list page; if the loaded session metadata does not exist, the data acquisition operation is stopped.
[0074] In an optional embodiment, the method further includes: in response to a trigger operation for the message notification, jumping from the current page to the instant messaging page corresponding to the message notification, disconnecting the first communication connection, and establishing a second communication connection with the message processing end; obtaining the communication message corresponding to the message notification from the message processing end based on the second communication connection, and displaying the communication message on the instant messaging page.
[0075] In an optional embodiment, the method further includes disconnecting the second communication connection and establishing a first communication connection with the server when navigating from an instant messaging page to a non-instant messaging page.
[0076] In one optional embodiment, the instant messaging page includes a session page; the client is further configured to respond to a user's input operation on the session page, determine a message to be sent, and send the message to be sent to the message processing terminal based on the second communication connection.
[0077] The detailed implementation methods and beneficial effects of each step in this embodiment have been described in detail in the foregoing message distribution system embodiments, and will not be elaborated here.
[0078] Figure 5 shows a flowchart of an embodiment of the message distribution method provided in this application. The message distribution method of this embodiment can be executed by the server of the message distribution system described above. The message distribution system also includes a client and a message processing terminal. When the instant messaging page is displayed, the client establishes a second communication connection with the message processing terminal and receives communication messages sent by the message processing terminal based on the second communication connection. When a non-instant messaging page is displayed, the second communication connection is disconnected.
[0079] The message distribution method shown in Figure 5 may include the following steps: S501, requesting the registration callback interface from the message processing end.
[0080] S502 establishes the first communication connection with the client.
[0081] S503, based on the callback interface, detects whether a message event exists from the message processing end.
[0082] S504, if present, generate a message notification and send the message notification to the client based on the first communication connection.
[0083] Optionally, the method for generating the message notification may be: when the message event meets the notification requirements, extract the key information of the message event, and generate a message notification based on the key information.
[0084] The detailed implementation methods and beneficial effects of each step in this embodiment have been described in detail in the foregoing message distribution system embodiments, and will not be elaborated here.
[0085] It should be noted that some processes described in the above embodiments and accompanying drawings include multiple operations appearing in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear in this document, or they may be executed in parallel. The operation numbers, such as 501, 502, etc., are merely used to distinguish different operations and do not represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should also be noted that the descriptions such as "first" and "second" in this document are used to distinguish different messages, devices, modules, etc., and do not represent a chronological order, nor do they limit "first" and "second" to different types.
[0086] Figure 6 is a schematic diagram of a message distribution device provided in an exemplary embodiment of this application. The device is configured on the client side of a message distribution system, which also includes a client and a message processing terminal. The device includes: a first connection module 601, used to establish a first communication connection with the server; a receiving module 602, used to receive a message notification sent by the server based on the first communication connection; the message notification is generated by the server when it detects a message event from the message processing terminal based on a callback interface; the callback interface is registered by the server to the message processing terminal; the first connection module 601 is used to establish a second communication connection with the message processing terminal when an instant messaging page is displayed; the receiving module 602 is used to receive communication messages sent by the message processing terminal based on the second communication connection; the second communication connection is disconnected when a non-instant messaging page is displayed; and a display module 603 is used to display the received message notification or communication message.
[0087] In an optional embodiment, the instant messaging page includes a session list page; the message processing terminal maintains multiple session metadata associated with the client; the multiple session metadata are arranged in reverse chronological order of generation time; the device further includes: a data acquisition module, used to perform at least one data acquisition operation to obtain at least one candidate session metadata when jumping from a non-instant messaging page to the session list page; and a session list update module, used to update the session metadata already loaded on the session list page based on the obtained at least one candidate session metadata; wherein, the data acquisition operation includes: determining a data acquisition starting point; the first data acquisition starting point is the first session metadata maintained by the message processing terminal; based on the second communication connection, starting from the data acquisition starting point, at least one candidate session metadata is sequentially acquired from the multiple session metadata maintained by the message processing terminal; determining whether the last acquired candidate session metadata exists in the session metadata already loaded on the session list page; if not, the next session metadata of the last candidate session metadata is taken as the next data acquisition starting point, and the next data acquisition operation is continued; if yes, the data acquisition operation is stopped.
[0088] In an optional embodiment, the session metadata includes: session party identifier, session party information, session message identifier, and session message content; when the data acquisition module performs the judgment on whether the last candidate session metadata exists in the session metadata already loaded on the session list page, it specifically determines whether there is a matching session metadata in the session metadata already loaded on the session list page whose session party identifier is the same as the last session metadata; if not, it is determined that the last candidate session metadata does not exist in the loaded session metadata; if it does exist, it is determined whether the session message identifier of the last candidate session metadata is the same as that of the matching session metadata; if they are different, it is determined that the last candidate session metadata does not exist in the loaded session metadata; if they are the same, it is determined that the last candidate session metadata exists in the loaded session metadata.
[0089] In an optional embodiment, the data acquisition module is further configured to determine whether the session list page has loaded session metadata; wherein, if the loaded session metadata exists, the module performs an operation to determine whether the last acquired candidate session metadata exists in the loaded session metadata of the session list page; if the loaded session metadata does not exist, the data acquisition operation is stopped.
[0090] In an optional embodiment, the device further includes a page jump module, configured to jump from the current page to the instant messaging page corresponding to the message notification in response to a trigger operation for the message notification; the first connection module 601 is further configured to disconnect the first communication connection and establish a second communication connection with the message processing end; the receiving module 602 is further configured to obtain the communication message corresponding to the message notification from the message processing end based on the second communication connection; and the display module 603 is configured to display the communication message on the instant messaging page.
[0091] In an optional embodiment, the first connection module 601 is further configured to disconnect the second communication connection and establish a first communication connection with the server when jumping from an instant messaging page to a non-instant messaging page.
[0092] In an optional embodiment, the instant messaging page includes a session page; the device further includes a message sending module, configured to determine a message to be sent in response to a user's input operation on the session page, and send the message to be sent to the message processing terminal based on the second communication connection.
[0093] The message distribution device shown in Figure 6 can execute the message distribution method described in the embodiment shown in Figure 4. Its implementation principle and technical effects will not be elaborated further. The specific methods by which each module and unit of the message distribution device in the above embodiments performs its operations have been described in detail in the embodiments related to this method, and will not be elaborated upon here.
[0094] Figure 7 is a schematic diagram of a message distribution device provided in an exemplary embodiment of this application. The device is configured on the server side of the message distribution system described above. The message distribution system also includes a client and a message processing terminal. When the client displays an instant messaging page, it establishes a second communication connection with the message processing terminal and receives communication messages sent by the message processing terminal based on the second communication connection. When the client displays a non-instant messaging page, it disconnects the second communication connection.
[0095] The message distribution device includes an interface registration module 701, used to request the registration of a callback interface from the message processing terminal.
[0096] The second connection module 702 is used to establish a first communication connection with the client; the event detection module 703 is used to detect whether a message event exists from the message processing end based on the callback interface; the notification generation module 704 is used to generate a message notification if it exists; and the notification sending module 705 is used to send the message notification to the client based on the first communication connection.
[0097] In an optional embodiment, the notification generation module 704 is specifically used to extract key information of the message event when the message event meets the notification requirements, and generate a message notification based on the key information.
[0098] The message distribution device shown in Figure 7 can execute the message distribution method described in the embodiment shown in Figure 5. Its implementation principle and technical effects will not be elaborated further. The specific methods by which each module and unit of the message distribution device in the above embodiments performs its operations have been described in detail in the embodiments related to this method, and will not be elaborated upon here.
[0099] Figure 8 is a schematic diagram of an embodiment of a computing device provided in this application. As shown in Figure 8, in practice, the computing device may include a storage component 801 and a processing component 802.
[0100] Storage component 801 is used to store computer programs and can be configured to store various other data to support operation on a computing device. Examples of this data include instructions for any application or method used to operate on the computing device, data structures, contact data, phone book data, messages, pictures, videos, etc.
[0101] Processing component 802, coupled to storage component 801, is used to execute computer programs in storage component 801 to implement the message distribution method shown in Figure 4 or 5.
[0102] Furthermore, as shown in Figure 8, the computing device may also include other components such as a communication component 803, a display component 804, a power supply component 805, and an audio component 806. Figure 8 only schematically shows some components and does not imply that the computing device only includes the components shown in Figure 8. Additionally, the components within the dashed boxes in Figure 8 are optional, not mandatory, and their specific inclusion depends on the product form of the computing device. The computing device of this embodiment can be implemented as a terminal device such as a desktop computer, laptop computer, smartphone, or IoT (Internet of Things) device, or as a server-side device such as a conventional server, cloud server, or server array. If the computing device of this embodiment is implemented as a terminal device such as a desktop computer, laptop computer, or smartphone, it may include the components within the dashed boxes in Figure 8; if the computing device of this embodiment is implemented as a server-side device such as a conventional server, cloud server, or server array, it may not include the components within the dashed boxes in Figure 8.
[0103] The processing component described above includes one or more processors to execute computer instructions to complete all or part of the steps in the method described above. Alternatively, the processing component may be implemented as one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the method described above.
[0104] The aforementioned storage components can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0105] The aforementioned communication component is configured to facilitate wired or wireless communication between the device housing the communication component and other devices. The device housing the communication component can access wireless networks based on communication standards, such as mobile communication networks, or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel.
[0106] The aforementioned display components may include a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation.
[0107] The aforementioned power supply components provide power to various components within the device in which they reside. These power supply components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which they reside.
[0108] The aforementioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals can be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.
[0109] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to implement the steps in the above-described method embodiments. The computer-readable storage medium may be volatile, non-volatile, or a combination thereof, and may be removable or non-removable. Examples of computer-readable storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random-access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), flash memory or other memory technologies, CD-ROM, Digital Video Disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium. Accordingly, embodiments of this application also provide a computer program product comprising a computer program or instructions that, when executed by a processor, cause the processor to implement the steps in the above method embodiments. It should be understood that each step or combination of steps in the above method flow can be implemented by a computer program or instructions. In addition, these computer programs or instructions can be applied to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device, so that the processor of the general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device can be implemented as a means to implement the corresponding functions in the above method embodiments.
[0110] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0111] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0112] Finally, it should be noted that the above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A message distribution system, characterized in that, It includes a client, a server, and a message processing terminal; the client is used to establish a first communication connection with the server and receive message notifications sent by the server based on the first communication connection; When the instant messaging page is displayed, a second communication connection is established with the message processing terminal, and communication messages sent by the message processing terminal are received based on the second communication connection; If a non-instant messaging page is displayed, disconnect the second communication connection; And display received message notifications or communication messages; The server is configured to request the registration of a callback interface from the message processing terminal, and based on the callback interface, detect whether a message event exists from the message processing terminal. In the presence of the message event, a message notification is generated and sent to the client based on the first communication connection; the message processing terminal is used to receive the communication message to be transmitted to the client and generate the message event. If a second communication connection is established with the client, the communication message is sent to the client based on the second communication connection.
2. The system according to claim 1, characterized in that, The instant messaging page includes a session list page; the message processing terminal is also used to maintain multiple session metadata associated with the client; the multiple session metadata are arranged in reverse chronological order of generation time; the client is also used to perform at least one data acquisition operation when jumping from a non-instant messaging page to the session list page, to obtain at least one candidate session metadata, and to update the session metadata already loaded on the session list page based on the obtained candidate session metadata; wherein, the data acquisition operation includes: determining the data acquisition starting point; the first data acquisition starting point is the first session metadata maintained by the message processing terminal; based on the second communication connection, starting from the data acquisition starting point, at least one candidate session metadata is sequentially acquired from the multiple session metadata maintained by the message processing terminal; determining whether the last acquired candidate session metadata exists in the session metadata already loaded on the session list page; if not, the next session metadata of the last candidate session metadata is taken as the next data acquisition starting point, and the next data acquisition operation is continued; if yes, the data acquisition operation is stopped.
3. The system according to claim 2, characterized in that, The session metadata includes: session party identifier, session party information, session message identifier, and session message content. When the client determines whether the last candidate session metadata exists in the session metadata already loaded on the session list page, it specifically performs the following steps: It determines whether there is a matching session metadata in the session metadata already loaded on the session list page whose session party identifier is the same as the last session metadata. If not, it determines that the last candidate session metadata does not exist in the loaded session metadata. If it does exist, it determines whether the last candidate session metadata is the same as the session message identifier of the matching session metadata. If they are different, it determines that the last candidate session metadata does not exist in the loaded session metadata. If they are the same, it determines that the last candidate session metadata exists in the loaded session metadata.
4. The system according to claim 2, characterized in that, The client is further configured to: determine whether the session list page has loaded session metadata; wherein, if the loaded session metadata exists, perform an operation to determine whether the last obtained candidate session metadata exists in the loaded session metadata of the session list page; if the loaded session metadata does not exist, stop the data acquisition operation.
5. The system according to claim 1, characterized in that, The client is further configured to, in response to a trigger operation for the message notification, jump from the current page to the instant messaging page corresponding to the message notification, disconnect the first communication connection, establish a second communication connection with the message processing end, obtain the communication message corresponding to the message notification from the message processing end based on the second communication connection, and display the communication message on the instant messaging page.
6. The system according to claim 1, characterized in that, The server-side message notification generation is specifically used to: extract key information of the message event when the message event meets the notification requirements, and generate a message notification based on the key information.
7. The system according to claim 1, characterized in that, The instant messaging page includes a session page; the client is also used to respond to the user's input operation on the session page, determine the message to be sent, and send the message to be sent to the message processing terminal based on the second communication connection.
8. A message distribution method, characterized in that, A client application for a message distribution system, the message distribution system further comprising a server and a message processing terminal; the method comprising: establishing a first communication connection with the server and receiving a message notification sent by the server based on the first communication connection; the message notification being generated by the server when it detects a message event from the message processing terminal based on a callback interface; the callback interface being registered by the server to the message processing terminal; establishing a second communication connection with the message processing terminal when an instant messaging page is displayed, and receiving a communication message sent by the message processing terminal based on the second communication connection; the second communication connection being disconnected when a non-instant messaging page is displayed; and displaying the received message notification or communication message.
9. A message distribution method, characterized in that, The server is applied to a message distribution system, which also includes a client and a message processing terminal. When the client displays an instant messaging page, it establishes a second communication connection with the message processing terminal and receives communication messages sent by the message processing terminal based on the second communication connection. When a non-instant messaging page is displayed, the second communication connection is disconnected; the method includes: requesting the message processing terminal to register a callback interface; establishing a first communication connection with the client; detecting whether a message event exists from the message processing terminal based on the callback interface; if it exists, generating a message notification and sending the message notification to the client based on the first communication connection.
10. A computing device, characterized in that, It includes a processing component and a storage component; the storage component stores a computer program; the computer program is invoked and executed by the processing component to implement the message distribution method as described in claim 8 or 9.
11. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processing component, implements the message distribution method as described in claim 8 or 9.
12. A computer program product, characterized in that, It includes a computer program or instructions that, when executed by a processing component, implement the message distribution method as described in claim 8 or 9.