Feature extraction model training, media data retrieval method and device

The processing of training data through feature interaction models solves the problem of low model quality in traditional technologies and improves the accuracy and quality of text-to-media data retrieval.

CN114329053BActive Publication Date: 2024-09-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202210016222.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-07
Publication Date
2024-09-10
Estimated Expiration
2042-01-07

AI Technical Summary

Technical Problem

Traditional techniques ignore the fine-grained information of text and video in feature extraction model training, resulting in low model quality and retrieval quality.

Method used

By obtaining the training media data and the corresponding training text, the initial text feature extraction model and the media feature extraction model are used for feature interaction, and the model parameters are adjusted to improve the model quality for text-to-media data retrieval.

Benefits of technology

It enhances the text feature extraction model's focus on text details and the media feature extraction model's focus on media data details, improving retrieval accuracy and retrieval quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114329053B
    Figure CN114329053B
Patent Text Reader

Abstract

The present application relates to a method, device, computer equipment, storage medium and computer program product for feature extraction model training and media data retrieval. The embodiments of the present invention can be applied to various scenarios such as cloud technology, artificial intelligence, smart transportation, and assisted driving. The method comprises: extracting features of question text, target answer and candidate answer through an initial text feature extraction model to obtain question text features, target answer features and candidate answer features; extracting features corresponding to training media data through an initial media feature extraction model to obtain training media features; performing feature interaction on question text features and training media features through an initial media text interaction model to obtain predicted answer features; adjusting the model parameters of each model based on the similarity between the predicted answer features and the target answer features and candidate answer features, respectively, until the convergence condition is met, and obtaining a target text feature extraction model and a target media feature extraction model for improving retrieval accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a feature extraction model training, media data retrieval method, apparatus, computer equipment, storage medium and computer program product. Background Art

[0002] With the development of computer technology, retrieval technology has emerged. For example, based on the user's query text, matching target videos can be retrieved from a large number of videos. When performing retrieval, text features and video features can be extracted with the help of models, and videos matching the text can be retrieved by performing feature comparison.

[0003] In traditional technology, matching text-video pairs and non-matching text-video pairs are usually used as training samples, and two models are used to extract text features and video features respectively. The matching text-video pairs and non-matching text-video pairs are distinguished by comparative learning to train the models. However, the above training process ignores the fine-grained information of text and video, which easily leads to low quality of the trained model and thus low retrieval quality. Summary of the invention

[0004] Based on this, it is necessary to provide a feature extraction model training, media data retrieval method, device, computer equipment, storage medium and computer program product that can improve model quality and retrieval quality in response to the above technical problems.

[0005] A feature extraction model training method, the method comprising:

[0006] Acquire training media data and training text corresponding to the training media data; the training text includes a question text, a target answer, and candidate answers corresponding to the training media data, and the question text and the target answer are obtained by performing masking processing on the target description text corresponding to the training media data;

[0007] Extracting text features of the question text through an initial text feature extraction model to obtain question text features, extracting media features corresponding to the training media data through an initial media feature extraction model to obtain training media features, and performing feature interaction on the question text features and the training media features through an initial media text interaction model to obtain predicted answer features;

[0008] Extracting text features of the target answer and the candidate answers respectively through the initial text feature extraction model to obtain target answer features and candidate answer features;

[0009] Calculate positive similarity based on the predicted answer feature and the target answer feature, and calculate negative similarity based on the predicted answer feature and the candidate answer feature;

[0010] Based on the positive similarity and the negative similarity, the model parameters of the initial text feature extraction model, the initial media feature extraction model and the initial media text interaction model are adjusted until the convergence condition is met, so as to obtain a target text feature extraction model, a target media feature extraction model and a target media text interaction model; the target text feature extraction model and the target media feature extraction model are used for media data retrieval through text.

[0011] A feature extraction model training device, the device comprising:

[0012] A training data acquisition module is used to acquire training media data and training text corresponding to the training media data; the training text includes a question text, a target answer and candidate answers corresponding to the training media data, and the question text and the target answer are obtained by masking the target description text corresponding to the training media data;

[0013] A feature processing module is used to extract text features of the question text through an initial text feature extraction model to obtain question text features, extract media features corresponding to the training media data through an initial media feature extraction model to obtain training media features, and perform feature interaction on the question text features and the training media features through an initial media text interaction model to obtain predicted answer features;

[0014] A text feature extraction module, used to extract text features of the target answer and the candidate answers respectively through the initial text feature extraction model to obtain target answer features and candidate answer features;

[0015] A similarity calculation module, used to calculate positive similarity based on the predicted answer feature and the target answer feature, and to calculate negative similarity based on the predicted answer feature and the candidate answer feature;

[0016] A model adjustment module is used to adjust the model parameters of the initial text feature extraction model, the initial media feature extraction model and the initial media text interaction model based on the positive similarity and the negative similarity until the convergence condition is met, thereby obtaining a target text feature extraction model, a target media feature extraction model and a target media text interaction model; the target text feature extraction model and the target media feature extraction model are used to retrieve media data through text.

[0017] A media data retrieval method, the method comprising:

[0018] Get the query text;

[0019] Extracting text features corresponding to the query text by using a target text feature extraction model to obtain query text features;

[0020] Based on the feature similarities between the query text feature and the candidate media features corresponding to the plurality of candidate media data, the target media data corresponding to the query text is determined from the candidate media data; the candidate media features are obtained by extracting features from the candidate media data using a target media feature extraction model;

[0021] The training process of the target text feature extraction model and the target media feature extraction model is as follows:

[0022] Acquire training media data and training text corresponding to the training media data; the training text includes a question text, a target answer, and candidate answers corresponding to the training media data, and the question text and the target answer are obtained by performing masking processing on the target description text corresponding to the training media data;

[0023] Extracting text features of the question text through an initial text feature extraction model to obtain question text features, extracting media features corresponding to the training media data through an initial media feature extraction model to obtain training media features, and performing feature interaction on the question text features and the training media features through an initial media text interaction model to obtain predicted answer features;

[0024] Extracting text features of the target answer and the candidate answers respectively through the initial text feature extraction model to obtain target answer features and candidate answer features;

[0025] Calculate positive similarity based on the predicted answer feature and the target answer feature, and calculate negative similarity based on the predicted answer feature and the candidate answer feature;

[0026] Based on the positive similarity and the negative similarity, the model parameters of the initial text feature extraction model, the initial media feature extraction model and the initial media text interaction model are adjusted until a convergence condition is met, thereby obtaining a target text feature extraction model, a target media feature extraction model and a target media text interaction model.

[0027] A media data retrieval device, the device comprising:

[0028] A query text acquisition module, used to acquire query text;

[0029] A text feature extraction module, used to extract text features corresponding to the query text through a target text feature extraction model to obtain query text features;

[0030] A media data retrieval module, configured to determine target media data corresponding to the query text from each candidate media data based on feature similarities between the query text feature and candidate media features corresponding to a plurality of candidate media data; the candidate media features are obtained by extracting features from the candidate media data using a target media feature extraction model;

[0031] The training process of the target text feature extraction model and the target media feature extraction model is as follows:

[0032] Acquire training media data and training text corresponding to the training media data; the training text includes a question text, a target answer, and candidate answers corresponding to the training media data, and the question text and the target answer are obtained by performing masking processing on the target description text corresponding to the training media data;

[0033] Extracting text features of the question text through an initial text feature extraction model to obtain question text features, extracting media features corresponding to the training media data through an initial media feature extraction model to obtain training media features, and performing feature interaction on the question text features and the training media features through an initial media text interaction model to obtain predicted answer features;

[0034] Extracting text features of the target answer and the candidate answers respectively through the initial text feature extraction model to obtain target answer features and candidate answer features;

[0035] Calculate positive similarity based on the predicted answer feature and the target answer feature, and calculate negative similarity based on the predicted answer feature and the candidate answer feature;

[0036] Based on the positive similarity and the negative similarity, the model parameters of the initial text feature extraction model, the initial media feature extraction model and the initial media text interaction model are adjusted until a convergence condition is met, thereby obtaining a target text feature extraction model, a target media feature extraction model and a target media text interaction model.

[0037] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps described in the above-mentioned feature extraction model training method and media data retrieval method when executing the computer program.

[0038] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps described in the above-mentioned feature extraction model training method and media data retrieval method.

[0039] A computer program product includes a computer program, which, when executed by a processor, implements the steps described in the above-mentioned feature extraction model training method and media data retrieval method.

[0040] The feature extraction model training, media data retrieval method, apparatus, computer equipment, storage medium and computer program product are obtained by obtaining training media data and training text corresponding to the training media data, wherein the training text includes question text, target answer and candidate answer corresponding to the training media data, the question text and the target answer are obtained by masking the target description text corresponding to the training media data, extracting text features of the question text through an initial text feature extraction model to obtain question text features, extracting media features corresponding to the training media data through an initial media feature extraction model to obtain training media features, and characterizing the question text features and the training media features through an initial media text interaction model. interaction, obtain predicted answer features, extract text features of the target answer and candidate answers respectively through the initial text feature extraction model, obtain target answer features and candidate answer features, calculate positive similarity based on the predicted answer features and the target answer features, calculate negative similarity based on the predicted answer features and the candidate answer features, adjust model parameters of the initial text feature extraction model, the initial media feature extraction model and the initial media text interaction model based on the positive similarity and the negative similarity until the convergence condition is met, and obtain the target text feature extraction model, the target media feature extraction model and the target media text interaction model, and the target text feature extraction model and the target media feature extraction model are used for media data retrieval through text. In this way, by performing feature interaction between question text features and training media features through the media text interaction model, features that are helpful in answering the question text can be found from the training media features, thereby obtaining predicted answer features. By adjusting the parameters of the three models based on the similarity between the predicted answer features and the target answer features and the candidate answer features, the attention of the text feature extraction model to text detail information, the attention of the media feature extraction model to media data detail information, and the association between text and media data detail information can be enhanced, thereby ultimately training a high-quality target text feature extraction model and a target media feature extraction model. Retrieval of text to media data based on such a target text feature extraction model and a target media feature extraction model can improve retrieval accuracy and retrieval quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A diagram of an application environment of a feature extraction model training and media data retrieval method in an embodiment;

[0042] Figure 2 A schematic diagram of a flow chart of a feature extraction model training method in one embodiment;

[0043] Figure 3 A schematic diagram of a process of performing feature interaction on question text features and training media features in one embodiment;

[0044] Figure 4 is a schematic diagram of the structure of a feature interaction layer in one embodiment;

[0045] Figure 5 A schematic diagram of a structure for performing feature interaction between question text features and training media features in one embodiment;

[0046] Figure 6 A schematic diagram of a process of training a text feature extraction model and a media feature extraction model in one embodiment;

[0047] Figure 7 A schematic diagram of the structure of model training in one embodiment;

[0048] Figure 8 is a flow chart of a media data retrieval method in another embodiment;

[0049] Fig. 9 A schematic diagram of a structure for performing model training based on a pre-training task in one embodiment;

[0050] Fig. 10A A comparison chart of the retrieval experimental results of the method of the present application and the existing method in an embodiment;

[0051] Fig. 10B A comparison chart of retrieval experimental results of the method of the present application and the existing method in another embodiment;

[0052] Fig. 10C A comparison chart of retrieval experiment results of the method of the present application and the existing method in another embodiment;

[0053] Fig.11 is a structural block diagram of a feature extraction model training device in one embodiment;

[0054] Fig.12 is a structural block diagram of a media data retrieval device in one embodiment;

[0055] Fig.13 is an internal structure diagram of a computer device in one embodiment;

[0056] Fig.14 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0058] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0059] The solution provided in the embodiments of the present application involves artificial intelligence computer vision technology, voice technology, machine learning and other technologies, which are specifically described through the following embodiments:

[0060] The feature extraction model training method and media data retrieval method provided in this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, intelligent voice interaction devices, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The terminal 102 is provided with an application, which can refer to a client installed in the terminal. The client (also known as an application client, APP client) refers to a program installed and running in the terminal; the application can also refer to an installation-free application, that is, an application that can be used without downloading and installing. This type of application is also commonly known as a mini-program, which usually runs in the client as a subroutine; the application can also refer to a web application opened through a browser; and so on. The above-mentioned various applications are divided according to the application functions they provide. The types of applications may include but are not limited to: search applications, instant messaging applications, payment applications, audio and video applications, etc. The server 104 may be implemented as an independent server or a server cluster or cloud server consisting of multiple servers.

[0061] The terminal 102 and the server 104 can be used together to execute the feature extraction model training method and the media data retrieval method provided in the embodiments of the present application.

[0062] For example, the server obtains training media data and training text corresponding to the training media data from the terminal. The training text includes the question text, target answer and candidate answer corresponding to the training media data. The question text and the target answer are obtained by masking the target description text corresponding to the training media data. The server extracts the text features of the question text through the initial text feature extraction model to obtain the question text features, extracts the media features corresponding to the training media data through the initial media feature extraction model to obtain the training media features, and performs feature interaction on the question text features and the training media features through the initial media text interaction model to obtain the predicted answer features. The server extracts the text features of the target answer and the candidate answer respectively through the initial text feature extraction model to obtain the target answer features and the candidate answer features, calculates the positive similarity based on the predicted answer features and the target answer features, and calculates the negative similarity based on the predicted answer features and the candidate answer features. The server adjusts the model parameters of the initial text feature extraction model, the initial media feature extraction model and the initial media text interaction model based on the positive similarity and the negative similarity until the convergence condition is met, and obtains the target text feature extraction model, the target media feature extraction model and the target media text interaction model.

[0063] The server obtains the query text from the terminal, extracts the text features corresponding to the query text through the target text feature extraction model, and obtains the query text features. The server obtains candidate media features corresponding to multiple candidate media data from the data storage system. The candidate media features are obtained by extracting features from the candidate media data through the target media feature extraction model. The server determines the target media data corresponding to the query text from each candidate media data based on the feature similarity between the query text features and the candidate media features corresponding to the multiple candidate media data. The server sends the target media data to the terminal.

[0064] The terminal 102 and the server 104 can also be used independently to execute the feature extraction model training method and the media data retrieval method provided in the embodiments of the present application.

[0065] For example, the terminal performs model training on the initial text feature extraction model, the initial media feature extraction model, and the initial media text interaction model based on the training samples to obtain the target text feature extraction model, the target media feature extraction model, and the target media text interaction model. The terminal performs media data retrieval based on the target text feature extraction model and the target media text interaction model to determine the target media data corresponding to the query text.

[0066] It can be understood that the embodiments of the present invention can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, data retrieval (for example, information search and information recommendation), etc.

[0067] In one embodiment, Figure 2As shown, a feature extraction model training method is provided, and the method is applied to a computer device as an example. The computer device can be the above-mentioned Figure 1 The terminal 102 or the server 104 in FIG. Figure 2 ,The feature extraction model training method includes the following steps:

[0068] Step S202, obtaining training media data and training text corresponding to the training media data; the training text includes question text, target answer and candidate answers corresponding to the training media data, and the question text and target answer are obtained by masking the target description text corresponding to the training media data.

[0069] Among them, media data refers to the media that can be used to disseminate information through the Internet information dissemination platform, which can be video, image, voice and other data. Training media data refers to the media data used for model training.

[0070] The training text refers to the text used for model training, the description text refers to the text describing the content of the media data, and the target description text refers to the description text corresponding to the training media data. For example, if the media data is a video, the target description text can be a text introduction of the video. The training text specifically includes the question text, target answer and candidate answer corresponding to the training media data. The question text corresponding to the training media data is obtained by masking the target description text corresponding to the training media data. Masking refers to masking or erasing any word or phrase in the target description text, using the masked target description text as the question text, and using the masked or erased words or phrases as the target answer corresponding to the question text. Assuming that the target description text is "a girl in shorts and a hat is dancing on the green grass", a noun phrase can be erased from the target description text to form the question text, that is, to form a noun question. For example, the noun phrase "green grass" is erased from the target description text to obtain the question text "a girl in shorts and a hat is dancing on [?]". The noun phrase "green grass" is the target answer corresponding to the question text. It can be understood that at least one set of question text and target answer can be obtained based on the same target description text.

[0071] The target answer can be considered as the correct answer corresponding to the question text. The candidate answer can be considered as the wrong answer corresponding to the target text. If there are multiple training media data, the target answer of the question text corresponding to any training media data can be used as the candidate answer of the question text corresponding to other training media data.

[0072] In one embodiment, modality is used to indicate the type of data, for example, video and voice are data of different modalities. Training media data and training text are data of different modalities, that is, training media data is other data types other than text, for example, training media data can be video, and training media data can be voice.

[0073] Specifically, the computer device can obtain training samples locally or from other devices, and obtain a target text feature extraction model and a target media feature extraction model based on the training samples. Subsequently, media data retrieval can be performed based on the target text feature extraction model and the target media feature extraction model. The training samples specifically include training media data and training text corresponding to the training media data, and the training text includes question text, target answers, and candidate answers corresponding to the training media data. It can be understood that there can be multiple training samples. If there are multiple training samples, the candidate answer in any training sample can be obtained by obtaining at least one answer from the target answers contained in other training samples.

[0074] Step S204: extract text features of the question text through the initial text feature extraction model to obtain question text features, extract media features corresponding to the training media data through the initial media feature extraction model to obtain training media features, perform feature interaction on the question text features and the training media features through the initial media text interaction model to obtain predicted answer features.

[0075] Among them, the text feature extraction model is used to extract text features of text data, and the text feature extraction model can also be called a text encoder. The media feature extraction model is used to extract media features of media data, and the media feature extraction model can also be called a media data encoder. The media text interaction model is used to perform feature interaction on text features and video features to predict the answer to the question text, thereby outputting the answer features of the predicted answer. The text feature extraction model, the media feature extraction model, and the media text interaction model can be a neural network model, a deep learning model, etc. The initial text feature extraction model refers to the text feature extraction model to be trained. The initial media feature extraction model refers to the media feature extraction model to be trained. The initial media text interaction model refers to the media text interaction model to be trained. The initial model parameters of the initial text feature extraction model, the initial media feature extraction model, and the initial media text interaction model can be pre-set based on experience, or can be randomly initialized model parameters.

[0076] Feature interaction refers to fully integrating question text features and training media features, searching for media features that are helpful in answering the question text from the training media features based on the question text features, and obtaining predicted answer features based on the found media features. Computer devices can perform feature interaction based on the attention mechanism or based on a custom formula or algorithm.

[0077] Specifically, the computer device can input the question text into the initial text feature extraction model, and output the question text features through data processing of the model, and input the training media data into the initial media feature extraction model, and output the training media features through data processing of the model. Furthermore, the computer device can input the question text features and the training media features into the initial media text interaction model, and perform feature interaction on the question text features and the training media features in the model, so that the model outputs the predicted answer features.

[0078] In one embodiment, the initial text feature extraction model can output at least one question text feature, and the media feature extraction model can output at least one training media feature. Different question text features can focus on feature information of different depths in the question text. For example, the features output by the higher-level network layers in the model focus on feature information of deeper layers in the model text. Similarly, different training media features can focus on feature information of different depths in the training media data. When performing feature interaction, the question text features and training media features output by the hierarchically matched network layers can be fused, and the predicted answer features can be obtained based on all fusion results.

[0079] Step S206, extracting text features of the target answer and candidate answers respectively through the initial text feature extraction model to obtain target answer features and candidate answer features.

[0080] Among them, the target answer feature refers to the text feature corresponding to the target answer, and the candidate answer feature refers to the text feature corresponding to the candidate answer.

[0081] Specifically, the computer device can also input the target answer and the candidate answers into the initial text feature extraction model respectively, and obtain the target answer features corresponding to the target answer and the candidate answer features corresponding to the candidate answers through data processing of the model.

[0082] Step S208, calculating positive similarity based on the predicted answer feature and the target answer feature, and calculating negative similarity based on the predicted answer feature and the candidate answer feature.

[0083] Specifically, after obtaining the predicted answer features, the target answer features, and the candidate answer features, the computer device can calculate the feature similarity between the predicted answer features and the target answer features to obtain positive similarity, and calculate the feature similarity between the predicted answer features and the candidate answer features to obtain negative similarity. The feature similarity calculation method can use a similarity calculation algorithm such as cosine similarity and Euclidean distance.

[0084] Step S210, based on the positive similarity and the negative similarity, the model parameters of the initial text feature extraction model, the initial media feature extraction model and the initial media text interaction model are adjusted until the convergence condition is met, thereby obtaining the target text feature extraction model, the target media feature extraction model and the target media text interaction model; the target text feature extraction model and the target media feature extraction model are used for media data retrieval through text.

[0085] The target text feature extraction model refers to a trained text feature extraction model, the target media feature extraction model refers to a trained media feature extraction model, and the target media text interaction model refers to a trained media text interaction model. Media data retrieval through text refers to retrieval of media data based on text, that is, taking text as a query condition and retrieving media data matching the query condition. For example, based on the query text input by the user, videos matching the query text are retrieved, and the retrieved videos are taken as retrieval results.

[0086] Specifically, after obtaining the positive similarity and the negative similarity, the computer device can perform back propagation based on the positive similarity and the negative similarity, update the model parameters of the initial text feature extraction model, the initial media feature extraction model and the initial media text interaction model, and return the text features of the question text extracted by the initial text feature extraction model, extract the media features of the training media data by the initial media feature extraction model, and iterate the steps of performing feature interaction between text features and media features by the initial media text interaction model, and continue training until the convergence condition is met. Then the training is completed and the target text feature extraction model, the target media feature extraction model and the target media text interaction model are obtained.

[0087] Among them, the convergence condition can be to maximize the positive similarity and minimize the negative similarity. The positive similarity is obtained based on the predicted answer features and the target answer features, and is used to characterize the feature similarity between the predicted answer and the correct answer. Therefore, in order to ensure the training quality of the model, the predicted answer output by the model is as close to the correct answer as possible, and the positive similarity is as large as possible. The negative similarity is obtained based on the predicted answer features and the candidate answer features, and is used to characterize the feature similarity between the predicted answer and the wrong answer. Therefore, in order to ensure the training quality of the model, the predicted answer output by the model is as far away from the wrong answer as possible, and the negative similarity is as small as possible. Therefore, the convergence condition can be set to maximize the positive similarity and minimize the negative similarity.

[0088] Of course, the convergence condition of the model can also be that the positive similarity is greater than the first preset similarity and the negative similarity is less than the second preset similarity, and the first preset similarity is greater than the second preset similarity. If the positive similarity is greater than the first preset similarity and the negative similarity is less than the second preset similarity, it means that the model has the ability to distinguish between correct answers and wrong answers and can be applied to retrieval tasks. The convergence condition of the model can also be that the number of iterations of the model is greater than the first number, and the positive similarity is greater than the first preset similarity and the negative similarity is less than the second preset similarity. The number of iterations of the model greater than the preset number can ensure the stability of the model. Among them, the specific values ​​of the first preset similarity, the second preset similarity and the first number can be set according to actual needs.

[0089] It can be understood that if there are multiple training media data, multiple similarities can be calculated based on each predicted answer feature and the corresponding target answer feature, and positive similarities can be obtained based on each similarity. Multiple similarities can be calculated based on each predicted answer feature and the corresponding candidate answer feature, and negative similarities can be obtained based on each similarity.

[0090] After training the target text feature extraction model and the target media feature extraction model, the computer device can apply the target text feature extraction model and the target media feature extraction model to the task of retrieving media data through text. For example, the computer device obtains the query text, extracts the text features of the query text through the target text feature extraction model, extracts the media features of multiple candidate media data respectively through the target media feature extraction model, and determines the target media data that matches the query text from each candidate media data based on the feature similarity of the text features and the media features. Among them, the task of retrieving media data through text can be passively triggered. For example, in a search application, the user enters the search information in the search box to retrieve information, and the search application will trigger the retrieval, use the search information entered by the user as the query text, determine the retrieval results in the media database based on the query text, use the retrieval results as search results, and display the search results to the user. The task of retrieving media data through text can also be actively triggered. For example, in an audio and video application, the user does not need to enter search information, the audio and video application can automatically recommend information to the user, and the audio and video application can automatically trigger retrieval, obtain the query text based on the user's historical search results or historical search information or historical browsing history, determine the retrieval results in the audio and video library based on the query text, use the retrieval results as recommendation results, and actively display the recommendation results to the user.

[0091] Of course, the computer device can also send the target text feature extraction model and the target media feature extraction model to other devices, and let the other devices handle the retrieval task.

[0092] In the above-mentioned feature extraction model training method, by obtaining training media data and training text corresponding to the training media data, the training text includes a question text, a target answer and a candidate answer corresponding to the training media data, the question text and the target answer are obtained by masking the target description text corresponding to the training media data, the text features of the question text are extracted by the initial text feature extraction model to obtain the question text features, the media features corresponding to the training media data are extracted by the initial media feature extraction model to obtain the training media features, the question text features and the training media features are interacted with each other by the initial media text interaction model to obtain the predicted answer features, the text features of the target answer and the candidate answers are respectively extracted by the initial text feature extraction model to obtain the target answer features and the candidate answer features, the positive similarity is calculated based on the predicted answer features and the target answer features, the negative similarity is calculated based on the predicted answer features and the candidate answer features, the model parameters of the initial text feature extraction model, the initial media feature extraction model and the initial media text interaction model are adjusted based on the positive similarity and the negative similarity until the convergence condition is met, and the target text feature extraction model, the target media feature extraction model and the target media text interaction model are obtained, and the target text feature extraction model and the target media feature extraction model are used for media data retrieval through text. In this way, by performing feature interaction between question text features and training media features through the media text interaction model, features that are helpful in answering the question text can be found from the training media features, thereby obtaining predicted answer features. By adjusting the parameters of the three models based on the similarity between the predicted answer features and the target answer features and the candidate answer features, the attention of the text feature extraction model to text detail information and the attention of the media feature extraction model to media data detail information can be enhanced, and the association between text and media data detail information can be enhanced, thereby ultimately training a high-quality target text feature extraction model and a target media feature extraction model. Retrieval of text to media data based on such a target text feature extraction model and a target media feature extraction model can improve retrieval accuracy and retrieval quality.

[0093] In one embodiment, the process of generating the question text and the target answer includes at least one of the following methods:

[0094] At least one first subtext in the target description text is masked to obtain question texts corresponding to each first subtext, and the first subtext is used as a target answer that matches the corresponding question text; the first subtext includes any one of a verb and a verb phrase; at least one second subtext in the target description text is masked to obtain question texts corresponding to each second subtext, and the second subtext is used as a target answer that matches the corresponding question text; the second subtext includes any one of a noun and a noun phrase.

[0095] The subtext is a text composed of at least one word in the target description text. The first subtext includes any one of a verb and a verb phrase, and the second subtext includes any one of a noun and a noun phrase. A verb phrase refers to a phrase containing a verb, and a noun phrase refers to a phrase containing a noun. A phrase is composed of at least two words.

[0096] Specifically, the verbs and verb phrases in the target description text corresponding to the media data have rich semantic information, which can reflect the action information and motion information of the objects in the media data. Therefore, the computer device can mask the verbs or verb phrases in the target description text, use the target description text with the verbs or verb phrases erased as the question text, and use the erased verbs or verb phrases as the target answer corresponding to the question text. Since the same target description text may include multiple verbs or verb phrases, multiple question texts and corresponding target answers can be generated based on the same target description text. That is, the computer device can mask at least one first subtext in the target description text to obtain the question texts corresponding to each first subtext, and each first subtext is used as a target answer that matches the corresponding question text.

[0097] The nouns or noun phrases in the target description text corresponding to the media data also have rich semantic information, which can reflect the local objects and subjects in the media data. Therefore, the computer device can mask the nouns or noun phrases in the target description text, use the target description text with the nouns or noun phrases erased as the question text, and use the erased nouns or noun phrases as the target answer corresponding to the question text. Since the same target description text may include multiple nouns or noun phrases, multiple question texts and corresponding target answers can be generated based on the same target description text. That is, the computer device can mask at least one second subtext in the target description text to obtain the question texts corresponding to each second subtext, and each second subtext is used as the target answer matching the corresponding question text.

[0098] The question text in the training text may include at least one of the question text corresponding to the first subtext and the question text corresponding to the second subtext.

[0099] In this embodiment, the verbs or verb phrases in the target description text are masked to generate the question text and the target answer corresponding to the question text. When the model is subsequently trained, the media text interaction model is trained to select the correct verb or verb phrase from multiple options by using media features, which helps the media feature extraction model capture accurate temporal dynamics to answer verb questions. The nouns or noun phrases in the target description text are masked to generate the question text and the target answer corresponding to the question text. When the model is subsequently trained, the media text interaction model is trained to select the correct noun or noun phrase from multiple options by using media features, which helps the media feature extraction model capture accurate spatial content to answer noun questions.

[0100] In one embodiment, the initial text feature extraction model includes multiple text feature extraction layers connected in sequence, the initial media feature extraction model includes multiple media feature extraction layers connected in sequence, and the initial media-text interaction model includes multiple feature interaction layers connected in sequence. There is an association relationship between the hierarchically matched text feature extraction layers, media feature extraction layers, and feature interaction layers.

[0101] like Figure 3 As shown, step S204 includes:

[0102] Step S302: input the question text into the initial text feature extraction model to obtain the question text features output by each text feature extraction layer.

[0103] Specifically, the initial text feature extraction model includes a plurality of text feature extraction layers connected in sequence. After the computer device inputs the question text into the initial text feature extraction model, each text feature extraction layer extracts features, and each text feature extraction layer outputs corresponding question text features. On the basis of each text feature extraction layer being connected in sequence, the output data of the current text feature extraction layer is input into the next text feature extraction layer, that is, the output data of the current text feature extraction layer is used as the input data of the next text feature extraction layer. Since the current text feature extraction layer further extracts features based on the feature extraction results of the previous text feature extraction layer, the text feature extraction layer that is ranked later can extract more detailed and deeper feature information from the text.

[0104] Step S304: input the training media data into the initial media feature extraction model to obtain the training media features outputted by each media feature extraction layer.

[0105] Specifically, similar to the initial text feature extraction model, the initial media feature extraction model includes a plurality of media feature extraction layers connected in sequence. After the computer device inputs the training media data into the initial media feature extraction model, each media feature extraction layer outputs corresponding training media features through feature extraction of each media feature extraction layer. On the basis of each media feature extraction layer being connected in sequence, the output data of the current media feature extraction layer is input into the next media feature extraction layer, that is, the output data of the current media feature extraction layer is used as the input data of the next media feature extraction layer.

[0106] It is understandable that the network structures of the various text feature extraction layers may be the same or different. The network structures of the various media feature extraction layers may be the same or different. For example, one media feature extraction layer includes three convolutional layers, and another media feature extraction layer includes four convolutional layers.

[0107] Step S306, input the question text features and training media features respectively output by the text feature extraction layer and the media feature extraction layer that are in an associated relationship into the associated feature interaction layer, and obtain the reference answer features respectively output by each feature interaction layer; the input data of the current feature interaction layer includes the question text features output by the associated text feature extraction layer, the training media features output by the associated media feature extraction layer, and the reference answer features output by the previous feature interaction layer.

[0108] Among them, the initial media text interaction model also includes multiple feature interaction layers connected in sequence. In addition, there is an association relationship between the hierarchically matched text feature extraction layer, media feature extraction layer and feature interaction layer. Hierarchy refers to the arrangement order of network layers in the model. Hierarchical matching can mean that the sorting positions of different types of network layers in their respective models are consistent. For example, the first text feature extraction layer in the initial text feature extraction model, the first media feature extraction layer in the initial media feature extraction model and the first feature interaction layer in the initial media text interaction model are hierarchically matched network layers, and the second text feature extraction layer in the initial text feature extraction model, the second media feature extraction layer in the initial media feature extraction model and the second feature interaction layer in the initial media text interaction model are hierarchically matched network layers. Of course, hierarchical matching can also be set according to actual needs or experience. For example, experts set the hierarchical matching relationship between text feature extraction layers, media feature extraction layers and feature interaction layers according to experience. That is, the sorting positions of various hierarchically matched network layers in their respective models can be consistent or inconsistent. For example, according to the setting result based on experience, the second text feature extraction layer in the initial text feature extraction model, the second media feature extraction layer in the initial media feature extraction model, and the first feature interaction layer in the initial media text interaction model may be hierarchically matched network layers, and the fourth text feature extraction layer in the initial text feature extraction model, the fourth media feature extraction layer in the initial media feature extraction model, and the second feature interaction layer in the initial media text interaction model may be hierarchically matched network layers. The computer device may establish an association relationship between the hierarchically matched text feature extraction layers, media feature extraction layers, and feature interaction layers in advance, so as to facilitate subsequent feature interaction.

[0109] Specifically, the initial media text interaction model is used to fuse question text features and training media features, so the input data of the feature interaction layer in the initial media text interaction model includes question text features and training media features. The computer device can input the question text features and training media features respectively output by the text feature extraction layer and the media feature extraction layer in an associated relationship into the associated feature interaction layer for feature interaction, thereby obtaining the reference answer features respectively output by each feature interaction layer. In addition, each feature interaction layer in the initial media text interaction model is connected in sequence, and the output data of the current feature interaction layer needs to be input into the next feature interaction layer to fuse with the question text features and training media features input into the next feature extraction layer to obtain the output data of the next feature extraction layer. That is, the input data of the current feature interaction layer includes the question text features output by the associated text feature extraction layer, the training media features output by the associated media feature extraction layer, and the reference answer features output by the previous feature interaction layer.

[0110] In the current feature interaction layer, the computer device may first fuse the question text features and the training media features to obtain the initial answer features, and then fuse the initial answer features with the reference answer features output by the previous feature interaction layer to output the reference answer features corresponding to the current feature interaction layer. The computer device may perform data fusion based on a custom formula or algorithm.

[0111] In one embodiment, other network layers, such as a fully connected layer, may exist between different feature interaction layers.

[0112] Step S308, obtaining predicted answer features based on the reference answer features output by the output layer of the initial media text interaction model.

[0113] Specifically, the output layer of the initial media text interaction model refers to the last feature interaction layer in the model. The computer device can obtain the predicted answer feature based on the reference answer feature output by the last feature interaction layer. For example, the reference answer feature output by the last feature interaction layer can be used as the predicted answer feature, or the answer sub-feature of the target position can be obtained from the reference answer feature output by the last feature interaction layer as the predicted answer feature.

[0114] In this embodiment, the question text features and training media features outputted from the associated text feature extraction layer and media feature extraction layer respectively are sent to the corresponding feature interaction layer for cross-modal feature interaction processing, so as to obtain accurate predicted answer features.

[0115] In one embodiment, the question text features and the training media features respectively outputted by the associated text feature extraction layer and the media feature extraction layer are inputted into the associated feature interaction layer to obtain the reference answer features respectively outputted by each feature interaction layer, including:

[0116] The question text features output by the text feature extraction layer associated with the current feature interaction layer are used as the current text features, and the training media features output by the media feature extraction layer associated with the current feature interaction layer are used as the current media features; based on the feature similarity between the current text features and the current media features, the current media features are screened to obtain initial answer features; based on the initial answer features and the reference answer features output by the previous feature interaction layer, the intermediate answer features are obtained; based on the intermediate answer features, the reference answer features output by the current feature interaction layer are obtained.

[0117] Feature screening refers to finding local features similar to text features from media features based on the similarity between text features and media features, which are helpful in answering the question text. Specifically, local features in media features that are more similar to text features can be enhanced based on feature similarity, while local features in media features that are less similar to text features can be weakened.

[0118] Specifically, the process of feature interaction is explained by taking the current feature interaction layer as an example, and the current feature interaction layer can be any feature interaction layer. First, in order to facilitate the subsequent description, the question text features output by the text feature extraction layer associated with the current feature interaction layer are used as the current text features, and the training media features output by the media feature extraction layer associated with the current feature interaction layer are used as the current media features. When performing feature interaction, the computer device can calculate the feature similarity between the current text features and the current media features, perform feature screening on the current media features based on the feature similarity, and find out the key features that are helpful in answering the question text from the current media features, thereby obtaining the initial answer features. The initial answer feature represents the feature information that is helpful in answering the question text found from the media feature information of the matching layer based on the text feature information of the current layer.

[0119] In order to improve the prediction accuracy, the computer device also needs to fuse the initial answer features of the current feature extraction layer and the reference answer features output by the previous feature interaction layer to obtain intermediate answer features. For example, the initial answer features of the current feature extraction layer and the reference answer features output by the previous feature interaction layer are added to obtain intermediate answer features. The intermediate answer features fuse feature information that is helpful in answering the question text found from feature data of different depths. Finally, the computer device can obtain the reference answer features output by the current feature extraction layer based on the intermediate answer features. For example, the intermediate answer features can be used as reference answer features, or further data processing can be performed on the intermediate answer features to fully fuse feature data at different levels to obtain more accurate reference answer features.

[0120] In this embodiment, based on the feature similarity between the current text feature and the current media feature, feature screening is performed on the current media feature to obtain the initial answer feature, and based on the initial answer feature and the reference answer feature output by the previous feature interaction layer, the intermediate answer feature is obtained, and based on the intermediate answer feature, the reference answer feature output by the current feature interaction layer is obtained, so that accurate reference answer features can be obtained.

[0121] In one embodiment, the current text feature includes a plurality of text sub-features arranged in order, and the current media feature includes a plurality of media sub-features arranged in order. Based on the feature similarity between the current text feature and the current media feature, the current media feature is subjected to feature screening to obtain an initial answer feature, including:

[0122] Determine a target sub-feature from multiple text sub-features arranged in order; calculate the similarity between the target sub-feature and each media sub-feature to obtain multiple similarities arranged in order; fuse the similarity with consistent sorting information and the media sub-feature to obtain multiple fused sub-features, and obtain an answer sub-feature based on each fused sub-feature; use the next text sub-feature as the target sub-feature, return to the step of calculating the similarity between the target sub-feature and each media sub-feature, until all target sub-features are involved in the calculation, and obtain multiple answer sub-features; obtain an initial answer feature based on each answer sub-feature.

[0123] Specifically, when performing feature screening, the computer device can take the first text sub-feature as the target sub-feature from the multiple text sub-features arranged in order, calculate the similarity between the target sub-feature and each media sub-feature, and obtain multiple similarities arranged in order. The order of similarities corresponds to the order of the media sub-features involved in the calculation. For example, the similarity between the target sub-feature and the first media sub-feature is taken as the first similarity, and the similarity between the target sub-feature and the second media sub-feature is taken as the second similarity. Then, the computer device can fuse the similarity with the media sub-feature with consistent sorting information to obtain a fused sub-feature, that is, fuse the media sub-feature used to calculate the similarity with the calculated similarity to obtain a fused sub-feature. For example, the media sub-feature with consistent sorting information and the similarity can be multiplied to obtain a fused sub-feature. It can be understood that the similarity calculated based on the text sub-features and media sub-features can characterize the correlation between local text information and local media data. The stronger the correlation, the greater the similarity. Fusion of similarity and media sub-features with consistent sorting information can highlight media sub-features with strong correlation with text information and weaken media sub-features with weak correlation with text information. Due to the existence of multiple similarities, multiple fused sub-features can be obtained in the end, and then an answer sub-feature is formed based on each fused sub-feature.

[0124] Next, the computer device can use the next text sub-feature as a new target sub-feature, return to the step of calculating the similarity between the target sub-feature and each media sub-feature, and calculate a new answer sub-feature. Similarly, each text sub-feature is used as a target sub-feature to participate in the calculation, and finally multiple answer sub-features can be obtained. Finally, the computer device can compose an initial answer feature based on each answer sub-feature.

[0125] For example, the current text feature A = [a1, a2, a3, ..., an], the current media feature B = [b1, b2, b3, ..., bn], and the initial answer feature C obtained based on the current text feature A and the current media feature B = [c1, c2, c3, ..., cn]. When performing feature screening, first, calculate the similarity between a1 and b1, b2, b3, ..., bn, and obtain [m1, m2, m3, ..., mn]. Among them, m1 is the similarity between a1 and b1, m2 is the similarity between a2 and b2, and so on, mn is the similarity between an and bn. Then, [m1, m2, m3, ..., mn] and [b1, b2, b3, ..., bn] are weighted summed to obtain c1. c1 = m1*b1+m2*b2+m3*b3+ ...+mn*bn. Similarly, c2 can be calculated based on a2 and [b1, b2, b3, ..., bn], c3 can be calculated based on a3 and [b1, b2, b3, ..., bn], and cn can be calculated based on an and [b1, b2, b3, ..., bn]. Finally, c1 to cn are arranged and combined to obtain the initial answer feature C.

[0126] In one embodiment, in order to improve computational efficiency, multiple adjacent text sub-features may be combined into one local text feature, and multiple adjacent media sub-features may be combined into one local media feature, and feature screening may be performed using local text features and local media features as units. For example, when calculating similarity, the average value may be calculated from multiple sub-similarities corresponding to the local text feature and the local media feature as the similarity between the two, and the sub-similarity may be calculated based on the text sub-features and media sub-features with consistent sorting information in the local text feature and the local media feature. When merging the similarity and the local media feature, the similarity and each media sub-feature in the local media feature may be fused to obtain a local fused feature.

[0127] In one embodiment, the current text features and the current media features can also be transformed and scaled to obtain updated text features and updated media features. Based on the feature similarity of the updated text features and the updated media features, the updated text features are feature screened to obtain updated answer features. The intermediate answer features are obtained based on the initial answer features, the updated answer features, and the reference answer features, and the intermediate answer features are obtained by fusing the initial answer features, the updated answer features, and the reference answer features. It can be understood that there can be at least one updated text feature and an updated media feature, and therefore, at least one updated answer feature can be obtained.

[0128] In this embodiment, a target sub-feature is determined from a plurality of text sub-features arranged in order; the similarity between the target sub-feature and each media sub-feature is calculated to obtain a plurality of similarities arranged in order; the similarity with consistent sorting information is fused with the media sub-feature to obtain a plurality of fused sub-features, and an answer sub-feature is obtained based on each fused sub-feature; the next text sub-feature is used as the target sub-feature, and the step of calculating the similarity between the target sub-feature and each media sub-feature is returned to execute until all target sub-features participate in the calculation to obtain a plurality of answer sub-features; and an initial answer feature is obtained based on each answer sub-feature. In this way, by scaling the media sub-feature based on the similarity between the target sub-feature and the media sub-feature, the sub-features in the media features that are more similar to the text features can be enhanced, and the sub-features in the media features that are less similar to the text features can be weakened.

[0129] In one embodiment, obtaining the reference answer feature output by the current feature interaction layer based on the intermediate answer feature includes:

[0130] Perform feature transformation on the intermediate answer features to obtain the first answer features, the second answer features and the third answer features; based on the feature similarity between the first answer features and the second answer features, perform feature screening on the third answer features to obtain the fused answer features; based on the fused answer features, obtain the reference answer features output by the current feature interaction layer.

[0131] Among them, feature transformation refers to scaling the eigenvalues ​​of the intermediate answer features. The scaling ratios of different eigenvalues ​​in the intermediate answer features can be the same or different. In one embodiment, the intermediate answer features can be feature transformed based on different transformation features to obtain first answer features, second answer features, and third answer features. For example, features are usually represented by matrices, and the first transformation matrix and the intermediate answer matrix can be dot-multiplied to obtain the first answer matrix, the second transformation matrix and the intermediate answer matrix can be dot-multiplied to obtain the second answer matrix, and the third transformation matrix and the intermediate answer matrix can be dot-multiplied to obtain the third answer matrix.

[0132] Specifically, when obtaining the reference answer feature based on the intermediate answer feature, the computer device can further perform feature interaction on the data in the intermediate answer feature to obtain a more accurate reference answer feature. The computer device can perform feature transformation on the intermediate answer feature to obtain the first answer feature, the second answer feature and the third answer feature, and the first answer feature, the second answer feature and the third answer feature contain different feature values. Furthermore, the computer device can perform feature screening on the third answer feature based on the feature similarity of the first answer feature and the second answer feature to obtain the fused answer feature. It can be understood that the specific process of feature screening can refer to the contents of the aforementioned embodiments, which will not be repeated here. Considering that there will be a certain correlation between different data in the intermediate answer feature, the data in the intermediate answer feature can be fully fused through a new round of feature screening. Finally, the computer device can obtain the reference answer feature output by the current feature interaction layer based on the fused answer feature. For example, the fused answer feature can be used as the reference answer feature, or the fused answer feature can be normalized and fully connected to obtain the reference answer feature.

[0133] In this embodiment, feature transformation is first performed on the intermediate answer features to obtain first answer features, second answer features and third answer features, and then feature interaction is performed on the first answer features, second answer features and third answer features, so that the data in the intermediate answer features can be further fully integrated to obtain more accurate reference answer features.

[0134] In one embodiment, Figure 4 It is a schematic diagram of the data processing process of the feature interaction layer l. Indicates the current text features. Indicates the current media characteristics. represents the initial answer feature, Represents the reference answer feature output by the previous feature interaction layer, represents the reference answer feature output by the feature interaction layer l. In the feature interaction layer l, firstly, the multi-head attention network is used to and Process the data to obtain Then and Add, and finally process the addition result through the attention network to get In the multi-head attention network, As Q, As K and V, by calculating the similarity between Q and K, and weighted summing V with the similarity, we can get In the attention network, and The addition result is transformed to obtain new Q, K and V. Similarly, by calculating the similarity of Q and K, V is weighted and summed with the similarity to obtain the data processing result. The data processing result is normalized and multi-layer fully connected, and finally output

[0135] In one embodiment, the question text is input into the initial text feature extraction model to obtain the question text features output by each text feature extraction layer, and the training media data is input into the initial media feature extraction model to obtain the training media features output by each media feature extraction layer, including:

[0136] The word vector sequence corresponding to the question text is input into the initial text feature extraction model to obtain the question text features output by each text feature extraction layer; the media segment vector sequence corresponding to the training media data is input into the initial media feature extraction model to obtain the training media features output by each media feature extraction layer; the media segment vector sequence includes the media segment vectors corresponding to each media data segment obtained by segmenting the training media data; the word vector sequence and the media segment vector sequence are used to input the first feature interaction layer to obtain the reference answer features output by the first feature interaction layer.

[0137] Among them, the word vector sequence corresponding to the question text includes the word vectors corresponding to each word in the question text. The question text can be segmented to obtain multiple words, and the word vectors corresponding to each word are obtained to form a word vector sequence. In one embodiment, the word vector sequence corresponding to the question text can include a tag vector corresponding to the beginning of a sentence mark, and the tag vector corresponding to the beginning of a sentence mark can be processed by the model to obtain the text feature that can be used as the feature representation of the entire text. The word vector can be obtained by dictionary matching, or by a model for generating a word vector.

[0138] The media segment vector sequence corresponding to the training media data includes the media segment vectors corresponding to each media data segment of the training media data. The training media data can be segmented to obtain multiple media data segments, and the feature vectors corresponding to each media data segment are extracted to obtain each media segment vector, and each media segment vector constitutes a media segment vector sequence. For example, if the training media data is a video, each video frame in the video can be segmented into multiple video frame segments. For example, a video frame can be divided into 196 (14*14=196) segments, and then the feature vectors corresponding to each video frame segment are extracted through a convolutional network, and the extracted feature vectors are composed of a media segment vector sequence. In one embodiment, the media segment vector sequence corresponding to the training media data can include a marker vector corresponding to the start marker of the media data. The media features obtained by the marker vector corresponding to the start marker of the media data after data processing by the model can be used as the feature representation of the entire media data.

[0139] Specifically, the computer device can obtain a word vector sequence corresponding to the question text, input the word vector sequence into the initial text feature extraction model, and after feature extraction by each text feature extraction layer connected in sequence in the model, each text feature extraction layer outputs question text features respectively. The computer device can obtain a media segment vector sequence corresponding to the training media data, input the media segment vector sequence into the initial media feature extraction model, and after feature extraction by each media feature extraction layer connected in sequence in the model, each media feature extraction layer outputs training media features respectively.

[0140] In addition, the word vector sequence and the media segment vector sequence can be input into the first feature interaction layer in the initial media feature extraction model, and the first feature interaction layer performs feature interaction on the word vector sequence and the media segment vector sequence, and then the first feature interaction layer outputs the reference answer feature. The first feature interaction layer refers to the first feature interaction layer in the initial media feature extraction model.

[0141] In one embodiment, an embedding layer can also be added to the initial text feature extraction model, and a word vector sequence of the model input data can be extracted through the embedding layer. Then, it is only necessary to input the question text into the initial text feature extraction model, the question text is first input into the embedding layer, and the word vector sequence is output after the data processing of the embedding layer, and then the word vector sequence is input into the first text feature extraction layer, the output data of the first text feature extraction layer is input into the second text feature extraction layer, the output data of the second text feature extraction layer is input into the third text feature extraction layer, and so on, and finally the question text features output by each text feature extraction layer are obtained. Similarly, a linear projection layer can also be added to the initial media feature extraction model, and a media segment vector sequence of the model input data can be extracted through the linear projection layer. Then, it is only necessary to input the training media data into the initial text feature extraction model, the training media data is first input into the linear projection layer, and the media segment vector sequence is output after the data processing of the linear projection layer, and then the media segment vector sequence is input into the first media feature extraction layer, the output data of the first media feature extraction layer is input into the second media feature extraction layer, the output data of the second media feature extraction layer is input into the third media feature extraction layer, and so on, and finally the training media features output by each media feature extraction layer are obtained. Furthermore, there is an association relationship between the embedding layer, the linear projection layer and the first feature interaction layer.

[0142] In this embodiment, the word vector sequence corresponding to the question text is used as the input data of the initial text feature extraction model, and the media segment vector sequence corresponding to the training media data is used as the input data of the initial media feature extraction model, which can facilitate the internal data processing of the model and improve data processing efficiency.

[0143] In one embodiment, the reference answer feature includes multiple answer sub-features, and the predicted answer feature is obtained based on the reference answer feature output by the output layer of the initial media text interaction model, including: obtaining the answer sub-feature of the target position from the reference answer feature output by the output layer of the initial media text interaction model to obtain the predicted answer feature.

[0144] The reference answer feature includes multiple answer sub-features. It can be understood that the reference answer feature can be represented by a vector, and the answer sub-features represent each vector value in the vector. The answer sub-feature at the target position is the first answer sub-feature.

[0145] Specifically, the word vector sequence includes a tag vector corresponding to the beginning tag of the sentence, and the tag vector corresponding to the beginning tag of the sentence is the first vector in the word vector sequence. The text features obtained by processing the tag vector corresponding to the beginning tag of the sentence through the data processing of the model can be used as the feature representation of the entire text. The media segment vector sequence includes a tag vector corresponding to the start tag of the media data, and the tag vector corresponding to the start tag of the media data is the first vector in the word vector sequence. The media features obtained by processing the tag vector corresponding to the start tag of the media data through the data processing of the model can be used as the feature representation of the entire media data. Therefore, when determining the predicted answer feature, the answer sub-feature of the target position can be obtained from the reference answer feature output by the output layer of the initial media text interaction model as the predicted answer feature, and the first answer sub-feature in the reference answer feature is used as the final predicted answer feature. The answer sub-feature of the target position can be used as the feature representation of the entire predicted answer.

[0146] In one embodiment, reference Figure 5 , using the media data as video to illustrate the overall feature interaction process. In the video retrieval scenario, the media data is video, the media feature extraction model is the video encoder, and the media text interaction model is the video text interaction model. The text encoder includes multiple text feature extraction layers, the video encoder includes multiple video feature extraction layers, and the video text interaction model includes multiple video text interaction layers. The question text is "[cls]A gril in shortsand a hat is[?]on the green grass", and [cls] is the sentence start marker. The question text is input into the embedding layer, and the embedding layer outputs a sequence of word vectors Will Input text feature extraction layer 1, text feature extraction layer 1 outputs question text features Will Input text feature extraction layer 2, text feature extraction layer 2 outputs question text features Similarly, the output of the text feature extraction layer l is Similarly, the training video is input into the linear projection layer, and the linear projection layer outputs a sequence of video clip vectors Will Input video feature extraction layer 1, video feature extraction layer 1 outputs training video features Will Input video feature extraction layer 2, video feature extraction layer 2 outputs training video features Similarly, the video feature extraction layer l outputs Among them, the word vector sequence The first vector C is the tag vector corresponding to the sentence start tag, and the video clip vector sequence The first vector C in is the tag vector corresponding to the video start tag. and Input video text interaction layer 1, obtain reference answer feature 1, and convert reference answer feature 1, and Input video text interaction layer 2 to obtain reference answer feature 2, and so on, video text interaction layer l outputs reference answer feature l. Video text interaction layer L is the last feature interaction layer, and the first vector C is obtained from the data processing result of video text interaction layer L as the predicted answer feature.

[0147] Similarly, the text feature extraction layer L is the last text feature extraction layer, and the first vector C can be obtained from the data processing result of the text feature extraction layer L as the final extracted text feature. For example, the description text is input into the text encoder, and the first vector C is obtained from the data processing result of the text feature extraction layer L as the final text feature corresponding to the description text. The video feature extraction layer L is the last text feature extraction, and the first vector C can also be obtained from the data processing result of the video feature extraction layer L as the final extracted video feature. For example, any video is input into the video encoder, and the first vector C is obtained from the data processing result of the video feature extraction layer L as the final video feature corresponding to the input video.

[0148] In one embodiment, the initial text feature extraction model includes a plurality of sequentially connected text feature extraction layers. The text features of the target answer and the candidate answers are extracted by the initial text feature extraction model to obtain the target answer features and the candidate answer features, including:

[0149] Obtain a target word vector sequence corresponding to the current answer; the current answer is the target answer or candidate answer, and the target word vector sequence includes a tag vector corresponding to the sentence start tag; input the target word vector sequence into the initial text feature extraction model to obtain candidate text features output by each text feature extraction layer; the candidate text features include text features corresponding to the sentence start tag; use the candidate text features output by the output layer of the initial text feature extraction model as the target text features, and obtain the current answer features corresponding to the current answer based on the text features corresponding to the sentence start tag in the target text features.

[0150] The target word vector sequence is the word vector sequence corresponding to the current answer. The word vector sequence includes the tag vector corresponding to the sentence start tag. The text features obtained by the tag vector corresponding to the sentence start tag after data processing by the model can be used as the feature representation of the entire text.

[0151] Specifically, the data processing process of the initial text feature extraction model for the target answer and the candidate answer is the same. The data processing process of the initial text feature extraction model is described by taking the current answer as an example, and the current answer is the target answer or the candidate answer. The computer device can obtain the target word vector sequence corresponding to the current answer, and input the target word vector sequence into the initial text feature extraction model. After data processing by the sequentially connected text feature extraction layers, each text feature extraction layer can output candidate text features respectively, and the candidate text features include the text features corresponding to the beginning of the sentence mark. The output layer of the initial text feature extraction model refers to the last text feature interaction layer. The candidate text features output by the last text feature interaction layer are used as the target text features, and the text features corresponding to the beginning of the sentence mark are obtained from the target text features. Based on the text features corresponding to the beginning of the sentence mark, the current answer features corresponding to the current answer are obtained. For example, the text features corresponding to the beginning of the sentence mark are used as the current answer features.

[0152] In one embodiment, in the target word vector sequence, the tag vector corresponding to the sentence start tag is usually the first vector, so the first feature vector can be finally obtained from the target text feature to obtain the current answer feature.

[0153] In this embodiment, the target word vector sequence is input into the initial text feature extraction model to obtain the candidate text features output by each text feature extraction layer; the candidate text features include the text features corresponding to the sentence start mark; the candidate text features output by the output layer of the initial text feature extraction model are used as the target text features, and the current answer features corresponding to the current answer are obtained based on the text features corresponding to the sentence start mark in the target text features. In this way, the current answer features corresponding to the current answer are obtained based on the text features corresponding to the sentence start mark in the target text features, which can reduce the subsequent data calculation amount and improve data processing efficiency.

[0154] In one embodiment, Figure 6 As shown, step S210 includes:

[0155] Step S602, based on the positive similarity and the negative similarity, the model parameters of the initial text feature extraction model, the initial media feature extraction model and the initial media text interaction model are adjusted until the convergence condition is met, thereby obtaining the intermediate text feature extraction model, the intermediate media feature extraction model and the target media text interaction model.

[0156] Among them, the intermediate text feature extraction model and the intermediate media feature extraction model are models obtained by training the initial text feature extraction model and the initial media feature extraction model with the help of the media-text interaction model.

[0157] Specifically, in order to further improve the accuracy of the text feature extraction model and the media feature extraction model finally obtained by training, so that the similarity between the text features and media features output by the text feature extraction model and the media feature extraction model finally obtained by training can more accurately determine whether the text and media data match, the computer device can use known matching and non-matching text-media data pairs as new training samples, and fine-tune the intermediate text feature extraction model and the intermediate media feature extraction model based on the training samples to obtain the target text feature extraction model and the target media feature extraction model.

[0158] Therefore, the training process of the text feature extraction model and the media feature extraction model can be divided into two stages. The first stage: firstly, based on the training media data and the training text corresponding to the training media data, the initial text feature extraction model, the initial media feature extraction model and the initial media text interaction model are trained to obtain the intermediate text feature extraction model, the intermediate media feature extraction model and the target media text interaction model. The second stage: then, based on the known matching and non-matching text-media data pairs, the intermediate text feature extraction model and the intermediate media feature extraction model are trained to obtain the target text feature extraction model and the target media feature extraction model.

[0159] In the first stage, the computer device can calculate the positive similarity based on the predicted answer features and the target answer features, calculate the negative similarity based on the predicted answer features and the candidate answer features, and adjust the model parameters of the initial text feature extraction model, the initial media feature extraction model, and the initial media text interaction model based on the calculated positive similarity and negative similarity until the convergence conditions are met, thereby obtaining the intermediate text feature extraction model, the intermediate media feature extraction model, and the target media text interaction model.

[0160] Step S604: extract media features corresponding to the training media data through the intermediate media feature extraction model to obtain intermediate media features, and extract text features corresponding to the target description text through the intermediate text feature extraction model to obtain target text features.

[0161] Step S606: extract text features corresponding to the non-target description text corresponding to the training media data through the intermediate text feature extraction model to obtain reference text features.

[0162] Among them, non-target description text refers to text that is not used to describe the content of training media data. For example, the target description text corresponding to other media data can be used as the non-target description text corresponding to the training media data. The target text feature refers to the text feature corresponding to the target description text, and the reference text feature refers to the text feature corresponding to the non-target description text.

[0163] Specifically, in the second stage, the computer device can extract media features corresponding to the training media data through the intermediate media feature extraction model to obtain intermediate media features, for example, the training media data is input into the intermediate media feature extraction model, and the intermediate media features are obtained based on the media features output by the output layer of the intermediate media feature extraction model. At the same time, the computer device can extract text features corresponding to the target description text through the intermediate text feature extraction model to obtain target text features, for example, the target description text and the non-target description text are respectively input into the intermediate media feature extraction model, and the target text features and the reference text features are obtained based on the text features output by the output layer of the intermediate media feature extraction model.

[0164] Step S608, calculating a positive matching degree based on the intermediate media features and the target text features, and calculating a negative matching degree based on the intermediate media features and the reference text features.

[0165] Step S610, adjusting the model parameters of the intermediate text feature extraction model and the intermediate media feature extraction model based on the positive matching degree and the negative matching degree until the training end condition is met, thereby obtaining the target text feature extraction model and the target media feature extraction model.

[0166] Specifically, the computer device can calculate the positive matching degree based on the intermediate media features and the target text features, and calculate the negative matching degree based on the intermediate media features and the reference text features. For example, the feature similarity between the intermediate media features and the target text features is calculated as the positive matching degree, and the feature similarity between the intermediate media features and the reference text features is calculated as the negative matching degree. Furthermore, the computer device can perform back propagation based on the positive matching degree and the negative matching degree, update the intermediate text feature extraction model and the intermediate media feature extraction model, and return the media features corresponding to the training media data extracted by the intermediate media feature extraction model to obtain the intermediate media features, extract the text features corresponding to the target description text by the intermediate text feature extraction model, and obtain the target text features. The steps are iteratively executed, and the training is continued until the training end condition is met, then the training is completed, and the target text feature extraction model and the target media feature extraction model are obtained.

[0167] Among them, similar to the convergence condition, the training end condition can be to maximize the positive matching degree and minimize the negative matching degree. The positive matching degree is obtained based on the intermediate media features and the target text features, and is used to characterize the matching degree between the training media data and the target description text. The training media data and the target description text are mutually matching data, so it is hoped that the positive matching degree is as large as possible. The negative matching degree is obtained based on the intermediate media features and the reference text features, and is used to characterize the matching degree between the training media data and the non-target description text, so it is hoped that the negative matching degree is as small as possible.

[0168] Of course, the training end condition may also be that the positive matching degree is greater than the third preset matching degree and the negative matching degree is less than the fourth preset matching degree, and the third preset matching degree is greater than the fourth preset matching degree. The training end condition may also be that the number of iterations of the model is greater than the second number, and the positive matching degree is greater than the third preset matching degree and the negative matching degree is less than the fourth preset matching degree. Among them, the specific values ​​of the third preset similarity, the fourth preset similarity and the second number can be set according to actual needs.

[0169] In this embodiment, the text feature extraction model and the media feature extraction model are first pre-trained based on positive similarity and negative similarity, and then fine-tuned based on positive matching and negative matching, so that text feature extraction models and media feature extraction models with higher accuracy can be trained.

[0170] In one embodiment, reference Figure 7 , using the media data as video to illustrate the overall training process. This application adopts a dual encoder structure, which specifically includes a video encoder (VideoFormer) to extract video features from the original video frame, and a text encoder (TextFormer) to extract text features from natural language. The independent dual encoder structure makes it only necessary to calculate the similarity of video and text features during retrieval, ensuring efficient retrieval.

[0171] Phase 1: Pre-train the text encoder and video encoder with the help of the video-text interaction encoder (BridgeFormer). The pre-training phase includes two training objectives: answering verb questions and answering noun questions. Given a video and its corresponding description text (such as "a girl in shorts and a hat is dancing on the green grass"), a noun question is formed by randomly erasing a noun phrase (such as "green grass") from the description text (such as "a girl in shorts and a hat is dancing on [?]"), and a verb question is formed by randomly erasing a verb phrase (such as "dance") from the description text (such as "a girl in shorts and a hat is on the green grass [?]"). The text features of the noun question are extracted through the text encoder to obtain the question text features {Z} noun_q , extract the video features of the video through the video encoder {Z} v , put {Z} noun_q and {Z} v As the input of the video text interaction encoder, the predicted answer feature f is obtained through the cross-modal attention mechanism noun_a . The text features of the noun phrase are extracted through the text encoder to obtain the answer feature f noun Then the model is trained by contrastive learning, and the training goal is to maximize the predicted answer feature f noun_aThe target answer feature f corresponding to the correct answer noun The similarity between them is minimized to minimize the predicted answer feature f noun_a The candidate answer feature f corresponding to the wrong answer noun The similarity between them. Training the video-text interaction encoder to select the correct noun phrase by using video features can help the video encoder capture accurate spatial content. Similarly, the text encoder extracts the text features of the verb question to obtain the question text features {Z} verb_q , extract the video features of the video through the video encoder {Z} v , put {Z} verb_q and {Z} v As the input of the video text interaction encoder, the predicted answer feature f is obtained through the cross-modal attention mechanism verb_a The text features of the verb phrase are extracted through the text encoder to obtain the answer feature f verb Then the model is trained by contrastive learning, and the training goal is to maximize the predicted answer feature f verb_a The target answer feature f corresponding to the correct answer verb The similarity between them is minimized to minimize the predicted answer feature f verb_a The candidate answer feature f corresponding to the wrong answer verb Training the video-text interaction encoder to select the correct verb phrase by relying on video features can help the video encoder capture temporal dynamics.

[0172] Phase 2: Fine-tune the text encoder and video encoder trained in Phase 1. Use the text encoder and video encoder to extract features describing text and video, and then calculate the similarity of video and text features. Use contrastive learning to train the model. The training goal is to maximize the feature similarity of video and text positive sample pairs and minimize the feature similarity of video and text negative sample pairs. A video and its corresponding description text are positive sample pairs, and vice versa.

[0173] The text encoder and video encoder trained in the second stage can be applied to the retrieval task of text-based video retrieval.

[0174] In one embodiment, Figure 8 As shown, a media data retrieval method is provided, and the method is applied to a computer device as an example. The computer device can be the above-mentioned Figure 1 The terminal 102 or the server 104 in FIG. Figure 8 , the media data retrieval method comprises the following steps:

[0175] Step S802, obtaining the query text.

[0176] Step S804: extracting text features corresponding to the query text through the target text feature extraction model to obtain query text features.

[0177] The query text is used to represent the query condition. The query text may be submitted by the user through the terminal, for example, the query text may be text information entered by the user in the search box on the terminal, or the query text may be obtained by performing text recognition on the query voice entered by the user. The query text may also be obtained autonomously by the computer device, for example, the user's historical search record may be used as the query text, and the introduction of the media data that the user has browsed historically may be used as the query text.

[0178] Specifically, the computer device can obtain the query text locally or from other devices, extract the text features corresponding to the query text through the target text feature extraction model, and obtain the query text features. For example, the query text is input into the target text feature extraction model, and the query text features are obtained based on the text features output by the output layer of the target text feature extraction model.

[0179] Step S806, based on the feature similarities between the query text features and the candidate media features corresponding to the multiple candidate media data, determine the target media data corresponding to the query text from the respective candidate media data; the candidate media features are obtained by extracting features from the candidate media data using a target media feature extraction model.

[0180] The candidate media data refers to the media data to be determined whether it matches the query text. The candidate media features refer to the media features corresponding to the candidate media data. At least one media data that best matches the query text can be obtained from a large number of candidate media data as the target media data.

[0181] The training process of the target text feature extraction model and the target media feature extraction model is as follows: obtain training media data and training text corresponding to the training media data; the training text includes the question text, target answer and candidate answer corresponding to the training media data, and the question text and the target answer are obtained by masking the target description text corresponding to the training media data; extract the text features of the question text through the initial text feature extraction model to obtain the question text features, extract the media features corresponding to the training media data through the initial media feature extraction model to obtain the training media features, and perform feature interaction on the question text features and the training media features through the initial media text interaction model to obtain the predicted answer features; extract the text features of the target answer and the candidate answers respectively through the initial text feature extraction model to obtain the target answer features and the candidate answer features; calculate the positive similarity based on the predicted answer features and the target answer features, and calculate the negative similarity based on the predicted answer features and the candidate answer features; adjust the model parameters of the initial text feature extraction model, the initial media feature extraction model and the initial media text interaction model based on the positive similarity and the negative similarity until the convergence conditions are met, and obtain the target text feature extraction model, the target media feature extraction model and the target media text interaction model.

[0182] It can be understood that the specific training process of the target text feature extraction model and the target media feature extraction model can refer to the various embodiments of the aforementioned feature extraction model training method, which will not be repeated here.

[0183] Specifically, the computer device can obtain candidate media features corresponding to multiple candidate media data, calculate the feature similarity between the query text feature and each candidate media feature, and determine the target media data corresponding to the query text from each candidate media data based on the feature similarity. For example, the candidate media data corresponding to the maximum feature similarity can be obtained as the target media data, or each candidate media data with a feature similarity greater than a preset similarity can be obtained as the target media data, and each feature similarity can be sorted from large to small, and a preset number of candidate media data with a top ranking can be obtained as the target media data. The preset similarity and the preset number can be set according to actual needs. The computer device can use the target media data as a query result or a retrieval result, and return the retrieval result to the retrieval task or the sending end of the query task.

[0184] In order to improve the retrieval efficiency, the computer device can pre-extract the candidate media features corresponding to each candidate media data. That is, before obtaining the query text, the computer device can use each media data in the media database as candidate media data, and extract the candidate media features corresponding to each candidate media data through the target media feature extraction model. Then, once the query text is obtained, the computer device only needs to extract the text features of the query text through the target text feature extraction model, and then directly obtain the pre-extracted candidate media features, and quickly determine the target media data from the candidate media data through the similarity between the features.

[0185] Of course, after acquiring the query text, the computer device may also extract the candidate media features corresponding to each candidate media data through the target media feature extraction model.

[0186] In the above-mentioned media data retrieval method, when training the model, the question text features and the training media features are interacted through the media text interaction model, and the features that are helpful in answering the question text can be found from the training media features, thereby obtaining the predicted answer features. By adjusting the parameters of the three models based on the similarity between the predicted answer features and the target answer features and the candidate answer features, the attention of the text feature extraction model to the text detail information and the attention of the media feature extraction model to the media data detail information can be enhanced, and the association between the text and media data detail information can be enhanced, so that a high-quality target text feature extraction model and a target media feature extraction model can be finally trained. Therefore, when performing retrieval, performing text-to-media data retrieval based on the target text feature extraction model and the target media feature extraction model can improve the retrieval accuracy and the retrieval quality.

[0187] In a specific embodiment, the above-mentioned feature extraction model training method and media data retrieval method can be applied in a video retrieval scenario.

[0188] 1. Model Training

[0189] 1. Pre-training

[0190] refer to Fig. 9 , the text encoder and video encoder are pre-trained with the help of the video text interaction model. Based on the efficient dual encoder framework, the video text interaction model is trained to answer multiple-choice questions composed of text features by using video features.

[0191] First, we construct questions by erasing a phrase in the video description text. Correspondingly, the correct answer is the erased phrase. We observe that noun phrases and verb phrases in the text have rich semantic information and can reflect the local objects and object movements in the video respectively. Therefore, we can construct questions by randomly erasing noun or verb phrases in the description text. Given a video and its corresponding description text (such as "a girl in shorts and a hat is dancing on the greengrass"), we construct noun questions by randomly erasing a noun phrase (such as "green grass") (such as "a girl in shorts and a hat is dancing on the [?]", that is, "[cls]A girl in shorts and a hat is dancing on the [?]"). We construct verb questions by randomly erasing a verb phrase (such as "dance") (such as "a girl in shorts and a hat is [?] on the green grass").

[0192] Then, the video text interaction model is trained in a contrastive learning manner to select the correct phrase from multiple options (a batch of erased phrases) by using video features. Such a pre-training goal will enable the video encoder to extract accurate local objects for answering noun questions and capture temporal dynamics for answering verb questions. Through the question and answer training mode, the semantic association between text and video local features can be well established. The video text interaction model is only used for pre-training and is not needed during retrieval. During retrieval, only the similarity of text and video features needs to be calculated.

[0193] During training, the text features of noun questions or verb questions are extracted through the text encoder to obtain the question text features. The text features of noun phrases or verb phrases (i.e., each option) are extracted through the text encoder to obtain the target answer features (text features corresponding to the correct answer) and candidate answer features (text features corresponding to the wrong answer). The video features of the training video are extracted through the video encoder to obtain the training video features. The question text features are used as Q, and the training video features are used as K and V. The answer features of the predicted verb answer or noun answer are obtained through the cross-modal attention mechanism to obtain the predicted answer features. Based on the similarity between the target answer features and the predicted answer features, and the similarity between the candidate answer features and the predicted answer features, the model parameters of the three models are adjusted until the convergence conditions are met, and the pre-trained text encoder and video encoder are obtained.

[0194] When the video is input into the video encoder, each video frame of the video may be divided into a plurality of video frame segments, which are then input into the video encoder. Fig. 9 F1, F2 and FM in the figure represent different video frames in the video respectively.

[0195] 2. Fine-tuning

[0196] The features of the description text and training video are extracted through the pre-trained text encoder and video encoder, and then the similarity of the video and text features is calculated by point multiplication. The model is trained by contrastive learning. The training goal is to maximize the feature similarity of the video and text positive sample pairs and minimize the feature similarity of the video and text negative sample pairs. Among them, a video and its corresponding description text are positive sample pairs, and vice versa, they are negative sample pairs. Finally, high-quality text encoders and video encoders can be trained.

[0197] 2. Model Application

[0198] During retrieval, it is only necessary to extract the features of the query text and candidate videos through the text encoder and video encoder, calculate the similarity of the video and text features, obtain the video with the largest similarity as the target video from a large number of candidate videos, and obtain the retrieval results.

[0199] This application proposes a novel pre-training task called Multiple Choice Questions (MCQ) to achieve pre-training of text and video. The MCQ pre-training task is implemented with the help of a video-text interactive encoder, so that the video encoder can better capture regional objects and temporal dynamics. Through the training form of questions and answers, the semantic association of local features of text and video can be well established, thereby enhancing the association of local features of text and video and achieving fine-grained association between text and video. In addition, the video-text interactive encoder will be removed during retrieval, so no additional parameters and calculation amount will be added during retrieval, which can ensure high efficiency of retrieval.

[0200] Furthermore, on five text-video retrieval datasets, including one with one million videos, our method achieved better results than existing methods. We also further evaluated zero-shot action recognition, where our method also far surpassed existing methods.

[0201] refer to Fig. 10A Table 1 and Fig. 10B Table 2 shows that the proposed method achieves better results than existing methods on four retrieval datasets under two evaluation methods (zero-sample and training set fine-tuning). Fig. 10CTable 3 shows that on the large-scale HowTo100M dataset (one million videos), the method of this application achieved better results than the existing methods under zero-sample evaluation. The zero-sample evaluation method is to directly perform retrieval tests on a new dataset without any samples to adjust the model. The training set fine-tuning evaluation method is to adjust the model on a new dataset and then perform retrieval tests.

[0202] It can be understood that the feature extraction model training method and media data retrieval method of the present application can be applied not only to video retrieval, but also to retrieval scenarios such as voice retrieval and image retrieval.

[0203] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0204] Based on the same inventive concept, the embodiment of the present application also provides a feature extraction model training device for implementing the feature extraction model training method involved above, and a media data retrieval device for the media data retrieval method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more feature extraction model training devices and media data retrieval device embodiments provided below can refer to the limitations of the feature extraction model training method and the media data retrieval method above, and will not be repeated here.

[0205] In one embodiment, Fig.11 As shown, a feature extraction model training device is provided, which specifically includes: a training data acquisition module 1102, a feature processing module 1104, a text feature extraction module 1106, a similarity calculation module 1108 and a model adjustment module 1110, wherein:

[0206] The training data acquisition module 1102 is used to obtain training media data and training text corresponding to the training media data; the training text includes the question text, target answer and candidate answers corresponding to the training media data, and the question text and target answer are obtained by masking the target description text corresponding to the training media data.

[0207] The feature processing module 1104 is used to extract the text features of the question text through the initial text feature extraction model to obtain the question text features, extract the media features corresponding to the training media data through the initial media feature extraction model to obtain the training media features, and perform feature interaction on the question text features and the training media features through the initial media text interaction model to obtain the predicted answer features.

[0208] The text feature extraction module 1106 is used to extract the text features of the target answer and the candidate answers respectively through the initial text feature extraction model to obtain the target answer features and the candidate answer features.

[0209] The similarity calculation module 1108 is used to calculate positive similarities based on the predicted answer features and the target answer features, and to calculate negative similarities based on the predicted answer features and the candidate answer features.

[0210] The model adjustment module 1110 is used to adjust the model parameters of the initial text feature extraction model, the initial media feature extraction model and the initial media text interaction model based on positive similarity and negative similarity until the convergence conditions are met, thereby obtaining the target text feature extraction model, the target media feature extraction model and the target media text interaction model; the target text feature extraction model and the target media feature extraction model are used for media data retrieval through text.

[0211] The above-mentioned feature extraction model training device can perform feature interaction between question text features and training media features through the media text interaction model, and can find features that are helpful in answering the question text from the training media features, thereby obtaining predicted answer features. By adjusting the parameters of the three models based on the similarity between the predicted answer features and the target answer features and the candidate answer features, the text feature extraction model can be enhanced to pay attention to text detail information, the media feature extraction model can be enhanced to pay attention to media data detail information, and the association between text and media data detail information can be enhanced, so that a high-quality target text feature extraction model and target media feature extraction model can be finally trained. Retrieval of text to media data based on such a target text feature extraction model and target media feature extraction model can improve retrieval accuracy and retrieval quality.

[0212] In one embodiment, the training data acquisition module is further used to perform masking on at least one first subtext in the target description text, obtain the question text corresponding to each first subtext, and use the first subtext as the target answer matching the corresponding question text; the first subtext includes any one of a verb and a verb phrase. The training data acquisition module is further used to perform masking on at least one second subtext in the target description text, obtain the question text corresponding to each second subtext, and use the second subtext as the target answer matching the corresponding question text; the second subtext includes any one of a noun and a noun phrase.

[0213] In one embodiment, the initial text feature extraction model includes multiple text feature extraction layers connected in sequence, the initial media feature extraction model includes multiple media feature extraction layers connected in sequence, and the initial media-text interaction model includes multiple feature interaction layers connected in sequence. There is an association relationship between the hierarchically matched text feature extraction layers, media feature extraction layers, and feature interaction layers.

[0214] The feature processing module includes:

[0215] A text processing unit, used for inputting the question text into the initial text feature extraction model to obtain the question text features outputted by each text feature extraction layer;

[0216] A media data processing unit, used to input the training media data into the initial media feature extraction model to obtain the training media features output by each media feature extraction layer;

[0217] A feature interaction unit is used to input the question text features and training media features respectively output by the text feature extraction layer and the media feature extraction layer in an associated relationship into the associated feature interaction layer, so as to obtain the reference answer features respectively output by each feature interaction layer; the input data of the current feature interaction layer includes the question text features output by the associated text feature extraction layer, the training media features output by the associated media feature extraction layer, and the reference answer features output by the previous feature interaction layer;

[0218] The predicted answer feature determination unit is used to obtain the predicted answer feature based on the reference answer feature output by the output layer of the initial media text interaction model.

[0219] In one embodiment, the feature interaction unit is also used to use the question text features output by the text feature extraction layer associated with the current feature interaction layer as the current text features, and use the training media features output by the media feature extraction layer associated with the current feature interaction layer as the current media features; based on the feature similarity between the current text features and the current media features, perform feature screening on the current media features to obtain initial answer features; based on the initial answer features and the reference answer features output by the previous feature interaction layer, obtain intermediate answer features; and based on the intermediate answer features, obtain reference answer features output by the current feature interaction layer.

[0220] In one embodiment, the feature interaction unit is also used to determine a target sub-feature from a plurality of text sub-features arranged in order; calculate the similarity between the target sub-feature and each media sub-feature respectively, and obtain a plurality of similarities arranged in order; fuse the similarity with consistent sorting information and the media sub-feature to obtain a plurality of fused sub-features, and obtain an answer sub-feature based on each fused sub-feature; take the next text sub-feature as the target sub-feature, return to the step of calculating the similarity between the target sub-feature and each media sub-feature respectively, until all target sub-features participate in the calculation, and obtain a plurality of answer sub-features; obtain an initial answer feature based on each answer sub-feature.

[0221] In one embodiment, the predicted answer feature determination unit is also used to perform feature transformation on the intermediate answer feature to obtain a first answer feature, a second answer feature and a third answer feature; based on the feature similarity between the first answer feature and the second answer feature, perform feature screening on the third answer feature to obtain a fused answer feature; and based on the fused answer feature, obtain a reference answer feature output by the current feature interaction layer.

[0222] In one embodiment, the text processing unit is further used to input the word vector sequence corresponding to the question text into the initial text feature extraction model to obtain the question text features output by each text feature extraction layer. The media data processing unit is further used to input the media segment vector sequence corresponding to the training media data into the initial media feature extraction model to obtain the training media features output by each media feature extraction layer; the media segment vector sequence includes the media segment vectors corresponding to each media data segment obtained by segmenting the training media data; the word vector sequence and the media segment vector sequence are used to input the first feature interaction layer to obtain the reference answer features output by the first feature interaction layer.

[0223] In one embodiment, the initial text feature extraction model includes a plurality of text feature extraction layers connected in sequence. The text feature extraction module is also used to obtain a target word vector sequence corresponding to the current answer; the current answer is the target answer or the candidate answer, and the target word vector sequence includes a tag vector corresponding to the sentence start tag; the target word vector sequence is input into the initial text feature extraction model to obtain candidate text features output by each text feature extraction layer; the candidate text features include text features corresponding to the sentence start tag; the candidate text features output by the output layer of the initial text feature extraction model are used as the target text features, and based on the text features corresponding to the sentence start tag in the target text features, the current answer features corresponding to the current answer are obtained.

[0224] In one embodiment, the model adjustment module is also used to adjust the model parameters of the initial text feature extraction model, the initial media feature extraction model and the initial media text interaction model based on the positive similarity and the negative similarity until the convergence condition is met, and the intermediate text feature extraction model, the intermediate media feature extraction model and the target media text interaction model are obtained; the media features corresponding to the training media data are extracted by the intermediate media feature extraction model to obtain the intermediate media features, and the text features corresponding to the target description text are extracted by the intermediate text feature extraction model to obtain the target text features; the text features corresponding to the non-target description text corresponding to the training media data are extracted by the intermediate text feature extraction model to obtain the reference text features; the positive matching degree is calculated based on the intermediate media features and the target text features, and the negative matching degree is calculated based on the intermediate media features and the reference text features; the model parameters of the intermediate text feature extraction model and the intermediate media feature extraction model are adjusted based on the positive matching degree and the negative matching degree until the training end condition is met to obtain the target text feature extraction model and the target media feature extraction model.

[0225] In one embodiment, Fig.12 As shown, a media data retrieval device is provided, which specifically includes: a query text acquisition module 1202, a text feature extraction module 1204 and a media data retrieval module 1206, wherein:

[0226] The query text acquisition module 1202 is used to acquire the query text.

[0227] The text feature extraction module 1204 is used to extract text features corresponding to the query text through the target text feature extraction model to obtain query text features.

[0228] The media data retrieval module 1206 is used to determine the target media data corresponding to the query text from each candidate media data based on the feature similarity between the query text feature and the candidate media features corresponding to the plurality of candidate media data; the candidate media features are obtained by extracting features from the candidate media data using a target media feature extraction model;

[0229] The training process of the target text feature extraction model and the target media feature extraction model is as follows:

[0230] Acquire training media data and training text corresponding to the training media data; the training text includes question text, target answer and candidate answers corresponding to the training media data, and the question text and target answer are obtained by masking the target description text corresponding to the training media data;

[0231] The text features of the question text are extracted by the initial text feature extraction model to obtain the question text features, the media features corresponding to the training media data are extracted by the initial media feature extraction model to obtain the training media features, and the question text features and the training media features are interacted by the initial media text interaction model to obtain the predicted answer features;

[0232] The text features of the target answer and the candidate answers are respectively extracted by the initial text feature extraction model to obtain the target answer features and the candidate answer features;

[0233] The positive similarity is calculated based on the predicted answer features and the target answer features, and the negative similarity is calculated based on the predicted answer features and the candidate answer features;

[0234] Based on the positive similarity and the negative similarity, the model parameters of the initial text feature extraction model, the initial media feature extraction model and the initial media text interaction model are adjusted until the convergence condition is met, and the target text feature extraction model, the target media feature extraction model and the target media text interaction model are obtained.

[0235] The above-mentioned media data retrieval device, when training the model, performs feature interaction between question text features and training media features through the media text interaction model, and can find features that are helpful in answering the question text from the training media features, thereby obtaining predicted answer features. By adjusting the parameters of the three models based on the similarity between the predicted answer features and the target answer features and the candidate answer features, the attention of the text feature extraction model to the text detail information and the attention of the media feature extraction model to the media data detail information can be enhanced, and the association between the text and media data detail information can be enhanced, so that a high-quality target text feature extraction model and a target media feature extraction model can be finally trained. Therefore, when performing retrieval, performing text-to-media data retrieval based on the target text feature extraction model and the target media feature extraction model can improve retrieval accuracy and retrieval quality.

[0236] Each module in the above-mentioned feature extraction model training device and media data retrieval device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0237] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.13 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store candidate media data, candidate media features, training media data and other data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a feature extraction model training method and a media data retrieval method are implemented.

[0238] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.14As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a feature extraction model training method and a media data retrieval method are implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.

[0239] Those skilled in the art will understand that Fig.13 , 14 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0240] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0241] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0242] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-mentioned method embodiments.

[0243] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions. Regarding advertisements and other information pushed to users, users can refuse or can easily refuse to push information.

[0244] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0245] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0246] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A feature extraction model training method, characterized in that: The method comprises: Acquire training media data and training text corresponding to the training media data; the training text includes a question text, a target answer, and candidate answers corresponding to the training media data, and the question text and the target answer are obtained by performing masking processing on the target description text corresponding to the training media data; Extracting text features of the question text through at least one text feature extraction layer in the initial text feature extraction model to obtain question text features outputted by each text feature extraction layer respectively; extracting media features corresponding to the training media data through at least one media feature extraction layer in the initial media feature extraction model to obtain training media features outputted by each media feature extraction layer respectively; fusing question text features and training media features outputted by the text feature extraction layer and the media feature extraction layer respectively having an associated relationship through the initial media text interaction model, and obtaining predicted answer features based on each fusion result; Extracting text features of the target answer and the candidate answers respectively through the initial text feature extraction model to obtain target answer features and candidate answer features; Calculate positive similarity based on the predicted answer feature and the target answer feature, and calculate negative similarity based on the predicted answer feature and the candidate answer feature; Based on the positive similarity and the negative similarity, the model parameters of the initial text feature extraction model, the initial media feature extraction model and the initial media text interaction model are adjusted until the convergence condition is met, so as to obtain a target text feature extraction model, a target media feature extraction model and a target media text interaction model; the target text feature extraction model and the target media feature extraction model are used for media data retrieval through text.

2. The method according to claim 1, characterized in that: The generation process of the question text and the target answer includes at least one of the following methods: Performing masking processing on at least one first subtext in the target description text to obtain a question text corresponding to each first subtext, and using the first subtext as a target answer matched with the corresponding question text; the first subtext includes any one of a verb and a verb phrase; Masking is performed on at least one second subtext in the target description text to obtain question texts corresponding to each second subtext, and the second subtext is used as a target answer matched with the corresponding question text; the second subtext includes any one of a noun and a noun phrase.

3. The method according to claim 1, characterized in that The initial text feature extraction model includes a plurality of sequentially connected text feature extraction layers, the initial media feature extraction model includes a plurality of sequentially connected media feature extraction layers, and the initial media text interaction model includes a plurality of sequentially connected feature interaction layers, and there is an association relationship between the hierarchically matched text feature extraction layers, media feature extraction layers, and feature interaction layers; The method comprises extracting text features of the question text through at least one text feature extraction layer in the initial text feature extraction model to obtain question text features outputted by each text feature extraction layer respectively, extracting media features corresponding to the training media data through at least one media feature extraction layer in the initial media feature extraction model to obtain training media features outputted by each media feature extraction layer respectively, fusing question text features and training media features outputted by the text feature extraction layer and the media feature extraction layer respectively in an associated relationship through the initial media text interaction model, and obtaining predicted answer features based on each fusion result, including: Inputting the question text into the initial text feature extraction model to obtain question text features output by each text feature extraction layer; Inputting the training media data into the initial media feature extraction model to obtain training media features outputted by each media feature extraction layer; Input the question text features and training media features respectively output by the associated text feature extraction layer and the media feature extraction layer into the associated feature interaction layer to obtain the reference answer features respectively output by each feature interaction layer; the input data of the current feature interaction layer includes the question text features output by the associated text feature extraction layer, the training media features output by the associated media feature extraction layer, and the reference answer features output by the previous feature interaction layer; The predicted answer feature is obtained based on the reference answer feature output by the output layer of the initial media text interaction model.

4. The method according to claim 3, characterized in that The step of inputting the question text features and the training media features respectively outputted by the associated text feature extraction layer and the media feature extraction layer into the associated feature interaction layer to obtain the reference answer features respectively outputted by each feature interaction layer comprises: Using the question text feature output by the text feature extraction layer associated with the current feature interaction layer as the current text feature, and using the training media feature output by the media feature extraction layer associated with the current feature interaction layer as the current media feature; Based on the feature similarity between the current text feature and the current media feature, feature screening is performed on the current media feature to obtain an initial answer feature; Obtaining an intermediate answer feature based on the initial answer feature and the reference answer feature output by the previous feature interaction layer; A reference answer feature output by the current feature interaction layer is obtained based on the intermediate answer feature.

5. The method according to claim 4, characterized in that The current text feature includes a plurality of text sub-features arranged in order, and the current media feature includes a plurality of media sub-features arranged in order; The step of screening the current media features based on the feature similarity between the current text features and the current media features to obtain the initial answer features includes: Determine a target sub-feature from a plurality of text sub-features arranged in order; Calculate the similarity between the target sub-feature and each media sub-feature, and obtain multiple similarities arranged in order; The similarity and media sub-features with consistent sorting information are fused to obtain multiple fused sub-features, and the answer sub-features are obtained based on each fused sub-feature; The next text sub-feature is used as the target sub-feature, and the step of calculating the similarity between the target sub-feature and each media sub-feature is returned to execute until all the target sub-features are involved in the calculation, and multiple answer sub-features are obtained; The initial answer feature is obtained based on each answer sub-feature.

6. The method according to claim 4, characterized in that The obtaining of the reference answer feature output by the current feature interaction layer based on the intermediate answer feature includes: Performing feature transformation on the intermediate answer feature to obtain a first answer feature, a second answer feature, and a third answer feature; Based on the feature similarity between the first answer feature and the second answer feature, feature screening is performed on the third answer feature to obtain a fused answer feature; The reference answer feature output by the current feature interaction layer is obtained based on the fused answer feature.

7. The method according to claim 3, characterized in that The step of inputting the question text into the initial text feature extraction model to obtain question text features respectively output by each text feature extraction layer, and inputting the training media data into the initial media feature extraction model to obtain training media features respectively output by each media feature extraction layer comprises: Inputting the word vector sequence corresponding to the question text into the initial text feature extraction model to obtain the question text features output by each text feature extraction layer respectively; The media segment vector sequence corresponding to the training media data is input into the initial media feature extraction model to obtain the training media features output by each media feature extraction layer respectively; the media segment vector sequence includes the media segment vectors corresponding to each media data segment obtained by segmenting the training media data; the word vector sequence and the media segment vector sequence are used to input the first feature interaction layer to obtain the reference answer features output by the first feature interaction layer.

8. The method according to claim 1, characterized in that The initial text feature extraction model includes a plurality of sequentially connected text feature extraction layers, and the text features of the target answer and the candidate answer are respectively extracted by the initial text feature extraction model to obtain the target answer feature and the candidate answer feature, including: Obtain a target word vector sequence corresponding to a current answer; the current answer is the target answer or the candidate answer, and the target word vector sequence includes a tag vector corresponding to a sentence start tag; Inputting the target word vector sequence into the initial text feature extraction model to obtain candidate text features output by each text feature extraction layer; the candidate text features include text features corresponding to the sentence start marker; The candidate text features output by the output layer of the initial text feature extraction model are used as target text features, and the current answer features corresponding to the current answer are obtained based on the text features corresponding to the sentence start mark in the target text features.

9. The method according to any one of claims 1 to 8, characterized in that: The method of adjusting the model parameters of the initial text feature extraction model, the initial media feature extraction model, and the initial media text interaction model based on the positive similarity and the negative similarity until a convergence condition is satisfied to obtain a target text feature extraction model, a target media feature extraction model, and a target media text interaction model includes: Adjusting the model parameters of the initial text feature extraction model, the initial media feature extraction model, and the initial media text interaction model based on the positive similarity and the negative similarity until a convergence condition is met, thereby obtaining an intermediate text feature extraction model, an intermediate media feature extraction model, and a target media text interaction model; Extracting media features corresponding to the training media data through the intermediate media feature extraction model to obtain intermediate media features, and extracting text features corresponding to the target description text through the intermediate text feature extraction model to obtain target text features; Extracting text features corresponding to the non-target description text corresponding to the training media data through the intermediate text feature extraction model to obtain reference text features; Calculating a positive matching degree based on the intermediate media features and the target text features, and calculating a negative matching degree based on the intermediate media features and the reference text features; The model parameters of the intermediate text feature extraction model and the intermediate media feature extraction model are adjusted based on the positive matching degree and the negative matching degree until a training end condition is met, thereby obtaining a target text feature extraction model and a target media feature extraction model.

10. A media data retrieval method, characterized in that: The method comprises: Get the query text; Extracting text features corresponding to the query text by using a target text feature extraction model to obtain query text features; Based on the feature similarities between the query text feature and the candidate media features corresponding to the plurality of candidate media data, the target media data corresponding to the query text is determined from the candidate media data; the candidate media features are obtained by extracting features from the candidate media data using a target media feature extraction model; The training process of the target text feature extraction model and the target media feature extraction model is as follows: Acquire training media data and training text corresponding to the training media data; the training text includes a question text, a target answer, and candidate answers corresponding to the training media data, and the question text and the target answer are obtained by performing masking processing on the target description text corresponding to the training media data; Extracting text features of the question text through at least one text feature extraction layer in the initial text feature extraction model to obtain question text features outputted by each text feature extraction layer respectively; extracting media features corresponding to the training media data through at least one media feature extraction layer in the initial media feature extraction model to obtain training media features outputted by each media feature extraction layer respectively; fusing question text features and training media features outputted by the text feature extraction layer and the media feature extraction layer respectively having an associated relationship through the initial media text interaction model, and obtaining predicted answer features based on each fusion result; Extracting text features of the target answer and the candidate answers respectively through the initial text feature extraction model to obtain target answer features and candidate answer features; Calculate positive similarity based on the predicted answer feature and the target answer feature, and calculate negative similarity based on the predicted answer feature and the candidate answer feature; Based on the positive similarity and the negative similarity, the model parameters of the initial text feature extraction model, the initial media feature extraction model and the initial media text interaction model are adjusted until a convergence condition is met, thereby obtaining a target text feature extraction model, a target media feature extraction model and a target media text interaction model.

11. A feature extraction model training device, characterized in that: The device comprises: A training data acquisition module is used to acquire training media data and training text corresponding to the training media data; the training text includes a question text, a target answer and candidate answers corresponding to the training media data, and the question text and the target answer are obtained by masking the target description text corresponding to the training media data; A feature processing module is used to extract text features of the question text through at least one text feature extraction layer in the initial text feature extraction model to obtain question text features respectively output by each text feature extraction layer, extract media features corresponding to the training media data through at least one media feature extraction layer in the initial media feature extraction model to obtain training media features respectively output by each media feature extraction layer, fuse question text features and training media features respectively output by the text feature extraction layer and the media feature extraction layer that have an associated relationship through the initial media text interaction model, and obtain predicted answer features based on each fusion result; A text feature extraction module, used to extract text features of the target answer and the candidate answers respectively through the initial text feature extraction model to obtain target answer features and candidate answer features; A similarity calculation module, used to calculate positive similarity based on the predicted answer feature and the target answer feature, and to calculate negative similarity based on the predicted answer feature and the candidate answer feature; A model adjustment module is used to adjust the model parameters of the initial text feature extraction model, the initial media feature extraction model and the initial media text interaction model based on the positive similarity and the negative similarity until the convergence condition is met, thereby obtaining a target text feature extraction model, a target media feature extraction model and a target media text interaction model; the target text feature extraction model and the target media feature extraction model are used to retrieve media data through text.

12. A media data retrieval device, characterized in that: The device comprises: A query text acquisition module, used to acquire query text; A text feature extraction module, used to extract text features corresponding to the query text through a target text feature extraction model to obtain query text features; A media data retrieval module, configured to determine target media data corresponding to the query text from each candidate media data based on feature similarities between the query text feature and candidate media features corresponding to a plurality of candidate media data; the candidate media features are obtained by extracting features from the candidate media data using a target media feature extraction model; The training process of the target text feature extraction model and the target media feature extraction model is as follows: Acquire training media data and training text corresponding to the training media data; the training text includes a question text, a target answer, and candidate answers corresponding to the training media data, and the question text and the target answer are obtained by performing masking processing on the target description text corresponding to the training media data; Extracting text features of the question text through at least one text feature extraction layer in the initial text feature extraction model to obtain question text features outputted by each text feature extraction layer respectively; extracting media features corresponding to the training media data through at least one media feature extraction layer in the initial media feature extraction model to obtain training media features outputted by each media feature extraction layer respectively; fusing question text features and training media features outputted by the text feature extraction layer and the media feature extraction layer respectively having an associated relationship through the initial media text interaction model, and obtaining predicted answer features based on each fusion result; Extracting text features of the target answer and the candidate answers respectively through the initial text feature extraction model to obtain target answer features and candidate answer features; Calculate positive similarity based on the predicted answer feature and the target answer feature, and calculate negative similarity based on the predicted answer feature and the candidate answer feature; Based on the positive similarity and the negative similarity, the model parameters of the initial text feature extraction model, the initial media feature extraction model and the initial media text interaction model are adjusted until a convergence condition is met, thereby obtaining a target text feature extraction model, a target media feature extraction model and a target media text interaction model.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 or 10 are implemented.

14. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 or 10 are implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 or 10 are implemented.

Citation Information

Patent Citations

  • Cover picture selection method and device, model training method and device and medium

    CN110457523A

  • Video clip retrieval method and training method and device of video clip retrieval model

    CN113590881A

  • Language model training method, question and answer pair generation method, device and equipment

    CN113672708A

  • Tailoring Question Answering System Output Based on User Expertise

    US20160048772A1

  • Retrieval device, training device, retrieval system, and recording medium

    US20210026887A1