Expression display method, device, electronic device and storage medium
By displaying the dynamic effects of dynamic random expressions on the conversation page of the instant messaging client, the problem of single expression display method in the existing technology is solved, and a richer user interaction experience and higher user stickiness are achieved.
Patent Information
- Application Number
- CN202110849278.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-27
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2041-07-27
AI Technical Summary
In the prior art, the expression display method is too single and the display effect is poor, so the user's communication and interaction forms cannot be fully enriched.
Provide an expression display method and device, by displaying dynamic random expressions on the session page of the instant messaging client, when the random result meets the dynamic effect triggering condition, the corresponding dynamic effect is displayed, including a loop playback subunit, a result display subunit, Select sub-units, animation display units, etc. to enhance the smoothness and reality of expression animation.
It enriches the display form of expressions, improves the user viscosity of the product, enhances the fluency and realism of expression animation, and enhances the user's communication and interaction experience.
Smart Images

Figure CN115695348B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an expression display method, device, electronic device and storage medium. Background Art
[0002] In the era of mobile Internet, relying on the continuous development of social networking and the Internet, the way people communicate has also changed accordingly, from the earliest text communication to the gradual use of some simple symbols and emoticons, and then gradually evolved into an increasingly diversified emoticon culture. For example, in the process of instant messaging, in order to express what they want to say more vividly and vividly, users often send some emoticons as conversation messages. Dialogue through emoticons can greatly enrich the form of communication and interaction between users.
[0003] However, in the current related technologies, the way of displaying expressions is too simple and the display effect is poor. Summary of the invention
[0004] The embodiments of the present application provide an expression display method, device, electronic device and storage medium, which can enrich the expression display form and improve the user stickiness of the product.
[0005] The present application provides an expression display method, including:
[0006] Displaying a session page of a target session in an instant messaging client, the session page including messages sent by session members of the target session, the messages including a target emoticon;
[0007] When the type of the target expression is a dynamic random expression, and the random result generated by the dynamic random expression meets the dynamic effect triggering condition, the dynamic effect corresponding to the dynamic random expression is displayed on the conversation page.
[0008] Accordingly, the embodiment of the present application provides an expression display device, including:
[0009] An expression display unit, used to display a session page of a target session in an instant messaging client, wherein the session page includes messages sent by session members of the target session, wherein the messages include a target expression;
[0010] The dynamic effect display unit is used to display the dynamic effect corresponding to the dynamic random expression on the conversation page when the type of the target expression is a dynamic random expression and the random result generated by the dynamic random expression meets the dynamic effect triggering condition.
[0011] Optionally, in some embodiments of the present application, the motion effect is associated with a target interactive theme.
[0012] Optionally, in some embodiments of the present application, the expression display unit may include a loop playback subunit and a result display subunit, as follows:
[0013] The loop playing subunit is used to play the preparatory loop animation corresponding to the target expression on the conversation page when the type of the target expression is a dynamic random expression;
[0014] The result display subunit is used to display the random result corresponding to the target expression on the conversation page when the preparatory loop animation ends.
[0015] Optionally, in some embodiments of the present application, the loop playback subunit can be specifically used to play a preparatory loop animation corresponding to the target expression on the conversation page when the type of the target expression is a dynamic random expression and the message only contains the target expression.
[0016] Optionally, in some embodiments of the present application, the expression display unit may further include a selection subunit, as follows:
[0017] The selection subunit is used to randomly select a target expression result from the preset expression results as a random result generated by the dynamic random expression based on the probabilities corresponding to the preset expression results of the dynamic random expression.
[0018] Optionally, in some embodiments of the present application, the target expression includes a first expression element and a second expression element; and the random result includes an interaction result of the first expression element and the second expression element.
[0019] Optionally, in some embodiments of the present application, the display position of the animation is associated with the position of a target expression element, and the target expression element is any expression element among the expression elements of the target expression.
[0020] Optionally, in some embodiments of the present application, the display position of the animation is associated with the position of a target expression element, and the target expression element is an expression element in the expression elements of the target expression that matches the attributes of the animation.
[0021] Optionally, in some embodiments of the present application, the motion effect display unit may include a determination subunit and a display subunit, as follows:
[0022] The determination subunit is used to determine the target animation effect of the dynamic random expression based on the attribute information of the target session;
[0023] The display subunit is used to display the target animation on the session page.
[0024] Optionally, in some embodiments of the present application, the animation display unit can be specifically used to display the animation corresponding to the dynamic random expression on the session page when the type of the target expression is a dynamic random expression, the random result generated by the dynamic random expression meets the animation triggering condition, and the interval time of sending the target expression in the target session is greater than a preset time.
[0025] Optionally, in some embodiments of the present application, the motion effect display unit can be specifically used to display the motion effect corresponding to the dynamic random expression in full screen on the conversation page.
[0026] Optionally, in some embodiments of the present application, the expression display device may further include a cache unit, a reading unit, and a rendering unit, as follows:
[0027] The cache unit is used to cache the expression resource file corresponding to the target expression;
[0028] A reading unit, used for reading the content of each expression frame of the target expression from the expression resource file according to the play instruction information corresponding to the expression resource file;
[0029] The rendering unit is used to render the content of each expression frame of the target expression to display the target expression on the conversation page.
[0030] An electronic device provided in an embodiment of the present application includes a processor and a memory, wherein the memory stores a plurality of instructions, and the processor loads the instructions to execute the steps in the expression display method provided in the embodiment of the present application.
[0031] In addition, an embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, wherein when the computer program is executed by a processor, the steps in the expression display method provided in the embodiment of the present application are implemented.
[0032] The embodiment of the present application provides an expression display method, device, electronic device and storage medium, which can display the session page of the target session in the instant messaging client, the session page includes the message sent by the session members of the target session, and the message includes the target expression; when the type of the target expression is a dynamic random expression, and the random result generated by the dynamic random expression meets the dynamic effect triggering condition, the dynamic effect corresponding to the dynamic random expression is displayed on the session page. This embodiment can trigger the display of the corresponding dynamic effect based on the random result generated by the dynamic random expression, enriching the display form of the expression and improving the user stickiness of the product. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] 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 those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0034] Figure 1a is a schematic diagram of a scenario of an expression display method provided in an embodiment of the present application;
[0035] Figure 1b is a flow chart of the expression display method provided in an embodiment of the present application;
[0036] Figure 1c It is a page schematic diagram of the expression display method provided in the embodiment of the present application;
[0037] Figure 1d is another page schematic diagram of the expression display method provided in an embodiment of the present application;
[0038] Figure 1e is another page schematic diagram of the expression display method provided in an embodiment of the present application;
[0039] Figure 1f is another flow chart of the expression display method provided in an embodiment of the present application;
[0040] Figure 1g is another flow chart of the expression display method provided in an embodiment of the present application;
[0041] Figure 1h is an illustration of an expression display method provided in an embodiment of the present application;
[0042] Figure 1i is another page schematic diagram of the expression display method provided in an embodiment of the present application;
[0043] Figure 1j is another page schematic diagram of the expression display method provided in an embodiment of the present application;
[0044] Figure 1k is another flow chart of the expression display method provided in an embodiment of the present application;
[0045] Figure 1l is another flow chart of the expression display method provided in an embodiment of the present application;
[0046] Figure 1m is another flow chart of the expression display method provided in an embodiment of the present application;
[0047] Figure 2 is another flow chart of the expression display method provided in an embodiment of the present application;
[0048] Figure 3 is a schematic diagram of the structure of the expression display device provided in an embodiment of the present application;
[0049] Figure 4 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0051] The embodiment of the present application provides an expression display method, device, electronic device and storage medium. The expression display device can be integrated in an electronic device, which can be a terminal or a server.
[0052] It is understandable that the expression display method of this embodiment can be executed on a terminal, can be executed on a server, or can be executed by both a terminal and a server. The above examples should not be construed as limiting the present application.
[0053] like Figure 1a As shown, the expression display method is performed by a terminal and a server together as an example. The expression display system provided in the embodiment of the present application includes a terminal 10 and a server 11, etc. The terminal 10 and the server 11 are connected via a network, such as a wired or wireless network connection, etc., wherein the expression display device can be integrated in the terminal.
[0054] Among them, the terminal 10 can be used to: display the conversation page of the target conversation in the instant messaging client, the conversation page includes the message sent by the conversation members of the target conversation, and the message includes the target expression; when the type of the target expression is a dynamic random expression, and the random result generated by the dynamic random expression meets the dynamic effect triggering condition, the dynamic effect corresponding to the dynamic random expression is displayed on the conversation page. Among them, the terminal 10 can include a mobile phone, a smart TV, a tablet computer, a laptop, or a personal computer (PC, Personal Computer), etc. A client can also be set on the terminal 10, and the client can be an application client, etc.
[0055] The server 11 may randomly select a target expression result from the preset expression results as a random result generated by the dynamic random expression based on the probabilities corresponding to the preset expression results of the dynamic random expression, and send the random result to the terminal 10. The server 11 may be a single server, or a server cluster or a cloud server composed of multiple servers.
[0056] The step of the server 11 selecting a random result may also be executed by the terminal 10 .
[0057] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.
[0058] This embodiment will be described from the perspective of an expression display device. The expression display device may be integrated into an electronic device, which may be a server or a terminal.
[0059] The expression display method of the embodiment of the present application can be applied to various expression display related scenarios. For example, if a chat session of a communication application needs to display expression animation more smoothly, the expression display method provided by this embodiment can trigger the display of corresponding dynamic effects based on the random results generated by dynamic random expressions, enrich the expression display form, and enhance the smoothness of expression animation display, thereby improving the user stickiness of the product.
[0060] like Figure 1b As shown, the specific process of the expression display method can be as follows:
[0061] 101. Display a session page of a target session in an instant messaging client, wherein the session page includes messages sent by session members of the target session, and the messages include target emoticons.
[0062] The instant messaging client can be used for message interaction between users and can receive or send messages. The message type is not limited, such as video, audio, image, and text. The target session can specifically include at least one session member. The session page can be used to display the content of the sent or received message.
[0063] The target expression may be sent by any session member in the target session, that is, the user corresponding to the instant messaging client may be the recipient of the target expression or the sender of the target expression, and this embodiment does not limit this.
[0064] In this embodiment, the emoticons are network emoticons, which specifically refer to symbols and pictures used to help people express information more accurately when communicating on the Internet. Emoticons can be mainly divided into character emoticons and picture emoticons (also called emoticon packages). For example, an emoticon can be a "little yellow face" emoticon, or it can be a variety of emoticons such as fruit and food, zodiac signs, sports and leisure, and fancy celebrations.
[0065] Specifically, the target session may also be a session in other social applications, such as a chat window in a live broadcast application, which is not limited in this embodiment.
[0066] Optionally, in this embodiment, the expression display method may further include:
[0067] When the type of the target expression is a dynamic random expression, a preparatory loop animation corresponding to the target expression is played on the conversation page;
[0068] When the preliminary loop animation ends, the random result corresponding to the target expression is displayed on the conversation page.
[0069] Among them, the dynamic random expression can specifically include two stages of display. The first stage is to display the preparatory loop animation, that is, when the random result is not obtained, the preparatory animation is displayed in a loop; the second stage is to display the random result, that is, after the random result is obtained, the animation corresponding to the random result is played after the preparatory loop animation is displayed.
[0070] For example, the dynamic random expression is the expression corresponding to the shooting machine, which has three preset expression results, namely, the basketball missed, the rebound was blocked, and the basketball was shot. Figure 1c As shown, the preparatory loop animation of the dynamic random expression can be a loop playing process of shooting a basketball.
[0071] For another example, the dynamic random expression is the expression corresponding to rolling a dice, which has six preset expression results, namely the dice numbers of one, two, three, four, five and six. The preparatory loop animation of the dynamic random expression can be a loop playing the process of the dice rolling between one and six.
[0072] The condition for ending the playback of the preset loop animation can be set according to the actual situation. In some embodiments, the display time of the preparatory loop animation can be set to 5 seconds, and when the display time reaches 5 seconds, the preparatory loop animation is stopped; in other embodiments, when the preparatory loop animation starts to play, the random result of the dynamic random expression can be obtained, and after the random result is obtained, the playback of the preparatory loop animation is ended and the random result is displayed.
[0073] Optionally, in this embodiment, the step of “when the type of the target expression is a dynamic random expression, playing a preliminary loop animation corresponding to the target expression on the conversation page” may include:
[0074] When the type of the target expression is a dynamic random expression and the message only includes the target expression, a preparatory loop animation corresponding to the target expression is played on the conversation page.
[0075] The message is specifically a message sent by a session member in the target session. The message only contains the target expression, that is, the message is a pure expression message type, and does not contain other types of information, such as text information.
[0076] In this embodiment, when the user sends an expression and text together, the expression only appears as a normal expression and cannot trigger looping animations and random expressions. Figure 1d Only when the user sends an expression alone will the random expression be triggered, such as Figure 1e shown.
[0077] For example, when a user sends a single expression, and the expression is a dynamic random expression, the system will randomly select a target expression result from the preset expression results of the expression to play the expression animation.
[0078] Specifically, in this embodiment, when a user sends a yellow face expression alone, it will be displayed as a random expression result, and there is a certain probability that an Easter egg (specifically an animation) will be triggered. Both the random result and the Easter egg support online dynamic configuration. When the yellow face expression is sent together with text, it will be displayed as a normal text message.
[0079] In a specific scenario, when it is detected that a user sends a message in a message input box for a target session, the content of the message input box may be parsed. Figure 1f As shown, assuming that the prefix of the emoticon type is "0x14", when the user pulls the configuration resources of the emoticon from the emoticon management platform and sends a message, the content of the sent message is parsed. If 0x14 is included, it means that the message contains emoticons. Then, it is determined whether the message content only contains emoticons. If the message content is a single emoticon, it is determined whether the emoticon is a dynamic random emoticon. If so, that is, when the user sends a dynamic random emoticon alone, it will trigger the display of the random emoticon, otherwise it will follow the original logic.
[0080] Optionally, in this embodiment, before the step of “when the preliminary loop animation is finished playing, displaying the random result corresponding to the target expression on the conversation page”, the following may also be included:
[0081] Based on the probabilities corresponding to the preset expression results of the dynamic random expression, a target expression result is randomly selected from the preset expression results as a random result generated by the dynamic random expression.
[0082] Among them, when the user sends a dynamic random expression, the system will randomly display an expression result animation. Different expression results have different probabilities of appearing. For example, in the dynamic random expression of shooting a basketball, it has three preset expression results, namely, basketball missed, rebound, and basketball shot. The probability of each preset expression result can be set according to the actual situation. For example, the probability of the expression result of basketball shot can be set to the lowest of the three; for example, the probability of the expression result of basketball missed is set to 0.5, the probability of the expression result of rebound is set to 0.3, and the probability of the expression result of basketball shot is set to 0.2.
[0083] There are many ways to implement expression animation, such as using frame animation, adopting Gif (Graphics Interchange Format, image interchange format) or Lottie solution, etc.
[0084] Optionally, this embodiment can introduce the Lottie technology framework to display expressions based on the json format, which can support the display of more animation details, occupy less memory, and at the same time greatly improve the clarity and smoothness of the expressions, making the displayed dynamic random expressions more realistic.
[0085] Among them, Lottie is an open source tool that can add animation effects to native applications. It can use json files to quickly achieve animation effects and render animation effects in real time. After the user draws the expression animation, Lottie can convert the expression animation into an expression animation file in json format, called a Lottie file. The Lottie file is a file described in json format. When you need to play the expression animation, you can directly load the Lottie file. Lottie will parse and render the Lottie file according to the operating system corresponding to the device, and then it can be played. Among them, json (JavaScript Object Notation) is a lightweight data exchange format.
[0086] Optionally, in this embodiment, the expression display method may further include:
[0087] Cache the expression resource file corresponding to the target expression;
[0088] Reading each expression frame content of the target expression from the expression resource file according to the playback instruction information corresponding to the expression resource file;
[0089] Rendering each expression frame content of the target expression to display the target expression on the conversation page.
[0090] In some embodiments, the expression resource file corresponding to the expression animation (specifically, the Lottie file or the json file in the above embodiment) can be directly stored in the server. The expression playback component of the instant messaging client can render the single frame image (i.e., expression frame) of the expression animation onto the screen according to the frame rate of the lottie file. The expression playback component can include three modules, namely, a cache module, a timer module, and a rendering module.
[0091] Specifically, when the instant messaging client is started, a request for obtaining the expression resource file of the expression animation is sent to the server. After receiving the request, the server can send the expression resource file to the instant messaging client, so that the instant messaging client can cache the expression resource file of the expression animation. When it is detected that the target expression needs to be displayed, the json file can be parsed to obtain the overall information of the json file, such as the number of frames, frame rate, length and width, etc., and then according to the playback instruction information corresponding to the expression resource file of the target expression, the expression frame content of the target expression is read from the expression resource file of the target expression (i.e., the json file), wherein the expression frame content to be displayed can be read from the expression resource file of the target expression according to the frame rate by a timer module; finally, the json format data content of the expression frame can be converted into RGB (red green blue, red, green and blue mode) information by a rendering module and rendered on the screen.
[0092] In some embodiments, the play instruction information (i.e., control instructions) for playing the expression animation can be designed in advance for the expression animation effect to be achieved. The play instruction information is used to control the animation effect when the expression animation file is played. For example, the action and path of each specific expression frame content in the expression animation file can be controlled, as well as the play order of the expression frames, so that the expression animation file can be played according to the play instruction information to achieve a specific effect. In this way, the play details of the entire expression animation can be controlled to achieve a richer animation effect. In some embodiments, the play instruction information includes instructions for controlling certain specific expression frames in the expression animation file, such as entry instructions, transition instructions, loop instructions, and exit instructions.
[0093] In specific scenarios, refer to Figure 1gAfter the user logs in to the instant messaging client, the expression resources can be pulled from the expression management platform. When the user sends an expression, it is first determined whether it is a single expression. Based on the single expression, it is identified whether the current expression is a dynamic random expression based on the pulled expression resources. If it is a dynamic random expression, the pre-loop animation is displayed, and the random result of the dynamic random expression is requested from the server. If the random result is obtained during the playback process, the current pre-loop animation can be played before the random result animation is displayed. If the random result meets the dynamic effect triggering condition, the dynamic effect is displayed after the result animation is played.
[0094] For example, for the dynamic random expression of shooting a basketball, the data structure of its specific configuration file (that is, the expression resource file, which can be recorded as face_config.json) is as follows:
[0095] {
[0096] "QSid":"114",
[0097] "QDes":" / Basketball",
[0098] "IQLid":"90",
[0099] "AQLid":"92",
[0100] "EMCode":"158",
[0101] "AniStickerType":2,
[0102] "AniStickerPackId":"1",
[0103] "AniStickerId":"13"
[0104] },
[0105] Among them, QSId represents the id (Identity document) of the server that stores emoticon resources, which can be used for data storage on the server; QDes is the description information of the emoticon; IQLid represents the id of the iox end, which can be used for data storage on the iox end (a mobile operating system); AQLid represents the id of the AnX end, which can be used for data storage on the AnX end (a mobile operating system).
[0106] Among them, AniStickerType represents the expression type of the expression, 1 represents a loop expression, and 2 represents a random expression; AnistickerPackId represents the package id of the expression resource; AniStickerId represents the expression id of the expression stored.
[0107] Specifically, the data structure indicates that the identification number of the server storing the dynamic random expression of shooting a basketball is 114, and the expression is a random expression, so its AniStickerType is 2.
[0108] Optionally, the expression resources can be issued by the expression management platform, and the instant messaging client can pull and store them locally. AniStickerId_x.json represents the animation of each random result of the dynamic random expression, AniStickerId_100.json represents the animation corresponding to the dynamic effect, and AniStickerId.json represents the pre-loop animation. Among them, if the AniStickerId number corresponding to the dynamic random expression of shooting a basketball is 13, it includes five preset random results, and each preset random result can be recorded as 13_1.json, 13_2.json, 13_3.json, 13_4.json and 13_5.json, and its pre-loop animation is 13.json. The storage information of the expression resources is as follows: Figure 1h shown.
[0109] In this embodiment, the probability corresponding to each preset expression result of the dynamic random expression can be configured by the instant messaging client, and different preset expression results can correspond to different probabilities. After the probability is configured, the background can randomly select the target expression result according to the probability corresponding to each preset expression result, and the instant messaging client can obtain the json resource corresponding to the target expression result from the local expression resource according to the id (identification information) of the target expression result, and parse and render the json resource to display the random result animation of the dynamic random expression on the conversation page.
[0110] The target expression can be composed of one or more expression elements. Expression elements are components that constitute an expression.
[0111] Optionally, in this embodiment, the target expression includes a first expression element and a second expression element; and the random result includes an interaction result of the first expression element and the second expression element.
[0112] For example, the target expression is an expression corresponding to shooting a basketball, and its expression elements may include a basketball, a basketball frame, etc. Specifically, the first expression element may be a basketball, and the second expression element may be a basketball frame; the random result of the target expression may include an interactive result of the basketball and the basketball frame. For example, the interactive result may be that the basketball is shot into the basketball frame, or that the basketball does not hit the basketball frame, or that the basketball is stuck on the basketball frame, etc.
[0113] 102. When the type of the target expression is a dynamic random expression, and the random result generated by the dynamic random expression meets the dynamic effect triggering condition, the dynamic effect corresponding to the dynamic random expression is displayed on the conversation page.
[0114] The dynamic effect triggering condition can be set according to the actual situation, and this embodiment does not limit this. For example, when the target expression is the expression corresponding to shooting a basketball, the dynamic effect triggering condition can be that when the random result generated is that the basketball hits the basketball hoop, the corresponding dynamic effect is triggered to be displayed. The dynamic effect can specifically be a petal special effect. Figure 1i As shown, this animation can be considered an Easter egg.
[0115] The animation effect may be a preset dynamic effect, which is specifically triggered by a specific expression result. The animation effect may include one or more animation effect elements. For example, the animation effect may be a preset effect such as scattering flowers, snowing, setting off fireworks, and bombs.
[0116] Optionally, in this embodiment, the motion effect is associated with a target interactive theme.
[0117] The target interactive theme can be set according to the actual situation, and this embodiment does not limit this. Specifically, the target interactive theme can be combined with holiday hot spots. For example, on Valentine's Day, for the dynamic random expression of shooting a basketball, when the random result generated is shooting into the basketball hoop, a love effect can be displayed, such as Figure 1j shown.
[0118] Optionally, in this embodiment, each preset expression result and animation effect of the dynamic random expression can support configuration. Specifically, different expression animation effects can be configured through the expression management platform. In the expression management platform, each preset expression result of the dynamic random expression can be stored in the configuration file of AniStickerId_x.json (refer to the above embodiment for details), the pre-loop animation can be stored in the configuration file of AniStickerId.json, and the animation corresponding to the animation effect is stored in the configuration file of AniStickerId_100.json. In some embodiments, these configuration files can be updated according to the format agreed upon by the client and the server. If the configuration file of the expression animation is only pulled when the instant messaging client is logged in, then the new configuration file corresponding to the expression animation can be pulled again after the instant messaging client is re-logged in, so that the dynamic configuration of the expression animation can be realized, refer to Figure 1k .
[0119] Optionally, in this embodiment, the display position of the animation is associated with the position of a target expression element, and the target expression element is any expression element among the expression elements of the target expression.
[0120] The target expression may include at least one expression element. For example, the target expression is the expression corresponding to shooting a basketball, which includes the expression elements - basketball and basketball frame. When the random result is that the basketball hits the basketball frame, the corresponding petal animation can be displayed, wherein a single petal is the animation element of the animation. Specifically, the petals can be ejected from the basketball frame when the basketball is shot into the basketball frame, that is, the basketball frame is selected as the target expression element, and the starting display position of the petal animation is the position of the basketball frame.
[0121] Optionally, in this embodiment, the display position of the animation is associated with the position of a target expression element, and the target expression element is an expression element in the expression elements of the target expression that matches the attribute of the animation.
[0122] Among them, the target expression may include at least one expression element. The motion effect may be composed of at least one motion effect element, and the matching attributes may be shape, color, etc., which are not limited in this embodiment. For example, the motion effect element is in the shape of a heart, and the target expression is the expression corresponding to shooting a basketball, which includes the expression elements - basketball and basketball frame. Since the shapes of the heart and the basketball frame are relatively matched, the basketball frame can be used as the target expression element. When the random result is that the basketball is shot into the basketball frame, the effect of the motion effect heart bursting out of the basketball frame can be displayed.
[0123] Optionally, in this embodiment, the step of “displaying the dynamic effect corresponding to the dynamic random expression on the conversation page” may include:
[0124] Determining a target motion effect of the dynamic random expression based on the attribute information of the target session;
[0125] The target animation is displayed on the session page.
[0126] The attribute information of the target session may specifically be the session name of the target session, etc. For example, if the group name of the target session is "Polar Snow Glacier Blue", the target dynamic effect of the dynamic random expression may be snow, skis, etc.
[0127] Optionally, in this embodiment, the step of “displaying the dynamic effect corresponding to the dynamic random expression on the conversation page” may include:
[0128] The animation corresponding to the dynamic random expression is displayed in full screen on the conversation page.
[0129] Specifically, the animation effect can be displayed on the entire session page.
[0130] Optionally, in this embodiment, the step of “when the type of the target expression is a dynamic random expression, and the random result generated by the dynamic random expression meets the dynamic effect triggering condition, displaying the dynamic effect corresponding to the dynamic random expression on the conversation page” may include:
[0131] When the type of the target expression is a dynamic random expression, the random result generated by the dynamic random expression meets the dynamic effect triggering condition, and the interval time of sending the target expression in the target session is greater than the preset time, the dynamic effect corresponding to the dynamic random expression is displayed on the session page.
[0132] The preset time can be set according to actual conditions, and this embodiment does not limit this.
[0133] Among them, when the user sends multiple identical target expressions continuously, and the interval time between sending two adjacent target expressions is not greater than the preset time, if the type of the target expression is a dynamic random expression and the random result generated by the dynamic random expression meets the animation triggering condition, the animation corresponding to the dynamic random expression may not be displayed on the conversation page, so as to prevent users from swiping the screen.
[0134] In specific scenarios, such as Figure 1l As shown, when a user logs in to an instant messaging client, a resource file of an expression animation can be configured. When the user sends a message content to a target session, and the message content is a dynamic random expression, a preliminary loop animation displaying the dynamic random expression can be played in a session page of the target session according to the expression resource file of the dynamic random expression. At the same time, the client can request the server to obtain a random result animation of the dynamic random expression. Specifically, the server can obtain a corresponding random result animation according to a resource sent by the client (specifically, the identification information id of the dynamic random expression) and the configuration corresponding to the resource, and send it to the client so as to display the random result animation of the dynamic random expression in the session page.
[0135] In some embodiments, Figure 1m As shown, when it is detected that a session member in the target session sends a dynamic random expression, the instant messaging client can send the expression identification information (i.e., the expression id) of the dynamic random expression to the server, and the server randomly selects a target expression result from the preset expression results of the dynamic random expression according to the configuration file of the expression id, and sends the target expression result as a random result generated by the dynamic random expression to the client for display; in addition, if the target expression result meets the dynamic trigger condition, the server can also send the corresponding animation to the client so that the animation can be displayed on the client's session page.
[0136] As can be seen from the above, this embodiment can display the conversation page of the target conversation in the instant messaging client, the conversation page includes the message sent by the conversation members of the target conversation, and the message includes the target expression; when the type of the target expression is a dynamic random expression, and the random result generated by the dynamic random expression meets the dynamic effect triggering condition, the dynamic effect corresponding to the dynamic random expression is displayed on the conversation page. This embodiment can trigger the display of the corresponding dynamic effect based on the random result generated by the dynamic random expression, enriching the display form of the expression and improving the user stickiness of the product.
[0137] According to the method described in the previous embodiment, the expression display device will be integrated into a terminal as an example for further detailed description.
[0138] The present application embodiment provides a method for displaying facial expressions, such as Figure 2 As shown, the specific process of the expression display method can be as follows:
[0139] 201. A terminal displays a session page of a target session in an instant messaging client, wherein the session page includes messages sent by session members of the target session, and the messages include target emoticons.
[0140] The target expression may be sent by any session member in the target session, that is, the user corresponding to the instant messaging client may be the recipient of the target expression or the sender of the target expression, and this embodiment does not limit this.
[0141] Optionally, in this embodiment, the expression display method may further include:
[0142] When the type of the target expression is a dynamic random expression, a preparatory loop animation corresponding to the target expression is played on the conversation page;
[0143] When the preliminary loop animation ends, the random result corresponding to the target expression is displayed on the conversation page.
[0144] Among them, the dynamic random expression can specifically include two stages of display. The first stage is to display the preparatory loop animation, that is, when the random result is not obtained, the preparatory animation is displayed in a loop; the second stage is to display the random result, that is, after the random result is obtained, the animation corresponding to the random result is played after the preparatory loop animation is displayed.
[0145] For example, the dynamic random expression is the expression corresponding to rolling a dice, and it has six preset expression results, namely the dice points are one, two, three, four, five and six. The preparatory loop animation of the dynamic random expression can be a loop playing the process of the dice rolling between one and six.
[0146] Optionally, in this embodiment, the step of “when the type of the target expression is a dynamic random expression, playing a preliminary loop animation corresponding to the target expression on the conversation page” may include:
[0147] When the type of the target expression is a dynamic random expression and the message only includes the target expression, a preparatory loop animation corresponding to the target expression is played on the conversation page.
[0148] Optionally, in this embodiment, before the step of “when the preliminary loop animation is finished playing, displaying the random result corresponding to the target expression on the conversation page”, the following may also be included:
[0149] Based on the probabilities corresponding to the preset expression results of the dynamic random expression, a target expression result is randomly selected from the preset expression results as a random result generated by the dynamic random expression.
[0150] There are many ways to implement expression animation, such as using frame animation, adopting Gif (Graphics Interchange Format, image interchange format) or Lottie solution, etc.
[0151] Optionally, this embodiment can introduce the Lottie technology framework to display expressions based on the json format, which can support the display of more animation details, occupy less memory, and at the same time greatly improve the clarity and smoothness of the expressions, making the displayed dynamic random expressions more realistic.
[0152] Optionally, in this embodiment, the expression display method may further include:
[0153] Cache the expression resource file corresponding to the target expression;
[0154] Reading each expression frame content of the target expression from the expression resource file according to the playback instruction information corresponding to the expression resource file;
[0155] Rendering each expression frame content of the target expression to display the target expression on the conversation page.
[0156] In this embodiment, the probability corresponding to each preset expression result of the dynamic random expression can be configured by the instant messaging client, and different preset expression results can correspond to different probabilities. After the probability is configured, the background can randomly select the target expression result according to the probability corresponding to each preset expression result, and the instant messaging client can obtain the json resource corresponding to the target expression result from the local expression resource according to the id (identification information) of the target expression result, and parse and render the json resource to display the random result animation of the dynamic random expression on the conversation page.
[0157] The target expression can be composed of one or more expression elements. Expression elements are components that constitute an expression.
[0158] Optionally, in this embodiment, the target expression includes a first expression element and a second expression element; and the random result includes an interaction result of the first expression element and the second expression element.
[0159] For example, the target expression is an expression corresponding to shooting a basketball, and its expression elements may include a basketball, a basketball frame, etc. Specifically, the first expression element may be a basketball, and the second expression element may be a basketball frame; the random result of the target expression may include an interactive result of the basketball and the basketball frame. For example, the interactive result may be that the basketball is shot into the basketball frame, or that the basketball does not hit the basketball frame, or that the basketball is stuck on the basketball frame, etc.
[0160] 202. When the type of the target expression is a dynamic random expression, and the random result generated by the dynamic random expression satisfies a dynamic effect triggering condition, the terminal displays the dynamic effect corresponding to the dynamic random expression in full screen on the conversation page.
[0161] The dynamic effect triggering condition can be set according to the actual situation, and this embodiment does not limit this. For example, when the target expression is the expression corresponding to shooting a basketball, the dynamic effect triggering condition can be that when the random result generated is that the basketball hits the basketball hoop, the corresponding dynamic effect is triggered.
[0162] Optionally, in this embodiment, the motion effect is associated with a target interactive theme.
[0163] The target interactive theme can be set according to the actual situation, and this embodiment does not limit this. Specifically, the target interactive theme can be combined with holiday hot spots. For example, on Valentine's Day, for the dynamic random expression of shooting a basketball, when the random result generated is shooting into the basketball hoop, a love effect can be displayed.
[0164] Optionally, in this embodiment, the display position of the animation is associated with the position of a target expression element, and the target expression element is an expression element in the expression elements of the target expression that matches the attribute of the animation.
[0165] Among them, the target expression may include at least one expression element. The motion effect may be composed of at least one motion effect element, and the matching attributes may be shape, color, etc., which are not limited in this embodiment. For example, the motion effect element is in the shape of a heart, and the target expression is the expression corresponding to shooting a basketball, which includes the expression elements - basketball and basketball frame. Since the shapes of the heart and the basketball frame are relatively matched, the basketball frame can be used as the target expression element. When the random result is that the basketball is shot into the basketball frame, the effect of the motion effect heart bursting out of the basketball frame can be displayed.
[0166] As can be seen from the above, this embodiment can display the conversation page of the target conversation in the instant messaging client through the terminal, and the conversation page includes messages sent by the conversation members of the target conversation, and the messages include the target expression; when the type of the target expression is a dynamic random expression, and the random result generated by the dynamic random expression meets the dynamic effect triggering condition, the terminal displays the dynamic random expression corresponding to the dynamic random expression in full screen on the conversation page. This embodiment can trigger the display of the corresponding dynamic effect based on the random result generated by the dynamic random expression, enriching the display form of the expression and improving the user stickiness of the product.
[0167] In order to better implement the above method, the embodiment of the present application also provides an expression display device, such as Figure 3 As shown, the expression display device may include an expression display unit 301 and a motion effect display unit 302, as follows:
[0168] (1) expression display unit 301;
[0169] The expression display unit 301 is used to display a session page of a target session in an instant messaging client, wherein the session page includes messages sent by session members of the target session, and the messages include a target expression.
[0170] Optionally, in some embodiments of the present application, the expression display unit may include a loop playback subunit and a result display subunit, as follows:
[0171] The loop playing subunit is used to play the preparatory loop animation corresponding to the target expression on the conversation page when the type of the target expression is a dynamic random expression;
[0172] The result display subunit is used to display the random result corresponding to the target expression on the conversation page when the preparatory loop animation ends.
[0173] Optionally, in some embodiments of the present application, the loop playback subunit can be specifically used to play a preparatory loop animation corresponding to the target expression on the conversation page when the type of the target expression is a dynamic random expression and the message only contains the target expression.
[0174] Optionally, in some embodiments of the present application, the expression display unit may further include a selection subunit, as follows:
[0175] The selection subunit is used to randomly select a target expression result from the preset expression results as a random result generated by the dynamic random expression based on the probabilities corresponding to the preset expression results of the dynamic random expression.
[0176] Optionally, in some embodiments of the present application, the target expression includes a first expression element and a second expression element; and the random result includes an interaction result of the first expression element and the second expression element.
[0177] (2) dynamic effect display unit 302;
[0178] The dynamic effect display unit 302 is used to display the dynamic effect corresponding to the dynamic random expression on the conversation page when the type of the target expression is a dynamic random expression and the random result generated by the dynamic random expression meets the dynamic effect triggering condition.
[0179] Optionally, in some embodiments of the present application, the motion effect is associated with a target interactive theme.
[0180] Optionally, in some embodiments of the present application, the display position of the animation is associated with the position of a target expression element, and the target expression element is any expression element among the expression elements of the target expression.
[0181] Optionally, in some embodiments of the present application, the display position of the animation is associated with the position of a target expression element, and the target expression element is an expression element in the expression elements of the target expression that matches the attributes of the animation.
[0182] Optionally, in some embodiments of the present application, the motion effect display unit may include a determination subunit and a display subunit, as follows:
[0183] The determination subunit is used to determine the target animation effect of the dynamic random expression based on the attribute information of the target session;
[0184] The display subunit is used to display the target animation on the session page.
[0185] Optionally, in some embodiments of the present application, the animation display unit can be specifically used to display the animation corresponding to the dynamic random expression on the session page when the type of the target expression is a dynamic random expression, the random result generated by the dynamic random expression meets the animation triggering condition, and the interval time of sending the target expression in the target session is greater than a preset time.
[0186] Optionally, in some embodiments of the present application, the motion effect display unit can be specifically used to display the motion effect corresponding to the dynamic random expression in full screen on the conversation page.
[0187] Optionally, in some embodiments of the present application, the expression display device may further include a cache unit, a reading unit, and a rendering unit, as follows:
[0188] The cache unit is used to cache the expression resource file corresponding to the target expression;
[0189] A reading unit, used for reading the content of each expression frame of the target expression from the expression resource file according to the play instruction information corresponding to the expression resource file;
[0190] The rendering unit is used to render the content of each expression frame of the target expression to display the target expression on the conversation page.
[0191] As can be seen from the above, in this embodiment, the conversation page of the target conversation in the instant messaging client can be displayed through the expression display unit 301, and the conversation page includes messages sent by the conversation members of the target conversation, and the messages include the target expression; when the type of the target expression is a dynamic random expression, and the random result generated by the dynamic random expression meets the dynamic effect triggering condition, the dynamic effect corresponding to the dynamic random expression is displayed on the conversation page through the dynamic effect display unit 302. In this embodiment, the corresponding dynamic effect can be triggered and displayed based on the random result generated by the dynamic random expression, which enriches the display form of the expression and improves the user stickiness of the product.
[0192] The present application also provides an electronic device, such as Figure 4 As shown, it shows a schematic diagram of the structure of an electronic device involved in an embodiment of the present application, and the electronic device may be a terminal or a server, etc. Specifically:
[0193] The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that Figure 4 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0194] The processor 401 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, the processor 401 performs various functions of the electronic device and processes data. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.
[0195] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0196] The electronic device also includes a power supply 403 for supplying power to each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 403 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
[0197] The electronic device may further include an input unit 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0198] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby realizing various functions, as follows:
[0199] A session page of a target session in an instant messaging client is displayed, wherein the session page includes messages sent by session members of the target session, wherein the messages include a target expression; when the type of the target expression is a dynamic random expression, and the random result generated by the dynamic random expression meets an effect triggering condition, an effect corresponding to the dynamic random expression is displayed on the session page.
[0200] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0201] As can be seen from the above, this embodiment can display the conversation page of the target conversation in the instant messaging client, the conversation page includes the message sent by the conversation members of the target conversation, and the message includes the target expression; when the type of the target expression is a dynamic random expression, and the random result generated by the dynamic random expression meets the dynamic effect triggering condition, the dynamic effect corresponding to the dynamic random expression is displayed on the conversation page. This embodiment can trigger the display of the corresponding dynamic effect based on the random result generated by the dynamic random expression, enriching the display form of the expression and improving the user stickiness of the product.
[0202] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0203] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any expression display method provided in the embodiment of the present application. For example, the instructions can execute the following steps:
[0204] A session page of a target session in an instant messaging client is displayed, wherein the session page includes messages sent by session members of the target session, wherein the messages include a target expression; when the type of the target expression is a dynamic random expression, and the random result generated by the dynamic random expression meets an effect triggering condition, an effect corresponding to the dynamic random expression is displayed on the session page.
[0205] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0206] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0207] Since the instructions stored in the computer-readable storage medium can execute the steps in any expression display method provided in the embodiments of the present application, the beneficial effects that can be achieved by any expression display method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0208] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being 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 methods provided in various optional implementations of the above-mentioned expression display aspects.
[0209] The above is a detailed introduction to an expression display method, device, electronic device and storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for displaying facial expressions, characterized in that: include: Displaying a session page of a target session in an instant messaging client, the session page including messages sent by session members of the target session, the messages including a target emoticon; When the type of the target expression is a dynamic random expression, and the random result generated by the dynamic random expression meets the animation triggering condition, the animation corresponding to the dynamic random expression is displayed on the conversation page, the target expression includes a first expression element and a second expression element, the random result includes an interaction result of the first expression element and the second expression element, the display position of the animation is associated with the position of the target expression element, the target expression element is an expression element in the expression element of the target expression that matches the attribute of the animation, and the random result is a target expression result randomly selected from the preset expression results based on the probability corresponding to each preset expression result of the dynamic random expression, and the probability corresponding to each preset expression result of the dynamic random expression is configured by the instant messaging client.
2. The method according to claim 1, characterized in that The animation is associated with the target interactive theme.
3. The method according to claim 1, characterized in that: The method further comprises: When the type of the target expression is a dynamic random expression, a preparatory loop animation corresponding to the target expression is played on the conversation page; When the preliminary loop animation ends, the random result corresponding to the target expression is displayed on the conversation page.
4. The method according to claim 3, characterized in that When the type of the target expression is a dynamic random expression, playing a preparatory loop animation corresponding to the target expression on the conversation page includes: When the type of the target expression is a dynamic random expression and the message only includes the target expression, a preparatory loop animation corresponding to the target expression is played on the conversation page.
5. The method according to claim 3, characterized in that: When the preliminary loop animation is finished playing, before the random result corresponding to the target expression is displayed on the conversation page, the method further includes: Based on the probabilities corresponding to the preset expression results of the dynamic random expression, a target expression result is randomly selected from the preset expression results as a random result generated by the dynamic random expression.
6. The method according to claim 1, characterized in that The displaying of the dynamic effect corresponding to the dynamic random expression on the conversation page includes: Determining a target motion effect of the dynamic random expression based on the attribute information of the target session; The target animation is displayed on the session page.
7. The method according to claim 1, characterized in that When the type of the target expression is a dynamic random expression, and the random result generated by the dynamic random expression meets the dynamic effect triggering condition, the dynamic effect corresponding to the dynamic random expression is displayed on the conversation page, including: When the type of the target expression is a dynamic random expression, the random result generated by the dynamic random expression meets the dynamic effect triggering condition, and the interval time of sending the target expression in the target session is greater than the preset time, the dynamic effect corresponding to the dynamic random expression is displayed on the session page.
8. The method according to claim 1, characterized in that The displaying of the dynamic effect corresponding to the dynamic random expression on the conversation page includes: The animation corresponding to the dynamic random expression is displayed in full screen on the conversation page.
9. The method according to claim 1, characterized in that: The method further comprises: Cache the expression resource file corresponding to the target expression; Reading each expression frame content of the target expression from the expression resource file according to the playback instruction information corresponding to the expression resource file; Rendering each expression frame content of the target expression to display the target expression on the conversation page.
10. An expression display device, characterized in that: include: An expression display unit, used to display a session page of a target session in an instant messaging client, wherein the session page includes messages sent by session members of the target session, wherein the messages include a target expression; The animation display unit is used to display the animation corresponding to the dynamic random expression on the conversation page when the type of the target expression is a dynamic random expression and the random result generated by the dynamic random expression meets the animation triggering condition, the target expression includes a first expression element and a second expression element, the random result includes an interaction result of the first expression element and the second expression element, the display position of the animation is associated with the position of the target expression element, the target expression element is an expression element in the expression element of the target expression that matches the attribute of the animation, the random result is a target expression result randomly selected from the preset expression results based on the probability corresponding to each preset expression result of the dynamic random expression, and the probability corresponding to each preset expression result of the dynamic random expression is configured by the instant messaging client.
11. An electronic device, characterized in that: It comprises a memory and a processor; the memory stores an application, and the processor is used to run the application in the memory to perform the operations in the expression display method described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the expression display method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Method and device for processing dynamic expression
CN103309872A
Expression display method, device, computer-readable storage medium and terminal
CN109388297A
Message processing method, device and system, computer equipment and storage medium
CN110971424A
Session-based information display method and device, equipment and storage medium
CN112748974A
Session-based information display method and device, equipment and storage medium
CN112817670A
