Multi-modal data processing method and device, equipment, medium and program product
By performing feature space mapping on multi-modal data, the problem of semantic gap in multi-modal language models is solved, the accuracy and robustness of the model are improved, and more accurate information processing is achieved.
Patent Information
- Application Number
- CN202410931636.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-10-29
AI Technical Summary
The semantic gap between different modalities in multimodal language models leads to reduced model accuracy, and methods to improve model accuracy are urgently needed.
By encoding the non-text data corresponding to the multi-modal task, the feature vectors are obtained, and feature space mapping of global information and local information is performed to reduce information loss. The global feature vectors and local feature vectors are input into the language model to generate more accurate Process the results.
It effectively improves the accuracy and robustness of multi-modal language models, reduces computing power consumption, and enhances the model's ability to understand non-text data information.
Smart Images

Figure CN118861982A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to a multimodal data processing method, apparatus, device, medium and program product. Background Art
[0002] Multimodal Language Model (MLM) is an artificial intelligence system that combines natural language processing, computer vision, speech recognition and other technologies. It can process and fuse input data of different modalities (such as text, images, audio, etc.) and obtain processing results. At present, there is a semantic gap between different modalities in multimodal language model technology, which reduces the accuracy of the model.
[0003] Therefore, a method that can improve the accuracy of the model is urgently needed. Summary of the invention
[0004] In view of this, the present disclosure provides a multimodal data processing method, a multimodal data processing device, an electronic device, a computer-readable storage medium and a computer program product, which can improve the model accuracy.
[0005] In a first aspect, the present disclosure provides a multimodal data processing method, the method comprising:
[0006] Acquire non-text data corresponding to the multimodal task, and encode the non-text data to obtain a feature vector of the non-text data;
[0007] Performing feature space mapping of global information and feature space mapping of local information on the feature vector of the non-text data to obtain a global feature vector and a local feature vector of the feature vector of the non-text data in a text feature space;
[0008] The global feature vector and the local feature vector are input into a language model to obtain a processing result of the multimodal task.
[0009] In a second aspect, the present disclosure provides a multimodal data processing device, the device comprising:
[0010] A data acquisition module, used to acquire non-text data corresponding to the multimodal task, and encode the non-text data to obtain a feature vector of the non-text data;
[0011] A mapping module, used for performing feature space mapping of global information and feature space mapping of local information on the feature vector of the non-text data, to obtain a global feature vector and a local feature vector of the feature vector of the non-text data in a text feature space;
[0012] The task processing module is used to input the global feature vector and the local feature vector into a language model to obtain a processing result of the multimodal task.
[0013] In a third aspect, the present disclosure provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the above method by executing the computer instructions.
[0014] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the above method.
[0015] In a fifth aspect, the present disclosure provides a computer program product, including computer instructions, and the computer instructions are used to enable a computer to execute the above method.
[0016] In the technical solutions of some embodiments of the present disclosure, after encoding the non-text data corresponding to the multimodal task, a feature vector of the non-text data in the non-text feature space can be obtained. The global feature vector obtained after mapping the feature space of global information to the feature vector of the non-text data can reflect the global features of the non-text data, and the local feature vector obtained after mapping the feature space of local information to the feature vector of the non-text data can reflect the local features of the non-text data. Inputting the global feature vector and the local feature vector into the language model can reduce the information loss of the non-text data, so that the language model can obtain relatively rich information of the non-text data. Based on this relatively rich information, the language model can generate relatively accurate processing results. In this way, the purpose of improving the accuracy of the model is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 It is a schematic diagram of a multimodal language model;
[0019] Figure 2 is a flowchart of a multimodal data processing method provided by some embodiments of the present disclosure;
[0020] Figure 3 is a module schematic diagram of a connection model provided in some embodiments of the present disclosure;
[0021] Figure 4 is a schematic diagram of a multimodal language model provided by some embodiments of the present disclosure;
[0022] Figure 5 is a module schematic diagram of a multimodal data processing device provided in some embodiments of the present disclosure;
[0023] Figure 6 It is a schematic diagram of the structure of an electronic device provided in some embodiments of the present disclosure. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0025] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0026] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.
[0027] Herein, unless explicitly stated, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.
[0028] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition, use, storage or deletion of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0029] It is understandable that before using the technical solutions disclosed in the various embodiments of the present disclosure, the types, scopes of use, usage scenarios, etc. of the information involved in the present disclosure should be informed to relevant users and their authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations. The relevant users may include any type of right holders, such as individuals, enterprises, and groups.
[0030] For example, in response to receiving an active request from a user, a prompt message is sent to the relevant user to clearly prompt the relevant user that the operation requested to be performed will require obtaining and using the information of the relevant user, so that the relevant user can independently choose whether to provide information to software or hardware such as an electronic device, application, server or storage medium that executes the operation of the technical solution of the present disclosure based on the prompt message.
[0031] As an optional but non-limiting implementation, in response to receiving an active request from a relevant user, a prompt message is sent to the relevant user, for example, in the form of a pop-up window, in which the prompt message may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to select "agree" or "disagree" to provide information to the electronic device.
[0032] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0033] Before explaining the solution of the present disclosure, the feature vector and feature space in machine learning are first explained.
[0034] A feature vector is a numerical vector extracted from raw data (such as text, images, audio, etc.) that can be understood and processed by machine learning algorithms. In practical applications, a feature vector can be represented as an n-dimensional numerical array, where each dimension represents a feature of the raw data, and n represents the number of features of the raw data. For example, the feature vector of an image may include the brightness and color of the image, and the feature vector of a text may include the word frequency, TF-IDF value, etc. of the text. Different feature vectors can represent different raw data. For example, if the brightness of image A is 11 and the color is yellow, and the brightness of image B is 30 and the color is red, then the feature vector (11, yellow) can be used to represent image A, and the feature vector (30, red) can be used to represent image B. Generally speaking, the more dimensions a feature vector has (that is, the more features it has), the more accurate the description of the raw data is.
[0035] The feature space is the space where the feature vector is located. The dimension of the feature space is determined by the dimension of the feature vector. Since the raw data of different modalities are described from different dimensions, for example, images are described from dimensions such as brightness and color, and texts are described from dimensions such as word frequency and TF-IDF value, the raw data of different modalities correspond to different feature spaces. In other words, the feature vectors extracted from the raw data of different modalities can be located in different feature spaces, and the feature vectors extracted from the raw data of the same modality can be located in the same feature space. For example, the feature vector A extracted from image A and the feature vector B extracted from image B can be located in feature space 1, and the feature vector C extracted from text C and the feature vector C extracted from text D can be located in feature space 2. In the same feature space, the distance between different feature vectors can represent the degree of similarity between different raw data. For example, in the same feature space, if the feature vector A of image A is close to the feature vector B of image B, it can be considered that images A and B are similar; but if the feature vector A is far away from the feature vector B, it can be considered that images A and B are very different.
[0036] In multimodal language model technology, different encoders are used to encode raw data of different modalities to obtain feature vectors of different modalities. For example, a visual encoder is used to encode an image to obtain an image feature vector; a text encoder is used to encode a text to obtain a text feature vector. Feature vectors of different modalities have their own corresponding feature spaces.
[0037] Based on the above description, the reason why there is a semantic gap in multimodal language model technology is that the feature space corresponding to the feature vectors of some modalities may be different from the feature space of the language model. In order to solve this semantic gap problem, a connector is usually set between the non-text encoder and the language model to map the feature vector extracted by the non-text encoder to the text feature space. The so-called non-text encoder is an encoder other than the text encoder, such as a visual encoder.
[0038] For easier understanding, please refer to Figure 1 , a schematic diagram of a multimodal language model. Figure 1In the above, images and texts can be used as raw data. By encoding the image through the visual encoder, an image feature vector in the image feature space can be obtained. By encoding the text through the text encoder, a text feature vector in the text feature space can be obtained. Since the language model is based on the text feature space, the image feature vector output by the visual encoder can be mapped to the text feature space through the visual language connector, and then the mapped feature vector can be input into the language model. In this way, the semantic gap problem is effectively avoided. And because the text feature vector is originally in the text feature space, the text feature vector can be directly input into the language model.
[0039] The multimodal language model can be designed according to actual needs. For example, the original data of the multimodal language model can include audio and text, or images and audio. For another example, when the original data of the multimodal language model includes audio, the audio can be encoded by an audio encoder to obtain an audio feature vector in the audio feature space. The connector between the audio encoder and the language model can be an audio language connector, which can map the audio feature vector output by the audio encoder to the text feature space. Therefore, Figure 1 The illustrated multimodal language model does not constitute a limitation of the present disclosure.
[0040] In some technologies, the connector between the non-text encoder and the language model is based on a linear network connector, which uses a simple one-to-one mapping and consumes a lot of computing power. For this reason, in other technologies, the connector is changed to a mapping based on a global attention mechanism. Although this type of connector effectively reduces computing power consumption, it also brings about a large information loss and reduces the robustness of the multimodal language model.
[0041] In view of this, the present disclosure provides a multimodal data processing method, which can effectively improve the accuracy of the multimodal language model while reducing computing power consumption. The multimodal data processing method can be applied to electronic devices. The electronic devices include but are not limited to tablet computers, desktop computers, laptop computers, servers, etc. Specifically, the multimodal data processing method can be used to process non-text data in the multimodal language model. For example, it can be used to Figure 1 Process the images in .
[0042] Combined with reference Figure 2 , which is a flow chart of a multimodal data processing method provided in some embodiments of the present disclosure. Figure 2 In the method, the multimodal data processing method comprises the following steps:
[0043] Step S21, obtaining non-text data corresponding to the multimodal task, and encoding the non-text data to obtain a feature vector of the non-text data.
[0044] The so-called multimodal task refers to a task involving multiple modal data. The multiple modal data includes but is not limited to audio, image, video, text, etc. The non-text data corresponding to different multimodal tasks may not be exactly the same. For example, assuming that in multimodal task A, it is necessary to determine whether the object specified by the input text exists in the input image, then the non-text data corresponding to multimodal task A is the image. For another example, assuming that in multimodal task B, it is necessary to merge audio and video, then the non-text data corresponding to multimodal task B is audio and video.
[0045] like Figure 1 As described above, an encoder may be used to encode the non-text data to obtain a feature vector of the non-text data in a non-text feature space.
[0046] Step S22, performing feature space mapping of global information and feature space mapping of local information on the feature vector of the non-text data, to obtain a global feature vector and a local feature vector of the feature vector of the non-text data in the text feature space.
[0047] Among them, mapping the feature space of global information of the feature vector of non-text data refers to mapping the feature vector of non-text data into the text feature space based on the full attention mechanism, so that the global feature vector obtained can reflect the global characteristics of the non-text data.
[0048] Mapping the feature space of local information of the feature vector of non-text data means mapping the feature vector of non-text data to the text feature space based on the local attention mechanism, so that the local feature vector obtained can reflect the local features of the non-text data.
[0049] Step S23, inputting the global feature vector and the local feature vector into the language model to obtain the processing result of the multimodal task.
[0050] Specifically, the processing result of the multimodal task can be the content output by the language model that is related to the task objective of the multimodal task. The processing results corresponding to different multimodal tasks may be different. For example, assuming that in multimodal task A, it is necessary to determine whether the object specified by the input text exists in the input image, then the processing result output by the language model may include: a first probability value that the object specified by the input text exists in the input image, and a second probability value that the object specified by the input text does not exist in the input image. If the first probability value is greater than the second probability value, it means that the object specified by the input text exists in the input image; if the first probability value is less than the second probability value, it means that the object specified by the input text does not exist in the input image. For another example, assuming that in multimodal task B, it is necessary to fuse audio and video, then the processing result output by the language model may include the fusion data of audio and video.
[0051] In summary, in the technical solutions of some embodiments of the present disclosure, after encoding the non-text data corresponding to the multimodal task, the feature vector of the non-text data in the non-text feature space can be obtained. The global feature vector obtained after mapping the feature space of global information to the feature vector of the non-text data can reflect the global features of the non-text data, and the local feature vector obtained after mapping the feature space of local information to the feature vector of the non-text data can reflect the local features of the non-text data. Inputting the global feature vector and the local feature vector into the language model can reduce the information loss of the non-text data, so that the language model can obtain relatively rich information of the non-text data. Based on this relatively rich information, the language model can generate relatively accurate processing results. In this way, the purpose of improving the accuracy of the model is achieved.
[0052] In addition, since the language model obtains richer information from non-text data, in the event of interference, the language model is able to remain unaffected by the interference and output correct processing results, thereby improving the robustness of the model.
[0053] In some embodiments, performing feature space mapping of global information and feature space mapping of local information on the feature vector of the non-text data in step S22 to obtain a global feature vector and a local feature vector of the feature vector of the non-text data in the text feature space may include:
[0054] The feature vector of the non-text data is input into the connection model to obtain a global feature vector and a local feature vector. The connection model is used to perform feature space mapping of global information and feature space mapping of local information on the feature vector of the non-text data.
[0055] In short, in some technologies, the connection model only performs feature space mapping of global information on the feature vector of non-text data based on the global attention mechanism, and the feature vector obtained by mapping only includes the global feature vector of the non-text data in the text feature space. In some embodiments of the present disclosure, the connection model can perform feature space mapping of global information on the feature vector of non-text data, and perform feature space mapping of local information on the feature vector of non-text data, and the feature vector obtained by mapping can include the global feature vector and local feature vector of the non-text data in the text feature space. Therefore, compared with the connection model in some technologies, the connection model in some embodiments of the present disclosure can have more powerful functions.
[0056] Combined with reference Figure 3 , which is a schematic diagram of a module of a connection model provided in some embodiments of the present disclosure. Figure 3 As shown, the connection model in some embodiments of the present disclosure may include a global attention model and a local attention model. The global attention model may have a first network model structure, and the local attention model may have a second network model structure. Based on the first network model structure, the global attention model can be used to perform feature space mapping of global information on the feature vector of non-text data, and based on the second network model structure, the local attention model can be used to perform feature space mapping of local information on the feature vector of non-text data.
[0057] Based on the above description, the feature vector of non-text data is input into the connection model to obtain the global feature vector and the local feature vector, which may include:
[0058] Input the feature vector of non-text data into the global attention model to obtain a global feature vector;
[0059] The feature vector of non-text data is input into the local attention model to obtain the local feature vector.
[0060] In the above embodiment, the feature space mapping of global information and local information is functionally split in the connection model, and different feature space mappings are completed through different models. This can reduce the difficulty of model design and facilitate the design of the network model structure of the global attention model and the local attention model.
[0061] In some embodiments, the local attention model may include multiple hierarchical network layers, and the multiple hierarchical network layers may perform feature space mapping of local information according to different feature mapping scales, that is, different network layers may correspond to different feature mapping scales. The so-called feature mapping scale is the minimum granularity when the network layer performs feature vector mapping. For example, take an image as an example. Network layer A can map the feature vector of non-text data according to a feature mapping scale of 1*1, and network layer B can map the feature vector of non-text data according to a feature mapping scale of 2*2. Normally, the first network layer with a large feature mapping scale receives the feature vector output by the second network layer with a small feature mapping scale, and based on the received feature vector, performs feature space mapping of local information according to the corresponding feature mapping scale.
[0062] In some embodiments, the above-mentioned inputting the feature vector of non-text data into the local attention model to obtain the local feature vector may include:
[0063] The local attention model fuses the feature vectors output by at least two network layers to obtain a local feature vector.
[0064] In the above embodiment, the feature vectors output by at least two network layers are fused, so that the local attention model can achieve multi-scale understanding ability and improve the accuracy of the mapped local feature vector.
[0065] In some embodiments, the connection model may include a first hyperparameter. The first hyperparameter is used to specify the number of local feature vectors. The above-mentioned inputting the feature vector of non-text data into the local attention model to obtain the local feature vector may include:
[0066] The local attention model maps the feature vector of non-text data to a local feature vector according to the value of the first hyperparameter.
[0067] In this way, the number of local feature vectors obtained by mapping can be adjusted, thereby adjusting the model accuracy.
[0068] In some embodiments, the connection model may include a second hyperparameter. The second hyperparameter is used to specify the number of global feature vectors. The above inputting the feature vector of non-text data into the global attention model to obtain the global feature vector may include:
[0069] The global attention model maps the feature vector of non-text data to a global feature vector according to the value of the second hyperparameter.
[0070] In this way, the number of global feature vectors obtained by mapping can be adjusted, thereby adjusting the model accuracy.
[0071] In some embodiments, the first hyperparameter and the second hyperparameter may be global parameters of the connection model.
[0072] In other embodiments, the first hyperparameter may be located in a local attention model, and the second hyperparameter may be located in a global attention model.
[0073] In some embodiments, before using the connection model, the connection model can be pre-trained. During the training of the connection model, the global attention model and the local attention model can be trained as a whole, that is, the global attention model and the local attention model are trained at the same time.
[0074] The solution of the present disclosure is described below in conjunction with a specific embodiment.
[0075] Combined with reference Figure 4 , a schematic diagram of a multimodal language model provided for some embodiments of the present disclosure. Figure 4 In the above example, we assume that the multimodal task is based on judging whether the object specified by the text exists in the image. For example, if the text is a car, then we are judging whether there is a car in the image.
[0076] First, according to the multimodal data processing method provided by the present disclosure, an image can be processed. Specifically, by encoding the image through a visual encoder, an image feature vector located in the image feature space can be obtained. Based on the visual language connector, the image feature vector can be mapped to a feature space of global information and a feature space of local information to obtain a global feature vector and a local feature vector of the image located in the text feature space.
[0077] Secondly, the text can be encoded by the text encoder to obtain a text feature vector. Since the text feature vector itself is located in the text feature space, there is no need to map the text feature vector.
[0078] Finally, the global feature vector and local feature vector of the image output by the visual language connector in the text feature space and the text feature vector output by the text encoder are concatenated, and the concatenated vector is input into the language model. The language model can then determine whether the object specified by the text exists in the image.
[0079] exist Figure 4 In the illustrated embodiment, the language model may be formed by stacking 40 Transformer Layers.
[0080] Corresponding to the multimodal data processing method, the present disclosure also provides a multimodal data processing device. Figure 5 , which is a module schematic diagram of a multimodal data processing device provided in some embodiments of the present disclosure. Figure 5 In the invention, the multimodal data processing device comprises:
[0081] A data acquisition module is used to acquire non-text data corresponding to the multimodal task and encode the non-text data to obtain a feature vector of the non-text data;
[0082] A mapping module is used to perform feature space mapping of global information and feature space mapping of local information on the feature vector of the non-text data, so as to obtain a global feature vector and a local feature vector of the feature vector of the non-text data in the text feature space;
[0083] The task processing module is used to input the global feature vector and the local feature vector into the language model to obtain the processing result of the multimodal task.
[0084] In some embodiments, the mapping module is specifically configured to:
[0085] The feature vector of the non-text data is input into the connection model to obtain a global feature vector and a local feature vector. The connection model is used to perform feature space mapping of global information on the feature vector of the non-text data, and to perform feature space mapping of local information on the feature vector of the non-text data.
[0086] In some embodiments, the connection model includes a global attention model and a local attention model; the mapping module is specifically used to:
[0087] Inputting the feature vector of the non-text data into the global attention model to obtain a global feature vector, and the global attention model is used to map the feature vector of the non-text data to the feature space of global information;
[0088] The feature vector of the non-text data is input into the local attention model to obtain a local feature vector. The local attention model is used to map the feature space of the local information of the feature vector of the non-text data.
[0089] In some embodiments, the local attention model includes multiple hierarchical network layers, and different network layers correspond to different feature mapping scales; the mapping module is specifically used to:
[0090] The local attention model fuses the feature vectors output by at least two network layers to obtain a local feature vector.
[0091] In some embodiments, the connection model includes a first hyperparameter; and the mapping module is specifically configured to:
[0092] The local attention model maps the feature vector of non-text data to a local feature vector according to the value of the first hyperparameter, and the first hyperparameter is used to specify the number of local feature vectors.
[0093] In some embodiments, the connection model includes a second hyperparameter; and the mapping module is specifically configured to:
[0094] The global attention model maps the feature vector of non-text data to a global feature vector according to the value of the second hyperparameter, and the second hyperparameter is used to specify the number of global feature vectors.
[0095] The configuration device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0096] The multimodal data processing device disclosed in the present invention has the same beneficial effects as the above-mentioned multimodal data processing method, which will not be repeated here.
[0097] The present disclosure also provides an electronic device having the above Figure 5 The multimodal data processing device shown.
[0098] Combined with reference Figure 6 , is a schematic diagram of the structure of an electronic device provided by some embodiments of the present disclosure. Figure 6 As shown, the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.
[0099] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0100] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0101] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0102] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0103] The electronic device further comprises a communication interface 30 for the electronic device to communicate with other devices or a communication network.
[0104] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0105] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0106] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A multimodal data processing method, It is characterized in that The method comprises: Acquire non-text data corresponding to the multimodal task, and encode the non-text data to obtain a feature vector of the non-text data; Performing feature space mapping of global information and feature space mapping of local information on the feature vector of the non-text data to obtain a global feature vector and a local feature vector of the feature vector of the non-text data in a text feature space; The global feature vector and the local feature vector are input into a language model to obtain a processing result of the multimodal task.
2. The method according to claim 1, It is characterized in that The step of performing feature space mapping of global information and feature space mapping of local information on the feature vector of the non-text data to obtain a global feature vector and a local feature vector of the feature vector of the non-text data in a text feature space includes: The feature vector of the non-text data is input into a connection model to obtain the global feature vector and the local feature vector. The connection model is used to perform feature space mapping of global information and feature space mapping of local information on the feature vector of the non-text data.
3. The method according to claim 2, It is characterized in that The connection model includes a global attention model and a local attention model; The step of inputting the feature vector of the non-text data into a connection model to obtain the global feature vector and the local feature vector comprises: Inputting the feature vector of the non-text data into the global attention model to obtain the global feature vector, wherein the global attention model is used to perform feature space mapping of global information on the feature vector of the non-text data; The feature vector of the non-text data is input into the local attention model to obtain the local feature vector, and the local attention model is used to perform feature space mapping of local information on the feature vector of the non-text data.
4. The method according to claim 3, It is characterized in that The local attention model includes multiple network layers with a hierarchical relationship, and different network layers correspond to different feature mapping scales; The step of inputting the feature vector of the non-text data into the local attention model to obtain the local feature vector comprises: The local attention model obtains the local feature vector by fusing the feature vectors output by at least two network layers.
5. The method according to claim 3, It is characterized in that The connection model includes a first hyperparameter; The step of inputting the feature vector of the non-text data into the local attention model to obtain the local feature vector comprises: The local attention model maps the feature vector of the non-text data to the local feature vector according to the value of a first hyperparameter, and the first hyperparameter is used to specify the number of the local feature vectors.
6. The method according to claim 3, It is characterized in that The connection model includes a second hyperparameter; The step of inputting the feature vector of the non-text data into the global attention model to obtain the global feature vector comprises: The global attention model maps the feature vector of the non-text data to the global feature vector according to the value of a second hyperparameter, and the second hyperparameter is used to specify the number of the global feature vectors.
7. A multimodal data processing device, It is characterized in that The device comprises: A data acquisition module, used to acquire non-text data corresponding to the multimodal task, and encode the non-text data to obtain a feature vector of the non-text data; A mapping module, used for performing feature space mapping of global information and feature space mapping of local information on the feature vector of the non-text data, to obtain a global feature vector and a local feature vector of the feature vector of the non-text data in a text feature space; The task processing module is used to input the global feature vector and the local feature vector into a language model to obtain a processing result of the multimodal task.
8. An electronic device, It is characterized in that include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the multimodal data processing method according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the multimodal data processing method according to any one of claims 1 to 6.
10. A computer program product, It is characterized in that The method comprises computer instructions for causing a computer to execute the multimodal data processing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Image text information generation method and deep learning model training method
CN115359323A
Local semantic guidance multi-feature fusion video text generation method
CN116013299A
Text generation method and device, equipment and storage medium
CN117473954A
Cited By
Task processing method and device based on OCR, medium and product
CN120260047A
Ocr-based task processing method, device, medium and product
CN120260047B
