Data processing method and apparatus

By identifying and integrating the visual feature description information of text in image and text processing, the problems of insufficient processing accuracy and quality in existing methods are solved, and more accurate image and text processing effects are achieved.

WO2025190077A1PCT designated stage Publication Date: 2025-09-18HUAWEI TECH CO LTD +1

Patent Information

Application Number
PCT/CN2025/079207
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-12
Filing Date
2025-02-26
Publication Date
2025-09-18

AI Technical Summary

Technical Problem

Existing image and text processing methods have low processing accuracy and quality, and fail to effectively utilize the visual feature information between text and images, resulting in inaccurate processing results.

Method used

By identifying sub-texts in the text, obtaining descriptive information of their visual features and fusing them with the text, the encoding network and task network are used for processing, the cross-modal alignment of images and texts is enhanced, and task processing is performed by combining visual features and text information.

Benefits of technology

It improves the accuracy and quality of image and text processing, promotes cross-modal alignment between text and images through the descriptive information of visual features, and achieves more refined semantic expression and higher quality processing results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025079207_18092025_PF_FP_ABST
    Figure CN2025079207_18092025_PF_FP_ABST
Patent Text Reader

Abstract

A data processing method, which is applied to the field of artificial intelligence. The method comprises: when a task related to image and text processing is executed, acquiring text; recognizing sub-text in the text by means of a first model, wherein the sub-text indicates a first entity having a visual feature; acquiring description information of the first entity, wherein the description information is a visual description for the first entity, the visual description is not included in the text, and the sub-text can be enhanced by means of the description information; and then, on the basis of a fusion result of the description information and the text, obtaining a task processing result by means of an encoding network and a task network. An encoding object in the present application additionally includes the description for the visual feature of the sub-text in the text, so that the richness and accuracy of an encoding result for a visual description of an entity can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

A data processing method and device thereof

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on March 12, 2024, with application number 202410285729.1 and application name “A data processing method and device thereof”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of artificial intelligence, and in particular to a data processing method and device thereof. Background Art

[0003] Artificial Intelligence (AI) is the theory, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a branch of computer science that seeks to understand the essence of intelligence and develop new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.

[0004] Image and text processing tasks mainly involve the processing or generation of multimodal data such as text and images. Image and text processing can be, but is not limited to, image and text retrieval, text-guided image processing (such as image enhancement, image generation, etc.), and other tasks.

[0005] When performing image and text processing tasks, existing methods only perform corresponding tasks by representing the features of the original text (or, also including the original image), and the processing accuracy and quality are low. Summary of the Invention

[0006] In a first aspect, the present application provides a data processing method, which includes: when performing tasks related to image and text processing, obtaining text, identifying sub-text in the text through a first model, wherein the sub-text indicates a first entity with visual features, obtaining description information of the first entity, wherein the description information is a visual description of the first entity, and the visual description is not included in the text, and the sub-text can be enhanced through the description information. Then, based on the fusion result of the description information and the text, the task processing result is obtained through the encoding network and the task network.

[0007] The subtext includes one or more characters and is a part of the text. The first entity can be an object described by the semantics of the subtext. For example, if the subtext is the two characters "panda", the first entity is the entity of panda.

[0008] Here, “an entity with visual characteristics” can be understood as a physical entity that can be directly seen visually.

[0009] Here, “visual description” can be understood as a visual feature description of an entity.

[0010] Compared to encoding only the text, the encoding object of this application adds descriptions of the visual features of the subtext in the text, which can increase the richness and accuracy of the visual description of the entity in the encoding result. In addition, the description information of visual features can facilitate cross-modal alignment between text and images. Compared with using only entity names, the description information of visual features provides a more refined semantic expression, thereby achieving more accurate multimodal alignment.

[0011] In a possible implementation, obtaining the description information of the first entity includes obtaining the description information of the subtext from a preset data set or through a second model.

[0012] The entity description information obtained through the second model can constitute a data set together with the sub-text. During model reasoning, only the description information corresponding to the required sub-text needs to be obtained from the data set, or the sub-text can be processed in real time through the second model during model reasoning to obtain the corresponding description information.

[0013] In one possible implementation, the descriptive information of the sub-text is determined as follows: based on a prompt including the sub-text, the descriptive information of the sub-text is obtained through a second model, and the prompt is used to indicate the determination of visual features that can distinguish the first entity (that is, visual features that distinguish the first entity from other entities) as the descriptive information of the first entity.

[0014] In a possible implementation, the prompt is specifically used to instruct to determine visual features that can help better identify the first entity in the image as the description information of the sub-text.

[0015] Among them, visual features that focus on describing visually distinguishable features of entities are more useful information because, in most image-text tasks, higher-quality processing results can be obtained when the model can better learn the differences between different objects. Therefore, when constructing prompts, the model can be guided to generate features that describe visually distinguishable entities. For example, based on a prompt including the subtext, the description information of the subtext can be obtained through the second model. The prompt is used to indicate the determination of visual features that can distinguish the first entity as the description information of the first entity.

[0016] In a possible implementation, the method further includes: fusing the description information of the sub-text into the text as the description information of the sub-text through a third model to obtain the fusion result.

[0017] In a possible implementation, the description information of the sub-text includes multiple description information of the sub-text. During fusion, multiple description information can be fused into the text, or different description information can be fused into the text separately. Fusion of different description information into the text can obtain multiple fusion results, that is, multiple enhanced texts.

[0018] The task implemented by the task network can be an image-text retrieval task, that is, retrieving images related to (for example, the most relevant) a specified text from a large number of images.

[0019] In one possible implementation, for the image to be matched, the entity in the image can also be identified, and the visual description of the entity can be obtained. The visual description and the image are encoded, and the encoding result is used as the image representation of the image. Compared with encoding only the image, since the encoding object adds the visual description of the entity in the image, the richness and accuracy of the visual description of the entity in the image representation can be increased. In particular, when the visual description is a visual feature that can distinguish the second entity from other entities, the quality of subsequent image and text processing is improved. In addition, visual features can promote cross-modal registration between text and images. Compared with using only entity names, the descriptive information of visual features provides a more refined semantic expression, thereby achieving more accurate multimodal alignment.

[0020] In one possible implementation, for an image to be matched, an image can be obtained, and a second entity in the image can be identified using a fourth model. Descriptive information of the second entity can be obtained, where the descriptive information is a visual description of the second entity. The image and the descriptive information of the second entity can be encoded to obtain an image representation. Furthermore, a task processing result can be obtained based on the fusion result of the descriptive information and the text, as well as the image representation, through an encoding network and a task network. The task network can calculate the similarity between the image representation and the text representation.

[0021] In a possible implementation, the text belongs to a model training sample; the model training sample also includes a label corresponding to the text;

[0022] The method further includes: correcting the label according to the task processing result to obtain a corrected label; and updating the encoding network according to the corrected label.

[0023] During the model training process, since the labels of the acquired training samples correspond to the original text rather than the enhanced text, the same entity may present different appearance features in actual applications. Each entity may have multiple descriptions, which are reasonable in the real world but inconsistent with the actual instance in the image. The diversity of entity visual descriptions may introduce additional noise and affect the performance of the model in fine-grained cross-modal registration. That is to say, it is inaccurate to directly use the labels of the training samples as the labels corresponding to the text before and after augmentation. In an embodiment of the present application, the labels corresponding to the enhanced text are corrected. The impact of excessive diversity of entity visual descriptions is reduced by label correction and denoising, thereby improving the performance of cross-modal retrieval.

[0024] In a possible implementation, correcting the label according to the task processing result to obtain a corrected label includes:

[0025] A corrected label is obtained by weighting the task processing result and the label.

[0026] In a second aspect, the present application provides a data processing device, comprising:

[0027] Acquisition module, used to obtain text;

[0028] A processing module is used to identify subtext in the text through a first model, where the subtext indicates a first entity with visual features; obtain descriptive information of the first entity, where the descriptive information is a visual description of the first entity, and the visual description is not included in the text; and obtain a task processing result based on the fusion result of the descriptive information and the text through an encoding network and a task network, where the task network is used to implement tasks related to image and text processing.

[0029] In a possible implementation, the processing module is specifically configured to obtain the description information of the subtext from a preset data set or through a second model.

[0030] In a possible implementation, the description information of the subtext is determined in the following manner:

[0031] According to the prompt including the subtext, description information of the subtext is obtained through the second model, and the prompt is used to indicate the determination of visual features capable of distinguishing the first entity as the description information of the first entity.

[0032] In a possible implementation, the prompt is specifically used to instruct to determine visual features that can help better identify the first entity in the image as the description information of the sub-text.

[0033] In a possible implementation, the processing module is further configured to:

[0034] The description information of the sub-text is fused into the text as the description information of the sub-text through the third model to obtain the fusion result.

[0035] In a possible implementation, the description information of the subtext includes multiple description information of the subtext;

[0036] The fusion results include multiple ones, and different fusion results are obtained by fusing different description information into the sub-text in the text.

[0037] In a possible implementation, the acquisition module is further used to: acquire an image;

[0038] The processing module is further configured to identify a second entity in the image using a fourth model;

[0039] Acquire description information of the second entity, where the description information is a visual description of the second entity;

[0040] Obtaining an image representation by encoding the image and the description information of the second entity;

[0041] Obtaining a task processing result according to the description information and the text through the encoding network and the task network includes:

[0042] According to the fusion result of the description information and the text, and the image representation, a task processing result is obtained through an encoding network and a task network.

[0043] In a possible implementation, the image-text processing related task is an image-text retrieval task.

[0044] In a possible implementation, the text belongs to a model training sample; the model training sample also includes a label corresponding to the text;

[0045] The device further comprises:

[0046] Correcting the label according to the task processing result to obtain a corrected label;

[0047] The encoding network is updated according to the corrected labels.

[0048] In a possible implementation, correcting the label according to the task processing result to obtain a corrected label includes:

[0049] A corrected label is obtained by weighting the task processing result and the label.

[0050] In a third aspect, an embodiment of the present application provides a data processing device, which may include a memory, a processor, and a bus system, wherein the memory is used to store programs, and the processor is used to execute the programs in the memory to perform the first aspect and any optional method thereof.

[0051] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the above-mentioned first aspect and any optional method thereof.

[0052] In a fifth aspect, an embodiment of the present application provides a computer program, which, when executed on a computer, enables the computer to execute the above-mentioned first aspect and any optional method thereof.

[0053] In a sixth aspect, the present application provides a chip system comprising a processor configured to support the execution of a data processing device to implement the functions described in the aforementioned aspects, such as transmitting or processing the data or information described in the aforementioned methods. In one possible design, the chip system further comprises a memory configured to store program instructions and data necessary for executing the device or training the device. The chip system may consist of a single chip or may include a chip and other discrete components. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] FIG1A is a schematic diagram of a structure of an artificial intelligence main framework;

[0055] 1B and 1C are schematic diagrams of the application system framework of the present invention;

[0056] FIG1D is a schematic diagram of an optional hardware structure of a terminal;

[0057] FIG2 is a schematic diagram of the structure of a server;

[0058] FIG3 is a schematic diagram of a system architecture of the present application;

[0059] Figure 4 shows a process of cloud services;

[0060] FIG5 is a flowchart of a data processing method provided in an embodiment of the present application;

[0061] FIG6 is a schematic diagram of a data processing method provided in an embodiment of the present application;

[0062] FIG7A is a schematic diagram of an effect provided by an embodiment of the present application;

[0063] FIG7B is a schematic diagram of an effect provided by an embodiment of the present application;

[0064] FIG8 is a schematic structural diagram of a data processing device provided in an embodiment of the present application;

[0065] FIG9 is a schematic diagram of a structure of an execution device provided in an embodiment of the present application;

[0066] FIG10 is a schematic diagram of a structure of a training device provided in an embodiment of the present application;

[0067] FIG11 is a schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION

[0068] The following describes the embodiments of the present invention in conjunction with the accompanying drawings. The terms used in the embodiments of the present invention are only used to explain the specific embodiments of the present invention, and are not intended to limit the present invention.

[0069] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0070] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, and this is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0071] As used herein, the terms "substantially," "about," and similar terms are used as terms of approximation, not as terms of degree, and are intended to take into account the inherent variations in measurements or calculations that one of ordinary skill in the art would recognize. Furthermore, the use of "may" when describing embodiments of the present invention refers to "one or more possible embodiments." As used herein, the terms "use," "using," and "used" may be considered synonymous with the terms "utilize," "utilizing," and "utilized," respectively. Additionally, the term "exemplary" is intended to refer to an example or illustration.

[0072] First, let's describe the overall workflow of an AI system. See Figure 1A, which shows a schematic diagram of the main AI framework. This AI framework will be explained from two perspectives: the "intelligent information chain" (horizontal axis) and the "IT value chain" (vertical axis). The "intelligent information chain" reflects the entire process from data acquisition to processing. For example, it could be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, and intelligent execution and output. Throughout this process, data undergoes a condensed journey from "data-information-knowledge-wisdom." The "IT value chain," spanning the underlying infrastructure of human intelligence, information (provided and processed by technology), and the system's industrial ecosystem, reflects the value that AI brings to the information technology industry.

[0073] (1) Infrastructure

[0074] Infrastructure provides computing power for AI systems, enabling communication with the outside world and supporting this through a foundational platform. External communication occurs through sensors; computing power is provided by intelligent chips (CPUs, NPUs, GPUs, ASICs, FPGAs, and other hardware accelerators). The foundational platform includes a distributed computing framework and network-related platform guarantees and support, including cloud storage and computing, and interconnected networks. For example, sensors communicate with the outside world to acquire data, which is then fed into the intelligent chips within the distributed computing system provided by the foundational platform for computation.

[0075] (2) Data

[0076] Data above the infrastructure layer represents data sources for AI. This data includes graphics, images, voice, and text, as well as IoT data from traditional devices. This includes business data from existing systems and sensor data such as force, displacement, liquid level, temperature, and humidity.

[0077] (3) Data processing

[0078] Data processing generally includes data training, machine learning, deep learning, search, reasoning, decision-making, etc.

[0079] Among them, machine learning and deep learning can symbolize and formalize data for intelligent information modeling, extraction, preprocessing, and training.

[0080] Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formalized information to perform machine thinking and solve problems based on reasoning control strategies. Typical functions are search and matching.

[0081] Decision-making refers to the process of making decisions after intelligent information is reasoned, and usually provides functions such as classification, sorting, and prediction.

[0082] (4) General ability

[0083] After the data has undergone the data processing mentioned above, some general capabilities can be further formed based on the results of the data processing, such as algorithms or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.

[0084] (5) Smart products and industry applications

[0085] Smart products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of the overall artificial intelligence solution, which productizes intelligent information decision-making and realizes practical application. Its application areas mainly include: smart terminals, smart transportation, smart medical care, autonomous driving, smart cities, etc.

[0086] First, we will introduce the application scenarios of this application. This application can be applied to, but is not limited to, applications that have the function of performing graphic tasks (hereinafter referred to as graphic processing applications) or cloud services provided by cloud-side servers. The following are introduced respectively:

[0087] Among them, the image and text processing category can include but is not limited to image and text retrieval, text-guided image processing (such as image enhancement, image generation and other tasks), etc.

[0088] 1. Image and text processing applications

[0089] The product form of the embodiment of the present application can be a graphic processing application. The graphic processing application can be run on a terminal device or a cloud-side server.

[0090] Among them, the video processing task in the embodiment of the present application can be: obtaining a task processing result based on text input by the user, or text and image.

[0091] In a possible implementation, an image and text processing application can implement a video processing task based on text, or text and image, input by a user and obtain a task processing result.

[0092] In one possible implementation, a user can open a graphic and text processing application installed on a terminal device and input text, or text and images. The graphic and text processing application can process the text, or text and images input by the user, using a model trained by the method provided in an embodiment of the present application, or using the method provided in an embodiment of the present application, and present the task processing results to the user (the presentation method can be, but is not limited to, display, playback, saving, uploading to the cloud, etc.).

[0093] In one possible implementation, a user can open a graphic and text processing application installed on a terminal device and input text, or text and images. The graphic and text processing application can send the video to a cloud-side server. The cloud-side server processes the video using a model trained using the method provided in an embodiment of the present application, and transmits the task processing results back to the terminal device. The terminal device can present the task processing results to the user (the presentation method can be, but is not limited to, display, playback, saving, uploading to the cloud side, etc.).

[0094] Next, the image and text processing application in the embodiment of this application is introduced from the perspective of functional architecture and product architecture that implements the functions.

[0095] Referring to FIG. 1B , FIG. 1B is a schematic diagram of the functional architecture of an image and text processing application in an embodiment of the present application:

[0096] In one possible implementation, as shown in FIG1B , a graphics processing application 102 may receive input parameters 101 (e.g., including a video) and generate a task processing result 103. The graphics processing application 102 may be executed on, for example, at least one computer system and include computer code that, when executed by one or more computers, causes the computers to execute a model trained using the method provided in the embodiments of the present application.

[0097] Referring to FIG. 1C , FIG. 1C is a schematic diagram of the physical architecture for running a graphic processing application in an embodiment of the present application:

[0098] Referring to FIG1C , FIG1C shows a schematic diagram of a system architecture. The system may include a terminal 100 and a server 200. The server 200 may include one or more servers (FIG1C illustrates one server as an example), and the server 200 may provide image and text processing functions for one or more terminals.

[0099] Among them, the terminal 100 can be installed with an image and text processing application, or a web page related to the image and text processing function can be opened. The above application and web page can provide an interface. The terminal 100 can receive the relevant parameters entered by the user on the image and text processing function interface, and send the above parameters to the server 200. The server 200 can obtain the task processing results based on the received parameters, and return the task processing results to the terminal 100.

[0100] It should be understood that in some optional implementations, the terminal 100 can also complete the action of obtaining the task processing result based on the received parameters by itself without the need for cooperation from the server, and the embodiments of the present application are not limited thereto.

[0101] Next, the product form of the terminal 100 in FIG1C is described;

[0102] The terminal 100 in the embodiment of the present application can be a mobile phone, a tablet computer, a wearable device, an in-vehicle device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc., and the embodiment of the present application does not impose any restrictions on this.

[0103] FIG1D shows a schematic diagram of an optional hardware structure of the terminal 100 .

[0104] 1D , the terminal 100 may include components such as a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), a microphone 162 (optional), a processor 170, an external interface 180, and a power supply 190. Those skilled in the art will appreciate that FIG1D is merely an example of a terminal or multi-function device and does not limit the terminal or multi-function device. The terminal or multi-function device may include more or fewer components than shown, or may combine certain components or have different components.

[0105] The input unit 130 can be used to receive input digital or character information and generate key signal input related to user settings and function control of the portable multifunction device. Specifically, the input unit 130 may include a touch screen 131 (optional) and / or other input devices 132. The touch screen 131 can detect user touch operations on or near it (for example, operations performed on or near the touch screen using a finger, joint, stylus, or any other suitable object) and drive corresponding connected devices according to pre-set programs. The touch screen can detect user touch actions on the touch screen, convert the touch actions into touch signals and transmit them to the processor 170. It can also receive and execute commands sent by the processor 170; the touch signals include at least touch point coordinate information. The touch screen 131 provides an input interface and an output interface between the terminal 100 and the user. Touch screens can be implemented using various types, including resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch screen 131, the input unit 130 may also include other input devices. Specifically, the other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.

[0106] Among them, other input devices 132 can receive input text, or text and images.

[0107] The display unit 140 may be used to display information input by the user or provided to the user, various menus of the terminal 100, interactive interfaces, file display, and / or playback of any multimedia file. In an embodiment of the present application, the display unit 140 may be used to display the interface of an image and text processing application, processing results, etc.

[0108] Memory 120 can be used to store instructions and data. It primarily includes an instruction storage area and a data storage area. The data storage area can store various data, such as multimedia files and text. The instruction storage area can store software units such as the operating system, applications, and instructions required for at least one function, or subsets or extensions thereof. It may also include non-volatile random access memory (RAM). It provides processor 170 with management functions for the hardware, software, and data resources within the computing and processing device, supporting control software and applications. It is also used to store multimedia files and running programs and applications.

[0109] The processor 170 is the control center of the terminal 100. It connects all components of the terminal 100 using various interfaces and circuits. By executing instructions stored in the memory 120 and accessing data stored therein, it executes various functions of the terminal 100 and processes data, thereby providing overall control of the terminal device. Optionally, the processor 170 may include one or more processing units. Preferably, the processor 170 may integrate an application processor and a modem processor, with the application processor primarily processing the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into the processor 170. In some embodiments, the processor and memory may be implemented on a single chip; in other embodiments, they may be implemented on separate chips. The processor 170 may also generate corresponding operational control signals and send them to the corresponding components of the computing and processing device. It may also read and process data in the software, particularly the data and programs in the memory 120, to enable the various functional modules therein to perform their corresponding functions, thereby controlling the corresponding components to operate as instructed.

[0110] Among them, the memory 120 can be used to store software codes related to the data processing method, the processor 170 can execute the steps of the chip's data processing method, and can also schedule other units (such as the above-mentioned input unit 130 and display unit 140) to achieve corresponding functions.

[0111] The RF unit 110 (optional) can be used to send and receive information or receive and send signals during a call. For example, after receiving downlink information from the base station, it is passed to the processor 170 for processing; in addition, it sends the designed uplink data to the base station. Generally, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF unit 110 can also communicate with network devices and other devices via wireless communication. This wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0112] In this embodiment of the present application, the RF unit 110 can send the video to the server 200 and receive the processing result sent by the server 200.

[0113] It should be understood that the radio frequency unit 110 is optional and can be replaced by other communication interfaces, such as a network port.

[0114] The terminal 100 also includes a power supply 190 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 170 through a power management system, thereby managing functions such as charging, discharging, and power consumption through the power management system.

[0115] The terminal 100 further includes an external interface 180 , which may be a standard Micro USB interface or a multi-pin connector, and may be used to connect the terminal 100 to other devices for communication, or to connect a charger to charge the terminal 100 .

[0116] Although not shown, the terminal 100 may also include a flash, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with different functions, etc., which are not described in detail here. Some or all of the methods described below may be applied to the terminal 100 shown in FIG1D .

[0117] Next, the product form of the server 200 in FIG1C is described;

[0118] FIG2 provides a schematic diagram of the structure of a server 200. As shown in FIG2, the server 200 includes a bus 201, a processor 202, a communication interface 203, and a memory 204. The processor 202, the memory 204, and the communication interface 203 communicate with each other via the bus 201.

[0119] Bus 201 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, FIG2 shows only one thick line, but this does not imply that there is only one bus or only one type of bus.

[0120] The processor 202 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0121] The memory 204 may include volatile memory, such as random access memory (RAM). The memory 204 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard drive (HDD), or solid state drive (SSD).

[0122] The memory 204 may be used to store software codes related to the data processing method, and the processor 202 may execute the steps of the data processing method of the chip, and may also schedule other units to implement corresponding functions.

[0123] It should be understood that the above-mentioned terminal 100 and server 200 can be centralized or distributed devices, and the processors in the above-mentioned terminal 100 and server 200 (such as processor 170 and processor 202) can be hardware circuits (such as application specific integrated circuit (ASIC), field-programmable gate array (FPGA), general-purpose processor, digital signal processor (DSP), microprocessor or microcontroller, etc.), or a combination of these hardware circuits. For example, the processor can be a hardware system with an instruction execution function, such as a CPU, DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without an instruction execution function and hardware systems with an instruction execution function.

[0124] It should be understood that the steps related to the model reasoning process in the embodiments of this application involve AI-related operations. When performing AI operations, the instruction execution architecture of the terminal device and server is not limited to the processor-memory architecture described above. The system architecture provided in the embodiments of this application is described in detail below with reference to Figure 3.

[0125] FIG3 is a schematic diagram of the system architecture provided by an embodiment of the present application. As shown in FIG3 , the system architecture 500 includes an execution device 510 , a training device 520 , a database 530 , a client device 540 , a data storage system 550 , and a data acquisition system 560 .

[0126] The execution device 510 includes a calculation module 511, an I / O interface 512, a pre-processing module 513, and a post-processing module 514. The calculation module 511 may include the target model / rule 501, and the pre-processing module 513 and the post-processing module 514 are optional.

[0127] The execution device 510 may be a terminal device or a server that runs the above-mentioned graphic and text processing application.

[0128] The data acquisition device 560 is used to collect training samples. The training samples can be image data, etc. After collecting the training samples, the data acquisition device 560 stores these training samples in the database 530.

[0129] The training device 520 can train the neural network to be trained (such as the first model, the second model, the encoding network, etc. in the embodiment of the present application) based on the training samples maintained in the database 530 to obtain the target model / rule 501.

[0130] It should be understood that the training device 520 can perform a pre-training process on the neural network to be trained based on the training samples maintained in the database 530, or fine-tune the model based on the pre-training.

[0131] It should be noted that, in actual applications, the training samples maintained in the database 530 may not all be collected by the data acquisition device 560, but may also be received from other devices. It should also be noted that the training device 520 may not train the target model / rule 501 entirely based on the training samples maintained in the database 530, but may also obtain training samples from the cloud or other places for model training. The above description should not be used as a limitation on the embodiments of the present application.

[0132] The target model / rule 501 obtained through training with the training device 520 can be applied to different systems or devices, such as the execution device 510 shown in FIG3 . The execution device 510 can be a terminal, such as a mobile phone terminal, a tablet computer, a laptop computer, an augmented reality (AR) / virtual reality (VR) device, an in-vehicle terminal, etc., or a server, etc.

[0133] Specifically, the training device 520 may transfer the trained model to the execution device 510 .

[0134] In Figure 3, the execution device 510 is configured with an input / output (I / O) interface 512 for data interaction with external devices. The user can input data (such as text in the embodiment of the present application, or image and text, etc.) into the I / O interface 512 through the client device 540.

[0135] Preprocessing module 513 and preprocessing module 514 are used to preprocess the input data received by I / O interface 512. It should be understood that preprocessing module 513 and preprocessing module 514 may be absent or only one preprocessing module may be present. If preprocessing module 513 and preprocessing module 514 are absent, computing module 511 may be used directly to process the input data.

[0136] When the execution device 510 preprocesses the input data, or when the computing module 511 of the execution device 510 performs calculations and other related processing, the execution device 510 can call the data, code, etc. in the data storage system 550 for corresponding processing, and can also store the data, instructions, etc. obtained from the corresponding processing in the data storage system 550.

[0137] Finally, the I / O interface 512 provides the processed results to the client device 540 and thus to the user.

[0138] In the scenario shown in FIG3 , the user can manually input data, and this "manual input data" can be operated through the interface provided by I / O interface 512. In another scenario, client device 540 can automatically send input data to I / O interface 512. If user authorization is required for client device 540 to automatically send input data, the user can set the corresponding permissions in client device 540. The user can view the results output by execution device 510 on client device 540, and the specific presentation form can be a display, sound, action, or other specific method. Client device 540 can also serve as a data acquisition terminal, collecting input data input into I / O interface 512 and output results output from I / O interface 512 as new sample data, and storing them in database 530. Of course, collection can also be performed without client device 540, and instead the I / O interface 512 directly stores the input data input into I / O interface 512 and output results output from I / O interface 512 as new sample data in database 530.

[0139] It is worth noting that FIG3 is merely a schematic diagram of a system architecture provided by an embodiment of the present application, and the positional relationships between the devices, components, modules, etc. shown in the figure do not constitute any limitation. For example, in FIG3 , the data storage system 550 is an external memory relative to the execution device 510. In other cases, the data storage system 550 can also be placed in the execution device 510. It should be understood that the execution device 510 can be deployed in the client device 540.

[0140] From the inference side of the model:

[0141] In the embodiment of the present application, the computing module 511 of the above-mentioned execution device 510 can obtain the code stored in the data storage system 550 to implement the steps related to the model reasoning process in the embodiment of the present application.

[0142] In an embodiment of the present application, the computing module 511 of the execution device 510 may include a hardware circuit (such as an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a general-purpose processor, a digital signal processor (DSP), a microprocessor or a microcontroller, etc.), or a combination of these hardware circuits. For example, the training device 520 may be a hardware system with an instruction execution function, such as a CPU, DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without an instruction execution function and hardware systems with an instruction execution function.

[0143] Specifically, the computing module 511 of the execution device 510 can be a hardware system with an execution instruction function, and the steps related to the model reasoning process provided in the embodiment of the present application can be software codes stored in the memory. The computing module 511 of the execution device 510 can obtain the software code from the memory and execute the obtained software code to implement the steps related to the model reasoning process provided in the embodiment of the present application.

[0144] It should be understood that the computing module 511 of the execution device 510 can be a combination of a hardware system that does not have the function of executing instructions and a hardware system that has the function of executing instructions. Some of the steps related to the model reasoning process provided in the embodiment of the present application can also be implemented by the hardware system that does not have the function of executing instructions in the computing module 511 of the execution device 510, which is not limited here.

[0145] From the training side of the model:

[0146] In an embodiment of the present application, the above-mentioned training device 520 can obtain the code stored in the memory (not shown in Figure 3, which can be integrated into the training device 520 or deployed separately from the training device 520) to implement the steps related to model training in the embodiment of the present application.

[0147] In an embodiment of the present application, the training device 520 may include a hardware circuit (such as an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a general-purpose processor, a digital signal processor (DSP), a microprocessor or a microcontroller, etc.), or a combination of these hardware circuits. For example, the training device 520 may be a hardware system with an instruction execution function, such as a CPU, DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without an instruction execution function and hardware systems with an instruction execution function.

[0148] It should be understood that the training device 520 can be a combination of a hardware system that does not have the function of executing instructions and a hardware system that has the function of executing instructions. Some of the steps related to model training provided in the embodiments of the present application can also be implemented by the hardware system in the training device 520 that does not have the function of executing instructions, which is not limited here.

[0149] 2. Functional cloud services for executing graphic and text tasks provided by the server:

[0150] In a possible implementation, the server may provide the terminal with a service for executing graphic and text tasks through an application programming interface (API).

[0151] Among them, the terminal device can send relevant parameters (such as text, or text and images) to the server through the API provided by the cloud. The server can obtain processing results based on the received parameters, etc., and return the processing results to the terminal.

[0152] The description of the terminal and the server can be the same as that of the above embodiments, and will not be repeated here.

[0153] FIG4 shows a process of using a functional cloud service provided by a cloud platform to perform graphic and text tasks.

[0154] 1. Activate and purchase the image and text processing service.

[0155] 2. Users can download the software development kit (SDK) corresponding to the image and text processing service. Cloud platforms usually provide multiple development versions of the SDK for users to choose according to the needs of the development environment, such as JAVA version SDK, Python version SDK, PHP version SDK, Android version SDK, etc.

[0156] 3. After the user downloads the corresponding version of the SDK to the local computer as needed, they import the SDK project into the local development environment, configure and debug it in the local development environment, and develop other functions in the local development environment, forming an application that integrates the functional capabilities of performing graphic and text tasks.

[0157] 4. When a functional application that performs graphic tasks is in use and needs to perform graphic tasks, it can trigger an API call to perform the graphic task. When the application triggers the graphic task function, it initiates an API request to the running instance of the functional service that performs graphic tasks in the cloud environment. The API request carries image data, and the running instance in the cloud environment processes the image to obtain the processing result.

[0158] 5. The cloud environment returns the processing results to the application, thereby completing a function call to execute the graphic and text task.

[0159] Let's take the application scenario of Smart Image Search on mobile phones as an example for a specific description. In the mobile phone album, searching for specific photos by text can help users manage and find photos more easily. This function is especially important for users who have a large number of photos and need to find specific photos quickly. Smart Image Search on mobile phones allows users to search for pictures directly by keywords, and also supports the use of any short descriptive words to describe images. For example, if you enter "watching the sunrise on the top of a mountain" in the album search, the system will automatically retrieve images in the album that match this text description and quickly provide relevant recommendations. In addition, users can also flexibly refine the search description as needed, for example, adding various compound tags such as time, place, people, and semantics. Huawei Smart Image Search on mobile phones not only provides a more convenient way to manage photos, but also allows you to quickly find specific information when needed, saving time and improving efficiency, thereby providing users with a better user experience.

[0160] Through the method of the embodiment of the present application, the entity visual knowledge generated by the large language model can be used to enhance the entity description of the input text description and mobile phone album images. This method helps to reduce the heterogeneity between different modal representations, and thus can provide more accurate album search and retrieval results.

[0161] Since the embodiments of the present application involve the application of a large number of neural networks, in order to facilitate understanding, the relevant terms and related concepts such as neural networks involved in the embodiments of the present application are first introduced below.

[0162] (1) Neural Network

[0163] A neural network can be composed of neural units. A neural unit can refer to an operation unit that takes xs (i.e., input data) and intercept 1 as input. The output of the operation unit can be:

[0164] Where s = 1, 2, ... n, n is a natural number greater than 1, Ws is the weight of xs, and b is the bias of the neural unit. f is the activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal of the neural unit into the output signal. The output signal of the activation function can be used as the input of the next convolutional layer, and the activation function can be a sigmoid function. A neural network is a network formed by connecting multiple single neural units mentioned above, that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to the local receptive field of the previous layer to extract the features of the local receptive field. The local receptive field can be an area composed of several neural units.

[0165] (2) Convolutional neural network (CNN) is a deep neural network with a convolutional structure. Convolutional neural network contains a feature extractor consisting of a convolution layer and a subsampling layer, which can be regarded as a filter. The convolution layer refers to the neuron layer in the convolutional neural network that performs convolution processing on the input signal. In the convolution layer of the convolutional neural network, a neuron can only be connected to some neurons in the adjacent layer. A convolution layer usually contains several feature planes, and each feature plane can be composed of some rectangularly arranged neural units. The neural units in the same feature plane share weights, and the shared weights here are convolution kernels. Shared weights can be understood as the way of extracting features is independent of position. The convolution kernel can be formalized as a matrix of random size, and the convolution kernel can obtain reasonable weights through learning during the training process of the convolutional neural network. In addition, the direct benefit of shared weights is to reduce the connections between the layers of the convolutional neural network, while reducing the risk of overfitting.

[0166] CNN is a very common neural network. As mentioned in the basic concepts introduction above, a convolutional neural network is a deep neural network with a convolutional structure. It is a deep learning architecture. Deep learning architecture refers to the use of machine learning algorithms to perform multiple levels of learning at different levels of abstraction. As a deep learning architecture, CNN is a feed-forward artificial neural network. Each neuron in the feed-forward artificial neural network can respond to the image input.

[0167] (3) Deep Neural Networks

[0168] Deep Neural Network (DNN), also known as multi-layer neural network, can be understood as a neural network with many hidden layers. There is no special metric for "many" here. Based on the position of different layers in DNN, the neural network inside DNN can be divided into three categories: input layer, hidden layer, and output layer. Generally speaking, the first layer is the input layer, the last layer is the output layer, and the layers in between are all hidden layers. The layers are fully connected, that is, any neuron in the i-th layer must be connected to any neuron in the i+1-th layer. Although DNN looks complicated, the work of each layer is actually not complicated. Simply put, it is the following linear relationship expression: in, is the input vector, is the output vector, is the offset vector, W is the weight matrix (also called coefficient), and α() is the activation function. Each layer is just an input vector After such a simple operation, the output vector Since there are many DNN layers, the coefficient W and the offset vector The definition of these parameters in DNN is as follows: Take the coefficient W as an example: Assume that in a three-layer DNN, the linear coefficient from the 4th neuron in the second layer to the 2nd neuron in the third layer is defined as The superscript 3 represents the layer number of the coefficient W, while the subscripts correspond to the third layer index 2 of the output and the second layer index 4 of the input.

[0169] In summary, the coefficient from the kth neuron in the L-1th layer to the jth neuron in the Lth layer is defined as

[0170] It's important to note that the input layer has no W parameter. In deep neural networks, more hidden layers allow the network to better capture complex real-world situations. Theoretically, a model with more parameters has higher complexity and greater "capacity," meaning it can handle more complex learning tasks. Training a deep neural network is essentially the process of learning the weight matrix, with the ultimate goal of obtaining the weight matrices for all layers of a trained deep neural network (a weight matrix formed by the vectors W across many layers).

[0171] (4) Loss function

[0172] During the training of a deep neural network, because we want the output of the deep neural network to be as close as possible to the desired predicted value, we can compare the current network's predicted value with the desired target value and then update the weight vector of each layer of the neural network based on the difference between the two. (Of course, before the first update, there is usually an initialization process, which pre-configures the parameters for each layer in the deep neural network.) For example, if the network's predicted value is too high, the weight vector is adjusted to make it predict a lower value. This adjustment is continued until the deep neural network can predict the desired target value or a value very close to the desired target value. Therefore, it is necessary to predefine "how to compare the difference between the predicted value and the target value." This is the loss function (or objective function), which is an important equation used to measure the difference between the predicted value and the target value. For example, the loss function output value (loss) indicates a greater difference, so training a deep neural network becomes a process of minimizing this loss.

[0173] (5) Backpropagation algorithm

[0174] The back propagation (BP) algorithm can be used to correct the size of the initial model parameters during training, reducing the model's error loss. Specifically, forward propagation of the input signal to the output generates error loss. This error loss information is then backpropagated to update the parameters in the initial model, thereby converging the error loss. The BP algorithm is a backward propagation movement driven by error loss, aiming to obtain optimal model parameters, such as the weight matrix.

[0175] (6) Large language models: A type of AI model designed to understand and generate human language. They are trained on large amounts of text data and can perform a wide range of text tasks. They are characterized by their large size and the large number of parameters they contain.

[0176] (7) Knowledge enhancement: By integrating knowledge and data from both inside and outside the domain into the artificial intelligence system, the system's capabilities in tasks such as understanding, reasoning, and decision-making are improved.

[0177] (8) Image-text retrieval: By performing cross-modal understanding of images and text, the similarity between images and text is modeled, thereby retrieving relevant images for text, or retrieving relevant text for images.

[0178] Image and text processing tasks mainly involve the processing or generation of multimodal data such as text and images. Image and text processing can be, but is not limited to, image and text retrieval, text-guided image processing (such as image enhancement, image generation, etc.), and other tasks.

[0179] When performing image and text processing tasks, existing methods only perform corresponding tasks by representing the features of the original text (or, also including the original image), and the processing accuracy and quality are low.

[0180] In order to solve the above problems, the present invention provides a data processing method. The data processing method of the present invention is described in detail below with reference to the accompanying drawings.

[0181] Referring to Figure 5, Figure 5 is a flow chart of a data processing method provided in an embodiment of the present application. As shown in Figure 5, a data processing method provided in an embodiment of the present application may include steps 501 to 504, and these steps are described in detail below.

[0182] 501. Get text.

[0183] The embodiments of the present application can be applied in the cloud or mobile terminal but are not limited to it.

[0184] In one possible implementation, the text in the image-text processing task can be obtained. For example, in the image-text retrieval task, the text is the text description of the image to be retrieved. In the text-based image processing task (for example, image generation or image enhancement), the text is the guiding text for image processing.

[0185] The text may be input by the user, generated by the system, or obtained in other ways, and the embodiments of the present application are not limited thereto.

[0186] 502. Identify a subtext in the text using a first model, where the subtext indicates a first entity having a visual feature.

[0187] The first model may be a module for identifying and extracting visual terms from text, for example, the first model may be a language model.

[0188] The first model can also be referred to as a subtext recognition module. The subtext recognition module can use name recognition technology to identify and extract visual terms from text. Visual terms are texts of entities with visual features (for example, referred to as first entities in the embodiments of this application). Visual terms can be referred to as subtexts. Subtexts can indicate the first entity with visual features. For example, a text example can be the name corresponding to a visually visible entity.

[0189] In image-text processing tasks, visual terms that contain visual information are often more important than non-visual terms. For example, non-visual terms (such as dates and country names) may not be helpful for image-text processing tasks because their visual features are difficult to describe concisely. In contrast, visual terms (such as "whale" and "school bus") often have stronger visual discriminative features, which facilitates better cross-modal information processing between images and text.

[0190] Therefore, in the embodiment of the present application, after acquiring the text, the first model can be used to identify visual terms (ie, subtexts) from the text. The number of subtexts can be one or more, which is not limited in the embodiment of the present application.

[0191] 503. Obtain description information of the first entity, where the description information is a visual description of the first entity, and the visual description is not included in the text.

[0192] Subtext can help to better process cross-modal information between images and texts. In addition, in order to enable subsequent encoding models to understand the visual features of the identified subtexts more accurately and comprehensively, the visual features of the entity corresponding to the subtext (that is, the first entity) can also be enhanced, thereby obtaining descriptive information that is not included in the text and is the visual features of the first entity. The descriptive information can be used to describe the visual features of the entity, for example, focusing on describing the visually distinguishable features of the entity, such as material, shape, color, etc., so that subsequent encoding models can understand the visual features of the identified subtexts more accurately and comprehensively, thereby promoting fine-grained cross-modal alignment of images and texts.

[0193] Next, we will introduce how to obtain description information.

[0194] In a possible implementation, in order to accelerate the model inference process, a mapping relationship between subtexts and corresponding description information can be pre-built, and the mapping relationship is stored as a data set.

[0195] The description information of each sub-text can be implemented through a machine learning model (for example, the second model in the embodiment of the present application). The machine learning model can be a language model, and a prompt can be constructed to guide the second model to generate the description information of each sub-text.

[0196] Among them, visual features that focus on describing visually distinguishable features of entities are more useful information because, in most image-text tasks, higher-quality processing results can be obtained when the model can better learn the differences between different objects. Therefore, when constructing prompts, the model can be guided to generate features that describe visually distinguishable entities. For example, based on a prompt including the subtext, the description information of the subtext can be obtained through the second model. The prompt is used to indicate the determination of visual features that can distinguish the first entity as the description information of the first entity.

[0197] Taking the second model as a language model as an example, the following prompt template can be designed, where the content after "Question:" is the prompt content, and the content after "Answer:" is the reply format of the language model:

[0198] Question: What are some useful visual features to identify {entity name} in an image?

[0199] A: Here are some useful visual features that can tell people that there is an {entity name} in the image:

[0200] In this template, {entity name} represents the entity in the collected subtext set. To ensure the standardization of the generated visual description outputs, a trailing character "-" is added to the template to ensure that each entity's visual description begins with the trailing character. Furthermore, to clarify the content and standardize the output format of the large language model, two examples are provided in the prompt template to demonstrate the expected output of the model, as shown below:

[0201] Q: What are some helpful features in photos to identify lemurs?

[0202] A: There are several useful visual features for identifying lemurs in photos:

[0203] - Four-limbed primates

[0204] -Black, grey, white, brown or reddish brown

[0205] - Moist, hairless nose with curved nostrils

[0206] -Long tail

[0207] -Big eyes

[0208] -Hairy body

[0209] Q: What are some useful features in a photo to identify a school bus?

[0210] A: There are several useful visual features to identify whether there is a school bus in the photo:

[0211] -Large yellow vehicle

[0212] - "School Bus" written on the side of the car

[0213] -School bus with a stop sign on the side

[0214] - Flashing lights on top of school bus

[0215] -Large windows

[0216] Question: What are some useful visual features to identify {entity name} in an image?

[0217] A: Here are some useful visual features that can tell people that there is an {entity name} in the image:

[0218] -

[0219] Inputting the above prompt template into the large language model yields visual descriptions for each entity, as shown in Figure 7A. These descriptions primarily focus on the visual features of the entity, including color, shape, object parts, quantity, and relationships, making it easier to visually distinguish the entities. Furthermore, because the large language model contains rich knowledge, these descriptions are diverse and detailed, covering a wide range of perspectives.

[0220] The entity description information obtained through the second model can constitute a data set together with the sub-text. During model reasoning, only the description information corresponding to the required sub-text needs to be obtained from the data set, or the sub-text can be processed in real time through the second model during model reasoning to obtain the corresponding description information.

[0221] In a possible implementation, refer to Figure 6, which is a schematic diagram of an application architecture of an embodiment of the present application, wherein Figure 6 includes 101 a sub-text recognition module (text entity recognition module): this module takes a text corpus or a text query as input, uses named entity recognition technology to identify and extract visual terms from the input, and outputs sub-text. 102 an image entity recognition module: this module inputs an image corpus, uses visual entity linking technology to identify specific entities from visual content such as images, and outputs visual entities. 103 an entity description generation module: this module takes sub-text and image entity information as input, uses a large language model and a designed prompt learning template to generate a corresponding visual description for each entity, and outputs a visual description word dictionary. Visual terms can be collected in the corpus of a graphic and text dataset. Specifically, named recognition technology can be used to extract visual terms from the corpus. For example, the sub-text recognition model adopts a model architecture that combines BERT with a conditional random field layer (CRF). The entire process can be illustrated as follows:

[0222] First, the input text is segmented into subwords and converted into corresponding word vectors, which are then fed into the BERT model. The BERT model generates context-dependent representations for each word or subword. These BERT outputs are then used as input to the CRF layer. The CRF layer performs label prediction tasks on the entire label sequence, taking into account the relationship between adjacent labels. Although the named entity recognition model can find potential visual terms, not all entities are suitable for visual-language retrieval. Therefore, further filtering and screening are required to ensure that the selected terms are relevant to the image content and have strong visual features. Through this process, a rich corpus can be constructed that contains a large number of visual terms.

[0223] In one possible implementation, after obtaining the descriptive information corresponding to the sub-text, the descriptive information can be integrated into the text, that is, the descriptive information can be integrated as a description of the corresponding sub-text in the text. The integrated text can be a coherent descriptive sentence, for example, the descriptive information can be added to the text as an attributive of the sub-text.

[0224] Optionally, the action of integrating the description information into the text can be performed by a machine learning model (such as the third model in the embodiment of the present application).

[0225] In a possible implementation, the description information of the sub-text includes multiple description information of the sub-text. During fusion, multiple description information can be fused into the text, or different description information can be fused into the text separately. Fusion of different description information into the text can obtain multiple fusion results, that is, multiple enhanced texts.

[0226] In a possible implementation, referring to FIG6 , FIG6 is a schematic diagram of an application architecture of an embodiment of the present application, wherein FIG6 includes a text sample enhancement module 104: the module inputs a text query and an entity visual description obtained through a visual description dictionary, and outputs a visual description enhanced text. i After that, the entities in the text are first identified through the text recognition module. These entities are used to query the text visual description dictionary to obtain the visual descriptions corresponding to the entities in the text. Based on these visual descriptions, each original text can be expanded into a parallel multi-description enhanced text with different visual description angles. Each enhanced text is generated by fusing the visual description of the entity after the entity of the original text. Since the visual descriptions inserted into different enhanced texts are different, each enhanced text contains unique information. An illustration of the final enhanced sample can be shown below, where K is the number of enhanced samples generated for each sample. After adding the visual description, the enhanced text becomes richer and more diverse. These enhanced texts will be input into the text encoder in parallel for modeling to obtain text representation

[0227] 504. Obtain a task processing result based on the fusion result of the description information and the text through an encoding network and a task network, wherein the task network is used to implement tasks related to image and text processing.

[0228] In one possible implementation, the fusion result can be encoded through the encoding network (or, it can be called feature extraction) to obtain the encoding of the fusion result (also called text representation), and then the downstream task network is used to process the encoding to obtain the task processing result of the target task.

[0229] For example, the target task may be an image-text retrieval task, that is, retrieving images that are relevant (eg, most relevant) to a specified text from a large number of images.

[0230] In one possible implementation, for the image to be matched, the entity in the image can also be identified, and the visual description of the entity can be obtained. The visual description and the image are encoded, and the encoding result is used as the image representation of the image. Compared with encoding only the image, since the encoding object adds the visual description of the entity in the image, the richness and accuracy of the visual description of the entity in the image representation can be increased. In particular, when the visual description is a visual feature that can distinguish the second entity from other entities, the quality of subsequent image and text processing is improved. In addition, visual features can promote cross-modal registration between text and images. Compared with using only entity names, the descriptive information of visual features provides a more refined semantic expression, thereby achieving more accurate multimodal alignment.

[0231] In one possible implementation, for an image to be matched, an image can be obtained, and a second entity in the image can be identified using a fourth model. Descriptive information of the second entity can be obtained, where the descriptive information is a visual description of the second entity. The image and the descriptive information of the second entity can be encoded to obtain an image representation. Furthermore, a task processing result can be obtained based on the fusion result of the descriptive information and the text, as well as the image representation, through an encoding network and a task network. The task network can calculate the similarity between the image representation and the text representation.

[0232] For example, a visual entity recognition module may be used to identify entities in an image. For example, a visual entity linking technique may be used to accurately identify specific entities from visual content such as an image.

[0233] In a possible implementation, refer to FIG6 , which is a schematic diagram of an application architecture of an embodiment of the present application, wherein FIG6 includes an image sample enhancement module 105 : the module inputs image data and entity visual descriptions obtained through a visual description dictionary, and outputs an image representation enhanced with entity descriptions. Similar to the text processing process, for a given image v i First, the image entity recognition module is used to detect the entities in the image, and then these entities are used to query the image visual description dictionary to obtain the visual descriptions corresponding to the entities in the image.

[0234] Next, we use these visual descriptions to perform visual semantic enhancement, as shown in Figure 7B. Image sample v i Modeling through visual encoder to obtain image representation At the same time, multiple parallel visual description information is modeled through the description text encoder to obtain the image visual description representation In addition, when encoding the image and the description information of the corresponding entity, the interaction between the image and the description information (text) can also be carried out. For example, a cross-modal attention module can be constructed in the image representation. Incorporating visual description representation into Perform semantic enhancement to obtain the final enhanced image representation The formula is as follows:

[0235] The image representation Used as query vector, visual description representation is used as the key and value vector, W Q ,W K and W V The learnable weight parameters map different representations to the same dimension. This module allows the image representation to be associated with the visual description, thus achieving semantic enhancement of the image.

[0236] In a possible implementation, referring to FIG6 , FIG6 is a schematic diagram of an application architecture of an embodiment of the present application, wherein, in the offline generation process of the entity visual description dictionary, entities in text and images can be mined from the text corpus and image corpus with the help of the sub-text recognition module and the image entity recognition module. Then, the entity description generation module uses a large language model and a prompt template to generate visual descriptions for sub-text and image entities respectively. Finally, a text visual description dictionary and an image visual description dictionary are obtained. Multimodal retrieval based on visual description involves multiple steps. First, the input text and image obtain entity information through the sub-text recognition module and the image entity recognition module. Then, the entity visual description is embedded into the input sample through the text sample enhancement module and the image sample enhancement module to achieve sample enhancement. Finally, the interference description denoising module is used to filter out unreasonable visual descriptions or correct labels with unreasonable visual descriptions.

[0237] In this embodiment of the present application, a dual-encoder model architecture can be used as both the encoding model and the task model to calculate similarity between the representation of a given image and the entity representations in the entity database. Through this matching process, entities that are highly similar to the image can be found and considered as recognized visual entities in the image. This transforms the image entity recognition task into an image-to-text retrieval task.

[0238] For example, an entity database containing visual entities of various granularities can be constructed. This diverse entity library helps to more comprehensively understand and recognize image content. The CLIP pre-trained model can then be used as a dual encoder model. For the input image, an image encoder is used to model and generate a representation of the image. Then, the entity text that matches the recognized entity in the image is retrieved by calculating the dot product value between the entity text representation and the image representation. Given that the entity database may contain millions of entities, calculating the dot product score of all entities may be very expensive. Therefore, an approximate algorithm of maximum inner product search can be used to improve operational efficiency and reduce storage overhead, thereby performing entity matching more efficiently. The visual entity module enables accurate identification of visual entities from images in an efficient manner.

[0239] During the model training process, since the labels of the acquired training samples correspond to the original text rather than the enhanced text, the same entity may present different appearance features in actual applications. Each entity may have multiple descriptions, which are reasonable in the real world but inconsistent with the actual instance in the image. The diversity of entity visual descriptions may introduce additional noise and affect the performance of the model in fine-grained cross-modal registration. That is to say, it is inaccurate to directly use the labels of the training samples as the labels corresponding to the text before and after augmentation. In the embodiment of the present application, the labels corresponding to the enhanced text are corrected.

[0240] In one possible implementation, the text belongs to a model training sample; the model training sample also includes a label corresponding to the text; the label can be corrected according to the task processing result to obtain a corrected label, and the encoding network can be updated according to the corrected label, for example, the loss is determined according to the corrected label, and the encoding network is updated according to the loss.

[0241] In a possible implementation, the corrected label may be obtained by weighting the task processing result and the label.

[0242] Taking the target task of image-text matching as an example, the above-mentioned correction of labels can be implemented by the 106 interference description denoising module in the embodiment corresponding to Figure 6. The input of this module is the label of the original sample and the image-text matching prediction obtained by the dual encoder model, and the output is the denoised corrected label. In practical applications, the same entity may present different appearance features in different images. Each entity may have multiple descriptions that are reasonable in the real world but inconsistent with the actual instance in the image. The diversity of entity visual descriptions may introduce additional noise, affecting the performance of the model in fine-grained cross-modal registration.

[0243] To address this issue, the module introduces a label correction denoising method, which enables the model to adaptively identify which entities’ visual descriptions are noisy and perform label correction on the noisy data.

[0244] Specifically, for the image-to-text retrieval task, the input sample pair (text t i and image v i ), we first let the model predict their labels as follows:

[0245] in, For image v i Features, For text t i characteristic, τ is the temperature coefficient, N is a batch Then we use the original label y i And the model predicted label p(v i ,t i ) to adaptively adjust the target label The formula is as follows:

[0246] Among them, ω∈(0,1) is used to balance the original label and the label predicted by the model. In this way, the original noisy label y can be replaced with the adjusted label y* during the training process. For the denoising loss function of the image-to-text retrieval task, the specific formula is as follows:

[0247] The distracting description denoising module reduces the impact of excessive diversity in entity visual descriptions through label correction denoising, thereby improving the performance of cross-modal retrieval.

[0248] Next, taking the image and text retrieval task as an example, we will give a schematic diagram of the model reasoning process:

[0249] S1: The query text and stored image data are passed through the subtext recognition module and the image vision module to mine the entity information contained in the text and image.

[0250] S2: Input the mined entities into the visual description dictionary to obtain the visual description information corresponding to the entities.

[0251] S3: The query text and the corresponding visual description are passed through the text sample enhancement module to obtain the visual description enhanced text.

[0252] S4: The stored image and the corresponding visual description are passed through the image sample enhancement module to obtain a visual description enhanced image.

[0253] S5: Visual description augmented text and visual description augmented image are encoded through a dual encoder model, and their feature embeddings are mapped into a shared embedding space.

[0254] S6: In the shared embedding space, the similarity between the query text and the stored image is calculated by cosine similarity.

[0255] S7: Perform similarity ranking and return search results in descending order of similarity.

[0256] Regarding the entity description generation module, the scope of this patent is not limited to a specific generation model or a specific prompt template. Any method that automatically generates a visual description of an entity through a model is included in the scope of protection of this patent. Similarly, the implementation method of the interference description denoising module is not limited, and various noise reduction or sample filtering techniques can be used to denoise the input samples. The application of these methods is within the scope of protection of this patent. In addition, the core idea of ​​this patent is to use the knowledge of large language models to improve image-text retrieval tasks, which is also included in the scope of protection of this patent.

[0257] 8 , which is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application. As shown in FIG8 , a data processing device provided in an embodiment of the present application, the device 800 includes:

[0258] Acquisition module 801, used to acquire text;

[0259] For a detailed description of the acquisition module 801 , reference may be made to the description of step 501 in the above embodiment, which will not be repeated here.

[0260] The processing module 802 is used to identify a subtext in the text through a first model, where the subtext indicates a first entity with visual features; obtain descriptive information of the first entity, where the descriptive information is a visual description of the first entity, and the visual description is not included in the text; and obtain a task processing result based on the fusion result of the descriptive information and the text through an encoding network and a task network, where the task network is used to implement tasks related to image and text processing.

[0261] For a detailed description of the processing module 802 , reference may be made to the description of steps 502 to 504 in the above embodiment, which will not be repeated here.

[0262] In a possible implementation, the processing module is specifically configured to obtain the description information of the subtext from a preset data set or through a second model.

[0263] In a possible implementation, the description information of the subtext is determined in the following manner:

[0264] According to the prompt including the subtext, description information of the subtext is obtained through the second model, and the prompt is used to indicate the determination of visual features capable of distinguishing the first entity as the description information of the first entity.

[0265] In a possible implementation, the prompt is specifically used to instruct to determine visual features that can help better identify the first entity in the image as the description information of the sub-text.

[0266] In a possible implementation, the processing module is further configured to:

[0267] The description information of the sub-text is fused into the text as the description information of the sub-text through the third model to obtain the fusion result.

[0268] In a possible implementation, the description information of the subtext includes multiple description information of the subtext;

[0269] The fusion results include multiple ones, and different fusion results are obtained by fusing different description information into the sub-text in the text.

[0270] In a possible implementation, the acquisition module is further used to: acquire an image;

[0271] The processing module is further configured to identify a second entity in the image using a fourth model;

[0272] Acquire description information of the second entity, where the description information is a visual description of the second entity;

[0273] Obtaining an image representation by encoding the image and the description information of the second entity;

[0274] Obtaining a task processing result according to the description information and the text through the encoding network and the task network includes:

[0275] According to the fusion result of the description information and the text, and the image representation, a task processing result is obtained through an encoding network and a task network.

[0276] In a possible implementation, the image-text processing related task is an image-text retrieval task.

[0277] In a possible implementation, the text belongs to a model training sample; the model training sample also includes a label corresponding to the text;

[0278] The device further comprises:

[0279] Correcting the label according to the task processing result to obtain a corrected label;

[0280] The encoding network is updated according to the corrected labels.

[0281] In a possible implementation, correcting the label according to the task processing result to obtain a corrected label includes:

[0282] A corrected label is obtained by weighting the task processing result and the label.

[0283] Next, a terminal device provided in an embodiment of the present application is introduced. Please refer to Figure 9. Figure 9 is a structural diagram of a terminal device provided in an embodiment of the present application. The terminal device 900 can be specifically manifested as a virtual reality VR device, a mobile phone, a tablet, a laptop computer, a smart wearable device, etc., which is not limited here. Specifically, the terminal device 900 includes: a receiver 901, a transmitter 902, a processor 903 and a memory 904 (wherein the number of processors 903 in the terminal device 900 can be one or more, and Figure 9 takes one processor as an example), wherein the processor 903 may include an application processor 9031 and a communication processor 9032. In some embodiments of the present application, the receiver 901, the transmitter 902, the processor 903 and the memory 904 may be connected via a bus or other means.

[0284] The memory 904 may include a read-only memory and a random access memory, and provides instructions and data to the processor 903. A portion of the memory 904 may also include non-volatile random access memory (NVRAM). The memory 904 stores processor and operation instructions, executable modules, or data structures, or subsets or extended sets thereof. The operation instructions may include various operation instructions for implementing various operations.

[0285] Processor 903 controls the operation of the execution device. In specific applications, the various components of the execution device are coupled together via a bus system. In addition to a data bus, the bus system may also include a power bus, a control bus, and a status signal bus. However, for clarity, all bus systems are referred to as a bus system in the figure.

[0286] The methods disclosed in the above embodiments of the present application can be applied to or implemented by the processor 903. The processor 903 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor 903 or by software instructions. The above processor 903 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor, or a microcontroller, and can further include an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The processor 903 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present application can be directly implemented as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 904. Processor 903 reads information from memory 904 and, in conjunction with its hardware, completes the steps involved in the model training or model inference process in the above method.

[0287] Receiver 901 can be used to receive input digital or character information and generate signal input related to executing device-related settings and function control. Transmitter 902 can be used to output digital or character information through the first interface. Transmitter 902 can also be used to send instructions to the disk pack through the first interface to modify data in the disk pack. Transmitter 902 can also include a display device such as a display screen.

[0288] The embodiment of the present application also provides a server. Please refer to Figure 10. Figure 10 is a schematic diagram of the structure of the server provided in the embodiment of the present application. The server 1000 may have relatively large differences due to different configurations or performances. It may include one or more central processing units (CPU) 1010 (for example, one or more processors) and memory 1032, and one or more storage media 1030 (for example, one or more mass storage devices) for storing application programs 1042 or data 1044. Among them, the memory 1032 and the storage medium 1030 can be temporary storage or permanent storage. The program stored in the storage medium 1030 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1010 can be configured to communicate with the storage medium 1030 to execute a series of instruction operations in the storage medium 1030 on the server 1000.

[0289] The server 1000 may also include one or more power supplies 1026, one or more wired or wireless network interfaces 1050, one or more input and output interfaces 1058; or one or more operating systems 1041, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0290] In an embodiment of the present application, the central processing unit 1010 is used to execute actions related to model training or model reasoning in the above embodiments.

[0291] An embodiment of the present application also provides a computer program product, which, when running on a computer, enables the computer to execute the steps executed by the aforementioned execution device, or enables the computer to execute the steps executed by the aforementioned training device.

[0292] A computer-readable storage medium is also provided in an embodiment of the present application, which stores a program for signal processing. When the computer-readable storage medium is run on a computer, it enables the computer to execute the steps executed by the aforementioned execution device, or enables the computer to execute the steps executed by the aforementioned training device.

[0293] The execution device, training device or terminal device provided in the embodiments of the present application can specifically be a chip, and the chip includes: a processing unit and a communication unit, the processing unit can be, for example, a processor, and the communication unit can be, for example, an input / output interface, a pin or a circuit, etc. The processing unit can execute the computer execution instructions stored in the storage unit, so that the chip in the execution device executes the data processing method described in the above embodiment, or so that the chip in the training device executes the data processing method described in the above embodiment. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit can also be a storage unit located outside the chip in the wireless access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.

[0294] Specifically, see Figure 11, which is a schematic diagram of the structure of a chip provided in an embodiment of the present application. The chip can be represented as a neural network processor NPU 1100. NPU 1100 is mounted on the host CPU (host CPU) as a coprocessor and is assigned tasks by the host CPU. The core of the NPU is arithmetic circuit 1103, which is controlled by controller 1104 to extract matrix data from memory and perform multiplication operations.

[0295] In some implementations, the arithmetic circuit 1103 includes multiple processing units (PEs). In some implementations, the arithmetic circuit 1103 is a two-dimensional systolic array. The arithmetic circuit 1103 may also be a one-dimensional systolic array or other electronic circuitry capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit 1103 is a general-purpose matrix processor.

[0296] For example, assume there are input matrix A, weight matrix B, and output matrix C. The arithmetic circuit retrieves the corresponding data of matrix B from weight memory 1102 and caches it on each PE in the arithmetic circuit. The arithmetic circuit retrieves the data of matrix A from input memory 1101 and performs a matrix operation on matrix B. The partial or final matrix result is stored in accumulator 1108.

[0297] Unified memory 1106 is used to store input and output data. Weight data is directly transferred to weight memory 1102 through the Direct Memory Access Controller (DMAC) 1105. Input data is also transferred to unified memory 1106 through the DMAC.

[0298] BIU stands for Bus Interface Unit, i.e., bus interface unit 1110 , which is used for interaction between the AXI bus, DMAC, and instruction fetch buffer (IFB) 1109 .

[0299] The bus interface unit 1110 (BIU) is used for the instruction fetch memory 1109 to obtain instructions from the external memory, and is also used for the storage unit access controller 1105 to obtain the original data of the input matrix A or the weight matrix B from the external memory.

[0300] DMAC is mainly used to move input data in the external memory DDR to the unified memory 1106 or to move weight data to the weight memory 1102 or to move input data to the input memory 1101.

[0301] The vector calculation unit 1107 includes multiple operation processing units. When necessary, it further processes the output of the operation circuit 1103, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. It is mainly used for non-convolutional / fully connected layer network calculations in neural networks, such as batch normalization, pixel-level summation, and upsampling of feature planes.

[0302] In some implementations, the vector calculation unit 1107 can store the processed output vector in the unified memory 1106. For example, the vector calculation unit 1107 can apply a linear function or a nonlinear function to the output of the operation circuit 1103, such as linear interpolation of the feature plane extracted by the convolution layer, or accumulate a vector of values ​​to generate an activation value. In some implementations, the vector calculation unit 1107 generates a normalized value, a pixel-level summed value, or both. In some implementations, the processed output vector can be used as an activation input to the operation circuit 1103, for example, for use in subsequent layers in a neural network.

[0303] An instruction fetch buffer 1109 connected to the controller 1104 is used to store instructions used by the controller 1104;

[0304] Unified memory 1106, input memory 1101, weight memory 1102, and instruction fetch memory 1109 are all on-chip memories. External memories are private to the NPU hardware architecture.

[0305] The processor mentioned in any of the above places can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the above program.

[0306] It should also be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.

[0307] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course can also be implemented by special hardware including application-specific integrated circuits, special CPUs, special memories, special components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits or special circuits, etc. However, for the present application, software program implementation is a better implementation method in most cases. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer's floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., and includes a number of instructions to enable a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods described in each embodiment of the present application.

[0308] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0309] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a training device or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website, a computer, a training device or a data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

Claims

1. A data processing method, characterized in that: The method comprises: Get text; identifying, by a first model, a subtext in the text, where the subtext is a text of a first entity having visual features; Obtaining description information of the first entity, where the description information is a visual description of the first entity, and the visual description is not included in the text; According to the fusion result of the description information and the text, a task processing result is obtained through an encoding network and a task network, wherein the task network is used to implement tasks related to image and text processing.

2. The method according to claim 1, characterized in that The acquiring the description information of the first entity includes: The description information of the subtext is obtained from a preset data set or through a second model.

3. The method according to claim 1 or 2, characterized in that The description information of the subtext is determined in the following manner: According to the prompt including the subtext, description information of the subtext is obtained through the second model, and the prompt is used to indicate the determination of visual features capable of distinguishing the first entity as the description information of the first entity.

4. The method according to claim 3, characterized in that The prompt is specifically used to indicate the determination of visual features that can help better identify the first entity in the image as the description information of the sub-text.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: The description information of the sub-text is fused into the text as the description information of the sub-text through the third model to obtain the fusion result.

6. The method according to claim 5, characterized in that The description information of the subtext includes a plurality of description information of the subtext; The fusion results include multiple ones, and different fusion results are obtained by fusing different description information into the sub-text in the text.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Acquire images; identifying a second entity in the image using a fourth model; Acquire description information of the second entity, where the description information is a visual description of the second entity; Obtaining an image representation by encoding the image and the description information of the second entity; Obtaining a task processing result according to the description information and the text through the encoding network and the task network includes: According to the fusion result of the description information and the text, and the image representation, a task processing result is obtained through an encoding network and a task network.

8. The method according to any one of claims 1 to 7, characterized in that: The image-text processing related task is an image-text retrieval task.

9. The method according to any one of claims 1 to 8, characterized in that: The text belongs to a model training sample; the model training sample also includes a label corresponding to the text; The method further comprises: Correcting the label according to the task processing result to obtain a corrected label; The encoding network is updated according to the corrected labels.

10. The method according to claim 9, characterized in that Correcting the label according to the task processing result to obtain a corrected label includes: A corrected label is obtained by weighting the task processing result and the label.

11. A data processing device, characterized in that: The device comprises: Acquisition module, used to obtain text; A processing module is used to identify subtext in the text through a first model, where the subtext indicates a first entity with visual features; obtain descriptive information of the first entity, where the descriptive information is a visual description of the first entity, and the visual description is not included in the text; and obtain a task processing result based on the fusion result of the descriptive information and the text through an encoding network and a task network, where the task network is used to implement tasks related to image and text processing.

12. The device according to claim 11, characterized in that The processing module is specifically configured to obtain the description information of the subtext from a preset data set or through a second model.

13. The device according to claim 11 or 12, characterized in that The description information of the subtext is determined in the following manner: According to the prompt including the subtext, description information of the subtext is obtained through the second model, and the prompt is used to indicate the determination of visual features capable of distinguishing the first entity as the description information of the first entity.

14. The device according to claim 13, characterized in that The prompt is specifically used to indicate the determination of visual features that can help better identify the first entity in the image as the description information of the sub-text.

15. The device according to any one of claims 11 to 14, characterized in that The processing module is further configured to: The description information of the sub-text is fused into the text as the description information of the sub-text through the third model to obtain the fusion result.

16. The device according to claim 15, characterized in that The description information of the subtext includes a plurality of description information of the subtext; The fusion results include multiple ones, and different fusion results are obtained by fusing different description information into the sub-text in the text.

17. The device according to any one of claims 11 to 16, characterized in that The acquisition module is further used to: acquire an image; The processing module is further configured to identify a second entity in the image using a fourth model; Acquire description information of the second entity, where the description information is a visual description of the second entity; Obtaining an image representation by encoding the image and the description information of the second entity; Obtaining a task processing result according to the description information and the text through the encoding network and the task network includes: According to the fusion result of the description information and the text, and the image representation, a task processing result is obtained through an encoding network and a task network.

18. The device according to any one of claims 11 to 17, characterized in that The image-text processing related task is an image-text retrieval task.

19. The device according to any one of claims 11 to 18, characterized in that The text belongs to a model training sample; the model training sample also includes a label corresponding to the text; The device further comprises: Correcting the label according to the task processing result to obtain a corrected label; The encoding network is updated according to the corrected labels.

20. The device according to claim 19, characterized in that Correcting the label according to the task processing result to obtain a corrected label includes: A corrected label is obtained by weighting the task processing result and the label.

21. A computer storage medium, characterized in that The computer storage medium stores one or more instructions that, when executed by one or more computers, cause the one or more computers to perform the operations of the method of any one of claims 1 to 10.

22. A computer program product, characterized in that The method comprises computer-readable instructions, which, when executed on a computer device, cause the computer device to execute the method according to any one of claims 1 to 10.

23. A system comprising at least one processor and at least one memory; the processor and the memory are connected via a communication bus and communicate with each other; The at least one memory is used to store code; The at least one processor is configured to execute the code to perform the method according to any one of claims 1 to 10.

24. A chip comprising a processor, characterized in that: The processor is used to support a data processing device to implement the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Image description model training method based on modal enhancement and image description method

    CN115238118A

  • Fine adjustment method of visual language pre-training model and image-text retrieval method

    CN115391588A

  • Model pre-training method, model training method, data processing method and device

    CN115982330A

  • Intelligent Systems and Methods for Visual Search Queries

    US20220092105A1

Cited By

  • Behavior recognition model training method and device, equipment, storage medium and product

    CN121305266A