WO2024037529A1 - 聊天消息的处理方法、装置、电子设备及存储介质 - Google Patents

聊天消息的处理方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2024037529A1
WO2024037529A1 PCT/CN2023/113074 CN2023113074W WO2024037529A1 WO 2024037529 A1 WO2024037529 A1 WO 2024037529A1 CN 2023113074 W CN2023113074 W CN 2023113074W WO 2024037529 A1 WO2024037529 A1 WO 2024037529A1
Authority
WO
WIPO (PCT)
Prior art keywords
chat
channel
target
historical
chat channel
Prior art date
Application number
PCT/CN2023/113074
Other languages
English (en)
French (fr)
Inventor
凃益民
王子辉
李兆冕
Original Assignee
网易(杭州)网络有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 网易(杭州)网络有限公司 filed Critical 网易(杭州)网络有限公司
Publication of WO2024037529A1 publication Critical patent/WO2024037529A1/zh

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/79Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/85Providing additional services to players
    • A63F13/87Communicating with other players during game play, e.g. by e-mail or chat
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]

Definitions

  • the present disclosure relates to the field of computer communication technology, and in particular, to a chat message processing method, a chat message processing device, an electronic device, and a computer-readable storage medium.
  • chat system is a communication platform provided for players to communicate in game applications.
  • the chat system can include different chat channels, including but not limited to chat channels common to the whole server, country/region sub-channels and other chat channel lines.
  • Players You can choose several designated sub-channels for communication according to your own needs.
  • chat system players can send chat text through physical keyboards, virtual keyboards, microphones, and selected emoticons. After the chat text is forwarded by the server, it is broadcast to other clients for content display. During this process, when the player is offline, the displayed chat content cannot be seen after the player comes online.
  • the game client only supports the display of active chat content when the player is online. In this regard, it is easy for players to log in to the client and there are no chat records in the corresponding chat channels, or some chat channels have poor activity and no one speaks, which reduces the interaction between different players. In addition, poor player interactivity will also lead to a decrease in user stickiness of the game, a high device idling rate, and a reduction in the utilization of computing resources.
  • Embodiments of the present disclosure provide a chat message processing method, device, electronic device and computer-readable storage medium to solve or partially solve the problem of low player chat activity in the game chat channel, resulting in weak interaction between players and The problem of poor gaming experience.
  • the embodiment of the present disclosure discloses a method for processing chat messages, which provides a graphical user interface through a terminal device.
  • the method includes:
  • the target chat channel In response to the display instruction for the 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, where the historical chat cache record includes the indicator A certain number of historical chat messages, which are updated and stored in the server in order of sending time;
  • the historical chat messages in the historical chat cache record are output in the target chat channel.
  • This disclosed embodiment discloses a chat message processing method, which is applied to the server and includes:
  • the target terminal device 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 the When the target chat channel is inactive, the target terminal device simulates at least some game characters in the target chat channel by outputting historical chat messages in the historical chat cache record in the target chat channel. Have a chat;
  • the chat channel display request is a chat channel display request generated in response to a game client login operation for the target terminal device, or a switching operation for a chat channel displayed in the target terminal device.
  • the embodiment of the present disclosure discloses a chat message processing device that provides a graphical user interface through a terminal device.
  • the device includes:
  • the cache record acquisition module is configured to respond to the display instruction for the 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
  • the record includes a specified number of historical chat messages, and the historical chat messages are updated and stored in the server in order of sending time;
  • a real-time message display module configured 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;
  • An activity information acquisition module configured to acquire channel activity information used to characterize the activity level of the target chat channel
  • the cache record output module is configured so 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.
  • the embodiment of the present disclosure discloses a chat message processing device, which includes:
  • a chat message receiving module configured to receive real-time chat messages sent by at least one terminal device in the chat channel
  • a cache record generation module configured to update and store a specified number of real-time chat messages in the server based on the sending time sequence of the real-time chat messages, and generate historical chat cache records for the chat channel;
  • the chat message sending module is configured to respond to a 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
  • the target terminal device is configured to simulate at least part of the game character by outputting historical chat messages in the historical chat cache record in the target chat channel when the target chat channel is inactive. Chat in said target chat channel;
  • the chat channel display request is a chat channel display request generated in response to a game client login operation for the target terminal device, or a switching operation for a chat channel displayed in the target terminal device.
  • An embodiment of the present disclosure 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 complete communication with each other through the communication bus;
  • the memory is configured to store computer programs
  • the processor is configured to implement the method described in the embodiment of the present disclosure when executing a program stored in the memory.
  • An embodiment of the present disclosure also discloses a computer-readable storage medium on which instructions are stored, which when executed by one or more processors, cause the processor to perform the method described in the embodiment of the present disclosure.
  • the game client can respond to the display instruction for the chat channel, determine the target chat channel corresponding to the display instruction, and obtain the target chat channel from the server.
  • historical chat cache records include a specified number of historical chat messages, historical chat messages are updated and stored on the server in order of sending time; the target chat channel is provided in the graphical user interface, and the server is displayed in the target chat channel Broadcast the real-time chat message of the target chat channel; obtain the channel activity information used to represent the activity level of the target chat channel.
  • the channel activity information indicates that the target chat channel is currently inactive
  • cache the history in the historical chat record in the target chat channel Chat messages are output, so that for game chat Tian channel, when it is detected that the chat channel is inactive, obtains the historical chat cache record of the corresponding chat channel from the server and outputs it to the chat channel.
  • it can facilitate players to check historical chat messages and participate in the corresponding chat channel.
  • it can improve the interaction between players.
  • it can create an active atmosphere in the chat scene and improve the activity of chat by outputting historical chat cache records.
  • it can enhance the interaction between players, thus It enhances the user stickiness of the game, reduces the idling rate of the device, and thereby improves the utilization of computing resources.
  • Figure 1 is a step flow chart of a chat message processing method provided in an embodiment of the present disclosure
  • Figure 2 is a schematic flowchart of chat message synchronization provided in an embodiment of the present disclosure
  • Figure 3 is a schematic flowchart of chat message synchronization provided in an embodiment of the present disclosure
  • Figure 4 is a step flow chart of a chat message processing method provided in an embodiment of the present disclosure
  • Figure 5 is a structural block diagram of a chat message processing device provided in an embodiment of the present disclosure.
  • Figure 6 is a structural block diagram of a chat message processing device provided in an embodiment of the present disclosure.
  • FIG. 7 is a block diagram of an electronic device provided in an embodiment of the present disclosure.
  • the game's chat system may include several different chat channels, and players can select the corresponding chat channel to communicate with the corresponding player group according to their own game needs.
  • players can send chat text through physical keyboards, virtual keyboards, microphones, and selected emoticons.
  • the chat text is forwarded by the server, it is broadcast to other clients for content display.
  • the corresponding chat message will not be received, and after the player comes online, the chat messages before the online time point cannot be viewed, resulting in that there may be no chat in the corresponding chat channel in the game client. Due to poor activity in messages or some chat channels, no one is speaking, which reduces the interaction between different players.
  • one of the core inventions of the present disclosure is that when a player goes online or switches chat channels during the game, the game client can obtain the historical chat cache record corresponding to the target chat channel currently selected by the player, and perform operations on the target chat channel.
  • Activity detection when it is detected that the activity of the target chat channel is low, the historical chat messages in the historical chat cache record can be output to the target chat channel, so that for the game chat channel in the game client,
  • the chat channel is inactive, the historical chat cache record of the corresponding chat channel is obtained from the server and output to the chat channel.
  • it can create an active atmosphere in the chat scene and improve the activity of chat by outputting historical chat cache records.
  • it can enhance the interaction between players. Interactivity, thereby enhancing the user stickiness of the game, reducing the idling rate of the device, and thereby improving the utilization of computing resources.
  • FIG. 1 a step flow chart of a chat message processing method provided in an embodiment of the present disclosure. It is applied to a game client and may specifically include the following steps:
  • 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, where the historical chat cache record includes a specified number historical chat messages, which are updated and stored in the server in the order of sending time;
  • embodiments of the present disclosure can be applied to terminal devices, in which corresponding applications can be run, and corresponding game interfaces are displayed through the graphical user interface of the terminal devices, so that players can execute corresponding games in the game interface. operate.
  • the terminal device can be a desktop computer, a laptop computer, a tablet computer, a mobile terminal and other devices
  • the application program can be a program that can provide a multi-channel chat function, such as a game application, a game applet, etc.
  • the terminal device is a mobile terminal
  • a game application i.e., a game client, hereinafter referred to as a game client
  • the game application provides a multi-channel chat function as an example for illustration. , it can be understood that this disclosure does not limit this.
  • players can log in to corresponding game accounts in the game client to perform corresponding game operations, such as online communication with other players through the chat system of the game client.
  • the chat system on the game client can include several chat channels. Different chat channels can correspond to different player groups in the game.
  • the server can provide chat message broadcasts to the terminal devices corresponding to the player characters who join a certain chat channel. Services, for example, the chat system can include world channels, regional channels, server channels, sect channels, gang channels, career channels, etc.
  • the player group corresponding to the world channel can be all players in the game; the player group corresponding to the regional channel can are players in a certain region/game map; the player group corresponding to the server channel can be players in a certain server; the player group corresponding to the sect channel can be players in a certain sect in the game; the player group corresponding to the gang channel can be They are players in a certain gang in the game; the player group corresponding to the professional channel can be players in a certain profession in the game, etc.
  • the above-mentioned players can communicate in the corresponding chat channel when they are online.
  • the game client can respond to the display instruction for the 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.
  • players can only enter corresponding content (such as text messages, expressions, voice messages, etc.) in one chat channel at the same time to communicate with other players in the same chat channel.
  • corresponding content such as text messages, expressions, voice messages, etc.
  • the historical chat cache record may include a specified number of historical chat messages in a specified chat channel
  • the server may update and store the historical chat messages in the server in the order in which the historical chat messages are sent.
  • the server can obtain the corresponding chat messages sent by different terminal devices in real time during the game.
  • the chat message of the channel is stored in the message pool corresponding to the chat channel according to the sending time point corresponding to the chat message, and the historical chat cache record corresponding to the chat channel is obtained.
  • chat channels such as world channel, regional channel, server channel, sect channel, gang channel, and professional channel
  • the server can receive the world message pool corresponding to the world channel.
  • Chat messages sent by different clients on the world channel are stored in the world message pool in sequence according to the order of the sending time points of each chat message, and the historical chat cache records corresponding to the world channel are obtained.
  • the server can also broadcast chat messages in real time to other clients besides the client that sent the chat message.
  • the message pool it can be an active and real-time updated data pool.
  • the server can according to the preset storage quantity and the time point corresponding to the stored chat messages. When the upper limit of the storage quantity is reached, the server can Delete the chat message with the earliest time point from the message pool to ensure the timeliness of the chat messages in the message pool.
  • the historical chat cache records can be 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.
  • the game client determines the selected target chat channel, it can generate a corresponding chat channel display request, and send the chat channel display request to the server to obtain the corresponding historical chat cache record, then the server can In response to the chat channel display request sent by the client, 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 the target terminal device does not display the target chat channel in the target chat channel.
  • 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 terminal may generate a display instruction for the chat channel in response to a game client login operation for the terminal device or a switching operation for the chat channel displayed in the graphical user interface.
  • the terminal may respond to an account login instruction for the client, determine the target chat channel currently selected in the chat interface of the client after successful login, and generate a display instruction corresponding to the target chat channel and a corresponding chat channel display.
  • the terminal can respond to the chat channel selection instruction for the client and determine the chat channel selection instruction.
  • Corresponding target chat channel and generate a display instruction corresponding to the target chat channel and a corresponding chat channel display request, 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, Therefore, during the game, when the player switches chat channels, the game client can obtain the corresponding historical chat cache records in order to determine whether to output the historical chat cache records to the chat channel, and then by when the player just logs in or switches chat channels, etc.
  • When entering the chat channel obtain the corresponding historical chat cache record from the server in order to determine whether to output the corresponding historical chat cache record in the chat channel.
  • Step 102 Provide the target chat channel in the graphical user interface, and place the target chat channel in the target chat channel. Display the real-time chat message of the target chat channel broadcast by the server;
  • the terminal After entering the chat channel, the terminal can display the target chat channel in the game client displayed in the graphical user interface, so that the player can input corresponding chat messages in the target chat channel to communicate with other players located in the target chat channel,
  • 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 the target Players in the chat channel can interact and communicate through chat messages.
  • Step 103 Obtain channel activity information used to characterize the activity level of the target chat channel
  • the game client can monitor the channel activity information of the chat channel in real time.
  • the channel activity information can be information set to represent the activity level of the chat channel. For example, it can be the number of chat messages in the chat channel. , the greater the number, the more active the chat channel, the smaller the number, the less active the chat channel; it can also be whether there are new chat messages sent by other players in the chat channel, if so, the chat channel is active, if not, then The chat channel is inactive, etc. This disclosure does not limit this.
  • the terminal can obtain the channel activity information used to characterize the activity of the target chat channel according to a preset detection frequency, for example, obtain the channel activity information set to characterize the activity of the target chat channel once every 1 minute, or every Channel activity information set to represent the activity of the target chat channel is obtained every 3 minutes, channel activity information set to represent the activity of the target chat channel is obtained every 5 minutes, etc.
  • a preset detection frequency for example, obtain the channel activity information set to characterize the activity of the target chat channel once every 1 minute, or every Channel activity information set to represent the activity of the target chat channel is obtained every 3 minutes, channel activity information set to represent the activity of the target chat channel is obtained every 5 minutes, etc. This disclosure does not limit this.
  • Step 104 If the channel activity information indicates that the target chat channel is currently inactive, output the historical chat messages in the historical chat cache record in the target chat channel.
  • the game client can output historical chat cache records in the target chat channel; if the channel activity information indicates that real-time chat messages sent by the server are received, that is, there are currently new chat messages sent by other players in the target chat channel, and the target chat channel is determined to be active, then The game client can output real-time chat messages in the target chat channel in chronological order, so that for the game chat channel, when the chat channel is detected to be inactive, the historical chat cache record of the corresponding chat channel is obtained from the server.
  • chat channel On the one hand, it can facilitate players to check historical chat messages, participate in the corresponding chat topics, and improve the interaction between players. On the other hand, it can create an active atmosphere in the chat scene by outputting historical chat cache records. , improve the activity of chat; on the other hand, it can enhance the interaction between players, thereby enhancing the user stickiness of the game, reducing the idling rate of the device, and thus improving the utilization of computing resources.
  • the historical chat cache record can include several historical chat messages posted by other game players in the target chat channel.
  • the game client After the game client obtains the historical chat cache record corresponding to the target chat channel from the server, it can cache it to Locally, and obtain the current chat message output in the target chat channel, and then obtain the local chat message identifier corresponding to the target chat channel and extract the historical chat message identifier of the historical chat message from the historical chat cache record, and identify the local chat message Compare with historical chat message identifiers, and follow the historical chat Historical chat messages that do not overlap with local chat message identifiers are output in the target chat channel in the order of time corresponding to daily messages.
  • the server can configure a corresponding chat message identifier for each chat message to identify a unique chat message, and when broadcasting the chat message to the corresponding terminal device, the terminal device will The message identifier is stored so that when the chat channel is inactive, the terminal can extract the historical chat message identifier corresponding to each historical chat message from the historical chat cache record based on the historical chat cache record obtained from the server, and store the historical chat message identifier respectively. It is compared with the locally stored local chat message identifier to determine whether the same chat message identifier exists. For the local chat message identifier, it can be the chat message identifier corresponding to the chat message that the local client has output in the chat channel.
  • the historical chat messages that have not been output previously can be filtered out from the historical chat cache records through the chat message identifier, so that they can be output to the corresponding chat channel, so that the verification process of the chat messages can be sent to the client, so that
  • the server only performs identification configuration, storage, update and sending of chat messages, which can greatly reduce the performance overhead of the server and improve the operating efficiency of the server.
  • historical chat messages that are not duplicates of the chat messages currently output by the target chat channel can be output to the target chat channel one by one according to chronological order, or several historical chat messages can be output at one time. etc., so that when the game client detects the need to publish historical chat cache records, it can customize the release of historical chat cache records according to the preset publishing method.
  • the server 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 receiving the real-time chat message for the chat channel and follow the real-time chat message. The corresponding time sequence is broadcast to the terminal device corresponding to the online client.
  • the game client When each online client receives a real-time chat message for a certain chat channel, if the player currently selects the chat channel, the game client can immediately output The live chat message.
  • chat messages can be chat messages stored in the message pool corresponding to the chat channel.
  • chat messages sent by the game client to the server in real time.
  • the server can While sending the real-time chat message to the online client, it is stored in the corresponding message pool as a historical chat message to build a historical chat cache record corresponding to the corresponding chat channel.
  • FIG. 2 a schematic flow chart of chat message synchronization provided in an embodiment of the present disclosure is shown.
  • the game client can The server side obtains the historical chat cache record corresponding to the target chat channel, and then detects whether there are new chat messages in the target chat channel within the preset time period (such as 5 seconds, 10 seconds, etc.). If so, the target chat channel is The corresponding chat message is output in the channel; if not, the historical chat cache record is output to the target chat according to the corresponding output method.
  • the preset time period such as 5 seconds, 10 seconds, etc.
  • FIG. 3 a schematic flow chart of chat message synchronization provided in the embodiment of the present disclosure is shown.
  • the game client can direct to the server to obtain the target.
  • the historical chat cache record corresponding to the chat channel can then be used to detect whether there are new chat messages in the target chat channel within the preset time period (such as 5 seconds, 10 seconds, etc.). If so, the corresponding chat message will be output in the target chat channel.
  • Outputting corresponding historical chat messages can, on the one hand, facilitate players to check historical chat messages, participate in corresponding chat topics, and improve interaction between players. On the other hand, it can create an active atmosphere in the chat scene by outputting historical chat cache records. , improve the activity of chat; on the other hand, it can enhance the interaction between players, thereby enhancing the user stickiness of the game, reducing the idling rate of the device, and thus improving the utilization of computing resources.
  • the game client can respond to the display instruction for the chat channel, determine the target chat channel corresponding to the display instruction, and obtain the target chat channel from the server.
  • historical chat cache records include a specified number of historical chat messages, historical chat messages are updated and stored on the server in order of sending time; the target chat channel is provided in the graphical user interface, and the server is displayed in the target chat channel Broadcast the real-time chat message of the target chat channel; obtain the channel activity information used to represent the activity level of the target chat channel.
  • the channel activity information indicates that the target chat channel is currently inactive
  • cache the history in the historical chat record in the target chat channel Chat messages are output, so that for the game chat channel, when the chat channel is detected to be inactive, the historical chat cache record of the corresponding chat channel is obtained from the server and output to the chat channel.
  • it can be convenient for players to check Historical chat messages are involved in the corresponding chat topics to improve the interactivity between players.
  • by outputting historical chat cache records it creates an active atmosphere in the chat scene and improves the activity of the chat; on the other hand, it can enhance The interaction between players enhances the user stickiness of the game, reduces the idling rate of the device, and thereby improves the utilization of computing resources.
  • FIG. 4 a step flow chart of a chat message processing method provided in an embodiment of the present disclosure is shown. It is applied to the server and may specifically include the following steps:
  • Step 401 Receive a real-time chat message sent by at least one terminal device in the chat channel;
  • Step 401 Based on the sending time sequence of the real-time chat messages, update and store a specified number of real-time chat messages in the server, and generate a historical chat cache record for the chat channel;
  • Step 401 In response to the chat channel display request sent by the target terminal device, determine the content of the chat channel display. The target chat channel corresponding to the request is displayed, and the historical chat cache record corresponding to the target chat channel is sent to the target terminal device, so that the target terminal device passes the request when the target chat channel is inactive. Output historical chat messages in the historical chat cache record in the target chat channel to simulate at least some game characters chatting 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 for the target terminal device, or a switching operation for a chat channel displayed in the target terminal device.
  • the method after receiving the real-time chat message sent by at least one terminal device in the chat channel, the method further includes:
  • the real-time chat message is broadcast to the terminal device corresponding to the current online client, so that the terminal device corresponding to the current online client outputs all the messages in the chat channel. Describe real-time chat messages.
  • the server can receive real-time chat messages sent by at least one terminal device in the chat channel, and based on the sending time sequence of the real-time chat messages, in the server Update and store a specified number of real-time chat messages, and generate a historical chat cache record for the chat channel.
  • the server can respond to the chat channel display request sent by the target terminal device and determine the relationship with the chat channel.
  • the chat channel displays the target chat channel corresponding to the request, and sends the historical chat cache record corresponding to the target chat channel to the target terminal device, so that the target terminal device caches the historical chat in the target chat channel when the target chat channel is inactive.
  • the historical chat messages in the record are output to simulate at least some game characters chatting in the target chat channel, so that for the game chat channel, when the chat channel is detected to be inactive, the client can obtain the corresponding chat from the server
  • the historical chat cache records of the channel are output to the chat channel.
  • by outputting the historical chat cache records Create an active atmosphere in the chat scene and improve the activity of the chat; on the other hand, it can enhance the interaction between players, thereby enhancing the user stickiness of the game, reducing the idling rate of the device, and thus improving the utilization of computing resources.
  • a graphical user interface is provided through a terminal device, and may specifically include the following modules:
  • the cache record acquisition module 501 is configured to respond to the display instruction for the chat channel, determine the Instruct the corresponding target chat channel, 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 in the order of sending time.
  • the real-time message display module 502 is configured 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;
  • the activity information acquisition module 503 is configured to obtain channel activity information used to characterize the activity level of the target chat channel
  • the cache record output module 504 is configured 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.
  • the device further includes:
  • the display instruction generation module is configured to generate the display instruction for the chat channel in response to a game client login operation for the terminal device or a switching operation for the chat channel displayed in the graphical user interface.
  • the cache record output module 504 is specifically configured to:
  • the historical chat cache record is output in the target chat channel.
  • the cache record output module 504 is specifically configured to:
  • the activity information acquisition module 503 is specifically configured as:
  • Channel activity information used to characterize the activity level of the target chat channel is obtained according to a preset detection frequency.
  • FIG. 6 there is shown a structural block diagram of a chat message processing device provided in an embodiment of the present disclosure, which can be applied to the server, and specifically can include the following modules:
  • the chat message receiving module 601 is configured to receive real-time chat messages sent by at least one terminal device in the chat channel;
  • the cache record generation module 602 is configured to update and store a specified number of real-time chat messages in the server based on the sending time sequence of the real-time chat messages, and generate historical chat cache records for the chat channel;
  • the chat message sending module 603 is configured to respond to a 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 chat channel display request.
  • the target terminal device is configured to output historical chat messages in the historical chat cache record in the target chat channel when the target chat channel is inactive, To simulate at least some game characters chatting 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 for the target terminal device, or a switching operation for a chat channel displayed in the target terminal device.
  • the device further includes:
  • the real-time chat message sending module is configured to broadcast the real-time chat message to the terminal device corresponding to the current online client according to the sending time sequence of the real-time chat message, so that the terminal device corresponding to the current online client
  • the real-time chat message is output in the chat channel.
  • the description is relatively simple. For relevant details, please refer to the partial description of the method embodiment.
  • embodiments of the present disclosure also provide an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor.
  • a computer program stored in the memory and executable on the processor.
  • the above chat message processing is implemented.
  • Embodiments of the present disclosure also provide a computer-readable storage medium.
  • a computer program is stored on the computer-readable storage medium.
  • the computer program is executed by a processor, each process of the above chat message processing method embodiment is implemented, and the same can be achieved. The technical effects will not be repeated here to avoid repetition.
  • the computer-readable storage medium is such as read-only memory (ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
  • a graphical user interface can be provided through a terminal device.
  • the method includes: in response to a display instruction for a chat channel, determining a target chat channel corresponding to the display instruction, and obtaining the service from the service.
  • the client obtains the historical chat cache record corresponding to the target chat channel, the historical chat cache record includes a specified number of historical chat messages, and the historical chat messages are updated and stored in the server in the order of sending time; in the graphical user
  • the interface provides the target chat channel, and displays the real-time chat message of the target chat channel broadcast by the server in the target chat channel; obtains channel activity information used to represent the activity level of the target chat channel; if If the channel activity information indicates that the target chat channel is currently inactive, the historical chat messages in the historical chat cache record are output in the target chat channel.
  • the method before 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: responding to the display instruction for the terminal device.
  • the display instruction for the chat channel is generated during a game client login operation or a switching operation for a chat channel displayed in the graphical user interface.
  • 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 sent by the server is received within a preset time period, then the Output the historical chat cache record in the target chat channel.
  • outputting the historical chat cache record in the target chat channel includes: obtaining a local chat message identifier corresponding to the target chat channel and extracting the historical chat cache record from the target chat channel. Extract the historical chat message identifier of the historical chat message; compare the local chat message identifier with the historical chat message identifier, and output it in the target chat channel according to the time sequence corresponding to the historical chat message Historical chat messages that are not duplicated with the local chat message identifier.
  • the obtaining the channel activity information used to characterize the activity level of the target chat channel includes: obtaining the channel activity information used to characterize the activity level of the target chat channel according to a preset detection frequency.
  • real-time chat messages sent by at least one terminal device in the chat channel can be received; based on the sending time sequence of the real-time chat messages, a specified number of messages are updated and stored in the server Real-time chat messages, generating historical chat cache records for the chat channel; in response to the chat channel display request sent by the target terminal device, determining the target chat channel corresponding to the chat channel display request, and corresponding to the target chat channel
  • the historical chat cache records are sent to the target terminal device, so that when the target chat channel is inactive, the target terminal device can cache historical chat messages in the historical chat records in the target chat channel.
  • Output is performed to simulate at least some game characters chatting in the target chat channel; wherein the chat channel display request is in response to a game client login operation for the target terminal device, or for the target terminal device The chat channel switching operation shown in , the generated chat channel display request.
  • the method further includes: sending the real-time chat message according to the sending time sequence of the real-time chat message. Broadcast to the terminal device corresponding to the current online client, so that the terminal device corresponding to the current online client outputs the real-time chat message in the chat channel.
  • the computer-readable storage medium provided by the embodiments of the present disclosure can be applied to a game client.
  • the game client can respond to the display instruction for the chat channel, determine the target chat channel corresponding to the display instruction, and obtain the target chat channel from the service.
  • the client obtains the historical chat cache record corresponding to the target chat channel.
  • the historical chat cache record includes a specified number of historical chat messages.
  • the historical chat messages are updated and stored on the server in the order of sending time; the target chat channel is provided in the graphical user interface, and in the target chat
  • the real-time chat messages of the target chat channel broadcast by the server are displayed in the channel; channel activity information used to represent the activity level of the target chat channel is obtained.
  • the channel activity information indicates that the target chat channel is currently inactive
  • historical chats are displayed in the target chat channel.
  • the historical chat messages in the cache record are output, so that for the game chat channel, when the chat channel is detected to be inactive, the historical chat cache record of the corresponding chat channel is obtained from the server and output to the chat channel.
  • it can facilitate players to check historical chat messages, participate in corresponding chat topics, and improve the interaction between players.
  • by outputting historical chat cache records it creates an active atmosphere in the chat scene and improves the activity of the chat;
  • it can enhance the interaction between players, thereby enhancing the user stickiness of the game, reducing the idling rate of the device, and thus improving the computing efficiency. Calculate resource utilization.
  • FIG. 7 is a schematic diagram of the hardware structure of an electronic device that implements various embodiments of the present disclosure.
  • the electronic device 700 includes but is not limited to: radio frequency unit 701, network module 702, audio output unit 703, input unit 704, sensor 705, display unit 706, user input unit 707, interface unit 708, memory 709, processor 710, and Power supply 711 and other components.
  • the electronic device may include more or fewer components than shown in the figure, or some components may be combined, or different components may be used. layout.
  • electronic devices include but are not limited to mobile phones, tablet computers, notebook computers, PDAs, vehicle-mounted terminals, wearable devices, and pedometers.
  • the radio frequency unit 701 can be configured to receive and send information or signals during a call. Specifically, after receiving downlink data from the base station, it is processed by the processor 710; in addition, Send uplink data to the base station.
  • the radio frequency unit 701 includes, but is not limited to, an antenna, at least one amplifier, transceiver, coupler, low noise amplifier, duplexer, etc.
  • the radio frequency unit 701 can also communicate with the network and other devices through a wireless communication system.
  • the electronic device provides users with wireless broadband Internet access through the network module 702, such as helping users send and receive emails, browse web pages, and access streaming media.
  • the audio output unit 703 may convert the audio data received by the radio frequency unit 701 or the network module 702 or stored in the memory 709 into an audio signal and output it as a sound. Furthermore, the audio output unit 703 may also provide audio output related to a specific function performed by the electronic device 700 (eg, call signal reception sound, message reception sound, etc.).
  • the audio output unit 703 includes a speaker, a buzzer, a receiver, and the like.
  • the input unit 704 is arranged to receive audio or video signals.
  • the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042.
  • the graphics processor 7041 processes still pictures or video images obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The data is processed.
  • the processed image frames may be displayed on the display unit 706.
  • the image frames processed by the graphics processor 7041 may be stored in the memory 709 (or other storage media) or sent via the radio frequency unit 701 or the network module 702.
  • Microphone 7042 can receive sounds and can process such sounds into audio data.
  • the processed audio data can be converted into a format that can be sent to a mobile communication base station via the radio frequency unit 701 for output in a phone call mode.
  • Electronic device 700 also includes at least one sensor 705, such as a light sensor, a motion sensor, and other sensors.
  • 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 brightness of the ambient light.
  • the proximity sensor can close the display panel 7061 when the electronic device 700 moves to the ear. /or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three axes). It can detect the magnitude and direction of gravity when stationary.
  • the sensor 705 may also include a fingerprint sensor, a pressure sensor, an iris sensor, Molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. will not be described in detail here.
  • the display unit 706 is configured 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.
  • LCD Liquid Crystal Display
  • OLED Organic Light-Emitting Diode
  • the user input unit 707 may be configured to receive input numeric or character information and generate key signal input related to user settings and function control of the electronic device.
  • the user input unit 707 includes a touch panel 7071 and other input devices 7072.
  • the touch panel 7071 also known as a touch screen, can collect the user's touch operations on or near the touch panel 7071 (for example, the user uses a finger, stylus, or any suitable object or accessory on or near the touch panel 7071 operate).
  • the touch panel 7071 may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact point coordinates, and then sends it to the touch controller.
  • the touch panel 7071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave.
  • the user input unit 707 may also include other input devices 7072.
  • other input devices 7072 may include but are not limited to physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be described again here.
  • the touch panel 7071 can be covered on the display panel 7061.
  • the touch panel 7071 detects a touch operation on or near it, it is sent to the processor 710 to determine the type of touch event. Then the processor 710 determines the type of touch event according to the touch. The type of event provides corresponding visual output on display panel 7061.
  • the touch panel 7071 and the display panel 7061 are used as two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 7071 and the display panel 7061 can be integrated. The implementation of input and output functions of electronic equipment is not limited here.
  • the interface unit 708 is an interface for connecting external devices to the electronic device 700 .
  • the external device may include a wired or wireless headphone port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port configured to connect a device with an identification module, audio input/output (I/O) port, video I/O port, headphone port, etc.
  • the interface unit 708 may be configured to receive input (eg, data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic device 700 or may be configured to interface between the electronic device 700 and the external device 700 . Transfer data between devices.
  • Memory 709 may be configured to store software programs as well as various data.
  • the memory 709 may mainly include a storage program area and a storage data area, wherein the storage program area may store the operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may store data based on Data created by the use of mobile phones (such as audio data, phone books, etc.), etc.
  • memory 709 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
  • the processor 710 is the control center of the electronic device, using various interfaces and lines to connect various parts of the entire electronic device, by running or executing software programs and/or modules stored in the memory 709, and calling data stored in the memory 709 , perform various functions of the electronic device and process data, thereby overall monitoring 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, where the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor The processor primarily handles wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 710.
  • the electronic device 700 may also include a power supply 711 (such as a battery) that supplies power to various components.
  • a power supply 711 (such as a battery) that supplies power to various components.
  • the power supply 711 may be logically connected to the processor 710 through a power management system, thereby managing charging, discharging, and power consumption management through the power management system. and other functions.
  • a graphical user interface can be provided through a terminal device.
  • the method includes: in response to a display instruction for a chat channel, determining a target chat channel corresponding to the display instruction, and obtaining the said display instruction from the server.
  • Historical chat cache records corresponding to the target chat channel include a specified number of historical chat messages, and the historical chat messages are updated and stored in the server in order of sending time; provided in the graphical user interface Target chat channel, and display the real-time chat message of the target chat channel broadcast by the server in the target chat channel; obtain channel activity information used to represent the activity level of the target chat channel; if the channel is active If the information indicates that the target chat channel is currently inactive, the historical chat messages in the historical chat cache record are output in the target chat channel.
  • the method before 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: responding to the display instruction for the terminal device.
  • the display instruction for the chat channel is generated during a game client login operation or a switching operation for a chat channel displayed in the graphical user interface.
  • the method includes: if the channel activity information indicates that the target chat channel is currently inactive, the historical chat messages in the historical chat cache record are output in the target chat channel, The method includes: if the channel activity information indicates that no real-time chat message sent by the server is received within a preset time period, outputting the historical chat cache record in the target chat channel.
  • outputting the historical chat cache record in the target chat channel includes: obtaining a local chat message identifier corresponding to the target chat channel and extracting the historical chat cache record from the target chat channel. Extract the historical chat message identifier of the historical chat message; compare the local chat message identifier with the historical chat message identifier, and output it in the target chat channel according to the time sequence corresponding to the historical chat message Historical chat messages that are not duplicated with the local chat message identifier.
  • the obtaining the channel activity information used to characterize the activity level of the target chat channel includes: obtaining the channel activity information used to characterize the activity level of the target chat channel according to a preset detection frequency.
  • the computer-readable storage medium it is possible to receive at least one terminal device in the chat channel
  • the real-time chat messages sent based on the sending time sequence of the real-time chat messages, update and store a specified number of real-time chat messages in the server, and generate a historical chat cache record for the chat channel; in response to the target terminal device sending a chat channel display request, 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 the target terminal device can
  • the target chat channel is inactive, at least some game characters are simulated to chat in the target chat channel by outputting the historical chat messages in the historical chat cache record in the target chat channel;
  • the The chat channel display request is a chat channel display request generated in response to a game client login operation for the target terminal device, or a switching operation for a chat channel displayed in the target terminal device.
  • the method further includes: sending the real-time chat message according to the sending time sequence of the real-time chat message. Broadcast to the terminal device corresponding to the current online client, so that the terminal device corresponding to the current online client outputs the real-time chat message in the chat channel.
  • the electronic device provided by the embodiment of the present disclosure can be applied to a game client.
  • the game client can respond to the display instruction for the chat channel, determine the target chat channel corresponding to the display instruction, and obtain the target from the server.
  • the historical chat cache record includes a specified number of historical chat messages.
  • the historical chat messages are updated and stored on the server in the order of sending time; the target chat channel is provided in the graphical user interface and displayed in the target chat channel
  • the real-time chat message of the target chat channel broadcast by the server; obtain the channel activity information used to represent the activity level of the target chat channel. If the channel activity information indicates that the target chat channel is currently inactive, cache historical chat messages in the target chat channel.
  • the electronic device 700 includes some not-shown functional modules, which will not be described again here.
  • the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases The former is a better implementation.
  • the technical solution of the present disclosure can be embodied in the form of a software product in essence or that contributes to related technologies.
  • the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk). ), includes several instructions to cause a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of the present disclosure.
  • the disclosed devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in various embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present disclosure is essentially or the part that contributes to the relevant technology or the part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium and includes several The instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present disclosure.
  • the aforementioned storage media include: U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk and other media that can store program codes.

Abstract

一种聊天消息的处理方法、装置、电子设备(700)及存储介质,所述方法包括:响应于针对聊天频道的展示指令,确定与所述展示指令对应的目标聊天频道,并从服务端获取所述目标聊天频道对应的历史聊天缓存记录,所述历史聊天缓存记录包括指定数量的历史聊天消息,所述历史聊天消息按发送时间顺序更新存储于所述服务端(101);在所述图形用户界面提供所述目标聊天频道,并在所述目标聊天频道内展示所述服务端广播的所述目标聊天频道的实时聊天消息(102);获取用于表征所述目标聊天频道活跃程度的频道活跃信息(103);若所述频道活跃信息表征所述目标聊天频道当前不活跃,则在所述目标聊天频道中对所述历史聊天缓存记录中的历史聊天消息进行输出(104)。

Description

聊天消息的处理方法、装置、电子设备及存储介质
相关申请的交叉引用
本公开要求于2022年8月17日提交的申请号为202210987834.0、名称为“聊天消息的处理方法、装置、电子设备及存储介质”的中国专利申请的优先权,该中国专利申请的全部内容通过引用全部并入本文。
技术领域
本公开涉及计算机通信技术领域,特别是涉及一种聊天消息的处理方法、一种聊天消息的处理装置、一种电子设备以及一种计算机可读存储介质。
背景技术
随着游戏技术的发展,越来越多的人们通过游戏的方式放松身心。在游戏环境中,不同玩家之间可以通过互发消息进行聊天,也可以接收到游戏系统发送的通知。其中,聊天系统是游戏应用中提供给玩家进行沟通的交流平台,在聊天系统中可以包括不同的聊天频道,包括但不限于全服通用的聊天频道、国家/地区子频道等聊天频道线路,玩家可以根据自身的需求选择指定的若干个子频道进行沟通交流。
在聊天系统中,玩家可以通过物理键盘、虚拟键盘、麦克风以及选择表情等发送聊天文本,聊天文本经由服务端转发后,广播至其余客户端中进行内容展示。在该过程中,当玩家离线时,已经展示的聊天内容在玩家上线后并不能看到,游戏客户端仅支持玩家在线的情况下进行活跃聊天内容的展示。对此,容易出现玩家登陆客户端时相应的聊天频道中完全无聊天记录,或部分聊天频道由于活跃性较差,出现无人发言,降低了不同玩家之间的互动性。且玩家互动性差还会导致游戏的用户粘性下降,设备空转率高,降低了计算资源的利用率。
发明内容
本公开实施例是提供一种聊天消息的处理方法、装置、电子设备以及计算机可读存储介质,以解决或部分解决游戏中聊天频道存在玩家聊天活跃性低,导致玩家之间的互动性弱以及游戏体验差的问题。
本公开实施例公开了一种聊天消息的处理方法,通过终端设备提供图形用户界面,所述方法包括:
响应于针对聊天频道的展示指令,确定与所述展示指令对应的目标聊天频道,并从服务端获取所述目标聊天频道对应的历史聊天缓存记录,所述历史聊天缓存记录包括指 定数量的历史聊天消息,所述历史聊天消息按发送时间顺序更新存储于所述服务端;
在所述图形用户界面提供所述目标聊天频道,并在所述目标聊天频道内展示所述服务端广播的所述目标聊天频道的实时聊天消息;
获取用于表征所述目标聊天频道活跃程度的频道活跃信息;
若所述频道活跃信息表征所述目标聊天频道当前不活跃,则在所述目标聊天频道中对所述历史聊天缓存记录中的历史聊天消息进行输出。
本公开实施例公开了一种聊天消息的处理方法,应用于服务端,包括:
接收至少一个终端设备在聊天频道中发送的实时聊天消息;
基于所述实时聊天消息的发送时间顺序,在所述服务端中更新存储指定数量的实时聊天消息,生成针对所述聊天频道的历史聊天缓存记录;
响应于目标终端设备发送的聊天频道展示请求,确定与所述聊天频道展示请求对应的目标聊天频道,并将所述目标聊天频道对应的历史聊天缓存记录发送至所述目标终端设备,以使所述目标终端设备在所述目标聊天频道不活跃时,通过在所述目标聊天频道中对所述历史聊天缓存记录中的历史聊天消息进行输出,来模拟至少部分游戏角色在所述目标聊天频道中进行聊天;
其中,所述聊天频道展示请求为响应于针对所述目标终端设备的游戏客户端登录操作,或针对所述目标终端设备中所展示的聊天频道的切换操作,所生成的聊天频道展示请求。
本公开实施例公开了一种聊天消息的处理装置,通过终端设备提供图形用户界面,所述装置包括:
缓存记录获取模块,设置为响应于针对聊天频道的展示指令,确定与所述展示指令对应的目标聊天频道,并从服务端获取所述目标聊天频道对应的历史聊天缓存记录,所述历史聊天缓存记录包括指定数量的历史聊天消息,所述历史聊天消息按发送时间顺序更新存储于所述服务端;
实时消息展示模块,设置为在所述图形用户界面提供所述目标聊天频道,并在所述目标聊天频道内展示所述服务端广播的所述目标聊天频道的实时聊天消息;
活跃信息获取模块,设置为获取用于表征所述目标聊天频道活跃程度的频道活跃信息;
缓存记录输出模块,设置为若所述频道活跃信息表征所述目标聊天频道当前不活跃, 则在所述目标聊天频道中对所述历史聊天缓存记录中的历史聊天消息进行输出。
本公开实施例公开了一种聊天消息的处理装置,包括:
聊天消息接收模块,设置为接收至少一个终端设备在聊天频道中发送的实时聊天消息;
缓存记录生成模块,设置为基于所述实时聊天消息的发送时间顺序,在所述服务端中更新存储指定数量的实时聊天消息,生成针对所述聊天频道的历史聊天缓存记录;
聊天消息发送模块,设置为响应于目标终端设备发送的聊天频道展示请求,确定与所述聊天频道展示请求对应的目标聊天频道,并将所述目标聊天频道对应的历史聊天缓存记录发送至所述目标终端设备,以使所述目标终端设备在所述目标聊天频道不活跃时,通过在所述目标聊天频道中对所述历史聊天缓存记录中的历史聊天消息进行输出,来模拟至少部分游戏角色在所述目标聊天频道中进行聊天;
其中,所述聊天频道展示请求为响应于针对所述目标终端设备的游戏客户端登录操作,或针对所述目标终端设备中所展示的聊天频道的切换操作,所生成的聊天频道展示请求。
本公开实施例还公开了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,所述处理器、所述通信接口以及所述存储器通过所述通信总线完成相互间的通信;
所述存储器,设置为存放计算机程序;
所述处理器,设置为执行存储器上所存放的程序时,实现如本公开实施例所述的方法。
本公开实施例还公开了一种计算机可读存储介质,其上存储有指令,当由一个或多个处理器执行时,使得所述处理器执行如本公开实施例所述的方法。
本公开实施例包括以下优点:
在本公开实施例中,可以应用于游戏客户端,在游戏过程中,游戏客户端可以响应于针对聊天频道的展示指令,确定与展示指令对应的目标聊天频道,并从服务端获取目标聊天频道对应的历史聊天缓存记录,历史聊天缓存记录包括指定数量的历史聊天消息,历史聊天消息按发送时间顺序更新存储于服务端;在图形用户界面提供目标聊天频道,并在目标聊天频道内展示服务端广播的目标聊天频道的实时聊天消息;获取用于表征目标聊天频道活跃程度的频道活跃信息,若频道活跃信息表征目标聊天频道当前不活跃,则在目标聊天频道中对历史聊天缓存记录中的历史聊天消息进行输出,从而对于游戏聊 天频道,在检测到聊天频道不活跃的情况下,通过从服务端获取对应的聊天频道的历史聊天缓存记录,并输出至聊天频道中,一方面可以方便玩家查阅历史聊天消息,参与至对应的聊天话题中,提高玩家之间的互动性,另一方面通过输出历史聊天缓存记录,营造聊天场景中活跃的氛围,提高聊天的活跃性;再一方面,可以增强玩家之间的互动性,从而增强游戏的用户粘性,降低了设备的空转率,进而提升了计算资源的利用率。
附图说明
图1是本公开实施例中提供的一种聊天消息的处理方法的步骤流程图;
图2是本公开实施例中提供的聊天消息同步的流程示意图;
图3是本公开实施例中提供的聊天消息同步的流程示意图;
图4是本公开实施例中提供的一种聊天消息的处理方法的步骤流程图;
图5是本公开实施例中提供的一种聊天消息的处理装置的结构框图;
图6是本公开实施例中提供的一种聊天消息的处理装置的结构框图;
图7是本公开实施例中提供的一种电子设备的框图。
具体实施方式
为使本公开的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本公开作进一步详细的说明。
作为一种示例,在游戏的聊天系统中,可以包括若干个不同的聊天频道,玩家可以根据自身的游戏需求选择相应的聊天频道与对应的玩家群体进行交流。具体的,在游戏中,玩家可以通过物理键盘、虚拟键盘、麦克风以及选择表情等发送聊天文本,聊天文本经由服务端转发后,广播至其余客户端中进行内容展示。在该过程中,当玩家离线时,并不会接收相应的聊天消息,并且在玩家上线后,在上线时间点之前的聊天消息也无法查阅,导致游戏客户端中对应的聊天频道中可能没有聊天消息,或部分聊天频道由于活跃性较差,出现无人发言,降低了不同玩家之间的互动性。
对此,本公开的核心发明点之一在于玩家上线时或游戏过程中切换聊天频道时,游戏客户端可以获取玩家当前选中的目标聊天频道对应的历史聊天缓存记录,并对该目标聊天频道进行活跃度检测,在检测到目标聊天频道的活跃程度较低的情况下,可以将历史聊天缓存记录中的历史聊天消息输出至该目标聊天频道中,从而对于游戏客户端中的游戏聊天频道,在检测到聊天频道不活跃的情况下,通过从服务端获取对应的聊天频道的历史聊天缓存记录,并输出至聊天频道中,一方面可以方便玩家查阅历史聊天消息,参与至对应的聊天话题中,提高玩家之间的互动性,另一方面通过输出历史聊天缓存记录,营造聊天场景中活跃的氛围,提高聊天的活跃性;再一方面,可以增强玩家之间的 互动性,从而增强游戏的用户粘性,降低了设备的空转率,进而提升了计算资源的利用率。
具体的,参照图1,示出了本公开实施例中提供的一种聊天消息的处理方法的步骤流程图,应用于游戏客户端,具体可以包括如下步骤:
步骤101,响应于针对聊天频道的展示指令,确定与所述展示指令对应的目标聊天频道,并从服务端获取所述目标聊天频道对应的历史聊天缓存记录,所述历史聊天缓存记录包括指定数量的历史聊天消息,所述历史聊天消息按发送时间顺序更新存储于所述服务端;
可选地,本公开实施例中可以应用于终端设备,在终端设备中可以运行相应的应用程序,并通过终端设备的图形用户界面显示对应的游戏界面,以便玩家在游戏界面中执行相应的游戏操作。其中,终端设备可以为台式电脑、笔记本电脑、平板电脑以及移动终端等设备,应用程序可以为能够提供多频道聊天功能的程序,如游戏应用程序、游戏小程序等。在本公开实施例中,以终端设备为移动终端,在移动终端中运行游戏应用程序(即游戏客户端,下述为游戏客户端),游戏应用程序提供多频道聊天功能为例进行示例性说明,可以理解的是,本公开对此不作限制。
在本公开实施例中,玩家可以在游戏客户端中登录相应的游戏账户,以进行相应的游戏操作,例如,通过游戏客户端的聊天系统与其他玩家进行线上交流等。其中,在游戏客户端的聊天系统可以包括若干个聊天频道,不同的聊天频道可以对应游戏中不同的玩家群体,服务端可以向加入某一个聊天频道中的玩家角色所对应的终端设备提供聊天消息广播服务,例如,聊天系统中可以包括世界频道、地区频道、服务器频道、门派频道、帮派频道、职业频道等等,世界频道对应的玩家群体可以为游戏中所有的玩家;地区频道对应的玩家群体可以为某个地区/游戏地图中的玩家;服务器频道对应的玩家群体可以为某个服务器中的玩家;门派频道对应的玩家群体可以为游戏中某个门派中的玩家;帮派频道对应的玩家群体可以为游戏中某个帮派中的玩家;职业频道对应的玩家群体可以为游戏中某个职业中的玩家等,上述玩家处于在线情况下可以在相应的聊天频道中进行交流。
在具体实现中,游戏客户端可以响应于针对聊天频道的展示指令,确定与展示指令对应的目标聊天频道,并从服务端获取目标聊天频道对应的历史聊天缓存记录。其中,在游戏过程中,玩家在同一时间仅可以在一个聊天频道中输入相应的内容(如文本消息、表情、语音消息等)以与位于同一聊天频道的其他玩家进行交流,当需要在另一个聊天频道中进行游戏交流时,则需要在聊天界面中切换聊天频道。
其中,对于历史聊天缓存记录,其可以包括指定聊天频道中指定数量的历史聊天消息,服务端可以按照历史聊天消息的发送时间顺序将历史聊天消息更新存储于服务端中。具体的,对于服务端,其可以在游戏过程中实时获取不同终端设备发送的针对对应聊天 频道的聊天消息,并根据聊天消息对应的发送时间点,将聊天消息存储至聊天频道所对应的消息池中,得到该聊天频道对应的历史聊天缓存记录。例如,针对世界频道、地区频道、服务器频道、门派频道、帮派频道、职业频道等聊天频道,可以在服务端中分别配置对应的消息池,如世界频道对应的世界消息池,则服务端可以接收不同客户端在世界频道发送的聊天消息,并根据每条聊天消息所对应的发送时间点对应的先后顺序,依次存储至世界消息池中,得到世界频道对应的历史聊天缓存记录。同时,服务端在缓存的同时,还可以实时将聊天消息广播至除发送聊天消息的客户端之外的其他客户端。
可选地,对于消息池,其可以为一个活跃、实时更新的数据池,服务端可以按照预设的存储数量以及所存储的聊天消息对应的时间点,在达到存储数量上限的情况下,可以将时间点最早的聊天消息从消息池中删除,从而保证消息池中聊天消息的时效性。相应地,历史聊天缓存记录可以为消息池中存储的聊天消息,随着聊天消息的更新,历史聊天缓存记录也可以实时更新,从而同样可以保证历史聊天缓存记录的时效性。
具体的,游戏客户端可以确定了被选中的目标聊天频道后,可以生成对应的聊天频道展示请求,并将该聊天频道展示请求发送至服务端以获取对应的历史聊天缓存记录,则服务端可以响应于客户端发送的聊天频道展示请求,确定与聊天频道展示请求对应的目标聊天频道,并将目标聊天频道对应的历史聊天缓存记录发送至目标终端设备,以使目标终端设备在目标聊天频道不活跃时,通过在目标聊天频道中对历史聊天缓存记录中的历史聊天消息进行输出,来模拟至少部分游戏角色在目标聊天频道中进行聊天。
对于展示指令,终端可以响应于针对终端设备的游戏客户端登录操作,或针对图形用户界面中所展示的聊天频道的切换操作,生成针对聊天频道的展示指令。在一种示例中,终端可以响应于针对客户端的账户登录指令,确定登录成功后客户端中聊天界面中当前选中的目标聊天频道,生成针对该目标聊天频道对应的展示指令以及对应的聊天频道展示请求,将该聊天频道展示请求发送至服务端,并从服务端中获取目标聊天频道对应的历史聊天缓存记录,从而在玩家刚登陆的情况下,游戏客户端可以定位聊天界面当前所选中的聊天频道,并获取对应的历史聊天缓存记录,以便判断是否将历史聊天缓存记录输出至该聊天频道;在另一种示例中,终端可以响应于针对客户端的聊天频道选择指令,确定与聊天频道选择指令对应的目标聊天频道,并生成与目标聊天频道对应的展示指令以及对应的聊天频道展示请求,将该聊天频道展示请求发送至服务端,并从服务端获取目标聊天频道对应的历史聊天缓存记录,从而在游戏过程中,当玩家切换聊天频道时,游戏客户端可以获取对应的历史聊天缓存记录,以便判断是否将历史聊天缓存记录输出至该聊天频道,进而通过在玩家刚登陆或切换聊天频道等进入聊天频道的情况下,向服务端获取对应的历史聊天缓存记录,以便判断是否在聊天频道中输出对应的历史聊天缓存记录。
步骤102,在所述图形用户界面提供所述目标聊天频道,并在所述目标聊天频道内 展示所述服务端广播的所述目标聊天频道的实时聊天消息;
在进入聊天频道后,终端可以在图形用户界面中所显示的游戏客户端中显示该目标聊天频道,以便玩家在该目标聊天频道中输入相应的聊天消息与位于目标聊天频道的其他玩家进行交流,当目标聊天频道中的其他玩家在所属客户端中发送了相应的实时聊天消息时,服务端可以接收对应终端设备发送的实时聊天消息,并将实时聊天消息广播至该目标聊天频道中,以便目标聊天频道中的玩家可以通过聊天消息进行互动交流。
步骤103,获取用于表征所述目标聊天频道活跃程度的频道活跃信息;
在进入聊天频道后,游戏客户端可以实时监测该聊天频道的频道活跃信息,对于频道活跃信息,其可以为设置为表征聊天频道活跃程度的信息,例如,其可以为聊天频道中聊天消息的数量,数量越多,则聊天频道越活跃,数量越少,则聊天频道越不活跃;也可以为聊天频道中是否有其他玩家新发送的聊天消息,若有,则聊天频道活跃,若无,则聊天频道不活跃等,本公开对此不作限制。
可选地,终端可以按照预设检测频率获取用于表征所述目标聊天频道活跃程度的频道活跃信息,例如,每隔1分钟获取一次设置为表征目标聊天频道活跃度的频道活跃信息,或每隔3分钟获取一次设置为表征目标聊天频道活跃度的频道活跃信息,每隔5分钟获取一次设置为表征目标聊天频道活跃度的频道活跃信息等,本公开对此不作限制。
步骤104,若所述频道活跃信息表征所述目标聊天频道当前不活跃,则在所述目标聊天频道中对所述历史聊天缓存记录中的历史聊天消息进行输出。
在具体实现中,若频道活跃信息表征预设时长内未接收到服务端发送的实时聊天消息,即目标聊天频道中当前无其他玩家新发送的聊天消息,判定目标聊天频道不活跃,则游戏客户端可以在目标聊天频道中输出历史聊天缓存记录;若频道活跃信息表征接收到服务端发送的实时聊天消息,即目标聊天频道中当前有其他玩家新发送的聊天消息,判定目标聊天频道活跃,则游戏客户端可以在目标聊天频道中按照时间先后顺序输出实时聊天消息,从而对于游戏聊天频道,在检测到聊天频道不活跃的情况下,通过从服务端获取对应的聊天频道的历史聊天缓存记录,并输出至聊天频道中,一方面可以方便玩家查阅历史聊天消息,参与至对应的聊天话题中,提高玩家之间的互动性,另一方面通过输出历史聊天缓存记录,营造聊天场景中活跃的氛围,提高聊天的活跃性;再一方面,可以增强玩家之间的互动性,从而增强游戏的用户粘性,降低了设备的空转率,进而提升了计算资源的利用率。
其中,历史聊天缓存记录可以包括若干条其他游戏玩家在目标聊天频道中发布的历史聊天消息,则游戏客户端从服务端中获取了目标聊天频道对应的历史聊天缓存记录后,可以将其缓存至本地,并获取目标聊天频道中输出的当前聊天消息,接着可以获取与目标聊天频道对应的本地聊天消息标识以及从历史聊天缓存记录中提取历史聊天消息的历史聊天消息标识,并将本地聊天消息标识与历史聊天消息标识进行比对,并按照历史聊 天消息对应的时间先后顺序在目标聊天频道中输出与本地聊天消息标识不重复的历史聊天消息,从而通过在聊天频道中发布历史聊天缓存记录,一方面可以方便玩家查阅历史聊天消息,参与至对应的聊天话题中,提高玩家之间的互动性,另一方面通过输出历史聊天缓存记录,营造聊天场景中活跃的氛围,提高聊天的活跃性;再一方面,可以增强玩家之间的互动性,从而增强游戏的用户粘性,降低了设备的空转率,进而提升了计算资源的利用率。
需要说明的是,对于聊天消息,服务端可以为每一条聊天消息配置一对应的聊天消息标识用以标识唯一的聊天消息,并在将聊天消息广播至对应的终端设备时,由终端设备对聊天消息标识进行存储,以便在聊天频道不活跃的情况下,终端可以基于从服务端获取的历史聊天缓存记录,从历史聊天缓存记录中提取每一历史聊天消息对应的历史聊天消息标识,并分别将其与本地存储的本地聊天消息标识进行比对,判断是否存在相同的聊天消息标识,对于本地聊天消息标识,其可以为本地客户端已经在聊天频道中输出过的聊天消息所对应的聊天消息标识,则通过聊天消息标识可以从历史聊天缓存记录中筛选出在先未输出的历史聊天消息,以便将其输出至对应的聊天频道,从而通过将聊天消息的校验过程下发至客户端,使得服务端仅对聊天消息进行标识配置、存储、更新以及发送等处理,可以大大降低服务端的性能开销,提高服务端的运行效率。
此外,对于聊天消息的输出,可以根据时间先后顺序,一条一条地将与目标聊天频道当前已经输出的聊天消息不重复的历史聊天消息输出至目标聊天频道,也可以按照一次输出几条历史聊天消息等,从而游戏客户端在检测到需要发布历史聊天缓存记录的情况下,可以根据预设的发布方式对历史聊天缓存记录进行客制化发布。
针对每个聊天频道,服务端在接收到对应的实时聊天消息时,可以广播至相应在线的客户端,具体的,服务端可以响应于接收到针对聊天频道的实时聊天消息,并按照实时聊天消息对应的时间先后顺序广播至在线客户端所对应的终端设备,各个在线客户端在接收到针对某个聊天频道的实时聊天消息时,若玩家当前选中了该聊天频道,则游戏客户端可以即时输出该实时聊天消息。
需要说明的是,对于历史聊天消息,其可以为存储至聊天频道对应的消息池中的聊天消息,对于实时聊天消息,其可以为游戏客户端实时向服务端发送的聊天消息,服务端可以在将实时聊天消息发送至在线客户端的同时,将其存储至对应的消息池中作为历史聊天消息,以构建相应聊天频道对应的历史聊天缓存记录。
在一种示例中,参照图2,示出了本公开实施例中提供的聊天消息同步的流程示意图,当玩家在游戏客户端中登录成功并进入对应的目标聊天频道时,游戏客户端可以向服务端定向获取该目标聊天频道对应的历史聊天缓存记录,接着可以检测目标聊天频道在预设时长内(如5秒、10秒内等)是否有新的聊天消息,若有,则在目标聊天频道中输出对应的聊天消息;若无,则将历史聊天缓存记录按照相应的输出方式输出至目标聊 天频道中,并返回获取历史聊天缓存记录的步骤,以便继续通过相应的检测频率实时检测聊天频道的活跃程度,判断是否输出相应的历史聊天消息,一方面可以方便玩家查阅历史聊天消息,参与至对应的聊天话题中,提高玩家之间的互动性,另一方面通过输出历史聊天缓存记录,营造聊天场景中活跃的氛围,提高聊天的活跃性;再一方面,可以增强玩家之间的互动性,从而增强游戏的用户粘性,降低了设备的空转率,进而提升了计算资源的利用率。
参照图3,示出了本公开实施例中提供的聊天消息同步的流程示意图,在游戏过程中,当玩家将当前聊天频道切换至目标聊天频道后,游戏客户端可以向服务端定向获取该目标聊天频道对应的历史聊天缓存记录,接着可以检测目标聊天频道在预设时长内(如5秒、10秒内等)是否有新的聊天消息,若有,则在目标聊天频道中输出对应的聊天消息;若无,则将历史聊天缓存记录按照相应的输出方式输出至目标聊天频道中,并返回获取历史聊天缓存记录的步骤,以便继续通过相应的检测频率实时检测聊天频道的活跃程度,判断是否输出相应的历史聊天消息,一方面可以方便玩家查阅历史聊天消息,参与至对应的聊天话题中,提高玩家之间的互动性,另一方面通过输出历史聊天缓存记录,营造聊天场景中活跃的氛围,提高聊天的活跃性;再一方面,可以增强玩家之间的互动性,从而增强游戏的用户粘性,降低了设备的空转率,进而提升了计算资源的利用率。
在本公开实施例中,可以应用于游戏客户端,在游戏过程中,游戏客户端可以响应于针对聊天频道的展示指令,确定与展示指令对应的目标聊天频道,并从服务端获取目标聊天频道对应的历史聊天缓存记录,历史聊天缓存记录包括指定数量的历史聊天消息,历史聊天消息按发送时间顺序更新存储于服务端;在图形用户界面提供目标聊天频道,并在目标聊天频道内展示服务端广播的目标聊天频道的实时聊天消息;获取用于表征目标聊天频道活跃程度的频道活跃信息,若频道活跃信息表征目标聊天频道当前不活跃,则在目标聊天频道中对历史聊天缓存记录中的历史聊天消息进行输出,从而对于游戏聊天频道,在检测到聊天频道不活跃的情况下,通过从服务端获取对应的聊天频道的历史聊天缓存记录,并输出至聊天频道中,一方面可以方便玩家查阅历史聊天消息,参与至对应的聊天话题中,提高玩家之间的互动性,另一方面通过输出历史聊天缓存记录,营造聊天场景中活跃的氛围,提高聊天的活跃性;再一方面,可以增强玩家之间的互动性,从而增强游戏的用户粘性,降低了设备的空转率,进而提升了计算资源的利用率。
参照图4,示出了本公开实施例中提供的一种聊天消息的处理方法的步骤流程图,应用于服务端,具体可以包括如下步骤:
步骤401,接收至少一个终端设备在聊天频道中发送的实时聊天消息;
步骤401,基于所述实时聊天消息的发送时间顺序,在所述服务端中更新存储指定数量的实时聊天消息,生成针对所述聊天频道的历史聊天缓存记录;
步骤401,响应于目标终端设备发送的聊天频道展示请求,确定与所述聊天频道展 示请求对应的目标聊天频道,并将所述目标聊天频道对应的历史聊天缓存记录发送至所述目标终端设备,以使所述目标终端设备在所述目标聊天频道不活跃时,通过在所述目标聊天频道中对所述历史聊天缓存记录中的历史聊天消息进行输出,来模拟至少部分游戏角色在所述目标聊天频道中进行聊天;
其中,所述聊天频道展示请求为响应于针对所述目标终端设备的游戏客户端登录操作,或针对所述目标终端设备中所展示的聊天频道的切换操作,所生成的聊天频道展示请求。
在一种可选实施例中,所述接收至少一个终端设备在聊天频道中发送的实时聊天消息之后,所述方法还包括:
按照所述实时聊天消息的发送时间顺序,将所述实时聊天消息广播至当前在线客户端所对应的终端设备,以使所述当前在线客户端所对应的终端设备在所述聊天频道中输出所述实时聊天消息。
在本公开实施例中,可以应用于服务端,在游戏过程中,服务端可以接收至少一个终端设备在聊天频道中发送的实时聊天消息,并基于实时聊天消息的发送时间顺序,在服务端中更新存储指定数量的实时聊天消息,生成针对聊天频道的历史聊天缓存记录,当接收到目标终端设备发送的聊天频道展开请求时,服务端可以响应于目标终端设备发送的聊天频道展示请求,确定与聊天频道展示请求对应的目标聊天频道,并将目标聊天频道对应的历史聊天缓存记录发送至目标终端设备,以使目标终端设备在目标聊天频道不活跃时,通过在目标聊天频道中对历史聊天缓存记录中的历史聊天消息进行输出,来模拟至少部分游戏角色在目标聊天频道中进行聊天,从而对于游戏聊天频道,在检测到聊天频道不活跃的情况下,客户端可以从服务端获取对应的聊天频道的历史聊天缓存记录,并输出至聊天频道中,一方面可以方便玩家查阅历史聊天消息,参与至对应的聊天话题中,提高玩家之间的互动性,另一方面通过输出历史聊天缓存记录,营造聊天场景中活跃的氛围,提高聊天的活跃性;再一方面,可以增强玩家之间的互动性,从而增强游戏的用户粘性,降低了设备的空转率,进而提升了计算资源的利用率。
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本公开实施例并不受所描述的动作顺序的限制,因为依据本公开实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本公开实施例所必须的。
参照图5,示出了本公开实施例中提供的一种聊天消息的处理装置的结构框图,通过终端设备提供图形用户界面,具体可以包括如下模块:
缓存记录获取模块501,设置为响应于针对聊天频道的展示指令,确定与所述展示 指令对应的目标聊天频道,并从服务端获取所述目标聊天频道对应的历史聊天缓存记录,所述历史聊天缓存记录包括指定数量的历史聊天消息,所述历史聊天消息按发送时间顺序更新存储于所述服务端;
实时消息展示模块502,设置为在所述图形用户界面提供所述目标聊天频道,并在所述目标聊天频道内展示所述服务端广播的所述目标聊天频道的实时聊天消息;
活跃信息获取模块503,设置为获取用于表征所述目标聊天频道活跃程度的频道活跃信息;
缓存记录输出模块504,设置为若所述频道活跃信息表征所述目标聊天频道当前不活跃,则在所述目标聊天频道中对所述历史聊天缓存记录中的历史聊天消息进行输出。
在一种可选实施例中,所述装置还包括:
展示指令生成模块,设置为响应于针对所述终端设备的游戏客户端登录操作,或针对所述图形用户界面中所展示的聊天频道的切换操作,生成所述针对聊天频道的展示指令。
在一种可选实施例中,所述缓存记录输出模块504具体设置为:
若所述频道活跃信息表征预设时长内未接收到所述服务端发送的实时聊天消息,则在所述目标聊天频道中输出所述历史聊天缓存记录。
在一种可选实施例中,所述缓存记录输出模块504具体设置为:
获取与所述目标聊天频道对应的本地聊天消息标识以及从所述历史聊天缓存记录中提取所述历史聊天消息的历史聊天消息标识;
将所述本地聊天消息标识与所述历史聊天消息标识进行比对,并按照所述历史聊天消息对应的时间先后顺序在所述目标聊天频道中输出与所述本地聊天消息标识不重复的历史聊天消息。
在一种可选实施例中,所述活跃信息获取模块503具体设置为:
按照预设检测频率获取用于表征所述目标聊天频道活跃程度的频道活跃信息。
参照图6,示出了本公开实施例中提供的一种聊天消息的处理装置的结构框图,可以应用于服务端,具体可以包括如下模块:
聊天消息接收模块601,设置为接收至少一个终端设备在聊天频道中发送的实时聊天消息;
缓存记录生成模块602,设置为基于所述实时聊天消息的发送时间顺序,在所述服务端中更新存储指定数量的实时聊天消息,生成针对所述聊天频道的历史聊天缓存记录;
聊天消息发送模块603,设置为响应于目标终端设备发送的聊天频道展示请求,确定与所述聊天频道展示请求对应的目标聊天频道,并将所述目标聊天频道对应的历史聊天缓存记录发送至所述目标终端设备,以使所述目标终端设备在所述目标聊天频道不活跃时,通过在所述目标聊天频道中对所述历史聊天缓存记录中的历史聊天消息进行输出, 来模拟至少部分游戏角色在所述目标聊天频道中进行聊天;
其中,所述聊天频道展示请求为响应于针对所述目标终端设备的游戏客户端登录操作,或针对所述目标终端设备中所展示的聊天频道的切换操作,所生成的聊天频道展示请求。
在一种可选实施例中,所述装置还包括:
实时聊天消息发送模块,设置为按照所述实时聊天消息的发送时间顺序,将所述实时聊天消息广播至当前在线客户端所对应的终端设备,以使所述当前在线客户端所对应的终端设备在所述聊天频道中输出所述实时聊天消息。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
另外,本公开实施例还提供了一种电子设备,包括:处理器,存储器,存储在存储器上并可在处理器上运行的计算机程序,该计算机程序被处理器执行时实现上述聊天消息的处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
本公开实施例还提供了一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现上述聊天消息的处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等。
在本公开提供的计算机可读存储介质中,可以通过终端设备提供图形用户界面,所述方法包括:响应于针对聊天频道的展示指令,确定与所述展示指令对应的目标聊天频道,并从服务端获取所述目标聊天频道对应的历史聊天缓存记录,所述历史聊天缓存记录包括指定数量的历史聊天消息,所述历史聊天消息按发送时间顺序更新存储于所述服务端;在所述图形用户界面提供所述目标聊天频道,并在所述目标聊天频道内展示所述服务端广播的所述目标聊天频道的实时聊天消息;获取用于表征所述目标聊天频道活跃程度的频道活跃信息;若所述频道活跃信息表征所述目标聊天频道当前不活跃,则在所述目标聊天频道中对所述历史聊天缓存记录中的历史聊天消息进行输出。
在一种可选实施例中,在所述响应于针对聊天频道的展示指令,确定与所述展示指令对应的目标聊天频道的步骤之前,所述方法还包括:响应于针对所述终端设备的游戏客户端登录操作,或针对所述图形用户界面中所展示的聊天频道的切换操作,生成所述针对聊天频道的展示指令。
在一种可选实施例中,所述若所述频道活跃信息表征所述目标聊天频道当前不活跃,则在所述目标聊天频道中对所述历史聊天缓存记录中的历史聊天消息进行输出,包括:若所述频道活跃信息表征预设时长内未接收到所述服务端发送的实时聊天消息,则在所 述目标聊天频道中输出所述历史聊天缓存记录。
在一种可选实施例中,所述在所述目标聊天频道中输出所述历史聊天缓存记录,包括:获取与所述目标聊天频道对应的本地聊天消息标识以及从所述历史聊天缓存记录中提取所述历史聊天消息的历史聊天消息标识;将所述本地聊天消息标识与所述历史聊天消息标识进行比对,并按照所述历史聊天消息对应的时间先后顺序在所述目标聊天频道中输出与所述本地聊天消息标识不重复的历史聊天消息。
在一种可选实施例中,所述获取用于表征所述目标聊天频道活跃程度的频道活跃信息,包括:按照预设检测频率获取用于表征所述目标聊天频道活跃程度的频道活跃信息。
在本公开提供的计算机可读存储介质中,可以接收至少一个终端设备在聊天频道中发送的实时聊天消息;基于所述实时聊天消息的发送时间顺序,在所述服务端中更新存储指定数量的实时聊天消息,生成针对所述聊天频道的历史聊天缓存记录;响应于目标终端设备发送的聊天频道展示请求,确定与所述聊天频道展示请求对应的目标聊天频道,并将所述目标聊天频道对应的历史聊天缓存记录发送至所述目标终端设备,以使所述目标终端设备在所述目标聊天频道不活跃时,通过在所述目标聊天频道中对所述历史聊天缓存记录中的历史聊天消息进行输出,来模拟至少部分游戏角色在所述目标聊天频道中进行聊天;其中,所述聊天频道展示请求为响应于针对所述目标终端设备的游戏客户端登录操作,或针对所述目标终端设备中所展示的聊天频道的切换操作,所生成的聊天频道展示请求。
在一种可选实施例中,所述接收至少一个终端设备在聊天频道中发送的实时聊天消息之后,所述方法还包括:按照所述实时聊天消息的发送时间顺序,将所述实时聊天消息广播至当前在线客户端所对应的终端设备,以使所述当前在线客户端所对应的终端设备在所述聊天频道中输出所述实时聊天消息。
本公开实施例提供的计算机可读存储介质,可以应用于游戏客户端,在游戏过程中,游戏客户端可以响应于针对聊天频道的展示指令,确定与展示指令对应的目标聊天频道,并从服务端获取目标聊天频道对应的历史聊天缓存记录,历史聊天缓存记录包括指定数量的历史聊天消息,历史聊天消息按发送时间顺序更新存储于服务端;在图形用户界面提供目标聊天频道,并在目标聊天频道内展示服务端广播的目标聊天频道的实时聊天消息;获取用于表征目标聊天频道活跃程度的频道活跃信息,若频道活跃信息表征目标聊天频道当前不活跃,则在目标聊天频道中对历史聊天缓存记录中的历史聊天消息进行输出,从而对于游戏聊天频道,在检测到聊天频道不活跃的情况下,通过从服务端获取对应的聊天频道的历史聊天缓存记录,并输出至聊天频道中,一方面可以方便玩家查阅历史聊天消息,参与至对应的聊天话题中,提高玩家之间的互动性,另一方面通过输出历史聊天缓存记录,营造聊天场景中活跃的氛围,提高聊天的活跃性;再一方面,可以增强玩家之间的互动性,从而增强游戏的用户粘性,降低了设备的空转率,进而提升了计 算资源的利用率。
图7为实现本公开各个实施例的一种电子设备的硬件结构示意图。
该电子设备700包括但不限于:射频单元701、网络模块702、音频输出单元703、输入单元704、传感器705、显示单元706、用户输入单元707、接口单元708、存储器709、处理器710、以及电源711等部件。本领域技术人员可以理解,图7中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本公开实施例中,电子设备包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、以及计步器等。
应理解的是,本公开实施例中,射频单元701可设置为收发信息或通话过程中,信号的接收和发送,具体的,将来自基站的下行数据接收后,给处理器710处理;另外,将上行的数据发送给基站。通常,射频单元701包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元701还可以通过无线通信系统与网络和其他设备通信。
电子设备通过网络模块702为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。
音频输出单元703可以将射频单元701或网络模块702接收的或者在存储器709中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元703还可以提供与电子设备700执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元703包括扬声器、蜂鸣器以及受话器等。
输入单元704设置为接收音频或视频信号。输入单元704可以包括图形处理器(Graphics Processing Unit,GPU)7041和麦克风7042,图形处理器7041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元706上。经图形处理器7041处理后的图像帧可以存储在存储器709(或其它存储介质)中或者经由射频单元701或网络模块702进行发送。麦克风7042可以接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以在电话通话模式的情况下转换为可经由射频单元701发送到移动通信基站的格式输出。
电子设备700还包括至少一种传感器705,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板7061的亮度,接近传感器可在电子设备700移动到耳边时,关闭显示面板7061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可设置为识别电子设备姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;传感器705还可以包括指纹传感器、压力传感器、虹膜传感器、 分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。
显示单元706设置为显示由用户输入的信息或提供给用户的信息。显示单元706可包括显示面板7061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板7061。
用户输入单元707可设置为接收输入的数字或字符信息,以及产生与电子设备的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元707包括触控面板7071以及其他输入设备7072。触控面板7071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板7071上或在触控面板7071附近的操作)。触控面板7071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器710,接收处理器710发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板7071。除了触控面板7071,用户输入单元707还可以包括其他输入设备7072。具体地,其他输入设备7072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。
进一步的,触控面板7071可覆盖在显示面板7061上,当触控面板7071检测到在其上或附近的触摸操作后,传送给处理器710以确定触摸事件的类型,随后处理器710根据触摸事件的类型在显示面板7061上提供相应的视觉输出。虽然在图7中,触控面板7071与显示面板7061是作为两个独立的部件来实现电子设备的输入和输出功能,但是在某些实施例中,可以将触控面板7071与显示面板7061集成而实现电子设备的输入和输出功能,具体此处不做限定。
接口单元708为外部装置与电子设备700连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、设置为连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元708可以设置为接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到电子设备700内的一个或多个元件或者可以设置为在电子设备700和外部装置之间传输数据。
存储器709可设置为存储软件程序以及各种数据。存储器709可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器709可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
处理器710是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器709内的软件程序和/或模块,以及调用存储在存储器709内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。处理器710可包括一个或多个处理单元;优选的,处理器710可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器710中。
电子设备700还可以包括给各个部件供电的电源711(比如电池),优选的,电源711可以通过电源管理系统与处理器710逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
在本公开提供的电子设备,可以通过终端设备提供图形用户界面,所述方法包括:响应于针对聊天频道的展示指令,确定与所述展示指令对应的目标聊天频道,并从服务端获取所述目标聊天频道对应的历史聊天缓存记录,所述历史聊天缓存记录包括指定数量的历史聊天消息,所述历史聊天消息按发送时间顺序更新存储于所述服务端;在所述图形用户界面提供所述目标聊天频道,并在所述目标聊天频道内展示所述服务端广播的所述目标聊天频道的实时聊天消息;获取用于表征所述目标聊天频道活跃程度的频道活跃信息;若所述频道活跃信息表征所述目标聊天频道当前不活跃,则在所述目标聊天频道中对所述历史聊天缓存记录中的历史聊天消息进行输出。
在一种可选实施例中,在所述响应于针对聊天频道的展示指令,确定与所述展示指令对应的目标聊天频道的步骤之前,所述方法还包括:响应于针对所述终端设备的游戏客户端登录操作,或针对所述图形用户界面中所展示的聊天频道的切换操作,生成所述针对聊天频道的展示指令。
在一种可选实施例中,所述若所述频道活跃信息表征所述目标聊天频道当前不活跃,则在所述目标聊天频道中对所述历史聊天缓存记录中的历史聊天消息进行输出,包括:若所述频道活跃信息表征预设时长内未接收到所述服务端发送的实时聊天消息,则在所述目标聊天频道中输出所述历史聊天缓存记录。
在一种可选实施例中,所述在所述目标聊天频道中输出所述历史聊天缓存记录,包括:获取与所述目标聊天频道对应的本地聊天消息标识以及从所述历史聊天缓存记录中提取所述历史聊天消息的历史聊天消息标识;将所述本地聊天消息标识与所述历史聊天消息标识进行比对,并按照所述历史聊天消息对应的时间先后顺序在所述目标聊天频道中输出与所述本地聊天消息标识不重复的历史聊天消息。
在一种可选实施例中,所述获取用于表征所述目标聊天频道活跃程度的频道活跃信息,包括:按照预设检测频率获取用于表征所述目标聊天频道活跃程度的频道活跃信息。
在本公开提供的计算机可读存储介质中,可以接收至少一个终端设备在聊天频道中 发送的实时聊天消息;基于所述实时聊天消息的发送时间顺序,在所述服务端中更新存储指定数量的实时聊天消息,生成针对所述聊天频道的历史聊天缓存记录;响应于目标终端设备发送的聊天频道展示请求,确定与所述聊天频道展示请求对应的目标聊天频道,并将所述目标聊天频道对应的历史聊天缓存记录发送至所述目标终端设备,以使所述目标终端设备在所述目标聊天频道不活跃时,通过在所述目标聊天频道中对所述历史聊天缓存记录中的历史聊天消息进行输出,来模拟至少部分游戏角色在所述目标聊天频道中进行聊天;其中,所述聊天频道展示请求为响应于针对所述目标终端设备的游戏客户端登录操作,或针对所述目标终端设备中所展示的聊天频道的切换操作,所生成的聊天频道展示请求。
在一种可选实施例中,所述接收至少一个终端设备在聊天频道中发送的实时聊天消息之后,所述方法还包括:按照所述实时聊天消息的发送时间顺序,将所述实时聊天消息广播至当前在线客户端所对应的终端设备,以使所述当前在线客户端所对应的终端设备在所述聊天频道中输出所述实时聊天消息。
本公开实施例提供的电子设备,可以应用于游戏客户端,在游戏过程中,游戏客户端可以响应于针对聊天频道的展示指令,确定与展示指令对应的目标聊天频道,并从服务端获取目标聊天频道对应的历史聊天缓存记录,历史聊天缓存记录包括指定数量的历史聊天消息,历史聊天消息按发送时间顺序更新存储于服务端;在图形用户界面提供目标聊天频道,并在目标聊天频道内展示服务端广播的目标聊天频道的实时聊天消息;获取用于表征目标聊天频道活跃程度的频道活跃信息,若频道活跃信息表征目标聊天频道当前不活跃,则在目标聊天频道中对历史聊天缓存记录中的历史聊天消息进行输出,从而对于游戏聊天频道,在检测到聊天频道不活跃的情况下,通过从服务端获取对应的聊天频道的历史聊天缓存记录,并输出至聊天频道中,一方面可以方便玩家查阅历史聊天消息,参与至对应的聊天话题中,提高玩家之间的互动性,另一方面通过输出历史聊天缓存记录,营造聊天场景中活跃的氛围,提高聊天的活跃性;再一方面,可以增强玩家之间的互动性,从而增强游戏的用户粘性,降低了设备的空转率,进而提升了计算资源的利用率。
另外,电子设备700包括一些未示出的功能模块,在此不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下 前者是更佳的实施方式。基于这样的理解,本公开的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本公开各个实施例所述的方法。
上面结合附图对本公开的实施例进行了描述,但是本公开并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本公开的启示下,在不脱离本公开宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本公开的保护之内。
本领域普通技术人员可以意识到,结合本公开实施例中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本公开的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本公开所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本公开各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对相关技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以权利要求的保护范围为准。

Claims (11)

  1. 一种聊天消息的处理方法,通过终端设备提供图形用户界面,所述方法包括:
    响应于针对聊天频道的展示指令,确定与所述展示指令对应的目标聊天频道,并从服务端获取所述目标聊天频道对应的历史聊天缓存记录,所述历史聊天缓存记录包括指定数量的历史聊天消息,所述历史聊天消息按发送时间顺序更新存储于所述服务端;
    在所述图形用户界面提供所述目标聊天频道,并在所述目标聊天频道内展示所述服务端广播的所述目标聊天频道的实时聊天消息;
    获取用于表征所述目标聊天频道活跃程度的频道活跃信息;
    若所述频道活跃信息表征所述目标聊天频道当前不活跃,则在所述目标聊天频道中对所述历史聊天缓存记录中的历史聊天消息进行输出。
  2. 根据权利要求1所述的方法,其中,在所述响应于针对聊天频道的展示指令,确定与所述展示指令对应的目标聊天频道的步骤之前,所述方法还包括:
    响应于针对所述终端设备的游戏客户端登录操作,或针对所述图形用户界面中所展示的聊天频道的切换操作,生成所述针对聊天频道的展示指令。
  3. 根据权利要求1所述的方法,其中,所述若所述频道活跃信息表征所述目标聊天频道当前不活跃,则在所述目标聊天频道中对所述历史聊天缓存记录中的历史聊天消息进行输出,包括:
    若所述频道活跃信息表征预设时长内未接收到所述服务端发送的实时聊天消息,则在所述目标聊天频道中输出所述历史聊天缓存记录。
  4. 根据权利要求1或2所述的方法,其中,所述在所述目标聊天频道中输出所述历史聊天缓存记录,包括:
    获取与所述目标聊天频道对应的本地聊天消息标识以及从所述历史聊天缓存记录中提取所述历史聊天消息的历史聊天消息标识;
    将所述本地聊天消息标识与所述历史聊天消息标识进行比对,并按照所述历史聊天消息对应的时间先后顺序在所述目标聊天频道中输出与所述本地聊天消息标识不重复的历史聊天消息。
  5. 根据权利要求1所述的方法,其中,所述获取用于表征所述目标聊天频道活跃程度的频道活跃信息,包括:
    按照预设检测频率获取用于表征所述目标聊天频道活跃程度的频道活跃信息。
  6. 一种聊天消息的处理方法,应用于服务端,包括:
    接收至少一个终端设备在聊天频道中发送的实时聊天消息;
    基于所述实时聊天消息的发送时间顺序,在所述服务端中更新存储指定数量的实时聊天消息,生成针对所述聊天频道的历史聊天缓存记录;
    响应于目标终端设备发送的聊天频道展示请求,确定与所述聊天频道展示请求对应的目标聊天频道,并将所述目标聊天频道对应的历史聊天缓存记录发送至所述目标终端设备,以使所述目标终端设备在所述目标聊天频道不活跃时,通过在所述目标聊天频道中对所述历史聊天缓存记录中的历史聊天消息进行输出,来模拟至少部分游戏角色在所述目标聊天频道中进行聊天;
    其中,所述聊天频道展示请求为响应于针对所述目标终端设备的游戏客户端登录操作,或针对所述目标终端设备中所展示的聊天频道的切换操作,所生成的聊天频道展示请求。
  7. 根据权利要求6所述的方法,其中,所述接收至少一个终端设备在聊天频道中发送的实时聊天消息之后,所述方法还包括:
    按照所述实时聊天消息的发送时间顺序,将所述实时聊天消息广播至当前在线客户端所对应的终端设备,以使所述当前在线客户端所对应的终端设备在所述聊天频道中输出所述实时聊天消息。
  8. 一种聊天消息的处理装置,通过终端设备提供图形用户界面,所述方法包括:
    缓存记录获取模块,设置为响应于针对聊天频道的展示指令,确定与所述展示指令对应的目标聊天频道,并从服务端获取所述目标聊天频道对应的历史聊天缓存记录,所述历史聊天缓存记录包括指定数量的历史聊天消息,所述历史聊天消息按发送时间顺序更新存储于所述服务端;
    实时消息展示模块,设置为在所述图形用户界面提供所述目标聊天频道,并在所述目标聊天频道内展示所述服务端广播的所述目标聊天频道的实时聊天消息;
    活跃信息获取模块,设置为获取用于表征所述目标聊天频道活跃程度的频道活跃信息;
    缓存记录输出模块,设置为若所述频道活跃信息表征所述目标聊天频道当前不活跃,则在所述目标聊天频道中对所述历史聊天缓存记录中的历史聊天消息进行输出。
  9. 一种聊天消息的处理装置,包括:
    聊天消息接收模块,设置为接收至少一个终端设备在聊天频道中发送的实时聊天消息;
    缓存记录生成模块,设置为基于所述实时聊天消息的发送时间顺序,在所述服务端中更新存储指定数量的实时聊天消息,生成针对所述聊天频道的历史聊天缓存记录;
    聊天消息发送模块,设置为响应于目标终端设备发送的聊天频道展示请求,确定与所述聊天频道展示请求对应的目标聊天频道,并将所述目标聊天频道对应的历史聊天缓存记录发送至所述目标终端设备,以使所述目标终端设备在所述目标聊天频道不活跃时,通过在所述目标聊天频道中对所述历史聊天缓存记录中的历史聊天消息进行输出,来模拟至少部分游戏角色在所述目标聊天频道中进行聊天;
    其中,所述聊天频道展示请求为响应于针对所述目标终端设备的游戏客户端登录操作,或针对所述目标终端设备中所展示的聊天频道的切换操作,所生成的聊天频道展示请求。
  10. 一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,所述处理器、所述通信接口以及所述存储器通过所述通信总线完成相互间的通信;
    所述存储器,设置为存放计算机程序;
    所述处理器,设置为执行存储器上所存放的程序时,实现如权利要求1-7任一项所述的方法。
  11. 一种计算机可读存储介质,其上存储有指令,当由一个或多个处理器执行时,使得所述处理器执行如权利要求1-7任一项所述的方法。
PCT/CN2023/113074 2022-08-17 2023-08-15 聊天消息的处理方法、装置、电子设备及存储介质 WO2024037529A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210987834.0 2022-08-17
CN202210987834.0A CN117618933A (zh) 2022-08-17 2022-08-17 聊天消息的处理方法、装置、电子设备及存储介质

Publications (1)

Publication Number Publication Date
WO2024037529A1 true WO2024037529A1 (zh) 2024-02-22

Family

ID=89940700

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/113074 WO2024037529A1 (zh) 2022-08-17 2023-08-15 聊天消息的处理方法、装置、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN117618933A (zh)
WO (1) WO2024037529A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105553834A (zh) * 2016-01-21 2016-05-04 腾讯科技(深圳)有限公司 消息发送方法和装置
CN109873752A (zh) * 2019-01-25 2019-06-11 平安科技(深圳)有限公司 通信群组内的机器人互动方法、装置、存储介质和设备
CN109885604A (zh) * 2019-01-22 2019-06-14 平安科技(深圳)有限公司 聊天消息展示方法、电子装置及计算机可读存储介质
CN110052035A (zh) * 2019-05-16 2019-07-26 网易(杭州)网络有限公司 游戏中聊天信息的记录方法及装置、存储介质、电子装置
US10708216B1 (en) * 2016-05-17 2020-07-07 Rao Sanjay K Conversational user interfaces and artificial intelligence for messaging and mobile devices

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105553834A (zh) * 2016-01-21 2016-05-04 腾讯科技(深圳)有限公司 消息发送方法和装置
US10708216B1 (en) * 2016-05-17 2020-07-07 Rao Sanjay K Conversational user interfaces and artificial intelligence for messaging and mobile devices
CN109885604A (zh) * 2019-01-22 2019-06-14 平安科技(深圳)有限公司 聊天消息展示方法、电子装置及计算机可读存储介质
CN109873752A (zh) * 2019-01-25 2019-06-11 平安科技(深圳)有限公司 通信群组内的机器人互动方法、装置、存储介质和设备
CN110052035A (zh) * 2019-05-16 2019-07-26 网易(杭州)网络有限公司 游戏中聊天信息的记录方法及装置、存储介质、电子装置

Also Published As

Publication number Publication date
CN117618933A (zh) 2024-03-01

Similar Documents

Publication Publication Date Title
WO2018192415A1 (zh) 数据的直播方法、相关设备及系统
WO2021082741A1 (zh) 显示方法及电子设备
WO2016173513A1 (zh) 基于推荐内容的互动方法、终端和服务器
WO2016180135A1 (zh) 直播互动系统、信息发送方法、信息接收方法及设备
CN106973330B (zh) 一种屏幕直播方法、装置和系统
CN108540655B (zh) 一种来电显示处理方法及移动终端
US20200257433A1 (en) Display method and mobile terminal
US20220283828A1 (en) Application sharing method, electronic device and computer readable storage medium
CN110784771B (zh) 一种视频分享方法及电子设备
WO2019196691A1 (zh) 一种键盘界面显示方法和移动终端
CN107908765B (zh) 一种游戏资源处理方法、移动终端及服务器
CN106254910B (zh) 一种记录图像的方法和装置
CN108513088B (zh) 群组视频会话的方法及装置
CN110673770B (zh) 消息展示方法及终端设备
WO2016119165A1 (zh) 历史聊天记录展示的方法和装置
WO2021109959A1 (zh) 应用程序分享方法及电子设备
WO2019201146A1 (zh) 表情图像的显示方法及终端设备
CN108521365B (zh) 一种添加好友的方法及移动终端
WO2019129264A1 (zh) 界面的显示方法和移动终端
CN111444237A (zh) 服务器系统、数据传输方法及电子设备
CN108880974B (zh) 会话群组创建方法及装置
CN109729582B (zh) 信息交互方法、装置及计算机可读存储介质
WO2018176432A1 (zh) 红包数据处理方法及设备
CN111061404A (zh) 一种控制方法及第一电子设备
CN108536513B (zh) 一种图片显示方向调整方法及移动终端

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23854430

Country of ref document: EP

Kind code of ref document: A1