Model training method, data processing method, system, electronic device, storage medium and computer program product
By training a visual language model using reinforcement learning, and combining it with a visual document library and retrieval tools, the problem of lost visual features in multimodal models was solved, achieving higher inference accuracy and completeness.
Patent Information
- Application Number
- CN202510680317.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2026-11-24
AI Technical Summary
Existing multimodal models lose visual features during the retrieval enhancement generation process, resulting in poor inference accuracy and completeness.
By using reinforcement learning training methods and leveraging visual document libraries and retrieval tools, an initial visual language model is trained to generate a target visual language model. The model is capable of performing retrieval interaction actions, visual perception actions, and answer generation actions, and can fully understand multimodal requests.
It improves the model's reasoning completeness and accuracy when handling multimodal requests, and enhances visual perception capabilities and reasoning performance.
Smart Images

Figure CN123159442A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of artificial intelligence technology and data processing technology, and more specifically, to a model training method, a data processing method, a system, an electronic device, a storage medium, and a computer program product. Background Technology
[0002] In application scenarios, retrieval enhancement techniques are increasingly being used in multimodal models, especially visual-language models. However, in the multimodal retrieval enhancement generation process of related technologies, the text in the input image is usually recognized and converted into text, and then text-based retrieval enhancement generation is performed on the input text and the converted text corresponding to the image. However, the above approach results in incomplete information understanding during the model's inference process, limiting the model's inference performance and leading to poor accuracy or completeness of the generated results.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This application provides a model training method, a data processing method, a system, an electronic device, a storage medium, and a computer program product to at least solve the technical problem in related technologies where model training methods lose visual features, resulting in poor model inference accuracy and completeness.
[0005] According to one aspect of the embodiments of this application, a model training method is provided, comprising: acquiring training data, wherein the training data includes multimodal requests; performing reinforcement learning training on an initial visual language model based on the training data to obtain a target visual language model; wherein the initial visual language model is used to make inference decisions on multimodal requests based on a reinforcement learning environment to obtain a sequence of inference actions, and to generate inference answers using the sequence of inference actions, wherein the reinforcement learning environment is constructed through a visual document library and a retrieval tool, and the action types corresponding to the sequence of inference actions include: retrieval interaction actions, visual perception actions, and answer generation actions.
[0006] According to another aspect of the embodiments of this application, a data processing method is also provided, including: acquiring an input request; using a target visual language model to perform reasoning and decision-making on the input request to generate a target answer; wherein the target visual language model is generated according to the model training method of any one of the above.
[0007] According to another aspect of the embodiments of this application, a data processing method is also provided, including: obtaining a visual document request; using a target visual language model to perform reasoning and decision-making on the visual document request to obtain a target answer; wherein the target visual language model is generated according to the model training method of any one of the above.
[0008] According to another aspect of the embodiments of this application, a data processing method is also provided, comprising: obtaining a data processing request through a first application programming interface, wherein the request data carried in the data processing request includes: an input request; and returning a data processing response through a second application programming interface, wherein the response data carried in the data processing response includes: a target answer, wherein the target answer is obtained by reasoning and making decisions on the input request using a target visual language model, and the target visual language model is generated according to the model training method of any one of the above.
[0009] According to another aspect of the embodiments of this application, a data processing method is also provided, comprising: acquiring a currently input data processing dialogue request, wherein the request data carried in the data processing dialogue request includes: an input request; responding to the data processing dialogue request and returning a data processing dialogue response, wherein the information carried in the data processing dialogue response includes: a target answer, wherein the target answer is obtained by reasoning and making decisions on the input request using a target visual language model, and the target visual language model is generated according to any of the above model training methods; and displaying the target answer in a graphical user interface.
[0010] According to another aspect of the embodiments of this application, a data processing method is also provided, including: responding to an input instruction applied to an operation interface and displaying an input request on the operation interface; responding to a processing instruction applied to the operation interface and displaying a target answer on the operation interface; wherein the target answer is obtained by reasoning and making a decision on the input request using a target visual language model, and the target visual language model is generated according to the model training method of any one of the above.
[0011] According to another aspect of the embodiments of this application, a data processing system is also provided, including: a client for sending an input request; a server connected to the client for using a target visual language model to perform reasoning and decision-making on the input request to obtain a target answer; the client is also used to output the target answer; wherein the target visual language model is generated according to the model training method of any one of the above.
[0012] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the model training method or the data processing method of any of the above-mentioned methods when it runs.
[0013] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to execute the model training method or the data processing method of any of the above-mentioned methods.
[0014] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the model training method or the data processing method of any of the above-mentioned methods.
[0015] In this embodiment, training data is acquired, including multimodal requests. Further, based on the training data, an initial visual language model is trained using reinforcement learning to obtain a target visual language model. The initial visual language model is used to make inference decisions on multimodal requests based on a reinforcement learning environment to obtain a sequence of inference actions, and to generate inference answers using the sequence of inference actions. The reinforcement learning environment is constructed using a visual document library and retrieval tools. The action types corresponding to the sequence of inference actions include: retrieval interaction actions, visual perception actions, and answer generation actions.
[0016] It is noteworthy that, in the embodiments of this application, the initial visual language model and the target visual language model are capable of completing retrieval interaction actions, visual perception actions, and answer generation actions during the reasoning process. In other words, the visual language model to be trained not only possesses retrieval enhancement generation capabilities but also performs visual perception of the multimodal data involved in reasoning, fully considering visual features beyond traditional language and text features. This enables the trained target visual language model to fully and comprehensively understand query features when processing multimodal requests, resulting in high reasoning performance. In other words, the embodiments of this application achieve the goal of training a target visual language model with higher reasoning completeness and accuracy, thereby realizing the technical effect of improving the reasoning completeness and accuracy of the trained target visual language model, and thus solving the technical problem in related technologies where model training methods lose visual features, leading to poor model reasoning accuracy and completeness.
[0017] It is worth noting that the general description above and the detailed description that follow are merely for illustrative purposes and do not constitute a limitation on this application. Attached Figure Description
[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0019] Figure 1 This is a schematic diagram illustrating an application scenario of a model training method according to an embodiment of this application;
[0020] Figure 2 This is a flowchart of a model training method according to an embodiment of this application;
[0021] Figure 3This is a schematic diagram of an optional model training process according to an embodiment of this application;
[0022] Figure 4 This is a flowchart of a data processing method according to an embodiment of this application;
[0023] Figure 5 This is a flowchart of another data processing method according to an embodiment of this application;
[0024] Figure 6 This is a flowchart of another data processing method according to an embodiment of this application;
[0025] Figure 7 This is a flowchart of another data processing method according to an embodiment of this application;
[0026] Figure 8 This is a flowchart of another data processing method according to an embodiment of this application;
[0027] Figure 9 This is a structural block diagram of a model training device according to an embodiment of this application;
[0028] Figure 10 This is a structural block diagram of a data processing apparatus according to an embodiment of this application;
[0029] Figure 11 This is a structural block diagram of another data processing apparatus according to an embodiment of this application;
[0030] Figure 12 This is a structural block diagram of another data processing apparatus according to an embodiment of this application;
[0031] Figure 13 This is a structural block diagram of another data processing apparatus according to an embodiment of this application;
[0032] Figure 14 This is a structural block diagram of another data processing apparatus according to an embodiment of this application;
[0033] Figure 15 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0034] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0035] It should be noted that the terms "first," "second," etc., 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 data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0036] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0037] The technical solution provided in this application is mainly implemented using a deep learning model. Deep learning models can be widely applied in fields such as Natural Language Processing (NLP), computer vision, and speech processing. Specifically, they can be applied to computer vision tasks such as Visual Question Answering (VQA), Image Captioning (IC), and Image Generation, as well as to NLP tasks such as text-based sentiment classification, text summarization, and machine translation. Therefore, the main application scenarios of this application include, but are not limited to, digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design.
[0038] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows.
[0039] Large Language Models (LLMs) are high-level models based on deep learning architectures, trained on large amounts of text data, and capable of generating complex and coherent natural language. LLMs can generate various text outputs from inputs and are widely used in natural language processing tasks.
[0040] Visual-Language Models (VLMs) are models that combine visual understanding and natural language processing techniques. VLMs can parse received image and text information and generate relevant descriptions or responses. By associating visual features with linguistic expressions, VLMs possess both strong visual content understanding and text generation capabilities.
[0041] Retrieval-Augmented Generation (RAG) is a technique that enables models to access and utilize information from external knowledge bases to improve response accuracy, particularly suitable for LLMs and VLMs. By introducing a retrieval mechanism, RAG allows models to call tools such as web searches to obtain supplementary information to enhance their responsiveness.
[0042] Multimodal refers to a model's ability to simultaneously process and fuse two or more different types of information or data streams. These different types of information can include at least two of the following: text, audio, images, and video. Models with multimodal capabilities (also called multimodal models) can more comprehensively understand and generate content. Multimodal models perform better when understanding and generating information that includes multiple media elements.
[0043] Visually Rich Information (VRIE): Document data containing rich visual elements, such as charts, images, layouts, and non-plain text information. Models used to process VRIE need to understand not only the text content but also analyze visual features such as graphics, colors, and spatial positions to comprehensively interpret the VRIE.
[0044] According to embodiments of this application, a model training method and a data processing method are provided. It should be noted that the steps included in the above methods shown in the flowcharts in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0045] The technical solutions provided in this application can employ deep learning models with relatively large parameter scales, such as large models containing billions or even more model parameters. Here, "large model" is merely an example; this application does not limit the number of model parameters supported by the deep learning model used, aiming to meet actual needs. The deep learning models involved in this application can be artificial intelligence-based language models (LanguageMode, LM) or multimodal models (Multimodal Model, MM).
[0046] Considering the limited computing resources of mobile terminals, the methods described above in this application embodiment can be applied to, for example... Figure 1 The application scenarios shown are not limited to these. In, for example... Figure 1 In the application scenario shown, the deep learning model is deployed on server 10. Server 10 can connect to one or more client devices 20 via a local area network (LAN), wide area network (WAN), internet connection, or other types of data network. These client devices 20 may include, but are not limited to, smartphones, tablets, laptops, PDAs, personal computers, smart home devices, and in-vehicle devices. Client devices 20 can interact with users through a graphical user interface to invoke the deep learning model, thereby implementing the method provided in this embodiment.
[0047] In this embodiment, the system consisting of a client device and a server can perform the following steps: the client device uploads training data to the server, the training data including multimodal requests; the server performs reinforcement learning training on the initial visual language model based on the training data to obtain a target visual language model; further, the server returns the target visual language model to the client, or the server provides the client with an interface for calling the target visual language model. The aforementioned initial visual language model is used to make inference decisions on multimodal requests based on the reinforcement learning environment to obtain a sequence of inference actions, and to generate inference answers using the sequence of inference actions. The reinforcement learning environment is constructed through a visual document library and retrieval tools. The action types corresponding to the inference action sequence include: retrieval interaction actions, visual perception actions, and answer generation actions.
[0048] It should be noted that with the rapid development of high-performance computing units, the methods provided in this application embodiment can also be applied to model-in-the-loop machines in other application scenarios. In one optional embodiment, the model-in-the-loop machine has multiple built-in models. Users can select one model to adjust as needed to obtain their own model. The high-performance computing unit built into the model-in-the-loop machine can then directly call the adjusted model to execute the methods provided in this application embodiment. In another optional embodiment, the deep learning model-in-the-loop machine has a pre-trained model built-in. Therefore, the high-performance computing unit built into the model-in-the-loop machine can directly call this model to execute the methods provided in this application embodiment.
[0049] Furthermore, when users need to train their own models, they can upload their own datasets via the client. These datasets are then sent to the server, allowing the server to adjust the pre-trained model using the dataset to obtain the user's customized model, which can then be deployed to the production environment. To facilitate users' model adjustment needs, the server provides complete adjustment tools, development frameworks, and processes, supporting multiple adjustment strategies. This allows the adjusted model to better adapt to different application domains and achieve a high degree of customization.
[0050] Under the aforementioned operating environment, this application provides the following: Figure 2 The model training method shown. Figure 2 This is a flowchart of a model training method according to an embodiment of this application. Figure 2 As shown, the model training method may include the following steps S202 to S204.
[0051] Step S202: Obtain training data, wherein the training data includes multimodal requests.
[0052] The training data described above forms the foundation of the reinforcement learning training process. This training data can include a series of multimodal request instances, covering various possible combinations of visual and non-visual information. In some applications, multimodal request instances can integrate multiple information sources such as images, videos, audio, and text to form composite requests, thus serving as an extension of text input. The model to be trained should be able to understand and process different types of sensory input, thereby learning cross-modal information fusion and reasoning during training based on the aforementioned training data. For example, the multimodal requests can be multimodal queries, multimodal dialogues, multimodal questions, etc.
[0053] Specifically, in other application scenarios, the aforementioned training data can be configured to include unimodal requests, such as text-based, visual, and auditory requests, depending on the scenario requirements. These unimodal requests describe requests that involve multimodal data analysis or multimodal reasoning and decision-making. The model to be trained can be decomposed, rewritten, or rewritten from the unimodal requests to obtain multimodal requests. Furthermore, reinforcement learning training can be performed based on these multimodal requests.
[0054] It's important to note that multimodal requests are a request type designed for complex scenarios such as visually rich documents. Multimodal requests include information carriers other than text, such as images, tables, and charts. Models used to process multimodal requests need not only to understand the meaning of the text but also to parse and utilize non-textual information to generate comprehensive and accurate answers. For example, a multimodal request about a financial report might include not only textual questions about income and expenses but also screenshots of relevant charts. The model is required to identify the specific values in the charts, understand the relationship between the charts and the textual request, and then generate an analytical answer based on both chart and textual information. Introducing multimodal requests increases the diversity and difficulty of training data, while also enhancing the practical value and problem-solving capabilities of visual language models in real-world applications.
[0055] Step S204: Based on the training data, the initial visual language model is trained by reinforcement learning to obtain the target visual language model. The initial visual language model is used to make inference decisions on multimodal requests based on the reinforcement learning environment to obtain inference action sequences, and to generate inference answers using the inference action sequences. The reinforcement learning environment is constructed through a visual document library and retrieval tools. The action types corresponding to the inference action sequences include: retrieval interaction actions, visual perception actions, and answer generation actions.
[0056] The process of training an initial visual language model using reinforcement learning based on training data aims to enable the model to perform effective reasoning and decision-making in visually rich environments. During reinforcement learning training, the initial visual language model, in a reinforcement learning environment, faces multimodal requests and attempts to construct the optimal reasoning trajectory by executing sequences of retrieval interaction actions, visual perception actions, and answer generation actions. Each action of the model influences the subsequent action choices in the reasoning process and the quality of the final generated reasoned answer. Through interaction with the reinforcement learning environment—that is, with the visual document database and retrieval tools—the model receives feedback (i.e., reward signals) to measure the degree of matching between the model's generated reasoned answer and the reference answers in the training data, and to measure the model's retrieval efficiency and the rationality of the reasoning process.
[0057] The goal of the aforementioned reinforcement learning training is to maximize cumulative rewards during training, thereby adjusting model parameters and optimizing the model's behavioral strategies. This results in a final visual language model with stronger visual perception and more effective reasoning and decision-making capabilities, enabling it to generate high-quality inference answers when processing rich visual information. The training process of this target visual language model fully utilizes the exploratory and trial-and-error characteristics of reinforcement learning, allowing the model to exhibit higher performance when handling problems involving the fusion of visual and non-visual information.
[0058] The aforementioned reasoning action sequence is an ordered set of actions performed by the visual language model in response to a multimodal request, used to progressively construct a reasoning path to generate a reasoned answer. The reasoning action sequence includes reasoning actions performed in each of multiple reasoning rounds. These actions can be categorized into three types: retrieval interaction actions, visual perception actions, and answer generation actions. The model initiates a query to the retrieval tool by performing retrieval interaction actions to retrieve visual documents relevant to the multimodal request. Through visual perception actions, the model performs visual perception analysis on the retrieved visual documents, selecting and focusing on information-dense or key information areas. Finally, through answer generation actions, the model generates a final answer to the multimodal request based on the accumulated reasoning trajectory and the retrieved or perceived information.
[0059] The aforementioned reinforcement learning environment is a virtual environment designed for reinforcement learning training of a visual language model. This environment integrates a visual document library and retrieval tools, providing the model with a practical environment for multimodal reasoning. In this environment, each action of the model triggers feedback from the environment. This feedback information is used to evaluate the quality of the model's execution of the action, thereby guiding the model to adjust its strategy. The design of the reinforcement learning environment in this embodiment allows the model to optimize its performance in visually rich document retrieval and understanding tasks through autonomous exploration. Through continuous interaction with the environment, the model can learn how to effectively utilize visual information for reasoning and decision-making, gradually improving its ability to understand multimodal (at least visual) information and the accuracy of its generated answers.
[0060] It should be noted that this application proposes a reinforcement learning training method for a visual language model that enhances multimodal retrieval. Compared to traditional supervised learning training methods, the reinforcement learning training method in this application allows the model to make dynamic decisions in interaction with the reinforcement learning environment, rather than relying solely on static input-output sample pairs. This means that the visual language model can dynamically select the most appropriate sequence of reasoning actions, including retrieval interaction actions, visual perception actions, and answer generation actions, when faced with unprecedented multimodal requests, in order to cope with complex and ever-changing requests. Furthermore, the reinforcement learning training process endows the model with greater flexibility and adaptability. Through continuous interaction with the reinforcement learning environment, the model can adapt to various new visual document libraries and retrieval tools, maintaining good retrieval and reasoning performance even when the environment changes.
[0061] Overall, through the implementation of steps S202 and S204, the embodiments of this application can significantly improve the performance of the trained target visual language model in multimodal information retrieval and understanding tasks. First, the introduction of multimodal requests enables the model to handle more complex and richer information types, enhancing its ability to perceive and understand visual data. Second, reinforcement learning training allows the model to learn a dynamic and adaptive reasoning strategy, enabling it to intelligently select retrieval interaction actions, visual perception actions, and answer generation actions based on the specific content and context of the query, thereby retrieving information more accurately from the visual document library and generating reasoned answers more efficiently. Furthermore, the target visual language model of this application can demonstrate superior reasoning and decision-making abilities and information extraction capabilities (especially visual perception capabilities) when faced with multimodal requests containing rich visual information, providing users with more accurate and comprehensive answers.
[0062] Through steps S202 to S204 above, this embodiment of the application obtains training data, which includes multimodal requests. Further, based on the training data, the initial visual language model is trained using reinforcement learning to obtain a target visual language model. The initial visual language model is used to make inference decisions about multimodal requests based on a reinforcement learning environment to obtain a sequence of inference actions, and to generate inference answers using the inference action sequence. The reinforcement learning environment is constructed using a visual document library and retrieval tools. The action types corresponding to the inference action sequence include: retrieval interaction actions, visual perception actions, and answer generation actions. It is noteworthy that in this embodiment of the application, the initial visual language model and the target visual language model can complete retrieval interaction actions, visual perception actions, and answer generation actions during the inference process. That is, the visual language model to be trained not only has retrieval enhancement generation capabilities but also can visually perceive the multimodal data involved in the inference process, fully considering visual features in addition to traditional language and text features. This allows the trained target visual language model to fully and comprehensively understand query features when processing multimodal requests, resulting in high inference performance. In other words, the embodiments of this application achieve the goal of training a target visual language model with higher reasoning completeness and accuracy, thereby realizing the technical effect of improving the reasoning completeness and accuracy of the trained target visual language model, and thus solving the technical problem in related technologies where the model training method loses visual features, resulting in poor model reasoning accuracy and completeness.
[0063] In an optional embodiment, in step S204, the initial visual language model is trained using reinforcement learning based on the training data to obtain the target visual language model, including the following method steps:
[0064] Step S241: Use the initial visual language model to perform multiple rounds of iterative reasoning and decision-making on the multimodal request to obtain the reasoning trajectory;
[0065] Step S242: Calculate the target reward signal based on the training data and inference trajectory;
[0066] Step S243: Adjust the parameters of the initial visual language model using the target reward signal to obtain the target visual language model.
[0067] The training data mentioned above also includes reference information, which describes the expected inference method corresponding to the multimodal request. In the process of calculating the target reward signal based on the training data and inference trajectory, the target reward signal can be calculated based on the reference information and inference trajectory.
[0068] In this embodiment, the reference information included in the training data can serve as a guiding resource, describing the expected reasoning approach the model should take in response to multimodal requests. This expected reasoning approach can be characterized by expected reasoning paths and expected action strategies. The reference information can provide the model with clear learning objectives during reinforcement learning training, ensuring that the model can learn the optimal reasoning approach and tool usage strategies when faced with complex visual information.
[0069] The initial visual language model described above can serve as a policy model in reasoning and decision-making. During training, the initial visual language model is used to perform iterative reasoning and decision-making on multimodal requests in multiple rounds. In each round, the model determines the action to be executed based on the existing trajectory of the current round. During this process, the model can retrieve textual and visual information corresponding to the multimodal request. In particular, it can perform perception of visual information from coarse to fine, thereby obtaining a series of reasoning and decision-making trajectories. It should be noted that the reasoning trajectory can include the reasoning action corresponding to each round in multiple rounds.
[0070] It should be noted that in the above multiple rounds of iterative reasoning and decision-making, the reasoning and decision-making process of the model in each round can be recorded as the reasoning thought in that round, and the reasoning thought corresponds to the reasoning action in that round.
[0071] Furthermore, based on reference information and inference trajectories, a target reward signal is calculated. This target reward signal can be a comprehensive reward signal integrating multiple reinforcement learning rewards. The target reward signal can be used to guide the model to efficiently retrieve information and generate high-quality answers. It can provide multi-dimensional feedback to the model, prompting continuous optimization in reasoning and information retrieval.
[0072] Furthermore, the initial visual language model is adjusted using the target reward signal to obtain the target visual language model. This parameter adjustment process can be implemented using policy optimization algorithms, such as Proximal Policy Optimization (PPO) or Group Relative Policy Optimization (GRPO).
[0073] During parameter tuning, the model parameters are updated based on the target reward signal, with the goal of maximizing long-term cumulative reward. Furthermore, the divergence loss can be controlled during model tuning to maintain reasonable consistency between the target and reference models.
[0074] Through steps S241 to S243 above, the embodiments of this application realize reinforcement learning training of the visual language model, which not only improves the accuracy and efficiency of the model in understanding rich visual information, but also endows the model with the ability to perform coherent, multi-step reasoning and decision-making in a multimodal environment, making the model more adaptable to real-world application scenarios. In particular, the model's performance is significantly enhanced in tasks that require understanding and using visual elements such as images, charts, and tables for reasoning.
[0075] In an optional embodiment, in step S241, the initial visual language model is used to perform iterative reasoning decisions on the multimodal request through multiple rounds to obtain the reasoning trajectory, including the following method steps:
[0076] Step S2411: Use the initial visual language model to perform multiple rounds of iterative reasoning and decision-making on the multimodal request to obtain the decision thinking sequence and reasoning action sequence;
[0077] Step S2412: Based on the reasoning action sequence, drive the initial visual language model to interact with the reinforcement learning environment to obtain the environmental observation sequence;
[0078] Step S2413: Based on the decision-making sequence, reasoning action sequence, and environmental observation sequence, the reasoning trajectory is obtained.
[0079] This application embodiment utilizes an initial visual language model to perform iterative reasoning and decision-making across multiple rounds for multimodal requests. Specifically, in each round, the model performs reasoning and decision-making analysis on the existing data corresponding to the current round, determining the reasoning action for the current round. The content of the reasoning and decision-making analysis for the current round is recorded as the decision thought for the current round. In each round, the initial visual language model is driven to interact with the reinforcement learning environment according to the reasoning action of the current round, obtaining environmental observations from the reinforcement learning environment. Furthermore, based on the decision thought, reasoning action, and environmental observations corresponding to each round across multiple rounds, a reasoning trajectory is obtained.
[0080] It should be noted that the above decision-making sequence includes decision-making for each round across multiple rounds, also known as the T-sequence. The above reasoning action sequence includes reasoning actions for each round across multiple rounds, also known as the A-sequence. The above environmental observation sequence includes environmental observations for each round across multiple rounds, also known as the O-sequence. Based on this, a reasoning trajectory is obtained from the decision-making sequence, reasoning action sequence, and environmental observation sequence. This reasoning trajectory can contain the "thinking, action, observation" paradigm for each round across multiple rounds, also known as the (T, A, O) paradigm.
[0081] It should be noted that in any inference round, when the model performs inference and decision analysis based on the existing data corresponding to the current round, the existing data may include the "thinking, action, observation" paradigm corresponding to at least one previous historical round.
[0082] It should be noted that in any inference round, the model performs inference decision analysis on the existing data corresponding to the current round. The inference action to be executed in the current round can be a retrieval interaction action, a visual perception action, or an answer generation action.
[0083] In application scenarios, based on the decision-making sequence, reasoning action sequence, and environmental observation sequence, the initial visual language model obtains a complete reasoning trajectory. This trajectory integrates all the decision-making processes, reasoning actions performed, and feedback or observations obtained from the environment during query resolution, providing a comprehensive basis for subsequent strategy optimization. In other words, the reasoning trajectory not only reflects the model's reasoning process and decision-making path but also indirectly demonstrates the model's ability and efficiency in reasoning under different contexts, making it a crucial component for evaluating overall model performance and optimizing training.
[0084] Through steps S2411 to S2413, the visual language model in this embodiment can achieve dynamic reasoning and decision-making when processing multimodal requests in the training data. It effectively integrates visual perception operations and interactions with the external environment, obtaining detailed reasoning trajectories and providing rich training materials for reinforcement learning frameworks. The aforementioned multi-round interactive decision-making process enables the model to gradually understand and fully utilize visual information, improving the retrieval efficiency and understanding accuracy of visually rich documents, thereby enhancing the quality of the model's reasoning answers. In practical applications, such as when facing complex multimodal document retrieval problems, the aforementioned strategies in the trained target visual language model can significantly enhance the model's reasoning ability and the effectiveness of tool invocation, achieving more accurate and efficient information retrieval and understanding.
[0085] In an optional embodiment, the reasoning action sequence includes multiple rounds of actions corresponding to each round. In step S2411, the initial visual language model is used to perform iterative reasoning decisions on the multimodal request for multiple rounds to obtain the reasoning action sequence, including the following method steps:
[0086] Step S2511: For the first round among multiple rounds, use the initial visual language model to make inference decisions on the multimodal request and determine the round action corresponding to the first round;
[0087] Step S2512: For the target rounds other than the first round among multiple rounds, use the initial visual language model to make inference decisions on the historical trajectory to determine the round action corresponding to the target round. The historical trajectory is a partial inference trajectory corresponding to the historical rounds before the target round.
[0088] For the first round of multiple rounds, this embodiment of the application utilizes an initial visual language model to directly perform reasoning and decision-making on the multimodal request. In this process, the model determines, based on the query content, whether information retrieval is needed, whether visual perception of the retrieved information is needed, or whether a preliminary answer should be generated directly, thereby determining the round action corresponding to the first round.
[0089] For example, if the model deems the existing knowledge insufficient to answer a query, it will determine the action corresponding to the first round as a retrieval interaction, triggering interaction with the retrieval tool in order to obtain supplementary information from the visual document library. This feature reflects the model's autonomous decision-making ability, enabling it to react to a query and initiate subsequent reasoning processes even without historical interaction information.
[0090] For each target round (excluding the first round) across multiple rounds, this embodiment employs an initial visual language model to reason and make decisions based on the historical trajectory, determining the round action corresponding to that target round. The historical trajectory contains all "thinking, action, and observation" information up to the target round, providing the model with a dynamically updated context, enabling the model to adjust subsequent decisions and actions based on existing information and feedback.
[0091] For example, if the model retrieves some relevant but insufficient information in previous historical rounds before the target round, the reasoning decision for the target round might include further refining the retrieval request, repositioning the area of interest in the visual document, or correcting the direction of answer generation, ensuring that each action is based on the most complete understanding at the moment, reflecting the continuity and depth of multi-round reasoning. Through the above reasoning decision-making mechanism, the model can continuously optimize its reasoning strategy based on accumulated knowledge and experience until a satisfactory reasoned answer is generated.
[0092] Through steps S2511 to S2512, this embodiment provides a systematic and iterative reasoning decision-making process for a visual language model in an environment containing multi-round reasoning decisions. This reasoning decision-making process not only covers immediate reasoning based on the initial query but also includes dynamic reasoning based on continuous optimization of historical trajectories, effectively expanding the breadth and depth of the model in visual information retrieval and understanding. Through multi-round interactions, the model can more accurately locate information, perceive visual elements more meticulously, and generate answers more accurately, providing strong technical support for solving complex multimodal requests. The above implementation not only enhances the practicality of the trained target visual language model but also improves the model's performance in understanding rich visual information, enabling the model to more efficiently activate visual perception and reasoning capabilities within a limited context length, achieving better information retrieval and answer generation results.
[0093] In an optional embodiment, the environment observation sequence includes multiple rounds of observation corresponding to multiple rounds. In step S2412, based on the reasoning action sequence, the initial visual language model is driven to interact with the reinforcement learning environment to obtain the environment observation sequence, including the following method steps:
[0094] Step S2521: In response to the round action corresponding to the target round as a retrieval interaction action, determine the retrieval keywords based on the historical trajectory corresponding to the target round;
[0095] Step S2522: Drive the initial visual language model to call the retrieval tool to search the visual document library based on the retrieval keywords and obtain the retrieval results;
[0096] Step S2523: Based on the retrieval results, determine the round observation corresponding to the target round to obtain the environmental observation sequence.
[0097] In this embodiment, the environment observation sequence is a sequence of round observations of reinforcement learning environment feedback across multiple rounds. Each round observation corresponds to a specific action in the multi-round interaction and the feedback information received after performing that action. The environment observation sequence can reflect the historical record of the model's interaction with the reinforcement learning environment and can be used to help the model learn how to make decisions based on past interaction experiences.
[0098] The search interaction is based on the action corresponding to the target round, and the search keywords are determined based on the historical trajectory of the target round. This means that when the model recognizes that the action in the current round is to interact with the search tool to obtain information, it will parse the most suitable keywords or query strings based on the historical trajectory (including past thoughts, observations, and actions) to determine the search keywords.
[0099] In application scenarios, the aforementioned search keywords can be directly determined by the initial visual language model based on the multimodal request, thus reflecting the query and retrieval requirements of the multimodal request. The initial visual language model can first understand, decompose, and rewrite the multimodal request to obtain the target query, and then determine the search keywords based on the target query, thereby improving retrieval efficiency and accuracy.
[0100] If the model has already acquired visual documents or other image data in previous rounds, it may also combine this acquired visual information to generate more accurate search keywords. For example, the model may notice specific elements or details in an image and convert these visual features into new keywords to enhance the search request.
[0101] Furthermore, if the model has already performed several rounds of searching but has not yet found enough information to answer the query, it may adjust its search keywords based on feedback from previous search results, thus achieving iterative searching. This iterative searching process helps the model gradually improve its search strategy through multiple attempts until it finds the most relevant information.
[0102] Furthermore, the initial visual language model is driven to invoke a retrieval tool to search the visual document library based on the search keywords, thereby obtaining search results. That is, once the search keywords are determined, the model will query the visual document library through the retrieval tool to find visual information related to the search keywords. The retrieval tool may be a database search interface or a more complex search engine, capable of understanding and responding to the needs of visual queries. Based on this, the initial visual language model in this embodiment possesses multimodal retrieval enhancement generation capabilities, transforming real-time reasoning decisions into specific retrieval actions, and obtaining the information needed to generate answers through interaction with external resources.
[0103] Furthermore, based on the retrieval results, the corresponding round observations for the target round are determined, resulting in an environmental observation sequence. After the retrieval for the target round is completed, the reinforcement learning environment observes the retrieval results and feeds back the corresponding round observations for the target round to the model, integrating the current round's round observations into the environmental observation sequence. Round observations can be retrieved images, charts, or descriptions of these visual elements. The continuous accumulation and updating of the environmental observation sequence enables the model to gradually build a knowledge framework based on historical actions and feedback through continuous interaction with the reinforcement learning environment, guiding the model's future reasoning decisions.
[0104] Through steps S2521 to S2523 described above, this embodiment of the application enables collaborative interaction between the initial visual language model during training and the retrieval tool, improving the model's retrieval efficiency and accuracy in the field of rich visual information. The model (either during training or after training) can not only generate logically consistent search keywords but also effectively utilize the retrieval tool to obtain relevant information from the visual document library, integrating this information into the environmental observation sequence for further reasoning and decision-making. This solution ensures the coherence and efficiency of the model's reasoning information flow. When handling complex multimodal tasks, the model can form a more comprehensive and accurate understanding based on rich visual and textual information, thereby improving the quality of the final generated answer. Especially when a deep understanding of images, charts, and other content is required, this solution enables the model to perform information retrieval and comprehensive analysis more intelligently and autonomously.
[0105] In an optional embodiment, in step S2412, based on the inference action sequence, the initial visual language model is driven to interact with the reinforcement learning environment to obtain an environment observation sequence, including the following method steps:
[0106] Step S2531: In response to the visual perception action corresponding to the target round, determine the content to be perceived based on the historical trajectory corresponding to the target round.
[0107] Step S2532: Drive the initial visual language model to perform multi-scale visual perception of the content to be perceived, and obtain the target perception result, wherein the target perception result is used to describe the visual features of the content to be perceived.
[0108] Step S2533: Based on the target perception results, determine the round of observation corresponding to the target round to obtain the environmental observation sequence.
[0109] When the action corresponding to the target round is a visual perception action, the content to be perceived is determined based on the historical trajectory corresponding to the target round. This historical trajectory records all historical information of the interaction between the initial visual language model and the reinforcement learning environment, including the thinking, actions, and observations of each historical round. When the model determines through reasoning that the action corresponding to the target round is a visual perception action, it means that the model believes it needs to extract visual information more deeply and in greater detail from existing observations. When executing this visual perception action, the model will identify the image region content or visual elements that need to be analyzed again, and determine these image region content or visual elements as the content to be perceived.
[0110] In application scenarios, the aforementioned content to be perceived can be images contained in the multimodal requests in the training data (such as photos, screenshots, or other forms of visual materials on the user's mobile phone, which are directly associated with the multimodal queries), or visual documents retrieved from the visual document library by the model calling the retrieval tool in historical rounds, or images obtained by post-processing the retrieved visual documents.
[0111] In other application scenarios, for training and testing purposes, during target rounds, the model can generate synthetic or simulated images as content to be perceived based on historical trajectories and preset rules. For example, the model might generate a schematic or sketch while attempting to answer a question, and then perform visual perception actions on this generated image to extract more details or confirm certain hypotheses.
[0112] Furthermore, after identifying the content to be perceived, the initial visual language model is driven to perform multi-scale visual perception of the content. During this multi-scale visual perception process, the model understands visual information at different levels and levels of detail, from global overview to local details, capturing the multi-layered features implicit in the visual data. Through visual perception actions, the model crops and magnifies key regions within the content to be perceived, performs deep visual feature extraction, and generates the target perception result. The target perception result can include a series of visual feature descriptions containing key information about the content to be perceived, helping the model to more accurately understand and answer questions based on the visual content.
[0113] Furthermore, based on the target perception results, the corresponding round observations for each target round are determined and integrated into the environmental observation sequence. The environmental observation sequence consists of all round observations collected by the model in each round of interaction with the environment. By transforming the target perception results into round observations, the model can incorporate new visual features into the current reasoning and decision-making framework, further enriching the context of reasoning. This allows the model to consider more detailed visual information in subsequent decisions, improving the accuracy and efficiency of solving multimodal request tasks.
[0114] Through steps S2531 to S2533 described above, this embodiment of the application achieves refined processing of visual information by the visual language model when handling multimodal requests. First, through multi-scale visual perception, the model analyzes visual content from macro to micro and from global to local perspectives when necessary, ensuring that the model can capture key details in the visual information. Second, by determining the content to be perceived and selectively extracting visual features, the model avoids wasting computational resources on irrelevant visual information, improving processing efficiency. Finally, by converting the visual perception results into rounds of observation and integrating them into the environmental observation sequence, the model can continuously optimize its decision-making strategy in a coherent reasoning process, making the generated reasoning answers more accurate and relevant. Therefore, this embodiment of the application can improve the model's performance in multimodal information retrieval and understanding tasks during training, especially in scenarios requiring deep analysis of visual information, where the model's reasoning and generation capabilities are significantly enhanced.
[0115] In an optional embodiment, in step S2532, the initial visual language model is driven to perform multi-scale visual perception of the content to be perceived to obtain the target perception result, including the following method steps:
[0116] Step S2534: Drive the initial visual language model to perform global visual perception of the content to be perceived, and obtain the first perception result;
[0117] Step S2535: Drive the initial visual language model to select the region of interest corresponding to the content to be perceived, and perform regional visual perception on the content to be perceived based on the region of interest to obtain the second perception result. The region of interest is determined by the regional information density corresponding to the content to be perceived.
[0118] Step S2536: The first perception result and the second perception result are fused to obtain the target perception result.
[0119] In the optional embodiments described above, during the process of driving the initial visual language model to perform multi-scale visual perception of the content to be perceived, the initial visual language model is first driven to perform global visual perception (CoarsePerception) on the specific content to be perceived. This means that the model will perform a preliminary and comprehensive scan and understanding of the content to be perceived (including the entire visual document or image) to obtain a macroscopic overview of visual information, resulting in the aforementioned first perception result. The aforementioned global visual perception process involves the model's visual encoder, which converts the entire visual content into a series of visual feature vectors, providing a foundation for subsequent more refined visual perception and reasoning decisions. Global visual perception is a crucial step in the model's initial contact with and understanding of the content to be perceived, ensuring that the model can grasp the framework and layout of visual information as a whole, which is essential for subsequent decision-making.
[0120] Furthermore, the initial visual language model selects the region of interest (ROI) corresponding to the content to be perceived, and performs more refined region visual perception operations based on the ROI to obtain the second perception result. The ROI is determined by evaluating the information density of each region in the content to be perceived; regions with high information density (such as regions containing a large amount of text, complex charts, or key visual elements) are prioritized by the model. The process of performing region visual perception on the ROI includes, but is not limited to, visual operations such as localization, cropping, and magnification, as well as visual feature perception operations. Based on this, the model focuses on key details in the content to be perceived (such as a visual document), thereby extracting and understanding information more effectively. Region visual perception is a crucial step in the model's deep interaction with the content to be perceived, enabling the model to perform selective and nuanced visual information processing based on information density and query relevance.
[0121] It should be noted that the aforementioned region of interest can include multiple regions at multiple levels. Correspondingly, the process of performing regional visual perception on the region to be perceived can involve multiple perceptions, each of which corresponds to a different level, thereby achieving multi-level regional perception. This allows the model to perceive the visual features of the content to be perceived from coarse to fine.
[0122] Furthermore, the first perception result obtained through global visual perception and the second perception result obtained through regional visual perception are fused to generate the target perception result. The fusion of the first and second perception results at different scales integrates visual information at different levels, ensuring that the model's reasoning decisions in subsequent reasoning processes are based on comprehensive and detailed perception. This fusion process may involve feature vector concatenation, weighted averaging, or other advanced fusion algorithms to balance the importance of the global perspective and local details. Through multi-scale integration, the model can construct a comprehensive visual information representation, providing richer visual context support for reasoning decisions.
[0123] Through steps S2534 to S2536, the embodiments of this application can significantly improve the perception and understanding capabilities of visual language models when processing multimodal information, especially visually rich documents. Specifically, firstly, global visual perception provides the model with an overall grasp of the visual content, ensuring that the model does not miss important visual elements or layout information. Secondly, region-based visual perception based on regions of interest allows the model to delve deeper into key details in visual documents, improving the accuracy of information extraction. Finally, by fusing and integrating global and local perception results, a more complete and refined visual information representation is constructed, providing multi-level visual cues for the model's reasoning and decision-making. The above scheme enables visual language models (including models under training and models that have been trained) to extract and understand information from visual documents more efficiently, especially in scenarios with large amounts of information and complex visual elements, where the model's performance and accuracy are significantly improved.
[0124] In some optional implementations, the region of interest is dynamically updated based on the historical trajectory corresponding to the target round, wherein the historical trajectory includes the perception region markers corresponding to the target perception results of the historical rounds.
[0125] In this embodiment, the region of interest is dynamically updated based on the historical trajectory corresponding to the target round. The aforementioned historical trajectory includes the perception region markers (e.g., region labels) corresponding to the target perception results of previous rounds. <region>By marking these perceptual regions in the historical trajectory, the model can learn from previous visual perception results and determine which regions carry the most relevant information to the query in multiple rounds of inference, thus focusing more on these regions in subsequent rounds.
[0126] It is noteworthy that the embodiments of this application not only consider the static analysis of visual information but also introduce a dynamic iterative mechanism, enabling the model to progressively refine its understanding of visual documents. Furthermore, by retaining perceptual region markers in historical trajectories, the model can track past decision-making processes, avoiding the repeated processing of the same information and thus improving overall reasoning efficiency.
[0127] In application scenarios, such as when processing a complex document containing various charts and text, the initial visual language model might begin with global visual perception to obtain a preliminary perception result, which includes the recognition of the overall document layout and elements. Based on this preliminary perception result, the model can determine which areas might contain more detailed or key information (i.e., regions of interest), and then perform more in-depth regional visual perception based on these regions of interest. With multiple rounds of interaction, the model continuously adjusts the scope of the regions of interest based on the new perception results of each round, extracting more details from charts or images with higher information density. This dynamic updating process of regions of interest is similar to the natural transition from a cursory glance to a detailed study when humans read complex documents, enabling the model to more effectively focus on the key parts of problem-solving.
[0128] This application's embodiments significantly improve the efficiency and accuracy of the model when processing rich visual information by dynamically updating the region of interest (ROI). This dynamic update mechanism enables the model to quickly locate information-dense or key areas in a visual document, avoiding unnecessary global repetitive processing and reducing the waste of computational resources. Simultaneously, this mechanism enhances the model's adaptability, allowing it to continuously optimize its strategy in multiple rounds of inference and perform more refined analysis of visual elements. Therefore, when faced with queries containing a large amount of visual information, the introduction of a dynamic ROI update mechanism helps the model generate answers faster and more accurately, thereby achieving higher performance in the field of visual information understanding and retrieval. For example, when processing complex documents, the model can more intelligently filter and process visual information, improving the depth and breadth of its understanding of visual information and providing technical support for generating high-quality, visual content-based answers.
[0129] In an optional embodiment, in step S2412, based on the inference action sequence, the initial visual language model is driven to interact with the reinforcement learning environment to obtain an environment observation sequence, including the following method steps:
[0130] Step S2541: In response to the round action corresponding to the target round as the answer generation action, the initial visual language model is driven to generate a reasoning answer based on the historical trajectory corresponding to the target round;
[0131] Step S2542: Based on the reasoning answer, determine the round observation corresponding to the target round to obtain the environmental observation sequence.
[0132] When the action corresponding to the target round is the answer generation action, the initial visual language model is driven to generate a reasoned answer based on the historical trajectory corresponding to the target round. This means that the model comprehensively analyzes all interaction experiences to date (including thoughts, actions, and observations in the historical trajectory) to generate a preliminary reasoned answer. This preliminary reasoned answer is the reasoning answer obtained by the model when the reasoning process reaches the target round. This initial visual language model not only has basic language generation capabilities but also the ability to perform multimodal reasoning by integrating visual and textual information, demonstrating the model's powerful integration capabilities when handling complex multimodal requests.
[0133] Furthermore, based on the inferred answer, the corresponding round observations for the target round are determined, thereby enriching and improving the environmental observation sequence. Specifically, the round observations for the target round can be confirmation of the inferred answer, further clarification of the query, or additional requirements for visual elements. For example, if the inferred answer generated by the model is based on the interpretation of an image, then the round observations may include a detailed description of the image or supplementary information. The above process ensures that the inferred answer generated by the model is derived in a sufficient information context, and also provides a basis for the actions in the next target round, forming a multi-round interactive and continuously optimized inference decision-making closed loop.
[0134] Through steps S2541 to S2542 described above, this embodiment of the application realizes dynamic reasoning and answer generation based on historical trajectories in multi-round interactions using a visual language model. The model can not only generate highly relevant and accurate reasoning answers based on the original query and accumulated historical information, but also further correct and optimize its reasoning decisions by observing the rounds in which the generated reasoning answers are generated. This ensures that each generated reasoning answer is based on accurate visual information and meets the requirements of multimodal information retrieval and understanding scenarios. The above solution enhances the model's flexibility and accuracy in processing rich visual information. Especially when facing complex queries requiring cross-modal comprehensive analysis and continuous decision-making, the model's performance is significantly improved, providing a technical foundation for solving the complex and ever-changing visual information understanding and retrieval problems in the real world.
[0135] In an optional embodiment, the training data further includes reference information, which describes the expected reasoning method corresponding to the multimodal request. The reference information includes reference visual information, reference answer, and reference reasoning path corresponding to the multimodal request. In step S242, the target reward signal is calculated based on the training data and the reasoning trajectory, including the following method steps:
[0136] Step S2421: Calculate the retrieval performance reward based on the retrieval results corresponding to the reference visual information and the reasoning path. The retrieval performance reward is used to evaluate the relevance between the retrieval results and the reference visual information.
[0137] Step S2422: Calculate the reasoning output reward based on the reference answer and the reasoning answer corresponding to the reasoning path. The reasoning output reward is used to evaluate the matching degree between the reasoning answer and the reference answer.
[0138] Step S2423: Calculate the reasoning pattern reward based on the reference reasoning path and the reasoning action sequence corresponding to the reasoning path. The reasoning pattern reward is used to evaluate the similarity between the reference reasoning path and the reasoning action sequence.
[0139] Step S2424: Determine the target reward signal using retrieval performance reward, inference output reward, and inference pattern reward.
[0140] In the optional embodiments described above, the reference information can provide the model with a reference reasoning decision template for multimodal requests during reinforcement learning training. The reference information includes reference visual information, a reference answer, and a reference reasoning path corresponding to the multimodal request. The reference visual information can be a pre-defined set of matching images related to the multimodal request. The reference answer can be a pre-defined expected reasoning answer corresponding to the multimodal request. The reference reasoning path can be an expected reasoning path provided by an expert reasoning model for the multimodal request, which can include multiple reasoning steps, each corresponding to decision-making, reasoning action, and environmental observation.
[0141] The aforementioned reference information can explicitly specify the expected reasoning pattern and decision outcome, and can directly guide the training of the model during the reinforcement learning training process. This ensures that when the model processes rich visual information, it can follow the optimal reasoning path and generate high-quality reasoning answers that match the reference answers. At the same time, the reference visual information enables the model to learn how to effectively retrieve and utilize visual information.
[0142] In the optional embodiments described above, a retrieval performance reward is calculated based on the retrieval results corresponding to the reference visual information and the inference path. Specifically, the retrieval performance reward is determined by comparing the similarity between the visual documents actually retrieved by the model and the visual documents specified in the reference information that are most relevant to the multimodal request. The calculation of the retrieval performance reward considers the accuracy of the match between the retrieval results and the reference visual information, as well as the efficiency of the retrieval, ensuring that the model can efficiently and accurately locate relevant visual information during the inference process, thereby improving the overall reasoning and understanding capabilities.
[0143] Furthermore, in this embodiment, a reasoning output reward is calculated based on the reference answer and the reasoning answer corresponding to the reasoning path. The evaluation criterion for the reasoning output reward is the degree of matching between the reasoning answer generated by the model and the reference answer, including semantic similarity and the completeness of key information. By calculating the reasoning output reward, it is ensured that the answer generated by the model is not only consistent with the reference answer in surface form, but more importantly, accurate in content and logic, thereby improving the accuracy of the model in solving multimodal problems.
[0144] Furthermore, in this embodiment, a reasoning pattern reward is calculated based on a reference reasoning path and the corresponding sequence of reasoning actions. The reasoning pattern reward measures the similarity between the model's behavior during the reasoning process and a preset expected path, aiming to encourage the model to follow a logically clear, logically sound, and appropriately tool-based reasoning process when processing queries. By evaluating whether the model's reasoning actions match the reference reasoning path, the model can learn how to perform effective multi-step reasoning.
[0145] Furthermore, this embodiment utilizes retrieval performance rewards, inference output rewards, and inference pattern rewards to comprehensively determine the target reward signal. The calculation of the target reward signal is a weighted aggregation process, where different reward factors are assigned different weights based on their importance in the inference task. This comprehensive reward signal design enables the model to simultaneously optimize its information retrieval, answer generation, and inference process during training. This ensures that when handling complex multimodal requests, the model can comprehensively improve its performance, from efficient retrieval of visual information to optimization of the inference process and accurate generation of the final answer.
[0146] Through steps S2421 to S2424 described above, this embodiment of the application achieves a comprehensive optimization and enhancement of the reasoning ability of the visual language model when processing rich visual information. The model not only learns how to efficiently and accurately retrieve relevant visual information from a visual document library, but also understands this visual information and effectively integrates it into the reasoning path, ultimately generating high-quality, highly matching reasoning answers. The above technical solution ensures that the model performs more stably and excellently in multimodal reasoning tasks, especially in scenarios requiring a deep understanding of visual elements such as images, charts, and tables. Based on the retrieval and understanding of visual information, the model can perform coherent and in-depth reasoning, thereby achieving better generation results.
[0147] In an optional embodiment, the reference visual information is a set of relevant images corresponding to the multimodal request, and the retrieval results include the retrieved images. In step S2421, a retrieval performance reward is calculated based on the reference visual information and the retrieval results, including the following method steps:
[0148] Step S2425: Compare and calculate the relevance score by comparing the retrieved image with the set of related images;
[0149] Step S2426: Based on the correlation score, determine the cumulative loss gain corresponding to the inference trajectory;
[0150] Step S2427: Calculate the retrieval performance reward using the cumulative loss gain and the preset expected loss gain.
[0151] Visual similarity measurement techniques are used to compare the retrieved image with a set of related images corresponding to a multimodal request, resulting in a relevance score that quantifies the degree of association between the retrieved image and the set of related images. This comparison process can be implemented based on deep learning-based visual feature extraction and matching algorithms, such as using Convolutional Neural Networks (CNNs) or a visual Transformer model to encode images, and measuring the association between images by calculating the distance or similarity between feature vectors. The relevance score reflects the degree of match between the retrieved image and the query intent, helping to determine the effectiveness of the search action.
[0152] Furthermore, based on the obtained relevance score, this embodiment calculates the Discounted Cumulative Gain (DCG) corresponding to the inference trajectory. DCG is an indicator for evaluating the quality of information retrieval results. It considers the relevance of the retrieval results and the influence of result ranking. By assigning greater weight to higher-ranked relevant information and controlling the decreasing weight of lower-ranked relevant information, it evaluates the overall efficiency of the retrieval strategy. In this embodiment, DCG is calculated based on the matching between the retrieved image and the set of relevant images, thereby quantifying the temporal and sequential influence of the relevant images retrieved by the model in multiple rounds of interaction, to evaluate the performance of the model's retrieval strategy in satisfying query intent.
[0153] Furthermore, this embodiment of the application calculates the retrieval performance reward using the cumulative loss gain and a preset expected loss gain (IDCG). The expected loss gain refers to the maximum cumulative loss gain that the model should be able to achieve under ideal conditions by retrieving the most relevant set of images. By comparing the cumulative loss gain of the image set actually retrieved by the model with the expected loss gain, the performance difference of the model's retrieval behavior relative to the best possible behavior can be quantified. The calculation formula for the retrieval performance reward can be similar to the normalized cumulative loss gain (NDCG). By dividing the model's actual cumulative loss gain by the expected loss gain, a normalized score, i.e., the retrieval performance reward, is obtained to reflect the effectiveness of the model's retrieval strategy. The above-mentioned reward mechanism based on retrieval performance rewards can guide the model to focus more on efficient and accurate information retrieval in multi-round inference, thereby improving the quality of the overall inference trajectory.
[0154] In one exemplary application scenario, the set of retrieved images in the retrieval results contained in the inference trajectory is denoted as D. trj Let any retrieved image be denoted as d. i The set of relevant images in the reference information is denoted as D. rel Based on this, the retrieval image d is determined as follows: i Corresponding correlation score s i When d i Belongs to D rel At that time, determine s i The value is 1; when d i Not belonging to D rel At that time, determine s i The value is 0. Further, the cumulative loss gain DCG(D) corresponding to the inference trajectory is calculated according to the following formula (1). trj D rel ).
[0155]
[0156] In the above application scenario, it is assumed that the model achieves optimal retrieval performance when it first retrieves all images in the relevant image set. Correspondingly, the expected loss gain IDCG(D) is calculated according to the following equation (2). rel ).
[0157]
[0158] In equation (2) above, s rel s represents the relevance score of an image in the relevant image set. unrel This represents the relevance score for images that do not belong to the relevant image set.
[0159] Furthermore, the retrieval performance reward r is calculated according to the following formula (3). Ret .
[0160]
[0161] Based on this, the reward for the inference output is denoted as r. Ans The reward for the reasoning mode is denoted as r. Pat The target reward signal r is calculated according to the following formula (4). φ .
[0162] r φ =αr Pat +βr Ans +γr Ret Equation (4)
[0163] In the above equation (4), the weighting coefficient α+β+γ=1.
[0164] In application scenarios, since the model, after supervised fine-tuning (SFT), is already capable of effectively learning inference patterns, the reward r for the inference pattern can be... Pat The corresponding weight α is set to 0; however, during the cold start phase of reinforcement learning, α is set to 0.1 to help the model master the predefined inference pattern. By integrating retrieval performance rewards, inference output rewards, and inference pattern rewards into the target reward signal, this application embodiment constructs a comprehensive and fine-grained evaluation mechanism to guide the initial visual language model to optimize its inference and retrieval capabilities.
[0165] Through steps S2425 to S2427, this embodiment of the application enables quantitative evaluation and incentive of the retrieval performance of the visual language model in multimodal information retrieval tasks. Specifically, the calculation of the relevance score ensures that the model can accurately measure the consistency between the retrieval results and the query intent, while the depreciated cumulative gain further considers the ranking of the retrieval results, enabling the model to optimize its retrieval strategy during interaction to find the most relevant information more quickly. The retrieval performance reward mechanism, through positive incentives, encourages the model to pay more attention to retrieval quality and efficiency when processing rich visual information, thereby fundamentally improving the model's performance in multimodal reasoning tasks. The above scheme particularly emphasizes the retrieval effect when the model interacts with the external environment, providing support for the visual language model to perform efficient retrieval in complex visual information environments, enabling the model to quickly locate key content when faced with a large amount of visual information, and significantly improving the model's speed and accuracy in solving problems.
[0166] In an optional embodiment, in step S243, the parameters of the initial visual language model are adjusted using the target reward signal to obtain the target visual language model, including the following method steps:
[0167] Step S2431: Based on the target reward signal, determine the probability distribution of the first line of reasoning trajectory;
[0168] Step S2432: Analyze the reasoning trajectory using a preset reference model to generate a second-order probability distribution;
[0169] Step S2433: Calculate the divergence loss based on the probability distribution of the first row and the probability distribution of the second row;
[0170] Step S2434: Adjust the parameters of the initial visual language model according to the divergence loss to obtain the target visual language model.
[0171] In the above optional embodiments, a first behavior probability distribution corresponding to the reasoning trajectory of the initial visual language model is determined based on the target reward signal. The target reward signal is a quantitative feedback on the reasoning behavior of the initial visual language model, reflecting the degree to which the initial visual language model's performance after performing one or a set of actions closely matches the expected target. The first behavior probability distribution represents the probability that the model will choose to perform certain actions (such as searching, answering, visual perception actions, etc.) under given observation conditions. By calculating the first behavior probability distribution, this embodiment of the application directly correlates the reward signal with the behavior probability of the initial visual language model, guiding the initial visual language model to consider the potential impact of the reward when making decisions, thereby making action choices that are more beneficial to maximizing rewards in similar future situations.
[0172] Furthermore, the inference trajectory is analyzed using a pre-defined reference model to generate a second action probability distribution. The reference model is typically pre-defined based on expert behavior or the behavioral patterns of high-performance models, providing ideal behavioral examples for the model. By comparing the actual inference trajectory of the initial visual language model with that of the reference model, the second action probability distribution reveals the probability with which the model should perform a specific action under the ideal behavioral pattern, providing a benchmark for model learning. By introducing an external reference model, a learning benchmark beyond its own experience is provided to the initial visual language model, facilitating its approximation to a better strategy during reinforcement learning training.
[0173] Furthermore, the divergence loss (e.g., Kulbak-Leibler divergence loss, or KL divergence loss for short) is calculated based on the probability distributions of the first and second rows. The divergence loss is an indicator used to measure the difference between the probability distributions of the first and second rows; specifically, it refers to the gap between the actual reasoning behavior of the initial visual language model and the ideal reasoning behavior corresponding to the reference model. The process of calculating the divergence loss essentially quantifies the behavioral bias of the initial visual language model, so that this bias can be reduced through subsequent optimization, making the behavior pattern of the trained target visual language model closer to the ideal behavior pattern indicated by the reference model.
[0174] Furthermore, based on the calculated divergence loss, this embodiment of the application adjusts the parameters of the initial visual language model to obtain the target visual language model. Specifically, the divergence loss is propagated back to the parameter layer of the model through the backpropagation algorithm, causing the model parameters to be adjusted to minimize this loss. The above-mentioned model parameter adjustment process can be performed iteratively until the probability distribution of the first row of the trained target visual language model is sufficiently close to the probability distribution of the second row of the reference model, or until a preset convergence condition is met.
[0175] It is noteworthy that the embodiments of this application can combine reinforcement learning with supervised learning, which encourages the model to explore the unknown behavioral space, while ensuring the stability and directionality of the learning process through the guidance of the reference model.
[0176] Through steps S2431 to S2434, this embodiment of the application implements a closed-loop learning and optimization process, enabling the visual language model to gradually adjust its decision-making strategy based on the target reward signal and the behavioral analysis of the reference model, thereby achieving more effective processing and reasoning of visually rich information. This solution not only improves the performance of the target visual language model in multimodal information retrieval and understanding tasks, but also ensures that the target visual language model gradually converges to the optimal strategy during long-term learning. This allows for more intelligent, autonomous, and efficient decision-making when processing visually rich documents, improving the adaptability of the target visual language model and the quality of the generated answers. Specifically, when faced with complex visual queries, the target visual language model can more accurately locate relevant information and more effectively call upon tools for visual information analysis, significantly improving the quality of the generated reasoning answers. This is particularly evident in tasks requiring a deep understanding of visual elements such as charts and images, where the reasoning ability of the target visual language model is significantly enhanced.
[0177] Based on the above model training method, in an exemplary application scenario, the following is provided: Figure 3 An optional model training process, such as Figure 3 As shown, the model training process is based on a reinforcement learning framework that enhances visual retrieval. Figure 3 As shown, the policy model in reinforcement learning training is built based on the visual language model. For a certain iteration of training, the policy model before training is the initial visual language model, and the policy model after training is the target visual language model. This target visual language model can be used as the initial language model for the next iteration of training.
[0178] like Figure 3 As shown, input queries in the training data trigger multiple rounds of interaction between the strategy model and the external environment. During these multiple rounds, the reasoning actions determined by the strategy model through reasoning decisions can include retrieval interaction actions, visual perception actions, and answer generation actions. When the strategy model executes the retrieval interaction action, it calls a search engine to retrieve visual document information related to the reasoning of the current round from an external database (such as a visual document library). When the strategy model executes the visual perception action, it calls a visual perception component to perform multi-scale visual perception on the retrieved visual document information to obtain visual perception results. In particular, the multi-scale visual perception process may include visual processing operations such as selection, cropping, and moving of visual document information. When the strategy model executes the answer generation action, it generates a text answer based on the historical reasoning trajectory of the current reasoning round. This historical reasoning trajectory includes the reasoning thinking, reasoning actions, and environmental observations corresponding to each completed reasoning round.
[0179] Still as Figure 3 As shown, during the multi-round interaction between the policy model and the external environment, each time the policy model executes a reasoning action, it triggers the reinforcement learning environment to observe the result of the reasoning action. Furthermore, the policy model can receive the environment observations fed back by the reinforcement learning environment regarding the execution results. Thus, after multiple rounds of interaction, the policy model can obtain an environment observation sequence, which includes the environment observations fed back by the reinforcement learning environment in each round of interaction.
[0180] Still as Figure 3 As shown, after multiple rounds of interaction between the strategy model and the external environment, an inference trajectory is obtained. This trajectory records the decision-making sequence, inference action sequence, and environmental observation sequence generated during these rounds of interaction. Furthermore, a comprehensive reward calculation is performed based on the inference trajectory and the comprehensive reward mechanism to obtain the target reward signal. The behavioral probability corresponding to the inference trajectory of the current strategy model is determined based on the target reward signal.
[0181] Still as Figure 3 As shown, the preset reference model can also be constructed based on a visual language model, which can be a pre-specified expert visual language model capable of providing an ideal inference trajectory for the input query. Using the reference model and the aforementioned behavioral probabilities, the divergence loss is calculated to characterize the behavioral decision-making bias of the policy model during inference. Furthermore, the model parameters of the policy model are adjusted based on the divergence loss to update the policy model.
[0182] It is easy to notice that, such as Figure 3 The model training process shown can employ reinforcement learning to train a multimodal retrieval-enhanced visual language model, thereby obtaining a target visual language model. This target visual language model not only possesses strong visual perception performance and can accurately and comprehensively generate inference answers corresponding to input queries, but also achieves highly efficient information retrieval and improves inference efficiency.
[0183] In the aforementioned operating environment, this application also provides, as follows: Figure 4 This illustrates a data processing method. Figure 4 This is a flowchart of a data processing method according to an embodiment of this application, such as... Figure 4 As shown, the data processing method includes:
[0184] Step S401: Obtain input request;
[0185] Step S402: Use the target visual language model to reason and make decisions on the input request, and generate the target answer;
[0186] The target visual language model is generated according to any of the above model training methods.
[0187] The input request described above can be a unimodal query, such as a text-based query or a visual-based query. This unimodal query is used to describe multimodal request requirements, demanding that the model analyze information from multiple modalities during the inference and decision-making process. Alternatively, the input request can be a multimodal request, such as a composite query that simultaneously includes text and visual modalities.
[0188] In the application scenario, after obtaining the user's input request, the target visual language model is used to reason and make decisions on the input request to generate the target answer. This target visual language model can reason and make decisions on the input request based on the external environment, determine the sequence of reasoning actions, and use the sequence of reasoning actions to generate the target answer. The external environment is constructed through a visual document library and retrieval tools. The action types corresponding to the sequence of reasoning actions include: retrieval interaction actions, visual perception actions, and answer generation actions.
[0189] In this embodiment, the target visual language model is trained according to any of the above-mentioned model training methods. Based on these methods, the trained target visual language model can complete retrieval interaction actions, visual perception actions, and answer generation actions during the reasoning process. In other words, the target visual language model not only possesses retrieval enhancement generation capabilities but also performs visual perception of multimodal data involved in reasoning, fully considering visual features beyond traditional language and text features. This allows the trained target visual language model to fully and comprehensively understand query features when processing input requests, resulting in high reasoning performance. In other words, this embodiment achieves the goal of processing input requests using a target visual language model with higher reasoning completeness and accuracy, thereby realizing the technical effect of improving reasoning completeness and target answer accuracy through the target visual language model. This solves the technical problems of poor model reasoning accuracy and completeness, and low accuracy of generated target answers in related technologies.
[0190] It should be noted that the preferred embodiments of steps S401 to S402 described above can be found in the foregoing description, and will not be repeated here.
[0191] In the aforementioned operating environment, this application also provides, as follows: Figure 5 Another data processing method is shown. Figure 5 This is a flowchart of another data processing method according to an embodiment of this application, such as... Figure 5 As shown, the data processing method includes:
[0192] Step S501: Obtain a visual document request;
[0193] Step S502: Use the target visual language model to reason and make decisions about the visual document request to obtain the target answer;
[0194] The target visual language model is generated according to any of the above model training methods.
[0195] The aforementioned visual document request can be a multimodal request that includes both text and visual modalities.
[0196] In the application scenario, after obtaining the user's visual document request, the target visual language model is used to reason and make decisions on the visual document request to generate the target answer. This target visual language model can reason and make decisions on the visual document request based on the external environment, determine the sequence of reasoning actions, and use the sequence of reasoning actions to generate the target answer. The external environment is constructed through a visual document library and retrieval tools. The action types corresponding to the sequence of reasoning actions include: retrieval interaction actions, visual perception actions, and answer generation actions.
[0197] In this embodiment, the target visual language model is trained according to any of the above-mentioned model training methods. Based on these methods, the trained target visual language model can complete retrieval interaction actions, visual perception actions, and answer generation actions during the reasoning process. In other words, the target visual language model not only possesses retrieval enhancement generation capabilities but also performs visual perception of multimodal data involved in reasoning, fully considering visual features beyond traditional language and text features. This allows the trained target visual language model to fully and comprehensively understand query features when processing visual document requests, resulting in high reasoning performance. In other words, this embodiment achieves the goal of processing input requests using a target visual language model with higher reasoning completeness and accuracy, thereby realizing the technical effect of improving reasoning completeness and target answer accuracy through the target visual language model. This solves the technical problems of poor model reasoning accuracy and completeness, and low accuracy of generated target answers in related technologies.
[0198] It should be noted that the preferred embodiments of steps S501 to S502 described above can be found in the foregoing description, and will not be repeated here.
[0199] In the aforementioned operating environment, this application also provides, as follows: Figure 6 This is another data processing method shown. Figure 6 This is a flowchart of another data processing method according to an embodiment of this application, such as... Figure 6 As shown, the data processing method includes:
[0200] Step S601: Obtain a data processing request through the first application programming interface, wherein the request data carried in the data processing request includes: an input request;
[0201] Step S602: Return a data processing response through the second application programming interface. The response data carried in the data processing response includes: the target answer, which is obtained by reasoning and making decisions on the input request using the target visual language model.
[0202] The aforementioned target visual language model is generated according to any of the model training methods described above.
[0203] The data processing method described in this application embodiment can run on a cloud server to provide cloud data processing services to clients. The client sends a data processing request by calling a first application programming interface (API). After obtaining the data processing request through the first API, the cloud server generates the target answer according to the data processing method and further returns the target answer to the client through a second API.
[0204] The first and second application programming interfaces (APIs) mentioned above can be the same or different APIs. In one optional embodiment, the interface parameters in the first and second APIs may include, but are not limited to: a global interface identifier, an interface signing key, an interface timestamp, an interface request identifier, and a system call credential identifier. The first API can use a GET request or a POST request as the interface request method to obtain a file processing request. The second API can use a lightweight data exchange format (such as JavaScript Object Notation, or JSON for short) to return a file processing response.
[0205] In this embodiment, the target visual language model is trained according to any of the above-mentioned model training methods. Based on these methods, the trained target visual language model can complete retrieval interaction actions, visual perception actions, and answer generation actions during the reasoning process. In other words, the target visual language model not only possesses retrieval enhancement generation capabilities but also performs visual perception of multimodal data involved in reasoning, fully considering visual features beyond traditional language and text features. This allows the trained target visual language model to fully and comprehensively understand query features when processing input requests, resulting in high reasoning performance. In other words, this embodiment achieves the goal of processing input requests using a target visual language model with higher reasoning completeness and accuracy, thereby realizing the technical effect of improving reasoning completeness and target answer accuracy through the target visual language model. This solves the technical problems of poor model reasoning accuracy and completeness, and low accuracy of generated target answers in related technologies.
[0206] It should be noted that the preferred embodiments of steps S601 to S602 described above can be found in the foregoing description, and will not be repeated here.
[0207] In the aforementioned operating environment, this application also provides, as follows: Figure 7 This is another data processing method shown. Figure 7 This is a flowchart of another data processing method according to an embodiment of this application, such as... Figure 7 As shown, the data processing method includes:
[0208] Step S701: Obtain the currently input data processing dialogue request, wherein the request data carried in the data processing dialogue request includes: input request;
[0209] Step S702: In response to the data processing dialogue request, a data processing dialogue response is returned, wherein the information carried in the data processing dialogue response includes: the target answer, which is obtained by reasoning and making decisions on the input request using the target visual language model;
[0210] Step S703: Display the target answer within the graphical user interface.
[0211] The aforementioned target visual language model is generated according to any of the model training methods described above.
[0212] Based on the above method steps, a visualization scheme for data processing functions is provided. The terminal device provides a graphical user interface (GUI), which displays at least a data processing scenario. The GUI's display content also includes input components (such as text input boxes, voice input controls, etc.) and output components (such as text display windows, image display windows, audio playback windows, etc.). The user inputs a data processing dialogue request through the input components to specify the input request in the data processing task. After detecting the user's input behavior, the target visual language model is used to reason and decide on the input request to obtain the target answer. Furthermore, the target answer is displayed through the output components within the GUI.
[0213] In this embodiment, the target visual language model is trained according to any of the above-mentioned model training methods. Based on these methods, the trained target visual language model can complete retrieval interaction actions, visual perception actions, and answer generation actions during the reasoning process. In other words, the target visual language model not only possesses retrieval enhancement generation capabilities but also performs visual perception of multimodal data involved in reasoning, fully considering visual features beyond traditional language and text features. This allows the trained target visual language model to fully and comprehensively understand query features when processing input requests, resulting in high reasoning performance. In other words, this embodiment achieves the goal of processing input requests using a target visual language model with higher reasoning completeness and accuracy, thereby realizing the technical effect of improving reasoning completeness and target answer accuracy through the target visual language model. This solves the technical problems of poor model reasoning accuracy and completeness, and low accuracy of generated target answers in related technologies.
[0214] It should be noted that the preferred embodiments of steps S701 to S703 described above can be found in the foregoing descriptions, and will not be repeated here.
[0215] In the aforementioned operating environment, this application also provides, as follows: Figure 8 This is another data processing method shown. Figure 8 This is a flowchart of another data processing method according to an embodiment of this application, such as... Figure 8 As shown, the data processing method includes:
[0216] Step S801: Respond to the input command applied to the operation interface and display the input request on the operation interface;
[0217] Step S802: In response to the processing instructions applied to the operation interface, the target answer is displayed on the operation interface. The target answer is obtained by reasoning and making decisions on the input request using a target visual language model.
[0218] The aforementioned target visual language model is generated according to any of the model training methods described above.
[0219] The data processing method provided in this application embodiment can utilize the aforementioned target visual language model to implement a visualized data processing scheme, facilitating human-computer interaction. The user uploads an input request by triggering an input command on the operation interface. Further, the user triggers a processing command on the operation interface, instructing the system to drive the target visual language model to perform reasoning and decision-making on the input request according to the aforementioned data processing method, thereby obtaining the target answer. Further, the system displays the target answer within the operation interface for the user.
[0220] In this embodiment, the target visual language model is trained according to any of the above-mentioned model training methods. Based on these methods, the trained target visual language model can complete retrieval interaction actions, visual perception actions, and answer generation actions during the reasoning process. In other words, the target visual language model not only possesses retrieval enhancement generation capabilities but also performs visual perception of multimodal data involved in reasoning, fully considering visual features beyond traditional language and text features. This allows the trained target visual language model to fully and comprehensively understand query features when processing input requests, resulting in high reasoning performance. In other words, this embodiment achieves the goal of processing input requests using a target visual language model with higher reasoning completeness and accuracy, thereby realizing the technical effect of improving reasoning completeness and target answer accuracy through the target visual language model. This solves the technical problems of poor model reasoning accuracy and completeness, and low accuracy of generated target answers in related technologies.
[0221] It should be noted that the preferred embodiments of steps S801 to S802 described above can be found in the foregoing description, and will not be repeated here.
[0222] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0223] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, they can also be implemented by hardware. 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 storage medium (such as read-only memory (ROM), random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0224] According to an embodiment of this application, an apparatus embodiment for implementing the above-described model training method is also provided. Figure 9 This is a schematic diagram of a model training device according to an embodiment of this application, as shown below. Figure 9 As shown, the device includes: an acquisition module 901 for acquiring training data, wherein the training data includes multimodal requests; and a training module 902 for performing reinforcement learning training on an initial visual language model based on the training data to obtain a target visual language model. The initial visual language model is used to make inference decisions about multimodal requests based on a reinforcement learning environment to obtain a sequence of inference actions, and to generate inference answers using the inference action sequence. The reinforcement learning environment is constructed using a visual document library and retrieval tools. The action types corresponding to the inference action sequence include: retrieval interaction actions, visual perception actions, and answer generation actions.
[0225] Optionally, the training data also includes reference information, which describes the expected reasoning method corresponding to the multimodal request. The training module 902 is further used to: perform iterative reasoning decisions on the multimodal request in multiple rounds using the initial visual language model to obtain the reasoning trajectory; calculate the target reward signal based on the training data and the reasoning trajectory; and adjust the parameters of the initial visual language model using the target reward signal to obtain the target visual language model.
[0226] Optionally, the training module 902 is further configured to: use the initial visual language model to perform iterative reasoning decisions on multimodal requests in multiple rounds to obtain a decision thinking sequence and a reasoning action sequence; drive the initial visual language model to interact with the reinforcement learning environment based on the reasoning action sequence to obtain an environment observation sequence; and obtain a reasoning trajectory based on the decision thinking sequence, the reasoning action sequence, and the environment observation sequence.
[0227] Optionally, the reasoning action sequence includes round actions corresponding to multiple rounds. The training module 902 is further used to: for the first round among the multiple rounds, use the initial visual language model to make reasoning decisions on the multimodal request and determine the round action corresponding to the first round; for the target rounds among the multiple rounds other than the first round, use the initial visual language model to make reasoning decisions on the historical trajectory and determine the round action corresponding to the target round, wherein the historical trajectory is a partial reasoning trajectory corresponding to the historical rounds before the target round.
[0228] Optionally, the environmental observation sequence includes multiple rounds of observation corresponding to multiple rounds. The training module 902 is further used to: respond to the round action corresponding to the target round as a retrieval interaction action, determine the retrieval keywords based on the historical trajectory corresponding to the target round; drive the initial visual language model to call the retrieval tool to search the visual document library according to the retrieval keywords and obtain the retrieval results; determine the round observation corresponding to the target round based on the retrieval results and obtain the environmental observation sequence.
[0229] Optionally, the training module 902 is further configured to: respond to the target round's action as a visual perception action, determine the content to be perceived based on the historical trajectory corresponding to the target round; drive the initial visual language model to perform multi-scale visual perception of the content to be perceived, and obtain the target perception result, wherein the target perception result is used to describe the visual features of the content to be perceived; and determine the round observation corresponding to the target round based on the target perception result, and obtain the environmental observation sequence.
[0230] Optionally, the training module 902 is further configured to: drive the initial visual language model to perform global visual perception of the content to be perceived, and obtain a first perception result; drive the initial visual language model to select the region of interest corresponding to the content to be perceived, and perform regional visual perception of the content to be perceived based on the region of interest, and obtain a second perception result, wherein the region of interest is determined by the regional information density corresponding to the content to be perceived; and fuse the first perception result and the second perception result to obtain a target perception result.
[0231] Optionally, the training module 902 is further configured to: dynamically update the region of interest based on the historical trajectory corresponding to the target round, wherein the historical trajectory includes the perception region markers corresponding to the target perception results of the historical rounds.
[0232] Optionally, the training module 902 is further configured to: generate an answer action in response to the round action corresponding to the target round, drive the initial visual language model to generate a reasoning answer based on the historical trajectory corresponding to the target round; determine the round observation corresponding to the target round based on the reasoning answer, and obtain an environmental observation sequence.
[0233] Optionally, the reference information includes reference visual information, reference answer, and reference inference path corresponding to the multimodal request. The training module 902 is further used to: calculate a retrieval performance reward based on the retrieval results corresponding to the reference visual information and inference path, wherein the retrieval performance reward is used to evaluate the relevance between the retrieval results and the reference visual information; calculate an inference output reward based on the inference answer corresponding to the reference answer and inference path, wherein the inference output reward is used to evaluate the matching degree between the inference answer and the reference answer; calculate an inference pattern reward based on the reference inference path and the inference action sequence corresponding to the inference path, wherein the inference pattern reward is used to evaluate the similarity between the reference inference path and the inference action sequence; and determine the target reward signal using the retrieval performance reward, inference output reward, and inference pattern reward.
[0234] Optionally, the reference visual information is a set of relevant images corresponding to the multimodal request, and the retrieval results include the retrieved images. The training module 902 is further used to: compare and calculate the retrieval images with the set of relevant images to obtain a relevance score; determine the cumulative loss gain corresponding to the inference trajectory based on the relevance score; and calculate the retrieval performance reward using the cumulative loss gain and the preset expected loss gain.
[0235] Optionally, the training module 902 is further configured to: determine the first line probability distribution corresponding to the inference trajectory based on the target reward signal; analyze the inference trajectory using a preset reference model to generate a second line probability distribution; calculate the divergence loss based on the first line probability distribution and the second line probability distribution; and adjust the parameters of the initial visual language model according to the divergence loss to obtain the target visual language model.
[0236] It should be noted that the acquisition module 901 and training module 902 mentioned above correspond to steps S202 to S204 in the embodiments. The two modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the foregoing embodiments.
[0237] According to an embodiment of this application, an apparatus embodiment for implementing the above-described data processing method is also provided. Figure 10 This is a schematic diagram of the structure of a data processing apparatus according to an embodiment of this application, such as... Figure 10 As shown, the device includes: an acquisition module 1001 for acquiring an input request; and a processing module 1002 for using a target visual language model to perform reasoning and decision-making on the input request and generate a target answer; wherein the target visual language model is generated according to any of the above model training methods.
[0238] It should be noted that the above-mentioned acquisition module 1001 and processing module 1002 correspond to steps S401 to S402 in the embodiment. The two modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the foregoing embodiment.
[0239] According to an embodiment of this application, another embodiment of an apparatus for implementing the above-described data processing method is also provided. Figure 11 This is a schematic diagram of another data processing apparatus according to an embodiment of this application, such as... Figure 11 As shown, the device includes: an acquisition module 1101 for acquiring a visual document request; and a processing module 1102 for using a target visual language model to perform reasoning and decision-making on the visual document request to obtain a target answer; wherein the target visual language model is generated according to any of the above model training methods.
[0240] It should be noted here that the above-mentioned acquisition module 1101 and processing module 1102 correspond to steps S501 to S502 in the embodiment. The two modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the foregoing embodiment.
[0241] According to an embodiment of this application, another embodiment of an apparatus for implementing the above-described data processing method is also provided. Figure 12 This is a schematic diagram of the structure of another data processing apparatus according to an embodiment of this application, such as... Figure 12 As shown, the device includes:
[0242] The acquisition module 1201 is used to acquire a data processing request through a first application programming interface, wherein the request data carried in the data processing request includes: an input request;
[0243] The return module 1202 is used to return a data processing response through the second application programming interface. The response data carried in the data processing response includes: the target answer, which is obtained by reasoning and making decisions on the input request using the target visual language model. The target visual language model is generated according to any of the above model training methods.
[0244] It should be noted that the above-mentioned acquisition module 1201 and processing module 1202 correspond to steps S601 to S602 in the embodiment. The two modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the foregoing embodiment.
[0245] According to an embodiment of this application, another embodiment of an apparatus for implementing the above-described data processing method is also provided. Figure 13 This is a schematic diagram of the structure of another data processing apparatus according to an embodiment of this application, such as... Figure 13 As shown, the device includes: an acquisition module 1301, used to acquire the currently input data processing dialogue request, wherein the request data carried in the data processing dialogue request includes: an input request; a return module 1302, used to respond to the data processing dialogue request and return a data processing dialogue response, wherein the information carried in the data processing dialogue response includes: a target answer, which is obtained by reasoning and making decisions on the input request using a target visual language model, and the target visual language model is generated according to any of the above model training methods; and a display module 1303, used to display the target answer within a graphical user interface.
[0246] It should be noted that the above-mentioned acquisition module 1301 and processing module 1302 correspond to steps S701 to S703 in the embodiment. The two modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the foregoing embodiment.
[0247] According to an embodiment of this application, another embodiment of an apparatus for implementing the above-described data processing method is also provided. Figure 14 This is a schematic diagram of the structure of another data processing apparatus according to an embodiment of this application, such as... Figure 14 As shown, the device includes: a first response module 1401, used to respond to input instructions applied to the operation interface and display the input request on the operation interface; a second response module 1402, used to respond to processing instructions applied to the operation interface and display the target answer on the operation interface; wherein, the target answer is obtained by reasoning and making decisions on the input request using a target visual language model, and the target visual language model is generated according to any of the above model training methods.
[0248] It should be noted that the above-mentioned acquisition module 1401 and processing module 1402 correspond to steps S801 to S802 in the embodiment. The two modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the foregoing embodiment.
[0249] It should be noted that the above-mentioned modules or units may be hardware or software components stored in memory and processed by one or more processors. The above-mentioned modules may also be part of a device and run in a computer terminal.
[0250] It should be noted that the preferred implementation of this embodiment can be found in the relevant descriptions of the foregoing embodiments, and will not be repeated here.
[0251] It should be noted that the preferred embodiments involved in the above embodiments of this application are the same as the solutions, application scenarios and implementation processes provided in the above embodiments, but are not limited to the solutions provided in the above embodiments.
[0252] Embodiments of this application may provide a data processing system, including: a client for sending an input request; a server connected to the client for using a target visual language model to perform reasoning and decision-making on the input request to obtain a target answer; the client is also used to output the target answer; wherein the target visual language model is generated according to any of the above model training methods.
[0253] Embodiments of this application may provide an electronic device, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the model training method or the data processing method of any of the above-mentioned methods during runtime.
[0254] Figure 15 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 15 As shown, the electronic device 150 may include: one or more (only one is shown in the figure) processors 152, memory 154, memory controller, and peripheral interfaces.
[0255] The aforementioned electronic device can be understood as an integrated smart terminal, including but not limited to servers, desktop computers, personal computers (PCs), all-in-one model machines, etc., and the electronic device may have the model described in the above embodiments of this application pre-installed.
[0256] Specifically, this electronic device can pre-install various types of models, including but not limited to models in natural language processing, visual processing, speech processing, code processing, and multimodal task processing, thus providing diverse model selection. In different product forms, this electronic device can support one or more model usage methods, including but not limited to model training, model invocation, model fine-tuning, model deployment, model inference, and application. In some product forms, this electronic device also supports model management, including but not limited to multi-type model management (supporting the management of discriminative, generative, and other model types), model version control (supporting the control of different model versions), and model evaluation (evaluating model performance and effectiveness based on model evaluation tools). In other product forms, this electronic device can also create applications based on models, providing Application Programming Interface (API) invocation capabilities. Models can be invoked into the created applications through the API interface, and application management tools are provided to manage and monitor the applications.
[0257] Furthermore, the electronic device may also include data management (supporting the creation and management of model tuning datasets), a training center (providing rich training resources to help users learn and master artificial intelligence (AI) technology), and basic control capabilities (providing enterprise-level basic control capabilities to ensure the security and efficient operation of the system). Through the above functions, it provides a comprehensive and integrated device for AI development, training, deployment, and application.
[0258] The memory can be used to store software programs and modules, such as the program instructions corresponding to the model training method and data processing method in the embodiments of this application, and the program modules corresponding to the model training device and data processing device. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the model training method and data processing method in the above embodiments. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to terminal A via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0259] The processor can invoke the executable program stored in the memory through the transmission device to execute any of the model training methods and data processing methods described in the above embodiments.
[0260] Those skilled in the art will understand that, Figure 15 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, and mobile internet devices (MIDs) and other terminal devices. Figure 15 This does not limit the structure of the aforementioned electronic device. For example, electronic device 150 may also include components that are more... Figure 15 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 15 The different configurations shown.
[0261] Those skilled in the art will understand that all or part of the steps in the various model training methods and data processing methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0262] Embodiments of this application also provide a computer-readable storage medium. Optionally, in this embodiment, the computer-readable storage medium includes a stored executable program, wherein, when the executable program runs, it controls the device where the computer-readable storage medium is located to execute the model training method and data processing method described above.
[0263] Optionally, in this embodiment, the storage medium may be located in an electronic device.
[0264] Optionally, in this embodiment, the computer-readable storage medium is configured to store an executable program, which, when the executable program is running, controls the device where the computer-readable storage medium is located to execute any of the model training methods and data processing methods described in the above embodiments.
[0265] Embodiments of this application also provide a computer program product. Optionally, in this embodiment, the computer program product may include a computer program that, when executed by a processor, implements the model training method and data processing method provided in the above embodiments.
[0266] Embodiments of this application also provide a computer program product. Optionally, the computer program product may include a non-volatile computer-readable storage medium, which can be used to store a computer program. When the computer program is executed by a processor, it implements the model training method and data processing method provided in the above embodiments.
[0267] Embodiments of this application also provide a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, it implements the model training method and data processing method provided in the above embodiments.
[0268] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0269] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.
[0270] The units described above as separate components may or may not be physically separate. 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 units can be selected to achieve the purpose of this embodiment according to actual needs.
[0271] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0272] If the aforementioned integrated units are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the model training method and data processing method described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, ROM, RAM, portable hard drives, magnetic disks, or optical disks.
[0273] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.< / region>
Claims
1. A model training method, characterized in that, include: Acquire training data, wherein the training data includes multimodal requests; Based on the training data, the initial visual language model is trained using reinforcement learning to obtain the target visual language model; The initial visual language model is used to make inference decisions on the multimodal request based on the reinforcement learning environment to obtain a sequence of inference actions, and to generate an inference answer using the sequence of inference actions. The reinforcement learning environment is constructed through a visual document library and retrieval tools. The action types corresponding to the sequence of inference actions include: retrieval interaction actions, visual perception actions, and answer generation actions.
2. The model training method according to claim 1, characterized in that, Based on the training data, the initial visual language model is trained using reinforcement learning to obtain the target visual language model, which includes: The initial visual language model is used to perform iterative reasoning and decision-making on the multimodal request in multiple rounds to obtain the reasoning trajectory; The target reward signal is calculated based on the training data and the inference trajectory. The initial visual language model is adjusted using the target reward signal to obtain the target visual language model.
3. The model training method according to claim 2, characterized in that, Using the initial visual language model, iterative reasoning decisions are made on the multimodal request through multiple rounds, resulting in the following reasoning trajectory: The initial visual language model is used to perform iterative reasoning and decision-making on the multimodal request in multiple rounds to obtain the decision thinking sequence and the reasoning action sequence; Based on the reasoning action sequence, the initial visual language model is driven to interact with the reinforcement learning environment to obtain an environmental observation sequence; The reasoning trajectory is obtained based on the decision-making sequence, the reasoning action sequence, and the environmental observation sequence.
4. The model training method according to claim 3, characterized in that, The reasoning action sequence includes round actions corresponding to the multiple rounds. The initial visual language model is used to perform iterative reasoning decisions on the multimodal request for multiple rounds, resulting in the reasoning action sequence including: For the first round among the multiple rounds, the initial visual language model is used to reason and make decisions on the multimodal request to determine the round action corresponding to the first round; For the target rounds other than the first round among the multiple rounds, the initial visual language model is used to make inference decisions on the historical trajectory to determine the round action corresponding to the target round, wherein the historical trajectory is a partial inference trajectory corresponding to the historical rounds before the target round.
5. The model training method according to claim 3, characterized in that, The environment observation sequence includes multiple rounds of observation corresponding to multiple rounds. Based on the reasoning action sequence, the initial visual language model is driven to interact with the reinforcement learning environment to obtain the environment observation sequence, which includes: The search interaction action is responded to in response to the target round's corresponding round action, and the search keywords are determined based on the historical trajectory corresponding to the target round. The initial visual language model is driven to call the retrieval tool to search the visual document library based on the retrieval keywords, and the retrieval results are obtained; Based on the search results, the observation round corresponding to the target round is determined, and the environmental observation sequence is obtained.
6. The model training method according to claim 3, characterized in that, Based on the inference action sequence, the initial visual language model is driven to interact with the reinforcement learning environment to obtain the environment observation sequence, which includes: The visual perception action is responded to in response to the action corresponding to the target round, and the content to be perceived is determined based on the historical trajectory corresponding to the target round. The initial visual language model is driven to perform multi-scale visual perception of the content to be perceived, and a target perception result is obtained, wherein the target perception result is used to describe the visual features of the content to be perceived. Based on the target perception results, the corresponding round of observation is determined, and the environmental observation sequence is obtained.
7. The model training method according to claim 6, characterized in that, The initial visual language model is driven to perform multi-scale visual perception of the content to be perceived, and the target perception result is obtained by: The initial visual language model is driven to perform global visual perception of the content to be perceived, and a first perception result is obtained. The initial visual language model is driven to select the region of interest corresponding to the content to be perceived, and the region of interest is used to perform regional visual perception on the content to be perceived to obtain a second perception result, wherein the region of interest is determined by the regional information density corresponding to the content to be perceived. The first perception result and the second perception result are fused to obtain the target perception result.
8. The model training method according to claim 5, characterized in that, Based on the inference action sequence, the initial visual language model is driven to interact with the reinforcement learning environment to obtain the environment observation sequence, which includes: In response to the round action corresponding to the target round as the answer generation action, the initial visual language model is driven to generate a reasoning answer based on the historical trajectory corresponding to the target round; Based on the reasoning answer, the observation round corresponding to the target round is determined, and the environmental observation sequence is obtained.
9. The model training method according to claim 2, characterized in that, The training data also includes reference information, which describes the expected reasoning method corresponding to the multimodal request. The reference information includes reference visual information, a reference answer, and a reference reasoning path corresponding to the multimodal request. The target reward signal is calculated based on the training data and the reasoning trajectory, including: A retrieval performance reward is calculated based on the reference visual information and the retrieval results corresponding to the inference path, wherein the retrieval performance reward is used to evaluate the relevance between the retrieval results and the reference visual information; The reasoning output reward is calculated based on the reference answer and the reasoning answer corresponding to the reasoning path, wherein the reasoning output reward is used to evaluate the matching degree between the reasoning answer and the reference answer; A reasoning pattern reward is calculated based on the reference reasoning path and the reasoning action sequence corresponding to the reasoning path, wherein the reasoning pattern reward is used to evaluate the similarity between the reference reasoning path and the reasoning action sequence; The target reward signal is determined using the retrieval performance reward, the inference output reward, and the inference pattern reward.
10. The model training method according to claim 9, characterized in that, The reference visual information is a set of relevant images corresponding to the multimodal request, and the retrieval results include the retrieved images. The retrieval performance reward is calculated based on the reference visual information and the retrieval results, including: The retrieved image is compared with the set of related images to obtain a relevance score; Based on the correlation score, determine the cumulative loss gain corresponding to the inference trajectory; The retrieval performance reward is calculated using the cumulative loss gain and the preset expected loss gain.
11. The model training method according to claim 2, characterized in that, The initial visual language model is adjusted using the target reward signal to obtain the target visual language model, which includes: Based on the target reward signal, determine the probability distribution of the first behavior corresponding to the reasoning trajectory; The inference trajectory is analyzed using a pre-set reference model to generate a probability distribution for the second line of reasoning. The divergence loss is calculated based on the first behavior probability distribution and the second behavior probability distribution. The initial visual language model is adjusted according to the divergence loss to obtain the target visual language model.
12. A data processing method, characterized in that, include: Get input request; The target visual language model is used to reason and make decisions about the input request, generating the target answer. The target visual language model is generated according to the model training method described in any one of claims 1 to 11.
13. A data processing method, characterized in that, include: Request a visual document; The target visual language model is used to reason and make decisions regarding the visual document request to obtain the target answer. The target visual language model is generated according to the model training method described in any one of claims 1 to 11.
14. A data processing method, characterized in that, include: A data processing request is obtained through a first application programming interface, wherein the request data carried in the data processing request includes: an input request; A data processing response is returned through a second application programming interface, wherein the response data carried in the data processing response includes: a target answer, which is obtained by reasoning and making decisions on the input request using a target visual language model, and the target visual language model is generated according to the model training method described in any one of claims 1 to 11.
15. A data processing method, characterized in that, include: Obtain the currently input data processing dialogue request, wherein the request data carried in the data processing dialogue request includes: input request; In response to the data processing dialogue request, a data processing dialogue response is returned, wherein the information carried in the data processing dialogue response includes: a target answer, which is obtained by reasoning and making decisions on the input request using a target visual language model, and the target visual language model is generated according to the model training method described in any one of claims 1 to 11; The target answer is displayed within the graphical user interface.
16. A data processing method, characterized in that, include: In response to input commands applied to the user interface, the user interface displays the input request. In response to processing instructions applied to the user interface, the target answer is displayed on the user interface. The target answer is obtained by reasoning and making decisions on the input request using a target visual language model, and the target visual language model is generated according to the model training method described in any one of claims 1 to 11.
17. A data processing system, characterized in that, include: The client is used to send input requests; The server, connected to the client, is used to perform reasoning and decision-making on the input request using a target visual language model to obtain the target answer; The client is also used to output the target answer; The target visual language model is generated according to the model training method described in any one of claims 1 to 11.
18. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, performs the model training method according to any one of claims 1 to 11 or the data processing method according to any one of claims 12 to 16.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium is located to perform the model training method of any one of claims 1 to 11 or the data processing method of any one of claims 12 to 16.
20. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the model training method according to any one of claims 1 to 11 or the data processing method according to any one of claims 12 to 16.
