Question and answer information generation method and device based on large model, electronic equipment and medium

By generating initial response text and revising it based on image content and object description text, it solves the hallucination and high cost problems of multi-modal large language models when generating high-quality multi-modal dialogue data, and improves data quality and model effects.

CN118568240APending Publication Date: 2024-08-30BEIJING BAIDU NETCOM SCI & TECH CO LTD

Patent Information

Application Number
CN202410889692.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-03
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing multi-modal large language models have hallucination problems and high costs when generating high-quality multi-modal dialogue data. Moreover, the current MLLM capability is weak and cannot effectively polish and correct low-quality multi-modal dialogue. data, resulting in poorer quality of language style and adherence to visual facts.

Method used

By generating initial response text and revising it based on image content and object description text, large models are used to generate high-quality target response text, avoiding hallucination problems and reducing labor costs and time costs.

Benefits of technology

It improves the accuracy and quality of multi-modal dialogue data, reduces labor costs and time costs, improves model training effects, and generates response texts that are more in line with user preferences and image facts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568240A
    Figure CN118568240A
Patent Text Reader

Abstract

The invention provides a question and answer information generation method and device based on a large model, electronic equipment and a storage medium, relates to the technical field of artificial intelligence, in particular to the technical fields of computer vision, deep learning, large models and the like, and can be applied to scenes such as human-computer interaction. According to the specific implementation scheme, an initial response text is generated according to a question text and an image associated with the question text; determining a first description text for the image content of the image; determining a second description text for the object in the image; and correcting the initial response text based on the large model according to the question text, the first description text and the second description text to obtain a target response text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to technical fields such as computer vision, deep learning, and large models, and can be applied to scenarios such as human-computer interaction. More specifically, the present disclosure provides a method, device, electronic device, storage medium, and computer program product for generating question and answer information based on a large model. Background Art

[0002] Some application scenarios require high-quality multimodal conversation data. For example, large multimodal models sometimes require high-quality multimodal conversation data to support their continued improvement. However, the difficulty of constructing multimodal conversation data is much higher than that of constructing pure text-based conversation data, which has become the main bottleneck restricting manufacturers and research institutions from improving model effects. Summary of the invention

[0003] The present disclosure provides a method, device, electronic device, storage medium and computer program product for generating question and answer information based on a large model.

[0004] According to one aspect of the present disclosure, a method for generating question and answer information based on a large model is provided, including: generating an initial response text based on a question text and an image associated with the question text; determining a first description text for the image content of the image; determining a second description text for the object in the image; and correcting the initial response text based on the large model according to the question text, the first description text and the second description text to obtain a target response text.

[0005] According to another aspect of the present disclosure, a question and answer information generation device based on a large model is provided, comprising: a generation module, a first description text determination module, a second description text determination module, and a correction module. The generation module is used to generate an initial answer text based on a question text and an image associated with the question text. The first description text determination module is used to determine a first description text for the image content of the image. The second description text determination module is used to determine a second description text for an object in the image. The correction module is used to correct the initial answer text based on the large model according to the question text, the first description text, and the second description text to obtain a target answer text.

[0006] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method provided by the present disclosure.

[0007] 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 a computer to execute the method provided by the present disclosure.

[0008] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method provided by the present disclosure is implemented.

[0009] 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

[0010] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0011] Figure 1 is a schematic diagram of an application scenario of a method and device for generating question and answer information based on a large model according to an embodiment of the present disclosure;

[0012] Figure 2 is a schematic flow chart of a method for generating question and answer information based on a large model according to an embodiment of the present disclosure;

[0013] Figure 3 is a schematic flow chart of a method for generating question and answer information based on a large model according to another embodiment of the present disclosure;

[0014] Figure 4 is a schematic flow chart of a method for generating question and answer information based on a large model according to another embodiment of the present disclosure;

[0015] Figure 5 is a schematic diagram of a method for generating question and answer information based on a large model according to an embodiment of the present disclosure;

[0016] Figure 6 is a schematic structural block diagram of a large model-based question and answer information generating device according to an embodiment of the present disclosure; and

[0017] Figure 7 It is a structural block diagram of an electronic device used to implement the large model-based question and answer information generation method of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0018] 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 and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0019] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure 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.

[0020] In the technical solution of the present disclosure, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.

[0021] Compared with pure text-based conversation data, multimodal conversation data includes not only text-based questions and answers, but also visual elements such as pictures and videos. It is necessary to ensure that the answers are consistent with the objective facts of the pictures and videos, otherwise hallucination problems are likely to occur.

[0022] In some embodiments, multimodal conversation data can be constructed manually. For example, a turnkey annotation platform, such as Amazon Mechanical Turk, can be used, or a data annotation team can be built and trained. The annotators polish the language and correct errors of low-quality answers according to a series of principles established in advance to improve the quality of the answers.

[0023] However, this method has the problems of high labor costs and time consumption. In addition, the polishing and correction of multimodal dialogue data is difficult, and the training costs of annotation personnel in the early stage and the quality inspection costs in the later stage cannot be ignored.

[0024] In some embodiments, open source or closed source MLLM (Multimodel Large Language Model) can be used to polish low-quality multimodal dialogue data. For example, the input of MLLM is visual information such as pictures or videos, question text and low-quality answer text. MLLM performs language polishing and error correction on low-quality answer text based on visual information and question text to improve the accuracy, usefulness and harmlessness of the answer.

[0025] However, although this method can reduce labor costs and improve efficiency by large-scale parallel processing, the current MLLM capabilities are generally weak and cannot handle the tasks of polishing and correction. Hallucinations often occur, and the answer style does not meet user preferences. The quality of the multimodal dialogue data constructed in this way is poor in terms of language style and compliance with visual facts. In addition, the closed-source model imposes certain restrictions on QPS (Query Per Second, throughput), which is not conducive to large-scale parallel processing, and the high charging price also greatly increases the annotation cost.

[0026] The disclosed embodiment aims to provide a method for generating question-answer information based on a large model. On the one hand, the method first generates low-quality initial response information, and determines a first description text representing the image content and a second description text representing the object in the image, and then uses the first description text and the second description text to correct the low-quality initial response text to obtain a high-quality target response text. In this way, the target text can be based on the facts of the image, which can avoid the generation of hallucinations to a certain extent, thereby improving the accuracy of the target response text and improving the quality of multimodal dialogue data. On the other hand, since it can be processed automatically without manual annotation processing, it can reduce labor costs and time costs and improve processing efficiency.

[0027] After obtaining the target answer text through the above-mentioned large model-based question and answer information generation method, the image, question text and target answer text can be processed into high-quality multimodal dialogue data, and then the multimodal dialogue data can be used to train the model (such as MLLM) to improve the model effect. The trained model can be used to generate the answer text based on the input image and question text.

[0028] The technical solution provided by the present disclosure will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0029] Figure 1 It is a schematic diagram of an application scenario of a method and device for generating question and answer information based on a large model according to an embodiment of the present disclosure.

[0030] It should be noted that Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0031] like Figure 1As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0032] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptops, desktop computers, etc.

[0033] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as the target answer text generated based on the question text in the user request and the image associated with the question text, etc.) to the terminal device.

[0034] It should be noted that the question-answer information generation method based on the big model provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the question-answer information generation device based on the big model provided in the embodiment of the present disclosure can generally be set in the server 105. The question-answer information generation method based on the big model provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the question-answer information generation device based on the big model provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.

[0035] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0036] Figure 2 It is a schematic flowchart of a method for generating question and answer information based on a large model according to an embodiment of the present disclosure.

[0037] like Figure 2As shown, the large model-based question-answer information generation method 200 may include operations S210 to S240, wherein the execution order of operations S210, S220, and S230 is not limited in this embodiment.

[0038] In operation S210, an initial response text is generated based on a question text and an image associated with the question text.

[0039] For example, the image may be a frame image in a video, or may be a picture unrelated to the video.

[0040] For example, the question text being associated with the image may indicate that the question text is a question about the image. For example, if the image includes a dog, the question text may be “what kind of dog is the dog in the picture”, “what kind of animal is the animal in the picture”, etc.

[0041] For example, the initial response text is a reply to the question text, and the initial response text may be accurate or inaccurate, and inaccurate cases may include wrong answers or failure to answer according to the question. For example, if the question text is "What is the animal in the picture", the initial response text may be "There is a tree in the picture" or "The dog in the picture is running".

[0042] For example, an image and a question text may be input into a multimodal large language model, and the multimodal large language model may output an initial response text.

[0043] In operation S220, a first description text for the image content of the image is determined.

[0044] For example, the image can be input into the image description model to obtain the first description text, and the first description text can describe the overall content and local content of the input image. The first description text can be accurately obtained using the image description model. The image description model can be, for example, a Caption model, and this embodiment does not limit the image description model.

[0045] For another example, the similarity between the image and a plurality of reference images may be calculated, and the description text corresponding to the reference image with the greatest similarity may be used as the first description text.

[0046] In operation S230, a second description text for the object in the image is determined.

[0047] For example, object detection may be performed on the image to determine the category of the object, and then relevant information of the object may be retrieved from a search engine or a database to obtain the second description text.

[0048] In operation S240, the initial response text is modified based on the large model according to the question text, the first description text, and the second description text to obtain a target response text.

[0049] For example, a large model may be used for correction, for example, the question text, the first description text, and the second description text may be input into the large model, and the large model may output the target answer text. The large model may be, for example, a large language model (LLM), and this embodiment does not limit the structure and type of the large model.

[0050] According to the embodiments of the present disclosure, on the one hand, low-quality initial response information is first generated, and a first description text representing the image content and a second description text representing the object in the image are determined, and then the low-quality initial response text is corrected using the first description text and the second description text to obtain a high-quality target response text. In this way, the target text can be based on the facts of the image, which can avoid the generation of hallucinations to a certain extent, thereby improving the accuracy of the target response text and improving the quality of multimodal dialogue data. On the other hand, since it can be processed automatically without manual annotation processing, it can reduce labor costs and time costs and improve processing efficiency.

[0051] Figure 3 It is a schematic flowchart of a method for generating question and answer information based on a large model according to another embodiment of the present disclosure.

[0052] like Figure 3 As shown, the process of generating the initial response text according to the question text and the image associated with the question text may include operations S311 to S313.

[0053] In operation S311 , a plurality of reference data are acquired, each of which includes an associated reference image, a reference question text, and a reference answer text.

[0054] For example, reference data may be preconfigured or collected. For another example, historical data obtained by previously executing the above-mentioned large model-based question and answer information generation method may be used as reference data, for example, after previously executing the above-mentioned large model-based question and answer information generation method to obtain the target answer text, the question text, image and target answer text may be used as reference data.

[0055] In operation S312, target reference data is then determined from a plurality of reference data according to the image and the question text.

[0056] Exemplarily, the reference image in the target reference data and the image satisfy the first matching condition. For example, the first matching condition may include: the similarity between the reference image in the target reference data and the image is greater than or equal to a first threshold, and this embodiment does not limit the first threshold. For another example, the first matching condition may include: the objects included in the reference image in the target reference data are consistent with the objects included in the image, for example, both images include the following objects: cat, dog, tree. Through the first matching condition, the target reference data can be screened from the dimension of whether the image matches, thereby improving the accuracy of the target reference data.

[0057] Exemplarily, the question text in the target reference data and the question text satisfy the second matching condition. For example, the second matching condition may include: the similarity between the question text in the target reference data and the question text is greater than or equal to a second threshold, and this embodiment does not limit the second threshold. For another example, the second matching condition may include: the object asked in the question text in the target reference data is consistent with the object asked in the question text, for example, both question texts are questions about "cat". Through the first matching condition, the target reference data can be screened from the dimension of whether the text matches, thereby improving the accuracy of the target reference data.

[0058] In operation S313, an initial response text is then determined based on the reference response text in the target reference data.

[0059] In one example, at least a portion of the reference response text in the target reference data may be used as the initial response text.

[0060] In another example, the initial response text can be determined based on the reference response text, the semantic information for the image, and the question text. For example, at least one of the first description text and the second description text can be used as the semantic information of the image. For example, the reference response text, the semantic information, the question text, and the predetermined prompt words can be input into the large model, and the predetermined prompt words can be used to guide the large model to generate a reply to the question text based on the reference response text and the semantic information, and use the reply as the initial response text. Since the initial response text is generated based on the reference response text, the semantic information of the image, and the question text, the initial response text can start from the question and be based on the facts of the image. It can also refer to the above-mentioned reference response text, so the accuracy of the initial response text is higher.

[0061] According to the embodiment provided by the present disclosure, the above operations S311 to S313 first determine the target reference data from the multiple reference data according to the matching between the reference image and the image in the target reference data, and the matching between the reference question text and the question text in the target reference data. The reference answer text in the target reference data is equivalent to an example, which provides a reply direction for the initial answer text, thereby improving the accuracy of the initial answer text.

[0062] Figure 4 It is a schematic flowchart of a method for generating question and answer information based on a large model according to another embodiment of the present disclosure.

[0063] In this embodiment, the method S430 for determining the second description text for the object in the image may include operations S431 to S434.

[0064] In operation S431, at least one category including an object in an image is detected.

[0065] For example, a pre-trained classification model may be used to perform target detection on an image, thereby determining the categories of various objects in the image. For example, it may be determined through detection that the image includes multiple objects, and the multiple objects include: a cat, two dogs, and three vehicles.

[0066] In operation S432, according to at least one category, a candidate detection operator corresponding to at least one category among a plurality of candidate detection operators is determined as at least one detection operator.

[0067] For example, multiple candidate detection operators may be preconfigured, each of which is used to detect an object of a category, such as candidate detection operator Op_1 for detecting cats, candidate detection operator Op_2 for detecting dogs, candidate detection operator Op_3 for detecting vehicles, and candidate detection operator Op_4 for detecting plants. Since the objects in the image include cats, dogs, and vehicles, the above three candidate detection operators Op_1, Op_2, and Op_3 may be determined as detection operators.

[0068] For example, the number of detection operators can be one or more, and when the number of detection operators is multiple, the multiple detection operators are used to detect different object categories, so that objects of different categories in the image can be detected in a targeted manner, thereby improving the detection effect.

[0069] For example, the objects detected by the multiple detection operators include at least one of the following: faces, people, animals, plants, vehicles, dishes, buildings, predetermined items, text in images, etc., where the person can be a real person or a virtual person, and the predetermined item can include documents, electronic devices, product parts, etc. It should be noted that when the object to be detected is a person or the face to be detected is a human face, user authorization needs to be obtained in advance. For example, a query message can be output to the user first to ask whether facial recognition is allowed to obtain user feedback, and detection is performed when the user confirms the authorization.

[0070] It is understandable that in other embodiments, the above operations S431-S432 may be omitted. For example, all candidate detection operators may be determined as detection operators, and the image may be processed. However, this may result in low processing efficiency. For example, if the image does not include plants, and the detection operator Op_4 for detecting plants is used to process the image, resources are consumed for detection, but the detection results obtained are irrelevant to plants.

[0071] In this embodiment, the category of the object contained in the image is first determined through the above operations S431~S432, and then the corresponding detection operator is selected according to the category. The detection operators can be screened without using all detection operators to process the image, thereby improving the detection efficiency of the detection operator and reducing the required computing resources.

[0072] In operation S433, the image is detected using at least one detection operator to obtain at least one detection result corresponding to the at least one detection operator, and each detection result includes attribute information of at least one object of the same category.

[0073] For example, when there are multiple detection operators, the multiple detection operators can process the image in series or in parallel.

[0074] For example, when the detection operator is used to detect a face, the detection operator can detect what type of face the face in the image is, and accordingly, the attribute information includes, for example, gender, and may also include the identity of the person corresponding to the face, such as a character in an animation work. For another example, when the detection operator is used to detect a vehicle, the attribute information includes, for example, the brand and model of the vehicle. For another example, when the detection operator is used to detect an animal, the attribute information includes, for example, the animal breed. For another example, when the detection operator is used to detect a plant, the attribute information includes, for example, the plant breed. For another example, when the detection operator is used to detect a dish, the attribute information includes, for example, the type of dish. For another example, when the detection operator is used to detect text in an image, the detection operator can be used to perform OCR (Optical Character Recognition), and the identified attribute information includes, for example, the text content.

[0075] In operation S434, a second description text is determined according to the attribute information of the object.

[0076] For example, the output of the detection operator may be structured data, for example, the format of the attribute information output by the detection operator may conform to a preconfigured predetermined format.

[0077] For example, based on the attribute information of the object, candidate introduction texts that match the attribute information of the object can be retrieved from a search engine or database. For example, the candidate introduction text can introduce the brand of the vehicle, the model of the vehicle, the breed of animals, the breed of plants, the dishes, etc. For example, the above candidate introduction text can be used as the second description text. It can be seen that this example uses the candidate introduction text to supplement the description of the object in the image, so that when the large model is used to generate the target response text later, more information can be provided to the large model to improve the accuracy of the target response text.

[0078] In this embodiment, the detection operator is first used to process the image through the above operations S433 to S434, so as to obtain the attribute information of the object of the category detected by the detection operator. Then, the second description text is determined based on the attribute information. In this way, the second description text is associated with the object attribute, so the second description text can describe the object in the image more accurately and specifically, thereby improving the accuracy of the second description text.

[0079] According to another embodiment of the present disclosure, the above process of determining the second description text based on the attribute information of the object may include: first determining the initial description text used to describe the object based on the attribute information of the object, and then combining the initial description text with a predetermined text template to obtain the second description text.

[0080] For example, the candidate introduction text retrieved by using the attribute information above can be used as the initial description text. Then, the initial description text is structurally transformed using a predetermined text template, thereby converting the structured data output by the detection operator and the initial description text into natural language.

[0081] For example, the predetermined text template may include at least one of a prefix text, a suffix text, and a linking text. The prefix text is used to be set before the initial description text, for example, the prefix text is "the animal identified in the image is". The suffix text is used to be set after the initial description text, for example, the suffix text is "the above is the information about the animal in the image". The linking text is used to be set between two sub-texts in the initial description text, for example, the linking text is "its introduction is"

[0082] For example, when the detection operator is used to detect faces, the attribute information includes that the identities of the people corresponding to the faces are Zhang San and Li Si. After conversion processing by a predetermined text template, the second description text may be "The people identified in the picture are: Zhang San and Li Si, the background introduction of Zhang San is: A1, and the background introduction of Li Si is: A2".

[0083] For example, when the detection operator is used to detect a vehicle, the attribute information includes, for example, the brand and model of the vehicle. After conversion processing of the predetermined text template, the second description text may be "The vehicle in the image is identified as a first model vehicle of the first brand, the background introduction of the first brand is: B1, and the background introduction of the first model vehicle is B2".

[0084] For example, when the detection operator is used to detect animals, the attribute information includes, for example, the animal breed. After conversion processing of the predetermined text template, the second description text may be "The animal in the picture is identified as a Shiba Inu, and the background introduction of the Shiba Inu is: C".

[0085] For example, when the detection operator is used to detect plants, the attribute information includes, for example, plant species. After conversion processing of a predetermined text template, the second description text may be "The plant in the image is identified as a pine tree, and the background description of the pine tree is: D".

[0086] For example, when the detection operator is used to detect dishes, the attribute information includes, for example, the type of dish. After conversion processing of the predetermined text template, the second description text may be "the food identified in the picture is: dumplings, and the background introduction of dumplings is: E".

[0087] For example, when the detection operator is used to detect text in an image, the identified attribute information includes, for example, text content. After conversion processing using a predetermined text template, the second description text may be "The text identified in the image is: F".

[0088] It can be seen that the initial description text is structured through a predetermined text template, thereby converting the structured data output by the detection operator and the initial description text into natural language. The expression of natural language is more in line with the input of the large model, so the large model can understand the meaning of the input text more accurately, thereby improving the processing effect of the large model and ensuring the accuracy of the target response text.

[0089] According to another embodiment of the present disclosure, the process of correcting the initial response text based on the big model according to the question text, the first description text and the second description text to obtain the target response text may include: determining the input text according to the question text, the first description text, the second description text, the initial response text and the prompt information (Prompt), and then inputting the input text into the big model to obtain the target response text.

[0090] For example, the question text, the first description text, the second description text, the initial answer text and the prompt information may be combined into the input text.

[0091] For example, the prompt information is a natural language, which is used to guide the large model to correct the initial response text for the question text based on the first description text and the second description text. For example, the correction processing in the prompt information may include: modifying the language style so that the language style of the modified target response text conforms to the human conversation habits, so that the target response text can be more realistic. For another example, the correction processing in the prompt information may include: modifying the language style so that the language style of the modified target response text is consistent with the language style of the question text, so that the styles of the question text and the target response text can be more unified, thereby improving the quality of the target response text. For another example, the correction processing in the prompt information may include: correcting grammatical errors in the initial response text. For another example, the correction processing in the prompt information may include: correcting factual errors in the initial response text and reducing errors in the target response text.

[0092] For example, a prompt message is as follows: You are an answer content modification assistant. Your task is to polish and correct the low-quality {initial answer text} of {question text} based on {first description text} and {second description text}. Polishing refers to modifying the language style to make it more in line with human conversation habits. Correction refers to correcting factual errors in {low-quality answers}. Then output the corrected text. Among them, {first description text}: AAA. {second description text}: BBB. {question text}: CCC. {initial answer text}: DDD.

[0093] It should be noted that the polishing and correction capabilities of the current multimodal large model are generally weak. This embodiment uses a relatively mature large model of pure text mode to correct the initial response text. Compared with the multimodal large model, the large model of pure text mode has more sufficient data, and its command following ability and language comprehension ability are significantly better than the multimodal large model. The quality of the answer is more guaranteed, so the quality of the answer can be effectively improved.

[0094] Figure 5 It is a schematic diagram of a method for generating question and answer information based on a large model according to an embodiment of the present disclosure.

[0095] In this embodiment, the method for generating question and answer information based on a large model may include the following operations: the initial answer text 503 may be determined first. For example, the initial answer text 503 may be generated based on the question text 502 and the image 501 associated with the question text 502. The generation method may refer to the above, and will not be described in detail in this embodiment. The image 501, the question text 502, and the low-quality initial answer text 503 may also be constructed using Internet data or business reflux data.

[0096] A first description text 508 for the image content of the image 501 may be determined. For example, the image 501 may be input into an image description model to extract visual information, thereby obtaining the first description text 508. The image description model may be a Caption model.

[0097] A second description text 507 for an object in the image 501 may be determined. For example, the image 501 may be input into a plurality of detection operators to determine object attributes 504. The object attributes 504 are then converted into an initial description text 505, and the initial description text 505 is converted into a second description text 507 based on a predetermined text template 506.

[0098] Next, the question text 502, the first description text 508, and the second description text 507 can be used to modify the initial response text 503 to obtain the target response text 509. For example, the question text 502, the first description text 508, the second description text 507, the initial response text 503, and the prompt information can be combined into an input text, and then the input text is input into the large model to obtain the target response text 509.

[0099] After obtaining the target response text 509, the target response text 509 can be used to replace the initial response text 503, thereby constructing the question text 502, the image 501 and the target response text 509 into high-quality multimodal dialogue data.

[0100] In this embodiment, an image description model and a detection operator are introduced to compensate for visual information, so that the large model of the pure text modality does not have visual perception ability and cannot correct errors in the low-quality initial response text 503 based on the input image 501. The image description model and the detection operator can provide visual perception ability for the large model of the pure text modality, so that the polishing and correction of the initial response text 503 can be based on the facts in the image 501, which can alleviate the hallucination problem to a certain extent. At the same time, it can also solve the problem of high cost and low efficiency of manual annotation.

[0101] Figure 6 It is a schematic structural block diagram of a large model-based question and answer information generation device according to an embodiment of the present disclosure.

[0102] like Figure 6 As shown, the large model-based question and answer information generating device 600 may include a generating module 610 , a first description text determining module 620 , a second description text determining module 630 and a correcting module 640 .

[0103] The generating module 610 is used to generate an initial response text according to the question text and the image associated with the question text.

[0104] The first description text determination module 620 is used to determine a first description text for the image content of the image.

[0105] The second description text determination module 630 is used to determine a second description text for the object in the image.

[0106] The correction module 640 is used to correct the initial response text based on the large model according to the question text, the first description text and the second description text to obtain the target response text.

[0107] According to an embodiment of the present disclosure, the second description text determination module includes: a first detection submodule and a second description text determination submodule. The first detection submodule is used to detect the image using at least one detection operator to obtain at least one detection result corresponding to the at least one detection operator, and each detection result includes the attribute information of at least one object of the same category. The second description text determination submodule is used to determine the second description text according to the attribute information of the object.

[0108] According to an embodiment of the present disclosure, the second description text determination submodule includes: a first determination unit and a combination unit. The first determination unit is used to determine the initial description text used to describe the object based on the attribute information of the object. The combination unit is used to combine the initial description text with a predetermined text template to obtain a second description text. The predetermined text template includes at least one of the following: a prefix text used to be set before the initial description text, a suffix text used to be set after the initial description text, and a linking text used to be set between two subtexts in the initial description text.

[0109] According to an embodiment of the present disclosure, the first determination unit includes: a determination subunit, which is used to determine, according to the attribute information of the object, an introduction text that matches the attribute information of the object from a plurality of candidate introduction texts as the initial description text.

[0110] According to an embodiment of the present disclosure, each detection operator is used to detect an object of a category. The second description text determination module also includes: a second detection submodule and an operator determination submodule. The second detection submodule is used to detect at least one category of objects contained in the image. The operator determination submodule is used to determine, according to at least one category, a candidate detection operator corresponding to at least one category among multiple candidate detection operators as at least one detection operator.

[0111] According to an embodiment of the present disclosure, there are multiple detection operators, and the multiple detection operators are used to detect different object categories.

[0112] According to an embodiment of the present disclosure, the correction module includes: an input text determination submodule and an input submodule. The input text determination submodule is used to determine the input text according to the question text, the first description text, the second description text, the initial response text and the prompt information. The input submodule is used to input the input text into the large model to obtain the target response text. The prompt information is used to guide the large model to perform correction processing on the initial response text for the question text based on the first description text and the second description text.

[0113] According to an embodiment of the present disclosure, the generation module includes: a reference data determination submodule and an initial text determination submodule. The reference data determination submodule is used to determine target reference data from multiple reference data based on images and question texts. Each reference data includes an associated reference image, a reference question text, and a reference answer text, the reference image in the target reference data satisfies a first matching condition with the image, and the question text in the target reference data satisfies a second matching condition with the question text. The initial text determination submodule is used to determine the initial answer text based on the reference answer text in the target reference data.

[0114] According to an embodiment of the present disclosure, the first matching condition includes: the similarity between the reference image and the image in the target reference data is greater than or equal to a first threshold. The second matching condition includes: the similarity between the question text in the target reference data and the question text is greater than or equal to a second threshold.

[0115] According to an embodiment of the present disclosure, the initial text determination submodule includes: a second determination unit, configured to determine the initial response text according to the reference response text, semantic information for the image, and the question text.

[0116] According to an embodiment of the present disclosure, the first description text determination module includes: a first description text determination submodule, which is used to input the image into the image description model to obtain the first description text.

[0117] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, including at least one processor; and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned large model-based question and answer information generation method.

[0118] According to an embodiment of the present disclosure, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the above-mentioned large model-based question and answer information generation method.

[0119] According to an embodiment of the present disclosure, the present disclosure also provides a computer program product, including a computer program, which implements the above-mentioned large model-based question and answer information generation method when executed by a processor.

[0120] Figure 7 It is a block diagram of an electronic device for implementing the large model-based question-answer information generation method of an embodiment of the present disclosure. 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 may also represent various forms of mobile devices, such as personal digital processing, 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.

[0121] like Figure 7 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0122] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0123] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 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 701 performs the various methods and processes described above, such as a large model-based question and answer information generation method. For example, in some embodiments, the large model-based question and answer information generation method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the large model-based question and answer information generation method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to execute the large model-based question and answer information generation method in any other appropriate manner (eg, by means of firmware).

[0124] 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), complex 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.

[0125] 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.

[0126] 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 device, 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.

[0127] 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).

[0128] 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.

[0129] A computer system may include clients and servers. Clients and servers 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 to each other.

[0130] 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.

[0131] 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 spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for generating question and answer information based on a large model, comprising: generating an initial response text according to the question text and an image associated with the question text; Determining a first descriptive text for image content of the image; Determining a second description text for the object in the image; as well as According to the question text, the first description text and the second description text, the initial response text is modified based on a large model to obtain a target response text.

2. The method according to claim 1, wherein: The determining of a second description text for the object in the image comprises: Detecting the image using at least one detection operator to obtain at least one detection result corresponding to the at least one detection operator, each detection result including attribute information of at least one object of the same category; and The second description text is determined according to the attribute information of the object.

3. The method according to claim 2, wherein: The determining, according to the attribute information of the object, the second description text comprises: Determining an initial description text for describing the object according to the attribute information of the object; and Combining the initial description text with a predetermined text template to obtain the second description text; The predetermined text template includes at least one of the following: A prefix text to be set before the initial description text; A suffix text to be set after the initial description text; and Used to set the connecting text between two sub-texts in the initial description text.

4. The method according to claim 3, wherein: The determining, according to the attribute information of the object, an initial description text for describing the object comprises: According to the attribute information of the object, an introduction text matching the attribute information of the object is determined from a plurality of candidate introduction texts as the initial description text.

5. The method according to claim 2, wherein: Each detection operator is used to detect an object of a category; and determining a second description text for the object in the image further includes: detecting at least one category of objects contained in the image; and According to the at least one category, a candidate detection operator corresponding to the at least one category among multiple candidate detection operators is determined as the at least one detection operator.

6. The method according to claim 2, wherein: There are multiple detection operators, and the multiple detection operators are used to detect different object categories.

7. The method according to claim 1, wherein: The step of modifying the initial response text based on the large model according to the question text, the first description text and the second description text to obtain a target response text comprises: Determining input text according to the question text, the first description text, the second description text, the initial answer text and the prompt information; and Inputting the input text into the large model to obtain the target response text; The prompt information is used to guide the large model to modify the initial response text to the question text based on the first description text and the second description text.

8. The method according to claim 1, wherein: The step of generating an initial response text according to the question text and the image associated with the question text comprises: Determining target reference data from a plurality of reference data according to the image and the question text; wherein each reference data includes an associated reference image, a reference question text, and a reference answer text, the reference image in the target reference data and the image satisfy a first matching condition, and the question text in the target reference data and the question text satisfy a second matching condition; and The initial response text is determined according to the reference response text in the target reference data.

9. The method according to claim 8, wherein: The first matching condition includes: the similarity between the reference image in the target reference data and the image is greater than or equal to a first threshold; The second matching condition includes: the similarity between the question text in the target reference data and the question text is greater than or equal to a second threshold.

10. The method according to claim 8, wherein: The determining the initial response text according to the reference response text in the target reference data comprises: The initial response text is determined according to the reference response text, semantic information for the image and the question text.

11. The method according to claim 1, wherein: The determining of a first description text for the image content of the image comprises: The image is input into an image description model to obtain the first description text.

12. A device for generating question and answer information based on a large model, comprising: A generating module, used for generating an initial answer text according to the question text and an image associated with the question text; A first description text determination module, used to determine a first description text for the image content of the image; A second description text determination module, used to determine a second description text for the object in the image; as well as A correction module is used to correct the initial response text based on the large model according to the question text, the first description text and the second description text to obtain a target response text.

13. The device according to claim 12, wherein: The second description text determination module comprises: a first detection submodule, configured to detect the image using at least one detection operator to obtain at least one detection result corresponding to the at least one detection operator, each detection result including attribute information of at least one object of the same category; and The second description text determination submodule is used to determine the second description text according to the attribute information of the object.

14. The device according to claim 13, wherein: The second description text determination submodule includes: A first determining unit, configured to determine an initial description text for describing the object according to the attribute information of the object; and A combining unit, used for combining the initial description text with a predetermined text template to obtain the second description text; The predetermined text template includes at least one of the following: A prefix text to be set before the initial description text; A suffix text to be set after the initial description text; and Used to set the connecting text between two sub-texts in the initial description text.

15. The device according to claim 14, wherein: The first determining unit includes: The determination subunit is used to determine, based on the attribute information of the object, an introduction text that matches the attribute information of the object from a plurality of candidate introduction texts as the initial description text.

16. The device according to claim 13, wherein: Each detection operator is used to detect an object of a category; the second description text determination module also includes: A second detection submodule, configured to detect at least one category of objects contained in the image; and The operator determination submodule is used to determine, according to the at least one category, a candidate detection operator corresponding to the at least one category among multiple candidate detection operators as the at least one detection operator.

17. The device according to claim 13, wherein: There are multiple detection operators, and the multiple detection operators are used to detect different object categories.

18. The device according to claim 12, wherein: The correction module comprises: An input text determination submodule, used to determine the input text according to the question text, the first description text, the second description text, the initial answer text and the prompt information; and An input submodule, used for inputting the input text into the large model to obtain the target response text; The prompt information is used to guide the large model to modify the initial response text to the question text based on the first description text and the second description text.

19. The device according to claim 12, wherein: The generation module comprises: a reference data determination submodule, configured to determine target reference data from a plurality of reference data according to the image and the question text; wherein each reference data includes an associated reference image, a reference question text and a reference answer text, the reference image in the target reference data and the image satisfy a first matching condition, and the question text in the target reference data and the question text satisfy a second matching condition; and The initial text determination submodule is used to determine the initial response text according to the reference response text in the target reference data.

20. The device according to claim 19, wherein The first matching condition includes: the similarity between the reference image in the target reference data and the image is greater than or equal to a first threshold; The second matching condition includes: the similarity between the question text in the target reference data and the question text is greater than or equal to a second threshold.

21. The device according to claim 19, wherein The initial text determination submodule comprises: The second determining unit is used to determine the initial response text according to the reference response text, the semantic information of the image and the question text.

22. The device according to claim 12, wherein: The first description text determination module comprises: The first description text determination submodule is used to input the image into an image description model to obtain the first description text.

23. 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 executable 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 11.

24. 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 to 11.

25. 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 11.

Citation Information

Patent Citations

  • Image processing method and device, training method and device, electronic equipment and storage medium

    CN116385789A

  • Open type question and answer and multi-mode large model training method and device and related equipment

    CN117235232A

  • Text question and answer method, visual language model training method and related devices thereof

    CN117690144A

  • Image question and answer data acquisition method based on visual language large model

    CN117972053A

  • Active adaptation of networked compute devices using vetted reusable software components

    US20190171438A1

Cited By

  • Electronic data image text question and answer instruction generation method based on multi-modal large model

    CN119169641A

  • Multi-modal large model illusion suppression contrast description data generation method and device

    CN121686147A

  • Multimodal large model hallucination suppression contrast description data generation method and device

    CN121686147B

  • Question-and-answer interaction method, information processing method, electronic device, and readable storage medium

    WO2026143609A1