Visual question answering processing method, device, computer readable medium and program product
By identifying the type of question intention input by the user and inputting it into the corresponding model for deep collaborative attention learning, it solves the problems of slow model derivation and low accuracy in the existing visual question and answer system, and achieves more efficient and accurate visual question and answer results.
Patent Information
- Application Number
- CN202110994133.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-27
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-08-27
AI Technical Summary
The model derivation speed in the existing visual question and answer system is slow, and the accuracy of the visual question and answer results is low. As a result, only a small part of the content can be answered, and the coverage area is not comprehensive.
By receiving the question instructions and display screen input by the user, the intent type is identified. If it is a non-universal type, it is input to the corresponding typical attribute model. If it is a universal type, it is input to the general visual question and answer VQA model for deep collaborative attention learning to obtain the answer. information.
It improves the accuracy and derivation speed of visual question and answer results, provides more dimensional matching methods, and improves the accuracy and coverage of answers.
Smart Images

Figure CN113722458B
Abstract
Description
Technical Field
[0001] The present application relates to the field of visual question answering, and in particular to a visual question answering processing method, device, computer-readable medium and program product. Background Art
[0002] Visual Question Answering (VQA) is a challenging task in the field of artificial intelligence, which lies at the intersection of computer vision and natural language processing. Visual question answering requires a detailed understanding of both the visual content of the image and the text content of the question. It takes the multimodal information of the image (or video) and the text question related to the image (or video) as the computer input, and the correct answer to the question obtained by the computer based on the image as the output.
[0003] In the existing visual question answering system, the features of the model representation of questions and image inputs are not rich enough, resulting in the visual question answering system being able to answer only a relatively small part of the content and not covering a comprehensive field, resulting in the output answer being of low accuracy. Summary of the invention
[0004] The present application provides a visual question answering processing method, device, computer-readable medium and program product to solve the problems of slow model derivation speed and low accuracy of visual question answering results in existing visual question answering systems.
[0005] On the one hand, the present application provides a visual question answering processing method, comprising:
[0006] Receive a question instruction input by a user through an interactive interface, and obtain the question instruction and a corresponding display screen;
[0007] Identify the intended type of questioning instructions;
[0008] If the intention type is identified as a non-universal type, the question instruction is input into the corresponding typical attribute model to obtain the answer information of the question instruction;
[0009] If the intent type is identified as a general type, the question instruction is input into the general visual question answering (VQA) model to perform deep collaborative attention learning on the question instruction and the display screen to obtain the answer information of the question instruction;
[0010] Output the answer information of the instruction to the user.
[0011] In a second aspect, the present application provides a visual question answering processing device, comprising:
[0012] A receiving module receives a question instruction input by a user through an interactive interface;
[0013] An acquisition module is used to acquire questioning instructions and corresponding display screens;
[0014] The recognition module inputs the question instruction into the corresponding typical attribute model to obtain the answer information of the question instruction if the intent type is recognized as a non-universal type; if the intent type is recognized as a universal type, the question instruction is input into the universal visual question answering VQA model to perform deep collaborative attention learning on the question instruction and the display screen to obtain the answer information of the question instruction;
[0015] The output module outputs the answer information of the instruction to the user.
[0016] In a third aspect, the present application provides an electronic device,
[0017] Including: display, memory, processor;
[0018] A display, used for displaying images, and displaying them under the control of a processor;
[0019] Memory; Memory for storing processor executable instructions;
[0020] The processor is configured to run instructions stored in the memory to execute any one of the visual question answering processing methods of the first aspect.
[0021] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement any visual question answering processing method of the first aspect.
[0022] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements any visual question answering processing method of the first aspect.
[0023] The visual question-answering processing method, device, computer-readable medium, and program product provided by the present application receive question instructions input by the user through an interactive interface, and obtain the question instructions and the corresponding display screen; identify the intent type of the question instruction; if the intent type is identified as a non-universal type, the question instruction is input into the corresponding typical attribute model to obtain the answer information of the question instruction; if the intent type is identified as a universal type, the question instruction is input into the universal visual question-answering VQA model to perform deep collaborative attention learning on the question instruction and the display screen to obtain the answer information of the question instruction; and output the answer information of the instruction to the user. The method of the present application can be input into the corresponding typical attribute model or VQA model according to the intent type of the question, which provides a more dimensional matching method for determining the answer to the question instruction from the display screen, thereby improving the accuracy of the visual question-answering results. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0025] Figure 1 A flow chart of a visual question answering processing method provided in an embodiment of the present application;
[0026] Figure 2 A schematic diagram of a visual question-answering service provided in an embodiment of the present application;
[0027] Figure 3 A visual question-and-answer flow chart of film and television knowledge provided in an embodiment of the present application;
[0028] Figure 4 A flowchart of a general visual question answering (VQA) model provided in an embodiment of the present application for performing collaborative attention calculation on question instructions and display images;
[0029] Figure 5 A schematic diagram of a grid feature extraction structure provided in an embodiment of the present application;
[0030] Figure 6 Schematic diagram of the structures of three MCA variants provided in the embodiments of the present application;
[0031] Figure 7 A flowchart of another visual question answering method provided in an embodiment of the present application;
[0032] Figure 8 A schematic diagram of a visual question answering processing device provided in an embodiment of the present application;
[0033] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0034] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0035] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0036] This application can be used in smart TVs, smart tablets, smart displays and other devices. Users can ask questions based on the images displayed by the display device, and obtain answers that match the questions through the visual question-answering processing method provided by this application. The application scenarios of this technology are very wide. For example, it can be applied in the medical field to help the blind and visually impaired obtain more information on the Internet or in the real world, and even conduct real-time human-computer interaction, which will greatly improve the living conditions and convenience of the blind and visually impaired. Another example is applied in the field of robotics to improve the way of human-computer interaction, query visual content through natural language, and expand the question-answering function of intelligent robots. Another example is applied in the field of image retrieval, etc.
[0037] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0038] Figure 1 A flow chart of a visual question answering method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, including:
[0039] S101, receiving a question instruction input by a user through an interactive interface, and obtaining the question instruction and a corresponding display screen;
[0040] The execution subject of the method may be a device such as a smart TV. The interactive interface may be any interactive device, for example, the interactive device is a voice input device, and optionally, it may be a remote controller that matches the smart TV. The user presses the voice key on the remote controller to input the question to be asked, and the smart TV receives the question instruction input by the user through the interactive interface. The interactive interface may also be the interactive interface of the display device itself, which may also receive voice or text instructions, or touch instructions input by the user.
[0041] After the user inputs a question, the screenshot module in the smart TV will automatically capture the image on the screen, thereby obtaining a display screen corresponding to the question instruction.
[0042] Users can ask various questions through the question command, for example:
[0043] What's on TV?
[0044] Do cats exist on television?
[0045] What color are the cats on TV?
[0046] What is the scene on TV?
[0047] How many cats are there on TV?
[0048] What does the sign on TV say?
[0049] S102, identifying the intention type of the question instruction;
[0050] After the user inputs a question instruction, the question instruction is recognized and the user's intention is identified. Various classification methods can be used for intention recognition. For example: Convolutional Neural Networks (CNN) text classification method, Bayesian classifier, and determining the intent type of the user's question instruction by configuring each type of typical statements in the database. The above methods can also be combined for use, for example, configuring typical statements in the database behind the Bayesian classifier to improve recognition accuracy and enhance maintainability.
[0051] S103, if the intention type is identified as a non-general type, inputting the question instruction into the corresponding typical attribute model to obtain answer information of the question instruction;
[0052] Among them, non-general types refer to question intentions with typical attribute types, such as: plant visual Q&A, animal visual Q&A, food visual Q&A, etc.; general types refer to simple and general questions other than the above non-general types.
[0053] If the intent type identified by the above classification module is a non-universal type, the question instruction is input into the corresponding typical attribute model, that is, the corresponding model or interface to obtain the answer information of the question instruction, such as Figure 2 As shown. Among them, the non-universal types are as shown in the above examples, including but not limited to one or more of the following, for example, it can be plants, animals, vehicles, brands, attractions, calories, food, face recognition, movies and quantity. It should be noted that Figure 2 The non-universal model or interface shown in is only part of the visual question answering system and is not intended to limit the present application.
[0054] To facilitate understanding of this step, an example is given below:
[0055] For example, if the user asks a question involving film and television knowledge questions and answers in the general classification model, the system calls the corresponding knowledge graph question and answer model to get the answer. Figure 3 As shown, Figure 3 This is a flowchart of visual question-answering of film and television knowledge. Assume that the user's question is "Who is Zhang San's wife?" The name of the film currently being played is "xx." By querying and parsing the relevant graph database, the result is "Li Si". After editing the answer, the output is "Zhang San's wife is Li Si."
[0056] S104: If the intent type is identified as a general type, the question instruction is input into the general visual question answering (VQA) model to perform deep collaborative attention learning on the question instruction and the display screen to obtain answer information of the question instruction;
[0057] As mentioned above, the general type refers to simple general questions other than non-general types. If the intent type identified by the above classification module is a general type, the visual question answering model (VQA model) is called. The visual question answering model is a VQA model based on deep collaborative attention and grid features. The answer information of the question instruction is obtained by deep collaborative attention learning of the question instruction and the display screen.
[0058] S105: Output the answer information of the instruction to the user.
[0059] After the visual question answering system obtains the answer corresponding to the question instruction through the above steps, it outputs the answer to the instruction to the user.
[0060] The embodiment of the present application provides a visual question-answering processing method, which receives a question instruction input by a user through an interactive interface, and obtains the question instruction and the corresponding display screen; identifies the intent type of the question instruction; if the intent type is identified as a non-universal type, the question instruction is input into the corresponding typical attribute model to obtain the answer information of the question instruction; if the intent type is identified as a universal type, the question instruction is input into the universal visual question-answering VQA model to perform deep collaborative attention learning on the question instruction and the display screen, and obtain the answer information of the question instruction; the answer information of the instruction is output to the user. The method of this embodiment can be input into the corresponding typical attribute model or VQA model for the intention type of the question, which provides a more dimensional matching method for determining the answer to the question instruction from the display screen, and improves the accuracy of the visual question-answering results.
[0061] Figure 4 A flowchart of a general visual question answering (VQA) model provided in an embodiment of the present application for collaborative attention calculation of question instructions and display images, in Figure 1 Based on the embodiment shown, in S104, inputting the question instruction into the general visual question answering VQA model to perform collaborative attention calculation on the question instruction and the display screen can be implemented by the following steps:
[0062] S1041, performing word segmentation processing on the question information in the question instruction, and generating semantic feature data based on the word segmentation processing result;
[0063] First, the input question text is divided into words. After the division, each word can be converted into a vector through the N-dimensional word embeddings method to facilitate the identification of semantic features. The word embeddings method is pre-trained on a large-scale corpus. Then, the word is embedded and input into a single-layer Long Short Term Mermory Network (LSTM). LSTM is a special neural network that can solve long-term dependency problems. Finally, the feature matrix of the question is output to obtain the semantic feature data Y.
[0064] S1042, extracting image features from the display image to obtain image feature data;
[0065] Image features are a collection of visual features of an image region. They can be extracted from the display screen in a bottom-up manner. These features are obtained by Faster R-CNN (with ResNet-101 as the backbone), which has been trained on the Visual Genome database. The confidence threshold is set to determine whether the feature is an active target. The number of targets is between [10, 100]. For the i-th target, it is the feature obtained by the convolutional layer through mean-pooling, denoted as x i , average pooling can retain more image information and finally represent the image as a feature matrix to obtain the image feature data X.
[0066] Faster R-CNN extracts image features through regional features, which is time-consuming to calculate. Therefore, in this application, grid convolution features are considered for image feature extraction. The method of converting regional features into grid features is to obtain the output of each layer of Faster R-CNN through a shared fully connected convolution method. Figure 5 As shown in the left figure, under the given input image condition, Faster R-CNN uses the ResNet network to obtain the C4 layer result, and then obtains the C5 result in two steps, and finally obtains the regional features. Therefore, the ResNet network can be directly used to calculate the C5 result and use it as the grid feature. Figure 5The figure on the right shows the improved method, which uses a 1×1 ROI-Pooling detector, that is, the features of each region are represented by only one one-dimensional vector, so that this one-dimensional vector will fuse all the information of this region, making the obtained grid features stronger. In addition, the improved method also maintains the output architecture of the grid features, so that the obtained grid features are consistent with the regional characteristics. By using grid convolution features to extract image features, the extraction speed is increased from several seconds to within 150ms, which greatly improves the derivation speed of the visual question answering model and reduces time consumption.
[0067] S1043, performing deep collaborative attention learning and multimodal fusion calculation on the semantic feature data and the image feature data;
[0068] Through deep collaborative attention learning and multimodal fusion calculations based on semantic feature data and image feature data, the keywords in the question are linked to the key areas in the image, that is, attention is paid to the areas in the picture related to the question or to the most critical words in the question, thus achieving full interaction between multimodalities.
[0069] The semantic feature data Y and image feature data X obtained in step S1041 are used as inputs of the Modular Co-Attention Layer (MCA layer) to perform collaborative attention learning.
[0070] First, let’s define the basic components of the MCA layer:
[0071] Specifically, the MCA layer is a module that combines two attention units, namely the self attention (SA) unit and the guided attention (GA) unit, where both attention units adopt the caled-dot-product form. Through different combinations of the two, three MCA variants can be obtained to achieve different purposes.
[0072] The input of caled-dot-product consists of the dimension d of questions and keywords. key , the dimension of the value d value For convenience, we set the two dimension values to d, and then calculate the dot product of the question and all keywords, divided by Then use softmax to get the attention weight value. Given a set of questions q∈R 1×d , keyword K∈R n×d , value V∈R n×d , the feature weight f∈R after attention 1×d It can be expressed as:
[0073]
[0074] Then, multi-head attention is introduced. It consists of h parallel "heads". Multi-head attention is used to increase the expressiveness of features. The number of heads is represented by h. In order to reduce the size of the model, dh = d / h is often used, where d is the total feature dimension. Each head corresponds to a set of independent scaled-dot-product calculations. In this way, f can be expressed as:
[0075] f=MA(q, K, V)=[head1, head2,..., head h ]W 0
[0076] head j =A(qW j Q , KW j K , VW j V )
[0077] In the SA unit, the SA unit consists of a multi-head attention layer and a FFN layer. Given a set of input features X = [x1; ...; x m ]∈R m×dx , the output feature Z is obtained through SA, SA calculates each group of samples <x i , x j > feature relationship. For each x in input X i , output f i =MA(x i , X, X), which can be understood as all samples in X relative to their i The normalized similarity of x i Refactoring.
[0078] In the GA unit, two sets of input features X and Y are given, where Y is used to guide the attention calculation of X. Because the shapes of X and Y are variable, they can be used to annotate features of different modalities. For example, for question Y and image X, GA calculates each set of samples <x i ,y j > feature relationship. For input features X and Y, f i =MA(x i , Y, Y), can be understood as using the normalized cross-modal similarity of all samples in Y to calculate x i Refactoring.
[0079] Then, specify the MCA layer variant:
[0080] As mentioned above, different combinations of the two attention units in the MCA layer can produce three MCA variants, as follows Figure 6 As shown, they are ID(Y)-GA(X, Y), SA(Y)-GA(X, Y) and SA(Y)-SGA(X, Y). These three variants can be directly stacked in the depth direction, that is, the input feature dimension and output feature dimension of each layer are the same.
[0081] Specifically, their meanings are as follows:
[0082] ID(Y)-GA(X, Y): Input question features and output features through an identity mapping. The modal interaction between each region in image X and each word in question Y is completed in GA. The interaction results will be used to obtain deeper image features.
[0083] SA(Y)-GA(X, Y): Compared with ID(Y)-GA(X, Y), an SA unit is added for the Y input. An additional SA layer is added to perform internal interaction of the question modality;
[0084] SA(Y)-SGA(X, Y): Compared with ID(Y)-GA(X, Y), an SA unit is added for image X and question Y. Another SA layer is added for internal interaction of image modalities.
[0085] By obtaining different MCA layer variants, we can achieve internal interaction of the question modality, internal interaction of the image modality, and interaction between the question modality and the image modality.
[0086] Then, define the multi-layer MCA layer:
[0087] The above three variants can be connected in depth to form a deep network. The connection method can be a direct stacking method. Taking SA(Y)-SGA(X, Y) as an example, assuming that L-layer MCA connection is used, there are two ways:
[0088] Stacking: Perform the simplest direct stacking in the depth direction to obtain the final image feature output X (L) and problem feature output Y (L) .
[0089] Encoder-Decoder: Inspired by transformer, compared with Stacking, the change is that the L-th problem feature output Y (L) As the input of each layer SGA (X, Y) to obtain the final image feature output X(L) .
[0090] By forming multiple layers of MCA layers, deeper multimodal interactions can be achieved, thereby delivering more information.
[0091] Furthermore, feature fusion is performed on the semantic feature data and image feature data containing key information obtained in the previous step. Specifically:
[0092] After deep collaborative attention learning of semantic feature data and image feature data, the image feature vector is output and the problem feature vector These two vectors already contain rich information about the question and the image. (L) and Y (L) A two-layer MLP network is used to obtain further representation, which are denoted as and Taking image features as an example, the calculation process is as follows:
[0093] α=softmax(MLP(X (L) ))
[0094] Finally, the image features obtained are:
[0095]
[0096] By performing deep collaborative attention learning and multimodal fusion calculations on semantic feature data and image feature data, the resulting multimodal information interaction becomes deeper and denser, further improving the comprehensiveness and accuracy of information search.
[0097] S1044. Classify the multimodal fusion calculation results based on the classification algorithm to obtain answer information of the question instruction.
[0098] In obtaining the above and After that, a linear multimodal fusion function is used to fuse and obtain the fusion feature z:
[0099]
[0100] The fused feature z is mapped to an N-dimensional vector s, where N is the number of answers with the highest frequency in the training set, and then the sigmoid function is used for classification. Optionally, Binary Cross-Entropy (BCE) is used as the loss function to train an N classifier on the fused feature z. Finally, the class with the highest probability is selected as the class to which the object belongs, and the answer information is obtained.
[0101] In addition, in order to improve the effect of the visual question answering model, this embodiment can also perform corpus optimization on the data set used by the model in advance. Among them, the data set for corpus optimization is the VQA-v2 data set, the Visual Genome data set, etc. It should be noted that the original data set is an English data set, and the data set used in this embodiment is a Chinese data set obtained by translating through a translation interface and manually verifying it. The specific optimization method may include the following operations:
[0102] Format optimization;
[0103] Sort out questions in which the image names contain Chinese characters and unusual symbols, and normalize the question ID as a unique field.
[0104] Normalize the answers;
[0105] Sort out the polysemous word problems in English answer translation and merge similar answers into one answer.
[0106] Question and answer pair optimization;
[0107] Delete or re-label some inappropriate question-answer pairs, such as those containing OCR and those involving common sense reasoning.
[0108] Data equalization;
[0109] Partially downsample the question-answer pairs corresponding to high-frequency answers, and rewrite and replace the high-frequency questions.
[0110] Supplementary annotations;
[0111] Supplementary annotations are made for some meaningful answers that do not appear in the dataset, such as collecting sports pictures and ancient costume pictures for question-answer pair annotation.
[0112] By optimizing the data set, the effectiveness of the VQA model can be improved, making the answers that match user questions more accurate.
[0113] In this embodiment, by inputting the question instruction into the general visual question answering VQA model, deep collaborative attention learning is further performed on the question instruction and the display screen, so as to obtain the answer information corresponding to the question instruction.
[0114] Likewise, Figure 7 The flowchart of another visual question-answering processing method provided by the embodiment of the present application is shown. Whether the intent type is a non-universal type or a universal type, the confidence of the answer information can be further given based on the answer information provided for the question instruction. The confidence indicates the probability of the possibility of the answer information. The higher the confidence, the higher the credibility of the answer information, so the confidence can be used to assist in verifying the matching degree between the answer and the question. The details are as follows:
[0115] Before implementing the visual question-answering function, we must first enter the smart TV visual question-answering intent module. The trigger condition is the user input command. If the user command starts with the keyword "TV", it is triggered. The keyword can be adjusted or expanded, and it is not a restriction. The central control sets IF_VQA in the visual question-answering intent to 1 to start the visual question-answering service.
[0116] In S101, a question instruction input by a user through an interactive interface is received, and the question instruction and a corresponding display screen are obtained. The specific steps include:
[0117] S1011, receiving interaction information sent by a user;
[0118] S1012: Perform keyword recognition on the interactive information to determine that the interactive information is a question instruction, and then take a screenshot of the current display screen to obtain a display screen corresponding to the question instruction.
[0119] As mentioned in S101, in this application, the executor of the visual question-answering method is a smart TV. In a smart TV, a user uses a voice input device, such as a remote control, and within the time (indeterminate) of pressing the voice button on the remote control, the system will receive the interactive information sent by the user. After keyword recognition of the interactive information, it is determined that the interactive information is a question instruction, and the screenshot module in the smart TV will automatically capture the current screen image, thereby obtaining the display screen corresponding to the question instruction.
[0120] After the visual question answering system receives the user's question instruction and display screen, before identifying the intent type of the question instruction in step S102, it first needs to match the user's question instruction and the display screen. If the matching degree is low, the subsequent intent type identification operation is not performed but a fallback process is directly performed, such as prompting the user to change the question, thereby further improving the efficiency of the visual question answering process. The details are as follows:
[0121] Matching and identifying the question instruction and the display screen;
[0122] If the matching degree between the question instruction and the display screen is less than the matching threshold, it means that the question instruction and the display screen are not related, and a prompt message for changing the question is output.
[0123] Specifically, through the question and image matching module, the question instruction and the display screen are matched and identified, that is, the correlation between the question instruction and the display screen is determined. As mentioned above, the matching module can be any model that can achieve matching, such as a picture text matching model, a third-party interface parsing model or a target detection model.
[0124] If the matching value obtained by the matching module is greater than the set threshold, it is considered that the user command is related to the display screen, and if so, proceed to the next step; otherwise, if the matching value obtained by the matching module is less than or equal to the set threshold, it is considered that the user command is irrelevant to the display screen, and the system outputs a fallback statement. Optionally, the fallback statement can be "The question is not related to the TV screen, please change the question", and the process ends.
[0125] To make the matching process easier to understand, an example is given below. For example, if the display screen is an apple and the user's instruction is "What fruit is this?", the visual question answering system returns: "Apple", then it is a related question and the question instruction matches the display screen. If the user's instruction is: "What car is this?", since there is no car in the display screen, it is an irrelevant question and the question instruction does not match the display screen.
[0126] Furthermore, after matching the user's question command and the display screen through the above steps, in order to make the subsequent questions and screens match more accurately, the expression of the questions can also be adjusted, as follows:
[0127] Perform semantic recognition on question instructions;
[0128] The semantic expression of the question instruction is adjusted according to the semantic recognition results.
[0129] Specifically, if the user instruction matches the display screen, and the specific screen involved is a "character", after semantic recognition of the user's question instruction, it is recognized that the user instruction does not contain a specific object. For example, the question asked by the user is "What did he play?" It is understandable that since this sentence does not contain a specific object, the visual question answering system will adjust the semantic expression. Assuming that the object in the TV screenshot is Zhang San, the system will call the relevant interface to adjust the semantic expression to "What did Zhang San play." Optionally, the relevant interface in this embodiment is a face recognition interface. If the user instruction is originally "What did Zhang San play", there is no need to convert it, and the original sentence is directly output.
[0130] Here, it should be noted that the adjustment of the semantic expression is only applicable when the object in the display screen is a "person". If the object in the TV screenshot is not a "person" but an animal or other, skip this step and proceed to the next step.
[0131] Furthermore, after the intention type of the question instruction is identified in step S102, the user's intention type is determined. Table 1 shows the classified intention types and their related expressions. As shown in Table 1:
[0132] Table 1
[0133]
[0134]
[0135] It can be understood that, regardless of whether the intent type is a non-universal type or a universal type, the confidence of the answer information can be further provided based on the answer information provided for the question instruction, wherein the confidence indicates the credibility of the answer information.
[0136] The output answer information is verified, and if the confidence level is greater than or equal to the threshold, the answer information of the instruction is output to the user.
[0137] If the confidence is less than the threshold and the semantics of the question information meets the access conditions of the image description, the image description information and similarity are obtained by identifying the display screen. The similarity indicates the similarity between the image description information and the picture.
[0138] Specific:
[0139] First, determine whether the displayed image meets the entry conditions of the image description. In an optional implementation, if the image description contains "what, what, what, what, what, what, what, what, what, what, what, etc.", it is considered to meet the entry conditions of the image description and enter the image description, otherwise it does not enter the image description and performs a fallback processing. Optionally, the fallback processing can output a fallback sentence for the visual question answering or not answer.
[0140] Then, determine whether the result of the image description meets the output verification conditions. If the display screen meets the access conditions of the image description, enter the image description service. If the result of the image description meets the output verification conditions, the result of the image description is output. If it does not meet the conditions, it enters the fallback processing. Similarly, the fallback processing can output a fallback statement for visual question answering or not answer. Among them, to determine whether the output verification conditions are met, an optional judgment method is: through any matching module, such as a picture text matching model, to judge the similarity score between the image and the description statement, when the score is greater than the threshold, the image description result is considered to be available.
[0141] Finally, if the similarity value is greater than the similarity threshold, the image description information is output to the user.
[0142] Figure 8 A schematic diagram of a visual question answering processing device provided in this application, the device comprising:
[0143] A receiving module 81 receives a question instruction input by a user through an interactive interface;
[0144] An acquisition module 82, which acquires a question instruction and a corresponding display screen;
[0145] The recognition module 83 inputs the question instruction into the corresponding typical attribute model to obtain the answer information of the question instruction if the intention type is recognized as a non-general type; if the intention type is recognized as a general type, the question instruction is input into the general visual question answering VQA model to perform deep collaborative attention learning on the question instruction and the display screen to obtain the answer information of the question instruction;
[0146] The output module 84 outputs the answer information of the instruction to the user.
[0147] Fig. 9 This is a schematic diagram of the structure of a visual question answering processing device provided in the present application. As shown in 9, the electronic device may include: at least one display 91, a processor 92 and a memory 93. Fig. 9 An electronic device is shown using a processor as an example.
[0148] A display 91, used for displaying images, and performing display under the control of the processor;
[0149] The memory 93 is used to store programs. Specifically, the programs may include program codes, and the program codes include computer operation instructions.
[0150] The memory 93 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0151] The processor 92 is used to execute the computer execution instructions stored in the memory 93 to implement the visual question answering processing method;
[0152] Among them, the processor 92 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The processor 92 implements visual question answering processing by running instructions stored in the memory 93.
[0153] Optionally, in a specific implementation, if the communication interface, the memory 93 and the processor 92 are implemented independently, the communication interface, the memory 93 and the processor 92 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or one type of bus.
[0154] Optionally, in a specific implementation, if the communication interface, memory 93 and processor 92 are integrated on a chip, the communication interface, memory 93 and processor 92 can communicate through an internal interface.
[0155] The present application also provides a computer-readable storage medium, which may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes. Specifically, the computer-readable storage medium stores program information, and the program information is used for visual question answering processing.
[0156] The embodiment of the present application also provides a program, which, when executed by a processor, is used to execute the visual question answering processing method provided by the above method embodiment.
[0157] The embodiments of the present application also provide a program product, such as a computer-readable storage medium, in which instructions are stored. When the program product is run on a computer, the computer is enabled to perform the visual question-answering processing provided in the above embodiments.
[0158] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0159] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0160] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A visual question answering method, It is characterized in that The method is applied to a smart TV, comprising: receiving interaction information sent by a user, where the interaction information is instruction information sent by the user to the smart TV; Perform keyword recognition on the interaction information to determine that the interaction information is a question instruction, and then take a screenshot of the current display screen to obtain a display screen corresponding to the question instruction; Identifying the intention type of the question instruction; If the intention type is identified as a non-universal type, the question instruction is input into a corresponding typical attribute type model to obtain answer information of the question instruction, wherein the non-universal type is a typical attribute type of the question intention; If the intention type is identified as a general type, the question instruction is input into a general visual question answering (VQA) model to perform deep collaborative attention learning on the question instruction and the display screen to obtain answer information of the question instruction; Outputting the answer information of the instruction to the user; Before identifying the intention type of the question instruction, the method further includes: Matching and identifying the question instruction and the display screen through a question and image matching module; If the matching degree between the question instruction and the display screen is less than the matching threshold, the question instruction and the display screen are irrelevant, and a prompt message for changing the question is output; The method further comprises: Obtaining a confidence level of the answer information, wherein the confidence level indicates a probability of the answer information; If the confidence is less than a threshold value, and the semantics of the question information in the question instruction meets the access condition of the image description, then the display screen is identified to obtain the image description information and the similarity, wherein the similarity indicates the degree of similarity between the image description information and the picture, and the access condition is that the image description contains a preset vocabulary; If the similarity value is greater than a similarity threshold, the image description information is output to the user.
2. The method according to claim 1, It is characterized in that The step of inputting the question instruction into a general visual question answering (VQA) model to perform collaborative attention calculation on the question instruction and the display screen includes: Performing word segmentation processing on the question information in the question instruction, and generating semantic feature data based on the word segmentation processing result; Extracting image features from the display image to obtain image feature data; Performing deep collaborative attention learning and multimodal fusion calculation on the semantic feature data and the image feature data; The multimodal fusion calculation result is classified based on a classification algorithm to obtain answer information of the question instruction.
3. The method according to claim 1, It is characterized in that The method further comprises: If the confidence level is greater than or equal to a threshold, the answer information of the instruction is output to the user.
4. The method according to claim 1, It is characterized in that Before identifying the intention type of the question instruction, the method further includes: Performing semantic recognition on the question instruction; The semantic expression of the question instruction is adjusted according to the semantic recognition result.
5. A visual question answering processing device, include: A receiving module, used to receive a question instruction input by a user through an interactive interface; An acquisition module, used to acquire the question instruction and the corresponding display screen; an identification module, used to identify the intention type of the question instruction, and if the intention type is identified as a non-universal type, input the question instruction into a corresponding typical attribute model to obtain answer information of the question instruction; If the intention type is identified as a general type, the question instruction is input into a general visual question answering (VQA) model to perform deep collaborative attention learning on the question instruction and the display screen to obtain answer information of the question instruction. The non-general type is a typical attribute type of the question intention; An output module, used for outputting the answer information of the instruction to the user; The receiving module is specifically used to: receive interaction information sent by a user, where the interaction information is instruction information sent by the user to the smart TV; Perform keyword recognition on the interaction information to determine that the interaction information is the question instruction, and then take a screenshot of the current display screen to obtain the display screen corresponding to the question instruction; The recognition module is also used to: match and identify the question instruction and the display screen through the question and image matching module; if the matching degree between the question instruction and the display screen is less than a matching threshold, the question instruction and the display screen are irrelevant, and a prompt message for changing the question is output; The output module is further used to obtain the confidence of the answer information, wherein the confidence indicates the possibility probability of the answer information; The recognition module is further configured to, if the confidence level is less than a threshold and the semantics of the question information in the question instruction meets the access condition of the image description, identify the display screen to obtain image description information and similarity, wherein the similarity indicates the degree of similarity between the image description information and the picture, and the access condition is that the image description contains a preset vocabulary; The output module is further configured to output the image description information to the user if the similarity value is greater than a similarity threshold.
6. An electronic device, include: Display, memory, processor; A display, used for displaying images, and performing display under the control of the processor; Memory; a memory for storing instructions executable by the processor; Wherein, the processor is configured to: run the instructions stored in the memory to execute the visual question answering processing method as described in claims 1-4.
7. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the visual question answering method according to any one of claims 1 to 4.
8. A computer program product, comprising a computer program, which, when executed by a processor, implements the visual question answering method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Question answering interaction method and system based on intelligent robot
CN108959627A
Event question-answering method, device and equipment based on artificial intelligence and storage medium
CN111368043A
Man-machine conversation processing method and device
CN111708869A
Visual question-answering method and system based on three-dimensional information
CN112463936A
Image content understanding and visual question answering VQA method, storage medium and terminal
CN112926655A
