An image processing method and related apparatus

By employing a hierarchical generation and cross-validation approach, the accuracy and efficiency issues in generating VQA training data for multimodal large language models were addressed. This approach enabled efficient and low-cost training data generation, thereby improving the reliability and richness of the data.

CN123140201APending Publication Date: 2026-11-20BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510653847.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

In the current VQA training data generation, the data generated by the multimodal large language model contains factual or logical errors. The manual generation method is inefficient and costly, making it difficult to meet the needs of multiple business scenarios.

Method used

By acquiring prompt text and images, question-answer data pairs are generated using a multimodal large language model. The generation is hierarchical based on the difficulty of the question identifiers, and the accuracy of the answer data is ensured through cross-validation, including inputting the question data into a second multimodal large language model to generate answer data and compare similarity.

Benefits of technology

It improves the reliability and generation efficiency of training data, reduces the cost of manual intervention, enhances the richness and logic of multimodal large language model data, and reduces duplicate data and illusion phenomena.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123140201A_ABST
    Figure CN123140201A_ABST
Patent Text Reader

Abstract

The application discloses an image processing method and related device, and relates to the field of artificial intelligence. The image and the prompt text are input into the first multi-modal large language model, the first multi-modal large language model generates the question and answer data pair corresponding to each question mark according to the question mark corresponding question example text, each question and answer data pair includes the question data and the first answer data corresponding to the question data. Since the prompt text includes at least two question marks, each question mark corresponds to a question example text, the question mark is used to indicate the difficulty of the question mark corresponding question example text, and the question mark corresponding question example text includes reasoning content matched with the difficulty of the question mark, so that the multi-modal large language model can generate more logical data according to the difficulty indicated by the prompt text, the richness of the training data generated by the multi-modal large language model is improved, and the efficiency is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to an image processing method and related apparatus. Background Technology

[0002] Visual Question Answering (VQA) is an artificial intelligence task that combines computer vision and natural language processing. Its core goal is to enable machines to generate reasonable answers that conform to natural language rules based on input images and associated natural language questions. Currently, training data for VQA is typically generated using multimodal large language models or manually. When using multimodal large language models, images and prompts are input into the model, allowing it to freely ask and answer questions. This can lead to factual or logical errors in the generated training data, and some data may contain obvious illusions. While manual data generation by data labelers can ensure the accuracy of training data to some extent, it is time-consuming, labor-intensive, and inefficient. Summary of the Invention

[0003] In view of the above problems, this application provides an image processing method and related apparatus to improve the reliability and generation efficiency of training data. The specific solution is as follows:

[0004] The first aspect of this application provides an image processing method, comprising:

[0005] Obtain prompt text and images. The prompt text includes at least two question identifiers, each of which corresponds to a question example text. The question identifier is used to indicate the difficulty level of the question example text corresponding to the question identifier. The question example text corresponding to each question identifier includes reasoning content that matches the difficulty level of the question identifier.

[0006] The image and the prompt text are input into a first multimodal large language model, which generates a question-answer data pair corresponding to each question identifier based on the question example text corresponding to each question identifier. Each question-answer data pair includes question data and a first answer data corresponding to the question data.

[0007] In one possible implementation, the image processing method further includes:

[0008] At least one question data is extracted from the question-answer data pair, and the at least one question data and the image are input into the second multimodal large language model to obtain the second answer data for each question data;

[0009] Based on the similarity comparison results of the first and second answer data corresponding to the question data, determine whether the question data, the first answer data corresponding to the question data, and the second answer data corresponding to the question data are valid;

[0010] When it is determined that the question data, the first answer data corresponding to the question data, and the second answer data corresponding to the question data are valid, the first answer data or the second answer data corresponding to the question data is used as the target answer data corresponding to the question data, and the question data and the corresponding target answer data are output.

[0011] In one possible implementation, determining whether the question data, the first answer data, and the second answer data corresponding to the question data are valid based on the similarity comparison result of the first answer data and the second answer data corresponding to the question data includes:

[0012] If the similarity between the first answer data and the second answer data corresponding to the question data is greater than or equal to the similarity threshold, then the question data, the first answer data corresponding to the question data, and the second answer data corresponding to the question data are determined to be valid.

[0013] In one possible implementation, when there are at least two question-and-answer data pairs corresponding to the same image, the step of extracting at least one question data from the question-and-answer data pairs includes:

[0014] For the same image, extract the question data from the question-and-answer data pair corresponding to the question with the highest difficulty.

[0015] In one possible implementation, the prompt text includes a first question identifier, a second question identifier, and a third question identifier. The first question text example corresponding to the first question identifier indicates the generation of a question related to a target element in the image. The second question text example corresponding to the second question identifier indicates the generation of an integration question about multiple elements of the image. The third question text example corresponding to the third question identifier indicates the generation of a causal relationship question about the multiple elements in the image. The step of inputting the image and the prompt text into a first multimodal large language model, causing the first multimodal large language model to generate question-answer data pairs corresponding to each question identifier based on the question example text corresponding to that question identifier, includes:

[0016] The first multimodal large language model generates a direct question related to the target element in the image based on the first question text example, and generates the answer corresponding to the direct question to obtain a first question-answer data pair;

[0017] The first multimodal large language model generates an information integration question between the target element and other elements in the image based on the second question text example, and generates the answer corresponding to the information integration question to obtain a second question-answer data pair;

[0018] The first multimodal large language model generates causal relationship questions related to multiple elements indicated by the information integration question based on the third question text example, and generates answers corresponding to the causal relationship questions to obtain the third question-answer data pair.

[0019] In one possible implementation, the process of determining the target element in the first problem text example includes:

[0020] The image is processed to identify the elements present in the image;

[0021] The target element is determined based on the distinguishing features between the elements.

[0022] A second aspect of this application provides an image processing apparatus, comprising:

[0023] A data acquisition module is used to acquire prompt text and images. The prompt text includes at least two question identifiers, each question identifier corresponding to a sample question text. The question identifier indicates the difficulty level of the sample question text corresponding to the question identifier. The sample question text corresponding to each question identifier includes reasoning content that matches the difficulty level of the question identifier; and...

[0024] The data generation module is used to input the image and the prompt text into the first multimodal large language model, so that the first multimodal large language model generates a question-answer data pair corresponding to the question identifier based on the question example text corresponding to each question identifier. Each question-answer data pair includes question data and a first answer data corresponding to the question data.

[0025] A third aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the image processing method described in the first aspect or any implementation thereof.

[0026] A fourth aspect of this application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:

[0027] The memory is used to store computer programs;

[0028] The processor is used to execute the computer program so that the electronic device can implement the image processing method of the first aspect or any implementation thereof.

[0029] The fifth aspect of this application provides a computer storage medium carrying one or more computer programs, which, when executed by an electronic device, enable the electronic device to implement the image processing method described in the first aspect or any implementation thereof.

[0030] By employing the above technical solution, the image processing method provided in this application, through inputting images and prompt text into a first multimodal large language model, enables the first multimodal large language model to generate question-answer data pairs corresponding to each question identifier based on the question example text corresponding to each question identifier. Each question-answer data pair includes question data and a first answer data corresponding to the question data. Since the prompt text includes at least two question identifiers, each question identifier corresponding to a question example text, and the question identifier indicating the difficulty level of the question example text, and each question example text including reasoning content matching the difficulty level of the question identifier, the multimodal large language model can generate more logical data based on the difficulty level indicated by the prompt text. This improves the richness of the training data generated by the multimodal large language model and is more efficient than manual generation methods. Attached Figure Description

[0031] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0032] Figure 1 An architecture diagram of an image processing system provided in this application;

[0033] Figure 2 An architecture diagram of a terminal provided in this application;

[0034] Figure 3 An architecture diagram of a server provided for this application;

[0035] Figure 4 A flowchart of an image processing method provided in this application;

[0036] Figure 5 An example image of an input image provided for this application;

[0037] Figure 6 This application provides an illustration of the application process of an image processing method.

[0038] Figure 7 An architectural diagram of an image processing apparatus provided in this application;

[0039] Figure 8 An architecture diagram of an electronic device provided in this application. Detailed Implementation

[0040] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.

[0041] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0042] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0043] See Figure 1 , Figure 1 A schematic diagram of an image processing system architecture is shown. The system may include a terminal 100 and a server 200. The server 200 may include one or more servers (…). Figure 1 (The example includes a server), and the server 200 can provide the image processing method provided in the embodiments of this application to one or more terminals.

[0044] The terminal 100 may have an application for generating training data installed. The application and webpage can provide an interface. The terminal 100 can receive prompt text and images entered by the user on the training data generation interface and send the prompt text and images to the server 200. The server 200 can obtain the processing result based on the received parameters and return the processing result to the terminal 100.

[0045] It should be understood that in some optional implementations, the terminal 100 can also complete the action of obtaining the processing result based on the received parameters on its own, without the need for the server to cooperate. This application embodiment is not limited to this.

[0046] The following description Figure 1The product form of the mid-terminal 100;

[0047] The terminal 100 in this application embodiment can be a mobile phone, tablet computer, wearable device, vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc., and this application embodiment does not impose any restrictions on it.

[0048] Figure 2 A schematic diagram of an optional hardware structure for terminal 100 is shown.

[0049] refer to Figure 2 As shown, the terminal 100 may include a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), a microphone 162 (optional), a headphone jack 163 (optional), a processor 170, an external interface 180, a power supply 190, and other components. Those skilled in the art will understand that... Figure 2 These are merely examples of terminals or multi-functional devices and do not constitute a limitation on terminals or multi-functional devices. They may include more or fewer components than shown in the illustration, or combine certain components, or use different components.

[0050] The input unit 130 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the portable multi-functional device. Specifically, the input unit 130 may include a touchscreen 131 (optional) and / or other input devices 132. The touchscreen 131 can collect touch operations performed by the user on or near it (such as operations performed by the user using fingers, knuckles, styluses, or any suitable object on or near the touchscreen), and drive the corresponding connection devices according to a pre-set program. The touchscreen can detect the user's touch actions, convert the touch actions into touch signals and send them to the processor 170, and can receive and execute commands sent by the processor 170; the touch signal includes at least touch point coordinate information. The touchscreen 131 can provide an input interface and an output interface between the terminal 100 and the user. In addition, various types of touchscreens, such as resistive, capacitive, infrared, and surface acoustic wave, can be used to implement the touchscreen. Besides the touchscreen 131, the input unit 130 may also include other input devices. Specifically, other input devices 132 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.

[0051] Among them, the input device 132 can receive input data, etc.

[0052] The display unit 140 can be used to display information input by the user or information provided to the user, various menus of the terminal 100, interactive interfaces, file display, and / or playback of any multimedia file. In this embodiment, the display unit 140 can be used to display the interface for generating training data, processing results, etc.

[0053] The memory 120 can be used to store instructions and data. The memory 120 may primarily include an instruction storage area and a data storage area. The data storage area can store various types of data, such as multimedia files and text. The instruction storage area can store software units such as operating systems, applications, and instructions required for at least one function, or subsets or extended sets thereof. It may also include non-volatile random access memory. It provides the processor 170 with hardware, software, and data resources for managing the computing device, supporting control software and applications. It is also used for storing multimedia files, as well as storing running programs and applications.

[0054] The processor 170 is the control center of the terminal 100. It connects various parts of the terminal 100 via various interfaces and lines. By running or executing instructions stored in the memory 120 and calling data stored in the memory 120, it performs various functions and processes data of the terminal 100, thereby controlling the terminal device as a whole. Optionally, the processor 170 may include one or more processing units; preferably, the processor 170 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 170. In some embodiments, the processor and memory can be implemented on a single chip; in some embodiments, they can also be implemented separately on independent chips. The processor 170 can also be used to generate corresponding operation control signals, send them to the corresponding components of the computing processing device, read and process data in the software, especially read and process data and programs in the memory 120, so that the various functional modules therein perform corresponding functions, thereby controlling the corresponding components to act according to the instructions.

[0055] The memory 120 can be used to store software code related to the image processing method, and the processor 170 can execute the steps of the image processing method, and can also schedule other units (such as the input unit 130 and the display unit 140 mentioned above) to achieve the corresponding functions.

[0056] The radio frequency unit 110 (optional) can be used for receiving and transmitting signals during information transmission or calls. For example, it can receive downlink information from the base station and process it for the processor 170; additionally, it can transmit uplink data to the base station. Typically, the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, the radio frequency unit 110 can also communicate wirelessly with network devices and other devices. This wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0057] In this embodiment of the application, the radio frequency unit 110 can send prompt text and image data to the server 200 and receive the processing results sent by the server 200.

[0058] It should be understood that the radio frequency unit 110 is optional and can be replaced with other communication interfaces, such as a network port.

[0059] The terminal 100 also includes a power supply 190 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 170 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.

[0060] Terminal 100 also includes an external interface 180, which can be a standard Micro USB interface or a multi-pin connector, and can be used to connect terminal 100 to other devices for communication, or to connect a charger to charge terminal 100.

[0061] Although not shown, terminal 100 may also include a flash, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with various functions, etc., which will not be described in detail here. Some or all of the methods described below can be applied to, for example... Figure 2 In the terminal 100 shown.

[0062] The following description Figure 1 The product form of the mid-range server 200;

[0063] Figure 3 A structural diagram of a server 200 is provided, as follows: Figure 3 As shown, server 200 includes bus 201, processor 202, communication interface 203, and memory 204. Processor 202, memory 204, and communication interface 203 communicate with each other via bus 201.

[0064] Bus 201 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 3 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0065] The processor 202 can be any one or more of the following processors: central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP).

[0066] Memory 204 may include volatile memory, such as random access memory (RAM). Memory 204 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0067] The memory 204 can be used to store software code related to the image processing method, and the processor 202 can execute the steps of the chip's image processing method, and can also schedule other units to achieve corresponding functions.

[0068] It should be understood that the aforementioned terminal 100 and server 200 can be centralized or distributed devices. The processors (e.g., processor 170 and processor 202) in the aforementioned terminal 100 and server 200 can be hardware circuits (such as application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), general-purpose processors, digital signal processors (DSPs), microprocessors or microcontrollers, etc.) or combinations of these hardware circuits. For example, the processor can be a hardware system with instruction execution capabilities, such as a CPU or DSP, or a hardware system without instruction execution capabilities, such as an ASIC or FPGA, or a combination of the aforementioned hardware systems without instruction execution capabilities and hardware systems with instruction execution capabilities.

[0069] Currently, VQA training data production solutions for related businesses mainly fall into the following two categories:

[0070] 1. Multimodal large model production: Input business data images, fix the prompt (prompt text), and let the model play freely, asking and answering questions about the images.

[0071] 2. Manual production mainly consists of two methods:

[0072] Non-interactive production: Business images are distributed to different data annotators, who then ask valuable questions about the images based on their own understanding and answer those questions. There is no interaction between the data annotators.

[0073] Interactive production: Business images are distributed to different data annotators. The data annotators only ask questions about the images. After the questions are asked, these images and questions will be passed on to different data annotators. That is, after a question is asked, it will be answered by someone else.

[0074] The above solution has obvious flaws:

[0075] The data generated by multimodal large models may contain factual or logical errors, and some data may contain obvious illusions. In addition, the results of free-flowing multimodal large models may lead to excessive similarity in the content and style of question-answer pairs, thereby limiting the trained model's understanding of business scenarios and making it difficult to unleash the model's capabilities.

[0076] While manual data production can ensure accuracy and richness, it is time-consuming, labor-intensive, and very costly, making it unsuitable for data needs across multiple business scenarios.

[0077] To address the aforementioned problems, embodiments of this application provide an image processing method. The image processing method of this application embodiment will be described in detail below with reference to the accompanying drawings.

[0078] Reference Figure 4 , Figure 4 This is a flowchart illustrating an image processing method provided in an embodiment of this application, such as... Figure 4 As shown in the embodiment of this application, an image processing method may include steps 401 to 402, which are described in detail below.

[0079] 401. Obtain prompt text and image, wherein the prompt text includes at least two question identifiers, each question identifier corresponds to a question example text, the question identifier is used to indicate the difficulty level of the question example text corresponding to the question identifier, and the question example text corresponding to each question identifier includes reasoning content that matches the difficulty level of the question identifier.

[0080] In one embodiment, the multimodal large language model is based on a large language model, incorporating other non-textual modal information, such as images. Here, a multimodal large language model that generates content based on prompt text and images can be used. The prompt text guides the multimodal large language model to process the images, obtaining corresponding question-and-answer data pairs for the images.

[0081] To improve the reliability of question-and-answer data pairs and enable the data to cover more dimensions, addressing the lack of richness and diversity in multimodal large language models, the prompt text used may include: at least two question identifiers, each corresponding to a sample question text. The question identifiers indicate the difficulty level of each question, and the sample question text for each identifier indicates the inference content that matches the difficulty level of the question identifier. This allows the first multimodal large language model to sequentially ask and answer questions about images based on the difficulty level of each question identifier, in ascending order of difficulty, according to the corresponding inference content, resulting in multiple question-and-answer data pairs.

[0082] For example, a multimodal large language model can be used to generate question-answer pairs in ascending order of difficulty. The prompt text can then provide corresponding examples of different difficulty levels, specifying the expected data and the content of the question for each level. For instance, the prompt text might look like this:

[0083] “

[0084] You are a zoology expert, and you need to formulate three types of questions based on the images: basic, intermediate, and top-level questions. The difficulty increases from easy to hard. Below are introductions and examples of the three types of questions:

[0085] Underlying questions: For images, generate simple and direct questions, usually about obvious elements in the image. For example, "What animal is this?"

[0086] Mid-level problems: Design problems involving the integration of information from multiple parts of an image. For example, "In this photo, is the dog up in the tree or under it?"

[0087] Top-level questions: These pose questions about causality, requiring reasoning about the sequence of events or outcomes in an image. For example, "Why is this dog in this location?"

[0088] Provide your answer to the question you designed, along with your reasoning.

[0089] "

[0090] The low-level, mid-level, and high-level questions are labeled with their corresponding question identifiers, and their corresponding content is the example text. The example text indicates the regions of the image that need to be processed, such as the most obvious regions (e.g.,...). Figure 5 The example question (showing a puppy in a picture) provides the desired question content. The initial text of the above prompt is the test requirement text, which comprehensively indicates the difficulty level of the questions, further improving the accuracy of the large language model's generation.

[0091] 402. Input the image and prompt text into the first multimodal large language model, so that the first multimodal large language model generates question-answer data pairs corresponding to each question identifier based on the question example text corresponding to each question identifier. Each question-answer data pair includes question data and first answer data corresponding to the question data.

[0092] In one embodiment, based on the aforementioned prompt text, the first multimodal large language model can generate question-answer data pairs according to the question identifiers and corresponding question text examples. Specifically, the prompt text may include multiple question identifiers and corresponding question text examples. For example, using three question identifiers and three question text examples, the first question text example corresponding to the first question identifier indicates the generation of a question related to a target element in the image; the second question text example corresponding to the second question identifier indicates the generation of a question integrating multiple elements of the image; and the third question text example corresponding to the third question identifier indicates the generation of a question about the causal relationship between multiple elements in the image. Still using... Figure 5 For example, the image in the image,

[0093] The first multimodal large language model generates direct questions related to target elements in the image based on the first question text example, and generates answers corresponding to the direct questions, thus obtaining the first question-answer data pair. Here, the target elements are elements in the image that are significantly different from other regions, i.e., the most obvious elements in the image, such as... Figure 5 The puppy shown in the picture.

[0094] The first multimodal large language model generates an information integration question between the target element in the image and other elements based on the second question text example, and generates the corresponding answer to the information integration question, thus obtaining the second question-answer data pair.

[0095] The first multimodal large language model generates causal relationship questions related to multiple elements indicated by the information integration question based on the text example of the third question, and generates the answers corresponding to the causal relationship questions, thus obtaining the third question-answer data pair.

[0096] For example, for the input image as Figure 5 When the image shown is displayed, the resulting question-and-answer data pairs are:

[0097] Q: What kind of animal is this?

[0098] A: This is a Golden Retriever (also known as a Golden Retriever). This breed is known for its gentle and friendly temperament and is considered an ideal family pet. Golden Retrievers have a thick, double-layered golden coat, giving them a distinctive appearance. They are very intelligent and easy to train, and are often used as guide dogs, search and rescue dogs, and companion dogs. Furthermore, Golden Retrievers are active and energetic, enjoy outdoor activities (such as swimming and chasing games), and require regular exercise and appropriate socialization to maintain their health.

[0099] Q: In this photo, is the dog up in the tree or under the tree?

[0100] A: In this photo, the golden retriever is under a tree in the forest. It is standing on the ground, surrounded by several trees.

[0101] Q: Why is this dog in this spot?

[0102] A: Possible reasons include: Walk or exercise: Golden Retrievers love natural environments (such as forests and meadows) and may be following their owner. Exploration and curiosity: Naturally curious, they may be exploring new smells or sights in the forest. Play pause: They may be pausing during play or waiting for their owner's command. Rest or shade: Forests provide shade, and dogs may be resting and seeking respite from the heat. Emotional calming: The natural environment may help relieve anxiety or stress.

[0103] It should be noted that those skilled in the art can design and adjust the hierarchical questions in the above prompt text from easy to difficult as needed, which will not be elaborated here.

[0104] To improve the accuracy of target element identification in the first question text example and thus enhance the quality of subsequently generated question-and-answer data pairs, the process of determining the target element in the first question text example may specifically include:

[0105] Step 11: Perform recognition processing on the image to determine the elements present in the image.

[0106] Firstly, it can guide a multimodal large language model to identify elements in an image. This identification can be the recognition of the types of elements present in the image, for example... Figure 5 The image shown depicts a dog standing in a jungle, revealing that the elements in the image include both animals and plants.

[0107] Step 12: Determine the target element based on the distinguishing features between elements.

[0108] Based on the elements obtained in the image above, the target element can be identified according to the distinguishing features between the elements. Obviously, the animal type element (i.e., the puppy) is the main element in the image, while the plant type element (i.e., the jungle) is the background element in the image. Obviously, the puppy should be regarded as the target element.

[0109] As can be seen from the above, this image processing method, by using question labels that indicate the level of difficulty and corresponding question text examples, guides the multimodal large language model to generate question-answer data pairs. This enables the multimodal large language model to generate question-answer data pairs for questions such as directly visible elements in the image, information integration, and causal relationships. This not only reduces manual intervention and lowers the production cost of business training data, but also improves the richness and logic of the data produced by the multimodal large language model.

[0110] In some embodiments, the content of the comparison with the currently used conventional prompt text is as follows:

[0111] “

[0112] Your role: You are an expert skilled at designing and answering questions based on various images. You will need to design questions for each image using a human-like dialogue style and provide detailed answers. I will provide images and sample questions. Please refer to the sample questions and design a three-round question-and-answer dialogue based on the image content.

[0113] Input: An image, example problem.

[0114] Example information:

[0115] Q1: What kind of animal is this?

[0116] A1: This is a dog.

[0117] Q2: What breed is this dog?

[0118] A2: This dog is a Golden Retriever.

[0119] Q3: Why is this dog here?

[0120] A3: Perhaps his owner is jogging nearby.

[0121] Output format:

[0122] {{

[0123] "q1": "<Question 1>",

[0124] "a1": "<Answer 1>",

[0125] "q2": "<Question 2>",

[0126] a2: "<Answer 2>", ...

[0128] }}

[0129] It can be seen that although the prompt text provides examples of question-and-answer data pairs (which correspond to...), the actual data pairs provided are based on... Figure 5 The image generation shown can also guide a multimodal large language model to generate corresponding question-and-answer data pairs based on the example content of the input image, thus obtaining three question-and-answer data pairs. However, this guidance method, which does not provide indications of difficulty, allows the multimodal large model to play freely, which may result in question-and-answer pairs that are too similar in content and style. This limits the trained model's understanding of business scenarios, makes it difficult to stimulate the model's capabilities, and is prone to factual or logical errors. Furthermore, some data may contain obvious illusions, thereby reducing the reliability of the generated data.

[0130] It is understood that those skilled in the art can select and adjust the number of question-and-answer data pairs as needed, and no restrictions are imposed here.

[0131] In another embodiment, to make the obtained question-answer data pairs more accurate and reliable, based on obtaining multiple question-answer data pairs from the first multimodal large language model, the image processing method further includes the following processing steps:

[0132] 501. Extract at least one question data from the question-answer data pair, and input at least one question data and the image into the second multimodal large language model to obtain the second answer data for each question data.

[0133] In one embodiment, considering that current multimodal large language models are already capable of generating relatively accurate answers for simple questions, and given that the question-and-answer data can be generated progressively according to the difficulty of the questions, it is possible to extract question data (such as the question data in the third question-and-answer data pair in the above embodiment) from relatively difficult question-and-answer data pairs. This question data, along with the image, can then be input into the second multimodal large language model to generate the answer data.

[0134] It is understood that those skilled in the art can select and adjust the amount of question data extracted as needed, which will not be elaborated here.

[0135] 502. Based on the similarity comparison results of the first and second answer data corresponding to the question data, determine whether the question data, the first answer data corresponding to the question data, and the second answer data corresponding to the question data are valid.

[0136] 503. When it is determined that the question data, the corresponding first answer data, and the corresponding second answer data are valid, the first or second answer data corresponding to the question data is taken as the target answer data corresponding to the question data, and the question data and the corresponding target answer data are output. That is, when it is verified that both the question data and the two answer data corresponding to the question data are valid, a set can be randomly selected and added to the training data, thereby reducing the number of duplicate data in the training data and improving the accuracy and reliability of the training data. Of course, those skilled in the art can also use other integration methods to integrate the two sets of valid question-answer data mentioned above, which will not be elaborated here.

[0137] In one embodiment, each extracted question data corresponds to a first answer data and a second answer data, where the first answer data is the answer data obtained from a first multimodal large language model, and the second answer data is the answer data obtained from a second multimodal large language model. The validity of the question-answer data pair is determined by comparing the similarity between the first and second answer data. Taking a question-answer data pair obtained from the prompt text and image in the above embodiment as an example, the question data is extracted and fed together with the image into the second multimodal large language model to generate answer data. The validity of the question-answer data pair obtained from the first multimodal large language model is determined by comparing the similarity between the two answer data. When performing the similarity comparison, ROUGE (Recall-Oriented Understudy for Gisting Evaluation), an indicator used to evaluate the similarity between automatically generated text and reference text, can be used to compare the similarity between the two answer data.

[0138] When the number of extracted question data is two or more, it can be judged as valid if the similarity comparison results of the two answer data for each question data are both valid.

[0139] It is understood that those skilled in the art can select and adjust the quantity of the extracted question data and the similarity judgment method as needed, which will not be elaborated here.

[0140] The verification process in the above embodiment involves inputting question data and corresponding images generated by one multimodal large language model into another multimodal large language model to generate question-answer data pairs. The generated results are then verified by comparing the response data output by the two multimodal large language models. Verified question-answer data pairs can be used as training data, while unverified pairs are placed in a waiting pool for subsequent manual verification. This not only effectively reduces manual labor and improves generation efficiency, thereby lowering the production cost of business training data, but also enhances the accuracy and logical consistency of multimodal large language model data production.

[0141] In one embodiment, to facilitate the comparison of the similarity between two answer data outputs from two multimodal large language models, the determination of the validity of at least one question-answer data pair based on the similarity comparison results of the first and second answer data for each question data may specifically include:

[0142] If the similarity between the first and second answers to each question is greater than or equal to the similarity threshold, then at least one question-answer pair is determined to be valid.

[0143] Taking the ROUGE metric as an example, if the metric for the first and second response data is greater than or equal to the metric threshold (e.g., 0.8), then the two response data can be determined to be quite similar, and the response data is considered valid and can be used as subsequent training data.

[0144] In some embodiments, to reduce subsequent validity verification time and improve the efficiency of training data generation, when the number of question-answer data pairs is not less than two, at least one question data is extracted from at least one question-answer data pair, including:

[0145] Based on the question identifiers in the prompt text indicating the difficulty level of generating question data, the target question data corresponding to the target question identifier is used as the question data. The target question identifier is the question identifier that indicates the highest difficulty level for generating question data.

[0146] For example, for the above prompt text, the question identifier Q3 is the highest difficulty question identifier. Then, the question data in the subsequent question-answer data pairs and the question-answer data pairs corresponding to Q3 can be extracted and input into the second multimodal large language model to generate the answer data.

[0147] As a specific application of the above image processing method, refer to Figure 6 As shown, the image processing method can specifically include the following processes:

[0148] The prompt text and image are input into the first multimodal large language model (i.e., multimodal large language model-1) to generate question-answer data pairs. The prompt text is configured in a hierarchical design from easy to difficult, as shown in the previous embodiment. Then, the question and image from the top-level question-answer data pair (i.e., the most difficult question-answer data pair) are extracted and input into the second multimodal large language model (i.e., multimodal large language model-2) for answering. The two answer data are then cross-validated. If the similarity value is greater than the similarity threshold, one of the two answer data is randomly selected and paired with the question data to form a question-answer data pair as training data. If the similarity value is not greater than the similarity threshold, it is placed in a waiting pool for subsequent manual confirmation.

[0149] The above describes an image processing method provided by an embodiment of this application. The following describes the apparatus for performing the above image processing method.

[0150] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this application. Figure 7 As shown, the image processing apparatus includes:

[0151] The data acquisition module 701 is used to acquire prompt text and images. The prompt text includes at least two question identifiers, each corresponding to a sample question text. The question identifiers indicate the difficulty level of the sample question text corresponding to the question identifier. The sample question text corresponding to each question identifier includes reasoning content that matches the difficulty level of the question identifier; and...

[0152] The data generation module 702 is used to input images and prompt text into the first multimodal large language model, so that the first multimodal large language model generates question-answer data pairs corresponding to each question identifier based on the question example text corresponding to each question identifier. Each question-answer data pair includes question data and first answer data corresponding to the question data.

[0153] In one possible implementation, it also includes: a cross-validation module for extracting at least one question data from the question-answer data pair, and inputting at least one question data and an image into a second multimodal large language model to obtain second answer data for each question data;

[0154] Based on the similarity comparison results of the first and second answer data corresponding to the question data, determine whether the question data, the first answer data corresponding to the question data, and the second answer data corresponding to the question data are valid.

[0155] Once it is determined that the question data, the corresponding first answer data, and the corresponding second answer data are valid, the first answer data or the second answer data corresponding to the question data is taken as the target answer data corresponding to the question data, and the question data and the corresponding target answer data are output.

[0156] In one possible implementation, the cross-validation module determines the validity of the question data, the corresponding first answer data, and the corresponding second answer data based on the similarity comparison results of the first and second answer data corresponding to the question data. This process includes:

[0157] If the similarity between the first and second answer data corresponding to the question data is greater than or equal to the similarity threshold, then the question data, the first answer data corresponding to the question data, and the second answer data corresponding to the question data are determined to be valid.

[0158] In one possible implementation, when there are at least two question-answer pairs corresponding to the same image, the process by which the cross-validation module extracts at least one question from the question-answer pairs includes:

[0159] For the same image, extract the question data from the question-and-answer data pair corresponding to the question with the highest difficulty.

[0160] In one possible implementation, the prompt text includes a first question identifier, a second question identifier, and a third question identifier. The first question text example corresponding to the first question identifier indicates the generation of a question related to a target element in the image; the second question text example corresponding to the second question identifier indicates the generation of a question integrating multiple elements of the image; and the third question text example corresponding to the third question identifier indicates the generation of a question about causal relationships between multiple elements in the image. The data generation module 702 inputs the image and the prompt text into a first multimodal large language model, enabling the first multimodal large language model to generate question-answer data pairs corresponding to each question identifier based on the question example text. This process includes:

[0161] The first multimodal large language model generates direct questions related to target elements in the image based on the first question text example, and generates answers corresponding to the direct questions to obtain the first question-answer data pair;

[0162] The first multimodal large language model generates an information integration question between the target element in the image and other elements based on the second question text example, and generates the answer corresponding to the information integration question to obtain the second question-answer data pair;

[0163] The first multimodal large language model generates causal relationship questions related to multiple elements indicated by the information integration question based on the text example of the third question, and generates the answers corresponding to the causal relationship questions, thus obtaining the third question-answer data pair.

[0164] In one possible implementation, the process of determining the target element in the first problem text example in data generation module 702 includes:

[0165] The image is processed to identify the elements present in the image;

[0166] The target element is determined based on the distinguishing features between the elements.

[0167] This application also provides an electronic device in its embodiments. (See reference...) Figure 8 The diagram illustrates a structural schematic suitable for implementing the electronic device in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 8 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0168] like Figure 8 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. When the electronic device is powered on, the RAM 803 also stores various programs and data required for the operation of the electronic device. The processing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0169] Typically, the following devices can be connected to I / O interface 805: input devices 806 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 807 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 808 including, for example, memory cards, hard drives, etc.; and communication devices 809. Communication device 809 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 8 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have instead.

[0170] This application also provides a computer program product, including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the image processing methods provided in this application.

[0171] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the image processing methods provided in this application.

[0172] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0173] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0174] In the above embodiments, the implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, in the form of a computer program product.

[0175] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. An image processing method, characterized in that, include: Obtain prompt text and images. The prompt text includes at least two question identifiers, each of which corresponds to a question example text. The question identifier is used to indicate the difficulty level of the question example text corresponding to the question identifier. The question example text corresponding to each question identifier includes reasoning content that matches the difficulty level of the question identifier. The image and the prompt text are input into a first multimodal large language model, which generates a question-answer data pair corresponding to each question identifier based on the question example text corresponding to each question identifier. Each question-answer data pair includes question data and a first answer data corresponding to the question data.

2. The image processing method according to claim 1, characterized in that, Also includes: At least one question data is extracted from the question-answer data pair, and the at least one question data and the image are input into the second multimodal large language model to obtain the second answer data for each question data; Based on the similarity comparison results of the first and second answer data corresponding to the question data, determine whether the question data, the first answer data corresponding to the question data, and the second answer data corresponding to the question data are valid; When it is determined that the question data, the first answer data corresponding to the question data, and the second answer data corresponding to the question data are valid, the first answer data or the second answer data corresponding to the question data is used as the target answer data corresponding to the question data, and the question data and the corresponding target answer data are output.

3. The image processing method according to claim 2, characterized in that, The step of determining whether the question data, the first answer data, and the second answer data corresponding to the question data are valid based on the similarity comparison result of the first answer data and the second answer data corresponding to the question data includes: If the similarity between the first answer data and the second answer data corresponding to the question data is greater than or equal to the similarity threshold, then the question data, the first answer data corresponding to the question data, and the second answer data corresponding to the question data are determined to be valid.

4. The image processing method according to claim 2 or 3, characterized in that, When there are at least two question-and-answer data pairs corresponding to the same image, the step of extracting at least one question data from the question-and-answer data pairs includes: For the same image, extract the question data from the question-and-answer data pair corresponding to the question with the highest difficulty.

5. The image processing method according to claim 1, characterized in that, The prompt text includes a first question identifier, a second question identifier, and a third question identifier. The first question text example corresponding to the first question identifier indicates the generation of a question related to a target element in the image. The second question text example corresponding to the second question identifier indicates the generation of an integration question about multiple elements in the image. The third question text example corresponding to the third question identifier indicates the generation of a question about the causal relationship between multiple elements in the image. The step of inputting the image and the prompt text into a first multimodal large language model, so that the first multimodal large language model generates a question-answer data pair corresponding to each question identifier based on the question example text corresponding to each question identifier, includes: The first multimodal large language model generates a direct question related to the target element in the image based on the first question text example, and generates the answer corresponding to the direct question to obtain a first question-answer data pair; The first multimodal large language model generates an information integration question between the target element and other elements in the image based on the second question text example, and generates the answer corresponding to the information integration question to obtain a second question-answer data pair; The first multimodal large language model generates causal relationship questions related to multiple elements indicated by the information integration question based on the third question text example, and generates answers corresponding to the causal relationship questions to obtain the third question-answer data pair.

6. The image processing method according to claim 5, characterized in that, The process of determining the target element in the first problem text example includes: The image is processed to identify the elements present in the image; The target element is determined based on the distinguishing features between the elements.

7. An image processing apparatus, characterized in that, include: The data acquisition module is used to acquire prompt text and images. The prompt text includes at least two question identifiers, each of which corresponds to a question example text. The question identifier is used to indicate the difficulty level of the question example text corresponding to the question identifier. The question example text corresponding to each question identifier includes reasoning content that matches the difficulty level of the question identifier. as well as, The data generation module is used to input the image and the prompt text into the first multimodal large language model, so that the first multimodal large language model generates a question-answer data pair corresponding to the question identifier based on the question example text corresponding to each question identifier. Each question-answer data pair includes question data and a first answer data corresponding to the question data.

8. A computer program product, characterized in that, It includes computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the image processing method as described in any one of claims 1 to 6.

9. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to enable the electronic device to implement the image processing method as described in any one of claims 1 to 6.

10. A computer storage medium, characterized in that, The storage medium carries one or more computer programs that, when executed by an electronic device, enable the electronic device to implement the image processing method as described in any one of claims 1 to 6.