Model processing method, device and equipment

By screening and using similarity thresholds to process the prediction results of noisy image-text pairs, the cross-modal matching model is trained, which solves the negative impact of noise data on model training in the existing technology and improves matching accuracy and model stability.

CN118658167AActive Publication Date: 2024-09-17ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410703850.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-17
Estimated Expiration
2044-05-31

AI Technical Summary

Technical Problem

Existing cross-modal matching technology is difficult to obtain accurate image-text pairs when the training data is inconsistent, causing noise data to have a negative impact on model training and reducing the effectiveness of the matching technology.

Method used

By obtaining matching image-text pairs and image-text pairs with noise, they are encoded separately, and the prediction sub-model is used to generate prediction results. The matching data is filtered according to the similarity threshold, and the target model is trained to reduce the impact of noise on model training. negative impact.

Benefits of technology

It improves the model's resistance to noisy data, enhances the learning robustness of mutually matched data pairs, stabilizes the model training process, and improves the matching accuracy of image-text pairs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118658167A
    Figure CN118658167A
Patent Text Reader

Abstract

The embodiment of the invention discloses a model processing method, device and equipment. The method comprises the steps that a first image text pair and a second image text pair with noise which are matched with each other are acquired; respectively encoding the image data in the first image text pair and the image data in the second image text pair to obtain a corresponding first image representation and a corresponding second image representation; respectively inputting the first image representation and the second image representation into a target model to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation; obtaining a first prediction result from the prediction results corresponding to the first image representation, and matching the first text data corresponding to the first prediction result to obtain a third image text pair; and performing model training on the target model based on the similarity between different data in the third image text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of computer technology, and in particular to a model processing method, device and equipment. Background Art

[0002] The core idea of ​​most cross-modal matching methods is to transform different modalities into a common space, in which the goal is to increase the similarity between matching image data and text data, while reducing the similarity between non-matching image data and text data. However, the actual success of the above methods depends on a key assumption: the training data needs to be consistent between modalities. However, it is difficult to obtain accurately matched data pairs. Manual annotation is not only a huge task, but also prone to subjective errors, and it is easy to cause privacy data leakage. An alternative is to mine co-occurring image-text pairs from the vast space of the Internet. However, the cost of the above processing is to introduce noise from mismatched data pairs. To this end, it is necessary to provide a technical solution that can better mitigate the negative impact of mismatched image text on model training. Summary of the invention

[0003] The purpose of the embodiments of this specification is to provide a technical solution that can better alleviate the negative impact of mismatched image text on model training.

[0004] In order to implement the above technical solution, the embodiments of this specification are implemented as follows:

[0005] The embodiment of the present specification provides a method for processing a model, the method comprising: obtaining a first image-text pair and a second image-text pair with noise that match each other. Encoding the image data in the first image-text pair and the image data in the second image-text pair respectively, and obtaining a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair. Inputting the first image representation and the second image representation into the target model respectively, and obtaining a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation. From the prediction result corresponding to the first image representation, obtain a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold, and use the first text data in the first image-text pair corresponding to the first prediction result as text data that matches the image data in the second image-text pair, and obtain a third image-text pair. Model training is performed on the target model based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result, and a trained target model is obtained.

[0006] The embodiment of the present specification provides a method for processing a model, the method comprising: obtaining a first image-text pair and a second image-text pair with noise that match each other. The image data in the first image-text pair and the image data in the second image-text pair are respectively input into the image-text encoding submodel in the multimodal model to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, the image-text encoding submodel being used to encode the image data or text data to obtain the corresponding representation. The first image representation and the second image representation are respectively input into the prediction submodel in the multimodal model to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation. From the prediction result corresponding to the first image representation, a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold is obtained, and the first text data in the first image-text pair corresponding to the first prediction result is used as text data that matches the image data in the second image-text pair to obtain a third image-text pair. The multimodal model is trained based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained multimodal model.

[0007] The embodiment of the present specification provides a model processing device, the device comprising: a data pair acquisition module, which acquires a first image-text pair and a second image-text pair with noise that match each other. A representation determination module, which encodes the image data in the first image-text pair and the image data in the second image-text pair, respectively, to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair. A prediction module, which inputs the first image representation and the second image representation into a target model, respectively, to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation. A data processing module, which acquires a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and uses the first text data in the first image-text pair corresponding to the first prediction result as the text data that matches the image data in the second image-text pair, to obtain a third image-text pair. A training module, which performs model training on the target model based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result, to obtain a trained target model.

[0008] The embodiment of the present specification provides a model processing device, the device comprising: a data pair acquisition module, which acquires a first image-text pair and a second image-text pair with noise that match each other. The first model processing module, which inputs the image data in the first image-text pair and the image data in the second image-text pair into the image-text encoding submodel in the multimodal model, respectively, to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, the image-text encoding submodel being used to encode the image data or text data to obtain the corresponding representation. The second model processing module, which inputs the first image representation and the second image representation into the prediction submodel in the multimodal model, respectively, to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation. The data processing module, which acquires a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and uses the first text data in the first image-text pair corresponding to the first prediction result as the text data that matches the image data in the second image-text pair, to obtain a third image-text pair. A training module performs model training on the multimodal model based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result, to obtain a trained multimodal model.

[0009] The embodiment of the present specification provides a model processing device, the model processing device comprising: a processor; and a memory arranged to store computer executable instructions, the executable instructions, when executed, enable the processor to: obtain a first image-text pair and a second image-text pair that match each other. Encode the image data in the first image-text pair and the image data in the second image-text pair respectively, and obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair. Input the first image representation and the second image representation into the target model respectively, and obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation. From the prediction result corresponding to the first image representation, obtain a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold, and use the first text data in the first image-text pair corresponding to the first prediction result as text data that matches the image data in the second image-text pair, and obtain a third image-text pair. Model training is performed on the target model based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result, to obtain a trained target model.

[0010] The embodiment of the present specification provides a model processing device, the model processing device includes: a processor; and a memory arranged to store computer executable instructions, the executable instructions when being executed, make the processor: obtain a first image-text pair and a second image-text pair with noise that match each other. Input the image data in the first image-text pair and the image data in the second image-text pair into the image-text encoding submodel in the multimodal model respectively, obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, the image-text encoding submodel is used to encode the image data or text data to obtain the corresponding representation. Input the first image representation and the second image representation into the prediction submodel in the multimodal model respectively, obtain the prediction result corresponding to the first image representation and the prediction result corresponding to the second image representation. From the prediction result corresponding to the first image representation, obtain a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold, take the first text data in the first image-text pair corresponding to the first prediction result as the text data that matches the image data in the second image-text pair, and obtain a third image-text pair. The multimodal model is trained based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained multimodal model.

[0011] The embodiment of the present specification also provides a storage medium, the storage medium is used to store computer executable instructions, and the executable instructions implement the following process when executed by the processor: obtain a first image-text pair that matches each other and a second image-text pair with noise. Encode the image data in the first image-text pair and the image data in the second image-text pair respectively to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair. Input the first image representation and the second image representation into the target model respectively to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation. From the prediction result corresponding to the first image representation, obtain a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold, and use the first text data in the first image-text pair corresponding to the first prediction result as text data that matches the image data in the second image-text pair to obtain a third image-text pair. Model training is performed on the target model based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result, to obtain a trained target model.

[0012] The embodiment of the present specification also provides a storage medium, the storage medium is used to store computer executable instructions, and the executable instructions implement the following process when executed by the processor: obtain a first image-text pair and a second image-text pair with noise that match each other. Input the image data in the first image-text pair and the image data in the second image-text pair into the image-text encoding submodel in the multimodal model respectively, and obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, and the image-text encoding submodel is used to encode the image data or text data to obtain the corresponding representation. Input the first image representation and the second image representation into the prediction submodel in the multimodal model respectively, and obtain the prediction result corresponding to the first image representation and the prediction result corresponding to the second image representation. From the prediction result corresponding to the first image representation, obtain a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold, and use the first text data in the first image-text pair corresponding to the first prediction result as the text data that matches the image data in the second image-text pair, and obtain a third image-text pair. The multimodal model is trained based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained multimodal model.

[0013] The embodiment of the present specification also provides a computer program product, including a computer program, which implements the following process when executed by a processor: obtain a first image-text pair that matches each other and a second image-text pair with noise. Encode the image data in the first image-text pair and the image data in the second image-text pair respectively to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair. Input the first image representation and the second image representation into a target model respectively to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation. From the prediction result corresponding to the first image representation, obtain a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold, and use the first text data in the first image-text pair corresponding to the first prediction result as text data that matches the image data in the second image-text pair to obtain a third image-text pair. Model training is performed on the target model based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained target model.

[0014] The embodiment of the present specification also provides a computer program product, including a computer program, which implements the following process when executed by a processor: obtain a first image-text pair and a second image-text pair that match each other. Input the image data in the first image-text pair and the image data in the second image-text pair into the image-text encoding submodel in the multimodal model respectively, obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, and the image-text encoding submodel is used to encode the image data or text data to obtain the corresponding representation. Input the first image representation and the second image representation into the prediction submodel in the multimodal model respectively, obtain the prediction result corresponding to the first image representation and the prediction result corresponding to the second image representation. Obtain a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and use the first text data in the first image-text pair corresponding to the first prediction result as the text data that matches the image data in the second image-text pair, and obtain a third image-text pair. The multimodal model is trained based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained multimodal model. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the drawings required for use in the embodiments or the prior art description will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.

[0016] Figure 1 This is an embodiment of a processing method of a model in this specification;

[0017] Figure 2 A schematic diagram of the processing process of a model of this specification;

[0018] Figure 3 This is another processing method embodiment of the present specification;

[0019] Figure 4 A schematic diagram of the processing process of another model of this specification;

[0020] Figure 5 This is another processing method embodiment of a model of this specification;

[0021] Figure 6 This is a processing device embodiment of a model of this specification;

[0022] Figure 7 This is another processing device embodiment of the present specification;

[0023] Figure 8 This is a processing device embodiment of a model of this specification. DETAILED DESCRIPTION

[0024] The embodiments of this specification provide a method, device and equipment for processing a model.

[0025] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0026] The embodiment of this specification provides a pseudo-title mechanism based on pseudo-classification for cross-modal matching. In order to maintain network security, many information service platforms or systems will conduct full-network inspections. During the full-network inspection, the information service platform or system has a lot of image-text pair data, including screenshots of risky websites, web page html source code and other information. For the full-network inspection, there are many downstream tasks based on the model's understanding of multimodal data such as image data and text data. Therefore, it is imperative to pre-train the model backbone using image data and text data. At the same time, the information service platform or system may have a deep accumulation of data, so if the rich image data and text data can be used in pre-training, the utilization rate of the data can be greatly improved. The core idea of ​​most cross-modal matching methods is to convert different modes into a common space, in which the goal is to increase the similarity between matching image data-text data, while reducing the similarity between non-matching image data-text data. However, the actual success of the above method depends on a key assumption: the training data needs to be coordinated and consistent between the modes. However, it is difficult to obtain accurately matched data pairs. Manual annotation is not only a huge task, but also prone to subjective errors. An alternative is to mine co-occurring image-text pairs from the vast space of the Internet. However, the cost of the above processing is the introduction of noise from mismatched data pairs, which brings up a problem - noise correspondence. Unlike the commonly used noise labels, which refer to incorrect category labels, noise correspondence refers to the mismatch between different modalities in paired data. Typically, the collected data may be mixed with accurately matched data pairs and noisy data pairs, which will reduce the effectiveness of cross-modal matching technology. Therefore, the embodiment of this specification proposes a pseudo-title algorithm based on pseudo-classification for cross-modal matching.

[0027] At present, there are few solutions that can handle noisy correspondences. Since NCR was first introduced, only a few studies have further explored it. The previously proposed NCL solution can be summarized as adjusting the corresponding labels, which can be reinterpreted as a soft margin of the triple loss to mitigate the negative training impact caused by mismatched image-text pairs. This approach can be called a margin-based approach. At the same time, although this approach shows feasibility and effectiveness, it has certain limitations. That is, adjusting the margin does not directly provide beneficial supervision information for the false positive image-text pairs, but only mitigates their false supervision. At the same time, although this approach strives to resist noisy data, it is still significantly negatively affected. The learning process of the above NCR exhibits an oscillating pattern, especially when it first encounters noisy data, resulting in significant fluctuations in the loss associated with accurately matched data pairs. The NCR solution robustly trains the matching model of image-text pairs through adaptively corrected soft corresponding label information. After NCR, its successors have improved NCL. For example, BiCro uses bidirectional cross-modal similarity consistency to introduce an innovative way to correct noisy corresponding label information, which exploits the inherent consistency in paired data (i.e., image-text pairs). On the other hand, DECL uses cross-modal evidence learning to estimate the uncertainty brought by noise to isolate noisy data pairs. A notable feature of this method is the compromise strategy for dealing with mismatched image-text pairs; its design mainly revolves around mitigating the negative impact of mismatched image-text pairs by isolating mismatched image-text pairs or adjusting the smaller margin in the triple ranking loss. Different from the above method, this embodiment provides a direct supervision signal for the image in the mismatched image-text pairs, enriching the learning process. For specific processing, please refer to the specific content in the following embodiments.

[0028] like Figure 1 As shown, an embodiment of this specification provides a method for processing a model, and the execution subject of the method may be a terminal device or a server, etc., wherein the terminal device may be a mobile terminal device such as a mobile phone, a tablet computer, or a computer device such as a laptop or a desktop computer, or an IoT device (specifically a smart watch, a vehicle-mounted device, etc.), etc., wherein the server may be an independent server, or a server cluster composed of multiple servers, etc., and the server may be a background server for a financial service or an online shopping service, or a background server for an application, etc. In this embodiment, a detailed description is given by taking the execution subject as a server as an example. For the case where the execution subject is a terminal device, please refer to the following server case processing, which will not be repeated here. The method may specifically include the following steps:

[0029] In step S102, a first image-text pair that matches each other and a second image-text pair with noise are obtained.

[0030] Among them, the first image-text pair can be a data pair consisting of image data and text data that matches each other, wherein the text data can include one or more of the description information of the content of the image data in the data pair, the layout information of the specified data in the image data, the specified attribute information of the image data, etc., which can be set according to the actual situation, and the embodiments of this specification do not limit this. The image data can be the data of any image, such as the data of the image of a certain building, the data of the image of a certain animal, the data of the image of a certain plant, the data of the image of a certain person, the data of the image of a certain specific scene, etc., which can be set according to the actual situation, and the embodiments of this specification do not limit this. The second image-text pair with noise can be a data pair in which the corresponding relationship between the image data and the text data in the second image-text pair is a noise-containing data pair, that is, the second image-text pair with noise can be a data pair in which the image data and the text data do not match in the second image-text pair, wherein the image data and the text data do not match can be that the similarity between the semantics of the image data and the semantics of the text data is less than a preset threshold, so as to characterize that there is a large difference between the image data and the text data. For example, the text data is set to describe the content of the image data. If the semantics of the description information corresponding to the text data is inconsistent with the semantics of the image data, it indicates that the image data and the text data do not match.

[0031] In implementation, when it is necessary to perform model training on a certain specified model (i.e., the target model), data pairs consisting of image data and text data can be obtained in a variety of different ways. For example, some business systems will record the image data and corresponding text information provided by users in the process of business processing. Then, a certain number of data pairs can be obtained from the image data-text data pairs recorded in the above business system. The obtained data pairs may include a first image-text pair that matches each other and a second image-text pair with noise. Alternatively, the data pairs consisting of image data-text data can be directly obtained from a specified database. The obtained database may include a first image-text pair that matches each other and a second image-text pair with noise. Alternatively, the data pairs consisting of image data-text data can be collected from different users. Alternatively, the data pairs consisting of image data-text data can be obtained separately by two or three of the above methods. The obtained data pairs may include a first image-text pair that matches each other and a second image-text pair with noise. In actual applications, in addition to obtaining the data pairs consisting of image data-text data in the above methods, the above data pairs can also be obtained in a variety of other different ways, which can be set according to actual conditions.

[0032] It should be noted that the first image-text pair may include one or more, and correspondingly, the second image-text pair may include one or more. In addition, in actual applications, the number of first image-text pairs and the number of second image-text pairs may satisfy a specified relationship, for example, the number of first image-text pairs and the number of second image-text pairs may satisfy 10:1 or 50:1, etc., and the specific setting can be based on actual conditions.

[0033] In step S104, the image data in the first image-text pair and the image data in the second image-text pair are respectively encoded to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair.

[0034] Among them, the first image representation may be data that can represent the corresponding image data, and the first image representation may be represented in a variety of different ways, for example, the first image representation may be represented in the form of a vector, or the first image representation may be represented by a matrix of a specified dimension, or the first image representation may be represented by one or more numerical values, etc., which may be specifically set according to actual conditions. Similarly, the second image representation may be data that can represent the corresponding image data, and the second image representation may be represented in a variety of different ways, for example, the second image representation may be represented in the form of a vector, or the second image representation may be represented by a matrix of a specified dimension, or the second image representation may be represented by one or more numerical values, etc., which may be specifically set according to actual conditions.

[0035] In implementation, in order to better process image data and text data, the image representation corresponding to the image data and the text representation corresponding to the text data can be determined respectively. Specifically, the encoder can be pre-set according to actual conditions. The encoder can be constructed through a neural network or a specified feature extraction algorithm, etc. Then, the encoder can be trained or fine-tuned using training samples to obtain a trained encoder. Alternatively, the trained or constructed encoder can be directly used, etc. The specific setting can be based on actual conditions, and the embodiments of this specification do not limit this.

[0036] like Figure 2As shown, the image data contained therein can be extracted from the first image-text pair, and the image data in the first image-text pair can be input into the encoder. The encoder can perform feature extraction on the image data to obtain an image representation that can characterize the image data, and the obtained image representation can be the first image representation. Similarly, the image data contained therein can be extracted from the second image-text pair, and the image data in the second image-text pair can be input into the encoder. The encoder can perform feature extraction on the image data to obtain an image representation that can characterize the image data, and the obtained image representation can be the second image representation.

[0037] In step S106, the first image representation and the second image representation are respectively input into the target model to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation.

[0038] Among them, the target model can be a model that predicts the result of the corresponding image data through the input image representation. The target model can be constructed by a machine learning network model such as a neural network, or by a classification algorithm or a regression algorithm. In practical applications, the target model can also be a preset large language model, etc., which can be set according to actual conditions. The target model can analyze the input image representation, determine the semantic information of the image data corresponding to the image representation, and then obtain text data corresponding to the determined semantic information, etc., and the obtained text data and other related data can be used as the prediction result.

[0039] In implementation, in NCL, it is crucial to handle mismatched data pairs. However, many approaches often ignore the protection of learning from mutually matching data pairs. As mentioned above, after introducing mismatched data pairs (i.e., image-text pairs with noise) in model training, the learning process from mutually matching data pairs may be seriously affected. In order to enhance the robustness of training for mutually matching data pairs, this embodiment proposes an auxiliary training task to strengthen the learning of the above data. A key insight provided is that in image-text pairs, the text data (or title) corresponding to the image data can be regarded as a classification label, where a predefined hyperparameter determines the number of categories. Therefore, the training of image-text pairs can be regarded as a multi-category classification task. For example, the titles (or text data) in the dataset can be divided into two main categories: description information of natural landscapes and description information of biological behaviors. The goal is to train the model to classify image data of natural landscapes and image data containing organisms into their categories respectively. To achieve this goal, we set up a pseudo classifier (i.e., the target model) and use the text data in the mutually matching data pairs to generate pseudo labels for the training of the pseudo classifier. The role of pseudo-labeling is to encourage the model to make confident predictions. From the perspective of supervised learning, pseudo-classification also helps the model capture similar relationships between samples, which enhances the model's learning of mutually matching data pairs and improves the model's ability to resist noise interference.

[0040] Specifically, the target model can be constructed by a machine learning network model, a classification algorithm or a regression algorithm, and then the target model can be trained or fine-tuned using training samples to obtain a trained target model. Alternatively, a trained or constructed encoder can be directly used. The specific setting can be based on actual conditions, and the embodiments of this specification do not limit this.

[0041] like Figure 2 As shown, the above-mentioned first image representation can be input into the target model, and the first image representation can be analyzed by the target model to determine the semantic information of the image corresponding to the first image feature, and the prediction result corresponding to the first image representation (such as text data, classification category or numerical value, etc.) can be determined based on the determined semantic information. Similarly, the above-mentioned second image representation can be input into the target model, and the second image representation can be analyzed by the target model to determine the semantic information of the image corresponding to the second image representation, and the prediction result corresponding to the second image representation (such as text data, classification category or numerical value, etc.) can be determined based on the determined semantic information.

[0042] In step S108, a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold is obtained from the prediction results corresponding to the first image representation, and the first text data in the first image-text pair corresponding to the first prediction result is used as text data that matches the image data in the second image-text pair to obtain a third image-text pair.

[0043] The preset threshold value may be set according to actual conditions. Specifically, for example, the preset threshold value may be 80% or 90%.

[0044] In implementation, a similarity algorithm may be preset, such as a cosine similarity algorithm, a Euclidean distance algorithm, etc. Figure 2 As shown, a similarity algorithm can be used to calculate the similarity between the prediction result corresponding to each first image representation and the prediction result corresponding to the second image representation, and the calculated similarity value can be compared with a preset threshold value. According to the comparison result, a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than the preset threshold value can be obtained from the prediction result corresponding to the first image representation. The text data in the first image-text pair corresponding to the first prediction result can be obtained, and the obtained text data can be the first text data. The first text data and the image data in the second image-text pair can be used as a mutually matching data pair, that is, the first text data and the image data in the second image-text pair can be used as a data pair, and the data pair can be the third image-text pair. As for the text data in the second image-text pair corresponding to the above image data, the text data can be discarded or not processed. In the above manner, text data (or pseudo-title) matching the image data in the second image-text pair with noise can be set.

[0045] In step S110, the target model is trained based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained target model.

[0046] In implementation, the loss function or objective function can be pre-set according to the actual situation. For example, the corresponding loss function or objective function can be pre-set according to the similarity, or one or two data can be selected from the image data and the text data, and the corresponding loss function or objective function can be pre-set according to the similarity and the above selected data. It can be set specifically according to the actual situation, and the embodiments of this specification do not limit this. The similarity between the image data in the third image-text pair and the text data in the third image-text pair can be calculated, and the similarity between the prediction result corresponding to the second image representation and the first prediction result can be calculated. The above-calculated similarity can be substituted into the above-mentioned loss function or objective function (other relevant data can also be substituted into the above-mentioned loss function or objective function). The corresponding loss information can be obtained by calculation, and the model parameters of the target model can be adjusted based on the loss information. If the preset convergence condition is met at this time, the corresponding loss information can be calculated in the above manner, and then the model parameters of the target model can be adjusted until the preset convergence condition is met, so as to train the target model and finally obtain the trained target model.

[0047] The embodiment of the present specification provides a method for processing a model, by obtaining a first image-text pair that matches each other and a second image-text pair with noise, encoding the image data in the first image-text pair and the image data in the second image-text pair respectively, obtaining a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, then inputting the first image representation and the second image representation into a target model respectively, obtaining a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation, obtaining a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and inputting the first image representation and the second image representation into a target model respectively, obtaining a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold, and The first text data in the pair is used as the text data that matches the image data in the second image-text pair to obtain a third image-text pair. Finally, based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result, the target model is trained to obtain a trained target model. In this way, the image data in the noisy image-text pair is assigned as accurate text data (or pseudo-title) as possible, so that the model can be optimized to a better direction through effective supervision information. Moreover, by directly assigning corresponding text data to the image data in the noisy image-text pair, the learning of the target model for the first image-text pair that matches each other can be made more stable.

[0048] In practical applications, such as Figure 3As shown, before step S110, the processing of the following steps S112 and S114 may also be performed.

[0049] In step S112, the text data in the first image-text pair is encoded to obtain a first text representation corresponding to the text data in the first image-text pair.

[0050] Among them, the first text representation can be data that can represent the corresponding text data. The first text representation can be represented in a variety of different ways. For example, the first text representation can be represented in the form of a vector, or the first text representation can also be represented by a matrix of a specified dimension, or the first text representation can also be represented by one or more numerical values, etc., which can be set specifically according to actual conditions.

[0051] In implementation, in order to better process text data, the text representation corresponding to the text data can be determined. Specifically, as described above, the encoder can be pre-set according to actual conditions. The encoder can be constructed through a neural network or through a specified feature extraction algorithm, etc. Then, the encoder can be trained or fine-tuned using training samples to obtain a trained encoder. Alternatively, the trained or constructed encoder can be directly used, etc. The specific setting can be based on actual conditions, and the embodiments of this specification do not limit this.

[0052] like Figure 4 As shown, the text data contained therein can be extracted from the first image-text pair, and the text data in the first image-text pair can be input into the encoder. The encoder can perform feature extraction on the text data to obtain a text representation that can represent the text data, and the obtained text representation can be the first text representation.

[0053] In step S114, the first text representation is input into the target model to obtain a prediction result corresponding to the first text representation.

[0054] Among them, the target model can analyze the input text representation, determine the semantic information of the text data corresponding to the text representation, and then obtain the corresponding prediction result.

[0055] In implementation, as described above, Figure 4 As shown, the first text representation can be input into the constructed target model (the construction method (or training method) of the target model can refer to the aforementioned related content and will not be repeated here), and the first text representation can be analyzed by the target model to determine the semantic information of the image corresponding to the first text representation, and the prediction result corresponding to the first text representation can be determined based on the determined semantic information.

[0056] Based on the processing of the above-mentioned steps S112 and S114, the above-mentioned step S110 may also include: using the prediction result corresponding to the first text representation as the label information corresponding to the image data in the first image-text pair, determining the first loss information based on the label information and the prediction result corresponding to the first image representation, and determining the second loss information based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result, performing model training on the target model based on the first loss information and the second loss information to obtain the trained target model.

[0057] In implementation, Figure 4 As shown, the loss function can be pre-set according to the actual situation. In this embodiment, multiple different loss functions can be set. For the prediction result corresponding to the first image representation, a corresponding loss function can be set. The loss function can be set in a variety of ways. For example, the loss function can be a mean square error loss function, a Huber loss function, etc. It can be set specifically according to the actual situation, and this specification embodiment does not limit this. The prediction result corresponding to the first text representation can be used as the label information corresponding to the image data in the first image-text pair, and then the label information and the prediction result corresponding to the first image representation can be substituted into the above-set loss function to obtain the first loss information.

[0058] According to actual conditions, another loss function can be pre-set. The loss function can be set by the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result. The similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result can be substituted into the loss function set above to obtain second loss information.

[0059] The first loss information and the second loss information may be added to obtain the total loss information, or the first loss information and the second loss information may be weighted to obtain the total loss information, or a specified calculation may be performed based on the first loss information and the second loss information, and the calculation result may be used as the total loss information, etc. The corresponding total loss information may also be calculated in a variety of other ways. The model parameters of the target model may be adjusted based on the total loss information. If the preset convergence conditions are not met at this time, the corresponding total loss information may be calculated in the above manner, and then the model parameters of the target model may be adjusted until the preset convergence conditions are met, so as to train the target model and finally obtain the trained target model.

[0060] In practical applications, the above-mentioned model training is performed on the target model based on the first loss information and the second loss information, and the processing of the trained target model can be diverse. In addition to the processing through the above-mentioned method, it can also be processed in a variety of different ways, which may specifically include the following: based on the first loss information and the second loss information, and the similarity between the prediction result corresponding to the second image representation and the first prediction result, the target model is trained to obtain a trained target model.

[0061] In implementation, the corresponding total loss information can be determined based on the first loss information and the second loss information, and in combination with the similarity between the prediction result corresponding to the second image representation and the first prediction result. The model parameters of the target model can be adjusted based on the total loss information. If the preset convergence conditions are not met at this time, the corresponding total loss information can be calculated in the above manner, and then the model parameters of the target model can be adjusted until the preset convergence conditions are met, so as to train the target model and finally obtain the trained target model. Since there is no guarantee that the found text data accurately reflects the semantic information of the image data in the second image-text pair, the interval can also be dynamically adjusted to ensure that the model benefits from a more accurate correspondence during the training process. Specifically, the margin in the Triplet Ranking loss function can be adaptively adjusted according to the similarity between the image data corresponding to the selected text data and the image data in the second image-text pair.

[0062] In practical applications, the first loss information is loss information determined by a cross entropy loss function based on the above-mentioned label information and the prediction result corresponding to the first image representation. Specifically, the prediction result corresponding to the first text representation can be used as the label information corresponding to the image data in the first image-text pair, and the standard cross entropy loss function can be used to supervise the target model to train on the prediction result corresponding to the image data, so as to enhance the training effect of matching image data with text data.

[0063] In addition, if Figure 4 As shown, the second loss information is the loss information determined by the Triplet Ranking loss function based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result. By constructing the third image-text pair, it is intended to provide a more accurate supervision signal for model training.

[0064] The similarity between the prediction result corresponding to the second image representation and the first prediction result can be used as the result of SoftMargin.

[0065] In addition, the image data contained in the first image-text pair and the second image-text pair include screenshots of a preset website, and the text data contained in the first image-text pair and the second image-text pair include one or more of layout information of the corresponding image data, description information of the content of the image data, content of the image data, and code information corresponding to the content of the image data.

[0066] In practical applications, the specific processing method of the above step S104 can be varied. An optional processing method is provided below, which may specifically include the following: inputting the image data in the first image-text pair and the image data in the second image-text pair into a graphic encoder respectively to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair. The graphic encoder is used to encode the image data or text data to obtain a corresponding representation.

[0067] In addition, the above-mentioned encoding process for the text data in the first image-text pair to obtain the first text representation corresponding to the text data in the first image-text pair can be varied. An optional processing method is provided below, which may specifically include the following: inputting the text data in the first image-text pair into a graphic-text encoder to obtain the first text representation corresponding to the text data in the first image-text pair.

[0068] Among them, the image and text encoder can be an encoder built based on the CLIP model, the image and text encoder can be an encoder built based on a preset large prediction model, etc., which can be set specifically according to actual conditions, and the embodiments of this specification do not limit this.

[0069] The embodiment of the present specification provides a method for processing a model, by obtaining a first image-text pair that matches each other and a second image-text pair with noise, encoding the image data in the first image-text pair and the image data in the second image-text pair respectively, obtaining a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, then inputting the first image representation and the second image representation into a target model respectively, obtaining a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation, obtaining a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and inputting the first image representation and the second image representation into a target model respectively, obtaining a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold, and The first text data in the pair is used as the text data that matches the image data in the second image-text pair to obtain a third image-text pair. Finally, based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result, the target model is trained to obtain a trained target model. In this way, the image data in the noisy image-text pair is assigned as accurate text data (or pseudo-title) as possible, so that the model can be optimized to a better direction through effective supervision information. Moreover, by directly assigning corresponding text data to the image data in the noisy image-text pair, the learning of the target model for the first image-text pair that matches each other can be made more stable.

[0070] like Figure 5 As shown, an embodiment of this specification provides a method for processing a model, and the execution subject of the method may be a terminal device or a server, etc., wherein the terminal device may be a mobile terminal device such as a mobile phone, a tablet computer, or a computer device such as a laptop or a desktop computer, or an IoT device (specifically a smart watch, a vehicle-mounted device, etc.), etc., wherein the server may be an independent server, or a server cluster composed of multiple servers, etc., and the server may be a background server for a financial service or an online shopping service, or a background server for an application, etc. In this embodiment, a detailed description is given by taking the execution subject as a server as an example. For the case where the execution subject is a terminal device, please refer to the following server case processing, which will not be repeated here. The method may specifically include the following steps:

[0071] In step S502, a first image-text pair that matches each other and a second image-text pair with noise are obtained.

[0072] The specific processing method of the above step S502 can refer to the above related content and will not be repeated here.

[0073] It should be noted that, in the above embodiment, there is only one target model for predicting graphic data, while in the present embodiment, there is a multimodal model. The multimodal model not only includes a prediction sub-model having the same function or role as the above target model for predicting graphic data, but also includes a graphic encoding sub-model for encoding image data and text data, that is, the multimodal model includes a graphic encoding sub-model and a prediction sub-model. For details, please refer to the following content.

[0074] In step S504, the image data in the first image-text pair and the image data in the second image-text pair are respectively input into the image-text coding sub-model in the multimodal model to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair. The image-text coding sub-model is used to encode the image data or text data to obtain the corresponding representation.

[0075] In implementation, the above-mentioned image-text coding sub-model has the same role or function as the encoder or image-text encoder in the aforementioned content. The construction method and training method of the image-text coding sub-model can refer to the construction method and training method of the aforementioned encoder or image-text encoder, that is, the image-text coding sub-model can be pre-set according to actual conditions. The image-text coding sub-model can be constructed by a neural network, or by a specified feature extraction algorithm, etc. Then, the image-text coding sub-model can be trained or fine-tuned using training samples to obtain a trained image-text coding sub-model, or the trained or constructed image-text coding sub-model can be directly used. The specific setting can be based on actual conditions, and the embodiments of this specification do not limit this. The image data in the first image-text pair and the image data in the second image-text pair can be encoded and processed by the above-mentioned image-text coding sub-model to obtain the corresponding image representation.

[0076] In step S506, the first image representation and the second image representation are respectively input into the prediction sub-model in the multimodal model to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation.

[0077] In implementation, the above-mentioned prediction sub-model has the same role or function as the target model in the aforementioned content. The construction method and training method of the prediction sub-model can refer to the construction method and training method of the aforementioned target model, that is, the prediction sub-model can be a model that predicts the result of the corresponding image data through the input image representation. The prediction sub-model can be constructed by a machine learning network model such as a neural network, or it can be constructed by a classification algorithm or a regression algorithm. In practical applications, the prediction sub-model can also be a preset large language model, etc., which can be set specifically according to actual conditions. The prediction sub-model can analyze the input image representation, determine the semantic information of the image data corresponding to the image representation, and then obtain text data corresponding to the determined semantic information, etc., and the obtained text data and other related data can be used as the prediction result. The above-mentioned prediction sub-model can be used to predict the results of the first image representation and the second image representation to obtain the corresponding prediction result.

[0078] In step S508, a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold is obtained from the prediction results corresponding to the first image representation, and the first text data in the first image-text pair corresponding to the first prediction result is used as text data that matches the image data in the second image-text pair to obtain a third image-text pair.

[0079] The specific processing method of the above step S508 can refer to the above related content and will not be repeated here.

[0080] In step S510, the multimodal model is trained based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained multimodal model.

[0081] The specific processing method of the above step S510 can refer to the above related content and will not be repeated here.

[0082] In practical applications, the prediction sub-model may also be trained using the two types of loss information. For details, see the processing of the following steps A2 and A4.

[0083] In step A2, the text data in the first image-text pair is input into the image-text encoding sub-model for encoding processing to obtain a first text representation corresponding to the text data in the first image-text pair.

[0084] In step A4, the first text representation is input into the prediction sub-model to obtain a prediction result corresponding to the first text representation.

[0085] The specific processing methods of the above steps A2 and A4 can refer to the above related content and will not be repeated here.

[0086] Based on the processing of the above steps A2 and A4, the specific processing of the above step S510 may include: using the prediction result corresponding to the first text representation as the label information corresponding to the image data in the first image-text pair, determining the first loss information based on the label information and the prediction result corresponding to the first image representation, and determining the second loss information based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result, and performing model training on the multimodal model based on the first loss information and the second loss information to obtain the trained multimodal model.

[0087] The above-mentioned specific processing method can be found in the above-mentioned related content, which will not be repeated here.

[0088] In practical applications, the above-mentioned model training is performed on the target model based on the first loss information and the second loss information, and the specific processing methods for obtaining the trained target model can be various. An optional processing method is provided below, which may specifically include: based on the first loss information and the second loss information, and the similarity between the prediction result corresponding to the second image representation and the first prediction result, the multimodal model is trained to obtain the trained multimodal model.

[0089] The above-mentioned specific processing method can be found in the above-mentioned related content, which will not be repeated here.

[0090] The first loss information is loss information determined by a cross entropy loss function based on the prediction result corresponding to the above-mentioned label information and the first image representation.

[0091] Among them, the second loss information is loss information determined by the Triplet Ranking loss function based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result.

[0092] In actual applications, the image data contained in the first image-text pair and the second image-text pair include screenshots of a preset website, and the text data contained in the first image-text pair and the second image-text pair include one or more of the layout information of the corresponding image data, description information of the content of the image data, the content of the image data, and code information corresponding to the content of the image data.

[0093] The embodiment of the present specification provides a model processing method, by obtaining a mutually matching first image-text pair and a second image-text pair with noise, respectively inputting the image data in the first image-text pair and the image data in the second image-text pair into a picture-text encoding submodel in a multimodal model, obtaining a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, the picture-text encoding submodel is used to encode the image data or the text data to obtain corresponding representations, then respectively inputting the first image representation and the second image representation into a prediction submodel in the multimodal model, obtaining a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation, obtaining a prediction result corresponding to the first image representation from the prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation whose similarity is greater than a preset threshold The first prediction result of the value is obtained, and the first text data in the first image-text pair corresponding to the first prediction result is used as the text data that matches the image data in the second image-text pair to obtain a third image-text pair. Finally, the multimodal model can be trained based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained multimodal model. In this way, the image data in the image-text pair with noise is assigned as accurate text data (or pseudo-title) as possible, so that the model can be optimized to a better direction through effective supervision information. Moreover, by directly assigning corresponding text data to the image data in the image-text pair with noise, the learning of the target model for the first image-text pair that matches each other can be made more stable.

[0094] The above is a processing method for a model provided in the embodiment of this specification. Based on the same idea, the embodiment of this specification also provides a processing device for a model, such as Figure 6 shown.

[0095] The processing device of the model includes: a data pair acquisition module 601, a characterization determination module 602, a prediction module 603, a data processing module 604 and a training module 605, wherein:

[0096] A data pair acquisition module 601 acquires a first image-text pair that matches each other and a second image-text pair with noise;

[0097] The representation determination module 602 performs encoding processing on the image data in the first image-text pair and the image data in the second image-text pair to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair;

[0098] A prediction module 603, inputting the first image representation and the second image representation into a target model respectively, to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation;

[0099] The data processing module 604 obtains a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and uses the first text data in the first image-text pair corresponding to the first prediction result as text data that matches the image data in the second image-text pair to obtain a third image-text pair;

[0100] The training module 605 performs model training on the target model based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained target model.

[0101] In the embodiment of this specification, the device further includes:

[0102] A text encoding module, encoding the text data in the first image-text pair to obtain a first text representation corresponding to the text data in the first image-text pair;

[0103] A text prediction module, inputting the first text representation into the target model to obtain a prediction result corresponding to the first text representation;

[0104] The training module 605 uses the prediction result corresponding to the first text representation as the label information corresponding to the image data in the first image-text pair, determines first loss information based on the label information and the prediction result corresponding to the first image representation, determines second loss information based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result, and performs model training on the target model based on the first loss information and the second loss information to obtain a trained target model.

[0105] In the embodiment of the present specification, the training module 605 performs model training on the target model based on the first loss information and the second loss information, and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained target model.

[0106] In the embodiment of the present specification, the first loss information is loss information determined by a cross entropy loss function based on the prediction result corresponding to the label information and the first image representation.

[0107] In an embodiment of the present specification, the second loss information is loss information determined by a triplet ranking loss function based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result.

[0108] In an embodiment of the present specification, the image data contained in the first image-text pair and the second image-text pair include screenshots of a preset website, and the text data contained in the first image-text pair and the second image-text pair include one or more of layout information of the corresponding image data, description information of the content of the image data, content of the image data, and code information corresponding to the content of the image data.

[0109] In the embodiment of the present specification, the representation determination module 605 inputs the image data in the first image-text pair and the image data in the second image-text pair into a graphic encoder to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, and the graphic encoder is used to encode the image data or the text data to obtain the corresponding representation; and / or,

[0110] The text encoding module inputs the text data in the first image-text pair into the image-text encoder to obtain a first text representation corresponding to the text data in the first image-text pair.

[0111] The embodiment of the present specification provides a model processing device, which obtains a first image-text pair that matches each other and a second image-text pair with noise, and respectively encodes the image data in the first image-text pair and the image data in the second image-text pair to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, and then respectively inputs the first image representation and the second image representation into a target model to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation, obtains a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and encodes the first image text corresponding to the first prediction result. The first text data in the pair is used as the text data that matches the image data in the second image-text pair to obtain a third image-text pair. Finally, based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result, the target model is trained to obtain a trained target model. In this way, the image data in the noisy image-text pair is assigned as accurate text data (or pseudo-title) as possible, so that the model can be optimized to a better direction through effective supervision information. Moreover, by directly assigning corresponding text data to the image data in the noisy image-text pair, the learning of the target model for the first image-text pair that matches each other can be made more stable.

[0112] Based on the same idea, the embodiment of this specification also provides a model processing device, such as Figure 7 shown.

[0113] The processing device of the model includes: a data pair acquisition module 701, a first model processing module 702, a second model processing module 703, a data processing module 704 and a training module 705, wherein:

[0114] A data pair acquisition module 701 acquires a first image-text pair that matches each other and a second image-text pair with noise;

[0115] The first model processing module 702 inputs the image data in the first image-text pair and the image data in the second image-text pair into the image-text encoding submodel in the multimodal model, respectively, to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, wherein the image-text encoding submodel is used to encode the image data or the text data to obtain the corresponding representation;

[0116] A second model processing module 703, inputting the first image representation and the second image representation into a prediction sub-model in a multimodal model, respectively, to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation;

[0117] The data processing module 704 obtains a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and uses the first text data in the first image-text pair corresponding to the first prediction result as text data that matches the image data in the second image-text pair to obtain a third image-text pair;

[0118] The training module 705 performs model training on the multimodal model based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result, to obtain a trained multimodal model.

[0119] In the embodiment of this specification, the device further includes:

[0120] A text encoding module, encoding the text data in the first image-text pair to obtain a first text representation corresponding to the text data in the first image-text pair;

[0121] A text prediction module, inputting the first text representation into the target model to obtain a prediction result corresponding to the first text representation;

[0122] The training module 705 uses the prediction result corresponding to the first text representation as the label information corresponding to the image data in the first image-text pair, determines first loss information based on the label information and the prediction result corresponding to the first image representation, determines second loss information based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result, and performs model training on the target model based on the first loss information and the second loss information to obtain a trained target model.

[0123] In the embodiment of the present specification, the training module 705 performs model training on the target model based on the first loss information and the second loss information, and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained target model.

[0124] In the embodiment of the present specification, the first loss information is loss information determined by a cross entropy loss function based on the prediction result corresponding to the label information and the first image representation.

[0125] In an embodiment of the present specification, the second loss information is loss information determined by a triplet ranking loss function based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result.

[0126] In an embodiment of the present specification, the image data contained in the first image-text pair and the second image-text pair include screenshots of a preset website, and the text data contained in the first image-text pair and the second image-text pair include one or more of layout information of the corresponding image data, description information of the content of the image data, content of the image data, and code information corresponding to the content of the image data.

[0127] The embodiment of the present specification provides a model processing device, which obtains a first image-text pair that matches each other and a second image-text pair with noise, and inputs the image data in the first image-text pair and the image data in the second image-text pair into a picture-text coding sub-model in a multimodal model respectively, to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, the picture-text coding sub-model is used to encode the image data or the text data to obtain a corresponding representation, and then, inputs the first image representation and the second image representation into a prediction sub-model in the multimodal model respectively, to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation, and obtains from the prediction result corresponding to the first image representation a prediction result corresponding to the second image representation whose similarity is greater than a preset threshold The first prediction result of the value is obtained, and the first text data in the first image-text pair corresponding to the first prediction result is used as the text data that matches the image data in the second image-text pair to obtain a third image-text pair. Finally, the multimodal model can be trained based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained multimodal model. In this way, the image data in the image-text pair with noise is assigned as accurate text data (or pseudo-title) as possible, so that the model can be optimized to a better direction through effective supervision information. Moreover, by directly assigning corresponding text data to the image data in the image-text pair with noise, the learning of the target model for the first image-text pair that matches each other can be made more stable.

[0128] The above is a processing device for a model provided in the embodiment of this specification. Based on the same idea, the embodiment of this specification also provides a processing device for a model, such as Figure 8 shown.

[0129] The processing device of the model may provide a terminal device or a server, etc. for the above-mentioned embodiment.

[0130] The processing device of the model may have relatively large differences due to different configurations or performances, and may include one or more processors 801 and memory 802, and one or more storage applications or data may be stored in the memory 802. Among them, the memory 802 may be a short-term storage or a persistent storage. The application stored in the memory 802 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the processing device of the model. Furthermore, the processor 801 may be configured to communicate with the memory 802, and execute a series of computer executable instructions in the memory 802 on the processing device of the model. The processing device of the model may also include one or more power supplies 803, one or more wired or wireless network interfaces 804, one or more input and output interfaces 805, and one or more keyboards 806.

[0131] Specifically in this embodiment, the processing device of the model includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the processing device of the model, and the one or more programs are configured to be executed by one or more processors, including computer executable instructions for performing the following:

[0132] Acquire a first image-text pair and a second image-text pair with noise that match each other;

[0133] Encoding the image data in the first image-text pair and the image data in the second image-text pair respectively to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair;

[0134] Inputting the first image representation and the second image representation into a target model respectively to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation;

[0135] Obtaining a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and using the first text data in the first image-text pair corresponding to the first prediction result as text data that matches the image data in the second image-text pair, to obtain a third image-text pair;

[0136] The target model is trained based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained target model.

[0137] In addition, specifically in this embodiment, the processing device of the model includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the processing device of the model, and the one or more programs configured to be executed by one or more processors include the following computer executable instructions:

[0138] Acquire a first image-text pair and a second image-text pair with noise that match each other;

[0139] Inputting the image data in the first image-text pair and the image data in the second image-text pair into an image-text encoding submodel in a multimodal model respectively, obtaining a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, wherein the image-text encoding submodel is used to encode the image data or the text data to obtain corresponding representations;

[0140] Inputting the first image representation and the second image representation into a prediction sub-model in a multimodal model respectively, to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation;

[0141] Obtaining a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and using the first text data in the first image-text pair corresponding to the first prediction result as text data that matches the image data in the second image-text pair, to obtain a third image-text pair;

[0142] The multimodal model is trained based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained multimodal model.

[0143] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the processing device embodiment of the model, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0144] The embodiment of the present specification provides a model processing device, which obtains a first image-text pair that matches each other and a second image-text pair with noise, and respectively encodes the image data in the first image-text pair and the image data in the second image-text pair to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, and then respectively inputs the first image representation and the second image representation into a target model to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation, obtains a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and encodes the first image text corresponding to the first prediction result. The first text data in the pair is used as the text data that matches the image data in the second image-text pair to obtain a third image-text pair. Finally, based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result, the target model is trained to obtain a trained target model. In this way, the image data in the noisy image-text pair is assigned as accurate text data (or pseudo-title) as possible, so that the model can be optimized to a better direction through effective supervision information. Moreover, by directly assigning corresponding text data to the image data in the noisy image-text pair, the learning of the target model for the first image-text pair that matches each other can be made more stable.

[0145] Furthermore, based on the above Figures 1 to 5 In one embodiment, the present specification further provides a storage medium for storing computer executable instruction information. In a specific embodiment, the storage medium may be a USB flash drive, an optical disk, a hard disk, etc. When the computer executable instruction information stored in the storage medium is executed by the processor, the following process can be implemented:

[0146] Acquire a first image-text pair and a second image-text pair with noise that match each other;

[0147] Encoding the image data in the first image-text pair and the image data in the second image-text pair respectively to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair;

[0148] Inputting the first image representation and the second image representation into a target model respectively to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation;

[0149] Obtaining a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and using the first text data in the first image-text pair corresponding to the first prediction result as text data that matches the image data in the second image-text pair, to obtain a third image-text pair;

[0150] The target model is trained based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained target model.

[0151] In addition, in another specific embodiment, the storage medium may be a USB flash drive, an optical disk, a hard disk, etc., and the computer executable instruction information stored in the storage medium can implement the following process when executed by the processor:

[0152] Acquire a first image-text pair and a second image-text pair with noise that match each other;

[0153] Inputting the image data in the first image-text pair and the image data in the second image-text pair into an image-text encoding submodel in a multimodal model respectively, obtaining a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, wherein the image-text encoding submodel is used to encode the image data or the text data to obtain corresponding representations;

[0154] Inputting the first image representation and the second image representation into a prediction sub-model in a multimodal model respectively, to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation;

[0155] Obtaining a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and using the first text data in the first image-text pair corresponding to the first prediction result as text data that matches the image data in the second image-text pair, to obtain a third image-text pair;

[0156] The multimodal model is trained based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained multimodal model.

[0157] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the above-mentioned storage medium embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0158] The embodiment of the present specification provides a storage medium, which obtains a first image-text pair that matches each other and a second image-text pair with noise, and respectively encodes the image data in the first image-text pair and the image data in the second image-text pair to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, and then respectively inputs the first image representation and the second image representation into a target model to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation, obtains a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and encodes the first image representation corresponding to the first image-text pair. The first text data is used as the text data that matches the image data in the second image-text pair to obtain a third image-text pair. Finally, based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result, the target model is trained to obtain the trained target model. In this way, the image data in the noisy image-text pair is assigned as accurate text data (or pseudo-title) as possible, so that the model can be optimized to a better direction through effective supervision information. Moreover, by directly assigning corresponding text data to the image data in the noisy image-text pair, the learning of the target model for the first image-text pair that matches each other can be made more stable.

[0159] Furthermore, based on the above Figures 1 to 5 In one or more embodiments of the present specification, a computer program product is provided, including a computer program. When the computer program in the computer program product is executed by a processor, the following process can be implemented:

[0160] Acquire a first image-text pair and a second image-text pair with noise that match each other;

[0161] Encoding the image data in the first image-text pair and the image data in the second image-text pair respectively to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair;

[0162] Inputting the first image representation and the second image representation into a target model respectively to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation;

[0163] Obtaining a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and using the first text data in the first image-text pair corresponding to the first prediction result as text data that matches the image data in the second image-text pair, to obtain a third image-text pair;

[0164] The target model is trained based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained target model.

[0165] In addition, in another specific embodiment, the computer program product includes a computer program, and when the computer program in the computer program product is executed by a processor, it can implement the following process:

[0166] Acquire a first image-text pair and a second image-text pair with noise that match each other;

[0167] Inputting the image data in the first image-text pair and the image data in the second image-text pair into an image-text encoding submodel in a multimodal model respectively, obtaining a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, wherein the image-text encoding submodel is used to encode the image data or the text data to obtain corresponding representations;

[0168] Inputting the first image representation and the second image representation into a prediction sub-model in a multimodal model respectively, to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation;

[0169] Obtaining a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and using the first text data in the first image-text pair corresponding to the first prediction result as text data that matches the image data in the second image-text pair, to obtain a third image-text pair;

[0170] The multimodal model is trained based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained multimodal model.

[0171] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the above-mentioned computer program product embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0172] The embodiment of the present specification provides a computer program product, which obtains a first image-text pair that matches each other and a second image-text pair with noise, and respectively encodes the image data in the first image-text pair and the image data in the second image-text pair to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, and then respectively inputs the first image representation and the second image representation into a target model to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation, obtains a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and encodes the first image text corresponding to the first prediction result. The first text data in the pair is used as the text data that matches the image data in the second image-text pair to obtain a third image-text pair. Finally, based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result, the target model is trained to obtain a trained target model. In this way, the image data in the noisy image-text pair is assigned as accurate text data (or pseudo-title) as possible, so that the model can be optimized to a better direction through effective supervision information. Moreover, by directly assigning corresponding text data to the image data in the noisy image-text pair, the learning of the target model for the first image-text pair that matches each other can be made more stable.

[0173] The above is a description of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0174] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0175] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0176] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0177] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing one or more embodiments of this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0178] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, one or more embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0179] The embodiments of this specification are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable fraud case serial and parallel device to produce a machine, so that the instructions executed by the processor of the computer or other programmable fraud case serial and parallel device generate instructions for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0180] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable fraud case serial and parallel device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0181] These computer program instructions may also be loaded onto a computer or other programmable device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0182] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0183] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0184] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0185] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0186] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, one or more embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0187] One or more embodiments of the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0188] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0189] The above description is only an embodiment of this specification and is not intended to limit this document. For those skilled in the art, this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification should be included in the scope of the claims of this specification.

Claims

1. A method for processing a model, the method comprising: Acquire a first image-text pair and a second image-text pair with noise that match each other; Encoding the image data in the first image-text pair and the image data in the second image-text pair respectively to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair; Inputting the first image representation and the second image representation into a target model respectively to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation; Obtaining a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and using the first text data in the first image-text pair corresponding to the first prediction result as text data that matches the image data in the second image-text pair, to obtain a third image-text pair; The target model is trained based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained target model.

2. The method according to claim 1, further comprising: Encoding the text data in the first image-text pair to obtain a first text representation corresponding to the text data in the first image-text pair; Inputting the first text representation into the target model to obtain a prediction result corresponding to the first text representation; The method of performing model training on the target model based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain the trained target model includes: The prediction result corresponding to the first text representation is used as the label information corresponding to the image data in the first image-text pair, and first loss information is determined based on the label information and the prediction result corresponding to the first image representation. Second loss information is determined based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result. Model training is performed on the target model based on the first loss information and the second loss information to obtain a trained target model.

3. The method according to claim 2, wherein the performing model training on the target model based on the first loss information and the second loss information to obtain the trained target model comprises: Based on the first loss information and the second loss information, and the similarity between the prediction result corresponding to the second image representation and the first prediction result, the target model is trained to obtain a trained target model.

4. According to the method of claim 2, the first loss information is loss information determined by a cross entropy loss function based on the prediction result corresponding to the label information and the first image representation.

5. According to the method of claim 3, the second loss information is loss information determined by a triplet ranking loss function based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result.

6. According to the method of claim 1, the image data contained in the first image-text pair and the second image-text pair include screenshots of a preset website, and the text data contained in the first image-text pair and the second image-text pair include one or more of layout information of the corresponding image data, description information of the content of the image data, content of the image data, and code information corresponding to the content of the image data.

7. The method according to claim 6, wherein encoding the image data in the first image-text pair and the image data in the second image-text pair to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair comprises: inputting the image data in the first image-text pair and the image data in the second image-text pair into a graphic-text encoder respectively, obtaining a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, wherein the graphic-text encoder is used to encode the image data or the text data to obtain the corresponding representation; and / or, The encoding process of the text data in the first image-text pair to obtain a first text representation corresponding to the text data in the first image-text pair includes: The text data in the first image-text pair is input into the image-text encoder to obtain a first text representation corresponding to the text data in the first image-text pair.

8. A method for processing a model, the method comprising: Acquire a first image-text pair and a second image-text pair with noise that match each other; Inputting the image data in the first image-text pair and the image data in the second image-text pair into an image-text encoding submodel in a multimodal model respectively, obtaining a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, wherein the image-text encoding submodel is used to encode the image data or the text data to obtain corresponding representations; Inputting the first image representation and the second image representation into a prediction sub-model in a multimodal model respectively, to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation; Obtaining a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and using the first text data in the first image-text pair corresponding to the first prediction result as text data that matches the image data in the second image-text pair, to obtain a third image-text pair; The multimodal model is trained based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained multimodal model.

9. A model processing device, the device comprising: A data pair acquisition module, acquiring a first image-text pair that matches each other and a second image-text pair with noise; a representation determination module, which performs encoding processing on the image data in the first image-text pair and the image data in the second image-text pair, respectively, to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair; A prediction module, inputting the first image representation and the second image representation into a target model respectively, to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation; a data processing module, which obtains a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and uses the first text data in the first image-text pair corresponding to the first prediction result as text data that matches the image data in the second image-text pair, to obtain a third image-text pair; A training module performs model training on the target model based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained target model.

10. A model processing device, the device comprising: A data pair acquisition module, acquiring a first image-text pair that matches each other and a second image-text pair with noise; a first model processing module, inputting the image data in the first image-text pair and the image data in the second image-text pair into an image-text encoding submodel in a multimodal model, respectively, to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, wherein the image-text encoding submodel is used to encode the image data or the text data to obtain corresponding representations; a second model processing module, inputting the first image representation and the second image representation into a prediction sub-model in a multimodal model, respectively, to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation; a data processing module, which obtains a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and uses the first text data in the first image-text pair corresponding to the first prediction result as text data that matches the image data in the second image-text pair, to obtain a third image-text pair; A training module performs model training on the multimodal model based on the similarity between the image data and the text data in the third image-text pair, and the similarity between the prediction result corresponding to the second image representation and the first prediction result, to obtain a trained multimodal model.

11. A model processing device, the model processing device comprising: processor; as well as a memory arranged to store computer executable instructions which, when executed, cause the processor to: Acquire a first image-text pair and a second image-text pair with noise that match each other; Encoding the image data in the first image-text pair and the image data in the second image-text pair respectively to obtain a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair; Inputting the first image representation and the second image representation into a target model respectively to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation; Obtaining a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and using the first text data in the first image-text pair corresponding to the first prediction result as text data that matches the image data in the second image-text pair, to obtain a third image-text pair; The target model is trained based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained target model.

12. A model processing device, the model processing device comprising: processor; as well as a memory arranged to store computer executable instructions which, when executed, cause the processor to: Acquire a first image-text pair and a second image-text pair with noise that match each other; Inputting the image data in the first image-text pair and the image data in the second image-text pair into an image-text encoding submodel in a multimodal model respectively, obtaining a first image representation corresponding to the image data in the first image-text pair and a second image representation corresponding to the image data in the second image-text pair, wherein the image-text encoding submodel is used to encode the image data or the text data to obtain corresponding representations; Inputting the first image representation and the second image representation into a prediction sub-model in a multimodal model respectively, to obtain a prediction result corresponding to the first image representation and a prediction result corresponding to the second image representation; Obtaining a first prediction result whose similarity with the prediction result corresponding to the second image representation is greater than a preset threshold from the prediction result corresponding to the first image representation, and using the first text data in the first image-text pair corresponding to the first prediction result as text data that matches the image data in the second image-text pair, to obtain a third image-text pair; The multimodal model is trained based on the similarity between the image data and the text data in the third image-text pair and the similarity between the prediction result corresponding to the second image representation and the first prediction result to obtain a trained multimodal model.

Citation Information

Patent Citations

  • Image text matching method and device, electronic equipment and storage medium

    CN112926671A

  • Text parallel sentence pair extraction method based on image-text multi-mode gating enhancement

    CN115017884A

  • Model optimization method and device, equipment, storage medium and program product

    CN115129908A

  • Cross-modal matching method and related device, electronic equipment and storage medium

    CN115270754A

  • Model processing method, device and equipment

    CN116662998A