Data processing method and apparatus based on multi-modal model, and device and medium
Through the multi-modal model processing method, target questions are generated and answers are output using the multi-modal target model, which solves the problem of low data retrieval efficiency in the existing technology and achieves fast and accurate data processing and automatic diagnosis capabilities.
Patent Information
- Application Number
- PCT/CN2024/089451
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-28
- Filing Date
- 2024-04-24
- Publication Date
- 2024-10-31
AI Technical Summary
Existing technologies consume a large amount of computing resources and time when retrieving data required by users from a large amount of network data, resulting in a waste of server resources and long user waiting times.
Using a data processing method based on multi-modal models, by determining initial question features, obtaining additional question features, generating target questions, and using the multi-modal target model to output candidate answers, we can quickly locate the target answers to the original input questions and save computing resources. and time.
It can quickly and accurately query target answers from a large amount of data, save server resources, provide abnormal logical analysis and reasoning capabilities, realize automatic abnormal diagnosis, and improve data processing efficiency and accuracy.
Smart Images

Figure CN2024089451_31102024_PF_FP_ABST
Abstract
Description
A data processing method, device, equipment and medium based on multimodal model Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a data processing method, apparatus, device, and medium based on a multimodal model. Background Art
[0002] With the rapid development of network technology, network data is increasing in volume. To retrieve the data users need from this vast amount of network data, users need to provide keywords, which the server then uses to retrieve the data they need. However, due to the sheer volume of network data, retrieving the data required by the server consumes significant computing resources and takes a considerable amount of time. This leads to significant resource consumption on the server and long wait times for users to retrieve the data they need. For example, in real-world scenarios, numerous cameras are deployed, capturing a vast amount of images. Analyzing these images to find the data required by the user requires significant computing resources and time.
[0003] Summary of the Invention
[0004] The present application provides a data processing method based on a multimodal model, the method comprising: determining an initial question feature that matches a configured question template based on an original input question; acquiring multiple additional question features associated with the initial question feature based on the initial question feature; generating multiple target questions based on the initial question feature and the multiple additional question features, each target question comprising the initial question feature and at least one additional question feature; for each target question, inputting the target question into a trained multimodal target model, and having the multimodal target model output a candidate answer corresponding to the target question; and determining a target answer corresponding to the original input question based on the candidate answer corresponding to each target question.
[0005] The present application provides a data processing device based on a multimodal model, the device comprising: a determination module for determining an initial question feature that matches a question template based on an original input question; an acquisition module for acquiring multiple additional question features associated with the initial question feature; a generation module for generating multiple target questions based on the initial question feature and the multiple additional question features, each target question comprising the initial question feature and at least one additional question feature; the acquisition module is further configured to input each target question into a trained multimodal target model, and the multimodal target model outputs a candidate answer corresponding to the target question; the determination module is further configured to determine a target answer corresponding to the original input question based on the candidate answer corresponding to each target question, the target answer being the output result of the original input question.
[0006] The present application provides an electronic device, comprising: a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the multimodal model-based data processing method of the above example.
[0007] It can be seen from the above technical solution that in the embodiment of the present application, multiple target questions can be generated based on the initial question features and multiple additional question features, and the candidate answers corresponding to each target question can be obtained through the multimodal target model. The target answer corresponding to the original input question is determined based on the candidate answers corresponding to each target question, so as to obtain the target answer with the help of the multimodal target model, and accurate and reliable target answers can be obtained through multiple target questions. It only takes a small amount of computing resources to query the target answer corresponding to the original input question from a large amount of data, and the time to obtain the target answer is shorter, thereby saving the computing resources of the server and saving time overhead. It can quickly locate the target answer corresponding to the original input question, provide abnormal logical analysis and reasoning capabilities, realize automatic abnormality diagnosis, and use the analysis capabilities of the multimodal target model to give accurate and reliable target answers, comprehensively considering the possibilities of various dimensions such as images, videos, and voice. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments of the present application or the description of the prior art. The drawings described below are only some of the embodiments described in this application. For those skilled in the art, other drawings can also be obtained based on these drawings of the embodiments of the present application.
[0009] FIG1 is a flow chart of a data processing method based on a multimodal model in one embodiment.
[0010] FIG2 is a flow chart of a data processing method based on a multimodal model in one embodiment.
[0011] FIG3 is a schematic diagram of a self-inference method based on a multimodal model in one embodiment.
[0012] FIG4 is a schematic structural diagram of a data processing device based on a multimodal model in one embodiment.
[0013] FIG5 is a hardware structure diagram of an electronic device in an embodiment. DETAILED DESCRIPTION
[0014] The terms used in the examples of this application are only for the purpose of describing specific embodiments, and are not intended to limit this application. The singular forms "a," "the," and "the" used in the specification and claims of this application are also intended to include plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to any or all possible combinations of one or more associated listed items.
[0015] It should be understood that although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" used may also be interpreted as "at the time of" or "when" or "in response to determining".
[0016] The present application provides a data processing method based on a multimodal model. The method can be applied to any device, such as a server. As shown in FIG1 , the method may include:
[0017] Step 101: Determine initial question features that match a configured question template based on an original input question.
[0018] Step 102: Acquire multiple additional question features associated with the initial question features based on the initial question features.
[0019] Step 103: Generate multiple target questions based on the initial question feature and the multiple additional question features; wherein each target question includes the initial question feature and at least one additional question feature.
[0020] Step 104: For each target question, input the target question into the trained multimodal target model, and the multimodal target model outputs a candidate answer corresponding to the target question.
[0021] Step 105: Determine a target answer corresponding to the original input question based on the candidate answers corresponding to each target question. The target answer may be the final output result for the original input question.
[0022] Exemplarily, determining the initial question features that match the configured question template based on the original input question may include, but is not limited to: if the question template includes a feature type, determining whether there is a key value that matches the feature type in the original input question; if there is a key value that matches the feature type, determining the initial question features based on the key value. If there is no key value that matches the feature type, analyzing the original input question to obtain the initial question features that match the feature type; alternatively, a prompt message for the feature type may be sent to the user, and the user may provide a new original input question based on the prompt message; if the new original input question contains a key value that matches the feature type, determining the initial question features based on the key value.
[0023] Exemplarily, obtaining multiple additional problem features associated with the initial problem feature based on the initial problem feature may include, but is not limited to: inputting the initial problem feature into a trained feature analysis target model, and having the feature analysis target model output multiple additional problem features associated with the initial problem feature. Alternatively, inputting the initial problem feature into a multimodal target model, and having the multimodal target model output multiple additional problem features associated with the initial problem feature. Alternatively, analyzing multiple additional problem features associated with the initial problem feature based on the initial problem feature (i.e., analyzing the initial problem feature to obtain multiple additional problem features associated with the initial problem feature).
[0024] Exemplarily, the feature analysis target model may be a feature analysis target model that matches the target scene type; the problem template may be a problem template that matches the target scene type; wherein the target scene type may be a behavior abnormality type, a vehicle abnormality type, or an industrial abnormality type.
[0025] Exemplarily, generating multiple target questions based on the initial question feature and multiple additional question features may include, but is not limited to: selecting candidate additional question features from multiple additional question features; after combining the initial question feature and the candidate additional question features, for each combination, adding context information to the initial question feature and / or the candidate additional question feature to obtain the target question corresponding to the candidate additional question feature.
[0026] Exemplarily, determining the target answer corresponding to the original input question based on the candidate answer corresponding to each target question may include but is not limited to: based on the candidate answer corresponding to each target question, filtering candidate answers with repeated content from all candidate answers to obtain at least one remaining candidate answer, and determining the number of occurrences of each remaining candidate answer among all candidate answers; determining the remaining candidate answer with the maximum number of occurrences as the target answer corresponding to the original input question; or, if the appearance ratio value of the remaining candidate answer corresponding to the maximum number of occurrences among all candidate answers is greater than a preset threshold, determining the remaining candidate answer with the maximum number of occurrences as the target answer corresponding to the original input question.
[0027] Exemplarily, after determining the target answer corresponding to the original input question based on the candidate answers corresponding to each target question, the target data corresponding to the target answer can be output. The target data may include the target answer, or the target data may include the target answer and additional question features corresponding to the target answer; wherein the target answer may include but is not limited to answers in at least one dimension of image, text, sound and video; wherein the target answer may correspond to multiple candidate answers, and the additional question features corresponding to the target answer may include additional question features corresponding to each candidate answer corresponding to the target answer.
[0028] For example, the above execution order is only for the convenience of describing the examples given. In actual applications, the execution order between the steps can also be changed, and this execution order is not limited. Moreover, in other embodiments, the steps of the corresponding method are not necessarily executed in the order shown and described in this application. The steps included in the method in other embodiments may be more or less than those described in this application. In addition, a single step described in this application may be decomposed into multiple steps for description in other embodiments; multiple steps described in this application may also be combined into a single step for description in other embodiments.
[0029] It can be seen from the above technical solution that in the embodiment of the present application, multiple target questions can be generated based on the initial question features and multiple additional question features, and the candidate answers corresponding to each target question can be obtained through the multimodal target model. The target answer corresponding to the original input question is determined based on the candidate answers corresponding to each target question, so as to obtain the target answer with the help of the multimodal target model, and accurate and reliable target answers can be obtained through multiple target questions. It only takes a small amount of computing resources to query the target answer corresponding to the original input question from a large amount of data, and the time to obtain the target answer is shorter, thereby saving the computing resources of the server and saving time overhead. It can quickly locate the target answer corresponding to the original input question, provide abnormal logical analysis and reasoning capabilities, realize automatic abnormality diagnosis, and use the analysis capabilities of the multimodal target model to give accurate and reliable target answers, comprehensively considering the possibilities of various dimensions such as images, videos, and voice.
[0030] The above technical solutions in the embodiments of the present application are described below in combination with specific application scenarios.
[0031] Due to the large volume of network data (such as text, video, audio, and images), servers consume significant computing resources and take considerable time to retrieve the data users need. This leads to significant server resource consumption and long user wait times. For example, in real-world scenarios, numerous cameras are deployed, capturing vast quantities of images. Analyzing these images for the data users need requires significant computing resources and time.
[0032] In response to the above findings, the present application proposes a data processing method based on a multimodal model. Based on this method, a target answer is obtained with the help of a multimodal target model, and accurate and reliable target answers are obtained by using multiple target questions. Only a small amount of computing resources is required to query the target answer corresponding to the original input question from a large amount of data. The time to obtain the target answer is shortened, thereby saving server computing resources and time overhead, and can quickly locate the target answer corresponding to the original input question.
[0033] Exemplarily, a question template can be pre-configured, and the question template can include at least one feature type, indicating that the original input question should provide a key value that matches the feature type. The question template can be a question template that matches a certain scenario type. For example, scenario types can include, but are not limited to, behavioral anomaly types, vehicle anomaly types, and industrial anomaly types. Therefore, a question template a1 that matches the behavioral anomaly type, a question template a2 that matches the vehicle anomaly type, and a question template a3 that matches the industrial anomaly type can be pre-configured. Of course, the above types are merely examples of scenario types and are not limiting.
[0034] For example, question template a1 may include, but is not limited to, at least one of the following: time type, location type, and behavior event type. The behavior event type may be a specific behavior, such as fighting, robbery, or lost property. This behavior event type is subsequently recorded as behavior X, indicating the event type of behavior X, without any restrictions on behavior X.
[0035] Question template a2 may include, but is not limited to, at least one of the following: time type, location type, and behavior event type. The behavior event type may be a specific vehicle behavior, such as "running a red light" or "speeding," indicating the event type associated with the specific vehicle behavior. This is not a limitation.
[0036] The question template a3 may include but is not limited to at least one of the following: sound type, vibration type, acceleration type, angular velocity type, temperature type, and humidity type, and there is no limitation to this.
[0037] Of course, the above templates are just a few examples of question templates, and there is no limitation on this question template.
[0038] For example, for each scene type, a feature analysis target model corresponding to the scene type can be trained. For example, a feature analysis target model b1 corresponding to the behavioral anomaly type, a feature analysis target model b2 corresponding to the vehicle anomaly type, and a feature analysis target model b3 corresponding to the industrial anomaly type can be trained. Of course, the same feature analysis target model can also be trained for all scene types.
[0039] In order to train the feature analysis target model b1, sample data related to the "behavior abnormality type" can be collected. The sample data includes information related to the time type, information related to the location type, and information related to behavior X. In addition to the above information, the sample data can also include other types of information. Training can be performed based on a large amount of sample data to obtain the feature analysis target model b1. There is no restriction on this training process.
[0040] In order to train the feature analysis target model b2, sample data related to the "vehicle abnormality type" can be collected. The sample data includes information related to the time type, information related to the location type, and information related to specific vehicle behavior. In addition to the above information, the sample data can also include other types of information. Training can be performed based on a large amount of sample data to obtain the feature analysis target model b2. There is no restriction on this training process.
[0041] In order to train the feature analysis target model b3, sample data related to the "industrial abnormality type" can be collected. The sample data includes information related to the sound type, information related to the vibration type, information related to the acceleration type, information related to the angular velocity type, information related to the temperature type, and information related to the humidity type. In addition to the above information, the sample data can also include other types of information. Training can be performed based on a large amount of sample data to obtain the feature analysis target model b3. There is no restriction on this training process.
[0042] Of course, the above models are just a few examples of feature analysis target models and are not limited to them.
[0043] In the above application scenario, an embodiment of the present application proposes a data processing method based on a multimodal model. The method can be applied to a server. As shown in FIG2 , the method may include:
[0044] Step 201: Obtain the original input question. For example, the server may receive the original input question input by the user, or may obtain the original input question in other ways, without limiting the source of the original input question.
[0045] For example, for an application scenario involving abnormal behavior, an example of the original input question could be "Please help me search for pedestrians who appeared at the Chuangxin Road intersection around 3 pm on March 21, 2022. Who among these pedestrians is most likely to be the target of behavior X at the intersection at this time?"
[0046] For example, for an application scenario involving vehicle anomalies, an example of the original input question could be, "Please help me search for vehicles that appeared at the Chuangxin Road intersection around 3 p.m. on March 21, 2022. Which of these vehicles is most likely to be the target of a red light run at the intersection at this time?"
[0047] Of course, the above problems are just two examples of original input problems, and there is no restriction on the original input problems.
[0048] Step 202: Determine initial question features that match the question template based on the original input question.
[0049] Exemplarily, the server may determine the target scene type (i.e., the scene type of the current application scene) based on or not based on the original input question. For example, the server may determine the target scene type based on the original input question and determine a question template that matches the target scene type, and determine the initial question features that match the question template based on the original input question. For example, if the target scene type is determined to be a behavioral anomaly type based on the original input question, the server determines the initial question features that match the question template a1 based on the original input question. The server may also determine the target scene type not based on the original input question; for example, the server may first determine the target scene type (which may be determined in advance by the user) and determine the question template that matches the target scene type. At this time, the original input question input needs to conform to the scene type of the current application scene, and then the server determines the initial question features that match the question template. For example, if the target scene type is a vehicle anomaly type, the server determines the initial question features that match the question template a2 based on the original input question. If the target scene type is an industrial anomaly type, the server determines the initial question features that match the question template a3 based on the original input question.
[0050] For example, the question template that matches the target scene type may be question template a1, and question template a1 may include a time type, a location type, and a behavior event type. The server extracts the key value "3:00 p.m., March 21, 2022" that matches the time type from the original input question, extracts the key value "Innovation Road Intersection" that matches the location type from the original input question, and extracts the key value "Behavior X" that matches the behavior event type from the original input question. Based on these key values, the server determines that the question template that matches the target scene type is question template a1, and uses the above key values as initial question features, that is, the initial question features include "3:00 p.m., March 21, 2022", "Innovation Road Intersection", and "Behavior X".
[0051] For another example, the question template that matches the target scenario type may be question template a2, and question template a2 may include a time type, a location type, and a behavior event type. The server extracts the key value "3:00 PM, March 21, 2022" that matches the time type from the original input question, extracts the key value "Innovation Road Intersection" that matches the location type from the original input question, and extracts the key value "Running a Red Light" that matches the behavior event type from the original input question. Based on these key values, the server determines that the question template that matches the target scenario type is question template a2, and may use the above key values as initial question features.
[0052] In summary, it can be seen that based on the question template that matches the target scenario type, the initial question features can be extracted from the original input question, and there is no restriction on the method of extracting the initial question features.
[0053] In a possible implementation, to determine the initial problem characteristics, the following method may be used:
[0054] Method 1: For each feature type in the question template (such as time type, location type, behavioral event type, etc.), determine whether there is a key value matching the feature type in the original input question. If there is a key value matching the feature type, determine the initial question feature based on the key value, such as using the key value as the initial question feature. If there is no key value matching the feature type, analyze the original input question to obtain the initial question feature matching the feature type.
[0055] For example, if there is a key value matching the feature type in the original input question, the key value can be replaced with a variable using a key-value mapping, thereby using the key value as the initial question feature.
[0056] For example, if there is no key value matching the feature type in the original input question, the original input question can be analyzed to obtain the key value matching the feature type, and the key value can be used as the initial question feature. In this embodiment, there is no restriction on the analysis process of the original input question.
[0057] Obviously, when the question template corresponds to multiple feature types, it is necessary to determine the key value that matches each feature type, that is, to use each key value as the initial question feature, and each feature type corresponds to an initial question feature.
[0058] Method 2: For each feature type in the question template, determine whether there is a key value matching the feature type in the original input question; if there is a key value matching the feature type, determine the initial question features based on the key value, such as using the key value as the initial question feature. If there is no key value matching the feature type, send a prompt message for the feature type to the user (the prompt message indicates that the original input question lacks a key value matching the feature type), and the user provides a new original input question based on the prompt message (i.e., add the key value matching the feature type to the previous original input question to obtain a new original input question). If there is a key value matching the feature type in the new original input question, the initial question features can be determined based on the key value.
[0059] Method 3: For each feature type in the question template, determine whether there is a key value matching the feature type in the original input question; if there is a key value matching the feature type, determine the initial question feature based on the key value, such as using the key value as the initial question feature. If there is no key value matching the feature type, analyze the original input question. If a key value matching the feature type is found, use the key value as the initial question feature matching the feature type. If no key value matching the feature type is found, send a prompt message for the feature type to the user, and the user provides a new original input question based on the prompt message. If a key value matching the feature type is found in the new original input question, determine the initial question feature based on the key value.
[0060] Of course, the above three methods are just examples, and there is no restriction on the method of obtaining the initial problem features.
[0061] In summary, in step 202, initial question features that match the question template may be determined based on the original input question, and the initial question features are subsequently recorded as feature A, feature B, and feature C.
[0062] Step 203: Acquire multiple additional question features associated with the initial question features based on the initial question features.
[0063] For example, after obtaining the initial problem features, multiple additional problem features can be obtained based on the initial problem features. Additional problem features are features that are additionally supplemented on the basis of the initial problem features. The additional problem features can vary as long as they are related to the initial problem features. For example, for application scenarios involving abnormal behavior, the initial problem features include "behavior X", and the additional problem features are features related to "behavior X", such as pedestrian speed features, pedestrian clothing features, pedestrian facial features, etc. For application scenarios involving abnormal vehicles, the initial problem features include "running a red light", and the additional problem features are features related to "running a red light", such as vehicle speed features, license plate identification features, vehicle color features, etc.
[0064] In one possible implementation, multiple additional question features may be obtained in the following manner:
[0065] Method 1: The initial question feature is input into the trained feature analysis target model, and the feature analysis target model outputs multiple additional question features associated with the initial question feature.
[0066] Exemplarily, the feature analysis target model is a feature analysis target model that matches the target scenario type, which can be a behavioral anomaly type, a vehicle anomaly type, or an industrial anomaly type. For example, if the target scenario type is a behavioral anomaly type, the initial problem feature is input into the feature analysis target model b1, which processes the initial problem feature to obtain multiple additional problem features associated with the initial problem feature, and outputs multiple additional problem features. If the target scenario type is a vehicle anomaly type, the initial problem feature is input into the feature analysis target model b2, which processes the initial problem feature to obtain multiple additional problem features associated with the initial problem feature, and outputs multiple additional problem features. If the target scenario type is an industrial anomaly type, the initial problem feature is input into the feature analysis target model b3, which processes the initial problem feature to obtain multiple additional problem features associated with the initial problem feature, and outputs multiple additional problem features.
[0067] Exemplarily, when training is performed based on sample data to obtain a feature analysis target model, the sample data may include information related to the initial problem features (such as information related to the time type, information related to the location type, and information related to behavior X), and the sample data may also include other types of information (other types of information may serve as label information of the initial problem features, that is, information reflecting the initial problem features). Therefore, by continuously learning and optimizing the feature analysis target model, the feature analysis target model can reflect the relationship between the initial problem features and the additional problem features. After the initial problem features are input into the trained feature analysis target model, multiple additional problem features associated with the initial problem features can be obtained.
[0068] Method 2: The initial problem feature is input into the multimodal target model (i.e., the multimodal target large model), and the multimodal target model outputs multiple additional problem features associated with the initial problem feature.
[0069] Exemplarily, the multimodal target model is derived through continuous learning and optimization based on big data. It possesses powerful processing capabilities and can be applied to data processing in all scenarios, such as behavioral anomalies, vehicle anomalies, and industrial anomalies. The source of this multimodal target model is not restricted. After the initial question features are input into the multimodal target model, the multimodal target model processes them to obtain multiple additional question features associated with the initial question features, and then outputs the multiple additional question features.
[0070] Method 3: Analyze multiple additional problem features associated with the initial problem feature based on the initial problem feature.
[0071] For example, the server can obtain the original data corresponding to the initial problem feature, and analyze multiple additional problem features associated with the initial problem feature based on the original data. For example, the initial problem features include "3 pm on March 21, 2022", "Chuangxin Road Intersection", and "Behavior X". The server can obtain an image generated at the Chuangxin Road Intersection at 3 pm on March 21, 2022, and analyze the additional problem features associated with Behavior X based on the image, such as pedestrian speed features, pedestrian clothing features, pedestrian expression features, etc. Of course, the above method is only an example of obtaining multiple additional problem features based on the analysis of original data, and there is no limitation to this, as long as multiple additional problem features associated with the initial problem feature can be analyzed.
[0072] In summary, multiple additional question features associated with the initial question features can be obtained. Of course, Method 1, Method 2, and Method 3 are just examples, and there is no limitation on the method of obtaining the additional question features.
[0073] Step 204: Generate multiple target questions based on the initial question feature and the multiple additional question features; wherein each target question may include the initial question feature and at least one additional question feature.
[0074] For example, the server may select at least one additional question feature from multiple additional question features as a candidate additional question feature, and generate a target question based on the initial question feature and the candidate additional question features. If the multiple additional question features include additional question feature c1, additional question feature c2, and additional question feature c3, then the server may generate target question d1 based on the initial question feature and additional question feature c1 (i.e., using additional question feature c1 as a candidate additional question feature), generate target question d2 based on the initial question feature and additional question feature c2, generate target question d3 based on the initial question feature and additional question feature c3, generate target question d4 based on the initial question feature, additional question feature c1, and additional question feature c2, generate target question d5 based on the initial question feature, additional question feature c1, and additional question feature c3, and so on.
[0075] Exemplarily, generating a target question based on the initial question features and the candidate additional question features may include, but is not limited to: combining the initial question features and the candidate additional question features, and after combining the initial question features and the candidate additional question features, for each combination, adding context information to the initial question features and / or the candidate additional question features to obtain the target question corresponding to the candidate additional question features. For example, the server may add context information to the initial question features, i.e., add context information before the initial question features, and / or add context information after the initial question features, without limiting the content of this context information. For another example, the server may add context information to the candidate additional question features. For another example, the server may add context information to the initial question features and add context information to the candidate additional question features.
[0076] Adding context to problem features means taking into account the environment, conditions, previous information, or context related to the problem to enhance the model's understanding and problem-solving capabilities. Specifically, context can include previous information, subsequent information, surrounding environment, and prior knowledge.
[0077] Previous context refers to previously mentioned text or data that is relevant to the current problem. In natural language processing, this might be information from the previous sentence, paragraph, or document.
[0078] Subsequent context refers to subsequent text or data related to the question. This can help the model predict future events or better understand the context of the current question.
[0079] The surrounding context refers to the context or environmental information surrounding the problem. In vision tasks, this might be other objects, scenes, or background information related to the image. In natural language processing, this might be external information related to the current text, such as time, location, or social context.
[0080] Prior knowledge refers to prior knowledge that the model has learned or trained on. This can include corpora, datasets, or experiences the model was exposed to during training. Adding contextual information, taken together, means embedding the problem in a broader context so that the model can more fully understand and solve the problem.
[0081] Step 205: For each target question, the target question is input into the trained multimodal target model (multimodal target large model), and the multimodal target model outputs the candidate answer corresponding to the target question.
[0082] Exemplarily, the multimodal target model is obtained by continuous learning and optimization based on big data. It has powerful processing capabilities and can be applied to data processing of all types of scenarios. There is no restriction on the source of this multimodal target model. Multimodality refers to data in other modalities such as images, videos, and voice in addition to text data. For example, a file with sound and video can use a multimodal target model to analyze whether there is someone shouting for help in the file, whether the person shouting for help is a man or a woman, what clothes they are wearing, etc. Examples of multimodal target models include: GPT-4V (generative pre-trained transformer-4 vision, generative pre-trained transformer-4 vision) and the like. After the target question is input into the multimodal target model, the multimodal target model processes the target question, obtains a candidate answer corresponding to the target question, and outputs the candidate answer.
[0083] To sum up, based on the multimodal target model, we can obtain the candidate answers corresponding to each target question, such as candidate answer e1 corresponding to target question d1, candidate answer e2 corresponding to target question d2, candidate answer e3 corresponding to target question d3, candidate answer e4 corresponding to target question d4, and so on.
[0084] Exemplarily, for each candidate answer, the candidate answer may be a candidate answer in the image dimension, a candidate answer in the text dimension, a candidate answer in the sound dimension, a candidate answer in the video dimension, or a candidate answer in multiple dimensions, such as a candidate answer in the combined dimension of text and video.
[0085] Step 206: Determine a target answer corresponding to the original input question based on the candidate answers corresponding to each target question. The target answer may be the final output result for the original input question.
[0086] Exemplarily, based on the candidate answers corresponding to each target question, the server can filter out candidate answers with duplicate content from all candidate answers to obtain at least one remaining candidate answer, and determine the number of occurrences of each remaining candidate answer among all candidate answers. Then, based on the number of occurrences corresponding to each remaining candidate answer, the server selects a target answer from all remaining candidate answers. For example, the server determines the remaining candidate answer with the greatest number of occurrences as the target answer corresponding to the original input question; or, if the proportion of the remaining candidate answer with the greatest number of occurrences among all candidate answers is greater than a preset threshold, the server determines the remaining candidate answer with the greatest number of occurrences as the target answer corresponding to the original input question.
[0087] For example, suppose there are six candidate answers in total: candidate e1 is mmm, candidate e2 is mmm, candidate e3 is mmm, candidate e4 is mmm, candidate e5 is nnn, and candidate e6 is nnn. After filtering out duplicate candidate answers (i.e., candidate e2, candidate e3, candidate e4, candidate e6, etc.), the remaining candidate answers are "mmm" and "nnn." Obviously, the remaining candidate answer "mmm" appears four times among all the candidate answers, and the remaining candidate answer "nnn" appears only two times.
[0088] The server can use the remaining candidate answer "mmm" with the maximum number of occurrences as the target answer corresponding to the original input question, that is, the target answer is mm. Alternatively, the server can determine whether the appearance ratio value of the remaining candidate answer corresponding to the maximum number of occurrences in all candidate answers (i.e., 4 / 6) is greater than a preset threshold. If the appearance ratio value corresponding to the maximum number of occurrences is greater than the preset threshold, the remaining candidate answer "mmm" with the maximum number of occurrences is used as the target answer corresponding to the original input question. If the appearance ratio value corresponding to the maximum number of occurrences is less than or equal to the preset threshold, the target answer corresponding to the original input question is not obtained.
[0089] In summary, the candidate answer with the greatest number of occurrences is the most frequently appearing answer, representing a consensus among all candidate answers. This has a higher confidence level and can be considered relatively correct and reliable, thus improving the accuracy of the final output. Therefore, this candidate answer is used as the target answer for the original input question, and the target answer can be the final output for the original input question.
[0090] Step 207: Output target data corresponding to the target answer. The target data may include the target answer, or the target data may include the target answer and additional question features corresponding to the target answer.
[0091] Exemplarily, the target answer may include, but is not limited to, an answer in at least one of the following dimensions: image, text, sound, and video. For example, the target answer may be an answer in the image dimension, a text dimension, a sound dimension, a video dimension, or a combination of multiple dimensions, such as a text and video dimension.
[0092] The target answer can correspond to multiple candidate answers, and the additional question features corresponding to the target answer include the additional question features corresponding to each candidate answer corresponding to the target answer. For example, when the target answer is mmm, the target answer corresponds to candidate answers e1, e2, e3, and e4. Therefore, the additional question features corresponding to the target answer may include: the additional question features corresponding to candidate answer e1 (candidate answer e1 is obtained based on the initial question features and the target question d1 corresponding to the additional question features c1, so candidate answer e1 corresponds to the additional question features c1), the additional question features corresponding to candidate answer e2, the additional question features corresponding to candidate answer e3, and the additional question features corresponding to candidate answer e4.
[0093] At this point, the target answer to the original input question is successfully output, completing the data processing based on the multimodal model.
[0094] In one possible implementation, to enable the model to have self-reasoning capabilities, complex problems can be broken down into simpler multi-step procedures, and the method can be verified at each step using various methods. For example, see Figure 3, which is a schematic diagram of a self-reasoning method based on a multimodal model. The method may include inputting a problem, generating a problem template, problem logic analysis, developing a multimodal model (i.e., a large multimodal model), and technical verification.
[0095] First, during the question input process, the original input question can be obtained. An example of the original input question may be "Please help me search for pedestrians who appeared at the Chuangxin Road intersection around 3 pm on March 21, 2022. Who among these pedestrians is most likely to be the target of behavior X at the intersection at this time point?"
[0096] Second, during the question template generation process, the initial question features that match the question template can be determined based on the original input question. For example, the original input question can be converted into a mathematical logical form, and the key values can be replaced with variables using a key-value mapping to obtain the initial question features and the modified question. For example, the original input question can be modified to the following question: Please help me search for pedestrians who appear around A at B. Among these pedestrians, who is most likely to be C. A: 3:00 PM on March 21, 2022; B: Chuangxin Road intersection; C: Behavior X.
[0097] Third, during the question logic analysis process, multiple additional question features associated with the initial question features can be obtained, and multiple target questions can be generated based on the initial question features and the multiple additional question features.
[0098] For example, based on multiple verification and cross-checking, different methods are used to generate analysis solutions, provide hints to the multimodal target model, and generate additional context for the problem. The logical modification problem can be: appearing in A and B, with behavior C, this pedestrian may have K characteristics, K is changeable, that is, K represents additional problem features. In this way, by changing the additional problem feature K, multiple target problems can be generated, and each target problem can include initial problem features and additional problem features.
[0099] Fourth, in the multimodal model (i.e., multimodal large model) process, each target question can be input into the multimodal target model, which then outputs candidate answers corresponding to each target question. For example, a logic modification question (i.e., target question) can be analyzed using the multimodal target model to output candidate answers. This candidate answer leverages the capabilities of the multimodal target model, which analyzes the target question across various dimensions, including images, videos, text, and voice. The multimodal target model compares the output results and finds consensus across information from various dimensions. The multimodal target model can also provide a higher degree of confidence, resulting in a candidate answer corresponding to the target question, i.e., a correct and reliable candidate answer.
[0100] For example, the multimodal target model automatically analyzes pedestrians with behavior X and matches the time and location. It also determines the pedestrian's identity information based on biometrics. It uses video structured features, such as clothing color and whether they are carrying a backpack, combined with big data analysis, to automatically infer and analyze the most likely target object, and uses spatial location information to quickly locate the target object's current possible location.
[0101] Fifth, during the technical verification process, the target answer corresponding to the original input question can be determined based on the candidate answers corresponding to each target question. For example, to ensure consensus across the output of various expressions (i.e., multiple target questions), the candidate answers corresponding to each target question can be determined, and the most frequently occurring candidate answer can be selected as the target answer to ensure the accuracy of the final output. Finally, a list of the highest confidence values is output in a continuous loop, and finally the most likely target object is output. The additional question features corresponding to the output target object are then determined, completing the entire self-inference process and obtaining the target answer corresponding to the original input question.
[0102] It can be seen from the above technical solutions that in the embodiment of the present application, the target answer is obtained with the help of a multimodal target model, and accurate and reliable target answers are obtained through multiple target questions. It only takes a small amount of computing resources to query the target answer corresponding to the original input question from a large amount of data, and the time to obtain the target answer is shorter, thereby saving the computing resources of the server and saving time overhead. It can quickly locate the target answer corresponding to the original input question, provide abnormal logical analysis and reasoning capabilities, and realize automatic abnormal diagnosis. The analysis capabilities of the multimodal target model are used to give accurate and reliable target answers, and comprehensively consider the possibilities of various dimensions such as images, videos, and voices. Through the capabilities of the multimodal target model, the user only needs to input simple descriptive text, and the multimodal target model can automatically reason and quickly locate the target object, which can improve the performance of the multimodal target model in logical reasoning problems, so that the multimodal target model can self-reason to complete optimization needs. In the embodiment of the present application, abnormal problems can be quickly located, and abnormal logical analysis and reasoning are given at the same time to realize automatic abnormal diagnosis.
[0103] Based on the same application concept as the above method, the embodiment of the present application proposes a data processing device based on a multimodal model, as shown in FIG4 , which is a schematic structural diagram of the device. The device may include:
[0104] A determination module 41 is used to determine an initial question feature that matches a question template based on an original input question; an acquisition module 42 is used to acquire a plurality of additional question features associated with the initial question feature; a generation module 43 is used to generate a plurality of target questions based on the initial question feature and the plurality of additional question features, each target question including the initial question feature and at least one additional question feature; the acquisition module 42 is also used to input each target question into a trained multimodal target model, and the multimodal target model outputs a candidate answer corresponding to the target question; the determination module 41 is also used to determine a target answer corresponding to the original input question based on the candidate answer corresponding to each target question, and the target answer is the output result of the original input question.
[0105] Exemplarily, when the determination module 41 determines the initial question features that match the question template based on the original input question, it is specifically used to: if the question template includes a feature type, determine whether there is a key value that matches the feature type in the original input question; if there is a key value that matches the feature type, determine the initial question features based on the key value; if there is no key value that matches the feature type, analyze the original input question to obtain the initial question features that match the feature type; or, issue a prompt message for the feature type to the user, and the user provides a new original input question based on the prompt message, and if there is a key value that matches the feature type in the new original input question, determine the initial question features based on the key value.
[0106] Exemplarily, when the acquisition module 42 acquires multiple additional problem features associated with the initial problem feature, it is specifically used to: input the initial problem feature into a trained feature analysis target model, and the feature analysis target model outputs multiple additional problem features associated with the initial problem feature; or, input the initial problem feature into the multimodal target model, and the multimodal target model outputs multiple additional problem features associated with the initial problem feature; or, analyze the multiple additional problem features associated with the initial problem feature based on the initial problem feature.
[0107] Exemplarily, the feature analysis target model is a feature analysis target model that matches the target scene type; the question template is a question template that matches the target scene type; wherein the target scene type includes a behavioral abnormality type, a vehicle abnormality type, or an industrial abnormality type.
[0108] Exemplarily, when generating multiple target questions based on the initial question feature and the multiple additional question features, the generation module 43 is specifically used to: select candidate additional question features from the multiple additional question features; after combining the initial question feature and the candidate additional question features, for each combination, add context information to the initial question feature and / or the candidate additional question feature to obtain the target question corresponding to the candidate additional question feature.
[0109] Exemplarily, when determining the target answer corresponding to the original input question based on the candidate answer corresponding to each target question, the determination module 41 is specifically used to: based on the candidate answer corresponding to each target question, filter out candidate answers with repeated content from all candidate answers to obtain at least one remaining candidate answer, and determine the number of occurrences of each remaining candidate answer among all candidate answers; determine the remaining candidate answer with the maximum number of occurrences as the target answer corresponding to the original input question; or, if the appearance ratio value of the remaining candidate answer corresponding to the maximum number of occurrences among all candidate answers is greater than a preset threshold, determine the remaining candidate answer with the maximum number of occurrences as the target answer corresponding to the original input question.
[0110] Exemplarily, after determining the target answer corresponding to the original input question based on the candidate answers corresponding to each target question, the determination module 41 is also used to: output target data corresponding to the target answer, the target data including the target answer, or the target data including the target answer and additional question features corresponding to the target answer; the target answer includes an answer in at least one dimension of image, text, sound and video; the target answer corresponds to multiple candidate answers, and the additional question features corresponding to the target answer include additional question features corresponding to each candidate answer corresponding to the target answer.
[0111] Based on the same application concept as the above method, an embodiment of the present application proposes an electronic device, as shown in Figure 5, the electronic device includes: a processor 51 and a machine-readable storage medium 52, the machine-readable storage medium 52 stores machine-executable instructions that can be executed by the processor 51 (i.e., data processing instructions based on a multimodal model); the processor 51 is used to execute machine-executable instructions to implement the data processing method based on a multimodal model disclosed in the above example of this application.
[0112] Based on the same application concept as the above method, an embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the data processing method based on the multimodal model disclosed in the above example of the present application can be implemented.
[0113] The machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that may contain or store information, such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, a storage drive (such as a hard disk drive), a solid-state drive, any type of storage disk (such as a CD, DVD, etc.), or similar storage media, or a combination thereof.
[0114] The systems, devices, modules, or units described in the above embodiments may be implemented by a computer entity or by a product having certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email transceiver, game console, tablet computer, wearable device, or any combination of these devices.
[0115] For the convenience of description, when describing the above device, the device is divided into various units according to their functions and described separately. Of course, when implementing this application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0116] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0117] The present application is described with reference to the flow chart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present application.It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processor of general-purpose computer, special-purpose computer, embedded processing machine or other programmable data processing equipment to produce a machine, so that the instruction executed by the processor of computer or other programmable data processing equipment produces the device for realizing the function specified in a flow chart or multiple flow charts and / or a box or multiple boxes in the block diagram.
[0118] Moreover, these computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0119] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0120] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A data processing method based on a multimodal model, characterized in that: The method comprises: Determining initial question features that match a configured question template based on an original input question; Acquire a plurality of additional question features associated with the initial question features based on the initial question features; generating a plurality of target questions based on the initial question feature and the plurality of additional question features, each target question including the initial question feature and at least one additional question feature; For each target question, the target question is input into a trained multimodal target model, and the multimodal target model outputs a candidate answer corresponding to the target question; A target answer corresponding to the original input question is determined based on the candidate answers corresponding to each target question.
2. The method according to claim 1, characterized in that The determining of initial question features matching the configured question template based on the original input question includes: If the question template includes a feature type, determining whether there is a key value matching the feature type in the original input question; If there is a key value matching the feature type, determining the initial question feature based on the key value; If there is no key value matching the feature type, the original input question is analyzed to obtain initial question features matching the feature type; or, a prompt message for the feature type is issued to the user, and the user provides a new original input question based on the prompt message. If there is a key value matching the feature type in the new original input question, the initial question features are determined based on the key value.
3. The method according to claim 1, characterized in that The acquiring, based on the initial question feature, a plurality of additional question features associated with the initial question feature comprises: The initial question feature is input into a trained feature analysis target model, and the feature analysis target model outputs a plurality of additional question features associated with the initial question feature; or, Inputting the initial question feature into the multimodal target model, and having the multimodal target model output a plurality of additional question features associated with the initial question feature; or, A plurality of additional problem features associated with the initial problem features are analyzed based on the initial problem features.
4. The method according to claim 3, characterized in that The feature analysis target model is a feature analysis target model that matches the target scene type; The question template is a question template that matches the target scenario type; The target scene type includes a behavior abnormality type, a vehicle abnormality type, or an industrial abnormality type.
5. The method according to claim 1, characterized in that The generating a plurality of target questions based on the initial question feature and the plurality of additional question features comprises: Selecting a candidate additional question feature from the plurality of additional question features; After combining the initial question features and the candidate additional question features, for each combination, context information is added to the initial question features and / or the candidate additional question features to obtain a target question corresponding to the candidate additional question features.
6. The method according to claim 1, characterized in that The determining the target answer corresponding to the original input question based on the candidate answer corresponding to each target question includes: Based on the candidate answers corresponding to each target question, filter candidate answers with duplicate content from all candidate answers to obtain at least one remaining candidate answer, and determine the number of occurrences of each remaining candidate answer in all candidate answers; The remaining candidate answer with the maximum number of occurrences is determined as the target answer corresponding to the original input question; alternatively, if the appearance ratio of the remaining candidate answer corresponding to the maximum number of occurrences in all candidate answers is greater than a preset threshold, the remaining candidate answer with the maximum number of occurrences is determined as the target answer corresponding to the original input question.
7. The method according to claim 6, characterized in that After determining the target answer corresponding to the original input question based on the candidate answer corresponding to each target question, the method further includes: Outputting target data corresponding to the target answer, wherein the target data includes the target answer, or the target data includes the target answer and additional question features corresponding to the target answer; Wherein, the target answer includes an answer in at least one dimension of image, text, sound and video; The target answer corresponds to multiple candidate answers, and the additional question features corresponding to the target answer include additional question features corresponding to each candidate answer corresponding to the target answer.
8. A data processing device based on a multimodal model, characterized in that: The device comprises: A determination module, for determining initial question features matching the question template based on the original input question; An acquisition module, used for acquiring a plurality of additional question features associated with the initial question feature; A generating module, configured to generate a plurality of target questions based on the initial question feature and the plurality of additional question features, each target question comprising the initial question feature and at least one additional question feature; The acquisition module is further used to input each target question into a trained multimodal target model, and the multimodal target model outputs a candidate answer corresponding to the target question; The determination module is further used to determine a target answer corresponding to the original input question based on a candidate answer corresponding to each target question, wherein the target answer is an output result of the original input question.
9. The device according to claim 8, It is characterized in that in, The determining module determines the initial question features that match the question template based on the original input question, and is specifically used to: if the question template includes a feature type, determine whether there is a key value that matches the feature type in the original input question; if there is a key value that matches the feature type, determine the Initial problem characteristics; If there is no key value matching the feature type, analyzing the original input question to obtain an initial question feature matching the feature type; Or, a prompt message for the feature type is sent to the user, and the user provides a new original input question based on the prompt message, and if a key value matching the feature type exists in the new original input question, the initial question feature is determined based on the key value; Wherein, when the acquisition module acquires the multiple additional problem features associated with the initial problem feature, it is specifically used to: input the initial problem feature to a trained feature analysis target model, and the feature analysis target model outputs the multiple additional problem features associated with the initial problem feature; or, input the initial problem feature to the multimodal target model, and the multimodal target model outputs the multiple additional problem features associated with the initial problem feature; or, analyze the multiple additional problem features associated with the initial problem feature based on the initial problem feature; The feature analysis target model is a feature analysis target model that matches the target scene type; the question template is a question template that matches the target scene type; the target scene type includes a behavior abnormality type, a vehicle abnormality type, or an industrial abnormality type; Wherein, when the generating module generates multiple target questions based on the initial question feature and the multiple additional question features, it is specifically used to: select candidate additional question features from the multiple additional question features; after combining the initial question feature and the candidate additional question features, for each combination, add context information to the initial question feature and / or the candidate additional question feature to obtain the target question corresponding to the candidate additional question feature; Wherein, when the determination module determines the target answer corresponding to the original input question based on the candidate answer corresponding to each target question, it is specifically used to: based on the candidate answer corresponding to each target question, filter the candidate answers with repeated content from all the candidate answers to obtain at least one remaining candidate answer, and determine the number of occurrences of each remaining candidate answer among all the candidate answers; determine the remaining candidate answer with the maximum number of occurrences as the target answer corresponding to the original input question; or, if the appearance ratio value of the remaining candidate answer corresponding to the maximum number of occurrences among all the candidate answers is greater than a preset threshold, determine the remaining candidate answer with the maximum number of occurrences as the target answer corresponding to the original input question; Wherein, after the determination module determines the target answer corresponding to the original input question based on the candidate answers corresponding to each target question, it is also used to: output the target data corresponding to the target answer, the target data including the target answer, or the target data including the target answer and additional question features corresponding to the target answer; wherein the target answer includes an answer in at least one dimension of image, text, sound and video; the target answer corresponds to multiple candidate answers, and the additional question features corresponding to the target answer include additional question features corresponding to each candidate answer corresponding to the target answer.
10. An electronic device, characterized in that: include: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; The processor is configured to execute the machine executable instructions to implement the method according to any one of claims 1-7.
11. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores a plurality of computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 7 can be implemented.
Citation Information
Patent Citations
Intelligent response method and device, electronic equipment and medium
CN115309883A
Question and answer processing method and device, computer equipment and storage medium
CN115757725A
Multi-modal dialogue method and device, equipment and storage medium
CN115840841A
Data processing method, device and equipment based on multi-modal model
CN116204726A
Expanding Training Questions through Contextualizing Feature Search
US20160180242A1
Cited By
Image-text question and answer processing method and device, computer equipment and readable storage medium
CN119046446A
Multi-modal industry question and answer large model training method and system
CN119294532A
Visual assisting system and method for visually impaired person based on multi-mode large model, intelligent glasses and blind assisting application software
CN119473005A
Training data set generation method and device, equipment, medium and product
CN120541175A
Method and device for executing video question and answer task and electronic equipment
CN121210709A
