Expression generation method, device, computer equipment and storage medium
By detecting generated expression events triggered by session messages in instant messaging software, displaying the expression editing page and processing the editing operation, the problem of adding pictures in the existing technology as expressions is solved, and fast and efficient expression generation is achieved.
Patent Information
- Application Number
- CN202210359148.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-07
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2042-04-07
AI Technical Summary
In the prior art, the process of adding pictures generated in instant messaging as expressions is lengthy and complicated, and the operation cannot be quickly and efficiently made into expressions.
It provides an expression generation method, which detects the generated expression events triggered by the session message in the session page, responds to the generated expression events, displays the expression editing page corresponding to the session message, and obtains and processes editing operations in the page to generate expressions.
It realizes the rapid generation of expressions in session pages without the need for third-party software, simplifies the process and improves the efficiency of expression generation.
Smart Images

Figure CN114693827B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an expression generation method, apparatus, computer equipment and storage medium. Background Art
[0002] In instant messaging software, emoticons have become a common way of communication. Rich and vivid emoticons can better convey the user's emotions and greatly enhance the user experience.
[0003] At present, the process of adding pictures generated in instant messaging as emoticons is as follows: saving the pictures generated in instant messaging to local memory, making emoticons through third-party software and saving them to local memory, and the instant messaging software is provided with an add emoticon function page, through which emoticons can be added from local memory; in the existing method, the process of adding pictures generated in instant messaging as emoticons is lengthy and the operation is complicated, and it is impossible to quickly and efficiently make pictures generated in instant messaging into emoticons. Summary of the invention
[0004] Based on this, it is necessary to provide an expression generation method, device, computer equipment and storage medium for quickly generating expressions from conversation messages in a conversation page without the need for third-party software to address the above technical problems.
[0005] In a first aspect, the present application provides a method for generating an expression. The method comprises:
[0006] Detecting the expression generation event triggered by the conversation message in the conversation page;
[0007] In response to the expression generation event, displaying an expression editing page corresponding to the conversation message;
[0008] In the expression editing page, an editing operation for the conversation message is obtained, and the conversation message is processed according to the editing operation to generate an expression.
[0009] In one embodiment, the step of detecting a generating expression event triggered by a conversation message in a conversation page includes:
[0010] Detecting a selection event triggered by a conversation message in a conversation page, and displaying and generating an emoticon icon in response to the selection event;
[0011] Detecting a generate expression event triggered by the generate expression icon.
[0012] In one embodiment, the conversation message includes a picture; and the displaying of the emoticon editing page corresponding to the conversation message includes:
[0013] Calling a picture editing interface, jumping from the conversation page to a first expression editing page corresponding to the picture editing interface;
[0014] Correspondingly, in the expression editing page, obtaining an editing operation for the conversation message, and generating an expression after processing the conversation message according to the editing operation, includes:
[0015] In the first expression editing page, obtaining at least one editing operation of a cropping operation, a text adding operation, and a smearing operation for the image;
[0016] According to at least one editing operation among the acquired cropping operation, text adding operation and smearing operation, the image is processed to generate an expression.
[0017] In one embodiment, the conversation message includes a video; and the displaying of the expression editing page corresponding to the conversation message includes:
[0018] Calling a video editing interface, and jumping from the conversation page to a second expression editing page corresponding to the video editing interface;
[0019] Correspondingly, in the expression editing page, obtaining an editing operation for the conversation message, and generating an expression after processing the conversation message according to the editing operation, includes:
[0020] In the second expression editing page, obtaining a key frame extraction operation and a format conversion operation for the video;
[0021] The video is processed according to the obtained key frame extraction operation and format conversion operation to generate an expression.
[0022] In one embodiment, the conversation message includes text; and the displaying the emoticon editing page corresponding to the conversation message includes:
[0023] Calling a text editing interface, jumping from the conversation page to a third expression editing page corresponding to the text editing interface;
[0024] Correspondingly, in the expression editing page, obtaining an editing operation for the conversation message, and generating an expression after processing the conversation message according to the editing operation, includes:
[0025] In the third expression editing page, a selection operation for an expression template thumbnail is obtained, and according to the obtained selection operation, an expression template corresponding to the text and the expression template thumbnail is synthesized to obtain a candidate expression;
[0026] A text editing operation for the text in the candidate expression is obtained, and the text in the candidate expression is processed according to the obtained text editing operation to generate an expression.
[0027] In one embodiment, in response to the generating expression event, displaying the expression editing page corresponding to the conversation message includes:
[0028] In response to the expression generation event, acquiring candidate conversation messages based on a plurality of historical conversation messages in the conversation page;
[0029] Jump from the conversation interface to the expression editing page corresponding to the conversation message, and display the conversation message and the alternative conversation message on the expression editing page;
[0030] Correspondingly, in the expression editing page, obtaining an editing operation for the conversation message, and generating an expression after processing the conversation message according to the editing operation, includes:
[0031] In the expression editing page, the editing operation for the conversation message and the candidate conversation message is obtained, and the conversation message and the candidate conversation message are processed according to the obtained editing operation to generate an expression.
[0032] In one embodiment, the acquiring candidate conversation messages based on the multiple historical conversation messages in the conversation page includes:
[0033] Among the multiple historical conversation messages, the text with the highest frequency of occurrence is determined, and the text with the highest frequency of occurrence is used as a candidate conversation message.
[0034] In one embodiment, the conversation message includes a plurality of pictures; in the expression editing page, obtaining an editing operation for the conversation message, and generating an expression after processing the conversation message according to the editing operation, includes:
[0035] In the first expression editing page, a combination operation for the multiple pictures is obtained, and the multiple pictures are processed according to the combination operation to obtain a combined picture;
[0036] The editing operation for the combined image is obtained, and the combined image is processed according to the obtained editing operation to generate an expression.
[0037] In one embodiment, the emoticon editing page includes an editing completion icon; in the emoticon editing page, obtaining an editing operation for the conversation message, and generating an emoticon after processing the conversation message according to the editing operation, including:
[0038] In the expression editing page, obtaining an editing operation for the conversation message;
[0039] In the case where an editing operation for the conversation message is obtained, the conversation message is processed according to the obtained editing operation to obtain a preview expression, and the preview expression is displayed on the expression editing page;
[0040] In response to an edit completion event triggered by the edit completion icon, using the preview expression currently displayed in the expression editing page as the generated expression;
[0041] The method further comprises:
[0042] In the case that no editing operation for the conversation message is obtained, in response to an editing completion event triggered by the editing completion icon, the conversation message is used as the generated expression.
[0043] In a second aspect, the present application also provides an expression generation device. The device comprises:
[0044] A detection module, used to detect the expression generation event triggered by the conversation message in the conversation page;
[0045] A jump module, used for displaying an expression editing page corresponding to the conversation message in response to the expression generation event;
[0046] The editing module is used to obtain the editing operation for the conversation message in the expression editing page, and generate an expression after processing the conversation message according to the editing operation.
[0047] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0048] Detecting the expression generation event triggered by the conversation message in the conversation page;
[0049] In response to the expression generation event, displaying an expression editing page corresponding to the conversation message;
[0050] In the expression editing page, an editing operation for the conversation message is obtained, and the conversation message is processed according to the editing operation to generate an expression.
[0051] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0052] Detecting the expression generation event triggered by the conversation message in the conversation page;
[0053] In response to the expression generation event, displaying an expression editing page corresponding to the conversation message;
[0054] In the expression editing page, an editing operation for the conversation message is obtained, and the conversation message is processed according to the editing operation to generate an expression.
[0055] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0056] Detecting the expression generation event triggered by the conversation message in the conversation page;
[0057] In response to the expression generation event, displaying an expression editing page corresponding to the conversation message;
[0058] In the expression editing page, an editing operation for the conversation message is obtained, and the conversation message is processed according to the editing operation to generate an expression.
[0059] The above-mentioned expression generation method, device, computer equipment, storage medium and computer program product can directly detect the expression generation event triggered by the user in the conversation page, and jump from the conversation page to the expression editing page, and generate expressions after editing the conversation message displayed in the conversation page through the expression editing page. The above-mentioned expression generation method does not need to save the conversation message to the local album of the terminal when it is necessary to generate expressions from the conversation message in the conversation page. The expression is generated by third-party software and then added to the expression panel. In this way, there is no need to use third-party software, and in the process of generating expressions, there is no need to switch multiple times between instant messaging software, the local album of the terminal and the third-party software. The process of generating expressions from conversation messages in the conversation page is simplified, and the efficiency of generating expressions is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 A diagram of an application environment of an expression generation method in an embodiment;
[0061] Figure 2 is a flow chart of an expression generation method in one embodiment;
[0062] Figure 3 In one embodiment, a conversation page displays details of a picture and a schematic diagram of generating an emoticon icon;
[0063] Figure 4 In one embodiment, the conversation page displays a menu panel, and the menu panel displays a schematic diagram of generating an emoticon icon;
[0064] Figure 5 In one embodiment, the conversation message includes a picture, or a video, or a diagram of a text;
[0065] Figure 6 In one embodiment, the first expression editing page displays a schematic diagram of a picture, a cropping operation icon, a text operation icon, and a smearing operation icon;
[0066] Figure 7 A schematic diagram of an expression panel in one embodiment;
[0067] Figure 8 is a flowchart of an expression generation method in a specific embodiment;
[0068] Fig. 9 is a structural block diagram of an expression generating device in one embodiment;
[0069] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0071] The expression generation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. The expression generation method is applied to an expression generation system, and the expression generation system includes: a terminal 102 and a server 104, and the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0072] Terminal 102 can detect a generate expression event triggered in a conversation page, and in response to the generate expression event, jump from the conversation page to an expression editing page. Terminal 102 can also obtain an editing operation for the conversation message in the expression editing page, and generate an expression after processing the conversation message according to the editing operation. Terminal 102 can also add an expression thumbnail of the expression to the expression panel.
[0073] The above application environment is just an example. In some embodiments, the terminal 102 can also send the conversation message and the acquired editing operation to the server 104. The server 104 processes the conversation message according to the editing operation to generate an emoticon, and feeds the emoticon back to the terminal 102. The terminal 102 adds the emoticon thumbnail of the emoticon to the emoticon panel. In this way, when the terminal 102 detects the triggering operation of the emoticon thumbnail, it can pull the emoticon corresponding to the emoticon thumbnail from the server 104 and display the emoticon as a conversation message in the conversation page.
[0074] In one embodiment, Figure 2 As shown, a method for generating an expression is provided, and the method is applied to Figure 1 The terminal 102 in the example is used as an example to illustrate, and the following steps are included:
[0075] S102: Detecting an expression generation event triggered by a conversation message in a conversation page.
[0076] The conversation page is a page for displaying conversation messages, for example, it can be a page in instant messaging software for displaying conversation messages sent by two users or multiple users; conversation messages are messages sent by any user and displayed in the conversation page; the expression generation event is an event that triggers the generation of expressions. In instant messaging software, users can express their thoughts and emotions through expressions; expressions include static expressions and dynamic expressions, the format of static expressions can be JPG (Joint Photographic Experts Group) format, and the format of dynamic expressions can be GIF (Graphics Interchange Format) format; expressions in JPG format are one image, and expressions in GIF format are animations composed of multiple images.
[0077] Specifically, the terminal detects a selection event triggered by a user for a session message in the session page, displays a generated emoticon icon, and detects a generated emoticon event triggered by a user for the generated emoticon icon. The session message here may refer to a session message sent by any user account participating in the session.
[0078] S104: In response to the expression generation event, display an expression editing page corresponding to the conversation message.
[0079] The expression editing page is used to display conversation messages, edit conversation messages, and generate expressions.
[0080] Specifically, in response to the expression event being generated, the terminal obtains the type of the session message and displays the expression editing page corresponding to the type of the session message. The types of the session message include: picture type, video type and text type; the expression editing page corresponding to the picture type is recorded as the first expression editing page, the expression editing page corresponding to the video type is recorded as the second expression editing page, and the expression editing page corresponding to the text type is recorded as the third expression editing page.
[0081] S106, in the expression editing page, obtaining an editing operation for the conversation message, and generating an expression after processing the conversation message according to the editing operation.
[0082] The editing operation is an operation for processing a conversation message. The emoticon editing page includes a preview area and a plurality of editing icons. The preview area is used to display the conversation message. During the editing of the conversation message, the conversation message being edited is displayed synchronously, realizing editing and previewing. The plurality of editing icons correspond to a plurality of editing operations.
[0083] Specifically, the terminal displays the conversation message in the preview area and displays editing icons for multiple editing operations, obtains the editing operation on the conversation message triggered by the user through the editing icon, processes the conversation message according to the triggered editing operation, and displays the preview expression. In response to the editing completion event triggered in the expression editing page, the currently displayed preview expression is used as the generated expression.
[0084] In one embodiment, the emoticon editing page includes an edit completion icon; in the emoticon editing page, an edit operation for a session message is obtained, and the session message is processed according to the edit operation to generate an emoticon, including: in the emoticon editing page, an edit operation for a session message is obtained; in the case of obtaining an edit operation for a session message, a preview emoticon is obtained after processing the session message according to the obtained edit operation, and the preview emoticon is displayed in the emoticon editing page; in response to an edit completion event triggered by the edit completion icon, the preview emoticon currently displayed in the emoticon editing page is used as the generated emoticon. In the case of not obtaining an edit operation for a session message, it also includes: in response to an edit completion event triggered by the edit completion icon, the session message is used as the generated emoticon.
[0085] In the above-mentioned expression generation method, the expression generation event triggered by the user can be directly detected in the conversation page, and the conversation page can be jumped to the expression editing page. The conversation message displayed in the conversation page is edited and processed through the expression editing page to generate the expression. In the above-mentioned expression generation method, when it is necessary to generate an expression from the conversation message in the conversation page, there is no need to save the conversation message to the local album of the terminal, and the expression is generated through third-party software, and then the expression is added to the expression panel. In this way, there is no need to use third-party software, and in the process of generating expressions, there is no need to switch multiple times between instant messaging software, the local album of the terminal and the third-party software. This simplifies the process of generating expressions from conversation messages in the conversation page and improves the efficiency of generating expressions.
[0086] In one embodiment, S102 includes:
[0087] S201: Detect a selection event triggered by a conversation message in a conversation page, and display and generate an emoticon icon in response to the selection event.
[0088] Specifically, the selection event triggered by the conversation message may be an event triggered by a selection operation of the user on the conversation message, and the selection operation may be a click operation, a press operation, a slide operation, etc. on the conversation message.
[0089] In one embodiment, the terminal detects a user's click operation on a session message in a session page, triggering a selection event of the session message, and in response to the selection event, displays the details of the session message in the session page and generates an emoticon icon; in response to the selection event, a download icon, more operation icons, etc. can also be displayed in the session page; the download icon is used to download the session message, and the more operation icon is used to display an operation panel, which includes multiple operation icons.
[0090] For example, Figure 3 As shown, the conversation message is a picture. The terminal detects a user's click operation on the picture in the conversation page, triggering a selection event of the picture. In response to the selection event, the details of the picture are displayed in the conversation page, and an emoticon icon is generated.
[0091] In one embodiment, Figure 4 As shown, the terminal detects a user's pressing operation or sliding operation on a conversation message in a conversation page, triggering a selection event of the conversation message, and displays a menu panel in response to the selection event, and displays a generated emoticon icon in the menu panel. The menu panel can also display a forwarding icon for forwarding a conversation message, a delete icon for deleting a conversation message, and the like.
[0092] S202: Detecting a generate expression event triggered by the generate expression icon.
[0093] Specifically, the expression generation event triggered by the expression generation icon may be an event triggered by a user's click operation on the expression generation icon. For example, the user clicks on the expression generation icon to trigger the expression generation event of the expression generation icon.
[0094] In one embodiment, Figure 5 As shown, the conversation message includes a picture, or a video, or a text, that is, a picture can be displayed as a conversation message in a conversation page, and the picture is the conversation message. Similarly, a video or a text can be displayed as a conversation message in a conversation page, and the video or the text is the conversation message. The conversation message is one of a picture, a video, and a text.
[0095] In response to the expression event being generated, the terminal obtains the format of the conversation message, determines whether the conversation message includes a picture, a video, or a text according to the format of the conversation message, and then jumps from the conversation page to the expression editing page corresponding to the format of the conversation message. If the format of the conversation message is a picture format, such as JPG format, PNG format, etc., it is determined that the conversation message includes a picture; if the format of the conversation message is a video format, such as MP4 format, MOV format, etc., it is determined that the conversation message includes a video; if the format of the conversation message is a text format, such as TXT format, etc., it is determined that the conversation message includes text.
[0096] In one embodiment, when the conversation message includes a picture, S104 includes:
[0097] S401A, calling a picture editing interface, and jumping from the conversation page to a first expression editing page corresponding to the picture editing interface.
[0098] Specifically, the picture editing interface is an application programming interface for calling an existing picture editing method, and the terminal jumps from the conversation page to the first expression editing page according to the picture editing interface.
[0099] In one embodiment, Figure 6 As shown, the first expression editing page displays pictures, cropping operation icons, text operation icons and smearing operation icons. The first expression editing page is not limited to displaying the above icons, but can also display icons for other editing operations, and pictures can be edited through icons for other editing operations.
[0100] Corresponding to S401A, S106 includes:
[0101] S601A. In the first expression editing page, obtain at least one editing operation of a cropping operation, a text adding operation, and a smearing operation for the image.
[0102] Specifically, the cropping operation is triggered by the user through the cropping operation icon in the first expression editing page, the adding text operation is triggered by the user through the adding text operation icon in the first expression editing page, and the smearing operation is triggered by the user through the smearing operation icon in the first expression editing page.
[0103] S602A: generate an expression by processing the image according to at least one editing operation among the acquired cropping operation, text adding operation and smearing operation.
[0104] Specifically, the terminal processes the picture according to at least one editing operation among the acquired cropping operation, text adding operation and smearing operation, including but not limited to: processing the picture according to the acquired cropping operation, processing the picture according to the acquired smearing operation, or processing the picture according to the acquired cropping operation and text adding operation, or processing the picture according to the acquired cropping operation and smearing operation.
[0105] In one embodiment, the first editing page includes an editing completion icon, and in the expression editing page, obtaining an editing operation for the conversation message, and generating an expression after processing the conversation message according to the editing operation, includes:
[0106] In the first expression editing page, an editing operation for the image is obtained. When the editing operation for the image is obtained, the image is processed according to the obtained editing operation, and a preview expression is displayed in the first expression editing page. In response to an editing completion event triggered by the editing completion icon, the preview expression currently displayed in the first expression editing page is used as the generated expression.
[0107] Specifically, an editing completion icon is displayed in the first expression editing page, a picture is displayed in the first expression page, the picture is processed according to the acquired editing operation, and a preview expression is displayed in the first expression editing page. That is to say, in the process of processing the picture according to the acquired editing operation, the picture in the editing process is synchronously displayed, and the preview expression is the picture in the editing process; in response to the editing completion event triggered by the editing completion icon, the currently displayed preview expression is used as the generated expression.
[0108] In the first expression editing page, after obtaining the editing operation for the image, the method further includes: if no editing operation for the image is obtained, in response to an editing completion event triggered by the editing completion icon, using the image as a generated expression.
[0109] When no editing operation for the image is obtained in the first expression editing page, but an editing completion event is detected in the first expression editing page, the image is used as the generated expression.
[0110] In one embodiment, the first emoticon editing page can also display operation icons for adding filters, adding stickers, and adjusting image parameters, etc. Accordingly, the terminal can obtain operations for adding filters, adding stickers, and adjusting image parameters, etc. for the image in the first emoticon editing page.
[0111] In one embodiment, the image is processed according to at least one editing operation of the obtained cropping operation, text adding operation and smearing operation to obtain a processed image, and the amount of data occupied by the processed image in the memory is obtained. If the amount of data is greater than a preset threshold, the processed image is compressed to generate an expression; if the amount of data is less than the preset threshold, the processed image is used as the generated expression. The amount of data occupied by the generated expression in the memory is not greater than the preset threshold.
[0112] In this embodiment, when the conversation message is a picture, you can jump directly from the conversation page to the first expression editing page, and edit the picture through the first expression editing page to generate an expression without using third-party software. In the process of generating expressions, there is no need to switch multiple times between instant messaging software, the terminal's local album and third-party software, which simplifies the process of generating expressions and improves the efficiency of generating expressions.
[0113] In one embodiment, when the conversation message includes a video, S104 includes:
[0114] S401B, calling a video editing interface, and jumping from the conversation page to a second expression editing page corresponding to the video editing interface.
[0115] Specifically, the video editing interface is an application programming interface for calling an existing video editing method, and the terminal jumps from the conversation page to the second expression editing page according to the video editing interface. The second expression editing page displays a video, an extraction key frame operation icon, and a format conversion operation icon.
[0116] Corresponding to S401B, S106 includes:
[0117] S601B. In the second expression editing page, obtain a key frame extraction operation and a format conversion operation for the video.
[0118] Specifically, the key frame extraction operation is triggered by the user through the key frame extraction operation icon in the second expression editing page, and the format conversion operation is triggered by the user through the format conversion operation icon in the second expression editing page.
[0119] S602B, generating an expression after processing the video according to the obtained key frame extraction operation and format conversion operation.
[0120] Specifically, the video is processed according to the obtained key frame extraction operation to obtain a key video segment, and the key video segment is processed according to the obtained format conversion operation to generate an expression.
[0121] In one implementation, the terminal processes the video according to the key frame extraction operation, including: the terminal displays the frame sequence of the video according to the key frame extraction operation, and obtains the key video segment in response to multiple extraction events for the frame sequence. The multiple extraction events are triggered by the user's click operation on multiple video frames in the frame sequence, and the multiple video frames receiving the click operation are used as multiple key video frames, and the key video segment includes the multiple key video frames.
[0122] In another implementation, the terminal calls a key frame extraction interface according to the key frame extraction operation for the video to obtain the key video segment. The key frame extraction interface may be an application programming interface.
[0123] The second expression editing page also displays an editing completion icon; the terminal processes the key video segment according to the format conversion operation, and displays a preview expression in GIF format on the second expression editing page. In response to the editing completion event triggered by the editing completion icon, the currently displayed preview expression is used as the generated expression.
[0124] In one embodiment, the second expression editing page displays a capture operation icon, and the user triggers the capture operation through the capture operation icon in the second expression editing page. Before obtaining the key frame extraction operation and format conversion operation for the video, it also includes:
[0125] An interception operation for the video is obtained, and the video is processed according to the obtained interception operation to obtain a video processed by the interception operation.
[0126] Specifically, when the video is long, or the user wants to generate an expression based on a portion of the video segment in the video, the capture operation icon in the second expression editing page is triggered, and the terminal displays the frame sequence of the video according to the obtained capture operation, and responds to the video start event and the video end event for the frame sequence to obtain the video after the capture operation. The duration of the video after the capture operation is not greater than the preset duration, which can be 3s.
[0127] The video start event is triggered by the user's first click operation on the frame sequence. The first click operation is an odd-numbered click operation received by the frame sequence. The video frame that receives the first click operation in the frame sequence is used as the start frame. The video end event is triggered by the user's second click operation on the frame sequence. The second click operation is an even-numbered (excluding 0) click operation received by the frame sequence. The video frame that receives the second click operation in the frame sequence is used as the end frame. All video frames from the start frame to the end frame in the frame sequence are selected to obtain the video after the interception operation.
[0128] In one embodiment, the second expression editing page displays an add text operation icon, and the user triggers the add text operation through the add text operation icon in the second expression editing page. Before generating an expression after processing the key video segment according to the acquired format conversion operation, it also includes:
[0129] An operation of adding text to a key video segment is obtained, a text box is displayed in response to the operation of adding text, the added text is obtained through the text box, and the added text is added to each key video frame of the key video segment to obtain the key video segment with the added text.
[0130] In one embodiment, the video is processed according to the obtained key frame extraction operation and format conversion operation to obtain a processed image, and the amount of data occupied by the processed image in the memory is obtained. If the amount of data is greater than a preset threshold, the processed image is compressed to generate an expression; if the amount of data is less than the preset threshold, the processed image is used as the generated expression. The amount of data occupied by the generated expression in the memory is not greater than the preset threshold.
[0131] In this embodiment, when the conversation message is a video, you can jump directly from the conversation page to the second expression editing page, and edit the video through the second expression editing page to generate an expression in GIF format. There is no need to use third-party software. In the process of generating expressions, there is no need to switch multiple times between instant messaging software, the terminal's local album and third-party software. This simplifies the process of generating expressions and improves the efficiency of generating expressions.
[0132] In one embodiment, when the conversation message includes text, S104 includes:
[0133] S401C, calling a text editing interface, and jumping from the conversation page to a third expression editing page corresponding to the text editing interface.
[0134] Specifically, the text editing interface is an application programming interface for calling an existing text editing method. The terminal jumps from the conversation page to the third expression editing page according to the text editing interface. The third expression editing page displays text, expression template thumbnails and text editing operation icons.
[0135] Corresponding to S401C, S106 includes:
[0136] S601C. In the third expression editing page, a selection operation for an expression template thumbnail is obtained, and according to the obtained selection operation, the text and the expression template corresponding to the expression template thumbnail are synthesized to obtain a candidate expression.
[0137] Specifically, when jumping to the third expression editing page, multiple expression template thumbnails are pulled from the server, and multiple expression template thumbnails are displayed on the third expression editing page. The selection operation of the expression template thumbnail can be triggered by the user clicking the expression template thumbnail, and according to the obtained selection operation, the text and the expression template corresponding to the expression template thumbnail are synthesized to obtain a candidate expression.
[0138] In one embodiment, multiple expression template thumbnails include a thumbnail of a user avatar, where the user avatar is the avatar of the user who sent the text; when jumping to the third expression editing page, the thumbnail of the user avatar and the text are synthesized to obtain a candidate expression, and the candidate expression is displayed on the third expression editing page, a selection operation for the expression template thumbnail is obtained, and according to the obtained selection operation, the expression template thumbnail is used to replace the thumbnail of the user avatar in the candidate expression to obtain the candidate expression.
[0139] In one embodiment, the multiple expression template thumbnails also include a thumbnail of a default template. When jumping to the third expression editing page, the default template thumbnail and text are synthesized to obtain a candidate expression, and the candidate expression is displayed in the third expression editing page; the default template thumbnail can be a thumbnail of a single color.
[0140] S602C: Obtain a text editing operation for the text in the candidate expression, and generate an expression after processing the text in the candidate expression according to the obtained text editing operation.
[0141] Specifically, the third emoticon editing page also displays a text icon. The user triggers an editing event for the text through the text icon in the third emoticon editing page. The terminal responds to the editing event by displaying a text editing box for the text and obtaining a text editing operation for the text through the text editing box.
[0142] The text editing operation includes: at least one editing operation of rotation operation, scaling operation, font change operation and move operation, and the text editing box includes a rotation icon; wherein the rotation operation can be triggered by the user pressing and sliding the rotation icon of the text editing box, the scaling operation can be triggered by the user sliding the text editing box with two fingers, the font change operation can be triggered by the user clicking the text editing box and clicking the font style thumbnail displayed by the click operation, and the move operation can be triggered by the user pressing and sliding the text editing box.
[0143] In one embodiment, the text in the candidate expression is processed according to the obtained text editing operation to obtain a processed candidate expression, and the amount of data occupied by the processed candidate expression in memory is obtained. If the amount of data is greater than a preset threshold, the processed candidate expression is compressed and then generated into an expression; if the amount of data is less than the preset threshold, the processed candidate expression is used as the generated expression. The amount of data occupied by the generated expression in memory is not greater than the preset threshold.
[0144] In this embodiment, when the conversation message is text, you can jump directly from the conversation page to the third expression editing page. Through the third expression editing page, the text can be applied to the expression template, and the text can also be edited to generate expressions. There is no need to use third-party software, which simplifies the process of generating expressions and improves the efficiency of generating expressions.
[0145] In one embodiment, S104 includes:
[0146] S411. In response to the expression generation event, obtain candidate conversation messages based on a plurality of historical conversation messages in the conversation page.
[0147] The historical session message is a session message in the session page whose sending time is earlier than that of the session message. The sending time is the time when the user sends the session message to the session page, and is also the time when the session message is displayed in the session page.
[0148] In one implementation, the acquiring candidate conversation messages based on the multiple historical conversation messages in the conversation page includes: determining a conversation message with the highest frequency of occurrence among the multiple historical conversation messages, and using the conversation message with the highest frequency of occurrence as the candidate conversation message.
[0149] In the case where the conversation message that triggers the expression event generation is a picture or video, the candidate conversation message is text; multiple text history conversation messages are determined from multiple historical conversation messages, and the text history conversation message with the highest frequency among the multiple text history conversation messages is used as the candidate conversation message; the text history conversation message is text, so the candidate conversation message is text. In actual use, the text history conversation message with the highest frequency may be a common phrase in the conversation page.
[0150] When the conversation message that triggers the generation of the expression event is text, the alternative conversation message is a picture or a video; multiple multimedia historical conversation messages are determined from multiple historical conversation messages, and the multimedia historical conversation message with the highest frequency of appearance among the multiple multimedia historical conversation messages is used as the alternative conversation message; the multimedia historical conversation message is a picture or a video, so the alternative conversation message is a picture or a video.
[0151] In another implementation, obtaining the alternative session message based on the multiple historical session messages in the session page includes: determining, according to the sending time of each historical session message, a historical session message that is closest to the session message among the multiple historical session messages, and using the historical session message as the alternative session message. The alternative session message can be any one of text, picture, and video.
[0152] A plurality of text historical conversation messages of text type are determined from the plurality of historical conversation messages, the sending time of each historical conversation message is determined, and the historical conversation message whose sending time is closest to the sending time of the conversation message is used as the candidate conversation message. In actual use, the historical conversation message whose sending time is closest to the conversation message may be related to the conversation message, so the historical conversation message whose sending time is closest to the conversation message is used as the candidate conversation message.
[0153] S412: Jump from the conversation interface to an expression editing page corresponding to the conversation message, and display the conversation message and the candidate conversation messages on the expression editing page.
[0154] Specifically, the expression editing page includes: a preview area and an editing area, the preview area displays the conversation message, and the editing area displays the alternative conversation message. In one embodiment, the nickname of the user who sends the conversation message in the conversation page can also be displayed in the editing area.
[0155] Corresponding to S411 and S412, S106 includes:
[0156] S611: In the expression editing page, obtain editing operations for the conversation message and the candidate conversation message, and generate an expression after processing the conversation message and the candidate conversation message according to the obtained editing operations.
[0157] Specifically, when the alternative conversation message is text, the editing operation for the alternative conversation message includes a selection operation and a text editing operation. The terminal obtains the selection operation for the alternative conversation message in the expression editing page, and displays the alternative conversation message (text) in the conversation message (picture or video). The terminal obtains the text editing operation for the text in the conversation message in the expression editing page to edit the position, size, font, etc. of the text in the conversation message.
[0158] For example, when the conversation message is a picture, the terminal obtains an alternative conversation message, which is: "Hahaha", and displays the picture and the alternative conversation message: "Hahaha" in the first expression editing page. The terminal obtains the user's selection operation for "Hahaha", displays "Hahaha" in the picture, and obtains the user's text editing operation for "Hahaha" to perform text editing on "Hahaha".
[0159] In this embodiment, the alternative conversation message is displayed in the expression editing page, which provides a way of thinking for generating expressions and may bring unexpected effects to users. When users need to use alternative conversation messages to generate expressions, they can directly display the alternative conversation messages in the conversation messages, eliminating the process of adding alternative conversation messages and improving the efficiency of generating expressions.
[0160] In the case where the candidate conversation message is a picture, the editing operation for the candidate conversation message includes: a selection operation and a picture editing operation, and the picture editing operation includes at least one of a cropping operation and a smearing operation. The terminal obtains the selection operation for the candidate conversation message in the expression editing page, displays the conversation message (text) in the candidate conversation message (picture), and obtains the picture editing operation for the candidate conversation message in the expression editing page to edit the picture.
[0161] In the case where the candidate conversation message is a video, the editing operation for the candidate conversation message includes: a selection operation and a video editing operation, and the video editing operation includes: a key frame extraction operation and a format conversion operation. The terminal obtains the selection operation for the candidate conversation message in the expression editing page, displays the conversation message (text) in the alternative conversation message (video), and obtains the key frame extraction operation and the format conversion operation for the alternative conversation message in the expression editing page to edit the video.
[0162] In one embodiment, the conversation message includes multiple pictures, and S102 includes:
[0163] S211, detecting expression generation events triggered by multiple pictures in the conversation page.
[0164] Specifically, a selection event triggered by multiple images in a conversation page is detected, an expression icon is displayed in response to the selection event, and an expression generation event triggered by the expression generation icon is detected. The selection event triggered by multiple images may be an event triggered by a user's selection operation on multiple images. The selection operation may be a pressing operation or a sliding operation.
[0165] The terminal detects a user's pressing or sliding operation on a picture in a conversation page, and in response to the pressing or sliding operation, displays a generated expression icon, a selected icon of the picture, and unselected icons of all other conversation messages in the conversation page in the conversation page. The terminal detects a click operation on the unselected icons of multiple other pictures in the conversation page, and replaces the multiple unselected icons that receive the click operation with selected icons. The terminal obtains the click operation on the generated expression icon, and triggers a generated expression event for multiple pictures.
[0166] Generate multiple images corresponding to the expression event, which are images corresponding to each selected icon in the conversation page. The selected icon and the unselected icon can be different in color and / or shape.
[0167] Corresponding to S211, S106 includes:
[0168] S621. In the first expression editing page, obtain a combination operation for the multiple pictures, and process the multiple pictures according to the combination operation to obtain a combined picture.
[0169] Specifically, multiple pictures and combination operation icons are displayed on the first expression editing page. The combination operation icons include: splicing icons and dynamic combination icons. The combination operations include: splicing operations and dynamic combination operations.
[0170] The user triggers a stitching operation on multiple pictures through the stitching icon in the first expression editing page, and the terminal obtains the stitching operation and stitches the multiple pictures into a static combined picture according to the stitching operation.
[0171] The user triggers a dynamic combination operation for multiple pictures through the dynamic combination icon in the first expression editing page. The terminal obtains the dynamic combination operation and, according to the dynamic combination operation, arranges the multiple pictures in the order of sending time from front to back to obtain a picture sequence. The terminal obtains a pressing operation and a dragging operation for each picture in the picture sequence, and adjusts the order of each picture in the picture sequence according to the pressing operation and the dragging operation. The terminal obtains a display time modification operation for each picture in the picture sequence, and adjusts the display time of each picture according to the display time modification operation to obtain a dynamic combination picture. Displaying a dynamic combination picture means displaying multiple pictures according to the order of each picture in the picture sequence and the display time of each picture.
[0172] For example, the multiple pictures include two pictures, namely the first picture and the second picture. The terminal obtains a dynamic combination operation for the first picture and the second picture, and obtains a picture sequence according to the dynamic combination operation: the first picture, the second picture. The terminal obtains a pressing operation and a dragging operation for the first picture, changes the order of the first picture in the picture sequence, and obtains an adjusted picture sequence: the second picture, the first picture. The terminal modifies the display time of the second picture to 1 second according to the display time modification operation for the second picture. The terminal modifies the display time of the first picture to 0.5 seconds according to the display time modification operation for the first picture, and obtains a dynamic combination picture. The combination picture is displayed, that is, the second picture is displayed for 1 second and the first picture is displayed for 0.5 seconds.
[0173] S622: Obtain an editing operation for the combined image, and generate an expression after processing the combined image according to the obtained editing operation.
[0174] Specifically, when the combined picture is a static combined picture, the editing operations for the combined picture include: cropping operations on the combined picture, and / or adding text operations; when the combined picture is a dynamic combined picture, the editing operations for the combined picture include: cropping operations on each picture in the combined picture, and / or adding text operations.
[0175] In one embodiment, an editing operation for the combined image is obtained, and the combined image is processed according to the editing operation, and the amount of data occupied by the combined image after processing is obtained. If the amount of data is greater than a preset threshold, the processed combined image is compressed to generate an expression. The amount of data occupied by the generated expression in the memory is not greater than the preset threshold.
[0176] In this embodiment, complex and vivid expressions can be directly generated based on multiple pictures in the conversation page without using third-party software. In the process of generating expressions, there is no need to switch multiple times between instant messaging software, the terminal's local photo album and third-party software, which simplifies the process of generating expressions and improves the efficiency of generating expressions.
[0177] In one embodiment, the expression generation method further includes:
[0178] S108, adding the expression thumbnail of the expression to the expression panel.
[0179] The expression panel can be displayed through a conversation page, and the conversation page includes an expression panel icon corresponding to the expression panel. When the terminal detects that the expression panel icon is triggered, the expression panel is displayed in the conversation page. The expression panel is a container for storing thumbnails of expressions.
[0180] Specifically, when the generated expression is a static expression, the terminal can use a reduced image of the static expression as an expression thumbnail, and when the generated expression is a dynamic expression, the terminal can use a reduced image of one frame of the dynamic expression as an expression thumbnail. The terminal adds the thumbnail of the generated expression to the expression panel, and when the terminal detects a trigger operation for the expression thumbnail in the expression panel, the expression corresponding to the expression thumbnail is displayed as a conversation message in the conversation page.
[0181] In one embodiment, Figure 7 As shown, the generated emoticon thumbnail is added to the emoticon panel; the emoticon panel may include multiple tabs, for example, a custom tab for storing thumbnails of emoticons added and collected by users, a default tab for storing thumbnails of emoticons provided by instant messaging software, an emoticon album tab for users to store thumbnails of emoticons downloaded from an emoticon store, and the like. The terminal may add the generated emoticon thumbnail to the custom tab of the emoticon panel. When the terminal detects a trigger operation for the emoticon thumbnail in the emoticon panel, the emoticon corresponding to the emoticon thumbnail is displayed as a session message in the session page.
[0182] In one embodiment, the user ID is obtained, and the generated expressions are associated with the user ID and saved in a personal expression library. In this way, after the user logs in on other terminals using the user ID, the generated expressions can also be pulled from the personal expression library. When other terminals detect a trigger operation for the generated expression thumbnail in the expression panel, the expression corresponding to the expression thumbnail is displayed as a session message in the session page.
[0183] In a specific embodiment, see Figure 8 , the above expression generation method includes:
[0184] a01, detect the expression generation event triggered by the conversation message in the conversation page;
[0185] a02, in response to the expression event being generated, obtaining the format of the conversation message, and determining whether the conversation message includes a picture, a video, or a text according to the format; if the conversation message includes a picture, entering a03, if the conversation message includes a video, entering a05, if the conversation message includes text, entering a07;
[0186] a03, calling the picture editing interface, jumping from the conversation page to the first expression editing page;
[0187] a04, on the first expression editing page, obtain the editing operation for the image, and generate an expression after processing the image according to the obtained editing operation, and enter a10;
[0188] a05, calling the video editing interface, jumping from the conversation page to the second expression editing page;
[0189] a06, on the second expression editing page, obtain the key frame extraction operation and format conversion operation for the video; process the video according to the obtained key frame extraction operation and format conversion operation to generate an expression, and enter a10;
[0190] a07, calling the text editing interface to jump from the conversation page to the third expression editing page;
[0191] a08, in the third expression editing page, obtaining a selection operation for the expression template thumbnail, and obtaining a candidate expression according to the obtained selection operation;
[0192] a09, obtaining a text editing operation for the text in the candidate expression, and processing the text in the candidate expression according to the obtained text editing operation to generate an expression, and then entering a10;
[0193] a10, adding the expression thumbnail of the expression to the expression panel.
[0194] In this embodiment, there is no need to use third-party software, that is, the pictures, videos and texts in the conversation page can be edited into emoticons. The process of editing the pictures, videos and texts in the conversation page into emoticons does not require multiple switching between instant messaging software, the terminal's local album and third-party software, which simplifies the process of generating emoticons and improves the efficiency of generating emoticons.
[0195] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0196] Based on the same inventive concept, the embodiment of the present application also provides an expression generation device for implementing the expression generation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more expression generation device embodiments provided below can refer to the limitations on the expression generation method above, and will not be repeated here.
[0197] In one embodiment, Fig. 9 As shown, an expression generating device is provided, comprising:
[0198] A detection module, used to detect the expression generation event triggered by the conversation message in the conversation page;
[0199] A jump module, used for displaying an expression editing page corresponding to the conversation message in response to the expression generation event;
[0200] The editing module is used to obtain the editing operation for the conversation message in the expression editing page, and generate an expression after processing the conversation message according to the editing operation.
[0201] In one embodiment, the detection module includes:
[0202] A first detection unit, configured to detect a selection event triggered by a conversation message in a conversation page, and display and generate an emoticon icon in response to the selection event;
[0203] The second detection unit is used to detect the expression generation event triggered by the expression generation icon.
[0204] In one embodiment, the conversation message includes a picture, and the jump module includes:
[0205] A first jump unit, used to call a picture editing interface and jump from the conversation page to a first expression editing page corresponding to the picture editing interface;
[0206] Accordingly, the editing module includes:
[0207] The first editing unit is used to obtain at least one editing operation among a cropping operation, a text adding operation and a smearing operation for the image in the first expression editing page; and to generate an expression after processing the image according to at least one editing operation among the acquired cropping operation, text adding operation and smearing operation.
[0208] In one embodiment, the first editing page includes an editing completion icon; and the editing module includes:
[0209] An editing unit, used for obtaining an editing operation for the picture in the first expression editing page;
[0210] A first expression making unit is used to, when an editing operation for the image is obtained, process the image according to the obtained editing operation, and display a preview expression in the first expression editing page, and in response to an editing completion event triggered by the editing completion icon, use the preview expression currently displayed in the first expression editing page as the generated expression;
[0211] The second expression making unit is used to use the picture as a generated expression in response to an editing completion event triggered by the editing completion icon when no editing operation for the picture is obtained.
[0212] In one embodiment, the conversation message includes a video, and the jump module includes:
[0213] A second jump unit, used to call a video editing interface and jump from the conversation page to a second expression editing page corresponding to the video editing interface;
[0214] Accordingly, the editing module includes:
[0215] The second editing unit is used to obtain the key frame extraction operation and format conversion operation for the video in the second expression editing page; and generate an expression after processing the video according to the obtained key frame extraction operation and format conversion operation.
[0216] In one embodiment, the conversation message includes text, and the jump module includes:
[0217] A third jump unit, used to call a text editing interface and jump from the conversation page to a third expression editing page corresponding to the text editing interface;
[0218] Accordingly, the editing module includes:
[0219] The third editing unit is used to obtain a selection operation for the expression template thumbnail in the third expression editing page, and synthesize the expression template corresponding to the text and the expression template thumbnail according to the obtained selection operation to obtain a candidate expression; obtain a text editing operation for the text in the candidate expression, and generate an expression after processing the text in the candidate expression according to the obtained text editing operation.
[0220] In one embodiment, the jump module includes:
[0221] A fourth jump unit includes: in response to the expression generation event, obtaining an alternative conversation message based on a plurality of historical conversation messages in the conversation page; jumping from the conversation interface to an expression editing page corresponding to the conversation message, and displaying the conversation message and the alternative conversation message in the expression editing page;
[0222] Accordingly, the editing module includes:
[0223] The fourth editing unit is used to obtain the editing operation for the conversation message and the candidate conversation message in the expression editing page, and generate an expression after processing the conversation message and the candidate conversation message according to the obtained editing operation.
[0224] In one embodiment, the fourth jump unit includes:
[0225] The candidate conversation message acquisition unit is used to determine the text with the highest appearance frequency among the multiple historical conversation messages, and use the text with the highest appearance frequency as the candidate conversation message.
[0226] In one embodiment, the conversation message includes multiple pictures, and the editing module includes:
[0227] The fifth editing unit is used to obtain, in the first expression editing page, a combination operation for the multiple pictures, process the multiple pictures according to the combination operation, and obtain a combined picture; obtain an editing operation for the combined picture, and generate an expression after processing the combined picture according to the obtained editing operation.
[0228] In one embodiment, the emoticon editing page includes an edit completion icon, and the editing module includes: a sixth editing unit, used to obtain an edit operation for the session message in the emoticon editing page; when the edit operation for the session message is obtained, the session message is processed according to the obtained edit operation to obtain a preview emoticon, and the preview emoticon is displayed in the emoticon editing page; in response to an edit completion event triggered by the edit completion icon, the preview emoticon currently displayed in the emoticon editing page is used as the generated emoticon; the method further includes: when the edit operation for the session message is not obtained, in response to the edit completion event triggered by the edit completion icon, the session message is used as the generated emoticon.
[0229] Each module in the above expression generation device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0230] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.10As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data of the expression generation method. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an expression generation method is implemented.
[0231] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an expression generation method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0232] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0233] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0234] Detecting the expression generation event triggered by the conversation message in the conversation page;
[0235] In response to the expression generation event, displaying an expression editing page corresponding to the conversation message;
[0236] In the expression editing page, an editing operation for the conversation message is obtained, and the conversation message is processed according to the editing operation to generate an expression.
[0237] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0238] Detecting the expression generation event triggered by the conversation message in the conversation page;
[0239] In response to the expression generation event, displaying an expression editing page corresponding to the conversation message;
[0240] In the expression editing page, an editing operation for the conversation message is obtained, and the conversation message is processed according to the editing operation to generate an expression.
[0241] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0242] Detecting the expression generation event triggered by the conversation message in the conversation page;
[0243] In response to the expression generation event, displaying an expression editing page corresponding to the conversation message;
[0244] In the expression editing page, an editing operation for the conversation message is obtained, and the conversation message is processed according to the editing operation to generate an expression.
[0245] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0246] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0247] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0248] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for generating an expression, characterized in that: The method comprises: Detecting the expression generation event triggered by the conversation message in the conversation page; In response to the expression event being generated, a conversation message with the highest frequency of occurrence is determined among a plurality of historical conversation messages, and the conversation message with the highest frequency of occurrence is used as a candidate conversation message, or, according to the sending time of each historical conversation message in the conversation page, a historical conversation message that is closest to the conversation message among the plurality of historical conversation messages is used as a candidate conversation message, wherein the historical conversation message is a conversation message in the conversation page that is sent earlier than the conversation message; wherein, if the conversation message is text, the candidate conversation message is a picture or video, and if the conversation message is a picture or video, the candidate conversation message is text; Jumping from the conversation page to the expression editing page corresponding to the conversation message, if the alternative conversation message is text and the conversation message is a picture or a video, obtaining a selection operation for the alternative conversation message in the expression editing page, displaying the alternative conversation message in the conversation message, and obtaining a text editing operation for the alternative message in the conversation message in the expression editing page, and generating an expression; If the alternative conversation message is a picture or a video and the conversation message is text, a selection operation for the alternative conversation message is obtained in the expression editing page, the conversation message is displayed in the alternative conversation message, and a picture editing operation, or a key frame extraction operation and a format conversion operation for the alternative message are obtained in the expression editing page to generate an expression.
2. The method according to claim 1, characterized in that: The detecting of the generating expression event triggered by the conversation message in the conversation page includes: Detecting a selection event triggered by a conversation message in a conversation page, and displaying and generating an emoticon icon in response to the selection event; Detecting a generate expression event triggered by the generate expression icon.
3. The method according to claim 1, characterized in that The conversation message includes a picture; and the method further includes: Calling a picture editing interface, jumping from the conversation page to a first expression editing page corresponding to the picture editing interface; Accordingly, In the first expression editing page, obtaining at least one editing operation of a cropping operation, a text adding operation, and a smearing operation for the image; According to at least one editing operation among the acquired cropping operation, text adding operation and smearing operation, the image is processed to generate an expression.
4. The method according to claim 1, characterized in that: The conversation message includes a video; the method further includes: Calling a video editing interface, and jumping from the conversation page to a second expression editing page corresponding to the video editing interface; Accordingly, In the second expression editing page, obtaining a key frame extraction operation and a format conversion operation for the video; The video is processed according to the obtained key frame extraction operation and format conversion operation to generate an expression.
5. The method according to claim 1, characterized in that: The conversation message includes text; the method further includes: Calling a text editing interface, jumping from the conversation page to a third expression editing page corresponding to the text editing interface, wherein the third expression editing page displays expression template thumbnails; Accordingly, In the third expression editing page, a selection operation for an expression template thumbnail is obtained, and according to the obtained selection operation, an expression template corresponding to the text and the expression template thumbnail is synthesized to obtain a candidate expression; A text editing operation for the text in the candidate expression is obtained, and the text in the candidate expression is processed according to the obtained text editing operation to generate an expression.
6. The method according to any one of claims 1 to 5, characterized in that: The expression editing page includes an editing completion icon; the method further includes: In the expression editing page, obtaining an editing operation for the conversation message; In the case where an editing operation for the conversation message is obtained, the conversation message is processed according to the obtained editing operation to obtain a preview expression, and the preview expression is displayed on the expression editing page; In response to an edit completion event triggered by the edit completion icon, using the preview expression currently displayed in the expression editing page as the generated expression; The method further comprises: In the case that no editing operation for the conversation message is obtained, in response to an editing completion event triggered by the editing completion icon, the conversation message is used as the generated expression.
7. An expression generating device, characterized in that: The device comprises: A detection module, used to detect the expression generation event triggered by the conversation message in the conversation page; The jump module includes a fourth jump unit, which is used to respond to the expression generation event, determine the session message with the highest frequency among multiple historical session messages, and use the session message with the highest frequency as the candidate session message, or, according to the sending time of each historical session message in the session page, use the historical session message that is closest to the session message among the multiple historical session messages as the candidate session message, wherein the historical session message is a session message in the session page with a sending time earlier than the session message; wherein, if the session message is text, the candidate session message is a picture or video, and if the session message is a picture or video, the candidate session message is text; jump from the session page to the expression editing page corresponding to the session message, if the candidate session message is text, the session message is a picture or video, then obtain a selection operation for the candidate session message in the expression editing page, and display the candidate session message in the session message; the editing module includes a fourth editing unit, which is used to obtain a text editing operation for the candidate message in the session message in the expression editing page, and generate an expression; The jump module includes a fourth jump unit, which is used to obtain a selection operation for the alternative conversation message in the expression editing page if the alternative conversation message is a picture or a video and the conversation message is a text, and display the conversation message in the alternative conversation message; The editing module includes a fourth editing unit, which is used to obtain a picture editing operation for the candidate message, or a key frame extraction operation and a format conversion operation in the expression editing page to generate an expression.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method, apparatus, terminal device and storage medium for processing images in an application
CN109472849A
Expression package generation method and system
CN109741423A