A method, model, program product, device and medium for detecting relationship between people

By acquiring video, audio and text data in video conferencing scenarios, performing synchronous timing fusion and self-attention mechanism processing to generate character representations, it solves the problem of character relationship detection in video conferencing and achieves accurate relationship detection and better meetings. manage.

CN118485949BActive Publication Date: 2024-10-18SHANDONG HAILIANG INFORMATION TECH RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410924963.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-10-18
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

In a video conferencing scenario, person relationship detection is difficult to implement, especially due to the lack of information and the difficulty of mining, and the existing technology lacks effective methods.

Method used

By acquiring video data, audio data and text data, synchronous temporal fusion is performed, and the self-attention mechanism is used to focus on the contextual information of multi-modal feature data, generate character representations, and determine character relationships based on the representations.

Benefits of technology

In video conference scenarios where information is less and mining is more difficult, accurate person relationship detection is achieved, providing better conference experience and management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118485949B_ABST
    Figure CN118485949B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, model, program product, device and medium for detecting relationships between characters, and relates to the field of deep learning technology. Aiming at the problem that it is difficult to detect relationships between characters in video conferencing scenarios, a method for detecting relationships between characters is provided. By acquiring video data, audio data and text data containing temporal features, the three modal data are synchronized according to the temporal features to establish a connection between the modal data. In addition, the method also uses a self-attention mechanism to focus on the context information of multimodal feature data through temporal sequence to establish a connection between the context information. That is, the method realizes a deeper mining of the semantic information of each character by establishing a connection between multimodal data and context information, thereby judging the relationship between characters according to the semantic information, and can effectively solve the problem that there is less information that can represent semantics and the mining difficulty is higher in video conferencing scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of deep learning technology, and in particular to a person relationship detection method, model, program product, device and medium. Background Art

[0002] With the development of facial recognition and artificial intelligence models, people need artificial intelligence models to complete more complex and diverse tasks. For example, in video conferencing scenarios, determining the relationship between participants is crucial for collaborative work and effective communication. Therefore, how to implement character relationship detection is a task with practical application needs. This task requires that it can help analyze and understand the relationship between video conference participants in video conferences, which helps to provide better meeting experience and management.

[0003] In video conferencing scenarios, participants mainly face the camera, and there is less scene information, so it is difficult to obtain information from the scene to determine the relationship between people. In addition, due to the characteristics of video conferencing, the interaction between participants is more obscure than in offline conversations. Based on this, determining the relationship between participants requires higher depth semantic mining of information. Therefore, there is currently a lack of an effective method for detecting person relationships in video conferencing scenarios.

[0004] Therefore, technicians in this field are in urgent need of a character relationship detection method to detect the character relationships of participants in video conferencing scenarios with less information and higher mining difficulty. Summary of the invention

[0005] The purpose of the present invention is to provide a method, model, program product, device and medium for detecting character relationships, which are used to detect the character relationships of participants in a video conferencing scenario with less information and higher mining difficulty.

[0006] In order to solve the above technical problems, the present invention provides a method for detecting a relationship between people, comprising:

[0007] Obtain video data, audio data, and text data containing temporal features for each person;

[0008] For each character, the video data, the audio data, and the text data are synchronized and time-series fused to obtain multimodal feature data including time-series direction;

[0009] Focusing on context information through a self-attention mechanism, modeling the multimodal feature data corresponding to each character to generate a character representation corresponding to each character;

[0010] According to the character representations, character relationships between characters are determined.

[0011] In a possible embodiment, obtaining the video data, audio data, and text data containing the temporal features of each character includes:

[0012] Get the video files corresponding to each character;

[0013] Performing video feature extraction and audio feature extraction on the video file according to a preset time step to obtain the video data and the audio data;

[0014] The audio data is transcribed, and feature alignment is performed according to the preset time step, and zero features are added in the non-speech time step to obtain the text data.

[0015] In a possible embodiment, the synchronous time series fusion of the video data, the audio data, and the text data corresponding to each character to obtain multimodal feature data including the time series direction includes:

[0016] Unifying the feature expression dimensions of the video data, the audio data, and the text data through a feedforward fully connected network, thereby obtaining video modality information, audio modality information, and text modality information;

[0017] Connecting the video data, the audio data and the text data in the same sequence in the dimension direction to obtain modal alignment feature data in the same sequence direction;

[0018] By using a one-dimensional convolutional neural network sliding in the time series direction, the modal alignment feature data is multimodally fused in the time series direction to obtain multimodal feature data in the time series direction.

[0019] In a possible embodiment, focusing on context information through a self-attention mechanism to model the multimodal feature data corresponding to each character to generate a character representation corresponding to each character includes:

[0020] A multi-layer encoder composed of N layers of encoding modules focuses on the correlation between the contexts of the multimodal feature data for modeling to generate character representations corresponding to each character.

[0021] In a possible embodiment, determining the character relationship between the characters according to the character representation includes:

[0022] Arrange and combine the characters to obtain one or more character combinations; wherein the character combination includes two characters, and the characters included in each character combination are not completely the same;

[0023] For each character combination, determining a corresponding character pair interaction sequence according to the character representations corresponding to the two characters;

[0024] A multi-layer encoder composed of M layers of encoding modules is used to focus on modeling the correlation between the characters and the context of the interaction sequence, so as to obtain a representation of the interaction relationship between the characters; wherein M is less than N;

[0025] The character relationship between two characters in the current character combination is determined according to the interactive relationship representation.

[0026] In a possible embodiment, determining a corresponding character pair interaction sequence according to the character representations corresponding to the two characters includes:

[0027] Connecting the character representations corresponding to the two characters end to end to combine them, and adding a corresponding annotation before each character representation to obtain a character pair interaction sequence; wherein the annotation is randomly generated, and the feature expression dimension is the same as that of the character representation;

[0028] The multi-layer encoder composed of M layers of encoding modules focuses on modeling the correlation between the characters and the context of the interaction sequence to obtain the representation of the interaction relationship between the characters, including:

[0029] Modeling and training the interaction sequence of the character pairs through a multi-layer encoder composed of M layers of encoding modules; wherein the annotations are continuously updated during the training process;

[0030] After the training is completed, extracting the two annotations in the character pair interaction sequence;

[0031] After the two annotations are flattened and connected in the feature dimension direction, the corresponding interactive relationship representation is obtained through a multi-layer perceptron.

[0032] In a possible embodiment, determining the character relationship between two characters in the current character combination according to the interactive relationship representation includes:

[0033] The interaction relationship representation is analyzed by a normalized index classifier to determine the character relationship between two characters in the character combination and the corresponding probability of each character relationship.

[0034] In order to solve the above technical problems, the present invention also provides a character relationship detection model, comprising: a plurality of character multimodal fusion modules and an interactive semantic fusion module;

[0035] The character multimodal fusion module is used to: obtain video data, audio data and text data containing time series features of each character; perform synchronous time series fusion on the video data, audio data and text data corresponding to each character to obtain multimodal feature data containing time series direction;

[0036] The interactive semantic fusion module is connected to each of the character multimodal fusion modules;

[0037] The interactive semantic fusion module is used to: focus on context information through a self-attention mechanism to model the multimodal feature data corresponding to each character, so as to generate a character representation corresponding to each character;

[0038] The character representation is used to determine the character relationship between the characters.

[0039] In a possible embodiment, the character multimodal fusion module includes: a pre-trained model layer, a feed-forward fully connected network layer and a one-dimensional convolutional neural network;

[0040] The pre-trained model layer includes a video pre-trained model, an audio pre-trained model and a text pre-trained model; the video pre-trained model is used to extract video features according to a preset time step based on an input video file to obtain the video data; the audio pre-trained model is used to extract audio features according to a preset time step based on an input video file to obtain the audio data; the text pre-trained model is used to transcribe the audio data to obtain the text data;

[0041] The feedforward fully connected network layer includes a plurality of feedforward fully connected networks, which are used to unify the feature expression dimensions of the video data, the audio data and the text data, thereby obtaining video modality information, audio modality information and text modality information;

[0042] The one-dimensional convolutional neural network slides in the temporal direction to perform multimodal fusion on the modal alignment feature data in the temporal direction to obtain multimodal feature data in the same sequential direction; wherein the modal alignment feature data is obtained by connecting the video data, the audio data and the text data in the same sequence in the dimensional direction.

[0043] In a possible embodiment, the interactive semantic fusion module includes: a first encoding layer, a labeling splicing layer, a second encoding layer and a multi-layer perceptron; the interactive semantic fusion module is used to output an interactive relationship representation, and the interactive relationship representation is used to determine the character relationship between each character;

[0044] The first encoding layer includes a plurality of multi-layer encoders composed of N-layer encoding modules, which are used to focus on the correlation between the contexts of the multimodal feature data for modeling, so as to generate character representations corresponding to each character;

[0045] The annotation splicing layer is used to connect the character representations end to end to combine them, and add corresponding annotations before each character representation to obtain a character pair interaction sequence; wherein the annotations are randomly generated, and the feature expression dimension is the same as that of the character representation;

[0046] The second encoding layer includes a multi-layer encoder composed of M layers of encoding modules, which is used to focus on modeling the correlation between the characters and the context of the interaction sequence; wherein M is less than N; and the annotation is continuously updated during the training process of the second encoding layer;

[0047] The multi-layer perceptron is used to extract the data of the two annotations in the character pair interaction sequence after the training of the second encoding layer is completed, and then flatten and connect them in the feature dimension direction as input to obtain the corresponding interaction relationship representation.

[0048] In a possible embodiment, it further includes: a normalized index classifier;

[0049] The normalized index classifier is used to analyze the interactive relationship representation to determine the character relationship between two characters in the character combination and the probability corresponding to each character relationship.

[0050] In a possible embodiment, the training process of the character multimodal fusion module and the interactive semantic fusion module includes:

[0051] Training a preset number of rounds at a preset learning rate by an optimizer; wherein the preset learning rate is adjusted during the training process by a learning rate linear optimization strategy and a learning rate adjustment strategy;

[0052] The model with the best performance obtained through early stopping method and fine-tuning strategy is used as the final character multimodal fusion module and the interactive semantic fusion module.

[0053] In order to solve the above technical problems, the present invention also provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned character relationship detection method when executed by a processor.

[0054] In order to solve the above technical problems, the present invention further provides a person relationship detection device, comprising:

[0055] Memory for storing computer programs;

[0056] A processor is used to implement the steps of the above-mentioned character relationship detection method when executing the computer program.

[0057] In order to solve the above technical problems, the present invention also provides a non-volatile storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the character relationship detection method as described above are implemented.

[0058] The character relationship detection method provided by the present invention obtains information such as the expression, tone and speech content of each character in a video conference scenario by acquiring three types of modal data, namely video data, audio data and text data; at the same time, the three types of modal data acquired above all contain time series features, so as to synchronize the three types of modal data according to the time series features, establish the connection between the three types of modal data, and fuse to obtain multimodal feature data; in addition, the method also uses the self-attention mechanism to focus on the context information of the multimodal feature data through the time series order, and establish the connection between the context information. That is, the method realizes a deeper mining of the semantic information of each character by establishing the connection between the multimodal data and the context information, so as to judge the relationship between the characters according to the semantic information, which can effectively solve the problem that there is less information that can represent the semantics and the mining difficulty is higher in the video conference scenario.

[0059] The character relationship detection model, program product, device, and non-volatile storage medium provided by the present invention correspond to the above method and have the same effect as above. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0061] Figure 1 A flowchart of a method for detecting a relationship between people provided by the present invention;

[0062] FIG2 (a) is a schematic diagram of multimodal data of a person 1 provided by the present invention;

[0063] FIG2( b ) is a schematic diagram of multimodal data of a person 2 provided by the present invention;

[0064] Figure 3 A schematic diagram of the structure of a relationship network provided by the present invention;

[0065] Figure 4 A structural diagram of a character relationship detection model provided by the present invention;

[0066] Figure 5 A structural diagram of a character multimodal fusion module provided by the present invention;

[0067] Figure 6 A structural diagram of an interactive semantic fusion module provided by the present invention;

[0068] Figure 7 This is a structural diagram of a person relationship detection device provided by the present invention. DETAILED DESCRIPTION

[0069] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of the present invention.

[0070] The core of the present invention is to provide a method, model, program product, device and medium for detecting relationship between people.

[0071] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0072] At present, character relationship detection in video conferencing scenarios is a task with practical application needs. In video conferencing, the relationship and interaction between participants are crucial for collaborative work and effective communication, and help provide a better meeting experience and management. For example, after a business negotiation through a video conference, if the character relationship between the participants can be accurately confirmed, it will be beneficial for the subsequent review work.

[0073] Exemplarily, the present invention provides several typical character relationships:

[0074] 1. Partnership: Characters exhibit cooperation, collaboration, support, and joint effort, working together to accomplish a common task or goal.

[0075] 2. Adversarial relationship: There are differences of opinion, arguments, contradictions, etc. between the characters. They hold different positions and viewpoints and may adopt opposing and confronting attitudes.

[0076] 3. Competitive relationship: There is a competition for resources and pursuit of personal or group interests between characters. They compete, compare and pursue advantages with each other.

[0077] 4. Familiarity: Participants in a video conference may have had contact or communication before and have established a certain degree of familiarity and trust.

[0078] 5. Strange relationship: The participants are meeting for the first time in the video conference and have not yet established much familiarity. There is a lack of mutual understanding, contact and communication.

[0079] Among them, between two participants, one of relations 4 or 5 and one or more of relations 1 to 3 are generally satisfied. For example, in a video conference, participant A and participant B present a complex relationship of confrontation, competition and unfamiliarity.

[0080] It can be seen that how to accurately judge the relationship between people is a complex problem. In addition, for the video conferencing scenario, the image information that the camera can capture is generally concentrated on the face or upper body of the person. It is difficult to obtain relevant semantic information from the scene where the conversation takes place, the whole body movements of the person, and the interaction with other objects in the scene, so it is even more difficult to accurately judge the relationship between people.

[0081] Based on the above problems, the present invention provides a method for detecting a relationship between people. Figure 1 As shown, including:

[0082] S11: Obtaining video data, audio data, and text data containing temporal features of each person;

[0083] S12: Perform synchronous time series fusion on the video data, audio data and text data corresponding to each person to obtain multimodal feature data including time series direction;

[0084] S13: Focusing on the context information through the self-attention mechanism, the multimodal feature data corresponding to each character is modeled to generate the character representation corresponding to each character;

[0085] S14: Determine the relationships between characters based on the character representations.

[0086] Step S11 is a step of obtaining semantic information of each person. In a video conference, all information is generally obtained through a camera and a microphone, and can be stored, transmitted, and managed in the form of a video file.

[0087] Among them, video files generally include information in two forms: video and audio; video information generally includes the demeanor of the character, the part of the body of the character photographed, and the part of the objects photographed in the scene, among which the demeanor of the character is used as the main information to represent the semantics; audio information mainly includes the voice recording of the character, and the noise that may be recorded in the scene generally belongs to the part that needs to be filtered out, but it does not rule out that it may contain valuable semantic information. Further, the text data in step S11 mainly refers to the dialogue between the characters expressed in text form, which can be obtained by converting audio information through speech-to-text technology. However, it should be noted that the three modal information (video, audio, text) obtained in this method all contain temporal features, that is, the video data is composed of multiple data frames, and each data frame contains a corresponding time frame (or time code). Similarly, audio data and text data also correspond to corresponding entry times.

[0088] Based on this, this embodiment provides a possible implementation scheme of step S11, and the above step S11 specifically includes:

[0089] S111: Obtaining video files corresponding to each character;

[0090] S112: extracting video features and audio features from the video file according to a preset time step to obtain video data and audio data;

[0091] S113: The audio data is transcribed, and feature alignment is performed according to a preset time step, and zero features are added in the non-speech time step to obtain text data.

[0092] First of all, it should be noted that the video file in step S111 does not necessarily record a complete video conference process. Considering the memory size of the shooting device, as well as the convenience of storage and management, a complete video conference process may be edited into multiple video files for recording. For example, in a possible implementation, 40 seconds is used as the length of a video file, and a complete video conference process is edited into several video files for storage.

[0093] In addition, in actual applications, a video file may include semantic information of multiple characters at the same time, or may only include semantic information of one character, which is determined by the video information input method for the video conference, and the present invention does not limit this. However, in this embodiment, a scenario in which a video file only includes semantic information of one character is described.

[0094] Step S112 is a step of extracting features from video files. The types of information that can be directly obtained from video files are video information and audio information. Taking the video file length of 40s in the above example, the data extraction in step S112 can be performed with 0.2s as a time step (Time Step) to extract data features, thereby obtaining corresponding video data and audio data. In this example scenario, the length of the feature data extracted from each video file is 40 / 0.2=200.

[0095] In addition, the extraction of the above-mentioned video features and audio features can be achieved through corresponding pre-trained models. At present, there are many mature technical solutions in the fields of video extraction and audio extraction. This embodiment does not limit this, and a suitable pre-trained model can be selected according to actual needs. Exemplarily, in a possible implementation scenario, the pre-trained model for extracting video data can be an I3D (inflated 3D network) video pre-trained model, and the pre-trained model for extracting audio data can be a Wav2vec pre-trained model (an unsupervised speech pre-trained model).

[0096] Corresponding to step S113, after the audio data is extracted, the corresponding text data can be obtained through the audio data. Similarly, audio transcription can also be achieved through a pre-trained model. This embodiment also does not limit this but provides a possible implementation scheme. The text pre-trained model is specifically a BERT (Bidirectional Encoder Representations from Transformers) pre-trained language model.

[0097] Among them, for the time period when the person does not speak, the corresponding extracted text data is empty. At this time, the feature length of the text data can be made the same as that of the video data and audio data through zero padding operation, which is convenient for subsequent processing.

[0098] Figure 2 (a) and Figure 2 (b) are multimodal data of two characters (character 1 and 2) extracted from a video file in a video conference scenario, which are used for the subsequent determination of the character relationship. Among them, Figure 2 (a) is a schematic diagram of the multimodal data of character 1, and Figure 2 (b) is a schematic diagram of the multimodal data of character 2. It should be noted that the three modal data extracted in this method all include temporal features. Specifically, as in the above example, three modal data are extracted from a video file by time step, and the three modal data are distinguished based on the time step. For example, in the above example, 0.2s is a time step, and the modal data of each time step represents the semantic information of a character in a certain aspect in 0.2s. There is a temporal relationship between each time step, so the extracted modal data has a temporal feature.

[0099] On the other hand, for step S12. According to the above step S11, the modal information obtained for each character includes temporal features, such as the time step in the above example. Then in step S12, the three modal information can be fused according to the temporal features, that is, the modal information with the same temporal sequence is fused to obtain multimodal feature data with the same temporal features as the three modal information. Since the multimodal feature data including the temporal direction is mainly used in the subsequent part.

[0100] Considering that the temporal characteristics of each modal information are known, it is easy to fuse the modal information of the same sequence. For example, multiple modal information of the same sequence can be directly spliced ​​to achieve the simplest fusion. However, in addition to this, this embodiment also provides a possible implementation scheme for this purpose. The above step S12 specifically includes:

[0101] S121: unifying the feature expression dimensions of the video data, the audio data, and the text data through a feedforward fully connected network, thereby obtaining video modality information, audio modality information, and text modality information;

[0102] S122: Connect the video data, audio data and text data in the same sequence in the dimension direction to obtain modal alignment feature data in the same sequence direction;

[0103] S123: Perform multimodal fusion on the modal alignment feature data in the temporal direction by using a one-dimensional convolutional neural network sliding in the temporal direction to obtain multimodal feature data in the temporal direction.

[0104] In this embodiment, corresponding to step S121, the feature dimensions of the three modal information are first unified through a feed forward fully connected network (FFN), so as to facilitate subsequent further data processing. For example, assuming that the dimensions of all modal information are unified to 512 dimensions, the dimension size of the feature expression data of each modal information after passing through FFN is R 200*512 , where 200 is the feature data length determined in the above example, and 512 is the feature data dimension.

[0105] After that, corresponding to step S122, the step of formally starting to fuse the three modal information is as follows. Step S122 first connects the three modal information in the dimensional direction in a synchronous manner. For example, as in the above example, the dimensional size of the feature expression data of one modal information is R 200*512 , then after the simultaneous sequential concatenation in step S122, the latitude of the obtained modality to its feature data is R 200*512 .

[0106] Finally, corresponding to step S123, in this embodiment, modal information fusion is achieved by a pre-designed one-dimensional convolutional neural network (CNN) sliding in the time direction, and the fused multimodal feature data has the same time direction as the three modal information before fusion.

[0107] Furthermore, this embodiment also provides a possible implementation scheme:

[0108] When multimodal feature fusion is performed through CNN in step S123, the feature length is ensured to remain unchanged by padding the front and back zeros.

[0109] That is, as in the above example, if the feature length of one modal information is 512, then the feature length of the fused multimodal feature data should also be 512. If the feature length is not enough, zero features are added before and after the feature to achieve time alignment, which is conducive to semantic mining and convenient for subsequent data processing.

[0110] For example, the sliding window size of the CNN in this embodiment can be set to 5, and the step size can be set to 1. Based on the above example, the latitude size R of the feature data of the modality200*512 , the dimension size of the multimodal feature data is still R 200*512 .

[0111] At this point, the multimodal information fusion of a character is completed, and each character outputs a multimodal feature expression after the fusion of multiple modal information in the synchronous time sequence direction. Subsequently, the relationship between the characters can be determined based on the multimodal feature expressions of multiple characters. Based on this, the process of determining the relationship between characters for video conferencing in this method can be simply divided into two major stages:

[0112] 1. Extract and fuse the multimodal feature data of each character;

[0113] This stage is to synchronize the temporal integration of each character’s multimodal information, explore the complementary semantics across modalities, deeply model the character’s expression intentions, and obtain multimodal character expression features.

[0114] 2. Determine the relationship between characters based on the multimodal feature data of each character;

[0115] This stage is about to conduct fine-grained interaction between the two fused multimodal character expression features, capture the similarities and differences in the semantic representation of the two characters in the expression content, and establish a character relationship representation to infer the character relationship.

[0116] In practical applications, the above two stages can be implemented through different modules during modeling.

[0117] After that, the second stage of the above-mentioned character relationship detection method begins to be described:

[0118] Step S13 is the step of starting to mine the characteristic interaction content between characters. If the focus of the above step S12 is to mine the context information of each character in time sequence to deeply mine the semantics, then the focus of this step is to mine the context information of the time sequence between characters (character interaction: dialogue) to further deeply mine the semantics and analyze the potential character relationship representations expressed in the character interaction process.

[0119] In this method, the self-attention mechanism is used to realize the semantic mining of contextual information. The self-attention mechanism can capture the long-distance dependencies in the sentence by calculating the correlation scores between different positions in the input sequence, focusing on the relevant parts and generating representations. In this method, the contextual information of multimodal feature data is focused on to mine deep semantics.

[0120] There are currently many self-attention mechanism implementation schemes, which are not limited in this embodiment. You can freely choose a suitable implementation scheme according to actual needs. However, this embodiment provides a possible implementation scheme, and the above step S13 is specifically as follows:

[0121] Through a multi-layer encoder composed of N layers of encoding modules, we focus on modeling the correlation between the contexts of multimodal feature data to generate character representations corresponding to each character.

[0122] That is, in this embodiment, contextual semantic mining is implemented through the Transformer model. The Transformer model is a deep learning model, the core of which is the self-attention mechanism. The Transformer model adopts a brand-new architecture, namely the encoder-decoder structure, and the above-mentioned multi-layer encoder is the encoder of the Transformer model. In the Transformer model, both the encoder and the decoder contain multiple self-attention layers (multi-layer encoders), which allow the model to calculate in parallel when processing sequence data, significantly improving the computational efficiency and model performance. Therefore, this embodiment implements the contextual semantic mining of step S13 through the Transformer model to improve the accuracy and efficiency of mining semantics.

[0123] In addition, although this embodiment does not limit the number of layers of the multi-layer encoder used, it provides a possible implementation scheme, namely, N=4.

[0124] After that, for step S14. After mining the multimodal feature expressions and contextual semantics of each character and obtaining the character features of each character in the above steps, the character relationships between these characters can be determined based on the character features of several characters whose character relationships need to be determined. The specific character relationship determination process can be implemented through a deep learning model, which is not limited in this embodiment.

[0125] It should be noted that when determining the relationship between characters, two characters are generally used as a group to determine the relationship. When determining the relationship between more than two characters, the relationship between each two characters is also determined first, and then the relationship network between multiple characters is determined. The simplest three-person relationship network is as follows Figure 3 As shown, the relationship network is determined by determining the relationships among the three groups of three people.

[0126] Further, regarding how to determine the character relationship according to the character characteristics in step S14, this embodiment provides a possible implementation scheme, and the above step S14 specifically includes:

[0127] S141: Arrange and combine the characters to obtain one or more character combinations; wherein the character combination includes two characters, and the characters included in each character combination are not completely the same;

[0128] S142: for each character combination, determining a corresponding character pair interaction sequence according to the character representations corresponding to the two characters;

[0129] S143: focusing on modeling the correlation between the characters and the context of the interaction sequence through a multi-layer encoder composed of M layers of encoding modules, so as to obtain a representation of the interaction relationship between the characters; wherein M is less than N;

[0130] S144: Determine a character relationship between two characters in the current character combination according to the interactive relationship representation.

[0131] Step S141 is also as described above. When determining the relationship between two or more characters, it is necessary to start determining the relationship between characters with two characters as a minimum unit. If only the relationship between two characters is to be determined, the relationship between the character combination can be directly determined. If the relationship between more than two characters needs to be determined, the relationship between every two characters needs to be determined, and finally a relationship network is established based on the determined relationship between every two characters to achieve the establishment of the relationship between more than two characters.

[0132] Steps S142 to S144 are specific character relationship determination procedures for a group of character combinations, wherein step S142 combines the character features corresponding to two characters in the current character combination to facilitate subsequent character relationship detection.

[0133] As for step S143, it is similar to the above step S13 of mining the contextual semantics of the multimodal feature data of each character, but step S143 focuses on mining the contextual semantics between characters. That is, step S13 aims to mine the contextual semantics of a character, while step S142 mines the contextual semantics between multiple characters.

[0134] Accordingly, mining the contextual semantics between characters can also be implemented through an implementation similar to the above step S13, for example, it can also be implemented through a Transformer model. As described in step S143, a multi-layer encoder composed of M layers of encoding modules is used to focus on the correlation between the contexts of the characters' interaction sequences to model the interaction relationships between the characters, so as to obtain the representation of the interaction relationships between the characters.

[0135] It should be noted that this embodiment also does not limit the number of layers of the multi-layer encoder used in step S143. In order to distinguish two different multi-layer encoders, M layers are used to refer to them. Generally speaking, M can be less than N. For example, when N is 4 in the above example, M can be 2. It is easy to understand that the character representation obtained by the M-layer encoder still has a dimensional size of R 200 *512 , where 200 is the feature length (i.e. the length in time series) and 512 is the feature dimension.

[0136] Step S144 is a step of analyzing and determining the relationship between characters based on the interactive relationship representation between characters with deep semantics mined out in the above steps. As can be seen from the above embodiments, the main problem solved by this method is how to achieve the determination of character relationships in video conferencing scenarios where there are few types of semantic information and the mining is difficult. Therefore, under the premise that the above steps have mined the deep semantics between characters and characters in video conferencing scenarios, this embodiment does not limit how to further determine the relationship between characters, and a suitable implementation scheme can be selected according to actual needs.

[0137] In addition, based on the above embodiment, this embodiment also provides a further implementation scheme:

[0138] The above step S142 is specifically as follows:

[0139] The character representations corresponding to the two characters are connected end to end to be combined, and the corresponding annotation is added before each character representation to obtain a character pair interaction sequence; wherein the annotation is randomly generated, and the feature expression dimension is the same as the character representation.

[0140] Correspondingly, step S143 is specifically as follows:

[0141] The interaction sequence of characters is modeled and trained through a multi-layer encoder composed of M layers of encoding modules, wherein the annotations are continuously updated during the training process;

[0142] After training, two annotations are extracted from the character pair interaction sequence;

[0143] After the two annotations are flattened and connected in the feature dimension direction, the corresponding interaction relationship representation is obtained through a multi-layer perceptron.

[0144] To further illustrate this embodiment, the following examples are provided:

[0145] First, assume that two character representations are obtained after step S141 f c1 and f c2 Then go to step S142 and introduce two new tokens [TR1] and [TR2]. These two tokens are placed in f c1 and f c2 In the front, it represents the interaction representation between the two characters. In this embodiment, [TR1] and [TR2] can be randomly initialized and continuously updated during the training process to obtain the interaction relationship representation finally used for character relationship judgment. Based on this, in step S142, according to {[TR1]; f c1 ;[TR2];f c2} are connected in order to obtain the above-mentioned character pair interaction sequence.

[0146] Then, for step S143 in this embodiment, the two tokens are continuously updated through iterative training of the Transformer model, so that the annotation can more accurately represent the interaction features between the two characters. When the optimization training is completed, the two trained tokens can be extracted, flattened and connected in the feature dimension direction, and then passed through a multi-layer perceptron to obtain the final interaction relationship representation (Relation Feature).

[0147] Similar to the above, this embodiment also does not limit the number of layers of the multilayer perceptron, but provides a possible implementation scheme, where the number of layers of the multilayer perceptron is 3. In addition, based on the above example, the feature dimensions of each data are unified as 512, so the output dimension of the multilayer perceptron in this embodiment is adapted to the feature dimension of the above data, and is also 512, and the dimension of the interaction relationship representation finally output is also R 512 .

[0148] The interactive relationship representation obtained based on this embodiment includes the multimodal feature expressions of each of the two characters in a group of characters, and the deep contextual semantics of each character and the deep contextual semantics of the interaction between the characters are mined through the Transformer model, which can effectively express the deep semantics of the expression content of the two characters, and provide accurate and reliable data support for the subsequent inference of the character relationship.

[0149] Finally, this embodiment also provides a specific implementation plan for inferring character relationships. Based on the above embodiment, step S144 is specifically as follows:

[0150] The interaction relationship representation is analyzed through the normalized index classifier to determine the character relationship between two characters in the character combination and the corresponding probability of each character relationship.

[0151] It is easy to know that the normalized exponential (softmax) classifier is generally used to convert the model input into a probability distribution. In this embodiment, the softmax classifier is used to convert the interactive relationship representation Relation Feature into a specific character relationship probability (also known as confidence) for judging the relationship between two characters. The character relationship inference based on this embodiment is simple and easy to implement, and the output result not only includes a certain relationship result, but also includes all possible relationships between two characters and the corresponding confidence, so the judgment is more accurate and comprehensive.

[0152] In summary, the task goal of a person relationship detection method provided by the present invention during implementation is to obtain a tool f (function or model, etc.) through deep learning, so that for the input video data sequence V, audio data A and text data T, it can predict the relationship type between video conference participants, as well as the confidence or probability of the relationship type.

[0153] The present invention uses the time series characteristics of multiple modal data of characters to synchronize the time series fusion of multiple modal data to establish a logical association between multiple modal data, realize the fusion of multimodal data, and thus facilitate the mining of the deep semantics of each modal data. For example, the expression and tone of a character are helpful to understand the deep meaning of the sentence he said, and the expression, language and tone of a character are also helpful to judge the true attitude of the character. In addition, the present embodiment also focuses on the context information of multimodal data through a self-attention mechanism. In a possible embodiment, the context information can be the context of the character's own multimodal data, or the context of multimodal data between characters. Then, in addition to the current time series, a logical association is established between multimodal data of other time series, which is conducive to further mining the deep semantics of the character. Based on this, the present invention can realize accurate character relationship detection by digging deeper into the deep semantics of limited information in a video conference scenario with limited semantic information and greater mining difficulty, thereby providing a better conference experience and management.

[0154] In the above embodiment, a method for detecting a relationship between people is described in detail. In a possible embodiment, the above method is implemented by tools such as functions or models obtained through deep learning. Based on this, the present invention also provides an embodiment corresponding to a model for detecting a relationship between people, which is used to implement the above method for detecting a relationship between people.

[0155] This embodiment provides a character relationship detection model, such as Figure 4 As shown, it includes: multiple person specific multi-modal fusion modules (Person Specific Multi-modal Fusion) 11 and interactive semantic fusion module (Person Interaction Semantic Fusion) 12;

[0156] The character multimodal fusion module 11 is used to: obtain video data, audio data and text data containing time series features of each character; perform synchronous time series fusion on the video data, audio data and text data corresponding to each character to obtain multimodal feature data containing time series direction;

[0157] The interactive semantic fusion module 12 is connected to each character multimodal fusion module 11;

[0158] The interactive semantic fusion module 12 is used to: focus on the context information through the self-attention mechanism to model the multimodal feature data corresponding to each character, so as to generate the character representation corresponding to each character;

[0159] Among them, character representation is used to determine the relationship between characters.

[0160] It is not difficult to see from the above that this embodiment essentially provides a method for detecting character relationships provided by the above embodiment by establishing and training a model using deep learning. In addition, it should be noted that the above method embodiment has already explained that the minimum unit of character relationship judgment is the relationship judgment between two characters, so Figure 4 In the figure, a possible model structure diagram is given based on the smallest unit of character relationship judgment. More character relationship detection models are based on Figure 4 The structure can be expanded in this way.

[0161] Among them, the character multimodal fusion module 11 corresponds to the first stage mentioned in the above embodiment: extracting and fusing the multimodal feature data of each character. That is, the character multimodal fusion module 11 is used to synchronize and fuse the several modal data corresponding to each character in time series, so as to explore the complementary semantics between cross-modalities, deeply model the expression intention of the character, and obtain multimodal feature data. The relevant embodiments of this module in the method and application part correspond to the above method embodiment part, and can refer to the description of the above method embodiment, which will not be repeated here.

[0162] The interactive semantic fusion module 12 corresponds to the second stage mentioned in the above embodiment: determining the relationship between characters based on the multimodal feature data of each character. That is, the interactive semantic fusion module 12 is used to perform context and more fine-grained interactive semantic mining based on the multimodal feature data output by the multimodal fusion module 11 of each character, capture the similarities and differences between the semantic representations of the two characters in the expression content, and establish an interactive relationship representation therefrom to infer the relationship between the characters. Similarly, the relevant embodiments of this module in the method and application part correspond to the above method embodiment part, and reference can be made to the description of the above method embodiment, which will not be repeated here.

[0163] This embodiment mainly provides possible implementation plans from the specific composition and implementation of each module in the model. First, for the specific implementation of the character multimodal fusion module 11, Figure 5 As shown, the character multimodal fusion module 11 includes: a pre-trained model layer, a feed-forward fully connected network layer and a one-dimensional convolutional neural network layer;

[0164] Among them, the pre-trained model layer includes a video pre-trained model, an audio pre-trained model and a text pre-trained model; the video pre-trained model is used to extract video features according to the input video file according to a preset time step to obtain video data; the audio pre-trained model is used to extract audio features according to the input video file according to a preset time step to obtain audio data; the text pre-trained model is used to transcribe the audio data to obtain text data.

[0165] As in some embodiments of the above method, the video pre-training model can be an I3D video pre-training model, the audio pre-training model can be a Wav2vec pre-training model, and the text pre-training model can be a BERT pre-training language model.

[0166] The feed-forward fully connected network layer is used to unify the feature expression dimensions of video data, audio data, and text data, thereby obtaining video modality information, audio modality information, and text modality information. Figure 5 In the shown architecture, the feedforward fully connected network layer is composed of three feedforward fully connected networks, and the three feedforward fully connected networks are used to unify the feature expression dimensions of video data, audio data, and text data, respectively.

[0167] The one-dimensional convolutional neural network layer slides in the temporal direction to perform multimodal fusion on the modal alignment feature data in the temporal direction to obtain multimodal feature data in the simultaneous direction; wherein the modal alignment feature data is obtained by connecting the simultaneous video data, audio data and text data in the dimensional direction.

[0168] It is easy to know that each component in the character multimodal fusion module 11 mentioned in this embodiment has been given a detailed description of the role, function and specific process implementation in the above method embodiment part, so this embodiment will not be repeated, and please refer to the description of the above method embodiment part for details.

[0169] In addition, for the specific implementation of the interactive semantic fusion module 12, such as Figure 6 As shown, the interactive semantic fusion module 12 includes: a first encoding layer, a labeling splicing layer, a second encoding layer and a multi-layer perceptron; the interactive semantic fusion module 12 is used to output the interactive relationship representation, and the interactive relationship representation is used to determine the character relationship between each character;

[0170] The first encoding layer includes a plurality of multi-layer encoders composed of N-layer encoding modules, which are used to focus on the correlation between the contexts of multimodal feature data for modeling, so as to generate character representations corresponding to each character;

[0171] The annotation concatenation layer is used to connect the character representations end to end for combination, and add corresponding annotations before each character representation to obtain a character pair interaction sequence; wherein the annotations are randomly generated, and the feature expression dimension is the same as the character representation;

[0172] The second encoding layer includes a multi-layer encoder composed of M layers of encoding modules, which is used to focus on modeling the correlation between the characters and the context of the interaction sequence; wherein M is less than N; and the annotations are continuously updated during the training process of the second encoding layer;

[0173] The multi-layer perceptron is used to extract the two annotations in the character interaction sequence after the training of the second encoding layer, flatten and connect the data in the feature dimension direction as input, and obtain the corresponding interaction relationship representation.

[0174] Similarly, each component in the interactive semantic fusion module 12 mentioned in this embodiment has also been given a detailed description of its role, function and specific process implementation in the above method embodiment part, so it will not be repeated in this embodiment. Please refer to the description of the above method embodiment part for details.

[0175] Furthermore, this embodiment also provides another possible embodiment, such as Figure 4 As shown, the above-mentioned character relationship detection model also includes: a normalized index classifier 13;

[0176] The normalized index classifier 13 is used to analyze the interactive relationship representation to determine the character relationship between two characters in the character combination and the corresponding probability of each character relationship.

[0177] Similarly, the role and function of the softmax classifier as well as the specific process implementation are all described in detail, so this embodiment will not be repeated here. For details, please refer to the description of the above method embodiment part.

[0178] However, it should be noted that based on the above modular implementation of the character relationship detection model, the linear rectified unit (ReLU) can be used as the activation function between modules to achieve process control between modules.

[0179] On the other hand, this embodiment also provides a possible embodiment for the training optimization of the above-mentioned model, and the training process of the character multimodal fusion module 11 and the interactive semantic fusion module 12 includes:

[0180] S21: training a preset number of rounds at a preset learning rate by an optimizer; wherein the learning rate is adjusted during the training process by a learning rate linear optimization strategy and a learning rate adjustment strategy;

[0181] S22: The model with the best performance obtained through early stopping method and fine-tuning strategy is used as the final character multimodal fusion module and interactive semantic fusion module.

[0182] Among them, the above-mentioned optimizer can adopt an optimizer based on the currently common optimization algorithms such as SGD, Adam, RMSProp, etc. This embodiment provides a possible implementation scheme, and the optimizer is specifically an AdamW optimizer. Among them, AdamW refers to Adam + Weight Decay, which is also an optimization algorithm. The preset learning rate can also be freely set according to actual needs. In a possible embodiment, the preset learning rate is 0.0001. The learning rate adjustment strategy is also not limited in this embodiment, and a warmup learning (warmup) strategy can be selected. When the warmup strategy is selected, its parameters can be further set to 0.2. At this time, if the preset rounds are set to 50 rounds, the warmup strategy parameter is 0.2, so that the learning rate increases linearly in the first 0.2*50=10 rounds and decreases linearly in the last 50-10=40 rounds. Finally, the model with the best performance obtained by the early stopping method and fine-tuning strategy is used as the final character multimodal fusion module 11 and interactive semantic fusion module 12.

[0183] That is, this embodiment provides a corresponding optimization training scheme for a character relationship detection model provided by the present invention, so as to ensure the performance and efficiency of the model, thereby bringing a more accurate and efficient character relationship detection function in video conferencing scenarios.

[0184] In addition to the embodiments of the character relationship detection method and model provided in the above embodiments, the present invention also provides an embodiment corresponding to a computer program product. A computer program product includes a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of the character relationship detection method described in any of the above embodiments can be implemented.

[0185] Since the embodiments of the computer program product part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the computer program product part, and will not be repeated here.

[0186] Figure 7 A structural diagram of a person relationship detection device provided by another embodiment of the present invention, such as Figure 7 As shown, a person relationship detection device includes: a memory 20, for storing a computer program;

[0187] The processor 21 is used to implement the steps of a method for detecting a relationship between people in the above embodiment when executing a computer program.

[0188] The character relationship detection device provided in this embodiment may include but is not limited to a mobile terminal, a personal computer, a workstation, etc.

[0189] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0190] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps of a character relationship detection method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. Data 203 may include, but is not limited to, a character relationship detection method, etc.

[0191] In some embodiments, a character relationship detection device may also include a display screen 22 , an input / output interface 23 , a communication interface 24 , a power supply 25 , and a communication bus 26 .

[0192] Those skilled in the art will understand that Figure 7 The structure shown in does not constitute a limitation of a person relationship detection device, and may include more or fewer components than shown in the figure.

[0193] A person relationship detection device provided by an embodiment of the present invention includes a memory and a processor. When the processor executes a program stored in the memory, it can implement the following method: a person relationship detection method.

[0194] Finally, the present invention also provides an embodiment corresponding to a non-volatile storage medium. The non-volatile storage medium stores a computer program, and when the computer program is executed by a processor, the steps recorded in the above method embodiment are implemented.

[0195] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc. Various media that can store program codes.

[0196] The above is a detailed introduction to a character relationship detection method, model, program product, device and medium provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referenced to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified in several ways, and these improvements and modifications also fall within the scope of protection of the present invention.

[0197] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. A method for detecting a relationship between people, characterized in that: include: Obtain video data, audio data, and text data containing temporal features for each person; For each character, the video data, the audio data, and the text data are synchronized and time-series fused to obtain multimodal feature data including time-series direction; Focusing on context information through a self-attention mechanism, modeling the multimodal feature data corresponding to each character to generate a character representation corresponding to each character; The method of focusing on context information through a self-attention mechanism to model the multimodal feature data corresponding to each character to generate a character representation corresponding to each character includes: focusing on the correlation between the contexts of the multimodal feature data through a multi-layer encoder composed of N layers of encoding modules to model the correlation between the multimodal feature data to generate a character representation corresponding to each character; Determining the character relationships between the characters according to the character representations; Among them, determining the character relationship between each character based on the character representation includes: arranging and combining each of the characters to obtain one or more character combinations; wherein the character combination includes two characters, and the characters included in each of the character combinations are not completely the same; for each character combination, determining the corresponding character pair interaction sequence according to the character representations corresponding to the two characters; through a multi-layer encoder composed of M layers of encoding modules, focusing on the correlation between the contexts of the character pair interaction sequences for modeling, so as to obtain a representation of the interaction relationship between each character; wherein M is less than N; determining the character relationship between the two characters in the current character combination according to the interaction relationship representation.

2. The method for detecting a person relationship according to claim 1, wherein: The step of obtaining the video data, audio data and text data containing the temporal features of each character includes: Get the video files corresponding to each character; Performing video feature extraction and audio feature extraction on the video file according to a preset time step to obtain the video data and the audio data; The audio data is transcribed, and feature alignment is performed according to the preset time step, and zero features are added in the non-speech time step to obtain the text data.

3. The method for detecting a person relationship according to claim 1, wherein: The synchronous time series fusion of the video data, the audio data and the text data corresponding to each character to obtain multimodal feature data including time series direction includes: Unifying the feature expression dimensions of the video data, the audio data, and the text data through a feedforward fully connected network, thereby obtaining video modality information, audio modality information, and text modality information; Connecting the video data, the audio data and the text data in the same sequence in the dimension direction to obtain modal alignment feature data in the same sequence direction; By using a one-dimensional convolutional neural network sliding in the time series direction, the modal alignment feature data is multimodally fused in the time series direction to obtain multimodal feature data in the time series direction.

4. The method for detecting a person relationship according to claim 1, wherein: Determining a corresponding character pair interaction sequence according to the character representations corresponding to the two characters includes: Connecting the character representations corresponding to the two characters end to end to combine them, and adding a corresponding annotation before each character representation to obtain a character pair interaction sequence; wherein the annotation is randomly generated, and the feature expression dimension is the same as that of the character representation; The multi-layer encoder composed of M layers of encoding modules focuses on modeling the correlation between the characters and the context of the interaction sequence to obtain the representation of the interaction relationship between the characters, including: Modeling and training the interaction sequence of the character pairs through a multi-layer encoder composed of M layers of encoding modules; wherein the annotations are continuously updated during the training process; After the training is completed, extracting the two annotations in the character pair interaction sequence; After the two annotations are flattened and connected in the feature dimension direction, the corresponding interactive relationship representation is obtained through a multi-layer perceptron.

5. The method for detecting a person relationship according to claim 4, characterized in that: Determining the character relationship between two characters in the current character combination according to the interactive relationship representation includes: The interaction relationship representation is analyzed by a normalized index classifier to determine the character relationship between two characters in the character combination and the corresponding probability of each character relationship.

6. A character relationship detection model, characterized in that: include: Multiple character multimodal fusion modules and interactive semantic fusion modules; The character multimodal fusion module is used to: obtain video data, audio data and text data containing time series features of each character; perform synchronous time series fusion on the video data, audio data and text data corresponding to each character to obtain multimodal feature data containing time series direction; The interactive semantic fusion module is connected to each of the character multimodal fusion modules; The interactive semantic fusion module is used to: focus on context information through a self-attention mechanism to model the multimodal feature data corresponding to each character, so as to generate a character representation corresponding to each character; The character representation is used to determine the character relationship between the characters; The interactive semantic fusion module includes: a first coding layer, a labeling splicing layer, a second coding layer and a multi-layer perceptron; the interactive semantic fusion module is used to output an interactive relationship representation, and the interactive relationship representation is used to determine the character relationship between each character; The first encoding layer includes a plurality of multi-layer encoders composed of N-layer encoding modules, which are used to focus on the correlation between the contexts of the multimodal feature data for modeling, so as to generate character representations corresponding to each character; The annotation splicing layer is used to connect the character representations end to end to combine them, and add corresponding annotations before each character representation to obtain a character pair interaction sequence; wherein the annotations are randomly generated, and the feature expression dimension is the same as that of the character representation; The second encoding layer includes a multi-layer encoder composed of M layers of encoding modules, which is used to focus on modeling the correlation between the characters and the context of the interaction sequence; wherein M is less than N; and the annotation is continuously updated during the training process of the second encoding layer; The multi-layer perceptron is used to extract the data of the two annotations in the character pair interaction sequence after the training of the second encoding layer is completed, and then flatten and connect them in the feature dimension direction as input to obtain the corresponding interaction relationship representation.

7. The character relationship detection model according to claim 6, characterized in that: The character multimodal fusion module includes: a pre-trained model layer, a feed-forward fully connected network layer and a one-dimensional convolutional neural network; The pre-trained model layer includes a video pre-trained model, an audio pre-trained model and a text pre-trained model; the video pre-trained model is used to extract video features according to a preset time step based on an input video file to obtain the video data; the audio pre-trained model is used to extract audio features according to a preset time step based on an input video file to obtain the audio data; the text pre-trained model is used to transcribe the audio data to obtain the text data; The feedforward fully connected network layer includes a plurality of feedforward fully connected networks, which are used to unify the feature expression dimensions of the video data, the audio data and the text data, thereby obtaining video modality information, audio modality information and text modality information; The one-dimensional convolutional neural network slides in the temporal direction to perform multimodal fusion on the modal alignment feature data in the temporal direction to obtain multimodal feature data in the same sequential direction; wherein the modal alignment feature data is obtained by connecting the video data, the audio data and the text data in the same sequence in the dimensional direction.

8. The character relationship detection model according to claim 6, characterized in that: Also includes: Normalized exponential classifier; The normalized index classifier is used to analyze the interactive relationship representation to determine the character relationship between two characters in the character combination and the probability corresponding to each character relationship.

9. The character relationship detection model according to any one of claims 6 to 8, characterized in that: The training process of the character multimodal fusion module and the interactive semantic fusion module includes: Training a preset number of rounds at a preset learning rate by an optimizer; wherein the preset learning rate is adjusted during the training process by a learning rate linear optimization strategy and a learning rate adjustment strategy; The model with the best performance obtained through early stopping method and fine-tuning strategy is used as the final character multimodal fusion module and the interactive semantic fusion module.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the character relationship detection method as described in any one of claims 1 to 5 are implemented.

11. A person relationship detection device, characterized in that: include: Memory for storing computer programs; A processor, used to implement the steps of the character relationship detection method as described in any one of claims 1 to 5 when executing the computer program.

12. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the person relationship detection method as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Video character relationship identification method

    CN111061915A

  • Video figure social relation graph generation method based on graph convolutional network

    CN113298015A