Chat message processing method and apparatus, electronic device, and storage medium
By acquiring and outputting historical chat cache records from the chat channel in the game client, the problem of low chat channel activity was solved, improving player interactivity and the gaming experience.
Patent Information
- Application Number
- CN202210987834.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-17
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2042-08-17
AI Technical Summary
Low player activity in the game's chat channel leads to weak player interaction and reduces the overall gaming experience.
By obtaining historical chat cache records of the target chat channel from the game client and outputting historical chat messages when the channel is detected to be inactive, the activity level of the chat scenario is simulated, thereby improving player interactivity.
It improved player interaction and chat channel activity, creating a more lively chat atmosphere and enhancing the gaming experience.
Smart Images

Figure CN117618933B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer communication technology, and in particular to a method for processing chat messages, a device for processing chat messages, an electronic device, and a computer-readable storage medium. Background Technology
[0002] With the development of gaming technology, more and more people are relaxing through games. In the game environment, different players can chat by sending messages to each other and receive notifications from the game system. The chat system is a communication platform provided by the game application for players. The chat system can include different chat channels, including but not limited to server-wide chat channels and country / region sub-channels. Players can choose several specific sub-channels to communicate according to their needs.
[0003] In the chat system, players can send chat text using the physical keyboard, virtual keyboard, microphone, and emoticons. The chat text is forwarded by the server and broadcast to other clients for display. However, when a player is offline, the displayed chat content is not visible upon their return; the game client only displays active chat content when a player is online. This can lead to situations where a player logs into a chat channel with no chat history, or some chat channels remain silent due to low activity, reducing interactivity between players. Summary of the Invention
[0004] The present invention provides a method, apparatus, electronic device, and computer-readable storage medium for processing chat messages, in order to solve or partially solve the problem of low player chat activity in game chat channels, resulting in weak interaction between players and a poor game experience.
[0005] This invention discloses a method for processing chat messages, which provides a graphical user interface through a terminal device. The method includes:
[0006] In response to a display command for a chat channel, a target chat channel corresponding to the display command is determined, and historical chat cache records corresponding to the target chat channel are obtained from the server. The historical chat cache records include a specified number of historical chat messages, and the historical chat messages are updated and stored on the server in the order of their sending time.
[0007] The target chat channel is provided in the graphical user interface, and real-time chat messages broadcast by the server in the target chat channel are displayed within the target chat channel.
[0008] Obtain channel activity information to characterize the activity level of the target chat channel;
[0009] If the channel activity information indicates that the target chat channel is currently inactive, then the historical chat messages in the historical chat cache record are output in the target chat channel.
[0010] This invention discloses a method for processing chat messages, applied to a server, comprising:
[0011] Receive real-time chat messages sent by at least one terminal device in a chat channel;
[0012] Based on the sending time sequence of the real-time chat messages, the server updates and stores a specified number of real-time chat messages to generate historical chat cache records for the chat channel;
[0013] In response to a chat channel display request sent by a target terminal device, a target chat channel corresponding to the chat channel display request is determined, and a historical chat cache record corresponding to the target chat channel is sent to the target terminal device, so that when the target chat channel is inactive, the target terminal device can simulate at least some game characters chatting in the target chat channel by outputting historical chat messages in the historical chat cache record in the target chat channel.
[0014] The chat channel display request is generated in response to a game client login operation on the target terminal device or a chat channel switching operation on the target terminal device.
[0015] This invention discloses a chat message processing apparatus that provides a graphical user interface through a terminal device. The apparatus includes:
[0016] The cache record acquisition module is used to respond to a display instruction for a chat channel, determine the target chat channel corresponding to the display instruction, and obtain the historical chat cache record corresponding to the target chat channel from the server. The historical chat cache record includes a specified number of historical chat messages, and the historical chat messages are updated and stored on the server in the order of sending time.
[0017] A real-time message display module is used to provide the target chat channel in the graphical user interface and display the real-time chat messages of the target chat channel broadcast by the server within the target chat channel;
[0018] An activity information acquisition module is used to acquire channel activity information that characterizes the activity level of the target chat channel;
[0019] The cache record output module is used to output historical chat messages in the historical chat cache record in the target chat channel if the channel activity information indicates that the target chat channel is currently inactive.
[0020] This invention discloses a chat message processing device, comprising:
[0021] The chat message receiving module is used to receive real-time chat messages sent by at least one terminal device in the chat channel;
[0022] The cache record generation module is used to update and store a specified number of real-time chat messages in the server based on the sending time order of the real-time chat messages, and generate historical chat cache records for the chat channel;
[0023] The chat message sending module is used to respond to a chat channel display request sent by a target terminal device, determine the target chat channel corresponding to the chat channel display request, and send the historical chat cache record corresponding to the target chat channel to the target terminal device, so that when the target chat channel is inactive, the target terminal device can simulate at least some game characters chatting in the target chat channel by outputting the historical chat messages in the historical chat cache record in the target chat channel.
[0024] The chat channel display request is generated in response to a game client login operation on the target terminal device or a chat channel switching operation on the target terminal device.
[0025] This invention also discloses an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0026] The memory is used to store computer programs;
[0027] When the processor executes a program stored in the memory, it implements the method described in the embodiments of the present invention.
[0028] This invention also discloses a computer-readable storage medium storing instructions that, when executed by one or more processors, cause the processors to perform the methods described in this invention.
[0029] The embodiments of the present invention have the following advantages:
[0030] In this embodiment of the invention, it can be applied to a game client. During gameplay, the game client can respond to a display command for a chat channel, determine the target chat channel corresponding to the display command, and obtain historical chat cache records corresponding to the target chat channel from the server. The historical chat cache records include a specified number of historical chat messages, which are updated and stored on the server in chronological order of their sending time. The target chat channel is provided in the graphical user interface, and real-time chat messages broadcast by the server for the target chat channel are displayed within the target chat channel. Channel activity information representing the activity level of the target chat channel is obtained. If the channel activity information indicates that the target chat channel is currently inactive, the historical chat messages in the historical chat cache records are output to the target chat channel. Thus, for a game chat channel, when inactivity is detected, by obtaining the corresponding historical chat cache records from the server and outputting them to the chat channel, players can conveniently view historical chat messages and participate in corresponding chat topics, improving player interaction. Furthermore, by outputting the historical chat cache records, an active atmosphere is created in the chat scene, increasing chat activity. Attached Figure Description
[0031] Figure 1 This is a flowchart of the steps of a chat message processing method provided in an embodiment of the present invention;
[0032] Figure 2 This is a schematic diagram of the chat message synchronization process provided in an embodiment of the present invention;
[0033] Figure 3 This is a schematic diagram of the chat message synchronization process provided in an embodiment of the present invention;
[0034] Figure 4 This is a flowchart of the steps of a chat message processing method provided in an embodiment of the present invention;
[0035] Figure 5 This is a structural block diagram of a chat message processing device provided in an embodiment of the present invention;
[0036] Figure 6 This is a structural block diagram of a chat message processing device provided in an embodiment of the present invention;
[0037] Figure 7 This is a block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0038] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0039] As an example, a game's chat system can include several different chat channels. Players can choose the appropriate channel to communicate with other players based on their game needs. Specifically, in the game, players can send chat text using the physical keyboard, virtual keyboard, microphone, and emoticons. The chat text is forwarded by the server and then broadcast to other clients for display. During this process, players will not receive chat messages when offline, and chat messages prior to their online time will also be inaccessible after logging back in. This can result in some chat channels in the game client being empty, or some channels being deserted due to low activity, reducing interactivity between players.
[0040] One of the core inventive points of this invention is that when a player logs in or switches chat channels during gameplay, the game client can obtain the historical chat cache records corresponding to the player's currently selected target chat channel and perform activity detection on that target chat channel. If the activity level of the target chat channel is detected to be low, the historical chat messages in the historical chat cache records can be output to the target chat channel. Thus, for game chat channels in the game client, when an inactive chat channel is detected, by obtaining the corresponding historical chat cache records from the server and outputting them to the chat channel, players can conveniently view historical chat messages and participate in corresponding chat topics, improving interactivity between players. On the other hand, by outputting the historical chat cache records, an active atmosphere is created in the chat scene, increasing chat activity.
[0041] Specifically, refer to Figure 1 This diagram illustrates a flowchart of a chat message processing method provided in an embodiment of the present invention, applied to a game client, and specifically includes the following steps:
[0042] Step 101: In response to a display instruction for a chat channel, determine the target chat channel corresponding to the display instruction, and obtain the historical chat cache record corresponding to the target chat channel from the server. The historical chat cache record includes a specified number of historical chat messages, and the historical chat messages are updated and stored on the server in the order of their sending time.
[0043] Optionally, this invention can be applied to a terminal device, where a corresponding application can run and a corresponding game interface can be displayed through the terminal device's graphical user interface, allowing players to perform corresponding game operations. The terminal device can be a desktop computer, laptop computer, tablet computer, or mobile terminal, etc., and the application can be a program that provides multi-channel chat functionality, such as a game application or a game mini-program. In this embodiment, the terminal device is a mobile terminal, and the example given is a game application (i.e., a game client, hereinafter referred to as the game client) running on the mobile terminal, with the game application providing multi-channel chat functionality. It is understood that this invention is not limited in this respect.
[0044] In this embodiment of the invention, players can log in to their respective game accounts in the game client to perform corresponding game operations, such as communicating online with other players through the game client's chat system. The game client's chat system can include several chat channels, each corresponding to a different player group within the game. The server can provide chat message broadcasting services to the terminal devices corresponding to player characters who have joined a particular chat channel. For example, the chat system can include world channels, region channels, server channels, faction channels, guild channels, class channels, etc. The world channel corresponds to all players in the game; the region channel corresponds to players in a specific region / game map; the server channel corresponds to players on a specific server; the faction channel corresponds to players in a specific faction; the guild channel corresponds to players in a specific guild; and the class channel corresponds to players in a specific class. Players online can communicate in the corresponding chat channels.
[0045] In its implementation, the game client can respond to a display command for a chat channel, determine the target chat channel corresponding to the command, and retrieve the historical chat cache records for the target chat channel from the server. During gameplay, players can only input content (such as text messages, emoticons, voice messages, etc.) in one chat channel at a time to communicate with other players in the same chat channel. When they need to communicate in another chat channel, they must switch chat channels within the chat interface.
[0046] The historical chat cache can include a specified number of historical chat messages from a designated chat channel. The server can update and store these messages in chronological order of their sending time. Specifically, the server can acquire chat messages sent from different devices to a specific chat channel in real time during gameplay. Based on the sending time of each message, the server stores the messages in the corresponding message pool for that chat channel, thus obtaining the historical chat cache for that channel. For example, for chat channels such as World Channel, Region Channel, Server Channel, Faction Channel, Guild Channel, and Class Channel, corresponding message pools can be configured on the server. For instance, the World Message Pool for the World Channel allows the server to receive chat messages sent from different clients in the World Channel and store them sequentially in the World Message Pool according to the sending time of each message, thus obtaining the historical chat cache for the World Channel. Simultaneously, while caching, the server can also broadcast the chat messages to other clients besides the one that sent them.
[0047] Optionally, the message pool can be an active, real-time updated data pool. The server can delete the oldest chat message from the message pool when the storage limit is reached, based on a preset storage quantity and the corresponding time of the stored chat messages, thus ensuring the timeliness of the chat messages in the message pool. Correspondingly, the historical chat cache records can be the chat messages stored in the message pool. As the chat messages are updated, the historical chat cache records can also be updated in real time, thus ensuring the timeliness of the historical chat cache records as well.
[0048] Specifically, after the game client identifies the selected target chat channel, it can generate a corresponding chat channel display request and send the request to the server to obtain the corresponding historical chat cache records. The server can then respond to the chat channel display request sent by the client, identify the target chat channel corresponding to the request, and send the historical chat cache records corresponding to the target chat channel to the target terminal device. This allows the target terminal device to simulate at least some game characters chatting in the target chat channel by outputting historical chat messages from the historical chat cache records in the target chat channel when the target chat channel is inactive.
[0049] For display commands, the terminal can respond to a game client login operation on the terminal device or a chat channel switching operation displayed in the graphical user interface, generating a display command for the chat channel. In one example, the terminal can respond to an account login command for the client, determine the currently selected target chat channel in the chat interface of the client after successful login, generate a display command and a corresponding chat channel display request for the target chat channel, send the chat channel display request to the server, and obtain the historical chat cache record corresponding to the target chat channel from the server. Thus, when the player has just logged in, the game client can locate the currently selected chat channel in the chat interface and obtain the corresponding historical chat cache record to determine whether to output the historical chat cache record to that chat channel. In another example, the terminal can respond to a chat channel selection command for the client. The system determines the target chat channel corresponding to the chat channel selection command, generates a display command and a corresponding chat channel display request for the target chat channel, sends the chat channel display request to the server, and retrieves the historical chat cache record corresponding to the target chat channel from the server. Thus, during the game, when the player switches chat channels, the game client can retrieve the corresponding historical chat cache record to determine whether to output the historical chat cache record to the chat channel. Furthermore, when the player enters a chat channel after logging in or switching chat channels, the system retrieves the corresponding historical chat cache record from the server to determine whether to output the corresponding historical chat cache record to the chat channel.
[0050] Step 102: Provide the target chat channel in the graphical user interface and display the real-time chat messages of the target chat channel broadcast by the server within the target chat channel;
[0051] After entering a chat channel, the terminal can display the target chat channel in the game client shown in the graphical user interface, so that players can enter corresponding chat messages in the target chat channel to communicate with other players in the target chat channel. When other players in the target chat channel send corresponding real-time chat messages in their respective clients, the server can receive the real-time chat messages sent by the corresponding terminal devices and broadcast the real-time chat messages to the target chat channel, so that players in the target chat channel can interact and communicate through chat messages.
[0052] Step 103: Obtain channel activity information to characterize the activity level of the target chat channel;
[0053] After entering a chat channel, the game client can monitor the channel's activity information in real time. This activity information can be used to characterize the chat channel's activity level. For example, it can be the number of chat messages in the chat channel; the more messages, the more active the chat channel, and the fewer messages, the less active the chat channel. Alternatively, it can be whether there are any new chat messages sent by other players in the chat channel; if there are, the chat channel is active, and if not, the chat channel is inactive. This invention does not impose any limitations on this.
[0054] Optionally, the terminal may acquire channel activity information to characterize the activity level of the target chat channel according to a preset detection frequency. For example, it may acquire channel activity information to characterize the activity level of the target chat channel once every 1 minute, once every 3 minutes, once every 5 minutes, etc. The present invention does not limit this.
[0055] Step 104: If the channel activity information indicates that the target chat channel is currently inactive, then the historical chat messages in the historical chat cache record are output in the target chat channel.
[0056] In the specific implementation, if the channel activity information indicates that no real-time chat messages have been received from the server within a preset time period, meaning there are currently no new chat messages sent by other players in the target chat channel, the target chat channel is determined to be inactive, and the game client can output historical chat cache records to the target chat channel. If the channel activity information indicates that real-time chat messages have been received from the server, meaning there are currently new chat messages sent by other players in the target chat channel, the target chat channel is determined to be active, and the game client can output real-time chat messages to the target chat channel in chronological order. Thus, for game chat channels, when inactivity is detected, by retrieving the corresponding historical chat cache records from the server and outputting them to the chat channel, players can conveniently view historical chat messages and participate in corresponding chat topics, improving player interaction. On the other hand, by outputting historical chat cache records, an active atmosphere is created in the chat scene, increasing chat activity.
[0057] The historical chat cache records can include several historical chat messages posted by other game players in the target chat channel. After the game client obtains the historical chat cache records corresponding to the target chat channel from the server, it can cache them locally and obtain the current chat messages output in the target chat channel. Then, it can obtain the local chat message identifier corresponding to the target chat channel and the historical chat message identifier extracted from the historical chat cache records. The local chat message identifier is compared with the historical chat message identifier, and the historical chat messages with unique identifiers are output in the target chat channel according to the chronological order of the historical chat messages. By publishing the historical chat cache records in the chat channel, players can easily view historical chat messages and participate in corresponding chat topics, improving player interaction. On the other hand, by outputting the historical chat cache records, a lively atmosphere is created in the chat scene, increasing chat activity.
[0058] It should be noted that for chat messages, the server can configure a corresponding chat message identifier for each chat message to uniquely identify it. When broadcasting a chat message to the corresponding terminal device, the terminal device stores the chat message identifier. This allows the terminal to extract the historical chat message identifier for each historical chat message from the historical chat cache records obtained from the server, and compare it with the locally stored local chat message identifier to determine if there are any identical identifiers. The local chat message identifier can be the identifier of a chat message that has already been output to the chat channel by the local client. By using the chat message identifier, previously unoutput historical chat messages can be filtered from the historical chat cache records and output to the corresponding chat channel. By delegating the chat message verification process to the client, the server only needs to handle the configuration, storage, updating, and sending of chat messages, which can greatly reduce the server's performance overhead and improve its operating efficiency.
[0059] Furthermore, for chat message output, historical chat messages that do not overlap with currently output messages in the target chat channel can be output one by one according to chronological order, or several historical chat messages can be output at once. Thus, when the game client detects the need to publish historical chat cache records, it can customize the publication of historical chat cache records according to preset publishing methods.
[0060] For each chat channel, when the server receives the corresponding real-time chat message, it can broadcast it to the corresponding online client. Specifically, the server can respond to the real-time chat message received for a chat channel and broadcast it to the terminal device corresponding to the online client in the order of the real-time chat message. When each online client receives a real-time chat message for a certain chat channel, if the player has currently selected that chat channel, the game client can immediately output the real-time chat message.
[0061] It should be noted that historical chat messages can be chat messages stored in the message pool corresponding to the chat channel, while real-time chat messages can be chat messages sent from the game client to the server in real time. The server can store real-time chat messages in the corresponding message pool as historical chat messages when sending them to online clients, so as to build a historical chat cache record for the corresponding chat channel.
[0062] In one example, refer to Figure 2 This diagram illustrates the flowchart of chat message synchronization provided in this embodiment of the invention. When a player successfully logs in to the game client and enters the corresponding target chat channel, the game client can request the historical chat cache records corresponding to the target chat channel from the server. Then, it can detect whether there are any new chat messages in the target chat channel within a preset time period (such as 5 seconds, 10 seconds, etc.). If there are, the corresponding chat message is output in the target chat channel; if not, the historical chat cache records are output to the target chat channel according to the corresponding output method, and the process returns to the step of obtaining the historical chat cache records. This allows for continued real-time detection of the chat channel's activity level through the corresponding detection frequency, determining whether to output the corresponding historical chat messages. On the one hand, this facilitates players in viewing historical chat messages and participating in corresponding chat topics, improving player interaction. On the other hand, outputting historical chat cache records creates an active atmosphere in the chat scene, increasing chat activity.
[0063] Reference Figure 3This diagram illustrates a flowchart of chat message synchronization provided in an embodiment of the present invention. During gameplay, when a player switches from the current chat channel to a target chat channel, the game client can request the historical chat cache records corresponding to that target chat channel from the server. Then, it can detect whether there are any new chat messages in the target chat channel within a preset time period (e.g., 5 seconds, 10 seconds, etc.). If so, the corresponding chat message is output to the target chat channel; otherwise, the historical chat cache records are output to the target chat channel according to the corresponding output method, and the process returns to the step of obtaining the historical chat cache records. This allows for continued real-time monitoring of the chat channel's activity level at a corresponding detection frequency to determine whether to output the corresponding historical chat messages. On one hand, this facilitates players' access to historical chat messages and participation in corresponding chat topics, improving player interaction. On the other hand, outputting historical chat cache records creates an active atmosphere in the chat scene, enhancing chat activity.
[0064] In this embodiment of the invention, it can be applied to a game client. During gameplay, the game client can respond to a display command for a chat channel, determine the target chat channel corresponding to the display command, and obtain historical chat cache records corresponding to the target chat channel from the server. The historical chat cache records include a specified number of historical chat messages, which are updated and stored on the server in chronological order of their sending time. The target chat channel is provided in the graphical user interface, and real-time chat messages broadcast by the server for the target chat channel are displayed within the target chat channel. Channel activity information representing the activity level of the target chat channel is obtained. If the channel activity information indicates that the target chat channel is currently inactive, the historical chat messages in the historical chat cache records are output to the target chat channel. Thus, for a game chat channel, when inactivity is detected, by obtaining the corresponding historical chat cache records from the server and outputting them to the chat channel, players can conveniently view historical chat messages and participate in corresponding chat topics, improving player interaction. Furthermore, by outputting the historical chat cache records, an active atmosphere is created in the chat scene, increasing chat activity.
[0065] Reference Figure 4 This diagram illustrates a flowchart of a chat message processing method provided in an embodiment of the present invention, applied to a server, and specifically includes the following steps:
[0066] Step 401: Receive real-time chat messages sent by at least one terminal device in the chat channel;
[0067] Step 401: Based on the sending time order of the real-time chat messages, update and store a specified number of real-time chat messages in the server to generate historical chat cache records for the chat channel;
[0068] Step 401: In response to the chat channel display request sent by the target terminal device, determine the target chat channel corresponding to the chat channel display request, and send the historical chat cache record corresponding to the target chat channel to the target terminal device, so that when the target chat channel is inactive, the target terminal device can simulate at least some game characters chatting in the target chat channel by outputting the historical chat messages in the historical chat cache record in the target chat channel.
[0069] The chat channel display request is generated in response to a game client login operation on the target terminal device or a chat channel switching operation on the target terminal device.
[0070] In one optional embodiment, after receiving real-time chat messages sent by at least one terminal device in a chat channel, the method further includes:
[0071] According to the sending time sequence of the real-time chat messages, the real-time chat messages are broadcast to the terminal devices corresponding to the currently online clients, so that the terminal devices corresponding to the currently online clients output the real-time chat messages in the chat channel.
[0072] In this embodiment of the invention, it can be applied to the server side. During gameplay, the server can receive real-time chat messages sent by at least one terminal device in a chat channel. Based on the sending time sequence of the real-time chat messages, the server updates and stores a specified number of real-time chat messages, generating historical chat cache records for the chat channel. When a chat channel expansion request is received from a target terminal device, the server can respond to the chat channel display request sent by the target terminal device, determine the target chat channel corresponding to the chat channel display request, and send the historical chat cache records corresponding to the target chat channel to the target terminal device. This allows the target terminal device to simulate at least some game characters chatting in the target chat channel by outputting historical chat messages from the historical chat cache records in the target chat channel when the target chat channel is inactive. Thus, for game chat channels, when inactivity is detected, the client can obtain the corresponding historical chat cache records from the server and output them to the chat channel. On the one hand, this makes it convenient for players to view historical chat messages and participate in corresponding chat topics, improving player interaction. On the other hand, by outputting historical chat cache records, an active atmosphere is created in the chat scene, increasing chat activity.
[0073] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0074] Reference Figure 5 This diagram illustrates a structural block diagram of a chat message processing device provided in an embodiment of the present invention. It provides a graphical user interface via a terminal device and may specifically include the following modules:
[0075] The cache record acquisition module 501 is used to respond to a display instruction for a chat channel, determine the target chat channel corresponding to the display instruction, and obtain the historical chat cache record corresponding to the target chat channel from the server. The historical chat cache record includes a specified number of historical chat messages, and the historical chat messages are updated and stored on the server in the order of sending time.
[0076] The real-time message display module 502 is used to provide the target chat channel in the graphical user interface and display the real-time chat messages of the target chat channel broadcast by the server in the target chat channel;
[0077] The activity information acquisition module 503 is used to acquire channel activity information that characterizes the activity level of the target chat channel;
[0078] The cache record output module 504 is used to output the historical chat messages in the historical chat cache record in the target chat channel if the channel activity information indicates that the target chat channel is currently inactive.
[0079] In one alternative embodiment, the device further includes:
[0080] The display instruction generation module is used to generate the display instruction for the chat channel in response to a game client login operation on the terminal device or a chat channel switching operation displayed in the graphical user interface.
[0081] In one optional embodiment, the cache record output module 504 is specifically used for:
[0082] If the channel activity information indicates that no real-time chat message has been received from the server within a preset time period, the historical chat cache record will be output in the target chat channel.
[0083] In one optional embodiment, the cache record output module 504 is specifically used for:
[0084] Obtain the local chat message identifier corresponding to the target chat channel and the historical chat message identifier extracted from the historical chat cache record;
[0085] The local chat message identifier is compared with the historical chat message identifier, and the historical chat messages that do not overlap with the local chat message identifier are output in the target chat channel according to the chronological order of the historical chat messages.
[0086] In one optional embodiment, the activity information acquisition module 503 is specifically used for:
[0087] Channel activity information, used to characterize the activity level of the target chat channel, is acquired according to a preset detection frequency.
[0088] Reference Figure 6 This diagram illustrates a structural block diagram of a chat message processing device provided in an embodiment of the present invention, which can be applied to a server and may specifically include the following modules:
[0089] The chat message receiving module 601 is used to receive real-time chat messages sent by at least one terminal device in a chat channel;
[0090] The cache record generation module 602 is used to update and store a specified number of real-time chat messages in the server based on the sending time order of the real-time chat messages, and generate historical chat cache records for the chat channel;
[0091] The chat message sending module 603 is used to respond to a chat channel display request sent by a target terminal device, determine the target chat channel corresponding to the chat channel display request, and send the historical chat cache record corresponding to the target chat channel to the target terminal device, so that when the target chat channel is inactive, the target terminal device can simulate at least some game characters chatting in the target chat channel by outputting historical chat messages in the historical chat cache record in the target chat channel.
[0092] The chat channel display request is generated in response to a game client login operation on the target terminal device or a chat channel switching operation on the target terminal device.
[0093] In one alternative embodiment, the device further includes:
[0094] The real-time chat message sending module is used to broadcast the real-time chat messages to the terminal devices corresponding to the currently online clients in the order of their sending time, so that the terminal devices corresponding to the currently online clients can output the real-time chat messages in the chat channel.
[0095] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0096] In addition, this invention also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described chat message processing method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0097] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described chat message processing method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0098] Figure 7 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.
[0099] The electronic device 700 includes, but is not limited to, components such as: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, a processor 710, and a power supply 711. Those skilled in the art will understand that... Figure 7 The electronic device structures shown are not intended to limit the electronic device. An electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements. In embodiments of the invention, the electronic device includes, but is not limited to, mobile phones, tablets, laptops, PDAs, in-vehicle terminals, wearable devices, and pedometers.
[0100] It should be understood that, in this embodiment of the invention, the radio frequency unit 701 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink data from the base station and processes it with the processor 710; additionally, it transmits uplink data to the base station. Typically, the radio frequency unit 701 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, etc. Furthermore, the radio frequency unit 701 can also communicate with networks and other devices through a wireless communication system.
[0101] Electronic devices provide users with wireless broadband internet access through network module 702, such as helping users send and receive emails, browse web pages, and access streaming media.
[0102] The audio output unit 703 can convert audio data received by the radio frequency unit 701 or the network module 702 or stored in the memory 709 into audio signals and output them as sound. Furthermore, the audio output unit 703 can also provide audio output related to specific functions performed by the electronic device 700 (e.g., call signal reception sound, message reception sound, etc.). The audio output unit 703 includes a speaker, a buzzer, and a receiver, etc.
[0103] Input unit 704 is used to receive audio or video signals. Input unit 704 may include a graphics processing unit (GPU) 7041 and a microphone 7042. The GPU 7041 processes image data of still images or videos acquired by an image capture device (such as a camera) in video capture mode or image capture mode. The processed image frames can be displayed on display unit 706. The image frames processed by GPU 7041 can be stored in memory 709 (or other storage medium) or transmitted via radio frequency unit 701 or network module 702. Microphone 7042 can receive sound and process such sound into audio data. The processed audio data can be converted into a format that can be transmitted to a mobile communication base station via radio frequency unit 701 in telephone call mode.
[0104] The electronic device 700 also includes at least one sensor 705, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 7061 according to the ambient light level, and the proximity sensor can turn off the display panel 7061 and / or backlight when the electronic device 700 is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used to identify the posture of the electronic device (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. The sensor 705 may also include a fingerprint sensor, pressure sensor, iris sensor, molecular sensor, gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc., which will not be described in detail here.
[0105] The display unit 706 is used to display information input by the user or information provided to the user. The display unit 706 may include a display panel 7061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0106] User input unit 707 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of electronic devices. Specifically, user input unit 707 includes a touch panel 7071 and other input devices 7072. Touch panel 7071, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near touch panel 7071). Touch panel 7071 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 710, which receives and executes commands from the processor 710. In addition, touch panel 7071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. Besides touch panel 7071, user input unit 707 may also include other input devices 7072. Specifically, other input devices 7072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, joysticks, etc., which will not be described in detail here.
[0107] Furthermore, the touch panel 7071 can cover the display panel 7061. When the touch panel 7071 detects a touch operation on or near it, it transmits the information to the processor 710 to determine the type of touch event. Subsequently, the processor 710 provides corresponding visual output on the display panel 7061 based on the type of touch event. Although in Figure 7 In this embodiment, the touch panel 7071 and the display panel 7061 are two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 7071 and the display panel 7061 can be integrated to realize the input and output functions of the electronic device. The specific implementation is not limited here.
[0108] Interface unit 708 serves as an interface for connecting external devices to electronic device 700. For example, external devices may include a wired or wireless headphone port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, and so on. Interface unit 708 can be used to receive input from external devices (e.g., data, power, etc.) and transmit the received input to one or more components within electronic device 700, or it can be used to transmit data between electronic device 700 and external devices.
[0109] The memory 709 can be used to store software programs and various data. The memory 709 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory 709 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0110] The processor 710 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 709, and by calling data stored in the memory 709, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. The processor 710 may include one or more processing units; preferably, the processor 710 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 710.
[0111] The electronic device 700 may also include a power supply 711 (such as a battery) for supplying power to various components. Preferably, the power supply 711 is logically connected to the processor 710 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system.
[0112] In addition, the electronic device 700 includes some functional modules not shown, which will not be described in detail here.
[0113] It should be noted that, in this document, 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 a 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.
[0114] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0115] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.
[0116] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0117] Those skilled in the art will 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.
[0118] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0119] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0120] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0121] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0122] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for processing chat messages, characterized in that, The method of providing a graphical user interface via a terminal device includes: In response to a display command for a chat channel, a target chat channel corresponding to the display command is determined, and historical chat cache records corresponding to the target chat channel are obtained from the server. The historical chat cache records include a specified number of historical chat messages, and the historical chat messages are updated and stored on the server in the order of their sending time. The target chat channel is provided in the graphical user interface, and real-time chat messages broadcast by the server in the target chat channel are displayed within the target chat channel. Obtain channel activity information to characterize the activity level of the target chat channel; If the channel activity information indicates that the target chat channel is currently inactive, then the historical chat messages in the historical chat cache record are output in the target chat channel to simulate at least some game characters chatting in the target chat channel.
2. The method according to claim 1, characterized in that, Prior to the step of determining the target chat channel corresponding to the display instruction in response to the display instruction for the chat channel, the method further includes: In response to a game client login operation on the terminal device, or a switching operation on a chat channel displayed in the graphical user interface, the display instruction for the chat channel is generated.
3. The method according to claim 1, characterized in that, If the channel activity information indicates that the target chat channel is currently inactive, then the historical chat messages in the historical chat cache record are output in the target chat channel, including: If the channel activity information indicates that no real-time chat message has been received from the server within a preset time period, the historical chat cache record will be output in the target chat channel.
4. The method according to claim 1 or 2, characterized in that, The step of outputting the historical chat cache records in the target chat channel includes: Obtain the local chat message identifier corresponding to the target chat channel and the historical chat message identifier extracted from the historical chat cache record; The local chat message identifier is compared with the historical chat message identifier, and the historical chat messages that do not overlap with the local chat message identifier are output in the target chat channel according to the chronological order of the historical chat messages.
5. The method according to claim 1, characterized in that, The step of obtaining channel activity information to characterize the activity level of the target chat channel includes: Channel activity information, used to characterize the activity level of the target chat channel, is acquired according to a preset detection frequency.
6. A method for processing chat messages, characterized in that, Applied to the server side, including: Receive real-time chat messages sent by at least one terminal device in a chat channel; Based on the sending time sequence of the real-time chat messages, the server updates and stores a specified number of real-time chat messages to generate historical chat cache records for the chat channel; In response to a chat channel display request sent by a target terminal device, a target chat channel corresponding to the chat channel display request is determined, and a historical chat cache record corresponding to the target chat channel is sent to the target terminal device, so that when the target chat channel is inactive, the target terminal device can simulate at least some game characters chatting in the target chat channel by outputting historical chat messages in the historical chat cache record in the target chat channel. The chat channel display request is generated in response to a game client login operation on the target terminal device or a chat channel switching operation displayed on the target terminal device, to simulate at least some game characters chatting in the target chat channel.
7. The method according to claim 6, characterized in that, After receiving real-time chat messages sent by at least one terminal device in a chat channel, the method further includes: According to the sending time sequence of the real-time chat messages, the real-time chat messages are broadcast to the terminal devices corresponding to the currently online clients, so that the terminal devices corresponding to the currently online clients output the real-time chat messages in the chat channel.
8. A chat message processing device, characterized in that, Providing a graphical user interface via a terminal device includes: The cache record acquisition module is used to respond to a display instruction for a chat channel, determine the target chat channel corresponding to the display instruction, and obtain the historical chat cache record corresponding to the target chat channel from the server. The historical chat cache record includes a specified number of historical chat messages, and the historical chat messages are updated and stored on the server in the order of sending time. A real-time message display module is used to provide the target chat channel in the graphical user interface and display the real-time chat messages of the target chat channel broadcast by the server within the target chat channel; An activity information acquisition module is used to acquire channel activity information that characterizes the activity level of the target chat channel; The cache record output module is used to output the historical chat messages in the historical chat cache record in the target chat channel if the channel activity information indicates that the target chat channel is currently inactive. The device is also used to simulate at least some game characters chatting in a target chat channel.
9. A chat message processing device, characterized in that, include: The chat message receiving module is used to receive real-time chat messages sent by at least one terminal device in the chat channel; The cache record generation module is used to update and store a specified number of real-time chat messages on the server based on the sending time order of the real-time chat messages, and generate historical chat cache records for the chat channel. The chat message sending module is used to respond to a chat channel display request sent by a target terminal device, determine the target chat channel corresponding to the chat channel display request, and send the historical chat cache record corresponding to the target chat channel to the target terminal device, so that when the target chat channel is inactive, the target terminal device can simulate at least some game characters chatting in the target chat channel by outputting the historical chat messages in the historical chat cache record in the target chat channel. The chat channel display request is a chat channel display request generated in response to a game client login operation on the target terminal device or a chat channel switching operation displayed on the target terminal device. The device is also used to simulate at least some game characters chatting in a target chat channel.
10. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; The memory is used to store computer programs; When the processor executes a program stored in the memory, it implements the method as described in any one of claims 1-7.
11. A computer-readable storage medium having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Robot interaction method and device in communication group, storage medium and device
CN109873752A
Information processing method, device and equipment based on group chat and computer storage medium
CN114513480A
