Object characterization model training method, object characterization method and related equipment

By integrating the encoding and feature interaction of multi-modal data in the object representation model, the problem of poor accuracy in cross-domain object representation is solved, achieving consistent representation of objects in different domains and improving the accuracy of downstream tasks.

CN118733839AActive Publication Date: 2024-10-01RENMIN UNIVERSITY OF CHINA +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410840853.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-10-01
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

The cross-domain object representation learning method in the existing technology cannot unify the object representation of an object in different domains, resulting in poor accuracy of cross-domain object representation, and thus incorrect matching in downstream tasks.

Method used

By acquiring multi-modal data of each sample object in different domains, including object image data and description text, inputting it into the encoding network for encoding processing, multi-modal encoding features are obtained, and multi-modal feature interaction is performed through the feature interaction network to generate Multi-modal global features, based on these features, perform machine learning training on the object representation model, integrate domain-level visual global features and text-level global features, and improve the consistency of object representation.

Benefits of technology

It improves the accuracy of cross-domain object representation, enhances the accuracy of downstream cross-domain tasks, and ensures the consistency of object representation in different domains.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733839A_ABST
    Figure CN118733839A_ABST
Patent Text Reader

Abstract

The invention relates to an object characterization model training method, an object characterization method and related equipment. The method comprises the following steps: acquiring multi-modal data of each sample object in different domains; the multi-modal data of the sample object in each domain comprises object image data and an object description text corresponding to the sample object; inputting the multi-modal data of the sample object in each domain into a coding network of a to-be-trained object representation model for coding processing to obtain a multi-modal coding feature of the sample object in each domain; inputting the multi-modal coding features of the sample object in each domain into a feature interaction network of a to-be-trained object representation model to perform multi-modal feature interaction of each domain, and obtaining multi-modal global features of the sample object in each domain; and performing machine learning training on a to-be-trained object characterization model based on the multi-modal global features of each sample object in different domains to obtain a trained object characterization model. According to the invention, the accuracy of cross-domain object representation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to an object representation model training method, an object representation method, and related devices. Background Art

[0002] With the development of the Internet, the content of e-commerce is becoming more and more rich and multimedia. A specific object can be displayed in multiple forms (domains) on the e-commerce platform, such as product details page, short video, live broadcast, etc. Therefore, a unified, vectorized cross-domain object representation is crucial for downstream tasks of the e-commerce platform (such as cross-domain retrieval, cross-domain personalized recommendation, etc.). Among them, cross-domain object representation means that the vectorized representation of multimedia data of the same object in different domains should be as similar as possible. For example, the vectorized representation of the product details page of object A should be as similar as possible to the vectorized representation of the short video of object A, so that the short video of object A can be recommended based on the vectorized representation of the product details page of object A.

[0003] However, the cross-domain object representation learning method in the related art cannot unify the object representation of an object in different domains, that is, the accuracy of the cross-domain object representation is poor, which leads to mismatching when the object representation in the related art is used in downstream cross-domain tasks. Summary of the invention

[0004] The present disclosure provides an object representation model training method, an object representation method and related devices to at least solve the problem in the related art that the object representation of an object in different domains cannot be unified, that is, the accuracy of cross-domain object representation is poor. The technical solution of the present disclosure is as follows:

[0005] According to a first aspect of an embodiment of the present disclosure, there is provided an object representation model training method, comprising:

[0006] Acquire multimodal data of each sample object in different domains; the multimodal data of the sample object in each domain includes object image data and object description text corresponding to the sample object;

[0007] Inputting the multimodal data of the sample object in each of the domains into the encoding network of the object representation model to be trained for encoding processing, thereby obtaining the multimodal encoding features of the sample object in each of the domains;

[0008] Inputting the multimodal encoding features of the sample object in each of the domains into the feature interaction network of the object representation model to be trained respectively to perform multimodal feature interaction in each of the domains, so as to obtain the multimodal global features of the sample object in each of the domains;

[0009] Based on the multimodal global features of each of the sample objects in different domains, machine learning training is performed on the object representation model to be trained to obtain a trained object representation model.

[0010] In some exemplary embodiments, the step of inputting the multimodal data of the sample object in each of the domains into the encoding network of the object representation model to be trained for encoding processing to obtain the multimodal encoding features of the sample object in each of the domains includes:

[0011] For the multimodal data of the sample object in each of the domains, inputting the object image data in the multimodal data into the visual encoding subnetwork of the encoding network for visual encoding processing to obtain an image visual feature sequence;

[0012] Performing feature averaging processing on the image visual features in the image visual feature sequence to obtain domain visual features of the domain; splicing the domain visual features with the image visual feature sequence to obtain a visual feature sequence;

[0013] Inputting a text unit sequence corresponding to the object description text in the multimodal data into the text encoding subnetwork of the encoding network for text encoding processing to obtain a text feature sequence; the text unit sequence includes a plurality of text units obtained by dividing the object description text and an added preset identification unit;

[0014] The visual feature sequence and the text feature sequence are concatenated to obtain a multimodal encoding feature of the sample object in the domain.

[0015] In some exemplary embodiments, the step of inputting the multimodal encoding features of the sample object in each of the domains into the feature interaction network of the object representation model to be trained to perform multimodal feature interaction in each of the domains to obtain the multimodal global features of the sample object in each of the domains includes:

[0016] For the multimodal coding features of the sample object in each of the domains, the multimodal coding features are input into the feature interaction network, and the multimodal coding features are subjected to feature interaction based on a self-attention mechanism by the feature interaction network to obtain multimodal interaction features output by the feature interaction network;

[0017] Acquire feature data located at a position corresponding to the domain visual feature in the multimodal interaction feature to obtain a domain-level global feature;

[0018] Acquire feature data located at a position corresponding to the preset identification unit in the multimodal interaction feature to obtain a text-level global feature;

[0019] Based on the feature sum between the domain-level global feature and the text-level global feature, a multimodal global feature of the sample object in the domain is obtained.

[0020] In some exemplary embodiments, the different domains include video domains of different video types, and obtaining multimodal data of each sample object in different domains includes:

[0021] For each video domain of a video type, obtaining sample video data of each sample object in the video domain;

[0022] For each sample video data of the sample object in the video domain, frame sampling is performed on the sample video data to obtain object image data of the sample object in the video domain;

[0023] Performing speech recognition processing on the sample video data to obtain speech recognition text; inputting the speech recognition text and a preset text prompt into a text summarization model, and performing text summarization processing on the speech recognition text according to the preset text prompt by the text summarization model to obtain a corresponding object description text;

[0024] The preset text prompt is used to instruct to perform the text summarization task according to the summary example, and the summary example represents outputting key object information of objects in the example text according to a specified format.

[0025] In some exemplary embodiments, performing machine learning training on the object representation model to be trained based on the multimodal global features of each of the sample objects in different domains to obtain the trained object representation model includes:

[0026] Determining a cross-domain contrastive learning loss based on the multimodal global features of each of the sample objects in different domains;

[0027] Performing category prediction processing on the multimodal global features of each of the sample objects in each of the domains to obtain a predicted category of each of the sample objects in each of the domains;

[0028] Determining a cross-domain object classification loss based on the predicted category of each of the sample objects in each of the domains;

[0029] A loss sum between the cross-domain contrastive learning loss and the cross-domain object classification loss is determined, and machine learning training is performed on the object representation model to be trained based on the loss sum to obtain the trained object representation model.

[0030] In some exemplary embodiments, determining the cross-domain contrastive learning loss based on the multimodal global features of each of the sample objects in different domains includes:

[0031] Based on the number of the different domains, determining a plurality of cross-domain pairs; each of the cross-domain pairs includes two different domains;

[0032] For each of the cross-domain pairs, based on the multimodal global features of the same sample object corresponding to the cross-domain pair, a cross-domain positive sample corresponding to the cross-domain pair is constructed; based on the multimodal global features of different sample objects corresponding to the cross-domain pair, a cross-domain negative sample corresponding to the cross-domain pair is constructed;

[0033] Determine a sub-cross-domain contrastive learning loss of each cross-domain pair based on the cross-domain positive sample and the cross-domain negative sample of each cross-domain pair;

[0034] Determine statistical values ​​of sub-cross-domain contrastive learning losses of the multiple cross-domain pairs to obtain the cross-domain contrastive learning loss.

[0035] In some exemplary embodiments, determining the cross-domain object classification loss based on the predicted category of each sample object in each domain includes:

[0036] Determining an object classification loss for each of the domains based on a difference between a predicted category of each of the sample objects in each of the domains and a reference category of the sample object in the domain;

[0037] Determine the statistical value of the object classification loss of the different domains to obtain the cross-domain object classification loss.

[0038] According to a second aspect of an embodiment of the present disclosure, there is provided an object characterization method, including:

[0039] Acquire target multimodal data of a target object in a target domain; the target multimodal data includes target object image data and target object description text corresponding to the target object;

[0040] Inputting the target multimodal data into the encoding network of the object representation model for encoding processing to obtain target multimodal encoding features;

[0041] Inputting the target multimodal encoding features into the feature interaction network of the object representation model to perform multimodal feature interaction, thereby obtaining the target multimodal global features of the target object in the target domain;

[0042] The object representation model is trained based on the object representation model training method described in any one of the aforementioned embodiments of the present disclosure.

[0043] In some exemplary embodiments, the target domain includes a video domain of a target video type, and acquiring target multimodal data of the target object in the target domain includes:

[0044] Obtain target video data of a target object in a video domain of a target video type;

[0045] Performing frame sampling on the target video data to obtain the target object image data;

[0046] The target video data is subjected to speech recognition processing to obtain a target speech recognition text; the target speech recognition text and the preset text prompt are input into a text summarization model, and the target speech recognition text is subjected to text summarization processing according to the preset text prompt by the text summarization model to obtain the target object description text.

[0047] In some exemplary embodiments, the method further comprises:

[0048] Acquire a target multimodal global feature of an object to be processed in the target domain; the target object includes the object to be processed;

[0049] Based on the matching degree between each to-be-matched multimodal global feature in the to-be-matched domain and the target multimodal global feature, determining a candidate object corresponding to the to-be-matched multimodal global feature whose matching degree meets a preset screening condition;

[0050] A matching result is generated based on the data of the candidate object in the to-be-matched domain.

[0051] According to a third aspect of an embodiment of the present disclosure, there is provided an object representation model training device, comprising:

[0052] A multimodal data acquisition unit is configured to acquire multimodal data of each sample object in different domains; the multimodal data of the sample object in each domain includes object image data and object description text corresponding to the sample object;

[0053] A first encoding processing unit is configured to perform encoding processing by respectively inputting the multimodal data of the sample object in each of the domains into the encoding network of the object representation model to be trained, so as to obtain the multimodal encoding features of the sample object in each of the domains;

[0054] a multimodal feature interaction unit, configured to perform multimodal feature interaction of each domain by inputting the multimodal encoding features of the sample object in each domain into the feature interaction network of the object representation model to be trained, so as to obtain the multimodal global features of the sample object in each domain;

[0055] The training unit is configured to perform machine learning training on the object representation model to be trained based on the multimodal global features of each of the sample objects in different domains to obtain a trained object representation model.

[0056] In some exemplary embodiments, the first encoding processing unit includes:

[0057] A visual encoding unit is configured to perform visual encoding processing on the multimodal data of the sample object in each of the domains, input the object image data in the multimodal data into the visual encoding subnetwork of the encoding network to obtain an image visual feature sequence;

[0058] a visual feature sequence determination unit configured to perform feature averaging processing on the image visual features in the image visual feature sequence to obtain domain visual features of the domain; and to concatenate the domain visual features with the image visual feature sequence to obtain a visual feature sequence;

[0059] A text feature sequence determination unit is configured to input a text unit sequence corresponding to the object description text in the multimodal data into a text encoding subnetwork of the encoding network for text encoding processing to obtain a text feature sequence; the text unit sequence includes a plurality of text units obtained by dividing the object description text and an added preset identification unit;

[0060] The first feature concatenation unit is configured to concatenate the visual feature sequence and the text feature sequence to obtain a multimodal encoding feature of the sample object in the domain.

[0061] In some exemplary embodiments, the multimodal feature interaction unit includes:

[0062] An interaction unit is configured to execute multimodal coding features of the sample object in each of the domains, input the multimodal coding features into the feature interaction network, perform feature interaction on the multimodal coding features based on a self-attention mechanism through the feature interaction network, and obtain multimodal interaction features output by the feature interaction network;

[0063] A first acquisition unit is configured to acquire feature data located at a position corresponding to the domain visual feature in the multimodal interaction feature to obtain a domain-level global feature;

[0064] A second acquisition unit is configured to acquire feature data located at a position corresponding to the preset identification unit in the multimodal interaction feature to obtain a text-level global feature;

[0065] The feature summing unit is configured to perform feature summation based on the domain-level global feature and the text-level global feature to obtain the multimodal global feature of the sample object in the domain.

[0066] In some exemplary embodiments, the different domains include video domains of different video types, and the multimodal data acquisition unit includes:

[0067] A sample video acquisition unit is configured to acquire sample video data of each sample object in the video domain for each video type;

[0068] A frame sampling unit is configured to perform frame sampling on the sample video data of each sample object in the video domain to obtain object image data of the sample object in the video domain;

[0069] The speech-to-text summarizing unit is configured to perform speech recognition processing on the sample video data to obtain speech recognition text; input the speech recognition text and a preset text prompt into a text summarizing model, and perform text summarizing processing on the speech recognition text according to the preset text prompt through the text summarizing model to obtain a corresponding object description text;

[0070] The preset text prompt is used to instruct to perform the text summarization task according to the summary example, and the summary example represents outputting key object information of objects in the example text according to a specified format.

[0071] In some exemplary embodiments, the training unit includes:

[0072] A cross-domain contrastive learning loss determination unit is configured to determine a cross-domain contrastive learning loss based on the multimodal global features of each of the sample objects in different domains;

[0073] A category prediction unit is configured to perform category prediction processing on the multimodal global features of each sample object in each domain to obtain a predicted category of each sample object in each domain;

[0074] A cross-domain object classification loss determination unit is configured to determine a cross-domain object classification loss based on a predicted category of each of the sample objects in each of the domains;

[0075] The training subunit is configured to determine the loss sum between the cross-domain contrastive learning loss and the cross-domain object classification loss, and perform machine learning training on the object representation model to be trained based on the loss sum to obtain the trained object representation model.

[0076] In some exemplary embodiments, the cross-domain contrastive learning loss determination unit includes:

[0077] A cross-domain pair determining unit is configured to determine a plurality of cross-domain pairs based on the number of the different domains; each of the cross-domain pairs includes two different domains;

[0078] The cross-domain positive and negative sample determination unit is configured to execute, for each of the cross-domain pairs, constructing a cross-domain positive sample corresponding to the cross-domain pair based on the multimodal global features of the same sample object corresponding to the cross-domain pair; and constructing a cross-domain negative sample corresponding to the cross-domain pair based on the multimodal global features of different sample objects corresponding to the cross-domain pair;

[0079] A first loss determination unit is configured to determine a sub-cross-domain contrastive learning loss of each cross-domain pair based on a cross-domain positive sample and a cross-domain negative sample of each cross-domain pair;

[0080] The second loss determining unit is configured to determine the statistical values ​​of the sub-cross-domain contrastive learning losses of the multiple cross-domain pairs to obtain the cross-domain contrastive learning loss.

[0081] In some exemplary embodiments, the cross-domain object classification loss determination unit is specifically configured to perform: determining the object classification loss of each domain based on the difference between the predicted category of each sample object in each domain and the reference category of the sample object in the domain; determining the statistical value of the object classification loss of the different domains to obtain the cross-domain object classification loss.

[0082] According to a fourth aspect of an embodiment of the present disclosure, there is provided an object characterization device, including:

[0083] A target multimodal data acquisition unit is configured to acquire target multimodal data of a target object in a target domain; the target multimodal data includes target object image data and target object description text corresponding to the target object;

[0084] A second encoding processing unit is configured to perform encoding processing by inputting the target multimodal data into an encoding network of an object representation model to obtain target multimodal encoding features;

[0085] An object representation unit is configured to perform multimodal feature interaction by inputting the target multimodal encoding feature into a feature interaction network of the object representation model to obtain a target multimodal global feature of the target object in the target domain;

[0086] The object representation model is trained based on the aforementioned object representation model training method.

[0087] In some exemplary embodiments, the target domain includes a video domain of a target video type, and the target multimodal data acquisition unit is specifically configured to execute: acquiring target video data of a target object in the video domain of a target video type; performing frame sampling on the target video data to obtain image data of the target object; performing speech recognition processing on the target video data to obtain target speech recognition text; inputting the target speech recognition text and the preset text prompt into a text summarization model, and performing text summary processing on the target speech recognition text according to the preset text prompt through the text summarization model to obtain a description text of the target object.

[0088] In some exemplary embodiments, the apparatus further comprises:

[0089] A feature acquisition unit is configured to acquire a target multimodal global feature of the object to be processed in the target domain; the target object includes the object to be processed;

[0090] A matching unit configured to determine, based on the degree of matching between each multimodal global feature to be matched in the domain to be matched and the target multimodal global feature, a candidate object corresponding to the multimodal global feature to be matched whose degree of matching satisfies a preset screening condition;

[0091] The matching result generating unit is configured to generate a matching result based on the data of the candidate object in the to-be-matched domain.

[0092] According to a fifth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0093] processor;

[0094] a memory for storing instructions executable by the processor;

[0095] Among them, the processor is configured to execute the instructions to implement the object representation model training method of the first aspect mentioned above, or the object representation method of the second aspect mentioned above.

[0096] According to the sixth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the object representation model training method of the first aspect or the object representation method of the second aspect.

[0097] According to a seventh aspect of an embodiment of the present disclosure, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the object representation model training method of the first aspect or the object representation method of the second aspect.

[0098] The disclosed embodiment obtains the multimodal data of each sample object in different domains, and the multimodal data of the sample object in each domain includes the object image data and the object description text corresponding to the sample object, and then respectively inputs the multimodal data of the sample object in each domain into the encoding network of the object representation model to be trained for encoding processing, obtains the multimodal encoding features of the sample object in each domain, and respectively inputs the multimodal encoding features of the sample object in each domain into the feature interaction network of the object representation model to be trained for multimodal feature interaction of each domain to obtain the multimodal global features of the sample object in each domain, thereby performing machine learning training on the object representation model to be trained based on the multimodal global features of each sample object in different domains, and obtains a trained object representation model. In the above technical solution, the multimodal global features of each domain can fuse domain-level visual global features and text-level global features, so that the trained object representation model can improve the consistency of the object representation of an object in different domains, improve the accuracy of cross-domain object representation, and thus help improve the accuracy of downstream cross-domain tasks based on the cross-domain object representation.

[0099] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0100] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0101] Figure 1 is a schematic diagram of an application environment of an object representation model training method according to an exemplary embodiment;

[0102] Figure 2 is a flowchart of an object representation model training method according to an exemplary embodiment;

[0103] Figure 3 is a flowchart of another object representation model training method according to an exemplary embodiment;

[0104] Figure 4 is a schematic diagram of the structure of an object representation model to be trained according to an exemplary embodiment;

[0105] Figure 5 is a flowchart of another object representation model training method according to an exemplary embodiment;

[0106] Figure 6 is an example of an object characterization method according to an exemplary embodiment;

[0107] Figure 7 is a structural block diagram of an object representation model training device according to an exemplary embodiment;

[0108] Figure 8 is a structural block diagram of an object characterization device according to an exemplary embodiment;

[0109] Fig. 9 The present invention is a structural block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0110] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0111] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0112] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.

[0113] See also Figure 1 , which is a schematic diagram of an application environment according to an exemplary embodiment, the application environment may include a terminal 110 and a server 120, and the terminal 110 and the server 120 may be connected via a wired network or a wireless network.

[0114] The terminal 110 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited thereto. The terminal 110 may be installed with client software such as an application (Application, referred to as App) that provides interactive functions. The application may be an independent application or a subprogram in the application. The user of the terminal 110 may log in to the application using pre-registered user information, which may include an account number and a password. Exemplarily, the application may include a social application, a live broadcast application, a video application, etc.

[0115] The server 120 may be a server that provides background services for the application in the terminal 110, and the background services may be search services, recommendation services, etc. The server 120 may store an object representation model, and the server 120 may train and update the object representation model according to a predetermined period. The server 120 may call the object representation model to extract features from objects in multiple domains to obtain a multimodal feature representation of each object in the domain. Specifically, when the server 120 receives a service request (such as a search service or a recommendation service) initiated by the terminal 110 based on an object in a certain domain (such as a short video domain), it may obtain the multimodal feature representation of the object in the domain, and search for a feature representation that matches the multimodal feature representation from other domains (such as a live broadcast domain), and then return the object data corresponding to the matching feature representation in other domains as a response result to the terminal 110.

[0116] In the disclosed embodiments, server 120 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, an edge computing node, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0117] It should be noted that the "domain" in the embodiments of the present disclosure refers to a specific display form of an object on an e-commerce platform. Different domains have different display forms for the same object. For example, the display of an object using an object details page to describe the object in detail forms one domain (which can be called the object details page domain), while the display of a short video forms another domain (which can be called the short video domain), and the display form of a live video stream forms another domain (which can be called the live video domain).

[0118] Figure 2 is a flowchart of an object representation model training method according to an exemplary embodiment. Figure 2 As shown, the following steps are included:

[0119] In step S201, multimodal data of each sample object in different domains is obtained.

[0120] The multimodal data of the sample object in each domain includes object image data and object description text corresponding to the sample object.

[0121] The object image data may be an object image sequence consisting of a plurality of images of corresponding sample objects.

[0122] The object description text is used to describe the key object information of the corresponding sample object. Taking the sample object as a certain product as an example, the object description text may include the product name and the main features of the product (such as material, size, service life, etc.).

[0123] In the embodiment of the present disclosure, the different domains may include an object details page domain and video domains of different video types, such as a video domain of a first video type and a video domain of a second video type. The first video type may be a short video type, and the second video type may be a live video type.

[0124] For the object details page domain, since its display form is static, the object image in the object details page domain can be obtained, and the object image can be copied multiple times based on the sequence length of the object image data to form the object image data of the sample object in the object details page domain; the object description text of the sample object in the object details page domain is formed by obtaining the object title text in the object details page domain.

[0125] For the video domain of each video type, since its display form is dynamic, for each video domain of the video type, the multimodal data of each sample object in the video domain of the video type can be obtained by the following steps:

[0126] Obtain sample video data of each sample object in the video domain of the video type;

[0127] For each sample video data of the sample object in the video domain, frame sampling is performed on the sample video data to obtain object image data of the sample object in the video domain;

[0128] Performing speech recognition processing on the sample video data to obtain speech recognition text;

[0129] The speech recognition text and the preset text prompt are input into a text summarization model, and the text summarization model performs text summarization processing on the speech recognition text according to the preset text prompt to obtain a corresponding object description text; wherein the preset text prompt is used to instruct to perform the text summarization task according to a summary example, and the summary example represents the key object information of the object in the example text output in a specified format, for example, the key object information may include the object name and object characteristics.

[0130] Specifically, when performing frame sampling on the sample video data, the number of frames to be sampled can be determined based on the sequence length of the object image data, and then the video frames of the number of frames are selected from the sample video data, and the video frames of the number of frames constitute the object image data of the corresponding sample object in the video domain of the video type. In a specific implementation, when selecting the above number of frames from the sample video data, the key video frames of the sample video data can be determined first, and then the video frames of the number of frames are selected from the key video frames, so that the object image data of the corresponding sample object in the video domain of the video type can have more effective visual information, which is conducive to improving the model training effect.

[0131] When performing speech recognition processing on sample video data, audio data in the sample video data can be first extracted, and then speech recognition processing can be performed on the audio data based on automatic speech recognition (ASR) technology, so as to obtain speech recognition text. The goal of ASR automatic speech recognition is to convert the vocabulary content in human speech into computer-readable input, such as keystrokes, binary codes or character sequences.

[0132] Considering that the above-mentioned speech recognition text usually contains a lot of noise information, such as background music, the chat of the anchor when recommending an object, etc., these redundant information irrelevant to the sample object may have a negative impact on the object representation. Therefore, after obtaining the speech recognition text, the embodiment of the present disclosure uses a text summary model to filter out irrelevant information in the speech recognition text, retaining useful information related to the sample object to form an object description text of the corresponding sample object. Among them, the text summary model can be a large language model (LLM), based on the summary function of the large language model and the preset text prompt of the embodiment of the present disclosure, the large language model can output the corresponding summary text based on the summary example in the preset text prompt (Prompt) as the object description text.

[0133] The above-mentioned implementation method targets the video domain of each video type, obtains a speech recognition text by performing speech recognition processing on the sample video data of the sample object in the video domain of the video type, and then performs text summary processing on the speech recognition text in combination with the text summary model and the preset text prompt to filter out irrelevant information in the speech recognition text, retain the useful information related to the sample object to obtain the corresponding object description text, thereby avoiding the adverse effect of irrelevant redundant information in the speech recognition text on the model training, which is beneficial to improving the training effect of the model, and thereby enabling the trained object representation model to more accurately perform cross-domain object representation.

[0134] In step S203, the multimodal data of the sample object in each of the domains are respectively input into the encoding network of the object representation model to be trained for encoding processing to obtain the multimodal encoding features of the sample object in each of the domains.

[0135] In step S205, the multimodal encoding features of the sample object in each of the domains are respectively input into the feature interaction network of the object representation model to be trained to perform multimodal feature interaction in each of the domains to obtain the multimodal global features of the sample object in each of the domains.

[0136] In some exemplary embodiments, Figure 3 As shown, for the multimodal data of the sample object in each of the domains, the above step S203 may include:

[0137] In step S301, the object image data in the multimodal data is input into the visual encoding subnetwork of the encoding network for visual encoding processing to obtain an image visual feature sequence.

[0138] In a specific implementation, the visual coding subnetwork can perform visual coding processing on each object image in the object image sequence data, thereby obtaining the image visual features of each object image to form an image visual feature sequence. The visual coding subnetwork can be a Transformer-based encoder. It can be understood that for a video domain of a certain video type, the image visual features of each object image can be understood as frame-level features.

[0139] In step S303, feature averaging processing is performed on the image visual features in the image visual feature sequence to obtain domain visual features of the domain, and the domain visual features are concatenated with the image visual feature sequence to obtain a visual feature sequence.

[0140] Assume that the object image sequence data is represented as {f1,…,f n}, the corresponding image visual feature sequence is expressed as {z1,…,z n}, then the obtained domain visual feature v(x) can be expressed as In a specific implementation, an average pooling layer can be set after the visual coding subnetwork, and the image visual feature sequence output by the visual coding subnetwork is averaged and processed by the average pooling layer to obtain the output domain visual feature. It can be understood that for a video domain of a certain video type, the domain visual feature v(x) can be understood as a video-level feature.

[0141] In the embodiment of the present disclosure, after obtaining the domain visual feature v(x), the domain visual feature v(x) is compared with the corresponding image visual feature sequence {z1,…,z n}, thus obtaining a visual feature sequence {v(x),z1,…,z n}.

[0142] In step S305, the text unit sequence corresponding to the object description text in the multimodal data is input into the text encoding subnetwork of the encoding network for text encoding processing to obtain a text feature sequence.

[0143] The text unit sequence includes a plurality of text units obtained by dividing the object description text and an added preset identification unit. Specifically, the preset identification unit can be added to the first position of the text unit sequence.

[0144] In a specific implementation, the object description text can be divided into multiple text units, such as m, and then the object description text can be represented as {w1, ..., w m} sequence, and in order to obtain the global features of the text, a preset identification unit such as [CLS] can be added before the sequence, so that the text unit sequence {[CLS], w1,…, w m}. The length of the text unit sequence {[CLS],w1,…,w m} is input to the text encoding subnetwork for text encoding processing, and the output text feature sequence {y0,y1,…,y m When dividing the object description text, one word or multiple words can be used as a text unit, which can be implemented based on the length requirement of the text encoding network for the input text sequence.

[0145] Exemplarily, the text encoding subnetwork can be a BERT-based text encoder such as a RoBERTa encoder.

[0146] In step S307, the visual feature sequence and the text feature sequence are concatenated to obtain a multimodal coding feature of the sample object in the domain.

[0147] Specifically, in order to realize the splicing of the visual feature sequence and the text feature sequence to fuse the information of the two modalities of vision and text, it is necessary to ensure that the visual feature sequence and the text feature sequence are relatively aligned. Therefore, in the embodiment of the present disclosure, when splicing the visual feature sequence and the text feature sequence, the visual features and the text features can be aligned first, and then the aligned visual feature sequence and the text feature sequence can be spliced.

[0148] In a specific implementation, a linear mapping layer can be set after the visual encoding subnetwork and the text encoding subnetwork, respectively, and each visual feature and each text feature can be linearly mapped through each linear mapping layer, so as to obtain an aligned visual feature sequence and an aligned text feature sequence, and then the aligned visual feature sequence and the aligned text feature sequence are spliced ​​to obtain the corresponding multimodal encoding feature. For example, the text feature sequence {y0, y1, ..., y m The aligned text feature sequence obtained by linear mapping can be expressed as The visual feature sequence {v(x),z1,…,z n The aligned visual feature sequence obtained by linear mapping can be expressed as After concatenation, we can obtain a multimodal coding feature with a length of (m+n+2)

[0149] Exemplarily, each aligned visual feature and each text feature may be a 512-dimensional vector.

[0150] The above implementation method extracts image visual features and text features respectively through a visual encoding subnetwork and a text encoding subnetwork, and after obtaining the image visual feature sequence, performs feature averaging processing on each image visual feature to obtain a domain visual feature, and concatenates the domain visual feature with the image visual feature sequence to obtain a visual feature sequence, and then concatenates the visual feature sequence with the text feature sequence to obtain a multimodal encoding feature, so that the multimodal encoding feature can have both local multimodal information and global multimodal information, which is beneficial to improving the training effect of the model.

[0151] In some exemplary embodiments, see Figure 3 For the multimodal coding features of the sample object in each of the domains, the above step S205 may include:

[0152] In step S309, the multimodal coding features are input into a feature interaction network, and the feature interaction network performs feature interaction on the multimodal coding features based on a self-attention mechanism to obtain multimodal interaction features output by the feature interaction network.

[0153] The feature interaction network may be a plurality of cascaded Transformer modules, for example, four cascaded Transformer modules.

[0154] In the specific implementation, in the self-attention mechanism, the query vector Q, key vector K and value vector V can be formed based on the multimodal encoding features. The attention weight matrix can be obtained by the dot product of the query vector Q and the key vector K. The multimodal interaction features after the intra-modal and inter-modal feature interactions can be obtained based on the product of the attention weight matrix and the value vector V. Continuing from the above example, it can be expressed as

[0155] In step S311, feature data located at a position corresponding to the domain visual feature in the multimodal interaction feature is obtained to obtain a domain-level global feature; and feature data located at a position corresponding to the preset identification unit in the multimodal interaction feature is obtained to obtain a text-level global feature.

[0156] Based on the above multimodal interaction features For example, That is, the feature data corresponding to the domain visual feature, that is, the domain-level global feature, That is, the feature data corresponding to the position of the preset mark unit, that is, the text-level global feature.

[0157] In step S313, based on the feature sum between the domain-level global feature and the text-level global feature, a multimodal global feature of the sample object in the domain is obtained.

[0158] Based on the above multimodal interaction features For example, we can calculate To obtain the multimodal global feature sum, in practical applications, in order to subsequently utilize the multimodal global feature sum, the multimodal global feature sum can be linearly mapped through a linear mapping layer, so that the linearly mapped features can be used as the corresponding multimodal global features.

[0159] In the above implementation, feature interaction is performed on multimodal encoding features through a feature interaction network, so that domain-level global features and text-level global features can be obtained. The features based on the domain-level global features and text-level global features and the obtained multimodal global features can contain richer and more effective multimodal global information, which is beneficial to improving the training effect of the model, so that the trained model can more accurately represent cross-domain objects.

[0160] See also Figure 4 , which is a schematic diagram of the structure of an object representation model to be trained provided by an embodiment of the present disclosure, such as Figure 4As shown, the object representation model to be trained includes an encoding network, a first linear mapping layer, a feature interaction network and a second linear mapping layer, wherein the encoding network includes a visual encoding subnetwork and a text encoding subnetwork, the visual encoding subnetwork is used to extract visual features, the text encoding subnetwork is used to extract text features, the first linear mapping layer includes a visual linear mapping layer connected to the visual encoding subnetwork and a text linear mapping layer connected to the text encoding subnetwork, the visual linear mapping layer is used to linearly map the visual features in the visual feature sequence, and the text linear mapping layer is used to linearly map the text features in the text feature sequence. The feature interaction network is used to perform self-attention processing on the input multimodal encoding features based on the self-attention mechanism to achieve multimodal feature interaction, and the second linear mapping layer is connected to the feature interaction network to output the final multimodal global features. Exemplarily, the visual encoding subnetwork can convert the input into 512-dimensional features, the text encoding subnetwork can convert the input into 768-dimensional features, and the 768-dimensional features are further converted into new 512-dimensional text features through the text linear mapping layer, so that alignment with the visual features can be achieved.

[0161] For example, for each video type, in order to clean and filter the speech recognition text obtained based on the video data to obtain key object information, such as Figure 4 As shown, the text encoding subnetwork of the object representation model to be trained can be connected to a text summarization model based on LLM, and the output of the text summarization model is used as the input of the text encoding subnetwork, wherein the input of the text summarization model includes the speech recognition text and the aforementioned preset text prompt (Prompt). It should be noted that the text summarization model can adopt a pre-trained large language model, and no re-training is required in the embodiments disclosed herein.

[0162] In step S207, based on the multimodal global features of each of the sample objects in different domains, machine learning training is performed on the object representation model to be trained to obtain a trained object representation model.

[0163] Specifically, the loss value can be determined based on the multimodal global features of each sample object in different domains, the model parameters of the object representation model to be trained can be adjusted inversely based on the loss value, and the iterative training can be continued based on the adjusted model parameters until the preset training end condition is met and the training is terminated, and the object representation model corresponding to the model parameters at the end of the training is used as the trained object representation model. The preset training end condition can be that the number of iterations reaches the preset number of iterations, or the loss value reaches the preset loss threshold, or the difference between the loss values ​​of two adjacent iterations reaches the preset difference threshold.

[0164] It should be noted that the training is performed in an end-to-end manner in the embodiment of the present disclosure, that is, the adjusted model parameters include all model parameters of the object representation model to be trained. Figure 4 In the model structure shown, the specifically adjusted model parameters may include parameters in the encoding network, parameters in the feature interaction network, parameters in the first linear mapping layer, and parameters in the second linear mapping layer.

[0165] In some exemplary embodiments, Figure 5 As shown, the above step S207 may include:

[0166] In step S501, a cross-domain contrastive learning loss is determined based on the multimodal global features of each of the sample objects in different domains.

[0167] Specifically, the cross-domain contrastive learning loss can be obtained based on the contrastive loss function, such as the CLIP loss function, wherein the positive sample is the multimodal global feature of the sample object i in two different domains (such as domain A and domain B), and the negative sample corresponding to the positive sample is composed of the multimodal global feature of the sample object i in domain A and the multimodal global feature of the sample object k (k is not equal to i) in domain B.

[0168] Exemplarily, the above step S501 may include, when implementing the determination of the cross-domain contrastive learning loss based on the multimodal global features of each sample object in different domains:

[0169] Based on the number of the different domains, determining a plurality of cross-domain pairs, each of the cross-domain pairs including two different domains;

[0170] For each of the cross-domain pairs, based on the multimodal global features of the same sample object corresponding to the cross-domain pair, a cross-domain positive sample corresponding to the cross-domain pair is constructed, and based on the multimodal global features of different sample objects corresponding to the cross-domain pair, a cross-domain negative sample corresponding to the cross-domain pair is constructed;

[0171] Determine a sub-cross-domain contrastive learning loss of each cross-domain pair based on the cross-domain positive sample and the cross-domain negative sample of each cross-domain pair;

[0172] The cross-domain contrastive learning loss is obtained based on the statistical values ​​of the sub-cross-domain contrastive learning losses of the multiple cross-domain pairs.

[0173] The statistical value of the sub-cross-domain contrastive learning losses of the multiple cross-domain pairs may be an average value of the multiple sub-cross-domain contrastive learning losses, and the average value is used as the cross-domain contrastive learning loss.

[0174] Taking different domains including the object details page domain (hereinafter referred to as domain P), the short video domain (hereinafter referred to as domain S) and the live video domain (hereinafter referred to as domain L) as examples, three cross-domain pairs can be formed: domain P-domain S, domain P-domain L and domain S-domain L. For each cross-domain pair, taking domain P-domain S as an example, a cross-domain positive sample is formed based on the multimodal global features of any sample object i in the P-domain and the multimodal global features in domain S, and a cross-domain negative sample corresponding to the cross-domain positive sample is formed based on the multimodal global features of the sample object i in the P-domain and the multimodal global features of the sample object k (k is not equal to i) in domain S. Then, based on each cross-domain positive sample and the cross-domain negative sample corresponding to each cross-domain positive sample, the contrastive learning loss is calculated using the contrastive loss function as the sub-cross-domain contrastive learning loss corresponding to domain P-domain S; similarly, domain P-domain L can also calculate the contrastive learning loss as the sub-cross-domain contrastive learning loss corresponding to domain P-domain L, and domain S-domain L can also calculate the contrastive learning loss as the sub-cross-domain contrastive learning loss corresponding to domain S-domain L. Afterwards, the average of the three sub-cross-domain contrastive learning losses is calculated to obtain the cross-domain contrastive learning loss.

[0175] The above implementation method calculates the sub-cross-domain contrastive learning loss for the cross-domain pairs composed of two domains respectively, and then calculates the average value based on the sub-cross-domain contrastive learning loss of each cross-domain pair to obtain the cross-domain contrastive learning loss, which can improve the accuracy of the contrastive learning loss and thus help improve the accuracy of the trained model.

[0176] In step S503, category prediction processing is performed on the multimodal global features of each of the sample objects in each of the domains to obtain a predicted category of each of the sample objects in each of the domains.

[0177] In step S505 , a cross-domain object classification loss is determined based on the predicted category of each of the sample objects in each of the domains.

[0178] Specifically, based on the multimodal global features of each of the sample objects in each of the domains, the category to which each of the sample objects belongs in multiple preset categories in the domain is predicted to obtain a predicted category. Then, based on the reference category of each sample object in the domain and the predicted category, the object classification loss of the domain can be determined, and then the cross-domain object classification loss can be determined by combining the object classification losses of each domain.

[0179] Based on this, in some exemplary implementations, the above step S505 may include:

[0180] Determining an object classification loss for each of the domains based on a difference between a predicted category of each of the sample objects in each of the domains and a reference category of the sample object in the domain;

[0181] The cross-domain object classification loss is determined based on the statistical values ​​of the object classification losses in the different domains.

[0182] The reference category of the sample object in each domain can be pre-marked and input in the form of a label, that is, each sample object also corresponds to a reference category in each domain.

[0183] The object classification loss can be calculated using a cross entropy loss function. The statistical value of the object classification loss in different domains can be the average value of the object classification loss in each domain, and the average value is used as the cross-domain object classification loss.

[0184] Still taking the aforementioned different domains including the object details page domain (hereinafter referred to as domain P), the short video domain (hereinafter referred to as domain S) and the live video domain (hereinafter referred to as domain L) as examples, for domain P, the category of sample object i in the P-domain is predicted based on its multimodal global features in the P-domain to obtain the predicted category, and based on the difference between the predicted category and the reference category of sample object i in the P-domain, the object classification loss of domain P can be obtained using the cross entropy loss function; similarly, the object classification loss of domain S and the object classification loss of domain L can be obtained, and then the average of these three object classification losses can be calculated to obtain the cross-domain object classification loss.

[0185] The above implementation method determines the object classification loss of each domain based on the difference between the predicted category of each sample object in each domain and the reference category of the sample object in the domain, and then determines the cross-domain object classification loss based on the statistical values ​​of the object classification losses of each domain, thereby improving the accuracy of the classification loss, which in turn helps to improve the accuracy of the trained model.

[0186] In step S507, the loss sum between the cross-domain contrastive learning loss and the cross-domain object classification loss is determined, and machine learning training is performed on the object representation model to be trained based on the loss sum to obtain a trained object representation model.

[0187] Specifically, the sum of the cross-domain contrastive learning loss and the cross-domain object classification loss is calculated to obtain a comprehensive loss, and the model parameters of the object representation model to be trained are reversely adjusted with the comprehensive loss until the preset training end conditions are met to terminate the training and obtain a trained object representation model.

[0188] The above implementation method determines the cross-domain contrastive learning loss and the cross-domain object classification loss, and combines the two to obtain a comprehensive loss. The comprehensive loss is used to perform machine learning training on the object representation model to be trained, so that the model can learn richer cross-domain multimodal information, thereby improving the training effect of the model, making the trained model more accurate and capable of more accurate cross-domain object representation.

[0189] In the technical solution of the disclosed embodiment, the multimodal global features of each domain can fuse domain-level visual global features and text-level global features, so that the trained object representation model can improve the consistency of the object representation of an object in different domains, and improve the accuracy of cross-domain object representation, which is beneficial to improve the accuracy of downstream cross-domain tasks based on the cross-domain object representation.

[0190] In some exemplary implementations, the present disclosure also provides an object characterization method, which specifically includes:

[0191] Acquire target multimodal data of a target object in a target domain; the target multimodal data includes target object image data and target object description text corresponding to the target object;

[0192] Inputting the target multimodal data into the encoding network of the object representation model for encoding processing to obtain target multimodal encoding features;

[0193] Inputting the target multimodal encoding features into the feature interaction network of the object representation model to perform multimodal feature interaction, thereby obtaining the target multimodal global features of the target object in the target domain;

[0194] The object representation model is trained based on any of the aforementioned object representation model training methods of the embodiments of the present disclosure.

[0195] Specifically, the target domain may be any one of the different domains mentioned above in the embodiments of the present disclosure, such as an object details page domain, a short video domain, and a live video domain. The target object may be any object in the object set, and the data corresponding to the target object in the target domain may be referred to as target domain object data, which may be used to make recommendations to users. Taking the short video domain as an example, the short video data of an object may be recommended to users.

[0196] In a specific implementation, the target object image data may be a target object image sequence consisting of a plurality of images of the target object.

[0197] The above-mentioned implementation method uses the object representation model to represent the target object in the target domain to obtain the target multimodal global features of the target object in the target domain, so that the object representation of the target object in each domain can be unified and more similar, thereby improving the accuracy of cross-domain object representation, which is conducive to improving the accuracy of downstream cross-domain tasks based on the cross-domain object representation.

[0198] Exemplarily, when the target domain is a video domain of a target video type, obtaining target multimodal data of the target object in the target domain includes:

[0199] Obtain target video data of a target object in a video domain of a target video type;

[0200] Performing frame sampling on the target video data to obtain the target object image data;

[0201] Performing speech recognition processing on the target video data to obtain a target speech recognition text;

[0202] The target speech recognition text and the aforementioned preset text prompt of the embodiment of the present disclosure are input into a text summarization model, and the target speech recognition text is subjected to text summarization processing by the text summarization model according to the preset text prompt to obtain the target object description text.

[0203] Among them, the target video type can be any one of the different video types mentioned above in the embodiments of the present disclosure, for example, it can be a short video type or a live video type.

[0204] The above-mentioned implementation method performs text summary processing on the target speech recognition text by combining the text summary model and the preset text prompt to filter out irrelevant information in the target speech recognition text, retain the useful information related to the target object to obtain the corresponding target object description text, thereby avoiding the adverse effect of irrelevant redundant information in the target speech recognition text on the model representation, and is conducive to improving the accuracy and consistency of the representation of objects in each domain.

[0205] In some exemplary implementations, after obtaining the multimodal global features of each object in each domain based on the object representation model, the method may further include:

[0206] Acquire target multimodal global features of the object to be processed in the target domain;

[0207] Based on the matching degree between each to-be-matched multimodal global feature in the to-be-matched domain and the target multimodal global feature, determining a candidate object corresponding to the to-be-matched multimodal global feature whose matching degree meets a preset screening condition;

[0208] A matching result is generated based on the data of the candidate object in the to-be-matched domain.

[0209] Among them, the aforementioned target object includes the object to be processed, and then the target multimodal global features of the object to be processed in the target domain can be obtained. Exemplarily, the object to be processed can be the object indicated by the object details page that the terminal user is browsing, and the target domain is the object details page domain; the object to be processed can also be the object indicated by a short video that the terminal user is watching, and the target domain is the short video domain; the object to be processed can also be the object indicated by a live video that the terminal user is watching, and the target domain is the live video domain.

[0210] The domain to be matched is a domain different from the target domain. If the target domain is the object details page domain, the domain to be matched can be a short video domain and / or a live video domain, so that when the terminal user browses the object details page of an object, the short video and / or live video corresponding to the object can be accurately recommended to the terminal user; if the target domain is the short video domain, the domain to be matched can be an object details page domain and / or a live video domain, so that when the terminal user watches a short video of an object, the object details page and / or live video corresponding to the object can be accurately recommended to the terminal user; if the target domain is the live video domain, the domain to be matched can be an object details page domain and / or a short video domain, so that when the terminal user watches a live video of an object, the object details page and / or short video corresponding to the object can be accurately recommended to the terminal user.

[0211] The preset screening conditions can be set based on actual experience, for example, the preset number of matches that exceed the preset match degree, and the preset match degree and the preset number can be set based on actual needs. The matching results can be used to recommend to users, for example, the object detail page data, short video data, and live video data in the above examples.

[0212] The above implementation generates matching results by matching the multimodal global features of each object in each domain obtained based on the object representation model. Since the object representation model can achieve more accurate cross-domain object representation, more accurate cross-domain data can be matched across domains, thereby improving the accuracy of the above cross-domain matching results.

[0213] In order to facilitate understanding of the technical solution of the embodiment of the present disclosure, Figure 6 Taking the object as a product, including the product details page domain, short video domain and live video domain as an example, the object representation model of the embodiment of the present disclosure is used to perform cross-domain representation description of the product.

[0214] like Figure 6 As shown, the video data in the short video domain and the live video domain are processed through frame sampling and automatic speech recognition to obtain an input product image sequence and speech recognition text (ASR text), and the speech recognition text (ASR text) is processed through text summarization by a large language model based on LLM to form a corresponding product description text; the product details page domain forms a product image sequence based on the copying of the product images in the product details page, and the subject name of the product details page forms the corresponding product description text. Figure 6 The process shown can be expressed as follows:

[0215] {w1,…,w m}←text_to_tokens(t,m=32),

[0216] {y0,y1,…,y m}←RoBERTa({w1,…,w m})

[0217]

[0218] Where t represents the product description text; {w1,…,w m} indicates that the product description text t is divided into m text units; RoBERTa({w1,…,w m}) represents the text encoder Text Encoder input {w1,…,w m}, y0 is the feature of the corresponding CLS token; Linear 768×512 ({y0,y1,…,y m}) represents the linear mapping processing of the linear mapping layer corresponding to the text encoder; {z1,…,z n} represents the output of the product image sequence after being encoded by the Visual Encoder, and v(x) represents the n}Video-level features obtained after average pooling; Linear 768×512 ({v(x),z1,…,z n}) represents the linear mapping processing of the linear mapping layer corresponding to the visual encoder; represents the feature interaction processing within and between modalities; e(x,t) represents the multimodal global feature of the output.

[0219] Figure 7 is a structural block diagram of an object representation model training device according to an exemplary embodiment. Figure 7 , the object representation model training device 700 includes:

[0220] The multimodal data acquisition unit 710 is configured to acquire multimodal data of each sample object in different domains; the multimodal data of the sample object in each domain includes object image data and object description text corresponding to the sample object;

[0221] The first encoding processing unit 720 is configured to perform encoding processing by inputting the multimodal data of the sample object in each of the domains into the encoding network of the object representation model to be trained, so as to obtain the multimodal encoding features of the sample object in each of the domains;

[0222] The multimodal feature interaction unit 730 is configured to perform multimodal feature interaction of each domain by inputting the multimodal encoding features of the sample object in each domain into the feature interaction network of the object representation model to be trained, so as to obtain the multimodal global features of the sample object in each domain;

[0223] The training unit 740 is configured to perform machine learning training on the object representation model to be trained based on the multimodal global features of each of the sample objects in different domains to obtain a trained object representation model.

[0224] In some exemplary embodiments, the first encoding processing unit 720 includes:

[0225] A visual encoding unit is configured to perform visual encoding processing on the multimodal data of the sample object in each of the domains, input the object image data in the multimodal data into the visual encoding subnetwork of the encoding network to obtain an image visual feature sequence;

[0226] a visual feature sequence determination unit configured to perform feature averaging processing on the image visual features in the image visual feature sequence to obtain domain visual features of the domain; and to concatenate the domain visual features with the image visual feature sequence to obtain a visual feature sequence;

[0227] A text feature sequence determination unit is configured to input a text unit sequence corresponding to the object description text in the multimodal data into a text encoding subnetwork of the encoding network for text encoding processing to obtain a text feature sequence; the text unit sequence includes a plurality of text units obtained by dividing the object description text and an added preset identification unit;

[0228] The first feature concatenation unit is configured to concatenate the visual feature sequence and the text feature sequence to obtain a multimodal encoding feature of the sample object in the domain.

[0229] In some exemplary embodiments, the multimodal feature interaction unit 730 includes:

[0230] An interaction unit is configured to execute multimodal coding features of the sample object in each of the domains, input the multimodal coding features into the feature interaction network, perform feature interaction on the multimodal coding features based on a self-attention mechanism through the feature interaction network, and obtain multimodal interaction features output by the feature interaction network;

[0231] A first acquisition unit is configured to acquire feature data located at a position corresponding to the domain visual feature in the multimodal interaction feature to obtain a domain-level global feature;

[0232] A second acquisition unit is configured to acquire feature data located at a position corresponding to the preset identification unit in the multimodal interaction feature to obtain a text-level global feature;

[0233] The feature summing unit is configured to perform feature summation based on the domain-level global feature and the text-level global feature to obtain the multimodal global feature of the sample object in the domain.

[0234] In some exemplary embodiments, the different domains include video domains of different video types, and the multimodal data acquisition unit 710 includes:

[0235] A sample video acquisition unit is configured to acquire sample video data of each sample object in the video domain for each video type;

[0236] A frame sampling unit is configured to perform frame sampling on the sample video data of each sample object in the video domain to obtain object image data of the sample object in the video domain;

[0237] The speech-to-text summarizing unit is configured to perform speech recognition processing on the sample video data to obtain speech recognition text; input the speech recognition text and a preset text prompt into a text summarizing model, and perform text summarizing processing on the speech recognition text according to the preset text prompt through the text summarizing model to obtain a corresponding object description text;

[0238] The preset text prompt is used to instruct to perform the text summarization task according to the summary example, and the summary example represents outputting key object information of objects in the example text according to a specified format.

[0239] In some exemplary embodiments, the training unit 740 includes:

[0240] A cross-domain contrastive learning loss determination unit is configured to determine a cross-domain contrastive learning loss based on the multimodal global features of each of the sample objects in different domains;

[0241] A category prediction unit is configured to perform category prediction processing on the multimodal global features of each sample object in each domain to obtain a predicted category of each sample object in each domain;

[0242] A cross-domain object classification loss determination unit is configured to determine a cross-domain object classification loss based on a predicted category of each of the sample objects in each of the domains;

[0243] The training subunit is configured to determine the loss sum between the cross-domain contrastive learning loss and the cross-domain object classification loss, and perform machine learning training on the object representation model to be trained based on the loss sum to obtain the trained object representation model.

[0244] In some exemplary embodiments, the cross-domain contrastive learning loss determination unit includes:

[0245] A cross-domain pair determining unit is configured to determine a plurality of cross-domain pairs based on the number of the different domains; each of the cross-domain pairs includes two different domains;

[0246] The cross-domain positive and negative sample determination unit is configured to execute, for each of the cross-domain pairs, constructing a cross-domain positive sample corresponding to the cross-domain pair based on the multimodal global features of the same sample object corresponding to the cross-domain pair; and constructing a cross-domain negative sample corresponding to the cross-domain pair based on the multimodal global features of different sample objects corresponding to the cross-domain pair;

[0247] A first loss determination unit is configured to determine a sub-cross-domain contrastive learning loss of each cross-domain pair based on a cross-domain positive sample and a cross-domain negative sample of each cross-domain pair;

[0248] The second loss determining unit is configured to determine the statistical values ​​of the sub-cross-domain contrastive learning losses of the multiple cross-domain pairs to obtain the cross-domain contrastive learning loss.

[0249] In some exemplary embodiments, the cross-domain object classification loss determination unit is specifically configured to perform: determining the object classification loss of each domain based on the difference between the predicted category of each sample object in each domain and the reference category of the sample object in the domain; determining the statistical value of the object classification loss of the different domains to obtain the cross-domain object classification loss.

[0250] Figure 8 is a structural block diagram of an object characterization device according to an exemplary embodiment. Figure 8 , the object characterization device 800 comprises:

[0251] The target multimodal data acquisition unit 810 is configured to acquire target multimodal data of a target object in a target domain; the target multimodal data includes target object image data and target object description text corresponding to the target object;

[0252] A second encoding processing unit 820 is configured to perform encoding processing by inputting the target multimodal data into an encoding network of an object representation model to obtain target multimodal encoding features;

[0253] The object representation unit 830 is configured to perform multimodal feature interaction by inputting the target multimodal encoding feature into the feature interaction network of the object representation model to obtain the target multimodal global feature of the target object in the target domain;

[0254] The object representation model is trained based on the aforementioned object representation model training method.

[0255] In some exemplary embodiments, the target domain includes a video domain of a target video type, and the target multimodal data acquisition unit 810 is specifically configured to execute: acquiring target video data of a target object in the video domain of a target video type; performing frame sampling on the target video data to obtain image data of the target object; performing speech recognition processing on the target video data to obtain target speech recognition text; inputting the target speech recognition text and the preset text prompt into a text summarization model, and performing text summary processing on the target speech recognition text according to the preset text prompt through the text summarization model to obtain a description text of the target object.

[0256] In some exemplary embodiments, the apparatus 800 further includes:

[0257] A feature acquisition unit is configured to acquire a target multimodal global feature of the object to be processed in the target domain; the target object includes the object to be processed;

[0258] A matching unit configured to determine, based on the degree of matching between each multimodal global feature to be matched in the domain to be matched and the target multimodal global feature, a candidate object corresponding to the multimodal global feature to be matched whose degree of matching satisfies a preset screening condition;

[0259] The matching result generating unit is configured to generate a matching result based on the data of the candidate object in the to-be-matched domain.

[0260] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0261] In an exemplary embodiment, an electronic device is also provided, including a processor; a memory for storing instructions executable by the processor; wherein, when the processor is configured to execute the instructions stored in the memory, it implements the object representation model training method or object representation method provided in any of the above embodiments.

[0262] The electronic device may be a terminal, a server or a similar computing device. For example, the electronic device is a server. Fig. 9is a block diagram of an electronic device for running an object representation model training method or an object representation method according to an exemplary embodiment, such as Fig. 9 As shown, the server 900 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 910 (the processor 910 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 930 for storing data, and one or more storage media 920 (such as one or more mass storage devices) for storing application programs 923 or data 922. Among them, the memory 930 and the storage medium 920 can be short-term storage or permanent storage. The program stored in the storage medium 920 may include one or more modules, each of which may include a series of instruction operations on the server. Furthermore, the central processing unit 910 can be configured to communicate with the storage medium 920 and execute a series of instruction operations in the storage medium 920 on the server 900. The server 900 may also include one or more power supplies 960, one or more wired or wireless network interfaces 950, one or more input and output interfaces 940, and / or one or more operating systems 921, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0263] The input / output interface 940 may be used to receive or send data via a network. The specific example of the network may include a wireless network provided by a communication provider of the server 900. In one example, the input / output interface 940 includes a network adapter (Network Interface Controller, NIC), which may be connected to other network devices via a base station so as to communicate with the Internet. In one example, the input / output interface 940 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0264] It can be understood by those skilled in the art that Fig. 9 The structure shown is only for illustration and does not limit the structure of the above electronic device. Fig. 9 More or fewer components as shown, or with Fig. 9 Different configurations are shown.

[0265] In an exemplary embodiment, a computer-readable storage medium is also provided. When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute the object representation model training method or object representation method provided in any of the above embodiments.

[0266] In an exemplary embodiment, a computer program product is also provided, including a computer program, which, when executed by a processor, implements the object representation model training method or object representation method provided in any of the above embodiments.

[0267] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0268] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for training an object representation model, characterized in that: include: Obtain multimodal data of each sample object in different domains; The multimodal data of the sample object in each domain includes object image data and object description text corresponding to the sample object; Inputting the multimodal data of the sample object in each of the domains into the encoding network of the object representation model to be trained for encoding processing, thereby obtaining the multimodal encoding features of the sample object in each of the domains; Inputting the multimodal encoding features of the sample object in each of the domains into the feature interaction network of the object representation model to be trained respectively to perform multimodal feature interaction in each of the domains, so as to obtain the multimodal global features of the sample object in each of the domains; Based on the multimodal global features of each of the sample objects in different domains, machine learning training is performed on the object representation model to be trained to obtain the trained object representation model.

2. The method according to claim 1, characterized in that The step of inputting the multimodal data of the sample object in each domain into the encoding network of the object representation model to be trained for encoding processing to obtain the multimodal encoding features of the sample object in each domain comprises: For the multimodal data of the sample object in each of the domains, inputting the object image data in the multimodal data into the visual encoding subnetwork of the encoding network for visual encoding processing to obtain an image visual feature sequence; Performing feature averaging processing on the image visual features in the image visual feature sequence to obtain domain visual features of the domain; splicing the domain visual features with the image visual feature sequence to obtain a visual feature sequence; Inputting a text unit sequence corresponding to the object description text in the multimodal data into the text encoding subnetwork of the encoding network for text encoding processing to obtain a text feature sequence; the text unit sequence includes a plurality of text units obtained by dividing the object description text and an added preset identification unit; The visual feature sequence and the text feature sequence are concatenated to obtain a multimodal encoding feature of the sample object in the domain.

3. The method according to claim 2, characterized in that The step of inputting the multimodal encoding features of the sample object in each of the domains into the feature interaction network of the object representation model to be trained to perform multimodal feature interaction in each of the domains to obtain the multimodal global features of the sample object in each of the domains includes: For the multimodal coding features of the sample object in each of the domains, the multimodal coding features are input into the feature interaction network, and the multimodal coding features are subjected to feature interaction based on a self-attention mechanism by the feature interaction network to obtain multimodal interaction features output by the feature interaction network; Acquire feature data located at a position corresponding to the domain visual feature in the multimodal interaction feature to obtain a domain-level global feature; Acquire feature data located at a position corresponding to the preset identification unit in the multimodal interaction feature to obtain a text-level global feature; Based on the feature sum between the domain-level global feature and the text-level global feature, a multimodal global feature of the sample object in the domain is obtained.

4. The method according to claim 1, characterized in that The different domains include video domains of different video types, and obtaining multimodal data of each sample object in different domains includes: For each video domain of a video type, obtaining sample video data of each sample object in the video domain; For each sample video data of the sample object in the video domain, frame sampling is performed on the sample video data to obtain object image data of the sample object in the video domain; Performing speech recognition processing on the sample video data to obtain speech recognition text; inputting the speech recognition text and a preset text prompt into a text summarization model, and performing text summarization processing on the speech recognition text according to the preset text prompt by the text summarization model to obtain a corresponding object description text; The preset text prompt is used to instruct to perform the text summarization task according to the summary example, and the summary example represents outputting key object information of objects in the example text according to a specified format.

5. The method according to claim 1, characterized in that The performing machine learning training on the object representation model to be trained based on the multimodal global features of each of the sample objects in different domains to obtain the trained object representation model comprises: Determining a cross-domain contrastive learning loss based on the multimodal global features of each of the sample objects in different domains; Performing category prediction processing on the multimodal global features of each of the sample objects in each of the domains to obtain a predicted category of each of the sample objects in each of the domains; Determining a cross-domain object classification loss based on the predicted category of each of the sample objects in each of the domains; A loss sum between the cross-domain contrastive learning loss and the cross-domain object classification loss is determined, and machine learning training is performed on the object representation model to be trained based on the loss sum to obtain the trained object representation model.

6. The method according to claim 5, characterized in that The determining of the cross-domain contrastive learning loss based on the multimodal global features of each of the sample objects in different domains includes: Based on the number of the different domains, determining a plurality of cross-domain pairs; each of the cross-domain pairs includes two different domains; For each of the cross-domain pairs, based on the multimodal global features of the same sample object corresponding to the cross-domain pair, a cross-domain positive sample corresponding to the cross-domain pair is constructed; based on the multimodal global features of different sample objects corresponding to the cross-domain pair, a cross-domain negative sample corresponding to the cross-domain pair is constructed; Determine a sub-cross-domain contrastive learning loss of each cross-domain pair based on the cross-domain positive sample and the cross-domain negative sample of each cross-domain pair; Determine statistical values ​​of sub-cross-domain contrastive learning losses of the multiple cross-domain pairs to obtain the cross-domain contrastive learning loss.

7. The method according to claim 5, characterized in that The determining of the cross-domain object classification loss based on the predicted category of each of the sample objects in each of the domains comprises: Determining an object classification loss for each of the domains based on a difference between a predicted category of each of the sample objects in each of the domains and a reference category of the sample object in the domain; Determine the statistical value of the object classification loss of the different domains to obtain the cross-domain object classification loss.

8. An object characterization method, characterized in that: include: Obtain target multimodal data of the target object in the target domain; The target multimodal data includes target object image data and target object description text corresponding to the target object; Inputting the target multimodal data into the encoding network of the object representation model for encoding processing to obtain target multimodal encoding features; Inputting the target multimodal encoding features into the feature interaction network of the object representation model to perform multimodal feature interaction, thereby obtaining the target multimodal global features of the target object in the target domain; The object representation model is trained based on the object representation model training method according to any one of claims 1 to 7.

9. The method according to claim 8, characterized in that The target domain includes a video domain of a target video type, and acquiring target multimodal data of a target object in the target domain includes: Obtain target video data of a target object in a video domain of a target video type; Performing frame sampling on the target video data to obtain the target object image data; The target video data is subjected to speech recognition processing to obtain a target speech recognition text; the target speech recognition text and the preset text prompt are input into a text summarization model, and the target speech recognition text is subjected to text summarization processing according to the preset text prompt by the text summarization model to obtain the target object description text.

10. The method according to claim 8, characterized in that The method further comprises: Acquire a target multimodal global feature of an object to be processed in the target domain; the target object includes the object to be processed; Based on the matching degree between each to-be-matched multimodal global feature in the to-be-matched domain and the target multimodal global feature, determining a candidate object corresponding to the to-be-matched multimodal global feature whose matching degree meets a preset screening condition; A matching result is generated based on the data of the candidate object in the to-be-matched domain.

11. An object representation model training device, characterized in that: include: A multimodal data acquisition unit, configured to acquire multimodal data of each sample object in different domains; The multimodal data of the sample object in each domain includes object image data and object description text corresponding to the sample object; A first encoding processing unit is configured to perform encoding processing by respectively inputting the multimodal data of the sample object in each of the domains into the encoding network of the object representation model to be trained, so as to obtain the multimodal encoding features of the sample object in each of the domains; a multimodal feature interaction unit, configured to perform multimodal feature interaction of each domain by inputting the multimodal encoding features of the sample object in each domain into the feature interaction network of the object representation model to be trained, so as to obtain the multimodal global features of the sample object in each domain; The training unit is configured to perform machine learning training on the object representation model to be trained based on the multimodal global features of each of the sample objects in different domains to obtain the trained object representation model.

12. An object characterization device, characterized in that: A target multimodal data acquisition unit is configured to acquire target multimodal data of a target object in a target domain; the target multimodal data includes target object image data and target object description text corresponding to the target object; A second encoding processing unit is configured to perform encoding processing by inputting the target multimodal data into an encoding network of an object representation model to obtain target multimodal encoding features; An object representation unit is configured to perform multimodal feature interaction by inputting the target multimodal encoding feature into a feature interaction network of the object representation model to obtain a target multimodal global feature of the target object in the target domain; The object representation model is trained based on the object representation model training method according to any one of claims 1 to 7.

13. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the object representation model training method as described in any one of claims 1 to 7, or the object representation method as described in any one of claims 8 to 10.

14. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the object representation model training method as described in any one of claims 1 to 7, or the object representation method as described in any one of claims 8 to 10.

Citation Information

Patent Citations

  • Thyroid nodule image classification method based on ultrasonic and infrared multi-mode images

    CN116051905A

  • Multi-modal representation learning method based on text guide image block screening

    CN117421591A

  • Image-text processing method and device

    CN117893861A