External character determination method and device, dialogue method and device, medium, equipment and product

By analyzing the correlation between key frames and non-key frame features in video frames, intra-frame noise is reduced and the accuracy of external personality analysis is improved.

CN118658092APending Publication Date: 2024-09-17MASHANG CONSUMER FINANCE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410683586.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

The existing technology is susceptible to intra-frame noise in external personality analysis, resulting in insufficient analysis accuracy.

Method used

By determining the correlation degree of temporal features and spatial features of key frames and non-key frames in video frames, the features are aggregated to reduce the impact of intra-frame noise and improve the accuracy of external personality determination.

Benefits of technology

By paying attention to the temporal and spatial structure information of video frames, the impact of intra-frame noise is reduced and the accuracy of external personality analysis is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118658092A
    Figure CN118658092A
Patent Text Reader

Abstract

The invention relates to an external character determination method, a dialogue method, a dialogue device, a medium, equipment and a product, and the method comprises the steps: determining the features of each video frame in a plurality of video frames of a character object, the features comprise a time sequence feature and a spatial feature, and the plurality of video frames comprise a key frame and a non-key frame; determining a correlation degree between the time sequence features of the key frames and the time sequence features of the non-key frames, and determining a correlation degree between the spatial features of the key frames and the spatial features of the non-key frames; aggregating the features of each video frame according to the association degree of the time sequence features and the association degree of the spatial features to obtain aggregated features; and inputting the aggregated features into a model, and outputting the external character information of the character objects in the plurality of video frames. By adopting the method, the accuracy of external character determination can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular, to an external personality determination method, a dialogue method, an apparatus, a medium, a device and a product. Background Art

[0002] Apparent personality is also called first impression or representational personality. In addition to the inner true personality, the external representational personality of human beings also affects the interaction between people. Therefore, it is meaningful to analyze the external personality of people. Summary of the invention

[0003] The present disclosure provides an external personality determination method, a dialogue method, an apparatus, a medium, a device and a product to improve the accuracy of external personality determination.

[0004] In a first aspect, the present disclosure provides a method for determining an external personality, comprising:

[0005] Determine the features of each of the plurality of video frames of the person object, wherein the features include temporal features and spatial features, and the plurality of video frames include: key frames and non-key frames;

[0006] Determining a correlation degree between the temporal features of the key frame and the temporal features of the non-key frame, and determining a correlation degree between the spatial features of the key frame and the spatial features of the non-key frame;

[0007] Aggregating the features of each of the video frames according to the correlation degree of the temporal features and the correlation degree of the spatial features to obtain aggregated features;

[0008] The aggregated features are input into a model, and external character information of the human objects in the multiple video frames is output.

[0009] In a second aspect, the present disclosure provides a dialogue method, comprising:

[0010] Determine the feature of each of the plurality of video frames of the character object, wherein the feature includes a temporal feature and a spatial feature, wherein the plurality of video frames include: key frames and non-key frames, and the plurality of video frames are video frames of the character object during a conversation;

[0011] Determining a correlation degree between the temporal features of the key frame and the temporal features of the non-key frame, and determining a correlation degree between the spatial features of the key frame and the spatial features of the non-key frame;

[0012] Aggregating the features of each of the video frames according to the correlation degree of the temporal features and the correlation degree of the spatial features to obtain aggregated features;

[0013] Inputting the aggregated features into a pre-trained model to obtain the external personality information of the human object in the multiple video frames output by the model;

[0014] According to the external character information, the content of the dialogue with the character object is adjusted.

[0015] In a third aspect, the present disclosure provides an external personality determination device, comprising:

[0016] A first determination module is configured to determine a feature of each of a plurality of video frames of a person object, wherein the feature includes a temporal feature and a spatial feature, and the plurality of video frames include: key frames and non-key frames;

[0017] a second determination module configured to determine a correlation degree between the temporal features of the key frame and the temporal features of the non-key frame, and to determine a correlation degree between the spatial features of the key frame and the spatial features of the non-key frame;

[0018] an aggregation module, configured to aggregate the features of each of the video frames according to the correlation degree of the temporal features and the correlation degree of the spatial features to obtain an aggregated feature;

[0019] The model processing module is configured to input the aggregated features into the model and output the external character information of the human object in the multiple video frames.

[0020] In a fourth aspect, the present disclosure provides a conversation device, comprising:

[0021] A first determination module is configured to determine a feature of each of a plurality of video frames of a person object, wherein the feature includes a temporal feature and a spatial feature, wherein the plurality of video frames include: key frames and non-key frames, and the plurality of video frames are video frames of the person object during a conversation;

[0022] a second determination module configured to determine a correlation degree between the temporal features of the key frame and the temporal features of the non-key frame, and to determine a correlation degree between the spatial features of the key frame and the spatial features of the non-key frame;

[0023] an aggregation module, configured to aggregate the features of each of the video frames according to the correlation degree of the temporal features and the correlation degree of the spatial features to obtain an aggregated feature;

[0024] A model processing module is configured to input the aggregated features into a pre-trained model to obtain the external personality information of the human object in the multiple video frames output by the model;

[0025] The dialogue adjustment module is configured to adjust the dialogue content with the character object according to the external personality information.

[0026] In a fifth aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect or the second aspect.

[0027] In a sixth aspect, the present disclosure provides an electronic device, including:

[0028] a storage device having a computer program stored thereon;

[0029] A processing device is used to execute the computer program in the storage device to implement the steps of the method in the first aspect or the second aspect.

[0030] In a seventh aspect, the present disclosure provides a computer program product, comprising a computer program, which implements the steps of the method described in the first aspect or the second aspect when executed by a processor.

[0031] Through the above technical scheme, the temporal features and spatial features of each video frame in multiple video frames of the character object are first determined, then the correlation degree between the temporal features of the key frames and the temporal features of the non-key frames in the multiple video frames is determined, and the correlation degree between the spatial features of the key frames and the spatial features of the non-key frames in the multiple video frames is determined, then, according to the correlation degree of the temporal features and the correlation degree of the spatial features, the features of each video frame are aggregated to obtain the aggregated features, and then the aggregated features can be input into the model to output the external personality information of the character object in the multiple video frames. Since the features of each video frame are aggregated according to the correlation degree of the temporal features and the correlation degree of the spatial features, the aggregated features can focus on the information of all video frames in the multiple video frames in terms of temporal and spatial structures, and then, the aggregated features can reflect the temporal and spatial information of the video as a whole, so as to better focus on the key areas in the frame and the situations of each key area in different video frames, so as to reduce the influence of the noise in the frame, and then improve the accuracy of the external personality determination.

[0032] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:

[0034] Figure 1 is a schematic diagram of an application environment of a method for determining an external personality according to an exemplary embodiment of the present disclosure;

[0035] Figure 2 is a flow chart showing a method for determining an external personality according to an exemplary embodiment of the present disclosure;

[0036] Figure 3 is a flow chart showing a method for determining an external personality according to an exemplary embodiment of the present disclosure;

[0037] Figure 4 is a structural schematic diagram of a neural network model according to an exemplary embodiment of the present disclosure;

[0038] Figure 5 is a flow chart showing a conversation method according to an exemplary embodiment of the present disclosure;

[0039] Figure 6 is a schematic diagram showing a dialogue process according to an exemplary embodiment of the present disclosure;

[0040] Figure 7 is a structural block diagram of an external personality determination device according to an exemplary embodiment of the present disclosure;

[0041] Figure 8 is a structural block diagram of a conversation device according to an exemplary embodiment of the present disclosure;

[0042] Fig. 9 It is a structural block diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0043] 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 described herein, which are instead provided for 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.

[0044] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0045] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0046] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0047] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0048] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0049] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0050] External personality traits are usually displayed by some external non-verbal behaviors of people, so they can be analyzed or identified through technical means, such as using deep learning technology to analyze human non-verbal behaviors from visual, auditory and other modalities. External personality usually describes five personality traits based on the Big Five personality theory.

[0051] Five personality traits: the Big Five Personality Traits, or the Big Five Model, include: Openness to Experience, Conscientiousness, Extraversion, Agreeableness, and Neuroticism, also abbreviated as OCEAN by their first letters.

[0052] Generally speaking, everyone has five personality traits to varying degrees. Therefore, when describing a person's external personality, it can be quantified by the values ​​between 0 and 1 of the five personality trait dimensions.

[0053] In the related art, when analyzing external personality, it is usually based on image analysis at the video frame level, that is, the analysis result of the external personality in the video is the average of the single-frame prediction results.

[0054] However, the inventors have found in long-term research that the external personality analysis method based on a single frame level is easily affected by intra-frame noise, thereby affecting the accuracy of the final external personality analysis.

[0055] In view of this, the embodiments of the present disclosure provide an external personality determination method, a dialogue method, an apparatus, a medium, a device and a product, and propose that when determining the external personality, by considering the degree of correlation between the timing characteristics of the key frames and the timing characteristics of the non-key frames, as well as the degree of correlation between the spatial characteristics of the key frames and the spatial characteristics of the non-key frames, better attention can be paid to the key areas within the frame and the situations of each key area in different video frames, so as to reduce the impact of noise within the frame and thereby improve the accuracy of external personality determination.

[0056] The following introduces the application scenarios of the external personality determination method provided by the embodiments of the present disclosure.

[0057] The external personality determination method provided by the embodiment of the present disclosure can determine the external personality result of the target person object in the video. The external personality result may include numerical values ​​corresponding to multiple personality traits of the external personality. Each personality trait can be regarded as a sub-personality dimension of the external personality. Thus, in one example, the external personality result may include numerical values ​​under the aforementioned five personality traits. Specifically, the external personality determination method can be applied to scenarios where external personality analysis is required, and the method can be applied to products in these scenarios, such as online interview systems, online interview systems, online dialogue systems, qualification review systems, content recommendation systems, etc. Below, some application scenarios of the external personality determination method of the embodiment of the present disclosure are exemplified:

[0058] (1) Streaming online applications (such as online interviews, online conversations, online automatic dialogues, etc.).

[0059] By collecting video clips of the subject for a period of time (such as 15s or 30s) online, and obtaining the video to be processed based on the collected video clips, the streaming online application server (such as the server corresponding to the online interview system, the server corresponding to the online interview system, the server corresponding to the online automatic dialogue system, etc.) can then process the video to be processed based on the external personality determination method provided by the present invention, so as to obtain the external personality result of the subject. Through the external personality result, it can assist in the screening of subsequent interview links, the adjustment of interview words, or guide the selection of interview topics and dialogue content, etc.

[0060] (2) Offline applications (such as qualification review, content recommendation, etc.).

[0061] Offline videos can be saved in the application server, and the application server (such as the server corresponding to the qualification review system, the server corresponding to the content recommendation system, etc.) can obtain the video to be processed based on the offline video. Then, the application server can process the video to be processed based on the external personality determination method provided by the present invention, so as to obtain the external personality result of the test user, and perform qualification review, content recommendation and other applications on the test user through the external personality result.

[0062] In order to better understand the external personality determination method, device, readable medium, electronic device and program product provided by the embodiments of the present disclosure, the application environment applicable to the embodiments of the present disclosure is described below.

[0063] See also Figure 1 , Figure 1 FIG. 1 is a schematic diagram showing an application environment of the external personality determination method provided by an embodiment of the present disclosure. As an implementation mode, the external personality determination method provided by an embodiment of the present disclosure can be applied to an electronic device. The electronic device can be Figure 1 The server 110 shown in the figure can be connected to the terminal device 120 through a network. The network is used to provide a medium for a communication link between the server 110 and the terminal device 120. The network can include various connection types, such as a wired communication link, a wireless communication link, etc., which is not limited in the embodiment of the present disclosure.

[0064] It should be understood that Figure 1 The server 110, network and terminal device 120 are only illustrative. According to the implementation requirements, there can be any number of servers 110, networks and terminal devices 120. For example, the server 110 can be a physical server 110, or a server 110 cluster composed of multiple servers 110, etc. The terminal device 120 can be a mobile phone, a tablet, a desktop computer, a laptop computer, a smart wearable device, etc.

[0065] In some implementations, the terminal device may run various programs that support video acquisition and video upload functions, such as job search applications, interview applications, etc., and the video may be acquired and uploaded through the application running on the terminal device, and the video may be sent to the server through the terminal device. The server may run the external personality determination method of the embodiment of the present disclosure, and process the video uploaded by the terminal device through the external personality determination method to obtain the external personality result corresponding to the user in the video.

[0066] In combination with the aforementioned streaming online application scenarios, in some application scenarios, for example, online interviews or online interview scenarios, after obtaining the external personality results corresponding to the user in the video, the server can determine the conversation content prompt for the user based on the external personality results corresponding to the user. The server can further send the conversation content prompt to other terminal devices participating in the interview in the online interview scenario through the network, so that users of other terminal devices participating in the interview can have a conversation with the user of the terminal device that uploaded the video based on the conversation content prompt.

[0067] Optionally, in the above application scenario, the electronic device running the external personality determination method of the disclosed embodiment may also be the terminal device for uploading the video or other terminal devices for participating in the interview. In addition, based on the external personality result corresponding to the user, the electronic device for determining the conversation content prompt for the user may also be the terminal device for uploading the video or other terminal devices for participating in the interview.

[0068] In combination with the aforementioned streaming online application scenario, in other application scenarios, for example, in an online automatic dialogue scenario, the server can automatically dialogue with the user of the terminal device that uploaded the video according to the dialogue content prompt.

[0069] Optionally, in the above application scenario, the electronic device running the external personality determination method of the embodiment of the present disclosure may also be the terminal device for uploading the video. In addition, the electronic device for determining the conversation content prompt for the user based on the external personality result corresponding to the user may also be the terminal device for uploading the video.

[0070] In some implementations, offline videos are stored in a server, and the server can run the external personality determination method of the embodiment of the present disclosure, process the offline video through the external personality determination method, and obtain the external personality result corresponding to the human object in the offline video.

[0071] In combination with the aforementioned offline application scenario, in some embodiments, after the application server obtains the external personality result corresponding to the character object in the video, the server can determine the qualification review result for the character object based on the external personality result corresponding to the character object, and send the qualification review result to the terminal device corresponding to the user through the network, or determine the recommended content for the user based on the external personality result corresponding to the character object, and send the determined recommended content to the terminal device corresponding to the user through the network.

[0072] The embodiments of the present disclosure are further explained below with reference to the accompanying drawings.

[0073] Figure 2 is a flowchart of a method for determining an external personality according to an exemplary embodiment of the present disclosure, which method can be applied to electronic devices, referring to Figure 2 , the external personality determination method may include the following steps:

[0074] S201: Determine the features of each video frame in a plurality of video frames of a person object, where the features include temporal features and spatial features, and the plurality of video frames include key frames and non-key frames.

[0075] In combination with the aforementioned application scenarios, when determining the external character of a person object in a video, multiple video frames including the person object can be obtained from the video, and then the temporal features and spatial features of each of the multiple video frames can be further determined.

[0076] Taking the external personality determination method executed by the server as an example, the multiple video frames can be obtained based on the online video uploaded by the terminal, or based on the offline video stored in the server.

[0077] In the disclosed embodiments, the online video uploaded by the terminal in real time online, or the offline video saved in the server can be understood as the original video. Usually, the original video has a high frame rate, so that the frame difference between two adjacent video frames is small. Directly using the original video for processing requires all frames to be recognized and processed, which results in excessive information redundancy, thereby increasing unnecessary calculations and low efficiency. Therefore, in order to improve the efficiency of external personality determination, the original video can be processed. For example, the original video can be uniformly downsampled, and then a preset number of video frames are selected from the sampled video frames to form multiple video frames, thereby improving the efficiency of subsequent external personality determination.

[0078] Among them, the spatial information and timing information of the video frame are both information at the video frame level. The spatial information of the video frame is used to represent the spatial structure information of the video frame, and the timing information of the video frame is used to represent the front and back order of the video frame in multiple video frames of the video.

[0079] In some implementations, the spatial features of each video frame may be obtained through an image feature extraction network. Each video frame is input into the image feature extraction network to obtain the spatial features of each video frame output by the image feature extraction network.

[0080] In some embodiments, the image feature extraction network may be any neural network for image feature extraction, such as a convolutional neural network, through which the spatial features corresponding to each video frame may be obtained. Optionally, the convolutional neural network may be a Resnet50 network.

[0081] In some implementations, the temporal features of the video frames may be obtained by extracting features from the temporal relationship between the video frames.

[0082] In some implementations, the temporal relationship between the video frames may be processed through a self-attention mechanism to obtain the temporal features of the video frames.

[0083] Furthermore, after determining a plurality of video frames of the person object, key frames and non-key frames may be selected therefrom.

[0084] In some implementations, a key frame is an intermediate frame of multiple video frames in a video recording sequence.

[0085] For example, when the plurality of video frames includes 15 video frames, the key frame may be the 8th video frame. For another example, when the plurality of video frames includes 16 video frames, the key frame may be the 8th video frame or the 9th video frame.

[0086] By selecting a middle video frame as a key frame, the correlation relationship of the context in the time window before and after the key frame can be examined in time sequence, thereby improving the accuracy of subsequent external personality determination.

[0087] S202: Determine the degree of association between the temporal features of the key frame and the temporal features of the non-key frame, and determine the degree of association between the spatial features of the key frame and the spatial features of the non-key frame. In the disclosed embodiment, the degree of association between the key frame and the non-key frame in terms of spatial information and temporal information can be obtained.

[0088] S203: Aggregate the features of each video frame according to the correlation degree of the temporal features and the correlation degree of the spatial features to obtain aggregated features.

[0089] In the disclosed embodiment, the features of each video frame are aggregated according to the correlation degree of the temporal features and the correlation degree of the spatial features, so that the aggregated features corresponding to the key frames can be obtained.

[0090] In the disclosed embodiment, the features of each video frame are aggregated according to the correlation degree of temporal features and the correlation degree of spatial features, so that the aggregated features can focus on the information of all video frames in the temporal and spatial structures of multiple video frames, and thus, the aggregated features can reflect the temporal and spatial information of the entire video.

[0091] S204: Input the aggregated features into the model, and output the external character information of the human objects in the multiple video frames.

[0092] In the disclosed embodiment, after obtaining the aggregated features, the aggregated features may be further processed. For example, the aggregated features may be input into a pre-trained model, thereby obtaining the external character information of the human objects in multiple video frames output by the model.

[0093] Among them, the pre-trained model can be called a prediction model.

[0094] In combination with the foregoing content, it can be seen that in some embodiments, the external personality of the character object includes multiple personality dimensions. In this case, the external personality of the character object may include multiple personality dimensions, and the external personality information output by the model includes the score of the character object in each personality dimension.

[0095] For example, taking the external personality including five personality dimensions of openness, conscientiousness, extroversion, agreeableness and emotional instability as an example, the obtained external personality may include the scores corresponding to each personality dimension of openness, conscientiousness, extroversion, agreeableness and emotional instability. The score may also be understood as a rating value, which may be between 0 and 1.

[0096] Among them, the prediction model is used to map the aggregated features to regress and obtain the scores corresponding to each personality dimension.

[0097] In some embodiments, the prediction model includes at least one of a weight matrix, a bias vector, and an activation function. The weight matrix and the bias vector included in the prediction model can map the aggregated features to a high-dimensional space, and the activation function included in the prediction model can perform a nonlinear transformation on the mapped results, so that more complex feature combinations and patterns can be captured, thereby improving the expressiveness of the regression results of each personality dimension.

[0098] Through the above technical scheme, the temporal features and spatial features of each video frame in multiple video frames of the character object are first determined, then the correlation degree between the temporal features of the key frames and the temporal features of the non-key frames in the multiple video frames is determined, and the correlation degree between the spatial features of the key frames and the spatial features of the non-key frames in the multiple video frames is determined, then, according to the correlation degree of the temporal features and the correlation degree of the spatial features, the features of each video frame are aggregated to obtain the aggregated features, and then the aggregated features can be input into the model to output the external personality information of the character object in the multiple video frames. Since the features of each video frame are aggregated according to the correlation degree of the temporal features and the correlation degree of the spatial features, the aggregated features can focus on the information of all video frames in the multiple video frames in terms of temporal and spatial structures, and then, the aggregated features can reflect the temporal and spatial information of the video as a whole, so as to better focus on the key areas in the frame and the situations of each key area in different video frames, so as to reduce the influence of the noise in the frame, and then improve the accuracy of the external personality determination.

[0099] In some implementations, in step S203, the features of each video frame are aggregated according to the correlation degree of the temporal features and the correlation degree of the spatial features to obtain the aggregated features, which may include the following steps:

[0100] Assigning a weight to each video frame according to the degree of correlation between the temporal features of the key frame and the temporal features of the non-key frame, and the degree of correlation between the spatial features of the key frame and the spatial features of the non-key frame;

[0101] According to the weight of each video frame, the features of each video frame are weighted and aggregated to obtain the aggregated features.

[0102] The weight represents the importance of each video frame among multiple video frames. The higher the correlation between the non-key frame and the key frame, the greater the weight.

[0103] In the disclosed embodiment, a weight can be assigned to each video frame based on the degree of correlation between the temporal features of the key frames and the temporal features of the non-key frames, as well as the degree of correlation between the spatial features of the key frames and the spatial features of the non-key frames. Then, the features of each video frame can be weightedly aggregated based on the weight of each video frame to obtain aggregated features.

[0104] Through the above technical solution, the weight setting can take into account the correlation between the non-key and key frames in the temporal features and the spatial features, and the weight setting is more reasonable. Then, after the weighted aggregation of the features of each video frame according to the weight of each video frame, the obtained aggregated features are more accurate, thereby improving the accuracy of external personality determination. In some embodiments, the method of the embodiment of the present disclosure may also include the following steps:

[0105] The feature aggregation model is based on the attention mechanism, with the features of the key frames as the query Q input and the features of the non-key frames as the key K and value V input, and the steps of determining the correlation degree between the temporal features of the key frames and the temporal features of the non-key frames, and determining the correlation degree between the spatial features of the key frames and the spatial features of the non-key frames are performed, and according to the correlation degree of the temporal features and the correlation degree of the spatial features, the features of each video frame are aggregated to obtain the aggregated features.

[0106] In the disclosed embodiment, a feature aggregation model can be constructed based on the attention mechanism, and in order to determine the degree of correlation between the temporal features of key frames and the temporal features of non-key frames, and determine the degree of correlation between the spatial features of key frames and the spatial features of non-key frames, and according to the degree of correlation between the temporal features and the degree of correlation between the spatial features, the features of each video frame are aggregated to obtain aggregated features. The features of the key frames can be input as the query Q (Query), and the features of the non-key frames can be input as the key K (Key) and the value V (Value).

[0107] In some embodiments, the feature aggregation model may be an encoder in a Transformer model, wherein the Transformer model is a neural network model based on an attention mechanism.

[0108] Optionally, the feature aggregation model may include one or more layers of sub-encoders, each layer of sub-encoders may include an attention module and a feedforward neural network module, optionally, the attention module may include an attention layer and a sum normalization layer, the feedforward neural network module may include a feedforward neural network layer and a sum normalization layer, optionally, the attention layer may be a multi-head self-attention layer.

[0109] Taking a feature aggregation model including multiple sub-encoders as an example, the features corresponding to each video frame are used as the input of the first sub-encoder. After being processed by the first sub-encoder, the output of the first sub-encoder is used as the input of the second sub-encoder. Similarly, the output of the previous sub-encoder is used as the input of the next sub-encoder in sequence, until the aggregated features of the output of the last sub-encoder are obtained after being processed by the last sub-encoder.

[0110] In some embodiments, the query Q is taken as a key frame in the video, and each non-key frame in these videos can be regarded as a memory (key K and value V), and the original K and V values ​​can be taken as a linear projection of the features of the key frame and the non-key frame. The attention processing of the Q, K, and V processing units of each sub-encoder obtains an updated Q vector, which serves as the Q input of the Q, K, and V processing units in the next sub-encoder. Finally, the Q value after the attention update of the last sub-encoder is returned as an aggregate feature.

[0111] Through the above technical scheme, based on the attention mechanism, the features corresponding to each video frame can be processed in parallel to improve the calculation efficiency of the aggregated features. In addition, the attention mechanism can better extract the correlation between the temporal features of the key frames and the temporal features of the non-key frames, and determine the correlation between the spatial features of the key frames and the spatial features of the non-key frames, thereby improving the calculation accuracy of the aggregated features.

[0112] In some embodiments, the features of each video frame in multiple video frames of a person object can be determined by a feature extraction model, and the features include temporal features and spatial features. The degree of association between the temporal features of a key frame and the temporal features of a non-key frame can be determined by a feature aggregation model, as well as the degree of association between the spatial features of a key frame and the spatial features of a non-key frame. In addition, the features of each video frame are aggregated according to the degree of association between the temporal features and the degree of association between the spatial features to obtain aggregated features. The aggregated features can be processed by a prediction model to output the external personality information of the person objects in multiple video frames.

[0113] In this case, the method of the embodiment of the present disclosure may further include the step of jointly training the feature extraction model, the feature aggregation model, and the prediction model, wherein the joint training may include the following steps:

[0114] Acquire multiple video segment samples, each video segment sample includes a marked personality label and multiple video frames;

[0115] Input multiple video segment samples into the model to be trained, and obtain the predicted personality label output by the model to be trained for each video segment sample, wherein the model to be trained includes a feature extraction model as the body of the model, a feature aggregation model as the head of the model, and a prediction model as the tail of the model;

[0116] According to the marked personality labels and the predicted personality labels, the loss value is determined by a preset loss function, and the model parameters of the feature extraction model, the feature aggregation model and the prediction model are adjusted according to the loss value.

[0117] In the disclosed embodiment, the model to be trained may include three parts: trunk, head and tail. Optionally, the trunk of the model may be a feature extraction model, the head of the model may be a feature aggregation model, and the tail of the model may be a prediction model.

[0118] In the disclosed embodiment, supervised learning is used to jointly train the models to be trained, including a feature extraction model, a feature aggregation model, and a prediction model. During the training process, each sample data is a video segment, that is, each video segment sample includes multiple video frames. At the same time, each video segment sample carries a marked personality label.

[0119] For example, we can select training video clips of about 20 seconds each (calculated at fps of 25, the entire clip contains 500 video frames), uniformly downsample them to 100 video frames, and then randomly sample 16 or 32 consecutive video frames as a video segment, and combine the scores of each personality dimension of the external personality corresponding to the video segment to obtain a training sample data.

[0120] In the disclosed embodiment, multiple video segmentation samples are input into the model to be trained. After being processed by the feature extraction model, feature aggregation model and prediction model in the video to be trained, a predicted personality label is output for each video segmentation sample. Then, the loss value can be determined according to the labeled personality label and the predicted personality label through a preset loss function, and the model parameters of the feature extraction model, feature aggregation model and prediction model can be adjusted according to the loss value to realize joint training.

[0121] In addition, the applicant has found through research that normal external behaviors of humans can be expressed through different parts of the human body. For example, it can be expressed in visual facial and body movements, etc. Based on this consideration, in some embodiments, each video frame includes a first image area and a second image area. In this case, in step S201, determining the features of each video frame in multiple video frames of the person object may include the following steps:

[0122] determining a feature of a first image region and a feature of a second image region in each video frame;

[0123] Accordingly, according to the correlation degree of the temporal features and the correlation degree of the spatial features, the features of each video frame are aggregated to obtain the aggregated features, which may include the following steps:

[0124] Aggregating features of the first image region of each video frame according to a correlation degree of temporal features of the first image region between key frames and non-key frames, and a correlation degree of spatial features of the first image region between key frames and non-key frames, to obtain a first aggregated feature;

[0125] Aggregating the features of the second image region of each video frame according to the correlation degree of the temporal features of the second image region between the key frame and the non-key frame, and the correlation degree of the spatial features of the second image region between the key frame and the non-key frame, to obtain a second aggregated feature;

[0126] The first aggregate feature and the second aggregate feature are aggregated to obtain an aggregate feature.

[0127] In the embodiment of the present disclosure, the first image area and the second image area are both location areas including specific human body parts in the video frame, wherein the first image area and the second image area may partially overlap.

[0128] In the disclosed embodiment, for any video frame, a first image area and a second image area can be selected from the video frame, and then the features of the first image area and the features of the second image area in each video frame can be determined. Further, for the first image area, the features of the first image area of ​​each video frame can be aggregated according to the degree of correlation of the temporal features of the first image area between key frames and non-key frames, and the degree of correlation of the spatial features of the first image area between key frames and non-key frames, to obtain a first aggregated feature. Similarly, for the second image area, the features of the second image area of ​​each video frame can be aggregated according to the degree of correlation of the temporal features of the second image area between key frames and non-key frames, and the degree of correlation of the spatial features of the second image area between key frames and non-key frames, to obtain a second aggregated feature. Finally, the first aggregated feature and the second aggregated feature can be aggregated to obtain an aggregated feature.

[0129] The process of determining the features of the first image region and the features of the second image region in each video frame may refer to the aforementioned embodiment and will not be described in detail here.

[0130] In some implementations, the first aggregate feature and the second aggregate feature may be aggregated based on a preset weight coefficient to obtain an aggregate feature.

[0131] In some embodiments, the preset weight coefficient between the first aggregation feature and the second aggregation feature may be 1:1.

[0132] In other embodiments, the preset weight coefficient between the first aggregate feature and the second aggregate feature can be determined based on the importance of the first image area and the second image area. When the importance of the first image area is greater than that of the second image area, the weight coefficient represented by the first sub-preset feature is greater than the weight coefficient represented by the second sub-preset feature.

[0133] In some embodiments, the importance can be determined based on the inter-frame differences corresponding to the first image area in multiple video frames and the inter-frame differences corresponding to the second image area in multiple video frames. The larger the inter-frame differences are, the richer and more important the information expressed about the external behavior of the human body is.

[0134] Through the above technical solution, different aggregation features are obtained by selecting different local areas from each video frame, and the final aggregation features are obtained based on the different aggregation features, so that the final aggregation features can focus on different local areas, improve the perception ability of local areas, and further improve the accuracy of external personality determination.

[0135] In some embodiments, the first image region is the image region where the face of the person object is located in the corresponding video frame, and the second image region is the image region where the upper limbs of the person object are located in the corresponding video frame. Optionally, the image region where the upper limbs of the person object are located in the corresponding video frame includes the image region where the face of the person object is located in the corresponding video frame.

[0136] In some implementations, the image region where the face of the person object is located in the corresponding video frame, ie, the first image region, may be extracted by a face detector and a face alignment module.

[0137] In some embodiments, a pre-trained human region detection model can be used to detect and regress the image region where the upper limbs of the human subject are located in the corresponding video frame, i.e., the second image region. Optionally, the human region detection model can be trained based on sample data carrying upper limb region labels.

[0138] Taking into account that normal external behavior of humans is more manifested in visual facial and upper limb movements, the accuracy of external personality determination can be further improved by setting the first image area to the image area where the face of the character object is located in the corresponding video frame, and the second image area to the image area where the upper limbs of the character object are located in the corresponding video frame.

[0139] In some implementations, considering that a video segment may bring about accidental errors, thereby reducing the accuracy of external personality determination, therefore, in order to further improve the accuracy of external personality determination, in some implementations, the method of the embodiment of the present disclosure may further include the following steps:

[0140] Segmenting the to-be-processed video of the person object to obtain a plurality of video segments, each of which includes a plurality of video frames;

[0141] For each of the multiple video frames in each video segment, a step of determining the features of each of the multiple video frames of the person object is performed, and the features of each video frame are aggregated according to the correlation degree of the temporal features and the correlation degree of the spatial features to obtain the aggregated features;

[0142] Accordingly, the aggregated features are input into the model to output the external personality information of the human objects in multiple video frames, which may include the following steps:

[0143] The aggregated features of each video segment are input into the model, and multiple external character information corresponding to the multiple video segments are output, so as to determine the final external character of the character object according to the multiple external character information.

[0144] In the disclosed embodiment, the aforementioned steps S101-S103 can be executed for any video segment to obtain the aggregate features corresponding to each video segment. Then, the aggregate features corresponding to each video segment can be further input into the prediction model to obtain multiple external personality information corresponding to the multiple video segments output by the prediction model. Subsequently, the final external personality of the character object can be further determined based on the multiple external personality information.

[0145] In some embodiments, multiple pieces of external personality information corresponding one to one with multiple video segments can be understood as an intermediate external personality information respectively, and then, the average of each intermediate external personality information can be obtained, and then the average is determined as the final external personality of the character object.

[0146] It should be noted that each intermediate external personality information includes multiple personality dimensions. Therefore, when obtaining the mean of each intermediate external personality information, the values ​​corresponding to the same personality dimension in each intermediate external personality information are averaged. Therefore, the final external personality of the target person object also includes multiple personality dimensions.

[0147] Through the above technical scheme, when determining the external personality of the target person object, multiple video segments are selected for processing to obtain multiple external personality information corresponding one-to-one to the multiple video segments, and further based on the multiple external personality information corresponding one-to-one to the multiple video segments, the final external personality of the person object is obtained, which can eliminate accidental errors and further improve the accuracy of external personality determination.

[0148] In addition, considering that sound information can also express the external behavioral information of the human body to a certain extent, in order to further improve the accuracy of external personality determination, in some embodiments, the characteristics of each audio frame in multiple audio frames of the character object can also be determined, and the characteristics include timing characteristics and spatial characteristics, and the multiple video frames include: key frames and non-key frames; determine the degree of correlation between the timing characteristics of the key audio frames and the timing characteristics of the non-key audio frames, and determine the degree of correlation between the spatial characteristics of the key audio frames and the spatial characteristics of the non-key audio frames; according to the correlation degree of the timing characteristics and the correlation degree of the spatial characteristics, aggregate the characteristics of each audio frame to obtain the aggregated characteristics corresponding to the audio frame.

[0149] Among them, the spatial information and timing information of the audio frame are both information at the audio frame level. The spatial information of the audio frame is used to represent the spatial structure information of the audio frame, and the timing information of the audio frame is used to represent the front and back order of the audio frame in multiple audio frames of the video.

[0150] In combination with the foregoing content, it can be known that the aggregate features corresponding to the video frames and the aggregate features corresponding to the audio frames can be obtained. In some embodiments, the two aggregate features can be spliced ​​to obtain the aggregate features ultimately used to determine the external personality, and then input into the prediction model to obtain the external personality. In this way, the information of the image modality and the information of the audio modality can be combined to further improve the accuracy of the external personality determination.

[0151] Figure 3 is a flowchart of a method for determining an external personality according to an exemplary embodiment of the present disclosure, which method can be applied to electronic devices, referring to Figure 3 , the external personality determination method may include the following steps:

[0152] S301: Segment the to-be-processed video of the person object to obtain a plurality of video segments, each of which includes a plurality of video frames.

[0153] S302: For each video segment, determine features of a first image region and features of a second image region in each video frame in the video segment.

[0154] S303: Aggregate features of the first image region of each video frame according to the correlation degree of temporal features of the first image region between key frames and non-key frames, and the correlation degree of spatial features of the first image region between key frames and non-key frames to obtain first aggregate features.

[0155] S304: Aggregate the features of the second image area of ​​each video frame according to the correlation degree of the temporal features of the second image area between the key frames and the non-key frames, and the correlation degree of the spatial features of the second image area between the key frames and the non-key frames to obtain a second aggregated feature.

[0156] S305: Aggregate the first aggregate feature and the second aggregate feature to obtain an aggregate feature.

[0157] S306: Input the aggregated features of each video segment into the model, and output a plurality of external personality information corresponding to the plurality of video segments one by one.

[0158] S307: Determine the final external character of the character object according to the multiple external character information.

[0159] It should be noted that, in some embodiments, Figure 3 The steps S301-S307 in the above method can be performed by a trained neural network model, which can be called an external personality determination model. The following embodiment will further introduce the trained neural network model.

[0160] In some embodiments, Figure 4 As shown, the trained neural network model may include a spatial feature extraction model, a temporal feature encoder, a first attention mechanism encoder, a second attention mechanism encoder, a splicing operator, and a prediction model (the prediction model includes sub-prediction models corresponding to multiple personality dimensions). In this way, when the first image area and the second image area in each video frame are obtained, the first image area and the second image area in each video frame can be respectively input into the trained neural network model, and the trained neural network model can execute steps S301-S307, thereby obtaining the external personality result corresponding to the target person object.

[0161] Next, combine Figure 4 The model structure diagram shown illustrates the process of steps S301-S307:

[0162] The first image region and the second image region in each video frame are processed respectively by a spatial feature extraction model to obtain the spatial features of the first image region and the spatial features of the second image region corresponding to each video frame.

[0163] The temporal relationship between the video frames is processed by a temporal feature encoder to obtain the temporal features of the first image region and the temporal features of the second image region corresponding to the video frames.

[0164] The spatial features of the first image region corresponding to each video frame and the temporal features of the first image region corresponding to each video frame are processed through the first attention mechanism encoder to obtain a first aggregated feature.

[0165] The second attention mechanism encoder obtains the second aggregated features by performing the spatial features of the second image region corresponding to each video frame and the temporal features of the second image region corresponding to each video frame.

[0166] The first aggregation feature and the second aggregation feature are processed by a concatenation operator to obtain a final aggregation feature.

[0167] The final aggregated features are processed through multiple sub-prediction models in the prediction model to output the scores of the character objects corresponding to multiple personality dimensions.

[0168] In some embodiments, the first attention mechanism encoder, the second attention mechanism encoder, and the parameters of the prediction model can be obtained during the training process of the neural network model.

[0169] In some embodiments, spatial feature extraction, temporal feature encoder, first attention mechanism encoder, second attention mechanism encoder, and parameters of the prediction model can be obtained during the training process of the neural network model.

[0170] In some embodiments, the training process of the neural network model may be performed by minimizing the MSE (mean squared error) loss. The losses are calculated for each of the five feature dimensions and then averaged.

[0171] In some implementations, the ACC (Accuracy) index and the CCC (Concordance Correlation Coefficient) index may be used as evaluation indexes of the neural network model.

[0172] Among them, considering that the determination of external personality is essentially the regression of various personality dimensions, the definition of ACC adopts the accuracy measure derived from MAE (Mean Absolute Error).

[0173] In some embodiments, the ACC index can be expressed by the following formula:

[0174]

[0175] Among them, N represents the number of test samples, n represents, y pn Represents the predicted value of the external personality corresponding to the nth test sample, y gn Indicates the labeled value of the external personality result corresponding to the nth test sample.

[0176] Among them, the CCC indicator combines the characteristics of MSE (Mean Square Error) and PCC (Pearson Correlation Coefficient), and can simultaneously measure the error value and correlation between the predicted value and the true value.

[0177] In some embodiments, the CCC index can be expressed by the following formula:

[0178]

[0179] in, Represents the mean of the predicted values ​​of external personality corresponding to all test samples, Represents the mean of the labeled values ​​of the external personality corresponding to all test samples, Represents the standard deviation of the predicted values ​​of external personality corresponding to all test samples, Indicates the standard deviation of the labeled values ​​of the external personality corresponding to all test samples, Represents the Pearson correlation coefficient between the predicted values ​​of the external personality of all test samples and the labeled values ​​of the external personality of all test samples, where The value range is (-1,1). A value of 0 indicates no correlation, a negative value indicates negative correlation, and a positive value indicates positive correlation. The larger the CCC value, the stronger the correlation; the closer the CCC value is to 1, the better the algorithm performs.

[0180] In some embodiments, in the above neural network model, the body of the model may include a spatial feature extraction network and a temporal feature encoder, wherein the spatial feature extraction network may be a feature extraction network in Resnet50, and the temporal feature encoder may be a self-attention mechanism encoder.

[0181] In some embodiments, the head of the model may include a first attention mechanism encoder, a second attention mechanism encoder, and a splicing operator. The first attention mechanism encoder and the second attention mechanism encoder may be encoders in a transformer structure. The Q processing unit, the K processing unit, and the V processing unit are included.

[0182] In some embodiments, the tail of the model may include a prediction model. The prediction model may include a fully connected layer and an activation function.

[0183] Based on the same technical concept, the embodiment of the present application also provides a dialogue method. Figure 5 is a flow chart of a conversation method provided in an embodiment of the present application, which can be applied to electronic devices, see Figure 5 , the method may include the following steps:

[0184] S501: Determine the features of each video frame in a plurality of video frames of a person object, wherein the features include temporal features and spatial features, and the plurality of video frames include key frames and non-key frames, and the plurality of video frames are video frames of the person object during a conversation.

[0185] S502: Determine the correlation degree between the temporal features of the key frame and the temporal features of the non-key frame, and determine the correlation degree between the spatial features of the key frame and the spatial features of the non-key frame.

[0186] S503: Aggregate the features of each video frame according to the correlation degree of the temporal features and the correlation degree of the spatial features to obtain aggregated features.

[0187] S504: Input the aggregated features into the model to obtain the external character information of the human objects in the multiple video frames output by the model.

[0188] S505: Adjust the content of the dialogue with the character object according to the external character information.

[0189] The detailed description of the above steps S501-S504 can refer to the above embodiments and will not be repeated here.

[0190] In the disclosed embodiment, the external personality determination method can be applied in an online automatic conversation scenario. Thus, after determining the external personality information of a character object, the electronic device can automatically adjust the conversation content with the character object according to the external personality information.

[0191] It should be noted that the automatic adjustment of the dialogue content with the character object based on the external personality information can also be implemented by real people.

[0192] For example, in an online interview or online interview scenario, the server can determine the external personality information of the interviewee or the interviewee, and then send the external personality information of the interviewee or the interviewee to the interviewer's or other terminal devices. Then, the user of the interviewer's or the interviewee's other terminal devices can adjust the conversation content with the interviewee or the interviewee based on the external personality information of the interviewee or the interviewee.

[0193] In some implementations, the external personality of the character object includes multiple personality dimensions, and the external personality information output by the model includes the score of the character object under each personality dimension. In this case, in step S505, adjusting the content of the dialogue with the character object according to the external personality information includes:

[0194] Determine the target personality dimension corresponding to the highest score among the scores under each personality dimension;

[0195] According to the preset correspondence between the personality dimension and the dialogue style, the dialogue content corresponding to the dialogue style of the target personality dimension is selected to conduct a dialogue with the character object.

[0196] In the disclosed embodiment, a preset correspondence between personality dimensions and conversation styles can be saved in advance. Then, after obtaining the scores of multiple personality dimensions output by the model, the personality dimension with the highest corresponding score among the multiple personality dimensions can be selected as the target personality dimension of the character object, and then the conversation content corresponding to the conversation style of the target personality dimension can be selected to conduct a conversation with the character object.

[0197] Optionally, the conversation style may be, for example, a conservative, radical, or normal conversation style.

[0198] For example, assuming that in the external personality information of the user in the online automatic dialogue scenario, the corresponding values ​​of openness, conscientiousness, extroversion, agreeableness and emotional instability are 0.2, 0.2, 0.1, 0.1, 0.4 respectively, then emotional instability can be determined as the target personality dimension of the user. Then the electronic device can use a relatively conservative dialogue style to communicate with the user to avoid irritating the user.

[0199] Next, the process of applying the external personality determination method and the dialogue method of the embodiment of the present disclosure is described in conjunction with a specific application scenario.

[0200] In some implementations, taking the online interview or online interview scenario described above as an example, combined with Figure 6 A dialogue process provided by an embodiment of the present disclosure is described.

[0201] like Figure 6 As shown, when the first terminal runs an online interview or online interview application, it can enter the real-time online video interface. At this time, the first terminal will collect the real-time video of the first user online and send the real-time video to the server.

[0202] The server may uniformly downsample and extract multiple video segments based on the accumulated videos of a certain length. For example, 100 video frames may be uniformly downsampled based on the accumulated 20 seconds of real-time video, and 3 segments of the 100 video frames may be sequentially sampled to obtain 3 video segments, each of which includes 32 video frames.

[0203] Then, for each video segment, the server obtains the first image area and the second image area corresponding to each video frame in the video segment. Exemplarily, the first image area is the area where the face of the first user is located, and the second image area is the area where the upper limbs of the first user are located. In this case, the server can use a face detector and a face alignment module to extract the first image area from each video frame, and can use a pre-trained human body area detection model to detect and regress the second image area from each video frame.

[0204] Optionally, the server can call Figure 4 The neural network model shown processes the first image area and the second image area corresponding to each video frame in the video segment to obtain the external personality information corresponding to the video to be processed, and further, the external personality information corresponding to each video segment can be obtained.

[0205] Next, the server may further obtain external personality information corresponding to the first user based on the plurality of external personality information.

[0206] Exemplarily, taking the example that the external personality includes five personality dimensions, namely openness, conscientiousness, extraversion, agreeableness and emotional instability, the server can obtain the value corresponding to the openness included in the external personality information based on the average value of the values ​​corresponding to the openness in each piece of external personality information. Similarly, the server can obtain the value corresponding to the conscientiousness included in the external personality information, the value corresponding to the extraversion included in the external personality information, the value corresponding to the agreeableness included in the external personality information, and the value corresponding to the emotional instability included in the external personality information.

[0207] Next, the server may determine the target personality dimension corresponding to the highest score in each personality dimension, and then select the conversation style corresponding to the target personality dimension, for example, the conservative conversation style, according to the preset correspondence between the personality dimension and the conversation style, and send the conversation style to the second terminal.

[0208] The second terminal displays the conversation style in the second terminal display interface to prompt the second user of the second terminal. In this way, the second user can jump to the subsequent conversation content according to the conversation style.

[0209] In addition, in some embodiments, the server may also be used to transmit the video of the first user and the video screen of the second user between the first terminal and the second terminal. Thus, the images of the first user and the second user may also be displayed in the display interface of the first terminal, and / or the images of the first user and the second user may also be displayed in the display interface of the second terminal.

[0210] Based on the same concept, the embodiment of the present disclosure also provides an external personality determination device, which can be part or all of the electronic device through software, hardware, or a combination of software and hardware. Figure 7 As shown, the external personality determination device 700 may include:

[0211] The first determination module 701 is configured to determine the features of each of the plurality of video frames of the person object, wherein the features include temporal features and spatial features, and the plurality of video frames include: key frames and non-key frames;

[0212] The second determination module 702 is configured to determine the degree of association between the temporal features of the key frame and the temporal features of the non-key frame, and determine the degree of association between the spatial features of the key frame and the spatial features of the non-key frame;

[0213] Aggregation module 703, configured to aggregate the features of each of the video frames according to the correlation degree of the temporal features and the correlation degree of the spatial features to obtain aggregated features;

[0214] The model processing module 704 is configured to input the aggregated features into a model and output the external character information of the human object in the multiple video frames.

[0215] Optionally, the aggregation module 703 includes:

[0216] A weight allocation submodule, configured to allocate a weight to each of the video frames according to the degree of association between the temporal features of the key frame and the temporal features of the non-key frame, and the degree of association between the spatial features of the key frame and the spatial features of the non-key frame;

[0217] The first aggregation submodule is configured to perform weighted aggregation on the features of each of the video frames according to the weight of each of the video frames to obtain the aggregated features.

[0218] Optionally, each of the video frames includes a first image area and a second image area, and the first determining module 701 includes:

[0219] a feature determination submodule, configured to determine the features of the first image region and the features of the second image region in each of the video frames;

[0220] Accordingly, the aggregation module 703 further includes:

[0221] A first aggregate feature determination submodule is configured to aggregate features of the first image region of each of the video frames according to a correlation degree of temporal features of the first image region between the key frame and the non-key frame, and a correlation degree of spatial features of the first image region between the key frame and the non-key frame, to obtain a first aggregate feature;

[0222] A second aggregate feature determination submodule is configured to aggregate features of the second image region of each of the video frames according to a correlation degree of temporal features of the second image region between the key frame and the non-key frame, and a correlation degree of spatial features of the second image region between the key frame and the non-key frame, to obtain a second aggregate feature;

[0223] The second aggregation submodule is configured to aggregate the first aggregation feature and the second aggregation feature to obtain the aggregation feature.

[0224] Optionally, the first image area is an image area where the face of the person object is located in the corresponding video frame, and the second image area is an image area where the upper limbs of the person object are located in the corresponding video frame.

[0225] Optionally, the apparatus 700 further includes:

[0226] A video segmentation module is configured to segment the to-be-processed video of the person object to obtain a plurality of video segments, each of which includes a plurality of video frames;

[0227] The processing module is configured to execute the step of determining the features of each of the multiple video frames of the character object for each of the multiple video frames in each of the video segments, and to aggregate the features of each of the video frames according to the degree of association of the temporal features and the degree of association of the spatial features to obtain aggregated features.

[0228] Correspondingly, the model processing module 704 is also configured to input the aggregated features of each of the video segments into the model, and output multiple external personality information corresponding to the multiple video segments one by one, so as to determine the final external personality of the character object based on the multiple external personality information.

[0229] Optionally, the key frame is an intermediate frame of the multiple video frames in the video recording sequence.

[0230] Optionally, the external character of the character object includes multiple character dimensions, and the external character information output by the model includes the score of the character object in each character dimension.

[0231] Optionally, the apparatus 700 further includes:

[0232] The calling module is configured to perform the steps of determining the degree of association between the temporal features of the key frame and the temporal features of the non-key frame, determining the degree of association between the spatial features of the key frame and the spatial features of the non-key frame, and aggregating the features of each video frame according to the degree of association between the temporal features and the spatial features to obtain aggregated features by using a feature aggregation model based on an attention mechanism and taking the features of the key frame as query Q input and the features of the non-key frame as key K and value V input.

[0233] Optionally, the model is a prediction model, and the method further includes jointly training a feature extraction model, a feature aggregation model, and the prediction model, wherein the feature extraction model is used to perform the step of determining the features of each of the multiple video frames of the person object; the device 700 further includes:

[0234] The training module is configured to obtain multiple video segmentation samples, each of which includes a marked personality label and multiple video frames; input the multiple video segmentation samples into the model to be trained to obtain the predicted personality label output by the model to be trained for each video segmentation sample, the model to be trained includes a feature extraction model as the model body, the feature aggregation model as the model head, and the prediction model as the model tail; determine the loss value through a preset loss function according to the marked personality label and the predicted personality label, and adjust the model parameters of the feature extraction model, the feature aggregation model and the prediction model according to the loss value.

[0235] Based on the same concept, the embodiment of the present disclosure also provides a dialogue device, which can become part or all of the electronic device through software, hardware, or a combination of software and hardware. Figure 8 As shown, the external personality determination device 800 may include:

[0236] The first determination module 801 is configured to determine the features of each of the multiple video frames of the character object, wherein the features include temporal features and spatial features, and the multiple video frames include: key frames and non-key frames, and the multiple video frames are video frames of the character object during the conversation process;

[0237] The second determination module 802 is configured to determine the degree of association between the temporal features of the key frame and the temporal features of the non-key frame, and determine the degree of association between the spatial features of the key frame and the spatial features of the non-key frame;

[0238] Aggregation module 803, configured to aggregate the features of each of the video frames according to the correlation degree of the temporal features and the correlation degree of the spatial features to obtain aggregated features;

[0239] The model processing module 804 is configured to input the aggregated features into a pre-trained model to obtain the external personality information of the human object in the multiple video frames output by the model;

[0240] The dialogue adjustment module 805 is configured to adjust the dialogue content with the character object according to the external personality information.

[0241] Optionally, the external personality of the character object includes multiple personality dimensions, and the external personality information output by the model includes the score of the character object under each personality dimension. The dialogue adjustment module 805 includes:

[0242] A target personality dimension determination submodule is configured to determine the target personality dimension corresponding to the highest score among the scores under each personality dimension;

[0243] The dialogue submodule is configured to select dialogue content corresponding to the dialogue style of the target personality dimension to conduct a dialogue with the character object according to a preset correspondence between the personality dimension and the dialogue style.

[0244] Based on the same concept, an embodiment of the present disclosure further provides an electronic device, including:

[0245] a storage device having a computer program stored thereon;

[0246] A processing device is used to execute the computer program in the storage device to implement the steps of any of the above-mentioned external personality determination methods or any of the dialogue methods.

[0247] Fig. 9 An electronic device (eg, Figure 1 A schematic diagram of the structure of a terminal device or server in FIG. 900.

[0248] The electronic device 900 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 are also stored. The processing device 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0249] Typically, the following devices may be connected to the I / O interface 905: an input device 906 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 908 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 909. The communication device 909 may allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 900 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0250] Based on the same concept, an embodiment of the present disclosure also provides a computer-readable medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned external personality determination methods are implemented.

[0251] Based on the same concept, an embodiment of the present disclosure also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned external personality determination methods or any of the dialogue methods.

[0252] It should be understood that the above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.

[0253] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0254] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. A method for determining external personality, characterized in that: include: Determine the features of each of the plurality of video frames of the person object, wherein the features include temporal features and spatial features, and the plurality of video frames include: key frames and non-key frames; Determining a correlation degree between the temporal features of the key frame and the temporal features of the non-key frame, and determining a correlation degree between the spatial features of the key frame and the spatial features of the non-key frame; Aggregating the features of each of the video frames according to the correlation degree of the temporal features and the correlation degree of the spatial features to obtain aggregated features; The aggregated features are input into a model, and external character information of the human objects in the multiple video frames is output.

2. The method according to claim 1, characterized in that: The step of aggregating the features of each of the video frames according to the correlation degree of the temporal features and the correlation degree of the spatial features to obtain aggregated features includes: Assigning a weight to each of the video frames according to the degree of association between the temporal features of the key frame and the temporal features of the non-key frame, and the degree of association between the spatial features of the key frame and the spatial features of the non-key frame; According to the weight of each of the video frames, the features of each of the video frames are weighted and aggregated to obtain the aggregated features.

3. The method according to claim 1, characterized in that Each of the video frames includes a first image area and a second image area, and the step of determining the feature of each of the plurality of video frames of the human object includes: Determining the characteristics of the first image region and the characteristics of the second image region in each of the video frames; Aggregating the features of each of the video frames according to the correlation degree of the temporal features and the correlation degree of the spatial features to obtain the aggregated features includes: Aggregating features of the first image region of each of the video frames according to a correlation degree of temporal features of the first image region between the key frame and the non-key frame, and a correlation degree of spatial features of the first image region between the key frame and the non-key frame, to obtain a first aggregated feature; Aggregating features of the second image region of each of the video frames according to a correlation degree of temporal features of the second image region between the key frame and the non-key frame, and a correlation degree of spatial features of the second image region between the key frame and the non-key frame, to obtain a second aggregated feature; The first aggregate feature and the second aggregate feature are aggregated to obtain the aggregate feature.

4. The method according to claim 3, characterized in that The first image region is the image region where the face of the person object is located in the corresponding video frame, and the second image region is the image region where the upper limbs of the person object are located in the corresponding video frame.

5. The method according to claim 1, characterized in that: The method further comprises: Segmenting the to-be-processed video of the person object to obtain a plurality of video segments, each of the video segments comprising a plurality of video frames; For each of the plurality of video frames in the video segment, the step of determining the features of each of the plurality of video frames of the person object is performed, until the step of aggregating the features of each of the video frames according to the correlation degree of the temporal features and the correlation degree of the spatial features to obtain the aggregated features; The step of inputting the aggregated features into a model and outputting external character information of the human objects in the multiple video frames comprises: The aggregated features of each of the video segments are input into the model, and a plurality of external character information corresponding to the plurality of video segments is output, so as to determine the final external character of the character object according to the plurality of external character information.

6. The method according to claim 1, characterized in that The key frame is an intermediate frame of the multiple video frames in the video recording sequence.

7. The method according to claim 1, characterized in that The external character of the character object includes multiple character dimensions, and the external character information output by the model includes the score of the character object in each character dimension.

8. The method according to claim 1, characterized in that The method further comprises: Through the feature aggregation model based on the attention mechanism, the features of the key frame are used as the query Q input, the features of the non-key frame are used as the key K and value V input, and the steps of determining the degree of association between the temporal features of the key frame and the temporal features of the non-key frame, and determining the degree of association between the spatial features of the key frame and the spatial features of the non-key frame, and aggregating the features of each video frame according to the degree of association between the temporal features and the degree of association between the spatial features are performed to obtain aggregated features.

9. The method according to claim 1, characterized in that: The model is a prediction model, and the method further includes jointly training a feature extraction model, a feature aggregation model, and the prediction model, wherein the feature extraction model is used to perform the step of determining the features of each of the multiple video frames of the person object; wherein the joint training includes: Acquire multiple video segment samples, each of which includes a marked personality label and multiple video frames; Input the plurality of video segment samples into a to-be-trained model, and obtain a predicted personality label output by the to-be-trained model for each of the video segment samples, wherein the to-be-trained model includes a feature extraction model as a model body, a feature aggregation model as a model head, and a prediction model as a model tail; According to the marked personality label and the predicted personality label, a loss value is determined by a preset loss function, and model parameters of the feature extraction model, the feature aggregation model and the prediction model are adjusted according to the loss value.

10. A conversation method, characterized in that: The method further comprises: Determine the feature of each of the plurality of video frames of the character object, wherein the feature includes a temporal feature and a spatial feature, wherein the plurality of video frames include: key frames and non-key frames, and the plurality of video frames are video frames of the character object during a conversation; Determining a correlation degree between the temporal features of the key frame and the temporal features of the non-key frame, and determining a correlation degree between the spatial features of the key frame and the spatial features of the non-key frame; Aggregating the features of each of the video frames according to the correlation degree of the temporal features and the correlation degree of the spatial features to obtain aggregated features; Inputting the aggregated features into a pre-trained model to obtain the external personality information of the human object in the multiple video frames output by the model; According to the external character information, the content of the dialogue with the character object is adjusted.

11. The method according to claim 10, characterized in that The external character of the character object includes multiple character dimensions, and the external character information output by the model includes the score of the character object under each character dimension; The step of adjusting the dialogue content with the character object according to the external character information includes: Determine the target personality dimension corresponding to the highest score among the scores under each personality dimension; According to the preset correspondence between the personality dimension and the dialogue style, the dialogue content corresponding to the dialogue style of the target personality dimension is selected to conduct a dialogue with the character object.

12. An external personality determination device, characterized in that: include: A first determination module is configured to determine a feature of each of a plurality of video frames of a person object, wherein the feature includes a temporal feature and a spatial feature, and the plurality of video frames include: key frames and non-key frames; A second determination module is configured to determine the degree of association between the temporal features of the key frame and the temporal features of the non-key frame, and to determine the degree of association between the spatial features of the key frame and the spatial features of the non-key frame; an aggregation module, configured to aggregate the features of each of the video frames according to the correlation degree of the temporal features and the correlation degree of the spatial features to obtain an aggregated feature; The model processing module is configured to input the aggregated features into the model and output the external character information of the human object in the multiple video frames.

13. A conversation device, characterized in that: include: A first determination module is configured to determine a feature of each of a plurality of video frames of a person object, wherein the feature includes a temporal feature and a spatial feature, wherein the plurality of video frames include: key frames and non-key frames, and the plurality of video frames are video frames of the person object during a conversation; A second determination module is configured to determine the degree of association between the temporal features of the key frame and the temporal features of the non-key frame, and to determine the degree of association between the spatial features of the key frame and the spatial features of the non-key frame; an aggregation module, configured to aggregate the features of each of the video frames according to the correlation degree of the temporal features and the correlation degree of the spatial features to obtain an aggregated feature; A model processing module is configured to input the aggregated features into a pre-trained model to obtain the external personality information of the human object in the multiple video frames output by the model; The dialogue adjustment module is configured to adjust the dialogue content with the character object according to the external personality information.

14. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 11 are implemented.

15. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 11.

16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Image recognition method, device and related equipment

    CN108388876A

  • User information analysis method and system

    CN111259862A

  • Multi-dimensional data generation method based on micro expressions and faces and related equipment thereof

    CN113313096A

  • Video quality enhancement method for short video website

    CN115604479A

  • Video super-resolution reconstruction method based on deep learning

    CN117934278A