Comment generation method and device based on large model, equipment and storage medium
Through the comment generation method based on the big model, text and images are extracted from the target resources and multimodal comments are generated, which solves the problem of a single comment form and achieves richer and more accurate comment content.
Patent Information
- Application Number
- CN202411545954.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-03-18
AI Technical Summary
Existing comments mainly exist in text form, limiting the diversity and richness of user expressions and cannot meet users' diverse needs for the presentation of multimedia information.
A large-model-based comment generation method is used to extract relevant text and images from the target resources through the large-model model, and combine this information to generate multimodal comments, such as graphic comments.
The generated comments are more diverse, which can better reflect the content of the target resources and improve the efficiency, accuracy and user experience of comments.
Smart Images

Figure CN119646172A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to the technical fields of artificial intelligence, large models, multimodal content generation, etc. Background Art
[0002] Comments mainly exist in text form, and this single comment mode limits the diversity and richness of user expression.With the continuous development of multimedia technology, users' demands for information presentation are becoming increasingly diverse. Summary of the invention
[0003] The present invention provides a method, apparatus, device and storage medium for generating comments based on a large model.
[0004] According to one aspect of the present disclosure, a method for generating comments based on a large model is provided, comprising:
[0005] Based on the target resource and through the large model, a first text is obtained; wherein the first text is related to the content of the target resource;
[0006] Based on the first text, acquiring a first image;
[0007] Based on the first text and the first image and through the large model, a multimodal review of the target resource is generated.
[0008] According to another aspect of the present disclosure, a review generating device based on a large model is provided, comprising:
[0009] A text acquisition module, used to obtain a first text based on a target resource and through a large model; wherein the first text is related to the content of the target resource;
[0010] An image acquisition module, used for acquiring a first image based on the first text;
[0011] The comment generation module is used to generate a multimodal comment of the target resource based on the first text and the first image and through the large model.
[0012] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0013] at least one processor; and
[0014] a memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any method in the embodiments of the present disclosure.
[0016] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any method according to the embodiments of the present disclosure.
[0017] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which implements any method according to the embodiments of the present disclosure when executed by a processor.
[0018] According to the present disclosure, by using a large model to process the target resource, text and images related to the content of the target resource can be obtained, and multimodal comments such as graphic comments that are highly relevant to the target resource can be generated, providing richer comment content for the target resource.
[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0021] Figure 1 is a flowchart of a method for generating comments based on a large model according to an embodiment of the present disclosure;
[0022] Figure 2 is a flowchart of a method for generating comments based on a large model according to another embodiment of the present disclosure;
[0023] Figure 3 is a flowchart of a method for generating comments based on a large model according to another embodiment of the present disclosure;
[0024] Figure 4 is a flowchart of a method for generating comments based on a large model according to another embodiment of the present disclosure;
[0025] Figure 5 is a flow chart of a method for generating a transitional comment text according to an embodiment of the present disclosure;
[0026] Figure 6 is a flowchart of a method for generating a comment image according to an embodiment of the present disclosure;
[0027] Figure 7 is a structural schematic diagram of a large model-based comment generation device according to an embodiment of the present disclosure;
[0028] Figure 8 is a structural schematic diagram of a large model-based comment generation device according to another embodiment of the present disclosure;
[0029] Fig. 9 is a block diagram of an electronic device for implementing an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0031] A comment generation method includes: retrieving related resources through a certain model according to the characteristics of the current resource, and using the popular user comment pictures and texts of the related resources as the comment content of the current resource. First, the characteristics of the current resource are deeply analyzed. Then, the pre-built model is used to retrieve other resources that are highly relevant to the current resource in the resource library. The user comments in these resources are further analyzed, especially those marked as popular or highly praised. Finally, these popular user picture comments are screened and sorted, and the retained comments are displayed as the comment content of the current resource. Directly using the popular user picture comments of other resources may result in the comment content lacking originality and personalization for the current resource, making the content of the comment area appear to be stereotyped. In addition, the popular comments may not fully match the specific content and theme of the current resource, resulting in low relevance between the comments and the resource content.
[0032] Figure 1 FIG. 1 is a flow chart of a method 100 for generating comments based on a large model according to an embodiment of the present disclosure. In one embodiment, the method includes:
[0033] S101, obtaining a first text based on a target resource and through a large model; wherein the first text is related to the content of the target resource;
[0034] S102, acquiring a first image based on the first text;
[0035] S103: Generate a multimodal review of the target resource based on the first text and the first image and through the large model.
[0036] In the disclosed embodiments, the target resource may be content published on a social or media platform, and its form may include one or a mixture of multiple forms of text, images, audio, and video. The target resource may also be referred to as a current resource, content resource, etc. For example, an article published on a website, an article in the form of pictures and text published on an application, etc. The large model may also be referred to as a large language model (LLM). After fine-tuning, the large model can output a response that meets the task requirements in the prompt word according to different input prompt words. The large model can integrate multiple functions, such as:
[0037] Natural language understanding, image content understanding, image generation, text generation, content-based recommendations, similarity matching, etc.
[0038] In the disclosed embodiment, the target resource may be input into the large model, and the first text may be obtained by performing natural language understanding and other processing on the target resource. The first text may include text that can reflect the content of the target resource. For example, the first text may include words, phrases, sentences, paragraphs, etc. related to the content of the target resource. The first text may be extracted from the text content of the target resource, or may be generated based on the text content of the target resource or related resources of the target resource.
[0039] In the disclosed embodiment, the first image is related to the first text and / or the target resource. For example, based on the first text, a search can be performed in an image library to obtain a first image with high relevance to the first text; or based on the first text, a large model can be used to generate a first image with high relevance to the first text.
[0040] In the disclosed embodiment, a large model can be used to generate a multimodal comment based on the first text and the first image. The multimodal comment may include comment text and comment image. Alternatively, the first text is used as the comment text, and the first image is used as the comment image to combine to obtain a multimodal comment. For example, the comment image may include an image related to the content of the target resource, and may also include an image related to the content of the comment text, etc. In a multimodal comment, the comment image can be inserted in multiple positions such as before the comment text, in the middle of the comment text, or after the comment text.
[0041] In the disclosed embodiments, one or more large models may be used to generate comments. For example, a benchmark large model may be used to perform fine-tuning for different stages of generating comments to obtain large models suitable for different stages. For another example, different prompt words may be input into the same large model at different stages of generating comments to output different results.
[0042] In one example, a large model for generating text, a large model for generating images, etc. can be used to generate multimodal comments. In another example, a prompt word with one or more of text requirements, image generation requirements, and comment generation requirements can be input into the model to generate the required text, image, or comment, respectively.
[0043] According to the disclosed embodiment, the target resource is processed using a large model to obtain text and images related to the content of the target resource, generate multimodal comments such as graphic comments that are highly relevant to the target resource, and provide richer comment content for the target resource. According to the disclosed embodiment, the efficiency, richness, and content accuracy of comment generation can be improved, further improving the user experience.
[0044] Figure 2 2 is a flowchart of a method 200 for generating comments based on a big model according to another embodiment of the present disclosure. The method 200 can be used to implement step S101 in the method 100 for generating comments based on a big model. In one embodiment, based on the target resource and using the big model to obtain the first text, S101 further includes:
[0045] S201. Perform semantic analysis and content understanding on the target resource through the large model to extract at least one of key information and subject tags, wherein the first text includes at least one of the key information and subject tags.
[0046] In the disclosed embodiment, the subject tag may include keywords or phrases used to describe, classify or mark related content in a certain subject or field. The subject tag of the target resource can be understood as a certain subject or field to which the target resource belongs. For example, the main content of the target resource is a movie review of a certain movie. The subject tag of the target resource can be a movie review. For another example, the main content of the target resource is recent news. The subject tag of the target resource can be news. The key information of the target resource may include keywords or phrases in the text or image content of the target resource. For example, the target resource is a character analysis of a TV series called "XX". The key information may include the specific TV series name "XX" and may also include the name of the character, etc. For another example, the main content of the target resource is recent news. The key information of the target resource may include the time, place, person, event, etc. of the news. The key information and the subject tag may be completely different or partially the same.
[0047] In the disclosed embodiment, semantic analysis and content understanding can be performed on the input target resource based on the capability of the large model, and at least one of the extracted key information and subject tags can be used as the first text. For example, if the large model has the capability to analyze and understand text and images, the text and images of the target resource can be input into the large model for semantic analysis and content understanding. For another example, if the large model has the capability to analyze and understand audio, the audio of the target resource can be input into the large model, first recognized as text, and then semantic analysis and content understanding can be performed on the text.
[0048] According to the embodiments of the present disclosure, the target resources can be analyzed and understood based on the capabilities of the big model to obtain key information and / or topic tags that can reflect the content of the target resources, and then generate comments that match the target resources to improve the content accuracy of the comments.
[0049] In one embodiment, the target resource is subjected to semantic analysis and content understanding by the large model to extract at least one of key information and topic tags, including:
[0050] The first prompt word is input into the large model for semantic analysis and content understanding to extract at least one of the key information and the subject tag; wherein the first prompt word includes: at least one of the key information extraction requirement and the subject tag extraction requirement, and the target resource.
[0051] In the disclosed embodiment, the first prompt word can be used to guide the large model to perform key information and / or topic tag extraction tasks after the target resource is inserted. Specifically, a prompt word template with key information extraction requirements and / or topic tag extraction requirements can be used, and the first prompt word can be obtained after the content of the target resource is inserted into it. The first prompt word is input into the large model, and the large model extracts key information from the content of the target resource according to the key information extraction requirements; the large model extracts topic tags from the content of the target resource according to the topic tag extraction requirements.
[0052] According to an embodiment of the present disclosure, key information and / or topic tags of a target resource can be extracted using a large model based on prompt words for extracting key information and / or topic tags, providing a basis for generating comments related to the content of the target resource.
[0053] In one embodiment, Figure 2 As shown, S102 acquires a first image based on the first text, including:
[0054] S202: Based on at least one of the key information and the subject tag, obtain the first image related to the target resource from an image library.
[0055] In the disclosed embodiment, the image library may include a large number of images, and the image library may be in the form of at least one of a cloud image library, a local image library, and a network image library. Based on the key information and / or subject tags of the target resource, a search may be performed in the image library to obtain a first image related to the target resource. The first image may be obtained by matching the key information and / or subject tags in the image library based on a retrieval algorithm, a large model, a knowledge graph, etc. For example, the similarity between the subject tag and the image category may be compared to determine the target image classification that meets the subject tag. Then, based on the key information, an image matching the key information under the target image classification is retrieved as the first image. For another example, fuzzy matching is first performed to multiple images, and then the similarity between each image and the key information and / or subject tags is calculated respectively, and the image with the highest similarity is selected as the first image.
[0056] According to the embodiments of the present disclosure, a first image that is highly relevant to key information and / or topic tags can be obtained through retrieval, and the first image is also highly relevant to the content of the target resource, thereby improving the accuracy of the comments, improving the relevance of the comments to the target resource, and making the comments more authentic and credible.
[0057] Figure 3 3 is a flowchart of a method 300 for generating comments based on a big model according to another embodiment of the present disclosure. The method 300 can be used to implement step S101 in the method 100 for generating comments based on a big model. In one embodiment, the first text is obtained based on the target resource through the big model, and S101 further includes:
[0058] S301. Based on at least one of the key information, the topic tag, historical comment data and public knowledge and through the big model, generate a second text representing the comment content related to the target resource, wherein the first text includes the second text.
[0059] In the disclosed embodiments, historical comment data may include existing comments on the target resource, or comments on resources associated with the target resource. The associated resources of the target resource may be resources with the same or similar subject tags, key information, fields, content, etc. as the target resource. The public knowledge base may include relevant knowledge learned by the large model, such as the synopsis of a film or television clip; or the cause, process and result of a social event; or professional knowledge in a certain field, etc. The large model can search for relevant comment data in the historical comment data based on key information and / or subject tags, and / or search for relevant public knowledge in the public knowledge base. Then, based on the relevant comment data and / or relevant public knowledge, a second text representing the comment content related to the target resource is generated.
[0060] According to the embodiments of the present disclosure, a review text related to the content of the target resource can be generated, thereby increasing the accuracy and relevance of the review and making the review more authentic and credible.
[0061] In one embodiment, based on at least one of the key information, the topic tag, historical review data and public knowledge and through the large model, a second text representing the review content related to the target resource is generated, including:
[0062] The second prompt word is input into the large model to generate a third text representing the comment content related to the target resource; wherein the first text includes the third text; the second prompt word includes at least one of the key information, the topic tag, the historical comment data and the public knowledge, and the third text generation requirement.
[0063] In the disclosed embodiment, the second prompt word can be used to guide the large model to perform the third text generation task. For example, a prompt word template with a third text generation requirement can be used, and key information and topic tags can be inserted into it to obtain the second prompt word. After the second prompt word is input into the large model, the large model combines historical comment data and / or public knowledge base to search for relevant comment data and / or relevant public knowledge. After the second prompt word is updated using the relevant comment data and / or relevant public knowledge, the updated second prompt word is input into the large model, and a third text representing the comment content related to the target resource can be generated.
[0064] According to the embodiment of the present disclosure, based on the prompt words used to generate the third text, a large model can be used to generate comments related to the content of the target resource, providing a basis for generating multimodal comments related to the content of the target resource.
[0065] In one implementation, acquiring a first image according to the first text further includes:
[0066] Based on the first text and through the large model, the first image corresponding to the first text is generated.
[0067] In the disclosed embodiment, the first text is input into the big model, and the text map capability of the big model is used to generate a first image related to the first text. The first text and the first image can be combined to obtain a multimodal comment, or the first text and the first image can be processed by the big model to obtain a multimodal comment. If the first text includes a second text, the first image corresponding to the second text can be generated based on the second text and through the big model. If the first text includes a third text, the first image corresponding to the third text can be generated based on the third text and through the big model.
[0068] According to the embodiment of the present disclosure, by generating a first image corresponding to text related to the target resource, the first image is also related to the content of the target resource, thereby improving the accuracy of the review and improving the relevance of the review to the target resource.
[0069] In one implementation, acquiring a first image based on the first text includes:
[0070] The third prompt word is input into the large model to generate the first image corresponding to the first text; wherein the third prompt word includes: the first text and image generation requirements.
[0071] In the disclosed embodiment, the third prompt word can be used to guide the large model to perform the image generation task after the first text is inserted. Specifically, a prompt word template with image generation requirements can be used, and after the first text is inserted into it, the third prompt word is obtained. The third prompt word is input into the large model, and the large model generates a first image related to the first text according to the image generation requirements and the first text, and the first image is also related to the content of the target resource.
[0072] According to an embodiment of the present disclosure, a first image that is more consistent with the content of a target resource can be generated using a large model based on prompt words used to generate an image in combination with a first text, thereby providing a basis for generating multimodal comments related to the content of the target resource.
[0073] Figure 4 4 is a flowchart of a method 400 for generating a comment based on a large model according to another embodiment of the present disclosure. The method 400 can be used to implement step S103 in the method 100 for generating a comment based on a large model. In one embodiment, the multimodal comment of the target resource is generated based on the first text and the first image and through the large model, and S103 further includes:
[0074] S401, understanding the content of the first image through the large model to generate image summary information;
[0075] S402, generating a comment text of the target resource based on at least one of the target resource, the first image and the image summary information and using the large model;
[0076] S403: Generate the multimodal comment based on the first image and the comment text.
[0077] In the disclosed embodiment, after obtaining a first image related to a target resource, the large model can be used to understand the content of the first image to obtain image summary information reflecting the content of the image. The image summary information may include information about each element in the image. For example, people, animals, objects, scenery, time, events, text, etc. in the image. The first image, image summary information, target resource, etc. can be input into the large model to generate a comment text for the target resource. The comment text can be called a transitional comment text. By combining the comment text with the first image, a multimodal comment on the target resource can be obtained.
[0078] According to the embodiments of the present disclosure, richer review content can be provided for target resources based on the capabilities of the large model, and the review generation efficiency is high and the content accuracy is high.
[0079] In one embodiment, the step of understanding the content of the first image through the large model to generate image summary information includes: inputting a fourth prompt word into the large model to understand the content and generate the image summary information; wherein the fourth prompt word includes: the first image and a summary generation requirement;
[0080] Based on at least one of the target resource, the first image and the image summary information and through the large model, a comment text for the target resource is generated, including: inputting a fifth prompt word into the large model to generate the comment text; wherein the fifth prompt word includes: the target resource, the first image, the image summary information, and a multimodal comment generation requirement.
[0081] In the disclosed embodiment, the fourth prompt word can be used to guide the large model to perform the summary generation task after the first image is inserted. Specifically, a prompt word template with summary generation requirements can be used, and after the first image is inserted into it, the fourth prompt word is obtained. The fourth prompt word is input into the large model, and the large model extracts the image summary information of the first image according to the summary generation requirements based on the first image.
[0082] In the disclosed embodiment, the fifth prompt word can be used to guide the large model to perform the multimodal comment generation task after inserting the target resource, the first image and the image summary information. Specifically, a prompt word template with a multimodal comment generation requirement can be used, and after inserting the target resource, the first image and the image summary information, the fifth prompt word is obtained. The fifth prompt word is input into the large model, and the large model generates a comment text of the target resource according to the multimodal comment generation requirement, the target resource, the first image and the image summary information, and then generates a multimodal comment.
[0083] According to the disclosed embodiment, based on the prompt words used to understand the image content of the first image, the large model can be used to extract image summary information from the first image, providing a basis for generating comments that are consistent with both the target resource content and the first image content. It can also be used to generate prompt words that are consistent with the target resource. The large model is used to generate multimodal comments related to the resource to be reviewed and the first image, and the generated comments are highly accurate.
[0084] In the disclosed embodiment, a control script or a control script set may be used to control the process of generating comments by a large model. For example, a control script may include one or more of a text extraction code segment, an image matching code segment, an image understanding code segment, a text generation code segment, a comment combination code segment, and a comment generation code segment. A control script set may also include similar content, and the code segment may be replaced with a script.
[0085] In an example of an embodiment of the present disclosure, the target resource can be first combined with the first prompt word template according to the target resource extraction code segment or the target resource extraction script to obtain the first prompt word; the first prompt word is input into the large model for processing to obtain the key information and / or topic label of the target resource. Then, according to the comment text generation code segment or the comment text generation script, the key information, topic label, historical comment data and public knowledge of the target resource are combined with the second prompt word template to obtain the second prompt word; the second prompt word is input into the large model for generation to obtain the comment text. Then, according to the comment image generation code segment or the comment image generation script, the comment text is combined with the third prompt word template to obtain the third prompt word; the third prompt word is input into the large model for generation to obtain the comment image. Then, according to the comment image understanding code segment or the comment image understanding script, the comment image is combined with the fourth prompt word template to obtain the fourth prompt word; the fourth prompt word is input into the large model for image content understanding to obtain image summary information. Finally, according to the comment text generation code segment or comment text generation script, the target resource, comment image and image summary information are combined with the fifth prompt word template to obtain the fifth prompt word; the fifth prompt word is input into the large model to generate the comment text of the target resource, and then a multimodal comment is generated.
[0086] In another example of an embodiment of the present disclosure, the first prompt word template can be called according to the text extraction code segment to generate a first prompt word including a target resource; the first prompt word is input into the large model for processing to obtain the key information and / or subject tag of the target resource. Then, according to the image matching code segment, the key information and / or subject tag of the target resource is matched in the image library to obtain the first image related to the target resource. Then, according to the image understanding code segment, the fourth prompt word template is called to generate a fourth prompt word including the first image; the fourth prompt word is input into the large model for image content understanding to obtain image summary information. Finally, according to the text generation code segment, the fifth prompt word template is called to generate a fifth prompt word including the target resource, the comment image and the image summary information; the fifth prompt word is input into the large model to generate the comment text of the target resource, thereby generating a multimodal comment.
[0087] Example 1: Selecting relevant image content based on a large model and generating transitional comment text
[0088] An embodiment of the present disclosure uses a large model technology to deeply understand the current resource content and selects image content related to the current resource from a massive image library. At the same time, the large model is used to understand the image content and generate transitional comment text in combination with the current resource description to improve the coherence and readability of the comment.
[0089] Figure 5 FIG. 1 is a flow chart of a method for generating transitional comment text according to an embodiment of the present disclosure, and the specific implementation steps are as follows:
[0090] S501, content understanding: Use the pre-trained large language model to perform semantic analysis and content understanding on the current resource, extracting key information and topic tags. These key information and topic tags can be used for subsequent image selection and text generation.
[0091] S502, picture selection: Based on the extracted key information and / or subject tags, similarity matching and correlation analysis are performed in the massive picture library to select picture content that is highly relevant to the current resource.
[0092] S503, picture content understanding: use the pre-trained large language model to understand the content of the selected picture and generate picture summary information.
[0093] S504, transitional comment text generation: Combine the current resource and the selected pictures, and use natural language processing technology to generate transitional comment text. These texts are intended to guide users to transition from the current resource to the commented picture, and improve the coherence and readability of the comment. At the same time, it can also include a brief evaluation or opinion on the current resource and the commented picture.
[0094] Example 2: Generate comment text content based on the big model and generate corresponding images
[0095] An embodiment of the present disclosure can generate new comment text content based on current resources and generate corresponding pictures using large model technology. This function provides a richer selection of comment forms.
[0096] Figure 6 It is a flowchart of a comment image generating method according to an embodiment of the present disclosure.
[0097] like Figure 6 As shown, the specific implementation steps are as follows:
[0098] S601, comment text generation: Based on the deep understanding of the current resource, key information and / or topic tags can be obtained, and combined with the user's historical comment data and public knowledge base information, the big model technology is used to generate comment text content related to the current resource. These text contents can be the viewpoints, emotional expressions or extended discussions of the current resource.
[0099] S602, Image Generation: Take the generated review text as input and use the image generation module in the large model to produce the corresponding image content. This module can use advanced text-to-image generation technology, such as the Transformer-based model architecture and Generative Adversarial Network (GAN), to ensure that the generated image content is of high quality and consistent with the review text.
[0100] In addition to obtaining the final comment directly based on the combination of the comment text and the generated image, the final comment may also be generated after generating transitional text based on the image summary information, referring to steps 503 and 504 in the above embodiment.
[0101] Figure 7 is a schematic diagram of a structure of a large model-based comment generation device 700 according to an embodiment of the present disclosure. In one implementation, the device includes:
[0102] A text acquisition module 701 is used to obtain a first text based on a target resource and through a large model; wherein the first text is related to the content of the target resource;
[0103] An image acquisition module 702 is used to acquire a first image based on the first text;
[0104] The comment generation module 703 is used to generate a multimodal comment of the target resource based on the first text and the first image and through the large model.
[0105] Figure 8800 is a schematic diagram of a large model-based comment generation device according to another embodiment of the present disclosure. The device 800 includes: a text acquisition module 801, an image acquisition module 802, and a comment generation module 803. The functions of the above modules can refer to the functions of the modules of the large model-based comment generation device in the above embodiment. In one embodiment, the text acquisition module 801 includes:
[0106] The extraction submodule 8011 is used to perform semantic analysis and content understanding on the target resource through the large model, and extract at least one of the key information and the subject tag, and the first text includes at least one of the key information and the subject tag.
[0107] In one embodiment, the extraction submodule 8011 is also used to input the first prompt word into the large model for semantic analysis and content understanding, and extract at least one of the key information and the subject tag; wherein the first prompt word includes: at least one of the key information extraction requirements and the subject tag extraction requirements, and the target resource.
[0108] In one embodiment, Figure 8 As shown, the image acquisition module 802 includes:
[0109] The matching submodule 8021 is used to obtain the first image related to the target resource from the image library based on at least one of the key information and the subject tag.
[0110] In one embodiment, Figure 8 As shown, the text acquisition module 801 further includes:
[0111] The text generation submodule 8012 is used to generate a second text representing the comment content related to the target resource based on at least one of the key information, the topic tag, historical comment data and public knowledge and through the big model, wherein the first text includes the second text.
[0112] In one embodiment, the text generation submodule 8012 is also used to input the second prompt word into the large model to generate a third text representing the comment content related to the target resource; wherein the first text includes the third text; the second prompt word includes at least one of the key information, the topic tag, the historical comment data and the public knowledge, and the third text generation requirement.
[0113] In one implementation, the image acquisition module 802 is further configured to generate the first image corresponding to the first text based on the first text and through the large model.
[0114] In one embodiment, Figure 8 As shown, the image acquisition module 802 further includes:
[0115] The image generation submodule 8022 is used to input the third prompt word into the large model to generate the first image corresponding to the first text; wherein the third prompt word includes: the first text and image generation requirements.
[0116] In one embodiment, Figure 8 As shown, the comment generation module 803 includes:
[0117] An image summary generation submodule 8031 is used to understand the content of the first image through the large model and generate image summary information;
[0118] A comment text generating submodule 8032, configured to generate a comment text of the target resource based on at least one of the target resource, the first image and the image summary information and through the large model;
[0119] The multimodal comment generation submodule 8033 is used to generate a multimodal comment of the target resource based on the first image and the comment text.
[0120] In one implementation, the image summary generation submodule 8031 is further used to input a fourth prompt word into the large model for content understanding to generate the image summary information; wherein the fourth prompt word includes: the first image and a summary generation requirement;
[0121] The comment text generation submodule 8032 is further used to input the fifth prompt word into the large model to generate the comment text; wherein the fifth prompt word includes: the target resource, the first image, the image summary information, and the multimodal comment generation requirement.
[0122] For the description of specific functions and examples of each module and submodule of the device in the embodiment of the present disclosure, reference can be made to the relevant description of the corresponding steps in the above method embodiment, which will not be repeated here.
[0123] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0124] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0125] Fig. 9A schematic block diagram of an example electronic device 900 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0126] like Fig. 9 As shown, the device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0127] A number of components in the device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0128] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 901 performs the various methods and processes described above, such as a review generation method based on a large model. For example, in some embodiments, the review generation method based on a large model may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the review generation method based on the large model described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform a review generation method based on a large model in any other appropriate manner (e.g., by means of firmware).
[0129] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0130] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0131] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0132] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0133] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0134] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0135] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0136] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A review generation method based on a large model, comprising: Obtaining a first text based on the target resource and through the macro model; wherein the first text is related to the content of the target resource; Based on the first text, acquiring a first image; A multimodal review of the target resource is generated based on the first text and the first image and through the large model.
2. The method according to claim 1, wherein: The method of obtaining the first text based on the target resource and through the large model includes: The target resource is semantically analyzed and content understood by the large model to extract at least one of key information and subject tags, and the first text includes at least one of the key information and subject tags.
3. The method according to claim 2, wherein: The step of performing semantic analysis and content understanding on the target resource by using the large model to extract at least one of key information and topic tags includes: The first prompt word is input into the large model for semantic analysis and content understanding to extract at least one of the key information and the subject tag; wherein the first prompt word includes: at least one of the key information extraction requirement and the subject tag extraction requirement, and the target resource.
4. The method according to claim 2 or 3, wherein: The acquiring a first image based on the first text includes: Based on at least one of the key information and the subject tag, the first image related to the target resource is acquired from an image library.
5. The method according to claim 2 or 3, wherein: The method of obtaining the first text based on the target resource and through the large model also includes: Based on at least one of the key information, the topic tags, historical comment data and public knowledge and through the big model, a second text representing the comment content related to the target resource is generated, wherein the first text includes the second text.
6. The method according to claim 5, wherein: The step of generating a second text representing the review content related to the target resource based on at least one of the key information, the topic tag, the historical review data and the public knowledge and using the large model comprises: The second prompt word is input into the large model to generate a third text representing the review content related to the target resource; wherein the first text includes the third text; the second prompt word includes at least one of the key information, the topic tag, the historical review data and the public knowledge, and the third text generation requirement.
7. The method according to claim 6, wherein: The acquiring a first image based on the first text includes: Input a third prompt word into the large model to generate the first image corresponding to the first text; wherein the third prompt word includes: the first text and image generation requirements.
8. The method according to any one of claims 2 to 7, wherein: The step of generating a multimodal review of the target resource based on the first text and the first image and using the large model includes: Understanding the content of the first image by using the large model to generate image summary information; Generate a comment text of the target resource based on the target resource, the first image and at least one of the image summary information and through the large model; The multimodal review is generated based on the first image and the review text.
9. The method according to claim 8, wherein: The step of understanding the content of the first image by using the large model to generate image summary information includes: Inputting a fourth prompt word into the large model to understand the content and generate the image summary information; wherein the fourth prompt word includes: the first image and the summary generation requirement; Generating a comment text of the target resource based on at least one of the target resource, the first image and the image summary information and using the large model, including: A fifth prompt word is input into the large model to generate the review text; wherein the fifth prompt word includes: the target resource, the first image, the image summary information, and a multimodal review generation requirement.
10. A review generation device based on a large model, comprising: A text acquisition module, used to obtain a first text based on a target resource and through a large model; wherein the first text is related to the content of the target resource; An image acquisition module, used for acquiring a first image based on the first text; A comment generation module is used to generate a multimodal comment of the target resource based on the first text and the first image and through the large model.
11. The device according to claim 10, wherein: The text acquisition module comprises: The extraction submodule is used to perform semantic analysis and content understanding on the target resource through the large model, and extract at least one of key information and subject tags, wherein the first text includes at least one of the key information and subject tags.
12. The device according to claim 11, wherein The extraction submodule is also used to input the first prompt word into the large model for semantic analysis and content understanding, and extract at least one of the key information and the subject tag; wherein the first prompt word includes: at least one of the key information extraction requirements and the subject tag extraction requirements, and the target resource.
13. The device according to claim 11 or 12, wherein: The image acquisition module comprises: The matching submodule is used to obtain the first image related to the target resource from an image library based on at least one of the key information and the subject tag.
14. The device according to claim 11 or 12, wherein: The text acquisition module further includes: A text generation submodule is used to generate a second text representing the comment content related to the target resource based on at least one of the key information, the topic tags, historical comment data and public knowledge and through the large model, wherein the first text includes the second text.
15. The device according to claim 14, wherein: The text generation submodule is also used to input the second prompt word into the large model to generate a third text representing the comment content related to the target resource; wherein the first text includes the third text; the second prompt word includes at least one of the key information, the topic tag, the historical comment data and the public knowledge, and the third text generation requirement.
16. The device according to claim 15, wherein: The image acquisition module further includes: The image generation submodule is used to input a third prompt word into the large model to generate the first image corresponding to the first text; wherein the third prompt word includes: the first text and image generation requirements.
17. The device according to any one of claims 11 to 16, wherein: The comment generation module includes: An image summary generation submodule, configured to understand the content of the first image through the large model and generate image summary information; A comment text generation submodule, configured to generate a comment text for the target resource based on at least one of the target resource, the first image and the image summary information and through the large model; The multimodal comment generation submodule is used to generate the multimodal comment based on the first image and the comment text.
18. The device according to claim 17, wherein: The image summary generation submodule is further used to input a fourth prompt word into the large model for content understanding to generate the image summary information; wherein the fourth prompt word includes: the first image and summary generation requirements; The comment text generation submodule is further used to input a fifth prompt word into the large model to generate the comment text; wherein the fifth prompt word includes: the target resource, the first image, the image summary information, and multimodal comment generation requirements.
19. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.
20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-9.
21. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 9.
22. A large model comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 9.