Image-text-tone cross-modal retrieval method based on weighted multi-modal rearrangement

Through a method based on weighted multi-modal rearrangement, the problem of low accuracy in cross-modal retrieval of images, text and audio is solved, efficient mutual retrieval of images, text and audio is achieved, the learning ability of the model is enhanced, and new A cross-modal data retrieval scheme.

CN118568274APending Publication Date: 2024-08-30CHONGQING DRUG EXCHANGE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410699277.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The existing technology has low accuracy in image-text-audio cross-modal retrieval, and it is difficult to uniformly process the three modal data of image, text and audio. It ignores the multi-modal fusion training strategy, resulting in differences in model performance during the training and testing stages. , affecting the retrieval accuracy.

Method used

A cross-modal image, text, and audio retrieval method based on weighted multi-modal rearrangement is proposed. By collecting multi-modal data sets, performing preprocessing and feature extraction, a weighted multi-modal rearrangement method across single and dual modalities is constructed. Rank similarity model, fuse image, text and audio features, calculate loss function and objective function, and realize similarity retrieval of images, text and audio.

Benefits of technology

It improves the accuracy of mutual retrieval of images, text and audio, realizes lightweight deployment and efficient algorithms, provides a new cross-modal data retrieval solution, enhances the model's learning ability for different modal data, and improves retrieval performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568274A
    Figure CN118568274A
Patent Text Reader

Abstract

The invention discloses an image-text-audio cross-modal retrieval method based on weighted multi-modal rearrangement. The image-text-audio cross-modal retrieval method comprises the following steps: S1, collecting a multi-modal data set containing image, text and audio data; s2, performing preprocessing and feature extraction on the multi-modal data set to obtain image feature representation, text feature representation and audio feature representation; s3, according to the image feature representation, the text feature representation and the audio feature representation, constructing a first weighted multi-mode rearrangement similarity model for cross-single-mode retrieval and a second weighted multi-mode rearrangement similarity model for cross-dual-mode retrieval; and S4, performing cross-modal retrieval according to the first weighted multi-modal rearrangement similarity model and the second weighted multi-modal rearrangement similarity model. According to the image-text-audio cross-modal retrieval method based on weighted multi-modal rearrangement, the function of mutually retrieving images, texts and audios is achieved. And a user retrieves the other one or two related modal data by inputting image, text or audio data, and returns a retrieval result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of big data technology, and in particular to a cross-modal retrieval method of images, texts and audios based on weighted multimodal rearrangement. Background Art

[0002] Image-text retrieval plays an important role in the era of big data. However, the distribution and representation of different forms of data are heterogeneous, which makes it difficult to measure the similarity between them. Therefore, how to measure the similarity between different forms of data becomes an important issue in image-text retrieval.

[0003] Many existing retrieval models only focus on one subtask in cross-modal retrieval, namely image-text cross-modal retrieval, and few studies can comprehensively handle cross-modal retrieval of three or even more modalities. As a modality that is also widely present in data, audio is also an important data modality. Images and texts correspond to vision in the interaction between people and the world, while audio corresponds to hearing. For humans, hearing and vision are equally important, and they work together in the human perception of the environment and the understanding of nature. However, existing work rarely performs unified and comprehensive cross-modal retrieval of the three modalities of image, text, and audio.

[0004] Currently, researchers have conducted extensive research on automatic speech recognition technology. Speech is the most convenient, effective and natural way for humans to communicate. Automatic speech recognition is considered to be the main way for humans to interact with machines in the future. Therefore, audio should be one of the important modalities in cross-modal retrieval tasks. Whether using audio for retrieval or retrieving audio, it is a basic usage scenario in cross-modal retrieval.

[0005] Integrating audio modality into existing cross-modal retrieval models can not only improve retrieval performance, but also make the proposition of cross-modal retrieval more generalized. In addition, as an important training strategy in cross-modal retrieval, multimodal fusion can enhance the model's ability to learn data from different modalities and extract more representative modal embeddings to improve retrieval performance. However, many existing methods ignore this strategy during the model testing phase, resulting in large differences in model performance during the training and testing phases. Therefore, in the actual retrieval phase of the model, using a multimodal fusion method can further improve retrieval accuracy without adding additional training rounds. Summary of the invention

[0006] In view of the problem of low cross-modal retrieval accuracy in the prior art, the present invention proposes a cross-modal retrieval method for images, texts and audios based on weighted multi-modal rearrangement.

[0007] In order to achieve the above object, the present invention provides the following technical solutions:

[0008] A method for cross-modal retrieval of images, texts and audio based on weighted multimodal rearrangement specifically comprises the following steps:

[0009] S1: Collect multimodal datasets containing images, text, and audio data;

[0010] S2: Preprocess and extract features of the multimodal dataset to obtain image feature representation, text feature representation, and audio feature representation;

[0011] S3: constructing a first weighted multimodal rearrangement similarity model across single-modal retrieval and a second weighted multimodal rearrangement similarity model across bimodal retrieval based on image feature representation, text feature representation and audio feature representation;

[0012] S4: Perform cross-modal retrieval according to the first weighted multimodal rearrangement similarity model and the second weighted multimodal rearrangement similarity model.

[0013] Preferably, the S2 includes:

[0014] S2-1: Preprocessing and feature extraction of image data to obtain image feature representation;

[0015] S2-2: Preprocess the text data and extract features to obtain text feature representation;

[0016] S2-3: Preprocess and extract features of the audio data to obtain audio feature representation.

[0017] Preferably, the S2-1 specifically includes:

[0018] Assume the input image data is I∈R 3×384×384 , where 3 is the RGB three channels and 384×384 is the image resolution;

[0019] First, the image data I is divided into 12×12 image blocks of size 3×32×32, denoted as I=[p1,p2,…p i ,...,p 144 ], p i ∈R 3×32×32 (i=1,2,…,144), p i represents the i-th image block;

[0020] Then, [p1,p2,…p i ,...,p 144 ] Input a linear block embedding layer to obtain the embedding vector of each block, add the first category vector [CLS] before the embedding vectors of all blocks, and concatenate them to get the initial representation of the input image data I

[0021] Secondly, the representation vector of the image data is iteratively calculated using the following formula:

[0022]

[0023] In formula (1), and I l They are the lth (l=1,2,…,N I ) layer, WA(·) is the window attention layer, MLP(·) is the multi-layer perceptron layer, LN(·) is the layer normalization, N I =24 is the number of image encoder layers, I l-1 represents the output representation of the MLP operation in layer l-1;

[0024] Finally, the image representation vector output by the last layer is After performing layer normalization, the final image feature representation is obtained

[0025] Preferably, the S2-2 specifically includes:

[0026] First, all words in the input text data T are segmented to obtain the segmentation sequence T = [t1, t2, ..., t n ], where t n is the nth word segmentation, and n is the word segmentation length of the text;

[0027] Then, a second category vector is concatenated before the word segmentation sequence T Get the initial representation of the input text data

[0028] Secondly, use the following formula to iteratively calculate the representation vector of the text data:

[0029]

[0030] In formula (2), and T l They are respectively the lth (l=1,2,…,N T ) layer, MHSA(·) is the multi-head self-attention layer, N T =6 is the number of text encoder layers; T l-1 represents the output representation of the MLP operation in layer l-1;

[0031] Finally, the representation vector of the text data output by the last layer is Perform layer normalization to obtain the final text feature representation

[0032] Preferably, the S2-3 specifically includes:

[0033] First, let the original input audio A∈R w , w is the audio length, and A is convolved to obtain the audio embedding representation Among them, CNN1 is a one-dimensional convolution, and m is the audio representation length;

[0034] Then, a third category vector is concatenated before the audio embedding representation Get the initial representation of the input audio data

[0035] Next, the audio representation vector is iteratively calculated using the following formula:

[0036]

[0037] In formula (3), and A l They are respectively the lth (l=1,2,…,N A ) layer, the output representation of the MHSA and MLP operations, N A =24 is the number of audio encoder layers, A l-1 represents the output representation of the l-1th layer MLP operation;

[0038] Finally, the representation vector of the audio output of the last layer is Perform layer normalization to obtain the final audio feature representation

[0039] Preferably, S3 includes:

[0040] S3-1: Fuse image feature representation, text feature representation and audio feature representation, and calculate the fused representation vector;

[0041] S3-2: Calculate the loss function of the multimodal dataset;

[0042] S3-3: construct the objective function of cross-monomodal retrieval and the objective function of cross-bimodal retrieval respectively;

[0043] S3-4: Construct a first weighted multimodal rearrangement similarity model across unimodal retrieval and a second weighted multimodal rearrangement similarity model across bimodal retrieval.

[0044] Preferably, the S3-1 comprises the following steps:

[0045] First, the image feature representation, text feature representation, and audio feature representation in S2 are concatenated into a sequence

[0046]

[0047] First, the text feature representation is passed through a multi-layer perceptron layer to achieve dimension alignment and obtain the initial fusion representation Z 0 =[I E ,MLP(T E ),A E ], MLP(·) is a multi-layer perceptron layer;

[0048] Then, the following formula is used to iteratively calculate the representation vector after multimodal fusion:

[0049]

[0050] In formula (4), and Z l They are respectively the lth (l=1,2,…,N C ) layer; CA(·) is the cross-attention layer; N C =7 is the number of cross-modal encoder layers; Z l-1 Represents the output representation of the l-1th layer MLP operation.

[0051] Preferably, the S3-2 comprises the following steps:

[0052] S3-2-1: For contrastive learning loss, a small batch of samples with a given number of m is given For any sample (I i ,T i ,A i )∈b m and any two modes in the sample, I i ,T i ,A i Represent the i-th image data, text data, and audio data respectively, let it be I i and T i , Definition I i T i In b m The positive samples in the image b are m / I i Then T i In b m Negative samples within ;

[0053] Secondly, calculate I i For b m The image-to-text similarity and T of all text samples in i For b m Text-to-image similarity for all image samples in :

[0054]

[0055] In formulas (5) and (6), I i For b m The image-to-text similarity of all text samples in T j represents the jth text sample; Indicates T i For b m The text-to-image similarity of all image samples in I j represents the jth image sample; I k represents the Kth image sample; exp(·) is an exponential function with base e; τ is a learnable temperature parameter; S(·) is the cosine similarity metric function; p(·) is the normalized class-specific vector [CLS] that maps the original modality input sample to its corresponding modality-specific encoder:

[0056]

[0057] make and I i and T i In b m The true one-hot similarity vector in is Where I(·) is the indicator function;

[0058] Definition b m The image-text contrastive learning loss in is:

[0059]

[0060] In formula (8), represents the image-text contrastive learning loss; where H(·,·) is the cross entropy function; and I i and T i In b m The true one-hot similarity vector in; m represents the number of sample sets;

[0061] Then, sample set b m The contrastive learning loss of is the average of three cross-modal contrast losses:

[0062]

[0063] In formula (9), Represents sample set b m Contrastive learning loss, Represents sample set b m image-text contrast loss; Represents sample set b mText-audio contrastive learning loss; Represents sample set b m image-audio contrastive learning loss;

[0064] S3-2-2: For matching prediction loss, first perform hard negative sample sampling within the batch;

[0065] For a given b m And the two cross-modal similarity vectors calculated and Will and As the probability density function of the sample, respectively in b m Random sampling is performed to obtain hard-negative image and audio samples;

[0066] Then, for (I i ,T i ,A i )∈b m , there are already T i And its difficult image samples The matching probability of the two samples is obtained by inputting the [CLS] representation vector of the cross-modal encoder corresponding to the two samples into a dedicated fully connected layer For b m Repeat the above calculation for all text samples in to obtain the matching probability vector

[0067] Then, b m The matching prediction loss of Chinese text to image is:

[0068]

[0069] In formula (10), represents the matching prediction loss of text to image; H(·,·) is the cross entropy function; p T2I Represents the matching probability of text to image; y T2I is the true matching vector of text and image, that is:

[0070]

[0071] In formula (11), I(·) is the indicator function; Represents difficult image samples;

[0072] Definition b m The image-text matching prediction loss in is:

[0073]

[0074] In formula (12), Represents the image-text matching prediction loss; and Represent the image-to-text and text-to-image matching prediction losses respectively;

[0075] b m The matching prediction loss is:

[0076]

[0077] In formula (13), Represents sample set b m The matching prediction loss of Represents the matching prediction loss of image to text; Represents the image-to-audio matching prediction loss; Represents the matching prediction loss of text to audio;

[0078] Finally, the overall loss function is:

[0079]

[0080] In formula (14), Represents the loss function of a multimodal dataset; represents contrastive learning loss; represents the matching prediction loss.

[0081] Preferably, the S3-3 comprises the following steps:

[0082] S3-3-1: For cross-modal retrieval, given an input sample of any modality, let it be T∈T, the objective function g1 calculates the similarity between T and all samples in I and A, and selects the sample that is most similar to the text data T:

[0083]

[0084] In formula (15), g1(T) represents the objective function of the text data T; I, T and A represent the subsets of all images, texts and audio data in the dataset respectively; S(·,·) is the cosine similarity metric function, and h(·) is the mapping function that maps the original input sample to the special category vector [CLS] output by the cross-modal encoder corresponding to the modality:

[0085]

[0086] Calculate the output value of the S(·,·) function for all texts, images, and audios to form the text-to-image and text-to-audio similarity matrices S T2I and S T2A ;

[0087] Therefore, the complete definition of g1 is as follows:

[0088]

[0089] In formula (17), g1(X) represents the objective function of the multimodal dataset X; I, T, and A represent image data, text data, and audio data, respectively;

[0090] S3-3-2: For cross-bimodal retrieval, given a sample of any two modalities, without loss of generality, let them be I∈I and A∈A, the objective function g2 calculates the similarity of I and A with all samples in T, and selects the sample that is most similar to both I and A:

[0091]

[0092] In formula (18), g2(I,A) represents the objective function of image data I and audio data A; S(·,·) is the cosine similarity measurement function, h(·) is the mapping function that maps the original input sample to the special category vector [CLS] output by the cross-modal encoder corresponding to the modality; α is a hyperparameter for adjusting the weights of the two modalities;

[0093] Calculate the output value of the S(·,·) function for all texts, images, and audios to form the similarity matrix S of the image and audio to the text IA2T =αS I2T +(1-α)S A2T ;

[0094] Therefore, the complete definition of g2 is as follows:

[0095]

[0096] In formula (19), g2(X,Y) represents the objective function between any two modalities in a multimodal dataset; α, β, and γ are hyperparameters for adjusting the weights of the two modalities.

[0097] Preferably, the S3-4 comprises the following steps:

[0098] S3-4-1: For cross-unimodal retrieval, given an input image I q And its original similarity matrix S I2T The corresponding qth row in Choose I q The K nearest neighbor texts with the maximum similarity are recorded as in with I q The similarity of is ranked jth, that is, Representation and input image I qThe jth nearest neighbor text with the maximum similarity, K is the number of nearest neighbors to be selected; for each text Perform a reverse search; specifically, based on S I2T The transposed matrix S T2I , select and The K nearest neighbor images with the maximum similarity are recorded as In order to fuse the similarity information in two nearest neighbor sets, the ranking position mapping function is defined as follows:

[0099]

[0100] In formula (20), Represents text The ranking position mapping function; K is the number of nearest neighbors to be selected; I q represents the qth input image; Representation and Text The Kth nearest neighbor image with the maximum similarity;

[0101] R I2T (I q ,K) use RP function to get I q The ranking position set Where M is the number of data sets;

[0102] Definition I q The importance vector imp1(I q ):

[0103]

[0104] In formula (21), imp1(I q ) represents the input image I q The importance vector of all texts, subscript 1 indicates that the number of modes in the reverse search is 1; I(·) is the indicator function;

[0105] I q The first rearranged similarity vector is defined as follows:

[0106]

[0107] In formula (22), I q The first rearranged similarity vector of ; I q The original similarity vector of imp1(I q ) represents the input image I q With the importance vector of all texts, imp2(I q) represents the input image I q The importance vector of text and audio; w1 and w2 are importance weights; I2T Repeat the above calculation steps for each row in the matrix to obtain the first weighted multimodal rearrangement similarity model S I2T* ;

[0108] S3-4-2: For cross-bimodal retrieval, given an input image I q , Input Audio A q And its original similarity matrix S IA2T The corresponding qth row in Select both q and A q There are K nearest neighbor texts with the maximum similarity, which are recorded as Use S in sequence T2I and S T2A Perform a reverse search; for S T2I , select and The K nearest neighbor images with the maximum similarity are recorded as Define the ranking position mapping function and execute it on all texts to get I q The ranking position set and I q Importance vector imp I (I q );

[0109] Finally, I q The second rearranged similarity vector is defined as follows:

[0110]

[0111] In formula (23), I q The second rearranged similarity vector of ; Represents the input image I q , Input Audio A q The original similarity vector of imp I (I q ) represents the input image I q With the importance vector of all texts, imp A (A q ) represents the input image I q The importance vector of text and audio; w1 and w2 are importance weights; IA2T Repeat the above calculation steps for each row in the matrix to obtain the second weighted multimodal rearrangement similarity model S IA2T* .

[0112] In summary, due to the adoption of the above technical solution, compared with the prior art, the present invention has at least the following beneficial effects:

[0113] The present invention realizes the function of mutual retrieval of images, texts and audios by using a cross-modal retrieval method of images, texts and audios using weighted multimodal rearrangement. Users input image, text or audio data to retrieve related data of another or two modalities, and return the retrieval results. It has the characteristics of lightweight deployment, efficient algorithm, high retrieval accuracy, etc., and can be applied to the mutual retrieval of multimodal data on the Internet or in databases, providing a new solution for cross-modal data retrieval. BRIEF DESCRIPTION OF THE DRAWINGS

[0114] Figure 1 The figure is a schematic diagram of a cross-modal retrieval method of images, texts and audios based on weighted multimodal rearrangement according to an exemplary embodiment of the present invention.

[0115] Figure 2 FIG. 4 is a schematic diagram of cross-monomodal retrieval according to an exemplary embodiment of the present invention.

[0116] Figure 3 FIG. 4 is a schematic diagram of cross-bimodal retrieval according to an exemplary embodiment of the present invention.

[0117] Figure 4 FIG. 4 is a schematic diagram of weighted multi-modal rearrangement according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0118] The present invention is further described in detail below in conjunction with the examples and specific implementation methods. However, this should not be understood as the scope of the above subject matter of the present invention being limited to the following examples, and all technologies realized based on the content of the present invention belong to the scope of the present invention.

[0119] In the description of the present invention, it is necessary to understand that the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0120] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.

[0121] Pytorch is the python version of torch, an open source neural network framework developed by Facebook, specifically for GPU-accelerated deep neural network (DNN) programming. Torch is a classic tensor library that operates on multi-dimensional matrix data and is widely used in machine learning and other math-intensive applications.

[0122] A neural network is a widely parallel interconnected network composed of simple adaptive units, and its organization can simulate the interactive response of biological nervous systems to real-world objects. At present, large-scale neural networks have made great achievements in various fields and formed a branch of machine learning - deep learning. In the present invention, a multimodal retrieval model is formed by the fusion of three sub-level deep neural networks, which is used to mine multi-level semantic information in each modal data, thereby improving the retrieval accuracy.

[0123] The Transformer encoder is a model framework proposed by Ashish Vaswani et al. in the paper "Attention Is All You Need" and is used for machine translation tasks. Different from previous network architectures, the encoder and decoder in this network architecture do not use network architectures such as recurrent neural networks (RNN) or convolutional neural networks (CNN), but instead use an architecture that completely relies on the attention mechanism. This paper uses the self-attention mechanism in the Transformer encoder to extract the semantic information of the intra-modal relation while improving the retrieval efficiency, and conducts deep semantic information mining.

[0124] like Figure 1 As shown, the present invention provides a method for cross-modal retrieval of images, texts and audios based on weighted multimodal rearrangement, which specifically includes the following steps:

[0125] S1: Use Python and deep learning libraries such as Pytorch to build a deep learning environment, and collect public multimodal datasets containing images, text, and audio data.

[0126] Specifically, the Python language version used in the present invention is version 3.9.0. In addition, Pytorch 1.5.1 is used as a dependent library for implementing the deep learning algorithm.

[0127] Specifically, three subsets of the current public multimodal dataset Open Images V4, Flickr30K, MSCOCO, and ADE20K, can be downloaded from the Internet. The Flickr30K dataset contains 32,578 image-text-audio triple samples, the MSCOCO dataset contains 142,845 image-text-audio triple samples, and the ADE20K dataset contains 22,529 image-text-audio triple samples; the text is the local narrative text of the image, and the audio is the voice description of the corresponding text. Each image has only one text and audio description.

[0128] S2: Preprocess and extract features of the multimodal dataset to obtain image feature representation, text feature representation, and audio feature representation.

[0129] In this embodiment, the multimodal data set includes image data, text data and audio data, so it is necessary to preprocess and extract features of the image data, text data and audio data respectively.

[0130] S2-1: Preprocess and extract features of image data to obtain image feature representation.

[0131] In this embodiment, the input image data is assumed to be I∈R 3×384×384 , where 3 is the RGB three channels and 384×384 is the image resolution.

[0132] First, the image data I is divided into 12×12 image blocks of size 3×32×32, denoted as I=[p1,p2,…p i ,...,p 144 ], p i ∈R 3×32×32 (i=1,2,…,144), p i represents the i-th image block. Here, each image block p i Each is regarded as an independent image token, and its initial representation vector is the corresponding pixel value in the flattened original image.

[0133] Then, [p1,p2,…p i ,...,p 144 ] Input a linear block embedding layer to obtain the embedding vector of each block, add the first category vector [CLS] before the embedding vectors of all blocks, and concatenate them to get the initial representation of the input image data I

[0134] Secondly, the representation vector of the image data is iteratively calculated using the following formula:

[0135]

[0136] In formula (1), and I l They are respectively the lth (l=1,2,…,N I ) layer, WA(·) is the window attention layer, MLP(·) is the multi-layer perceptron layer, LN(·) is the layer normalization, N I =24 is the number of image encoder layers, I l-1 represents the output representation of the MLP operation in layer l-1.

[0137] Finally, the image representation vector output by the last layer is After performing layer normalization, the final image feature representation is obtained

[0138] S2-2: Preprocess and extract features from text data to obtain text feature representation.

[0139] First, all words in the input text data T are segmented to obtain the segmentation sequence T = [t1, t2, ..., t n ], where t n is the nth word segmentation, and n is the word segmentation length of the text.

[0140] Then, a second category vector is concatenated before the word segmentation sequence T Get the initial representation of the input text data

[0141] Secondly, use the following formula to iteratively calculate the representation vector of the text data:

[0142]

[0143] In formula (2), and T l They are respectively the lth (l=1,2,…,N T ) layer, MHSA(·) is the multi-head self-attention layer, N T =6 is the number of text encoder layers; T l-1 represents the output representation of the MLP operation in layer l-1.

[0144] Finally, the representation vector of the text data output by the last layer is Perform layer normalization to obtain the final text feature representation

[0145] S2-3: Preprocess and extract features of the audio data to obtain audio feature representation.

[0146] First, let the original input audio A∈R w , w is the audio length, and A is convolved to obtain the audio embedding representation Among them, CNN1 is a one-dimensional convolution and m is the audio representation length.

[0147] Then, a third category vector is concatenated before the audio embedding representation Get the initial representation of the input audio data

[0148] Next, the audio representation vector is iteratively calculated using the following formula:

[0149]

[0150] In formula (3), and A l They are respectively the lth (l=1,2,…,N A ) layer, the output representation of the MHSA and MLP operations, N A =24 is the number of audio encoder layers, A l-1 Represents the output representation of the l-1th layer MLP operation.

[0151] Finally, the representation vector of the audio output of the last layer is Perform layer normalization to obtain the final audio feature representation

[0152] S3: Constructing a first weighted multimodal rearrangement similarity model across unimodal retrieval and a second weighted multimodal rearrangement similarity model across bimodal retrieval based on image feature representation, text feature representation and audio feature representation.

[0153] S3-1: Fuse the image feature representation, text feature representation, and audio feature representation, and calculate the fused representation vector.

[0154] First, the image feature representation, text feature representation, and audio feature representation in S2 are concatenated into a sequence Since the dimensions of the representation vectors output by the three modal encoders (image feature representation, text feature representation, and audio feature representation) are inconsistent, before performing multimodal fusion, the text feature representation is first passed through a multi-layer perceptron layer to achieve dimension alignment to obtain the initial fusion representation Z 0 =[I E ,MLP(T E ),A E ], MLP(·) is a multi-layer perceptron layer;

[0155] Then, the following formula is used to iteratively calculate the representation vector after multimodal fusion:

[0156]

[0157] In formula (4), and Z l They are respectively the lth (l=1,2,…,N C ) layer; CA(·) is the cross-attention layer; N C =7 is the number of cross-modal encoder layers; Z l-1 Represents the output representation of the l-1th layer MLP operation.

[0158] S3-2: Calculate the loss function of the multimodal dataset as model training.

[0159] S3-2-1: For contrastive learning loss, a small batch of samples with a given number of m is given For any sample (I i ,T i ,A i )∈b m And any two modes in the sample (I i ,T i ,A i denote the i-th image data, text data, and audio data respectively), without loss of generality, let it be I i and T i , Definition I i T i In b m The positive samples in the image b are m / I i Then T i In b m Negative samples within . i and b m / T i For , a similar definition can be given above. Secondly, calculate I i For b m The image-to-text similarity and T of all text samples in i For b m Text-to-image similarity for all image samples in :

[0160]

[0161] In formulas (5) and (6), I i For b m The image-to-text similarity of all text samples in T jrepresents the jth text sample, that is, the jth text feature representation; Indicates T i For b m The text-to-image similarity of all image samples in I j represents the jth image sample; I k represents the Kth image sample; exp(·) is an exponential function with base e; τ is a learnable temperature parameter; S(·) is the cosine similarity metric function; p(·) is the normalized class-specific vector [CLS] that maps the original modality input sample to its corresponding modality-specific encoder:

[0162]

[0163] make and I i and T i In b m The true one-hot similarity vector in is Where I(·) is the indicator function. and is a vector composed of the similarities defined by equations (5) and (6).

[0164] Definition b m The image-text contrastive learning loss in is:

[0165]

[0166] In formula (8), represents the image-text contrastive learning loss; where H(·,·) is the cross entropy function; and I i and T i In b m The true one-hot similarity vector in ; m represents the number of sample sets.

[0167] Similarly, b m The image-audio and text-audio contrastive learning losses in can be defined similarly.

[0168] Then, sample set b m The contrastive learning loss of is the average of the above three cross-modal contrast losses:

[0169]

[0170] In formula (9), Represents sample set b m Contrastive learning loss, Represents sample set b mimage-text contrast loss; Represents sample set b m Text-audio contrastive learning loss; Represents sample set b m Image-audio contrastive learning loss.

[0171] S3-2-2: For matching prediction loss, firstly, hard negative sample sampling is performed within the batch. Specifically, taking the text modality as an example, for the given b m And the two cross-modal similarity vectors calculated and Will and As the probability density function of the sample, respectively in b m Random sampling is performed in the image and audio samples to obtain hard-to-negative images and audio samples. Similar sampling operations can be performed on image and audio modalities. The more similar two samples are, the easier they are to be sampled.

[0172] Then, for (I i ,T i ,A i )∈b m , there are already T i And its difficult image samples The matching probability of the two samples is obtained by inputting the [CLS] representation vector of the cross-modal encoder corresponding to the two samples into a dedicated fully connected layer For b m Repeat the above calculation for all text samples in to obtain the matching probability vector

[0173] Then, b m The matching prediction loss of Chinese text to image is:

[0174]

[0175] In formula (10), represents the matching prediction loss of text to image; H(·,·) is the cross entropy function; p T2I Represents the matching probability of text to image; y T2I is the true matching vector of text and image, that is:

[0176]

[0177] In formula (11), I(·) is the indicator function; Represents difficult image samples;

[0178] For the prediction loss of image-to-text matching, a similar definition can be used. So far, we define b mThe image-text matching prediction loss in is:

[0179]

[0180] In formula (12), Represents the image-text matching prediction loss; and Represent the image-to-text and text-to-image matching prediction losses respectively;

[0181] b m The matching prediction loss is:

[0182]

[0183] In formula (13), Represents sample set b m The matching prediction loss of Represents the image-text matching prediction loss; Represents the image-audio matching prediction loss; Represents the text-audio matching prediction loss.

[0184] Finally, the overall loss function is:

[0185]

[0186] In formula (14), Represents the loss function of a multimodal dataset; represents contrastive learning loss; represents the matching prediction loss.

[0187] S3-3: Construct the objective function of cross-monomodal retrieval and the objective function of cross-bimodal retrieval respectively as model tests.

[0188] For cross-modal retrieval, such as Figure 2 As shown, given an input sample of any modality, without loss of generality, let it be T∈T, the objective function g1 calculates the similarity between T and all samples in I and A, and selects a sample that is most similar to the text data T:

[0189]

[0190] In formula (15), g1(T) represents the objective function of the text data T; I, A, and T represent the subsets of all images, texts, and audio data in the dataset, respectively; S(·,·) is the cosine similarity metric function, and h(·) is the mapping function that maps the original input sample to the special category vector [CLS] output by the cross-modal encoder corresponding to the modality:

[0191]

[0192] Calculate the output value of the S(·,·) function for all texts, images, and audios to form the text-to-image and text-to-audio similarity matrices S T2I and S T2A .

[0193] For image and audio modality input, g1 can be defined similarly and the similarity matrix can be calculated similarly.

[0194] Therefore, the complete definition of g1 is as follows:

[0195]

[0196] In formula (17), g1(X) represents the objective function of the multimodal dataset X; I, A, and T represent the subsets consisting of all images, text, and audio data in the dataset, respectively; S(·,·) is the cosine similarity measurement function; I, T, and A represent image data, text data, and audio data, respectively.

[0197] In this embodiment, for cross-bimodal retrieval, such as Figure 3 As shown, given a sample of any two modalities, without loss of generality, let them be I∈I and A∈A, the objective function g2 calculates the similarity of I and A with all samples in T, and selects the sample that is most similar to both I and A:

[0198]

[0199] In formula (18), g2(I,A) represents the objective function of image data I and audio data A; S(·,·) is the cosine similarity measurement function, h(·) is the mapping function that maps the original input sample to the special category vector [CLS] output by the cross-modal encoder corresponding to the modality; α is a hyperparameter for adjusting the weights of the two modalities.

[0200] Calculate the output value of the S(·,·) function for all texts, images, and audios to form the similarity matrix S of the image and audio to the text IA2T =αS I2T +(1-α)S A2T For the case where image and text modalities are input simultaneously and text and audio modalities are input simultaneously, g2 can be defined similarly and the similarity matrix can be calculated similarly. Therefore, the complete definition of g2 is as follows:

[0201]

[0202] In formula (19), g2(X,Y) represents the objective function between any two modalities in a multimodal dataset; α, β, and γ are hyperparameters for adjusting the weights of the two modalities.

[0203] S3-4: Construct a first weighted multimodal rearrangement similarity model across unimodal retrieval and a second weighted multimodal rearrangement similarity model across bimodal retrieval.

[0204] like Figure 4 As shown, for cross-single-modal retrieval and cross-bimodal retrieval tasks, the weighted multimodal rearrangement algorithm has two corresponding forms, which are explained in turn below.

[0205] For cross-unimodal retrieval, given an input image I q , the original similarity matrix S is calculated based on the objective function of cross-monomodal retrieval I2T , select and I q The K nearest neighbor texts with the maximum similarity are recorded as in with I q The similarity of is ranked jth, that is, Representation and input image I q The jth nearest neighbor text with the maximum similarity, K is the number of nearest neighbors to be selected. Perform a reverse search. Specifically, according to S I2T The transposed matrix S T2I , select and The K nearest neighbor images with the maximum similarity are recorded as In order to fuse the similarity information in two nearest neighbor sets, the ranking position mapping function is defined as follows:

[0206]

[0207] In formula (20), Represents text The ranking position mapping function; K is the number of nearest neighbors to be selected; I q represents the qth input image; Representation and Text The K-th nearest neighbor image with the maximum similarity.

[0208] R I2T (I q ,K) use RP function to get I q The ranking position set Where M is the number of data sets. According to the definition of the ranking position mapping function above, The smaller the value, with I q Therefore, p T2I (I q ) can be regarded as the input image I qThe second expression of similarity to all texts in the dataset.

[0209] Based on this, we define I q The importance vector imp1(I q ):

[0210]

[0211] In formula (21), imp1(I q ) represents the input image I q The importance vector of all texts, subscript 1 indicates that the number of modes for reverse search is 1; I(·) is the indicator function.

[0212] The importance vector imp1(I q ) is correct A modification to increase the q The similarity score of texts with higher similarity. Similarly, for the text and sound pair similarity matrix S in cross-bimodal retrieval TA2I , the importance vector imp2(I q ) can be calculated.

[0213] I q The first rearranged similarity vector is defined as follows:

[0214]

[0215] In formula (22), I q The first rearranged similarity vector of ; I q The original similarity vector of imp1(I q ) represents the input image I q With the importance vector of all texts, imp2(I q ) represents the input image I q The importance vectors of text and audio; w1 and w2 are importance weights. I2T Repeat the above calculation steps for each row in the matrix to obtain the first weighted multimodal rearrangement similarity matrix S I2T* .

[0216] In this embodiment, for cross-bimodal retrieval, given an input image I q , Input Audio A q , the original similarity matrix S is calculated based on the objective function of cross-bimodal retrieval IA2T , and the corresponding qth row Select both q and A qThere are K nearest neighbor texts with the maximum similarity, which are recorded as Use S in sequence T2I and S T2A Perform a reverse search. T2I , select and The K nearest neighbor images with the maximum similarity are recorded as Define the ranking position mapping function and execute it on all texts to get I q The ranking position set and I q Importance vector imp I (I q ). T2A , the importance vector imp A (A q ) can be calculated similarly.

[0217] Finally, I q The second rearranged similarity vector is defined as follows:

[0218]

[0219] In formula (23), I q The second rearranged similarity vector of ; Represents the input image I q , Input Audio A q The original similarity vector of imp I (I q ) represents the input image I q With the importance vector of all texts, imp A (A q ) represents the input image I q The importance vectors of text and audio; w1 and w2 are importance weights. IA2T Repeat the above calculation steps for each row in the matrix to obtain the second weighted multimodal rearrangement similarity matrix S IA2T* .

[0220] In this embodiment, the output of step S3-1 is applied to S3-2, S3-3, and S3-4, where S3-2 is involved in the model training stage, and S3-3 and S3-4 are involved in the model testing stage.

[0221] S4: Perform cross-modal retrieval according to the first weighted multimodal rearrangement similarity model for cross-unimodal retrieval and the second weighted multimodal rearrangement similarity model for cross-bimodal retrieval.

[0222] In this embodiment, the computer device used in the hardware part is a service computer based on AMD processor and NVIDIA GeForce GTX 3090 GPU, and the required image, text and audio data can be transmitted to its storage system via the network.

[0223] In this embodiment, the trained machine learning model obtained in step S3 and the corresponding Web system or GUI software are integrated to form an image, text and audio data retrieval system. Since the codes are all implemented in Python and third-party libraries that are difficult to cross-platform are not easily used, the codes can be easily compiled to run on the server.

[0224] The image, text and audio cross-modal retrieval model is used to perform mutual retrieval of the three modal data. The user uploads the image, text or audio to be retrieved through the interface on the web page, and the background model performs database retrieval and returns the corresponding results and returns them to the front-end system for display.

[0225] The present invention uses a cross-modal retrieval method for images, texts and audios using weighted multimodal rearrangement, which has the characteristics of lightweight deployment, efficient algorithm, high retrieval accuracy, etc. It can be applied to mutual retrieval of multimodal data on the Internet or in databases, and provides a new solution for cross-modal data retrieval.

[0226] In the embodiments provided in the present application, it should be understood that the disclosed methods, systems, devices, modules and / or units can be implemented in other ways. For example, the method embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.

[0227] Those skilled in the art will appreciate that the above-mentioned embodiments are specific examples for implementing the present invention, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present invention.

Claims

1. A cross-modal retrieval method for images, texts and audio based on weighted multimodal rearrangement, It is characterized in that The specific steps include: S1: Collect multimodal datasets containing images, text, and audio data; S2: Preprocess and extract features of the multimodal dataset to obtain image feature representation, text feature representation, and audio feature representation; S3: constructing a first weighted multimodal rearrangement similarity model across single-modal retrieval and a second weighted multimodal rearrangement similarity model across bimodal retrieval based on image feature representation, text feature representation and audio feature representation; S4: Perform cross-modal retrieval according to the first weighted multimodal rearrangement similarity model and the second weighted multimodal rearrangement similarity model.

2. A method for cross-modal retrieval of images, texts and audio based on weighted multimodal rearrangement as claimed in claim 1, It is characterized in that The S2 includes: S2-1: Preprocessing and feature extraction of image data to obtain image feature representation; S2-2: Preprocess the text data and extract features to obtain text feature representation; S2-3: Preprocess and extract features of the audio data to obtain audio feature representation.

3. A method for cross-modal retrieval of images, texts and audios based on weighted multimodal rearrangement as claimed in claim 2, It is characterized in that The S2-1 specifically includes: Assume the input image data is I∈R 3×384×384 , where 3 is the RGB three channels and 384×384 is the image resolution; First, the image data I is divided into 12×12 image blocks of size 3×32×32, denoted as I=[p 1 ,p 2 ,…p i ,...,p 144 ], p i ∈R 3×32×32 (i=1,2,…,144), p i represents the i-th image block; Then, [p 1 ,p 2 ,…p i ,...,p 144 ] Input a linear block embedding layer to obtain the embedding vector of each block, add the first category vector [CLS] before the embedding vectors of all blocks, and concatenate them to get the initial representation of the input image data I Secondly, the representation vector of the image data is iteratively calculated using the following formula: In formula (1), and I l are the output representations of WA and MLP operations in the lth (l=1,2,…,NI) layer, WA(·) is the window attention layer, MLP(·) is the multi-layer perceptron layer, LN(·) is the layer normalization, and N I =24 is the number of image encoder layers, I l -1 represents the output representation of the MLP operation in layer l-1; Finally, the image representation vector output by the last layer is After performing layer normalization, the final image feature representation is obtained 4. A method for cross-modal retrieval of images, texts and audios based on weighted multimodal rearrangement as claimed in claim 2, It is characterized in that The S2-2 specifically includes: First, all words in the input text data T are segmented to obtain the segmentation sequence T = [t 1 ,t 2 ,…,t n ], where t n is the nth word segmentation, and n is the word segmentation length of the text; Then, a second category vector is concatenated before the word segmentation sequence T Get the initial representation of the input text data Secondly, use the following formula to iteratively calculate the representation vector of the text data: In formula (2), and T l They are respectively the lth (l=1,2,…,N T ) layer, MHSA(·) is the multi-head self-attention layer, N T =6 is the number of text encoder layers; T l-1 represents the output representation of the MLP operation in layer l-1; Finally, the representation vector of the text data output by the last layer is Perform layer normalization to obtain the final text feature representation 5. A method for cross-modal retrieval of images, texts and audios based on weighted multimodal rearrangement as claimed in claim 2, It is characterized in that The S2-3 specifically includes: First, let the original input audio A∈R w , w is the audio length, and A is convolved to obtain the audio embedding representation CNN 1 is a one-dimensional convolution, and m is the audio representation length; Then, a third category vector is concatenated before the audio embedding representation Get the initial representation of the input audio data Next, the audio representation vector is iteratively calculated using the following formula: In formula (3), and A l They are respectively the lth (l=1,2,…,N A ) layer, the output representation of the MHSA and MLP operations, N A =24 is the number of audio encoder layers, A l-1 represents the output representation of the l-1th layer MLP operation; Finally, the representation vector of the audio output of the last layer is Perform layer normalization to obtain the final audio feature representation 6. A method for cross-modal retrieval of images, texts and audios based on weighted multimodal rearrangement as claimed in claim 1, It is characterized in that The S3 includes: S3-1: Fuse image feature representation, text feature representation and audio feature representation, and calculate the fused representation vector; S3-2: Calculate the loss function of multimodal datasets; S3-3: construct the objective function of cross-monomodal retrieval and the objective function of cross-bimodal retrieval respectively; S3-4: Construct a first weighted multimodal rearrangement similarity model across unimodal retrieval and a second weighted multimodal rearrangement similarity model across bimodal retrieval.

7. A method for cross-modal retrieval of images, texts and audios based on weighted multimodal rearrangement as claimed in claim 6, It is characterized in that The S3-1 comprises the following steps: First, the image feature representation, text feature representation, and audio feature representation in S2 are concatenated into a sequence First, the text feature representation is passed through a multi-layer perceptron layer to achieve dimension alignment and obtain the initial fusion representation Z 0 =[I E ,MLP(T E ),A E ], MLP(·) is a multi-layer perceptron layer; Then, the following formula is used to iteratively calculate the representation vector after multimodal fusion: In formula (4), and Z l They are respectively the lth (l=1,2,…,N C ) layer; CA(·) is the cross-attention layer; N C =7 is the number of cross-modal encoder layers; Z l-1 Represents the output representation of the l-1th layer MLP operation.

8. A method for cross-modal retrieval of images, texts and audios based on weighted multimodal rearrangement as claimed in claim 6, It is characterized in that The S3-2 comprises the following steps: S3-2-1: For contrastive learning loss, a small batch of samples with a given number of m is given For any sample (I i ,T i ,A i )∈b m and any two modes in the sample, I i ,T i ,A i Represent the i-th image data, text data, and audio data respectively, let it be I i and T i , Definition I i T i In b m The positive samples in the image b are m / I i Then T i In b m Negative samples within ; Secondly, calculate I i For b m The image-to-text similarity and T of all text samples in i For b m Text-to-image similarity for all image samples in : In formulas (5) and (6), I i For b m The image-to-text similarity of all text samples in T j represents the jth text sample; Indicates T i For b m The text-to-image similarity of all image samples in I j represents the jth image sample; I k represents the Kth image sample; exp(·) is an exponential function with base e; τ is a learnable temperature parameter; S(·) is the cosine similarity metric function; p(·) is the normalized class-specific vector [CLS] that maps the original modality input sample to its corresponding modality-specific encoder: make and I i and T i In b m The true one-hot similarity vector in is Where I(·) is the indicator function; Definition b m The image-text contrastive learning loss in is: In formula (8), represents the image-text contrastive learning loss; where H(·,·) is the cross entropy function; and I i and T i In b m The true one-hot similarity vector in; m represents the number of sample sets; Then, sample set b m The contrastive learning loss of is the average of three cross-modal contrast losses: In formula (9), Represents sample set b m Contrastive learning loss, Represents sample set b m image-text contrast loss; Represents sample set b m Text-audio contrastive learning loss; Represents sample set b m image-audio contrastive learning loss; S3-2-2: For matching prediction loss, first perform hard negative sample sampling within the batch; For a given b m And the two cross-modal similarity vectors calculated and Will and As the probability density function of the sample, respectively in b m Random sampling is performed to obtain hard-negative image and audio samples; Then, for (I i ,T i ,A i )∈b m , there are already T i And its difficult image samples The matching probability of the two samples is obtained by inputting the [CLS] representation vector of the cross-modal encoder corresponding to the two samples into a dedicated fully connected layer For b m Repeat the above calculation for all text samples in to obtain the matching probability vector Then, b m The matching prediction loss of Chinese text to image is: In formula (10), represents the matching prediction loss of text to image; H(·,·) is the cross entropy function; p T2I Represents the matching probability of text to image; y T2I is the true matching vector of text and image, that is: In formula (11), I(·) is the indicator function; Represents difficult image samples; Definition b m The image-text matching prediction loss in is: In formula (12), Represents the image-text matching prediction loss; and Represent the image-to-text and text-to-image matching prediction losses respectively; b m The matching prediction loss is: In formula (13), Represents sample set b m The matching prediction loss of Represents the matching prediction loss of image to text; Represents the image-to-audio matching prediction loss; Represents the matching prediction loss of text to audio; Finally, the overall loss function is: In formula (14), Represents the loss function of a multimodal dataset; represents contrastive learning loss; represents the matching prediction loss.

9. A method for cross-modal retrieval of images, texts and audios based on weighted multimodal rearrangement as claimed in claim 6, It is characterized in that The S3-3 comprises the following steps: S3-3-1: For cross-modal retrieval, given an input sample of any modality, let it be T∈T, the objective function g 1 Calculate the similarity between T and all samples in I and A, and select the sample that is most similar to the text data T: In formula (15), g 1 (T) represents the objective function of the text data T; I, T and A represent the subsets of all images, texts and audio data in the dataset respectively; S(·,·) is the cosine similarity metric function, and h(·) is the mapping function that maps the original input sample to the special category vector [CLS] output by the cross-modal encoder corresponding to the modality: Calculate the output value of the S(·,·) function for all texts, images, and audios to form the text-to-image and text-to-audio similarity matrices S T2I and S T2A ; Therefore, g 1 The complete definition of is as follows: In formula (17), g 1 (X) represents the objective function of the multimodal dataset X; I, T, and A represent image data, text data, and audio data, respectively; S3-3-2: For cross-bimodal retrieval, given a sample of any two modalities, without loss of generality, let them be I∈I and A∈A, the objective function g 2 Calculate the similarity between I and A and all samples in T, and select the samples that are most similar to both I and A: In formula (18), g 2 (I, A) represents the objective function of image data I and audio data A; S(·,·) is the cosine similarity metric function, h(·) is the mapping function that maps the original input sample to the special category vector [CLS] output by the cross-modal encoder corresponding to the modality; α is a hyperparameter for adjusting the weights of the two modalities; Calculate the output value of the S(·,·) function for all texts, images, and audios to form the similarity matrix S of the image and audio to the text IA2T =αS I2T +(1-α)S A2T ; Therefore, g 2 The complete definition of is as follows: In formula (19), g 2 (X, Y) represents the objective function between any two modalities in a multimodal dataset; α, β, and γ are hyperparameters for adjusting the weights of the two modalities.

10. A method for cross-modal retrieval of images, texts and audios based on weighted multimodal rearrangement as claimed in claim 6, It is characterized in that The S3-4 comprises the following steps: S3-4-1: For cross-unimodal retrieval, given an input image I q And its original similarity matrix S I2T The corresponding qth row in Choose I q The K nearest neighbor texts with the maximum similarity are recorded as in with I q The similarity of is ranked jth, that is, Representation and input image I q The jth nearest neighbor text with the maximum similarity, K is the number of nearest neighbors to be selected; for each text Perform a reverse search; specifically, based on S I2T The transposed matrix S T2I , select and The K nearest neighbor images with the maximum similarity are recorded as In order to fuse the similarity information in two nearest neighbor sets, the ranking position mapping function is defined as follows: In formula (20), Represents text The ranking position mapping function; K is the number of nearest neighbors to be selected; I q represents the qth input image; Representation and text The Kth nearest neighbor image with the maximum similarity; R I2T (I q ,K) use RP function to get I q The ranking position set Where M is the number of data sets; Definition I q Importance vector imp 1 (I q ): In formula (21), imp 1 (I q ) represents the input image I q The importance vector of all texts, subscript 1 indicates that the number of modes in the reverse search is 1; I(·) is the indicator function; I q The first rearranged similarity vector is defined as follows: In formula (22), I q The first rearranged similarity vector of ; I q The original similarity vector of imp 1 (I q ) represents the input image I q With the importance vector of all texts, imp 2 (I q ) represents the input image I q Importance vector with text and audio; w 1 and w 2 is the importance weight; for S I2T Repeat the above calculation steps for each row in the matrix to obtain the first weighted multimodal rearrangement similarity model S I2T* ; S3-4-2: For cross-bimodal retrieval, given an input image I q , Input Audio A q And its original similarity matrix S IA2T The corresponding qth row in Select both q and A q There are K nearest neighbor texts with the maximum similarity, which are recorded as Use S in sequence T2I and S T2A Perform a reverse search; for S T2I , select and The K nearest neighbor images with the maximum similarity are recorded as Define the ranking position mapping function and execute it on all texts to get I q The ranking position set and I q Importance vector imp I (I q ); Finally, I q The second rearranged similarity vector is defined as follows: In formula (23), I q The second rearranged similarity vector of ; Represents the input image I q , Input Audio A q The original similarity vector of imp I (I q ) represents the input image I q With the importance vector of all texts, imp A (A q ) represents the input image I q Importance vector with text and audio; w 1 and w 2 is the importance weight; for S IA2T Repeat the above calculation steps for each row in the matrix to obtain the second weighted multimodal rearrangement similarity model S IA2T* .