Chat message display method and device, terminal, storage medium and program product
By dividing it into a chat message display area and a virtual object display area in the chat interface of the instant messaging client, the virtual object display area displays virtual objects of different accounts and displays them in the virtual object location after receiving the chat message. The virtual image can only be solved The problem of combining with specific messages realizes the combination of virtual objects and different types of messages, enriches the chat experience and supports historical message browsing.
Patent Information
- Application Number
- CN202310802414.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-12-31
AI Technical Summary
The virtual image of existing instant messaging clients can only be combined with chat messages in specific messages, and the applicable scenarios are limited and cannot be displayed when users send other types of messages.
The chat interface is divided into a chat message display area and a virtual object display area. The virtual object display area displays virtual objects corresponding to different accounts. After receiving the chat message, it displays it at the corresponding location of the virtual object. After reaching the duration threshold, the message is moved to the chat Message display area, realizes the combination of virtual objects and different types of messages.
It enriches the display methods of chat messages, enhances the user experience, and takes into account users' browsing needs for historical messages.
Smart Images

Figure CN119232690A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of human-computer interaction technology, and in particular, to a chat message display method, device, terminal, storage medium and program product. Background Art
[0002] Nowadays, instant messaging has gradually become one of the important channels for users' daily communication. In addition, in order to enrich users' online chat experience, instant messaging clients have launched a variety of additional functions to meet users' various communication needs.
[0003] In the related art, in the online chat interface provided by the instant messaging client, virtual images corresponding to different accounts are displayed. The virtual images can make corresponding actions according to the dynamic expressions selected by the user, and the dynamic expressions are displayed through the actions of the virtual images.
[0004] However, in the solutions provided by the related art, the virtual image of the instant messaging client can only be used as a way to display dynamic actions, and the virtual image is only combined with a specific message form, and the applicable scenarios are relatively limited. Summary of the invention
[0005] The embodiment of the present application provides a chat message display method, device, terminal, storage medium and program product. The technical solution is as follows:
[0006] On the one hand, an embodiment of the present application provides a method for displaying a chat message, the method comprising:
[0007] Displaying a chat interface, the chat interface including a chat message display area and a virtual object display area, the virtual object display area including at least two virtual objects, the chat message display area being used to display historical chat messages, and different virtual objects corresponding to different accounts;
[0008] When a first chat message sent by a first account is received, displaying the first chat message at a message display position corresponding to a first virtual object in the virtual object display area, where the first virtual object is a virtual object corresponding to the first account;
[0009] When the display duration of the first chat message in the virtual object display area reaches a duration threshold, the first chat message is moved to the chat message display area for display.
[0010] On the other hand, an embodiment of the present application provides a chat message display device, the device comprising:
[0011] A display module, used to display a chat interface, wherein the chat interface includes a chat message display area and a virtual object display area, wherein the virtual object display area includes at least two virtual objects, and the chat message display area is used to display historical chat messages, and different virtual objects correspond to different accounts;
[0012] A first message display module, configured to display, upon receiving a first chat message sent by a first account, the first chat message at a message display position corresponding to a first virtual object in the virtual object display area, wherein the first virtual object is a virtual object corresponding to the first account;
[0013] The second message display module is used to move the first chat message to the chat message display area for display when the display time of the first chat message in the virtual object display area reaches a time threshold.
[0014] On the other hand, an embodiment of the present application provides a terminal, which includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the chat message display method as described in the above aspect.
[0015] On the other hand, an embodiment of the present application provides a computer-readable storage medium, in which at least one instruction is stored, and the at least one instruction is loaded and executed by a processor to implement the chat message display method as described in the above aspect.
[0016] On the other hand, an embodiment of the present application provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the chat message display method provided in various optional implementations of the above aspects.
[0017] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0018] In an embodiment of the present application, the chat interface is divided into a chat message display area and a virtual object display area. Virtual objects corresponding to different accounts are displayed in the virtual object display area, and historical chat messages are displayed in the chat message display area. When a first chat message sent by a first account is received, the terminal can display the first chat message at the message display position corresponding to the first virtual object, creating a visual effect that the first chat message is sent by the first virtual object. In this process, virtual objects are combined with chat messages to enrich the display method of chat messages. In addition, after the display time of the first chat message in the virtual object display area reaches the time threshold, the first chat message is moved to the chat message display area for display, which can enrich the display method of chat messages while taking into account the user's browsing needs for historical messages. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 A schematic diagram showing an implementation environment provided by an embodiment of the present application is shown;
[0021] Figure 2 A schematic diagram of a virtual object in a chat interface is shown;
[0022] Figure 3 A flowchart of a chat message display method provided by an exemplary embodiment of the present application is shown;
[0023] Figure 4 A schematic diagram showing a chat message display method provided by an exemplary embodiment of the present application is shown;
[0024] Figure 5 A schematic diagram of displaying chat messages provided by an exemplary embodiment of the present application is shown;
[0025] Figure 6 A schematic diagram showing superimposed display of message components provided by an exemplary embodiment of the present application is shown;
[0026] Figure 7 A schematic diagram showing a voice message playing method provided by an exemplary embodiment of the present application is shown;
[0027] Figure 8 A flowchart of a chat message display process provided by an exemplary embodiment of the present application is shown;
[0028] Fig. 9A flowchart of interaction between a user, an instant messaging client, and an instant messaging server provided by an exemplary embodiment of the present application is shown;
[0029] Fig.10 A schematic diagram of updating a virtual object layout provided by an exemplary embodiment of the present application is shown;
[0030] Fig.11 A schematic diagram showing updating a virtual object in a virtual object display area provided by an exemplary embodiment of the present application is shown;
[0031] Fig.12 A schematic diagram of controlling a virtual object state provided by an exemplary embodiment of the present application is shown;
[0032] Fig.13 A schematic diagram showing a virtual object performing a target message display action provided by an exemplary embodiment of the present application is shown;
[0033] Fig.14 A schematic diagram showing a virtual state of a virtual object provided by an exemplary embodiment of the present application is shown;
[0034] Fig.15 A structural block diagram of a chat message display device provided by an exemplary embodiment of the present application is shown;
[0035] Fig.16 A structural block diagram of a terminal provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0036] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0037] It should be noted that, before collecting the messages sent by the chat account and the relevant data of the virtual object corresponding to the chat account and in the process of collecting the relevant data of the user, the present application can display a prompt interface, a pop-up window or output a voice prompt information, and the prompt interface, pop-up window or voice prompt information is used to prompt the user that the relevant data is currently being collected, so that the present application only starts to execute the relevant steps of obtaining the relevant data of the user after obtaining the confirmation operation issued by the user to the prompt interface or pop-up window, otherwise (that is, when the confirmation operation issued by the user to the prompt interface or pop-up window is not obtained), the relevant steps of obtaining the relevant data of the user are terminated, that is, the relevant data of the user is not obtained. In other words, the information involved in the present application (including but not limited to user device information, user personal information, etc., information of the virtual object controlled by the chat account corresponding to the user), chat messages, data (including but not limited to data for analysis, stored data, displayed data, etc.) and signals are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the chat messages sent by the chat account and the virtual object information corresponding to the chat account involved in the present application are all obtained under full authorization.
[0038] Please refer to Figure 1 , which shows a schematic diagram of an implementation environment provided by an embodiment of the present application. The implementation environment may include: a first terminal 110, a server 120 and a second terminal 130.
[0039] The first terminal 110 and the second terminal 130 are electronic devices with a chat interface display function. The chat interface may be a functional module in an application with a chat interface display function, or may be an independent desktop client or web client. For example, the chat interface display function is a functional module in an instant messaging application, which is used for registered users to browse chat content through the chat interface. The electronic device may be a smart phone, a tablet computer, a personal computer, a wearable device, or a vehicle-mounted terminal, etc.
[0040] Optionally, the applications installed on the first terminal 110 and the second terminal 130 are the same, or the applications installed on the two terminals are the same type of applications on different operating system platforms (Android or IOS). The first terminal 110 may refer to one of a plurality of terminals, and the second terminal 130 may refer to another of a plurality of terminals. This embodiment is only illustrated by taking the first terminal 110 and the second terminal 130 as examples. The device types of the first terminal 110 and the second terminal 130 are the same or different, and the device type includes at least one of: a smart phone, a tablet computer, an e-book reader, an MP3 player, an MP4 player, a laptop portable computer, and a desktop computer.
[0041] Figure 1 In the description, the first terminal 110 and the second terminal 130 are smartphones and are installed with an application having an instant messaging function. However, this is not a limitation.
[0042] Figure 1 Only two terminals are shown in the figure, but in different embodiments, there are multiple other terminals that can access the server 120. The first terminal 110, the second terminal 130 and other terminals are connected to the server 120 via a wireless network or a wired network.
[0043] The server 120 includes at least one of a single server, a server cluster consisting of multiple servers, a cloud computing platform, and a virtualization center. The server 120 is used to provide background services for applications that support instant messaging. Optionally, the server 120 undertakes the main computing work and the terminal undertakes the secondary computing work; or, the server 120 undertakes the secondary computing work and the terminal undertakes the main computing work; or, the server 120 and the terminal adopt a distributed computing architecture for collaborative computing.
[0044] Server 120 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.
[0045] In an illustrative example, the server 120 includes a memory 121, a processor 122, a user account database 123, a virtual object database 124, and a user-oriented input / output interface (I / O interface) 125. The processor 122 is used to load instructions stored in the server 120, process the user account database 123 and the virtual object database 124; the user account database 123 is used to store data of user accounts used by the first terminal 110, the second terminal 130 and other terminals, such as user account avatars, user account nicknames, etc.; the virtual object database 124 is used to store object data of virtual objects corresponding to each user account; the user-oriented I / O interface 125 is used to establish communication and exchange data with the first terminal 110 and / or the second terminal 130 through a wireless network or a wired network, so as to realize the sending and receiving of chat messages between accounts.
[0046] Nowadays, instant messaging has gradually become one of the important channels for users to communicate in daily life. In order to enrich the fun of the chat process, a method of adding virtual objects to the chat interface is proposed in the relevant technology. In this method, the virtual objects can respond to a specific range of expressions sent by the account and make the same action. For example, please refer to Figure 2 , which shows a schematic diagram of virtual objects in a chat interface, wherein a first virtual object 202 and a second virtual object 203 are displayed in a chat interface 201. A plurality of candidate actions are included in a candidate action list 204. In response to a sending operation of a candidate action by a first account, a first virtual object 202 corresponding to the first account will execute the action sent by the first account.
[0047] However, in the solutions provided by the relevant technologies, the virtual objects can only be combined with specific forms of chat messages (i.e., displaying the sent action expressions) when the user sends specific message forms (i.e., sending action expressions), and when the user sends other messages, the virtual objects cannot display other forms of messages. That is, the solutions provided by the relevant technologies can only be used in specific scenarios and have poor applicability.
[0048] Please refer to Figure 3 , which shows a flowchart of a method for displaying chat messages provided by an exemplary embodiment of the present application. This embodiment uses this method for Figure 1 Taking the terminal and server shown in the figure as an example, the method may include the following steps:
[0049] Step 301, display the chat interface.
[0050] Among them, the chat interface includes a chat message display area and a virtual object display area. The virtual object display area contains at least two virtual objects. The chat message display area is used to display historical chat messages. Different virtual objects correspond to different accounts.
[0051] Optionally, the chat interface may be an instant messaging interface of various instant messaging clients installed in the terminal, or the chat interface may be a web client with an instant messaging function, and the chat interface is used to display chat messages to the user and allow the user to send chat messages. In addition, in the embodiment of the present application, the chat interface can also be used to display virtual objects corresponding to different accounts to the user.
[0052] Optionally, the virtual object included in the chat interface is an account that has established a chat relationship with the local account.
[0053] Optionally, the instant messaging client includes an interface for providing settings for virtual objects. By designing and dressing up the virtual objects, the virtual images corresponding to different accounts can be the same or different. At the same time, in order to facilitate the distinction between virtual objects corresponding to different accounts, the terminal can display unique labels of the virtual objects around the virtual objects in the virtual object display area in the chat interface. The label can be the name of the account or other labels that can be used to distinguish. This embodiment is not limited to this.
[0054] Optionally, the virtual object indicates a virtual object controlled by an account of the instant messaging client, including but not limited to a virtual person, a virtual animal, an animation or cartoon character, etc., and different virtual objects correspond to different accounts.
[0055] Optionally, in the chat interface, the terminal may display a clear dividing line between the virtual object display area and the chat message display area, or may not display it, which is not limited in this embodiment.
[0056] Optionally, in response to the user's selection operation on the target chat in the message list of the instant messaging client, the terminal displays a chat interface, and the chat interface displays virtual objects corresponding to the respective accounts participating in the chat.
[0057] Optionally, when a single chat or a chat group is established between at least two accounts, the terminal can also display avatars, account nicknames, etc. of the accounts participating in the chat in the chat interface, and can also display text message input controls, voice message input controls, etc. in the chat interface.
[0058] Step 302: When a first chat message sent by a first account is received, the first chat message is displayed at a message display position corresponding to the first virtual object in the virtual object display area.
[0059] The first virtual object is a virtual object corresponding to the first account.
[0060] Optionally, the first account may be an account logged in by the local terminal, or an account logged in by an instant messaging client installed in another terminal. When the first account is an account logged in by the local terminal, the terminal obtains the first chat message sent by the user from the local terminal; when the first account is an account logged in by an instant messaging client installed in another terminal, the local terminal obtains the first chat message sent by the first account through the instant messaging server.
[0061] Optionally, when the first account is an account logged in by an instant messaging client installed on other terminals, after the first account sends the first chat message, the message is sent to the instant messaging server, which pushes it to the corresponding clients of other accounts participating in the chat, so that the terminal receives the first chat message.
[0062] Optionally, different virtual objects in the virtual object display area have their own corresponding message display positions, and since the amount of content in a chat message is not fixed, in some cases, the message display positions corresponding to different virtual objects may overlap. To avoid this, the terminal can dynamically adjust the message display positions corresponding to different accounts when displaying chat messages, so as to avoid overlap of different chat messages sent by different accounts, which affects the user's viewing of chat messages.
[0063] Step 303: When the display time of the first chat message in the virtual object display area reaches a time threshold, the first chat message is moved to the chat message display area for display.
[0064] In order to enable the virtual object to continuously display the latest messages, a time threshold for the display time of chat messages in the virtual object display area can be set. When the display time in the virtual object display area reaches the time threshold, it will automatically move to the chat message display area for users to browse and view.
[0065] Optionally, when the first chat message is moved to the chat message display area for display, a message moving animation is displayed, and the animation is used to show the user the moving process of the first chat message. In addition, the moving effect of the terminal can be set to allow the user to experience different message display effects.
[0066] The duration threshold is the maximum duration for which the chat message is displayed in the virtual object display area, and the display duration is counted from the receipt of the chat message. For example, the duration threshold can be set to 2s.
[0067] For illustration, please refer to Figure 4 , which shows a schematic diagram of a chat message display method provided by an exemplary embodiment of the present application.
[0068] The chat interface displays a message display area 401 and a virtual object display area 402, and four virtual objects corresponding to four accounts are displayed in the virtual object display area. After the first account sends a first chat message 404, the terminal displays the first chat message 404 in the message display position corresponding to the first virtual object 403 corresponding to the first account in the virtual object display area 402. When the display time of the first chat message 404 displayed in the virtual object display area 402 reaches the time threshold, the first chat message 404 is moved to the message display area 401 for display.
[0069] In summary, in the embodiment of the present application, the chat interface is divided into a chat message display area and a virtual object display area. Virtual objects corresponding to different accounts are displayed in the virtual object display area, and historical chat messages are displayed in the chat message display area. When a first chat message sent by a first account is received, the terminal can display the first chat message at the message display position corresponding to the first virtual object, creating a visual effect that the first chat message is sent by the first virtual object. In this process, virtual objects are combined with chat messages to enrich the display method of chat messages. In addition, after the display time of the first chat message in the virtual object display area reaches the time threshold, the first chat message is moved to the chat message display area for display, which can enrich the display method of chat messages while taking into account the user's browsing needs for historical messages.
[0070] In the embodiment of the present application, the component used to display chat messages in the chat interface is a message component, and the chat messages are displayed in the message component. In addition, since chat messages may have different message types, such as voice messages, text messages, picture messages, and video messages, etc., when the message types are different, the message components used to display the chat messages should also be different.
[0071] When receiving the first chat message sent by the first account, the terminal displays the first message component at the message display position corresponding to the first virtual object based on the message type of the first chat message.
[0072] Among them, the message component is used to display chat messages, and different types of chat messages correspond to different message components.
[0073] Optionally, the message types of the chat message may include voice message, video message, text message, picture message, file message, etc.
[0074] The terminal selects different message components when displaying different types of chat messages. Optionally, when the chat message type is a video message, the video message component includes a video cover, and the video message component includes a video playback control. In response to a trigger operation on the video playback control in the video message component, the terminal displays a video playback interface and starts playing the video message. In addition, the video playback interface is located on the upper layer of the chat interface.
[0075] Optionally, when the chat message type is a picture message, the picture message component includes a thumbnail of the picture. Usually, the size of the thumbnail is smaller than the size of the picture in the picture message. In response to the triggering operation of the picture message component, the terminal displays a picture display interface, and displays the original size picture in the picture display interface. Moreover, the picture display interface is located on the upper layer of the chat interface.
[0076] Optionally, when the chat message type is a file message, the file message component includes a file download control or a file browsing control, and the terminal starts downloading the file in response to the user's triggering operation on the download control, and jumps to the file browsing interface after the download is completed. Alternatively, the terminal directly jumps to the file browsing interface in response to the user's triggering operation on the file browsing control.
[0077] In the virtual object display area, chat messages are displayed through chat components. In the chat message display area, chat messages should also be located in the message component.
[0078] When the display time of the first message component in the virtual object display area reaches the time threshold, the first message component is moved to the chat message display area for display, and the account identifier of the first account is displayed at the corresponding position of the first message component.
[0079] During the movement, the message component still maintains its original state, that is, in the process of moving the first chat message from the virtual object display area to the chat message display area in the chat interface, the display form of the first chat message (that is, the first message component) does not change.
[0080] Optionally, the account representation is used to distinguish different accounts, and the account identification may include an account avatar, an account nickname, etc., which is not limited in this embodiment.
[0081] Displaying the account ID in the chat message display area helps to distinguish the accounts that send different chat messages.
[0082] For illustration, please refer to Figure 5 , which shows a schematic diagram of displaying chat messages provided by an exemplary embodiment of the present application.
[0083] Among them, in the chat interface 501, the first virtual object 506 sends the first chat message 505, and the terminal displays the first message component 504 at the message display position corresponding to the first chat account, and the first message component 504 includes the first chat message 505. When the display time of the first message component 504 in the virtual object display area reaches the time threshold, the first message component 504 is moved to the chat message display area for display. In the second chat interface 502 in the figure, a moving animation is displayed, and the first message component 504 is in the process of moving. In the third chat interface 503, the first message component 504 has been successfully moved to the chat message display area, and the account identification 507 of the first account is displayed in the chat message display area, and the account identification 507 includes the account nickname 509 (first account nickname) and the account avatar 508.
[0084] In some embodiments, if the account sends chat messages quickly, the first account may send a second chat message before the first chat message is moved to the chat message display area. At this time, the terminal preferentially displays the second chat message to the user at the historical message display position corresponding to the first virtual object.
[0085] Therefore, when the display time of the first chat message in the virtual object display area does not reach the time threshold and a second chat message sent by the first account is received, based on the message type of the second chat message, the second message component is superimposed on the upper layer of the first message component, and the second message component is used to display the second chat message.
[0086] Optionally, when the display duration of the first chat message in the virtual object display area does not reach the duration threshold and at least two second chat messages sent by the first account are received, based on the sending time of the at least two second chat messages, at least the second message components of the next year are superimposed and displayed in the order of sending time on the upper layer of the first message component, and the second message component corresponding to the second chat message with the latest sending timestamp is displayed on the top layer.
[0087] Optionally, when the display time of the first chat message in the virtual object display area does not reach the display threshold and a second chat message sent by the first account is received, the second message component is folded under the first message component based on the message type of the second chat message. In this way, the chat messages can be displayed to the user in sequence according to the order of sending time.
[0088] Optionally, the display duration of the chat message component in the virtual object display area can be counted from the moment the account sends the chat message, or can be counted from the moment the chat message component corresponding to the chat message is displayed on the top layer in the chat interface. When the display duration of the first chat message in the virtual object display area does not reach the display threshold, and a second chat message sent by the first account is received, the second message component is folded at the lower layer of the first message component based on the message type of the second chat message. Then, when the chat message component corresponding to the chat message is displayed on the top layer in the chat interface and the timing starts, after the message component of the first message is moved to the chat message display area for display, the display duration of the second chat message in the virtual object display area starts to be counted, and after the display duration of the second chat component in the virtual object display area reaches the duration threshold, the second chat component is moved to the chat message display area for display, which is conducive to users browsing each chat message in the virtual object display area in chronological order.
[0089] Optionally, when the display duration of the first chat message in the virtual object display area does not reach the duration threshold and a third chat message sent by the second account is received, the third chat message component is displayed at the message display position corresponding to the second account based on the message type of the third chat message. And the display of the third chat message component does not affect the display of the first message component. For example Figure 5 The third chat message “Eeee” sent by the third account is displayed at the message display position corresponding to the corresponding third virtual object.
[0090] Since the duration threshold of the display duration of the chat message in the virtual object display area is pre-set, the duration of display of all chat messages in the virtual object display area is consistent. When the display duration of the first chat message in the virtual object display area reaches the duration threshold, the first chat message is moved to the chat message display area for display. When the display duration of the second chat message in the virtual object display area reaches the duration threshold, the second message component is also moved to the chat message display area for display.
[0091] Furthermore, in order to facilitate users to browse historical chat messages, different chat messages in the chat message display area are arranged and displayed in the order of sending time, that is, the first chat message and the second chat message in the chat message display area are arranged according to the message sending time.
[0092] For illustration, please refer to Figure 6 , which shows a schematic diagram of superimposed display of message components provided by an exemplary embodiment of the present application.
[0093] When a first chat message sent by a first account is received, a first message component 602 is displayed at a message display position corresponding to a first virtual object 601 in a virtual object display area in a chat interface. When the display duration of the first message component in the virtual object display area does not reach a duration threshold, and the terminal receives a second virtual message sent by a second account at this time, a second message component 603 is displayed in an overlay on the first message component 602 in the virtual object display area based on the message type of the second virtual message.
[0094] Furthermore, after the display time of the first message component 602 in the virtual object display area reaches the time threshold, the first message component 602 is moved to the chat message display area for display, and the first message component 602 is located after other historical chat messages. When the display time of the second message component 603 in the virtual object display area reaches the time threshold, the second message component 603 is moved to the chat message display area for display, and the second message component 603 is arranged after the first message component 602.
[0095] In an embodiment of the present application, chat messages are displayed in chat components, and when two days of chat messages sent by the same account are received within a time threshold, the corresponding chat components of the two chat messages are superimposed, so that the latest virtual messages can be displayed to the user in the virtual object display area while avoiding the situation where too many chat message components are displayed, causing confusion in the chat interface display content.
[0096] In a possible implementation, the message type of the first chat message received by the terminal is a voice message, that is, the first chat message is a first voice message, and the first voice message component corresponding to the first voice message is displayed at the message display position corresponding to the first virtual object in the virtual object display area.
[0097] In a possible implementation, in order to facilitate the user to directly obtain the information content contained in the first voice message, the terminal can set the first voice message component corresponding to the first voice message to a triggered state, and after receiving the voice message in the triggered state, the voice message is automatically played. That is, when the first voice message sent by the first account is received, the first voice message is automatically played.
[0098] After receiving the first chat message, the terminal determines the message type corresponding to the chat message. When determining that the chat message is a voice message, the terminal displays the first voice message component.
[0099] Optionally, the first voice message component includes a voice playing control. When the first voice message is being played, in response to a triggering operation on the voice playing control, the first voice message is stopped from being played.
[0100] Furthermore, when the display duration of the first chat message set in the virtual object display area reaches the duration threshold, the first chat message is moved to the chat message display area for display.
[0101] When the display time of the first voice message component in the virtual object display area reaches the time threshold, the first voice message component is moved to the chat message display area for display.
[0102] Furthermore, since the duration threshold of the display duration may be shorter than the voice duration of the first voice message, when the display duration of the first voice message component in the virtual object display area reaches the duration threshold, the first voice message component is moved to the chat message display area for display and the first voice message is kept playing until the first voice message is played, or an event to stop playing the first voice message is triggered.
[0103] Optionally, the first voice message component can also be used to display the voice playback status, displaying the first status when the voice message is playing, and displaying the second status when the voice message is not playing. In the process of the first voice message component moving from the virtual object display area to the chat message display area, the playback status displayed by the voice message component will not change.
[0104] In another possible implementation, the terminal displays a component state control control in response to a first trigger operation on the first virtual object. When the first voice message component is in a triggered state, in response to the trigger operation on the component state control control, the first voice message component is set to a non-triggered state, and after receiving a voice message in the non-triggered state, the voice message is not automatically played.
[0105] The component state control control is used to control the state of the voice message component, and the state of the voice message component includes a triggered state and a non-triggered state.
[0106] In the triggered state, the voice message will be played automatically after it is received. In the non-triggered state, the voice message will not be played automatically after it is received.
[0107] Optionally, when the voice message component is in a triggered state, during the process of playing the voice message, the voice message component is set to a non-triggered state in response to a triggering operation on the voice message component.
[0108] Among them, the first trigger operation on the first virtual object can be a long press operation, a sliding operation, a continuous click operation, a two-finger trigger operation, a multi-finger trigger operation, etc., which is not limited in this embodiment.
[0109] In an embodiment of the present application, the terminal can control the state of the voice message component in response to the first touch operation on the first virtual object, so that the user can set the state of the voice message component for a certain account in this way, thereby controlling whether the voice message sent by the account is automatically played.
[0110] In some embodiments, when the display duration of the first chat message in the virtual object display area does not reach the duration threshold, and a second chat message sent by the first account is received, the second message component is superimposed on the upper layer of the first message component based on the message type of the second chat message. When the first chat message and the second chat message are both voice messages, that is, when the display duration of the first voice message sent by the first account in the virtual object display area does not reach the duration threshold, the second message component is superimposed on the upper layer of the first voice message component.
[0111] And in a possible implementation manner, when the second voice message is received and the first voice message has not been played completely, the first voice message is stopped from being played and the second voice message is started to be played.
[0112] The terminal is set with a voice playback mechanism, which stipulates that two voice messages sent by the same account cannot be played at the same time. Playing two voice messages sent by the same account at the same time is not conducive to the user clearly obtaining useful information in the two voice messages.
[0113] In the voice playback mechanism, voice messages from different accounts can be played at the same time, and the playback mechanism between two voice messages will not affect each other.
[0114] Therefore, in another possible implementation, when the third voice message sent by the second account is received and the first voice message has not been played completely, the first voice message is kept playing and the third voice message is started to be played.
[0115] For illustration, please refer to Figure 7 , which shows a schematic diagram of a voice message playing method provided by an exemplary embodiment of the present application.
[0116] When receiving the first chat message sent by the first account, the terminal determines that the type of the first chat message is a voice message, and then displays the first voice message component 702 at the message display position corresponding to the first virtual object 701, and starts playing the first voice message. Subsequently, when the duration of the first voice message component being displayed in the virtual object display area does not reach the duration threshold, the terminal receives the second voice message sent by the first account, and then the terminal superimposes the second voice message component 703 on the upper layer of the first voice message component 702 for display. If the first voice message has not been played completely when the second voice message is received, the first voice message is stopped and the second voice message is started.
[0117] After the display time of the first voice message component in the virtual object display area reaches the time threshold, the first voice message component 702 moves to the chat message display area for display. If the second voice message has not been played to the end, and the terminal receives a third voice message sent by a third account, the third voice message component 704 is displayed at the message display position corresponding to the third virtual object in the virtual object display area. In addition, the third voice message can be played without affecting the playback of the second voice message.
[0118] According to the above embodiment, the playing mechanisms of voice messages sent by different accounts are different. Therefore, after receiving a chat message, the terminal needs to determine the message type of the received chat message and then determine the display mechanism of the current message.
[0119] Please refer to Figure 8 , which shows a flowchart of a chat message display process provided by an exemplary embodiment of the present application.
[0120] In the case of receiving the second chat message sent by the first account, first determine whether there is a first message component being displayed at the message display position corresponding to the first virtual object. If not, the terminal displays the second message component corresponding to the second chat message at the message display position corresponding to the first virtual object. If the first message component already exists and is displayed at the message display position, the second message component is displayed on the upper layer of the first message component, that is, the first message component is folded behind the second message component. At the same time, the terminal needs to determine the message type of the second chat message and whether the second chat message is a voice message. If the second chat message is a voice message, that is, the second voice message sent by the first account is received, the terminal needs to determine whether there is a first voice message sent by the first account that is currently being played. If there is a first voice message being played, stop playing the first voice message and start playing the second voice message.
[0121] After the second message component is displayed at the message display position, the timer starts, and when the display time of the second message component in the virtual object display area reaches the time threshold, the second message component is moved from the message display position to the message display area for display, and the avatar and nickname of the first account that sent the second chat message are displayed. When the display time of the second message component in the virtual object display area does not reach the time threshold, the second message component continues to be displayed at the message display position.
[0122] Correspondingly, the user can send and view chat messages by triggering the chat interface in the instant messaging client. The instant messaging client realizes communication between multiple terminals through the instant messaging server that provides background services for it.
[0123] For illustration, please refer to Fig. 9 , which shows an interaction flow chart between a user, an instant messaging client, and an instant messaging server provided by an exemplary embodiment of the present application.
[0124] After the user triggers the message sending control to indicate sending the first chat message, the instant messaging client transmits the first chat message to the instant messaging server in response to the user's message sending operation. After receiving the first chat message, the instant messaging server pushes the first chat message to the client logged in by the member account participating in the chat. After receiving the first chat message, the instant messaging client installed on different terminals first determines whether there is a second chat message being displayed in the message display position of the virtual object corresponding to the account sending the first chat message. If there is a second chat message, the second chat message is folded to the lower layer of the first chat message. In addition, if the first chat message is a voice message, the terminal will determine whether there is an unplayed voice message in the account sending the first chat message. If there is an unplayed second voice message, the second voice message is stopped and the first voice message is automatically played. The first message component corresponding to the first chat message is displayed in the message display position, that is, the virtual object display area. And after displaying the first message component, the terminal determines whether the duration of the first message component being displayed in the virtual object display area reaches the duration threshold. If the duration threshold is reached, the first message component is moved to the chat message display area for display.
[0125] In the embodiment of the present application, when a terminal receives a voice message, it first determines whether the account that sent the voice message has a voice message being played. When two voice messages are received consecutively from the same account, the latest voice message is played to the user. When different accounts send voice messages at the same time, different voice messages can be played, so that multiple people can talk together, allowing users to achieve the effect of discussion by sending voice messages.
[0126] In an embodiment of the present application, the chat interface can be a separate chat interface between two accounts, or a group chat interface between multiple accounts. In addition, due to the number of virtual object pairs displayed in the virtual object display area, the chat messages displayed in the virtual object display area are not clear enough, and it is difficult to distinguish the virtual objects corresponding to different accounts. In addition, too many virtual object pairs are displayed, resulting in poor effect of displaying chat messages in the chat interface. Therefore, there is a display quantity threshold for the number of virtual objects displayed in the virtual object display area in the chat interface, and the display quantity threshold is the maximum number of virtual objects displayed in the virtual object display area. For example, the display quantity threshold can be set to 5.
[0127] Optionally, when the chat interface is a separate chat interface, virtual objects of two accounts participating in the separate chat are displayed in the virtual object display area.
[0128] Optionally, when the chat interface is a group chat interface and the number of accounts included in the chat group is less than a display quantity threshold, virtual objects corresponding to all accounts in the chat group are displayed in the virtual object display area.
[0129] If in a separate chat interface, that is, two accounts participate in the chat, and each account corresponds to a virtual object, two virtual objects are displayed in the chat interface.
[0130] If in the group chat interface, if the chat group contains fewer accounts, for example, only 3 accounts, which is less than the quantity threshold of 5, then the virtual objects corresponding to all the accounts in the chat group can be displayed in the chat interface.
[0131] Optionally, when the chat interface is a group chat interface and the number of accounts contained in the chat group is greater than a display quantity threshold, virtual objects corresponding to some accounts in the chat group are displayed in the virtual object display area.
[0132] The number of some accounts is less than the display quantity threshold, and the some accounts include at least one of accounts whose activity in the chat group is higher than the activity threshold and accounts designated in the chat group.
[0133] Optionally, when some accounts are designated accounts, the designated accounts may be default accounts, such as accounts with group management privileges, and only virtual objects corresponding to the administrator account are displayed in the chat interface. In addition, the designated accounts may also be some accounts designated by the administrator account.
[0134] Optionally, in the case where some accounts are accounts in the chat group whose activity is higher than the activity threshold, the terminal calculates the activity for all accounts in the group based on the current period of time in which they participate in the chat. The current period of time may be 10 minutes before the current moment. If the account has sent voice, text, pictures, etc. within these 10 minutes, the corresponding activity will be increased, and different weights can be set for different message types. Therefore, the terminal can determine the activity of each account within these 10 minutes, and if the activity is higher than the activity threshold, the virtual object corresponding to the account is displayed in the chat interface. For example, if the first account has sent 10 voice messages, 5 emoticons, and 30 text messages in the past 10 minutes, the terminal can determine that the activity of the first account is 70 based on the chat messages sent by the first account. If the set activity threshold is 50, the activity of the first account is higher than the activity threshold, and the first virtual object corresponding to the first account can be displayed in the virtual object display area in the chat interface. It should be noted that this embodiment does not limit the method for calculating the activity of different accounts.
[0135] In an embodiment of the present application, a threshold value for the number of virtual objects that can be displayed in the virtual object display area is set to ensure the display effect of chat messages, enable users to clearly determine the account that sends the chat message, and enhance the combination effect of virtual objects and chat messages.
[0136] In one possible implementation, when the chat interface is a group chat interface, if the member accounts in the chat group change, for example, a member account joins the group or a member account leaves the group, the virtual objects in the virtual object display area need to be rearranged to improve the display effect of the virtual objects.
[0137] Specifically, when the member accounts included in the chat group are changed, the layout of the virtual objects in the virtual object display area is updated based on the number of virtual objects displayed in the virtual object display area.
[0138] Optionally, when a third account in the group exits the chat group, the number of member accounts in the group decreases. If all virtual objects in the group are displayed in the virtual object display area, the layout of the virtual objects in the virtual object display area is updated to a layout containing fewer slots. For example, if there are 4 accounts in the chat group, that is, 4 virtual objects are displayed in the virtual object display area, then after the third account exits the group, there are 3 accounts in the chat group, that is, 3 virtual objects are displayed in the virtual object display area. At this time, the terminal updates the original layout of the four virtual objects to a layout suitable for three virtual objects.
[0139] Optionally, when a third account joins the chat group and the number of member accounts in the group increases, if all virtual objects in the group are displayed in the virtual object display area, the layout of the virtual objects in the virtual object display area is updated to a layout containing more slots. For example, if there are 4 accounts in the chat group, that is, 4 virtual objects are displayed in the virtual object display area, then after the third account joins the chat group, there are 5 accounts in the chat group, that is, 5 virtual objects are displayed in the virtual object display area. At this time, the terminal updates the original layout of 4 virtual objects to a layout suitable for 5 virtual objects.
[0140] Optionally, when a third account joins the chat group, the terminal obtains information about a third virtual object corresponding to the third account, including image information and status information of the third virtual object.
[0141] For illustration, please refer to Fig.10 , which shows a schematic diagram of updating the virtual object layout provided by an exemplary embodiment of the present application.
[0142] The chat group contains four accounts, corresponding to four virtual objects, namely the first virtual object 1001, the second virtual object 1002, the third virtual object 1003 and the fourth virtual object 1004. And the layout of the four virtual objects is a straight line. After the fifth account joins the chat group, the fifth virtual object 1005 is displayed in the chat group, and the layout of the virtual objects in the virtual object display area is updated. In the updated layout, the layout of the five virtual objects is no longer in a straight line, but is arranged in an interlaced manner, forming two rows in total.
[0143] In the embodiment of the present application, the terminal updates the virtual object display area based on the changes in the member accounts in the group, which is conducive to improving the aesthetics of the chat interface and can improve the display effect of the virtual objects.
[0144] In another possible implementation, when the activity level of the member account participating in the chat changes, for example, there is an account that participates in the chat for a period of time, but temporarily stops participating in the chat after a period of time, the activity level of the member account changes. In this case, the virtual object displayed in the virtual object display area can be updated in real time according to the change in the activity level of the chat member account.
[0145] Specifically, when the activity status of the target virtual object corresponding to the target account in the virtual object display area changes, the virtual object displayed in the virtual object display area is updated based on the activity change trend of the target account.
[0146] The active status is used to indicate whether the activity of the target account is higher than the activity threshold.
[0147] Optionally, a first virtual object corresponding to a first account is displayed in the virtual object display area. When the time period during which a chat message sent by the first account is not received reaches a first set time period, that is, the activity of the first account decreases, the virtual object displayed in the virtual object display area is updated, and the first virtual object does not exist in the updated virtual object display area.
[0148] Optionally, if the first virtual object corresponding to the first account is not displayed in the virtual object display area, and the chat activity of the first account is higher than the activity threshold within a second set time period, that is, the activity of the first account is improved, the virtual object displayed in the virtual object display area is updated, and the first virtual object is displayed in the updated virtual object display area.
[0149] Optionally, in the process of updating the virtual objects displayed in the virtual object display area, the corresponding virtual objects may be controlled to perform actions that match the activity changes. For example, when the activity of the first account decreases, the first virtual object may be controlled to perform an action of leaving the virtual object display area. When the activity of the first account increases, the first virtual object may be controlled to perform an animation of entering the virtual object display area.
[0150] For illustration, please refer to Fig.11 , which shows a schematic diagram of updating virtual objects in a virtual object display area provided by an exemplary embodiment of the present application.
[0151] The chat group contains four accounts, corresponding to four virtual objects, namely the first virtual object 1101, the second virtual object 1102, the third virtual object 1103 and the fourth virtual object 1104. If no chat message is received from the fourth account within the first set time, the activity of the fourth account decreases, so the terminal updates the virtual object displayed in the virtual object display area. In the updating process, the fourth virtual object 1104 corresponding to the fourth account is controlled to perform the action of leaving the virtual object display area, so as to present to the user the effect that the fourth virtual object walks out of the virtual object display area and waves to other virtual objects.
[0152] In an embodiment of the present application, updating the virtual objects in the virtual object display area based on the activity level of the member accounts participating in the chat is conducive to better integrating the virtual objects with the chat process, and the virtual objects displayed in the current virtual object display area can reflect the accounts with higher current activity.
[0153] In an embodiment of the present application, the state of the virtual object displayed in the virtual object display area can be set. Specifically, when a second trigger operation on the first virtual object is received, a state candidate list is displayed, and the state candidate list contains at least one candidate state.
[0154] In response to a selection operation of a first target state among the candidate states, the first virtual object is controlled to exhibit the first target state.
[0155] The second trigger operation may be a long press operation, a sliding operation, a continuous click operation, a two-finger trigger operation, a multi-finger trigger operation, etc., which is not limited in this embodiment.
[0156] Optionally, the candidate list may include multiple candidate states, and the candidate states are only examples of the current action or expression of the virtual object. After selecting a candidate state, the MC virtual object will not change its own dress, body shape, or position during the process of displaying the first target state.
[0157] Optionally, there are different classifications of candidate states in the state candidate list, such as daily classification, mood classification, rest classification, work and study classification, etc.
[0158] Optionally, different accounts can only control the state of the virtual objects corresponding to the account, and cannot set the state of the virtual objects corresponding to other accounts.
[0159] For illustration, please refer to Fig.12 , which shows a schematic diagram of controlling the state of a virtual object provided by an exemplary embodiment of the present application.
[0160] Five virtual objects are displayed in the chat interface, and the first virtual object 1201 corresponding to the first account is currently displayed in the first display state. In response to the second trigger operation on the first virtual object 1201 (corresponding to the click operation on the first virtual object 1201 in the figure), the terminal displays a candidate state list 1202, and multiple candidate states are displayed in the candidate state list. In response to the click operation on the first target state 1203, the terminal controls the first virtual object 1201 to display the first target state 1203.
[0161] In the embodiment of the present application, the state of the virtual object can be set by the user, which is conducive to improving interactivity and the diversity of the virtual object display state.
[0162] In a possible implementation, since different chat messages may have different message types, when receiving different types of chat messages, the virtual object will display different actions to reflect that the received chat messages have different message types.
[0163] Specifically, when a first chat message sent by a first account is received, a message type of the first chat message is determined.
[0164] Subsequently, according to the message type of the first chat message, the target message display action of the first virtual object is determined, and different message types correspond to different message display actions.
[0165] Finally, the first virtual object is controlled to execute the target message display action.
[0166] The message type of the first chat message may be a voice message, a video message, a file message, an image message, etc. Usually, the actions taken by users when viewing different types of messages are different. Therefore, based on different message types, the virtual object is controlled to perform actions that match the message type, so that the virtual object is more humanized when displaying the chat message.
[0167] Optionally, when the first chat message is a voice message, the message display action may be the action of the virtual object listening to the voice through a mobile phone; when the first chat message is a video message, the message display action may be the action of the virtual object taking out a mobile phone to play the video; when the first chat message is a picture message, the message display action may be the action of the virtual object clicking to view the picture.
[0168] It should be noted that the embodiments of the present application do not limit the message display actions corresponding to different message types.
[0169] For illustration, please refer to Fig.13 , which shows a schematic diagram of a virtual object performing a target message display action provided by an exemplary embodiment of the present application.
[0170] The chat interface displays a first virtual object, a first virtual object, a first virtual object, and a first virtual object, wherein the first virtual object 1301 is a virtual object corresponding to the first account. When the terminal receives the first chat message sent by the first account, it identifies the message type of the first chat message and determines that the first chat message is a voice message. Subsequently, the terminal displays the first voice message component 1302 at the message display position corresponding to the first virtual object and plays the first voice message. Furthermore, when it is identified that the message type of the first chat message is a voice message, the terminal determines the target message display action corresponding to the voice message and controls the first virtual object 1301 to perform the target message display action. As shown in the figure, the target message display action is the action of the first virtual object standing up, taking out the mobile phone, and putting it to the ear to listen to the voice message.
[0171] In the embodiment of the present application, the corresponding virtual object is controlled to perform corresponding actions according to the message type, which increases the diversity of the forms in which the virtual object displays chat messages, making the message display method and the message type more harmoniously combined.
[0172] In a possible implementation, the terminal can identify whether there is an emoticon identifier in the chat message. An emoticon representation refers to an identifier of an emoticon, and the emoticon identifier can represent a unique emoticon. After receiving an emoticon identifier in a chat message, the terminal needs to display a corresponding emoticon to the user according to the emoticon identifier.
[0173] Optionally, when the first chat message includes an expression identifier, the second target state is determined from the candidate states of the first virtual object, and the state identifier of the second target state matches the expression identifier.
[0174] The first virtual object is controlled to exhibit a second target state.
[0175] After receiving the chat message, the terminal can determine whether there is an expression identifier in the chat message. Different candidate states also correspond to their own state identifiers. For example, there is an expression identifier representing an expression of happiness, and there is also a state identifier for representing a state of happiness, so the expression identifier matches the state identifier.
[0176] And usually, the expression sent by the user can represent the emotion that the user wants to express to a certain extent. Therefore, by matching the state identifier of the candidate state with the expression identifier, the virtual object can express the emotion that the user wants to express.
[0177] Please refer to Fig.14 , which shows a schematic diagram of a virtual object displaying a virtual state provided by an exemplary embodiment of the present application.
[0178] The chat interface displays a first virtual object, a first virtual object, a first virtual object, and a first virtual object, wherein the first virtual object 1401 is a virtual object corresponding to the first account. After receiving the first chat message 1402 sent by the first account, the terminal can determine that the first chat message contains an expression identifier. Thus, the state identifier of the candidate state matching the expression identifier is searched in the candidate state, thereby determining the second target state, and controlling the virtual object 1401 to display the second target state matching the expression in the first chat message.
[0179] The embodiment of the present application is conducive to enhancing the degree of integration between virtual objects and chat messages, by determining that there is an expression identifier in the first message, selecting a status identifier that matches the expression identifier, and controlling the virtual object to display, so that the virtual object status matches the chat message.
[0180] Please refer to Fig.15 , which shows a structural block diagram of a chat message display device provided by an exemplary embodiment of the present application, and the device may include the following structure:
[0181] Display module 1501, used to display a chat interface, the chat interface includes a chat message display area and a virtual object display area, the virtual object display area includes at least two virtual objects, the chat message display area is used to display historical chat messages, and different virtual objects correspond to different accounts;
[0182] A first message display module 1502 is used to display the first chat message at a message display position corresponding to a first virtual object in the virtual object display area when receiving a first chat message sent by a first account, where the first virtual object is a virtual object corresponding to the first account;
[0183] The second message display module 1503 is used to move the first chat message to the chat message display area for display when the display time of the first chat message in the virtual object display area reaches a time threshold.
[0184] Optionally, the first message display module 1502 is used to:
[0185] Based on the message type of the first chat message, display a first message component at the message display position corresponding to the first virtual object, wherein the message component is used to display the chat message, and different types of chat messages correspond to different message components;
[0186] When the display time of the first chat message in the virtual object display area reaches a time threshold, moving the first chat message to the chat message display area for display includes:
[0187] When the display time of the first message component in the virtual object display area reaches the time threshold, the first message component is moved to the chat message display area for display, and the account identifier of the first account is displayed at the corresponding position of the first message component.
[0188] Optionally, when the first chat message is a first voice message, the device further includes:
[0189] A message component control module, used to set the first voice message component corresponding to the first voice message to a trigger state, and after receiving a voice message in the trigger state, the voice message is automatically played;
[0190] A voice message playing module is used to move the first voice message component to the chat message display area for display and keep playing the first voice message when the display time of the first voice message component in the virtual object display area reaches the time threshold.
[0191] Optionally, the message component control module is further used to:
[0192] In response to a first trigger operation on the first virtual object, displaying a component state control control, wherein the component state control control is used to control the state of the voice message component, and the state of the voice message component includes the trigger state and the non-trigger state;
[0193] When the first voice message component is in the triggered state, in response to a trigger operation on the component state control widget, the first voice message component is set to the non-triggered state, and after receiving the voice message in the non-triggered state, the voice message is not automatically played.
[0194] Optional,
[0195] The first message display module 1502 is further configured to, when the display duration of the first chat message in the virtual object display area does not reach the duration threshold and a second chat message sent by the first account is received, overlay a second message component on the upper layer of the first message component based on the message type of the second chat message, and the second message component is used to display the second chat message;
[0196] The second message display module 1503 is also used to move the second message component to the chat message display area for display when the display time of the second chat message in the virtual object display area reaches the time threshold, and the first chat message and the second chat message in the chat message display area are arranged according to the message sending time.
[0197] Optional,
[0198] The voice message playing module is further configured to stop playing the first voice message and start playing the second voice message when the second voice message is received and the first voice message has not been played completely.
[0199] Optionally, when the first chat message is a first voice message,
[0200] The voice message playing module is further configured to keep playing the first voice message and start playing the third voice message when a third voice message sent by the second account is received and the first voice message has not been played completely.
[0201] Optionally, the device further comprises:
[0202] a message type determination module, configured to determine the message type of the first chat message when the first chat message sent by the first account is received;
[0203] an action determination module, used to determine a target message display action of the first virtual object according to the message type of the first chat message, where different message types correspond to different message display actions;
[0204] An action display module is used to control the first virtual object to perform the target message display action.
[0205] Optionally, the display module 1501 is used to display the virtual objects corresponding to all accounts in the virtual object display area when the chat interface is a separate chat interface or the chat interface is a group chat interface and the number of accounts included in the chat group is less than a display quantity threshold, and the display quantity threshold refers to the maximum number of virtual objects displayed in the virtual object display area;
[0206] When the chat interface is the group chat interface and the number of accounts contained in the chat group is greater than the display quantity threshold, the virtual objects corresponding to some of the accounts in the chat group are displayed in the virtual object display area, wherein the number of the some of the accounts is less than the display quantity threshold, and the some of the accounts include at least one of accounts in the chat group whose activity is higher than the activity threshold and accounts designated in the chat group.
[0207] Optionally, when the chat interface is a group chat interface,
[0208] The display module 1501 is further configured to update the layout of the virtual objects in the virtual object display area based on the number of virtual objects displayed in the virtual object display area when the member accounts included in the chat group are changed.
[0209] Optional,
[0210] The display module 1501 is also used to update the virtual object displayed in the virtual object display area based on the activity change trend of the target account when the activity status of the target virtual object corresponding to the target account in the virtual object display area changes, and the activity status is used to indicate whether the activity of the target account is higher than the activity threshold.
[0211] Optionally, the device is used to log in to an instant messaging client having a first account;
[0212] The device also includes:
[0213] A candidate list display module, configured to display a state candidate list when receiving a second trigger operation on the first virtual object, wherein the state candidate list includes at least one candidate state;
[0214] The control module is used to control the first virtual object to display the first target state in response to a selection operation of a first target state in the candidate states.
[0215] Optionally, the device further comprises:
[0216] a state determination module, configured to determine a second target state from candidate states of the first virtual object when the first chat message contains an expression identifier, wherein the state identifier of the second target state matches the expression identifier;
[0217] The control module is used to control the first virtual object to display the second target state.
[0218] To summarize, in the embodiment of the present application, the chat interface is divided into a chat message display area and a virtual object display area. Different display areas are used to display different content. Virtual objects corresponding to different accounts are displayed in the virtual object display area, and historical chat messages are displayed in the chat message display area. In the case of receiving a first chat message sent by a first account, the first chat message can be displayed at the message display position corresponding to the first virtual object, creating a visual effect that the first chat message is sent by the first virtual object. In this process, virtual objects are combined with chat messages to enrich the display method of chat messages. In addition, after the display time of the first chat message in the virtual object display area reaches the time threshold, the first chat message is moved to the chat message display area for display, which can enrich the display method of chat messages while taking into account the user's browsing needs for historical messages.
[0219] It should be noted that: the device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.
[0220] Please refer to Fig.16 , which shows a block diagram of a terminal 1600 provided by an exemplary embodiment of the present application. The terminal 1600 may be a portable mobile terminal, such as a smart phone, a tablet computer, a Moving Picture Experts Group Audio Layer III (MP3) player, or a Moving Picture Experts Group Audio Layer IV (MP4) player. The terminal 1600 may also be referred to as a user device, a portable terminal, or other names.
[0221] Typically, the terminal 1600 includes a processor 1601 and a memory 1602 .
[0222] The processor 1601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1601 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 1601 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1601 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1601 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0223] The memory 1602 may include one or more computer-readable storage media, which may be tangible and non-transitory. The memory 1602 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1602 is used to store at least one instruction, which is used to be executed by the processor 1601 to implement the method for displaying historical messages in a virtual game provided in an embodiment of the present application.
[0224] In some embodiments, the terminal 1600 may optionally further include: a peripheral device interface 1603 and at least one peripheral device.
[0225] The peripheral device interface 1603 may be used to connect at least one peripheral device related to input / output (I / O) to the processor 1601 and the memory 1602. In some embodiments, the processor 1601, the memory 1602, and the peripheral device interface 1603 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1601, the memory 1602, and the peripheral device interface 1603 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0226] Those skilled in the art will understand that Fig.16The structure shown in the figure does not constitute a limitation on the terminal 1600, and the terminal 1600 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0227] An embodiment of the present application also provides a computer-readable storage medium, which stores at least one program, and the at least one program is loaded and executed by a processor to implement the chat message display method described in the above embodiments.
[0228] According to one aspect of the present application, a computer program product is provided, the computer program product including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a terminal reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the terminal executes the chat message display method provided in various optional implementations of the above aspects.
[0229] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable storage medium or transmitted as one or more instructions or codes on a computer-readable storage medium. Computer-readable storage media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0230] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for displaying chat messages, characterized in that: The method comprises: Displaying a chat interface, the chat interface including a chat message display area and a virtual object display area, the virtual object display area including at least two virtual objects, the chat message display area being used to display historical chat messages, and different virtual objects corresponding to different accounts; When a first chat message sent by a first account is received, displaying the first chat message at a message display position corresponding to a first virtual object in the virtual object display area, where the first virtual object is a virtual object corresponding to the first account; When the display duration of the first chat message in the virtual object display area reaches a duration threshold, the first chat message is moved to the chat message display area for display.
2. The method according to claim 1, characterized in that: The method of, in the case of receiving a first chat message sent by a first account, displaying the first chat message at a message display position corresponding to the first virtual object in the virtual object display area, includes: Based on the message type of the first chat message, display a first message component at the message display position corresponding to the first virtual object, wherein the message component is used to display the chat message, and different types of chat messages correspond to different message components; When the display time of the first chat message in the virtual object display area reaches a time threshold, moving the first chat message to the chat message display area for display includes: When the display time of the first message component in the virtual object display area reaches the time threshold, the first message component is moved to the chat message display area for display, and the account identifier of the first account is displayed at the corresponding position of the first message component.
3. The method according to claim 2, characterized in that When the first chat message is a first voice message, the method further includes: Setting the first voice message component corresponding to the first voice message to a trigger state, and automatically playing the voice message after receiving the voice message in the trigger state; When the display time of the first voice message component in the virtual object display area reaches the time threshold, the first voice message component is moved to the chat message display area for display and the first voice message is kept playing.
4. The method according to claim 3, characterized in that The method further comprises: In response to a first trigger operation on the first virtual object, displaying a component state control control, wherein the component state control control is used to control the state of the voice message component, and the state of the voice message component includes the trigger state and the non-trigger state; When the first voice message component is in the triggered state, in response to a trigger operation on the component state control widget, the first voice message component is set to the non-triggered state, and after receiving the voice message in the non-triggered state, the voice message is not automatically played.
5. The method according to claim 2, characterized in that: The method further comprises: When the display duration of the first chat message in the virtual object display area does not reach the duration threshold and a second chat message sent by the first account is received, based on the message type of the second chat message, a second message component is superimposed on the upper layer of the first message component, and the second message component is used to display the second chat message; When the display time of the second chat message in the virtual object display area reaches the time threshold, the second message component is moved to the chat message display area for display, and the first chat message and the second chat message in the chat message display area are arranged according to the message sending time.
6. The method according to claim 5, characterized in that In the case where the first chat message is a first voice message and the second chat message is a second voice message, the method further includes: When the second voice message is received and the first voice message has not been played completely, the first voice message is stopped from being played and the second voice message is started to be played.
7. The method according to claim 2, characterized in that: In the case where the first chat message is a first voice message, the method further includes: When a third voice message sent by a second account is received and the first voice message has not been played completely, the first voice message is kept playing and the third voice message is started to be played.
8. The method according to claim 1, characterized in that: The method further comprises: When receiving the first chat message sent by the first account, determining a message type of the first chat message; Determine, according to the message type of the first chat message, a target message display action of the first virtual object, where different message types correspond to different message display actions; Control the first virtual object to perform the target message display action.
9. The method according to claim 1, characterized in that: The display chat interface includes: When the chat interface is a separate chat interface, or when the chat interface is a group chat interface and the number of accounts included in the chat group is less than a display quantity threshold, the virtual objects corresponding to all accounts are displayed in the virtual object display area, and the display quantity threshold refers to the maximum number of virtual objects displayed in the virtual object display area; When the chat interface is the group chat interface and the number of accounts contained in the chat group is greater than the display quantity threshold, the virtual objects corresponding to some of the accounts in the chat group are displayed in the virtual object display area, wherein the number of the some of the accounts is less than the display quantity threshold, and the some of the accounts include at least one of accounts in the chat group whose activity is higher than the activity threshold and accounts designated in the chat group.
10. The method according to claim 1, characterized in that In the case where the chat interface is a group chat interface, the method further includes: When a member account included in the chat group changes, the layout of the virtual objects in the virtual object display area is updated based on the number of the virtual objects displayed in the virtual object display area.
11. The method according to claim 1, characterized in that The method further comprises: When the activity status of the target account corresponding to the target virtual object in the virtual object display area changes, the virtual object displayed in the virtual object display area is updated based on the activity change trend of the target account, and the activity status is used to indicate whether the activity of the target account is higher than the activity threshold.
12. The method according to claim 1, characterized in that The method is used to log in to an instant messaging client having a first account; The method further comprises: When a second trigger operation on the first virtual object is received, displaying a state candidate list, wherein the state candidate list includes at least one candidate state; In response to a selection operation of a first target state among the candidate states, the first virtual object is controlled to exhibit the first target state.
13. The method according to claim 1, characterized in that After receiving the first chat message sent by the first account, the method further includes: In a case where the first chat message includes an expression identifier, determining a second target state from candidate states of the first virtual object, wherein the state identifier of the second target state matches the expression identifier; Control the first virtual object to display the second target state.
14. A chat message display device, characterized in that: The device comprises: A display module, used to display a chat interface, wherein the chat interface includes a chat message display area and a virtual object display area, wherein the virtual object display area includes at least two virtual objects, and the chat message display area is used to display historical chat messages, and different virtual objects correspond to different accounts; A first message display module, configured to display, upon receiving a first chat message sent by a first account, the first chat message at a message display position corresponding to a first virtual object in the virtual object display area, wherein the first virtual object is a virtual object corresponding to the first account; The second message display module is used to move the first chat message to the chat message display area for display when the display time of the first chat message in the virtual object display area reaches a time threshold.
15. A terminal, characterized in that: The terminal includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the chat message display method as described in any one of claims 1 to 13.
16. A computer-readable storage medium, characterized in that: At least one instruction is stored in the readable storage medium, and the at least one instruction is loaded and executed by the processor to implement the chat message display method as described in any one of claims 1 to 13.
17. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the chat message display method as described in any one of claims 1 to 13.
