Reply content generation method and apparatus, electronic device, and storage medium

By analyzing comments and identifying note subjects, and combining templates to generate text and emoticons, the problem of monotonous comment replies and low note relevance has been solved, thereby improving diversity and relevance, meeting user needs, and reducing manual replies.

CN117744627BActive Publication Date: 2026-11-06XIAOHONGSHU TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310768736.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-27
Publication Date
2026-11-06
Estimated Expiration
2043-06-27

AI Technical Summary

Technical Problem

Current technologies often result in comments and replies that are simplistic and poorly related to the notes, failing to meet user needs.

Method used

By analyzing comments, malicious comments are identified and the main information of the notes is obtained. Then, text and emoticons are generated by combining the corresponding templates of the notes to produce diverse and relevant reply content.

Benefits of technology

It improved the diversity and relevance of responses to notes, met users' response needs, and reduced the cost of manual responses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117744627B_ABST
    Figure CN117744627B_ABST
Patent Text Reader

Abstract

Embodiments of the application disclose a reply content generation method and device, electronic equipment and a storage medium. The method comprises: obtaining a comment of a user on a note from a first user terminal; analyzing the comment to determine whether the comment is a malicious comment; if the comment is a malicious comment, performing subject recognition on the note to obtain subject information; obtaining a first template corresponding to the note based on the note; determining a first text based on the subject information, the comment and the first template; generating a first expression based on the note and the first text; determining a reply content for the comment based on the first text and the first expression; and sending the reply content to a second user terminal, thereby improving the diversity of the reply content for the comment, enhancing the relevance of the reply content and the note, and meeting the reply requirements of the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of comment processing technology, specifically to a method, apparatus, electronic device, and storage medium for generating reply content. Background Technology

[0002] With the development of application (APP) communities, the number of users is increasing, and the number of comments on posted notes (such as text, images, graphic text, videos, etc.) is also increasing. Manually replying to each one would consume a lot of resources. Therefore, existing technologies have proposed automatically generating reply content for user comments. Generally, the comments are directly input into a model, and then pre-set text or emoticons are output as reply content.

[0003] However, the responses obtained directly from comments are relatively simple (i.e., either text or emojis), and while they are highly relevant to the comments, they are not very relevant to the subject of the comments, i.e., the notes, and may even deviate from the main content of the notes, thus failing to meet the user's response needs. Summary of the Invention

[0004] This application provides a method, apparatus, electronic device, and storage medium for generating reply content, which enhances the diversity of reply content to comments and strengthens the relevance of reply content to notes, thereby meeting users' reply needs.

[0005] In a first aspect, embodiments of this application provide a method for generating response content, the method comprising:

[0006] Get user comments on the notes from the user's perspective;

[0007] Analyze the comments to determine if they are malicious.

[0008] If a comment is deemed malicious, the note will be analyzed to identify the subject and obtain the subject information.

[0009] Based on the notes, obtain the first template corresponding to the notes;

[0010] Based on the main information, comments, and the first template, determine the first text;

[0011] Generate the first emoji based on the notes and the first text;

[0012] Based on the first text and the first emoji, determine the content of the reply to the comment;

[0013] Send a reply to the user.

[0014] Secondly, embodiments of this application provide a response content generation apparatus, which includes: a transceiver unit and a processing unit;

[0015] The transceiver unit is used to retrieve user comments on the notes from the user's end.

[0016] The processing unit is used to analyze comments and determine whether they are malicious.

[0017] The processing unit is used to identify the subject of the note and obtain subject information if the comment is malicious.

[0018] The processing unit is used to obtain the first template corresponding to the notes based on the notes;

[0019] The processing unit is used to determine the first text based on the subject information, comments, and the first template;

[0020] A processing unit is used to generate a first emoji based on the notes and the first text.

[0021] The processing unit is used to determine the content of the reply to the comment based on the first text and the first emoji;

[0022] The transceiver unit is used to send reply content to the user terminal.

[0023] Thirdly, embodiments of this application provide an electronic device, including: a processor and a memory, the processor being connected to the memory, the memory being used to store a computer program, and the processor being used to execute the computer program stored in the memory, so that the electronic device performs the method as described in the first aspect.

[0024] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that causes a computer to perform the method as described in the first aspect.

[0025] Fifthly, embodiments of this application provide a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and is operable to cause the computer to perform the method as described in the first aspect.

[0026] Implementing the embodiments of this application has the following beneficial effects: First, user comments on notes are obtained from the user terminal; then, the comments are analyzed to determine whether they are malicious; if the comments are malicious, the subject of the note is identified to obtain subject information; then, based on the note, a first template corresponding to the note is obtained; then, based on the subject information, comments, and the first template, a first text is determined; compared to the existing technology that only analyzes comments to generate content that is highly relevant to the comments but not very relevant to the note as reply content, or even generates reply content that deviates from the main content of the note and thus fails to meet the reply needs of the user who posted the note, this application combines the comments and the subject information corresponding to the note and then embeds the corresponding first template, so that the final generated reply content is not only relevant to the comments, but also improves the relevance of the reply content to the note, that is, the reply content can both reply to the content in the comments and not deviate from the main content that the note wants to express, thus meeting the user's reply needs; then, based on the note and the first text, a first text is generated. The first emoticon is generated by combining notes and generated first text. Compared to generating emoticons solely based on notes or comments, the first emoticon generated in this application not only aligns with the core idea expressed by the notes but also matches the first text. This ensures that when the first text and the first emoticon are used together as reply content, there will be no abruptness or mismatch. Then, based on the first text and the first emoticon, the reply content for the comment is determined. Compared to existing technologies that either generate text or emoticons based on information in the comment, this application generates the first text based on the comment and notes, and then combines the first text and notes to generate the corresponding first emoticon. The first text and the first emoticon are then used together as reply content without any mismatch. This not only improves the diversity of reply content for comments but also enhances the overall quality of the reply content, thereby meeting users' reply needs. Finally, the reply content is sent to the user's end, eliminating the need for manual replies and reducing manpower. Attached Figure Description

[0027] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0028] Figure 1 This is a schematic diagram of a response content generation system provided in an embodiment of this application;

[0029] Figure 2 This is a schematic diagram illustrating a scenario for generating response content, provided in an embodiment of this application.

[0030] Figure 3 A schematic diagram of the interaction flow of a response content generation method provided in an embodiment of this application;

[0031] Figure 4 A flowchart illustrating a method for determining whether a comment is malicious, provided as an embodiment of this application;

[0032] Figure 5 A schematic diagram illustrating the relationship between a note and a first template provided in an embodiment of this application;

[0033] Figure 6 This is a schematic diagram illustrating how to embed second text into a first sub-template and embed comments into a second sub-template to generate third text, as provided in an embodiment of this application.

[0034] Figure 7 This is a schematic diagram illustrating how a first text is determined based on a third text, as provided in an embodiment of this application.

[0035] Figure 8 A schematic diagram illustrating the generation of a first emoticon based on notes and first text, provided as an embodiment of this application;

[0036] Figure 9 A functional unit block diagram of a response content generation device provided in an embodiment of this application;

[0037] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0038] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0039] The terms "first," "second," "third," and "fourth," etc., used in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0040] In this document, the term "embodiment" means that a particular feature, result, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0041] To facilitate understanding of the embodiments of this application, the relevant terms involved in this application will first be explained and described.

[0042] Notes: Content posted by users on online platforms (such as various apps) can be called notes.

[0043] Main information: The main content of the notes. For example, if the main content is text and an image, then the main information is the text, as well as the people, places, actions, etc. in the image.

[0044] Type information: The content corresponding to each type in the notes. For example, the type can include one or more of the following: text, image (or image), video, etc. The type information will include one or more of the following: text, image (or image), video, etc.

[0045] See Figure 1 , Figure 1 This is a schematic diagram of a response content generation system provided in an embodiment of this application. The response content generation system includes a first user terminal, a response content generation device, and a second user terminal. The response content generation device can be a server; both the first and second user terminals can be smartphones, tablets, laptops, etc.; the number of first and second user terminals can be one or more; the first and second user terminals can be the same user terminal or different user terminals; it should be noted that this application does not limit the number of first and second user terminals. Figure 1 This example uses only one first user terminal and one second user terminal; both the first and second user terminals have the target application installed (such as an application that allows users to post, comment, forward, like, and save notes); the reply content generation device has established a communication connection with both the first and second user terminals, and this application does not limit the specific method of the communication connection.

[0046] User A posted a note in the target application. When User B viewed the note, he / she commented on it. After receiving User B's comment, the reply content generation device analyzes User B's comment according to the reply content generation method provided in this application. If the comment is malicious, it determines the reply content and responds to the comment.

[0047] Specifically:

[0048] First, the response content generation device obtains user comments on the note from the first user terminal. Then, the response content generation device analyzes the comments to determine whether they are malicious. If the comments are malicious, the response content generation device identifies the subject of the note to obtain subject information. Then, based on the note, the response content generation device obtains a first template corresponding to the note. Then, based on the subject information, the comments, and the first template, the response content generation device determines the first text. Based on the note and the first text, the response content generation device generates a first emoticon. Then, based on the first text and the first emoticon, the response content generation device determines the response content for the comment. Finally, the response content generation device sends the response content to the second user terminal.

[0049] As can be seen, in this embodiment, comments from users on notes are obtained from the user's end; then the comments are analyzed to determine whether they are malicious; if the comments are malicious, the subject of the note is identified to obtain subject information; then, based on the note, a first template corresponding to the note is obtained; and then, based on the subject information, comments, and the first template, a first text is determined. Compared to the existing technology that only analyzes comments to generate content that is highly relevant to the comments but not very relevant to the note as reply content, or even generates reply content that deviates from the main content of the note and thus fails to meet the reply needs of the user who posted the note, this application combines the comments and the subject information corresponding to the note and then embeds the corresponding first template, so that the final generated reply content is not only relevant to the comments, but also improves the relevance of the reply content to the note. That is, the reply content can both reply to the content in the comments and does not deviate from the main content that the note wants to express, thus meeting the user's reply needs; then, based on the note and the first text, a first table is generated. This application generates a first emoticon by combining notes and generated first text. Compared to generating emoticons solely based on notes or comments, the first emoticon generated in this application not only aligns with the core idea expressed by the notes but also matches the first text. This ensures that when the first text and the first emoticon are used together as reply content, there will be no abruptness or mismatch. Then, based on the first text and the first emoticon, the reply content for comments is determined. Compared to existing technologies that either generate text or emoticons based on information in comments, this application generates first text based on comments and notes, and then combines the first text and notes to generate the corresponding first emoticon. The first text and the first emoticon are then used together as reply content without any mismatch. This not only improves the diversity of reply content for comments but also enhances the overall quality of the reply content, thereby meeting users' reply needs. Finally, the reply content is sent to the user's end, eliminating the need for manual replies and reducing manpower.

[0050] See Figure 2 , Figure 2 This is a schematic diagram of a response content generation scenario provided in an embodiment of this application. The schematic diagram includes a first user terminal 201 and a second user terminal 202. It should be noted that the relevant descriptions of the first user terminal 201 and the second user terminal 202 can be found in [reference]. Figure 1 The corresponding descriptions of the first and second user terminals are not repeated here.

[0051] like Figure 2 The tree branch image shown represents a note 1 posted by the target user in the target application; when user 1, corresponding to the first user terminal 201, browses note 1, the virtual keyboard buttons presented by the first user terminal 201 (i.e., Figure 2The nine rounded rectangles shown are examples of virtual keyboard buttons; however, the actual layout of virtual keyboard buttons is not limited to this method. (This is just an example for ease of understanding.) The output for comment 1 is "AAAAAA", and then when user 1 touches... Figure 2 When the "Send" virtual button is pressed, User 1's comment 1 on Note 1 is successfully posted.

[0052] Accordingly, the reply content generation device obtains comment 1 from the first user terminal 201; then, the reply content generation device determines the reply content according to the reply content generation method of this application, specifically including: analyzing comment 1 to determine whether comment 1 is a malicious comment; if comment 1 is a malicious comment, performing subject identification on note 1 to obtain subject information; based on the note, obtaining the first template corresponding to note 1; based on the subject information, comment 1, and the first template, determining the first text, i.e. Figure 2 "BBBBBB" in the middle;

[0053] Then, based on the notes and the first text, the first emoji is generated. Figure 2 The first text and the first emoji are used to determine the reply content for the comment. Figure 2 The "BBBBBB" text is combined with a round smiley face emoji. Finally, the reply content generation device sends the reply content to the second user terminal 202, presenting... Figure 2 The text includes "User 2 replied to User 1: BBBBBB" and a "round smiley face" emoji.

[0054] It should be noted that when the first user terminal 201 and the second user terminal 202 are the same, then user 1 can view user 2's reply to user 1 (i.e., themselves) through the second user terminal 202; when the first user terminal 201 and the second user terminal 202 are different, then the user corresponding to the second user terminal 202 can view user 1's comment 1 on note 1, as well as user 2's reply to user 1. Furthermore, user 2 can be the user corresponding to the second user terminal 202, or a user corresponding to another user terminal; this application does not limit this. User 2 can be the target user, i.e., the author who published note 1, or a virtual user custom-generated by the reply content generation device; this application does not limit this either.

[0055] See Figure 3 , Figure 3 This application provides an interactive flowchart illustrating a method for generating response content, which includes, but is not limited to, steps 301-308:

[0056] 301: The first user terminal sends the user's comments on the notes to the reply content generation device.

[0057] When a user comments on a note, the first user terminal sends the comment to the response content generation device; correspondingly, the response content generation device receives the comment.

[0058] 302: The reply content generation device determines whether the comment is malicious. If so, proceed to step 303.

[0059] In the embodiments of this application, see Figure 4 , Figure 4 A flowchart illustrating a method for determining whether a comment is malicious, as provided in this application embodiment, includes, but is not limited to, steps 401-409:

[0060] 401: Get user activity information.

[0061] The active information includes the user's historical comments and first notes, that is, all the user's historical comments and the user's first notes.

[0062] 402: Determine a user's activity level based on their historical comments and first notes.

[0063] For example, a first value is obtained by weighting and fusing the number of historical comments and the first preset weight corresponding to the historical comments, and the number of first notes and the second preset weight corresponding to the first notes; then, a first target interval is determined based on the first value and a preset first threshold interval; and then, the activity level corresponding to the first target interval is determined as the user's activity level.

[0064] 403: Conduct sentiment analysis on historical comments to determine sentiment values.

[0065] For example, a neural network model can be used to perform sentiment analysis on each of a user's historical comments to determine the first sentiment value corresponding to each historical comment; then, the first sentiment values ​​of each historical comment can be weighted and fused to obtain the sentiment value corresponding to the user.

[0066] 404: Sensitive words used to retrieve historical comments.

[0067] In this application, when a user has multiple historical comments, sensitive words can be extracted from each historical comment to obtain the sensitive words corresponding to each historical comment. The number of sensitive words corresponding to each historical comment can be one or more.

[0068] 405: Sensitivity is determined based on sensitive words in historical comments.

[0069] For example, based on the number of sensitive words in each historical comment and a preset second threshold range, a second target range corresponding to each historical comment is determined; the sensitivity corresponding to the second target range of each historical comment is determined as the sensitivity corresponding to each historical comment; then, the sensitivity corresponding to each historical comment is weighted and summed to obtain the sensitivity corresponding to the user.

[0070] 406: Based on the sentiment value and sensitivity of historical comments, as well as activity level, determine the user's primary malicious value.

[0071] For example, the third preset weight corresponding to the sentiment value, the third preset weight corresponding to the sensitivity, and the fifth preset weight corresponding to the activity level are obtained; then the sentiment value, sensitivity, and activity level are weighted to obtain the first malicious value corresponding to the user.

[0072] 407: Perform type identification on comments to determine the type information corresponding to the comments.

[0073] In the embodiments of this application, when the comment includes both text and an image, the comment is type-identified, and the obtained type information includes the text and the image; when the comment is text, the comment is type-identified, and the obtained type information is the text; when the comment is an image, the comment is type-identified, and the obtained type information is the image.

[0074] 408: Based on comment and type information, a second malicious value is determined.

[0075] In an optional embodiment, step 408 can specifically be as follows: When the comment includes an eighth text and a first image, the type information includes the eighth text and the first image. That is, the content type in the comment includes two categories: text and image. Correspondingly, type recognition can obtain the type information including the eighth text and the first image. Features are extracted from the eighth text to obtain multiple first feature words; the multiple first feature words are encoded to obtain multiple first feature vectors; the eighth text is encoded to obtain a second feature vector; the multiple first feature vectors and the second feature vector are fused to obtain a third feature vector. That is, the multiple first feature vectors are word-dimensional feature vectors. The eighth text can be understood as a sentence, so the second feature vector is a sentence-dimensional feature vector. Then, the multiple first feature vectors (e.g., multiple first feature vectors form an m*n matrix, where m is the number of first feature vectors and n is the dimension of each first feature vector) and the second feature vector (e.g., a 1*n matrix, where n is the dimension of the second feature vector) are fused to obtain the third feature vector (an m*1 matrix). It should be noted that by extracting features from the word-dimensional multiple first feature vectors... A third feature vector is obtained by fusing a first feature vector and a second feature vector at the sentence dimension. This improves the accuracy of malicious value determination compared to determining the malicious value based on multiple first feature vectors or a single dimension of the second feature vector. A third malicious value is determined based on a pre-trained malicious text recognition model and the third feature vector; that is, the third feature vector is input into the pre-trained malicious text recognition model, and the third malicious value is output. A fourth malicious value is determined based on a pre-trained malicious image recognition model and a first image; similarly, the first image is input into the pre-trained malicious image recognition model, and the fourth malicious value is output. A second malicious value is determined based on the third and fourth malicious values. For example, a sixth preset weight corresponding to the third malicious value and a seventh preset weight corresponding to the fourth malicious value are obtained, and then weighted to obtain the second malicious value. It should be noted that when the comment includes multiple types, compared to determining the malicious value only for a single type of comment, such as text, this application improves the accuracy of malicious value determination by judging the malicious value of all types in the comment and then fusing the malicious values ​​corresponding to each type to obtain the final second malicious value.

[0076] In an optional embodiment, step 408 can be specifically as follows: when the comment is the ninth text, the type information is the ninth text, that is, the type of the content in the comment includes the text category, and the corresponding type identification can obtain the type information including the ninth text. Features are extracted from the ninth text to determine multiple second feature words; the multiple second feature words are encoded to obtain multiple fourth feature vectors; the ninth text is encoded to obtain a fifth feature vector; the multiple fourth feature vectors and the fifth feature vector are fused to obtain a sixth feature vector. The principle of obtaining the sixth feature vector can refer to the principle of obtaining the third feature vector, and will not be repeated here. Based on the pre-trained malicious text recognition model and the sixth feature vector, a second malicious value is determined. That is, when the type in the comment is only text, the sixth feature vector can be directly input into the pre-trained malicious text recognition model to output the second malicious value.

[0077] In an optional embodiment, step 408 may specifically be as follows: when the comment is a second image, the type information is the second image, that is, the type of the content in the comment includes the image category, and the corresponding type recognition can obtain the type information including the second image. The second image is enhanced to obtain the third image. It should be noted that this application does not limit the enhancement method of the second image. Based on the pre-trained malicious image recognition model and the third image, the second malicious value is determined. That is, when the type in the comment is only the image category, the third image can be directly input into the pre-trained malicious image recognition model to output the second malicious value.

[0078] 409: Determine whether a comment is malicious based on the first malicious value and the second malicious value.

[0079] For example, the first malicious value and the second malicious value can be weighted to determine the target malicious value. Then, based on the threshold range in which the target malicious value falls, it can be determined whether the comment is malicious. It should be noted that by combining the user's historical comment activity, sentiment value, and sensitivity value to obtain the first malicious value, and then combining the first malicious value and the second malicious value to determine whether it is a malicious comment, the accuracy of judging malicious comments is improved compared to directly analyzing the user's current comments.

[0080] 303: The response content generation device performs subject recognition on the notes to obtain subject information.

[0081] In the embodiments of this application, when the content of the notes includes one or more of text, video, images, etc., the subject of the notes corresponds to one or more of text, video, images, etc. Therefore, when performing subject recognition on the notes, the obtained subject information is the content of one or more of the text, video, images, etc. in the notes. Specifically:

[0082] When the notes are text, the main information includes the text in the notes; of course, when the length of the text is less than or equal to the threshold, the text can be filtered, noise removed, etc., to obtain new text as the main information; when the length of the text is greater than the threshold, a text summary can be generated and the generated text summary can be determined as the main information.

[0083] When the notes are images, the main information includes the first person, the first location, and the first action in the image. For example, a pre-trained neural network model can be used to identify the image and obtain the first person, the first location, and the first action in the image.

[0084] When the notes are videos, the main information includes the second person, the second location, and the second action in the video. For example, the video is divided into frames to obtain multiple video frames. Then, a pre-trained video recognition model is used to recognize each video frame to obtain the second person, the second location, and the second action in the video.

[0085] When notes include both text and images, the main information includes the text, as well as the third person, third location, and third action in the image. Similarly, when the length of the text is less than or equal to a threshold, the text after filtering and noise removal can be used as the main information. When the length of the text is greater than the threshold, a text summary can be generated and the generated text summary can be used as the main information. Alternatively, a pre-trained neural network model can be used to identify the third person, third location, and third action in the image.

[0086] When the notes include both text and video, the main information includes the text, as well as the fourth person, fourth location, and fourth action in the video. Similarly, the processing of the text can refer to the principles of the above embodiments, and the processing of the video can also refer to the principles of the above embodiments, which will not be repeated here.

[0087] 304: The response content generation device is based on the notes and obtains the first template corresponding to the notes.

[0088] In the embodiments of this application, the first template varies depending on the content / subject of the notes. Specifically: if the notes include text and images, template A is obtained and determined as the first template corresponding to the notes; if the notes include text and video, template B is obtained and determined as the first template corresponding to the notes; if the notes only include text, template C is obtained and determined as the first template corresponding to the notes; if the notes only include images, template D is obtained and determined as the first template corresponding to the notes; if the notes only include video, template E is obtained and determined as the first template corresponding to the notes. It should be noted that in the prior art, a general template that includes templates A, B, C, and D is directly set. This requires determining which sub-template within the general template the second text should be embedded into when embedding the second text into the general template. This is inefficient, and if the determination is not accurate, the second text may not be embedded in the correct position within the general template, thus compromising the accuracy of the generated first text. In contrast, this application obtains the corresponding template by determining which elements constitute the main body of the note, and then directly embeds the second text into the corresponding template. This eliminates the need to determine which sub-template to embed, ensuring the accuracy of the embedding position and thus guaranteeing the accuracy of the generated first text.

[0089] For example, see Figure 5 , Figure 5 A schematic diagram illustrating the relationship between a note and a first template provided in an embodiment of this application, such as... Figure 5 As shown, when the main body of the note includes both text and images, the first template corresponding to the note is template A, i.e. Figure 5 The phrase "a picture with ____; and a sentence with ____ written on it" is used. When the main body of the note consists only of text, the first template corresponding to the note is template C, i.e. Figure 5 The phrase "a passage of ____" in the text; when the main body of the note only includes an image, the first template corresponding to the note is template D, i.e. Figure 5 The phrase "a picture with ___" appears in the text. When the main body of the note includes both video and text, the first template corresponding to the note is template B, i.e. Figure 5 The phrase "a video with ___; and a short ___ sentence" is used. When the main body of the note only includes the video, the first template corresponding to the note is based on template E, i.e. Figure 5 The phrase "a video containing ___" should be explained. Figure 5 The first template in the text is merely an example given for ease of understanding and does not limit the specific form of the first template.

[0090] 305: The response content generation device determines the first text based on the subject information, the comment, and the first template.

[0091] In the embodiments of this application, the first template includes a first sub-template and a second sub-template; the first sub-template corresponds to the main information, and the second sub-template corresponds to the comments.

[0092] In an optional embodiment, step 305 may specifically include steps S11-S13:

[0093] S11: Based on the subject information, determine the second text corresponding to the subject information.

[0094] For example, assuming the notes include text and images, the main information includes the text, as well as the third person, third location, and third action in the image. If the text, third person, third location, and third action in the main information are all vector representations, they can be vectorized into text to obtain the corresponding text representations. Then, the second text corresponding to the text in the notes can be "I just like dancing", and the second text corresponding to the third person, third location, and third action are "girl, dance studio, dancing". That is, the second text corresponding to the main information includes "I just like dancing" and "girl, dance studio, dancing".

[0095] S12: Embed the second text into the first sub-template, and embed the comment into the second sub-template to generate the third text.

[0096] The first sub-template corresponds to the main information, and the second sub-template corresponds to the comment. The second text is embedded into the first sub-template to obtain text 1, and the comment is embedded into the second sub-template to obtain text 2. Text 1 and text 2 are arranged and spliced ​​according to preset rules to obtain the third text.

[0097] For example, based on the above example, see Figure 6 , Figure 6 This application provides an embodiment of a method for embedding second text into a first sub-template and embedding comments into a second sub-template to generate third text, as shown in the diagram. Figure 6 As shown, when the notes include both text and images, assume the second text corresponding to the text is "I just like dancing," and the second text corresponding to the image is "girl, dance studio, dancing." That is, the second text corresponding to the main information includes both "I just like dancing" and "girl, dance studio, dancing." Arrange these two according to the order of the first sub-template. Since the first template includes a first sub-template and a second sub-template, and the notes include both text and images, the first sub-template is... Figure 5 Template A in the template, the second sub-template is as follows Figure 6 As shown; embedding the second text into the first sub-template yields text 1: "A picture with a girl, a dance studio, and dancing; with the caption 'I just love dancing'"; the comment (i.e. Figure 6The first malicious comment shown is embedded into the second sub-template to obtain text 2, which reads, "Received a comment with the following content: First malicious comment"; then text 1 and text 2 are concatenated to obtain the third text, i.e. Figure 6 A picture of girls, a dance studio, and dancing was posted online, along with the caption "I just love dancing." One comment read: "First malicious comment."

[0098] S13: Determine the first text based on the third text.

[0099] In an optional embodiment, step S13 may specifically include: obtaining a first prompt text, wherein the first prompt text is used to prompt the first model to reply to the comment based on the first prompt text. It should be noted that, since it is a reply to a malicious comment, in order to create a harmonious APP community atmosphere, the first prompt text is generally positive text of a positive and friendly type; embedding the first prompt text into a third sub-template to generate a fourth text; concatenating the third text and the fourth text to determine the fifth text; obtaining the first text based on the first model and the fifth text, wherein the first model is obtained by training multiple malicious comment samples and multiple note samples, that is, it can be based on multiple note samples and multiple malicious comments corresponding to the note samples, and referring to the principles of determining the third text and determining the fifth text shown in this application, to determine multiple third training texts and multiple fifth training texts, and then training the first model based on the multiple fifth training texts. For example, the first model can be a trained generative pre-trained transform model (Chat-GPT). This application does not limit the first model. Then, the fifth text is input into the trained Chat-GPT model, and the first text is output.

[0100] For example, based on Figure 6 For examples, see Figure 7 , Figure 7 This application provides an embodiment of a method for determining a first text based on a third text, as shown in the diagram. Figure 7 As shown, the first prompt text is "Generously and kindly," the third sub-template is "How should I ____ reply to this comment?", and then the first prompt text is embedded into the third sub-template to get the fourth text "How should I..." Generous and kind "How about replying to this comment?", then the fourth text and Figure 6The third text, "A picture of a girl, a dance studio, and dancing; with the caption 'I just love dancing'; received a comment that reads: 'First malicious comment'," is pieced together to create the fifth text, "A picture of a girl, a dance studio, and dancing; with the caption 'I just love dancing'; received a comment that reads: 'First malicious comment'; what should I do?" Generous land, kindly "How about replying to this comment?", and then input the fifth text into the trained first model to get the first text.

[0101] It should be noted that by adding the first prompt text, firstly, the recognition efficiency of the first model is accelerated, and secondly, the first model is enabled to generate content that conforms to the first prompt text, thereby creating a harmonious APP community atmosphere.

[0102] 306: The response content generation device generates the first emoticon based on the notes and the first text.

[0103] In the embodiments of this application, step 306 can specifically include: obtaining a second template; obtaining a second prompt text, the second prompt text being used to prompt the second model to generate an expression based on the second prompt text. It should be noted that the function of the second prompt text is similar to that of the first prompt text described above, and will not be repeated here; extracting keywords from the first text to obtain multiple first keywords; obtaining a sixth text based on the multiple first keywords and the second text. For example, the words in the multiple first keywords and the second text can be deduplicated and filtered, and then arranged and concatenated according to semantic order to obtain the sixth text; embedding the second prompt text and the sixth text into the second template to obtain a seventh text. For example, the second prompt text and the sixth text can be adjusted based on semantics before being embedded into the second template to obtain the seventh text; determining a first expression based on the seventh text and the second model, wherein the second model can be a text-to-image generation model based on Static Diffusion (SD) technology.

[0104] For example, based on the above example, see Figure 8 , Figure 8 This application provides an embodiment of a diagram illustrating the generation of a first emoticon based on notes and first text. Figure 8 As shown, keyword extraction was performed on the first text, yielding multiple primary keywords: "dancing," "confidence," and "happiness." The second text was... Figure 6The text begins by extracting the keywords "girl, dance studio, dancing; I just like dancing;". Then, multiple first keywords and second texts are deduplicated, and words related to people, states, and actions are selected as the sixth text: "girl, confident, happy, dancing". The second prompt text is then obtained as "friendly". Semantic adjustments are made between the sixth and second prompt texts to obtain "girl friendly, confident, happy, dancing". Finally, "girl friendly, confident, happy, dancing" is embedded into the third sub-template, "a ____ expression;", resulting in the seventh text, "a...". female Be friendly, confident, happy, and dance. The text is then used to generate an expression; and then the seventh text is input into the second model, so that the second model generates an expression based on the keywords in the seventh text. Since the seventh text combines the first text and the second text, that is, it combines the content of the first text and the notes, the resulting first expression is related to both the notes and the first text. There will be no situation where the content expressed by the first expression conflicts with or is abrupt with the first text and notes.

[0105] 307: The reply content generation device determines the reply content for the comment based on the first text and the first emoticon.

[0106] In this application embodiment, both the first text and the first emoticon can be simultaneously determined as the reply content to the comment. This application does not limit the order in which the first text and the first emoticon are arranged; either the first text can come first, followed by the first emoticon, or vice versa. By simultaneously replying to comments with the first text and the first emoticon, the reply content is enriched and its diversity is enhanced. Furthermore, both the first text and the first emoticon are obtained by processing the content related to the notes and comments according to the embodiments of this application, and are relevant to both notes and comments, thus improving the overall quality of the reply content.

[0107] 308: The reply content generation device sends the reply content to the second user terminal.

[0108] As can be seen, in this embodiment, comments from users on notes are obtained from the user's end; then the comments are analyzed to determine whether they are malicious; if the comments are malicious, the subject of the note is identified to obtain subject information; then, based on the note, a first template corresponding to the note is obtained; and then, based on the subject information, comments, and the first template, a first text is determined. Compared to the existing technology that only analyzes comments to generate content that is highly relevant to the comments but not very relevant to the note as reply content, or even generates reply content that deviates from the main content of the note and thus fails to meet the reply needs of the user who posted the note, this application combines the comments and the subject information corresponding to the note and then embeds the corresponding first template, so that the final generated reply content is not only relevant to the comments, but also improves the relevance of the reply content to the note. That is, the reply content can both reply to the content in the comments and does not deviate from the main content that the note wants to express, thus meeting the user's reply needs; then, based on the note and the first text, a first table is generated. This application generates a first emoticon by combining notes and generated first text. Compared to generating emoticons solely based on notes or comments, the first emoticon generated in this application not only aligns with the core idea expressed by the notes but also matches the first text. This ensures that when the first text and the first emoticon are used together as reply content, there will be no abruptness or mismatch. Then, based on the first text and the first emoticon, the reply content for comments is determined. Compared to existing technologies that either generate text or emoticons based on information in comments, this application generates first text based on comments and notes, and then combines the first text and notes to generate the corresponding first emoticon. The first text and the first emoticon are then used together as reply content without any mismatch. This not only improves the diversity of reply content for comments but also enhances the overall quality of the reply content, thereby meeting users' reply needs. Finally, the reply content is sent to the user's end, eliminating the need for manual replies and reducing manpower.

[0109] See Figure 9 , Figure 9 This is a functional unit block diagram of a response content generation device provided in an embodiment of this application. The response content generation device 900 includes: a transceiver unit 901 and a processing unit 902;

[0110] The transceiver unit 901 is used to obtain user comments on the notes from the first user terminal;

[0111] Processing unit 902 is used to analyze comments and determine whether a comment is malicious;

[0112] Processing unit 902 is used to identify the subject of the note and obtain subject information if the comment is malicious;

[0113] Processing unit 902 is used to obtain a first template corresponding to the notes based on the notes;

[0114] Processing unit 902 is used to determine the first text based on the subject information, comments, and the first template;

[0115] Processing unit 902 is used to generate a first emoticon based on the notes and the first text;

[0116] Processing unit 902 is used to determine the content of the reply to the comment based on the first text and the first emoticon;

[0117] The transceiver unit 901 is used to send reply content to the second user terminal.

[0118] In one embodiment of this application, when the note is text, the main information is the text in the note; when the note is an image, the main information is a first person, a first location, and a first action in the image; when the note is a video, the main information is a second person, a second location, and a third action in the video; when the note includes both text and an image, the main information includes the text, and a third person, a third location, and a third action in the image; when the note includes both text and video, the main information includes the text, and a fourth person, a fourth location, and a fourth action in the video.

[0119] In one embodiment of this application, the first template includes a first sub-template and a second sub-template. In determining the first text based on the subject information, comments, and the first template, the processing unit 902 is specifically used for:

[0120] Based on the subject information, determine the second text corresponding to the subject information;

[0121] The second text is embedded in the first sub-template, and the comment is embedded in the second sub-template to generate the third text, wherein the first sub-template corresponds to the main information and the second sub-template corresponds to the comment;

[0122] Based on the third text, the first text is determined.

[0123] In one embodiment of this application, the first template further includes a third sub-template. Regarding determining the first text based on the third text, the processing unit 902 is specifically configured to:

[0124] Obtain the first prompt text, whereby the first prompt text is used to prompt the first model to reply to the comment based on the first prompt text;

[0125] Embed the first prompt text into the third sub-template to generate the fourth text;

[0126] Combine the third and fourth texts to determine the fifth text;

[0127] Based on the first model and the fifth text, the first text is obtained. The first model is trained by multiple malicious comment samples and multiple note samples.

[0128] In one embodiment of this application, in generating a first emoticon based on notes and first text, processing unit 902 is specifically used for:

[0129] Get the second template;

[0130] Obtain the second prompt text, which is used to prompt the second model to generate an expression based on the second prompt text;

[0131] Keyword extraction was performed on the first text, resulting in multiple primary keywords;

[0132] Based on multiple first keywords and second texts, a sixth text is obtained;

[0133] Embed the second prompt text and the sixth text into the second template to obtain the seventh text;

[0134] The first expression is determined based on the seventh text and the second model.

[0135] In one embodiment of this application, in analyzing comments and determining whether a comment is malicious, the processing unit 902 is specifically used for:

[0136] Obtain user activity information, including the user's historical comments and first note;

[0137] Determine user activity based on their historical comments and first notes;

[0138] Perform sentiment analysis on historical comments to determine sentiment values;

[0139] Sensitive words used to retrieve historical comments;

[0140] Sensitivity is determined based on sensitive words in historical comments;

[0141] Based on the sentiment value and sensitivity of historical comments, as well as the activity level, determine the user's primary malicious value;

[0142] Type identification is performed on comments to determine the corresponding type information;

[0143] Based on comment and type information, a second malicious value is determined;

[0144] Based on the first malicious value and the second malicious value, determine whether the comment is a malicious comment.

[0145] In one embodiment of this application, when the comment includes an eighth text and a first image, and the type information includes the eighth text and the first image, the processing unit 902 is specifically used to determine a second malicious value based on the comment and the type information:

[0146] Feature extraction was performed on the eighth text to obtain multiple first feature words;

[0147] Encode multiple first feature words to obtain multiple first feature vectors;

[0148] The eighth text is encoded to obtain the second feature vector;

[0149] Multiple first and second feature vectors are fused to obtain a third feature vector;

[0150] Based on the pre-trained malicious text recognition model and the third feature vector, the third malicious value is determined;

[0151] Based on a pre-trained malicious image recognition model and the first image, a fourth malicious value is determined;

[0152] The second malicious value is determined based on the third and fourth malicious values.

[0153] In one embodiment of this application, when the comment is the ninth text, the type information is the ninth text. In determining the second malicious value based on the comment and the type information, the processing unit 902 is specifically used for:

[0154] Feature extraction was performed on the ninth text to identify multiple second feature words;

[0155] Encode multiple second feature words to obtain multiple fourth feature vectors;

[0156] Encode the ninth text to obtain the fifth feature vector;

[0157] The sixth feature vector is obtained by fusing multiple fourth and fifth feature vectors.

[0158] The second malicious value is determined based on the pre-trained malicious text recognition model and the sixth feature vector.

[0159] In one embodiment of this application, when the comment is a second image, the type information is the second image. In determining a second malicious value based on the comment and the type information, the processing unit 902 is specifically used for:

[0160] The second image is enhanced to obtain the third image;

[0161] Based on a pre-trained malicious image recognition model and a third image, a second malicious value is determined.

[0162] See Figure 10 , Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 10 As shown, the electronic device 1000 includes a transceiver 1001, a processor 1002, and a memory 1003. They are connected to each other via a bus 1004. The memory 1003 is used to store computer programs and data, and can transfer data stored in the memory 1003 to the processor 1002.

[0163] Processor 1002 is used to read computer programs from memory 1003 and perform the following operations:

[0164] The transceiver 1001 controls the acquisition of user comments on the notes from the first user terminal;

[0165] Analyze the comments to determine if they are malicious.

[0166] If a comment is deemed malicious, the note will be analyzed to identify the subject and obtain the subject information.

[0167] Based on the notes, obtain the first template corresponding to the notes;

[0168] Based on the main information, comments, and the first template, determine the first text;

[0169] Generate the first emoji based on the notes and the first text;

[0170] Based on the first text and the first emoji, determine the content of the reply to the comment;

[0171] Control transceiver 1001 to send a reply to the second user terminal.

[0172] In one embodiment of this application, when the note is text, the main information is the text in the note; when the note is an image, the main information is a first person, a first location, and a first action in the image; when the note is a video, the main information is a second person, a second location, and a third action in the video; when the note includes both text and an image, the main information includes the text, and a third person, a third location, and a third action in the image; when the note includes both text and video, the main information includes the text, and a fourth person, a fourth location, and a fourth action in the video.

[0173] In one embodiment of this application, the first template includes a first sub-template and a second sub-template. Regarding determining the first text based on subject information, comments, and the first template, the processor 1002 is specifically configured to perform the following steps:

[0174] Based on the subject information, determine the second text corresponding to the subject information;

[0175] The second text is embedded in the first sub-template, and the comment is embedded in the second sub-template to generate the third text, wherein the first sub-template corresponds to the main information and the second sub-template corresponds to the comment;

[0176] Based on the third text, the first text is determined.

[0177] In one embodiment of this application, the first template further includes a third sub-template. Specifically, the processor 1002 performs the following steps to determine the first text based on the third text:

[0178] Obtain the first prompt text, whereby the first prompt text is used to prompt the first model to reply to the comment based on the first prompt text;

[0179] Embed the first prompt text into the third sub-template to generate the fourth text;

[0180] Combine the third and fourth texts to determine the fifth text;

[0181] Based on the first model and the fifth text, the first text is obtained. The first model is trained by multiple malicious comment samples and multiple note samples.

[0182] In one embodiment of this application, in generating a first emoticon based on notes and first text, processor 1002 is specifically configured to perform the following steps:

[0183] Get the second template;

[0184] Obtain the second prompt text, which is used to prompt the second model to generate an expression based on the second prompt text;

[0185] Keyword extraction was performed on the first text, resulting in multiple primary keywords;

[0186] Based on multiple first keywords and second texts, a sixth text is obtained;

[0187] Embed the second prompt text and the sixth text into the second template to obtain the seventh text;

[0188] The first expression is determined based on the seventh text and the second model.

[0189] In one embodiment of this application, in analyzing comments and determining whether a comment is malicious, the processor 1002 is specifically configured to perform the following steps:

[0190] Obtain user activity information, including the user's historical comments and first note;

[0191] Determine user activity based on their historical comments and first notes;

[0192] Perform sentiment analysis on historical comments to determine sentiment values;

[0193] Sensitive words used to retrieve historical comments;

[0194] Sensitivity is determined based on sensitive words in historical comments;

[0195] Based on the sentiment value and sensitivity of historical comments, as well as the activity level, determine the user's primary malicious value;

[0196] Subject identification is performed on the comments to determine the corresponding type information;

[0197] Based on comment and type information, a second malicious value is determined;

[0198] Based on the first malicious value and the second malicious value, determine whether the comment is a malicious comment.

[0199] In one embodiment of this application, when the comment includes an eighth text and a first image, and the type information includes the eighth text and the first image, the processor 1002, in determining a second malicious value based on the comment and the type information, specifically performs the following steps:

[0200] Feature extraction was performed on the eighth text to obtain multiple first feature words;

[0201] Encode multiple first feature words to obtain multiple first feature vectors;

[0202] The eighth text is encoded to obtain the second feature vector;

[0203] Multiple first and second feature vectors are fused to obtain a third feature vector;

[0204] Based on the pre-trained malicious text recognition model and the third feature vector, the third malicious value is determined;

[0205] Based on a pre-trained malicious image recognition model and the first image, a fourth malicious value is determined;

[0206] The second malicious value is determined based on the third and fourth malicious values.

[0207] In one embodiment of this application, when the comment is the ninth text, the type information is the ninth text. In determining the second malicious value based on the comment and the type information, the processor 1002 specifically performs the following steps:

[0208] Feature extraction was performed on the ninth text to identify multiple second feature words;

[0209] Encode multiple second feature words to obtain multiple fourth feature vectors;

[0210] Encode the ninth text to obtain the fifth feature vector;

[0211] The sixth feature vector is obtained by fusing multiple fourth and fifth feature vectors.

[0212] The second malicious value is determined based on the pre-trained malicious text recognition model and the sixth feature vector.

[0213] In one embodiment of this application, when the comment is a second image, the type information is the second image. In determining a second malicious value based on the comment and the type information, the processor 1002 specifically performs the following steps:

[0214] The second image is enhanced to obtain the third image;

[0215] Based on a pre-trained malicious image recognition model and a third image, a second malicious value is determined.

[0216] It should be understood that the electronic devices mentioned in this application may include smartphones (such as Android phones, iOS phones, Windows Phones, etc.), tablet computers, PDAs, laptops, mobile internet devices (MIDs), or wearable devices. The above-mentioned electronic devices are merely examples and not exhaustive, and include, but are not limited to, the electronic devices described above. In practical applications, the above-mentioned electronic devices may also include: intelligent in-vehicle terminals, computer equipment, etc.

[0217] This application also provides a computer-readable storage medium storing a computer program that is executed by a processor to implement some or all of the steps of any of the response content generation methods described in the above method embodiments.

[0218] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the response content generation methods described in the above method embodiments.

[0219] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.

[0220] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0221] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.

[0222] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0223] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software program module.

[0224] If the integrated unit is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0225] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0226] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A reply content generation method characterized by comprising: The method includes: Get user comments on the notes from the first user's perspective; The comments are analyzed to determine whether they are malicious. If the comment is malicious, perform subject identification on the note to obtain subject information; Based on the notes, obtain the first template corresponding to the notes; Based on the main information, the comment, and the first template, a first text is determined. The first template includes a first sub-template and a second sub-template. The process includes: determining a second text corresponding to the main information based on the main information; embedding the second text into the first sub-template and embedding the comment into the second sub-template to generate a third text; and determining the first text based on the third text, wherein the first sub-template corresponds to the main information and the second sub-template corresponds to the comment. Based on the notes and the first text, a first emoticon is generated; Based on the first text and the first emoticon, determine the content of the reply to the comment; The reply content is sent to the second user terminal.

2. The method according to claim 1, characterized in that, When the notes are text, the main information includes the text in the notes; When the note is an image, the main information includes the first person, the first location, and the first action in the image; When the notes are a video, the main information includes a second person, a second location, and a second action in the video; When the notes include text and images, the main information includes the text, as well as a third person, a third location, and a third action in the image; When the notes include both text and video, the main information includes the text, as well as a fourth person, a fourth location, and a fourth action in the video.

3. The method of claim 1, wherein, The first template further includes a third sub-template, and determining the first text based on the third text includes: Obtain a first prompt text, wherein the first prompt text is used to prompt the first model to reply to the comment based on the first prompt text; The first prompt text is embedded into the third sub-template to generate the fourth text; The third text and the fourth text are concatenated to determine the fifth text; Based on the first model and the fifth text, the first text is obtained, wherein the first model is trained by multiple malicious comment samples and multiple note samples.

4. The method of claim 1, wherein, The step of generating a first emoticon based on the notes and the first text includes: Get the second template; Obtain the second prompt text, which is used to prompt the second model to generate an expression based on the second prompt text; Keyword extraction was performed on the first text to obtain multiple first keywords; Based on the multiple first keywords and the second text, the sixth text is obtained; The second prompt text and the sixth text are embedded into the second template to obtain the seventh text; The first expression is determined based on the seventh text and the second model.

5. The method of claim 1, wherein, The step of analyzing the comments to determine whether they are malicious includes: Obtain the user's activity information, which includes the user's historical comments and first notes; The user's activity level is determined based on the user's historical comments and the first note; Sentiment analysis was performed on the historical comments to determine their sentiment values; Obtain the sensitive words in the historical comments; Sensitivity is determined based on the sensitive words in the historical comments; Based on the sentiment value and sensitivity of historical comments, as well as the activity level, the first malicious value corresponding to the user is determined; The comments are type-identified to determine the type information corresponding to the comments; Based on the comments and the type information, a second malicious value is determined; Based on the first malicious value and the second malicious value, it is determined whether the comment is a malicious comment.

6. The method of claim 5, wherein, When the comment includes an eighth text and a first image, the type information includes the eighth text and the first image. Determining the second malicious value based on the comment and the type information includes: Feature extraction is performed on the eighth text to obtain multiple first feature words; Encode the plurality of first feature words to obtain a plurality of first feature vectors; The eighth text is encoded to obtain a second feature vector; The multiple first feature vectors and the second feature vectors are fused to obtain a third feature vector; Based on the pre-trained malicious text recognition model and the third feature vector, a third malicious value is determined; Based on the pre-trained malicious image recognition model and the first image, a fourth malicious value is determined; The second malicious value is determined based on the third malicious value and the fourth malicious value.

7. The method of claim 5, wherein, When the comment is the ninth text, the type information is the ninth text, and determining the second malicious value based on the comment and the type information includes: Feature extraction is performed on the ninth text to identify multiple second feature words; Encode the plurality of second feature words to obtain a plurality of fourth feature vectors; The ninth text is encoded to obtain the fifth feature vector; The plurality of fourth feature vectors and the fifth feature vector are fused to obtain a sixth feature vector; The second malicious value is determined based on the pre-trained malicious text recognition model and the sixth feature vector.

8. The method of claim 5, wherein, When the comment is a second image, and the type information is the second image, determining the second malicious value based on the comment and the type information includes: The second image is enhanced to obtain the third image; The second malicious value is determined based on the pre-trained malicious image recognition model and the third image.

9. A reply content generating apparatus characterized by comprising: The device includes: a transceiver unit and a processing unit; The transceiver unit is used to obtain user comments on the notes from the first user terminal; The processing unit is used to analyze the comments and determine whether the comments are malicious. The processing unit is configured to perform subject identification on the note and obtain subject information if the comment is a malicious comment; The processing unit is used to obtain a first template corresponding to the notes based on the notes; The processing unit is configured to determine a first text based on the main information, the comment, and the first template, wherein the first template includes a first sub-template and a second sub-template, and includes: determining a second text corresponding to the main information based on the main information; embedding the second text into the first sub-template and embedding the comment into the second sub-template to generate a third text; and determining the first text based on the third text, wherein the first sub-template corresponds to the main information and the second sub-template corresponds to the comment; The processing unit is configured to generate a first emoticon based on the notes and the first text; The processing unit is configured to determine the response content to the comment based on the first text and the first emoticon; The transceiver unit is used to send the reply content to the second user terminal.

10. An electronic device, comprising: include: A processor and a memory, the processor being connected to the memory for storing a computer program, the processor being configured to execute the computer program stored in the memory to cause the electronic device to perform the method as described in any one of claims 1-8.

11. A computer readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is executed by a processor to implement the method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Method for replying to comment information, storage medium and server

    CN109388748A

  • Message reply method, device and equipment

    CN115470325A

  • Multi-modal dialogue method and device, equipment and storage medium

    CN115840841A