Emotion analysis method and system based on artificial intelligence
By collecting and analyzing text, speech and facial information in the video, and calculating the comprehensive emotional score, the problem of poor processing of ambiguity and multimodal information in the prior art is solved, and a higher accuracy of emotional judgment is achieved.
Patent Information
- Application Number
- CN202510200652.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-06-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing emotion analysis methods have poor responses to the ambiguity and complex grammatical structure of text, which can easily lead to misjudgment and lack comprehensive consideration of multimodal emotional information, resulting in a decrease in the accuracy of emotion recognition.
By collecting target video materials, extracting facial information and voice information, converting voice information into text information, and using natural language processing models and speech feature extraction algorithms, combining facial feature points and micro-expressions, comprehensive emotional scores are calculated to improve the accuracy of emotional judgment.
By highly fusion of text, voice and facial information, and using artificial intelligence algorithms to comprehensively consider the emotional intensity of three dimensions, the accuracy of emotional judgment is significantly improved and the deviation caused by a single data source is avoided.
Smart Images

Figure CN120126197A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and particularly to an emotion analysis method and system based on artificial intelligence. Background Art
[0002] Emotion analysis is an important task in the field of natural language processing (NLP), aiming to identify and extract subjective information in text. This technology has wide applications in multiple fields such as social media monitoring, customer feedback analysis, market research, and crisis management. By classifying the emotions in text, emotion analysis can help enterprises and organizations obtain first-hand data on public sentiment, thereby enabling more accurate decision-making.
[0003] In recent years, with the rapid development of artificial intelligence technology, emotion analysis methods have gradually shifted towards machine learning and deep learning. Traditional emotion analysis methods mostly rely on dictionaries, rules, and simple machine learning algorithms, facing the problem of insufficient understanding of grammar and context. In contrast, emotion analysis methods based on artificial intelligence can train models through a large amount of data, thereby more accurately identifying emotional expressions in different situations and having stronger adaptability and accuracy.
[0004] However, there are still some significant deficiencies in the existing emotion analysis methods. For example, many emotion analysis methods based on existing traditional models do not respond well to the polysemy and complex grammar structures of text, easily leading to misjudgments. The construction of emotion dictionaries often relies on data in specific fields, and the ability to recognize emotions across domains or in specific contexts is limited. Moreover, existing technologies often conduct emotion analysis of text, speech, and facial expressions separately, lacking comprehensive consideration of multi-modal emotion information, resulting in a decrease in the accuracy of emotion recognition. Therefore, it is very necessary to design an emotion analysis method and system based on artificial intelligence. Summary of the Invention
[0005] The purpose of the present invention is to provide an emotion analysis method and system based on artificial intelligence, so as to highly integrate text, speech, and facial information, and comprehensively consider the emotional intensity in three dimensions by using artificial intelligence algorithms to improve the accuracy of emotion judgment.
[0006] To achieve the above object, the present invention provides the following solutions:
[0007] An emotion analysis method based on artificial intelligence, comprising the following steps:
[0008] Collect the target video material of the person, and extract the face information and speech information in the target video material;
[0009] Convert the speech information into text information, and obtain the text emotional intensity according to the text information;
[0010] Extract features from the voice information to obtain sound information, and obtain the voice emotion intensity according to the sound information; the sound information includes: volume, emotion words, and intonation;
[0011] Identify the facial feature points of the face information, obtain the micro-expression according to the facial feature points, and calculate the facial emotion intensity according to the micro-expression;
[0012] Obtain the comprehensive emotion score according to the text emotion intensity, voice emotion intensity, and facial emotion intensity;
[0013] Obtain the emotion analysis result according to the comprehensive emotion score.
[0014] Optionally, collect the target video material of the personnel, and extract the face information and voice information in the target video material, including:
[0015] Perform face localization on the target video material through Haar features to obtain face information;
[0016] Perform audio separation on the target video material through audio editing software to obtain voice information.
[0017] Optionally, convert the voice information into text information, and obtain the text emotion intensity according to the text information, including:
[0018] Convert the voice information into text information through an automatic speech recognition system;
[0019] Perform data preprocessing operations on the text information through a natural language processing model to obtain text features; the data preprocessing operations include: text cleaning, word segmentation, and stop word removal;
[0020] Use the text with known emotion labels as the training set to train the natural language processing model to obtain the text emotion classification model;
[0021] Predict the emotion label of the text feature through the text emotion classification model and calculate the label confidence; the emotion labels include: positive, negative, neutral, angry, sad, happy, and surprised; the calculation formula for the label confidence is: where P w is the label confidence, f i is the score of the i-th emotion label, and K is the number of emotion labels;
[0022] Calculate the text emotion intensity through the emotion label and confidence; the calculation formula for the text emotion intensity is: where S w is the text emotion intensity, K is the number of emotion labels, P w is the label confidence, and ω i is the weight of the i-th emotion label.
[0023] Optionally, feature extraction is performed on the voice information to obtain voiceprint information, and the voiceprint emotion intensity is obtained based on the voiceprint information, including:
[0024] The volume value is calculated through the amplitude of the voice information;
[0025] Emotional words in the voice information are identified through an emotion dictionary, and different weights are assigned to the emotional words;
[0026] The fundamental frequency of the voice information is obtained through a pitch tracking algorithm, and the intonation is obtained through the change amplitude of the fundamental frequency within a fixed time;
[0027] The voiceprint emotion intensity is calculated through the volume value, emotional words, and intonation.
[0028] Optionally, the fundamental frequency of the voice information is obtained through a pitch tracking algorithm, and the intonation is obtained through the change amplitude of the fundamental frequency within a fixed time, including:
[0029] The spectral information of the voice information is obtained through short-time Fourier transform;
[0030] The autocorrelation function is obtained according to the signal length of the spectral information;
[0031] The fundamental frequency is calculated according to the peak value of the autocorrelation function;
[0032] The fundamental frequency sequence of the fundamental frequency is extracted within a fixed time window, and the change amplitude is calculated according to the fundamental frequency sequence;
[0033] The change amplitude is compared with a preset amplitude threshold, and the intonation is determined through the comparison result.
[0034] Optionally, the calculation formula of the voiceprint emotion intensity is: where S y is the voiceprint emotion intensity, V is the volume value, R(t) is the intonation change, E is the emotional word intensity, and ⊙ is the element-wise multiplication operation.
[0035] Optionally, the facial feature points of the face information are identified, the micro-expression is obtained according to the facial feature points, and the facial emotion intensity is calculated according to the micro-expression, including:
[0036] The face information is converted into a grayscale image;
[0037] Face recognition is performed on the grayscale image through a face detection model, and the facial feature points are obtained;
[0038] Any frame of the grayscale image is selected as the target frame, and the facial feature points in the target frame are located;
[0039] By comparing the differences in the positions of facial feature points between adjacent frames of a grayscale image, a feature vector is obtained;
[0040] Based on a random forest model, micro-expressions are obtained through the feature vector;
[0041] The facial emotion intensity is calculated through the differences in the positions of facial feature points and micro-expressions.
[0042] Optionally, the calculation formula for facial emotion intensity is: where S m is the facial emotion intensity, M is the micro-expression intensity, U is the stability index of facial feature points, k is the influence index of facial feature points, D is the absolute displacement of facial feature points, p is a constant, and T is the time continuation parameter.
[0043] Optionally, the calculation formula for the comprehensive emotion score is: where S z is the comprehensive emotion score, S w is the text emotion intensity, S y is the voice emotion intensity, S m is the facial emotion intensity, R(t) is the intonation change, V is the volume value, G is the number of filler words, and a, b, and h are all constants.
[0044] An emotion analysis method and system based on artificial intelligence, including:
[0045] An information collection module, configured to collect target video materials of a person, and extract face information and voice information from the target video materials;
[0046] A text analysis module, configured to convert the voice information into text information, and obtain the text emotion intensity according to the text information;
[0047] A voice analysis module, configured to extract features from the voice information to obtain voice information, and obtain the voice emotion intensity according to the voice information; the voice information includes: volume, emotion words, and intonation;
[0048] A face analysis module, configured to identify the facial feature points of the face information, obtain micro-expressions according to the facial feature points, and calculate the facial emotion intensity according to the micro-expressions;
[0049] A comprehensive evaluation module, configured to obtain a comprehensive emotion score according to the text emotion intensity, the voice emotion intensity, and the facial emotion intensity;
[0050] A result judgment module, configured to obtain an emotion analysis result according to the comprehensive emotion score.
[0051] According to the specific embodiments provided by the present invention, the following technical effects are disclosed: The emotion analysis method based on artificial intelligence provided by the present invention includes: collecting target video materials of a person, and extracting face information and voice information from the target video materials; converting the voice information into text information, and obtaining text emotion intensity according to the text information; extracting features from the voice information to obtain voice information, and obtaining voice emotion intensity according to the voice information; identifying facial feature points of the face information, obtaining micro-expressions according to the facial feature points, and calculating facial emotion intensity according to the micro-expressions; obtaining a comprehensive emotion score according to the text emotion intensity, voice emotion intensity and facial emotion intensity; obtaining an emotion analysis result according to the comprehensive emotion score. By highly integrating text, voice and facial information, and comprehensively considering the emotion intensity in three dimensions using artificial intelligence algorithms, the present invention greatly improves the accuracy of emotion judgment. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0053] Figure 1 It is the overall flowchart of the emotion analysis method of the present invention;
[0054] Figure 2 It is the flowchart for processing the target video materials of the present invention;
[0055] Figure 3 It is the flowchart for calculating the text emotion intensity of the present invention;
[0056] Figure 4 It is the flowchart for calculating the voice emotion intensity of the present invention;
[0057] Figure 5 It is the flowchart for obtaining intonation of the present invention;
[0058] Figure 6 It is the flowchart for calculating the facial emotion intensity of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0059] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0060] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0061] As Figure 1 shown, the present invention provides an emotion analysis method based on artificial intelligence, including the following steps:
[0062] Step 100: Collect the target video material of the person, and extract the face information and voice information in the target video material; the specific steps are as Figure 2 shown, including:
[0063] Step 101: Perform face localization on the target video material through Haar features to obtain face information;
[0064] Specifically, use the pre-trained Haar feature classifier in the OpenCV library, load the face detection model, then read the collected video frame by frame, perform face detection using Haar features, mark each detected face, and save its position and size information.
[0065] Step 102: Separate the audio from the target video material through audio editing software to obtain voice information.
[0066] Specifically, in this embodiment, Adobe Audition audio editing software is used to extract the audio track from the video, convert it into an MP3 format audio file, and perform noise reduction, volume adjustment, and audio separation to obtain clear human voices. If the video contains background music or other interfering sounds, use the filtering function of the software for separation to retain pure voice information.
[0067] It should be noted that using the Haar feature classifier for face detection realizes fast and accurate processing, improves processing efficiency and reduces manual intervention; in addition, recording the extracted face information and voice information enhances traceability and helps with subsequent analysis and data association.
[0068] Step 200: Convert the voice information into text information, and obtain the text emotion intensity according to the text information; the specific steps are as Figure 3 shown, including:
[0069] Step 201: Convert the voice information into text information through an automatic speech recognition system;
[0070] Specifically, the automatic speech recognition (ASR) system of this embodiment adopts the Google Cloud Speech-to-Text system, which can recognize accents and noises in natural language and output clear text. The speech segments to be processed are fed into the ASR system one by one. The system then analyzes the frequency domain characteristics of the speech information and finally generates the corresponding text format. This process realizes efficient and accurate speech-to-text conversion, laying a foundation for subsequent analysis.
[0071] Step 202: Perform data preprocessing operations on the text information through a natural language processing model to obtain text features; the data preprocessing operations include: text cleaning, word segmentation, and stop word removal;
[0072] Specifically, after obtaining the text information, text cleaning is first performed through a natural language processing (NLP) model to remove special characters, punctuation marks, and redundant spaces in the text. Then, word segmentation is carried out, and the text is segmented into a sequence of words using a word segmentation tool (in this embodiment, NLTK is adopted) to ensure the preservation of the semantic structure. Immediately afterwards, the operation of stop word removal is performed to screen out commonly used words with low information content to improve the accuracy of subsequent analysis and present it in a normalized form.
[0073] Step 203: Use the text with known sentiment labels as the training set to train the natural language processing model to obtain a text sentiment classification model;
[0074] Specifically, the processed text and its corresponding sentiment labels (such as positive, negative, etc.) are input into the NLP model for training. During the training process, the model parameters are optimized through cross-validation to improve the accuracy and robustness of sentiment classification. After training, a classification model that can effectively identify different sentiment states is obtained.
[0075] Step 204: Predict the sentiment label of the text feature through the text sentiment classification model and calculate the label confidence;
[0076] Specifically, the text sentiment classification model is used to predict the sentiment label of the newly generated text feature. The sentiment labels include: positive, negative, neutral, angry, sad, happy, and surprised, and the confidence of each label is calculated simultaneously. The confidence is the degree of confidence in the model's determination, expressed as a value between 0 and 1. The higher the value, the more confident the model is in the prediction result. This process provides an intuitive reflection of the text sentiment state and helps to understand the sentiment tendency.
[0077] More specifically, the calculation formula for the label confidence is:
[0078]
[0079] where P wis the label confidence, f i is the score of the i-th sentiment label, i.e., the output of the last layer of the model, and K is the number of sentiment labels.
[0080] Step 205: Calculate the text sentiment intensity based on the sentiment label and the confidence.
[0081] Specifically, the calculation formula for the text sentiment intensity is:
[0082]
[0083] where S w is the text sentiment intensity, K is the number of sentiment labels, P w is the label confidence, and ω i is the weight of the i-th sentiment label. The weights of the sentiment labels in this embodiment are as follows: the weight of the positive label is 1, the weight of the negative label is -1, the weight of the neutral label is 0, the weight of the angry label is -0.5, the weight of the sad label is -1, the weight of the happy label is 1, and the weight of the surprised label is 0.5.
[0084] It should be noted that through the automatic speech recognition technology, the time and error rate of manual transcribing are significantly reduced; and the scientific preprocessing operation of text data further ensures the accuracy of sentiment analysis; training the sentiment classification model enables the sentiment recognition process to be automated and standardized, improving the general applicability of the model; through the calculation of sentiment confidence, a more in-depth evaluation of sentiment intensity is provided, promoting a more comprehensive understanding and analysis of text information.
[0085] Step 300: Extract features from the voice information to obtain the sound information, and obtain the speech sentiment intensity based on the sound information; the sound information includes: volume, sentiment words, and intonation; the specific steps are as Figure 4 shown, including:
[0086] Step 310: Calculate the volume value through the amplitude of the voice information;
[0087] Specifically, the volume value is calculated through the amplitude of the audio signal. In this embodiment, the root mean square (RMS) is used to represent the volume value, and its calculation formula is: where the volume value, V is, x i is the amplitude value at the i-th moment, and N is the total number of samples.
[0088] Step 320: Identify the sentiment words in the voice information through the sentiment dictionary and assign different weights to the sentiment words;
[0089] Specifically, the sentiment dictionary contains various sentiment words and their corresponding sentiment polarities and weights. By analyzing the transformed text information, sentiment words are identified therein, and different weights are assigned according to their definitions in the sentiment dictionary. For example, positive sentiment words are assigned higher weights, while negative sentiment words are assigned lower weights. Thus, the quantification of the sentiment components in the voice information is achieved, providing a basis for subsequent calculation of the sentiment intensity.
[0090] Step 330: Obtain the fundamental frequency of the voice information through a pitch tracking algorithm, and obtain the intonation through the change amplitude of the fundamental frequency within a fixed time; the specific steps are as Figure 5 shown, including:
[0091] Step 331: Obtain the spectral information of the voice information through short-time Fourier transform;
[0092] Specifically, the voice signal is framed, and window functions such as Hamming window are used to reduce the boundary effect, and then Fourier transform is performed on each frame to obtain the frequency domain information. The spectral information contains the frequency components of the signal and their corresponding amplitudes.
[0093] Step 332: Obtain the autocorrelation function according to the signal length of the spectral information;
[0094] Specifically, according to the obtained spectral information, its signal length is calculated, and the signal is processed using the autocorrelation method to obtain the autocorrelation function. The autocorrelation function reflects the periodic characteristics of the signal.
[0095] Step 333: Calculate the fundamental frequency according to the peak value of the autocorrelation function;
[0096] Specifically, find the position of the first significant peak in the autocorrelation function, calculate the corresponding frequency value as the fundamental frequency, and the calculation formula is: where, F 0 is the fundamental frequency, f s is the sampling frequency, and τ is the delay time corresponding to the peak value.
[0097] Step 334: Extract the fundamental frequency sequence of the fundamental frequency within a fixed time window, and calculate the change amplitude according to the fundamental frequency sequence;
[0098] Specifically, select a suitable time window (the time window in this embodiment is 50 milliseconds), and repeat Steps 331 to 333 within each time window, so as to obtain a series of fundamental frequency values. These fundamental frequency values form a fundamental frequency sequence. Then the standard deviation or range is used to calculate the change amplitude.
[0099] Step 335: Compare the change amplitude with a preset amplitude threshold, and determine the intonation through the comparison result.
[0100] Specifically, when the change amplitude ΔZ < 10 Hz, the intonation is determined as a steady intonation; when 10 Hz ≤ ΔZ < 20 Hz, the intonation is determined as a fluctuating intonation; when ΔZ > 20 Hz, the intonation is determined as a strong intonation.
[0101] Step 340: Calculate the speech emotion intensity through the volume value, emotional words, and intonation.
[0102] Specifically, the calculation formula for the speech emotion intensity is:
[0103]
[0104] Among them, S y is the speech emotion intensity, V is the volume value, representing the average power of the audio, R(t) is the intonation change, representing the change amplitude of the fundamental frequency within a fixed time, E is the emotional word intensity, and ⊙ is the element-wise multiplication operation. The product of the volume and the intonation change is squared to emphasize its importance for emotion perception; through element-wise multiplication, the emotional word intensity is combined with the normalized result of the volume and the intonation change and cubed, reflecting the non-linear growth trend of emotion in the whole.
[0105] It should be noted that by calculating the volume value, the intensity change of the speech can be effectively reflected; the recognition and weight assignment of emotional words enhance the accuracy of emotion analysis; the extraction of the fundamental frequency and intonation provides important context information for emotion expression; by comprehensively analyzing these features, a more comprehensive emotion intensity assessment can be provided.
[0106] Step 400: Identify the facial feature points of the face information, obtain the micro-expression according to the facial feature points, and calculate the facial emotion intensity according to the micro-expression; the specific steps are as Figure 6 shown, including:
[0107] Step 401: Convert the face information into a grayscale image;
[0108] Step 402: Perform face recognition on the grayscale image through a face detection model and obtain the facial feature points;
[0109] Specifically, in this embodiment, the MTCNN model is used to locate the position of the face in the image and obtain the facial feature points, such as the specific coordinates of the eyebrows, eyes, nose, and mouth.
[0110] Step 403: Select any frame of the grayscale image as the target frame and locate the facial feature points in the target frame;
[0111] Step 404: Obtain the feature vector by comparing the position differences of the facial feature points between adjacent frames of the grayscale image;
[0112] Specifically, the motion information is extracted by comparing the differences between adjacent frames, and a binary image is generated using a preset threshold to emphasize the changes in the facial area. The differences in the locations of feature points between adjacent frames are then calculated, and all feature point differences are combined into a feature vector.
[0113] Step 405: Based on the random forest model, obtain micro-expressions through feature vectors;
[0114] Specifically, subsets are randomly extracted from the feature vectors and multiple decision trees are constructed. The final class labels are determined using the built-in voting mechanism of the random forest model, and the class labels are compared with the expression library to obtain micro-expressions.
[0115] Step 406: Calculate the facial emotion intensity through the position difference of facial feature points and micro-expressions.
[0116] Specifically, the calculation formula for facial emotion intensity is:
[0117]
[0118] Among them, S m is the intensity of facial emotion, M is the intensity of micro-expression, U is the stability index of facial feature points, k is the influence index of facial feature points, D is the absolute displacement of facial feature points, p is a constant, and T is the time duration parameter.
[0119] It should be noted that converting facial information into grayscale images reduces complexity and improves processing efficiency; face detection and feature point extraction ensure the accuracy and reliability of the data; by comparing feature points of adjacent frames, facial movement changes can be captured losslessly; the random forest model effectively enhances the accuracy of micro-expression recognition with its powerful classification ability; the emotional intensity calculated by combining micro-expressions and feature point information makes the overall results more practical and interpretable.
[0120] Step 500: Obtaining a comprehensive emotion score according to the text emotion intensity, the voice emotion intensity and the facial emotion intensity;
[0121] Specifically, the calculation formula for the comprehensive sentiment score is:
[0122]
[0123] Among them, S z is the comprehensive sentiment score, S w is the text sentiment intensity, S y is the intensity of speech emotion, S m is the intensity of facial emotion, R(t) is the change of intonation, V is the volume value, G is the number of modal particles, and a, b and h are all constants.
[0124] Step 600: Obtain the emotion analysis result based on the comprehensive sentiment score.
[0125] Specifically, the classification result of the comprehensive sentiment score in this embodiment is as follows:
[0126] When S z ≥ 7, determine the emotion analysis result as excited;
[0127] When 5 ≤ S z < 7, determine the emotion analysis result as excited;
[0128] When 3 ≤ S z < 5, determine the emotion analysis result as neutral;
[0129] When 1 ≤ S z < 3, determine the emotion analysis result as indifferent;
[0130] When S z < 1, determine the emotion analysis result as disgusted.
[0131] The present invention also provides an emotion analysis method and system based on artificial intelligence, including:
[0132] An information acquisition module, configured to acquire the target video material of the person, and extract the face information and voice information in the target video material;
[0133] A text analysis module, configured to convert the voice information into text information, and obtain the text sentiment intensity according to the text information;
[0134] A voice analysis module, configured to extract features from the voice information to obtain voice information, and obtain the voice sentiment intensity according to the voice information; the voice information includes: volume, emotional vocabulary, and intonation;
[0135] A face analysis module, configured to identify the facial feature points of the face information, obtain the micro-expression according to the facial feature points, and calculate the facial sentiment intensity according to the micro-expression;
[0136] A comprehensive evaluation module, configured to obtain the comprehensive sentiment score according to the text sentiment intensity, voice sentiment intensity, and facial sentiment intensity;
[0137] A result judgment module, configured to obtain the emotion analysis result according to the comprehensive sentiment score.
[0138] The beneficial effects of the present invention are as follows:
[0139] 1) The present invention combines three different emotional sources of text, voice, and facial feature points, and through diversified data acquisition channels, realizes a more comprehensive and accurate evaluation of the emotional state, greatly improves the accuracy of emotion recognition, and avoids the deviation that may be brought by relying on a single data source;
[0140] 2) The processing speed and efficiency are improved through modular design, meeting the requirements of various real-time application scenarios;
[0141] 3) By setting clear sentiment scores and classification criteria, the final sentiment recognition results are clear and operable;
[0142] 4) By comprehensively analyzing three sources of sentiment, microexpressions and non-verbal information can be captured, greatly improving the accuracy and reliability of sentiment analysis.
[0143] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other. Specific examples are used in the present invention to elaborate on the principles and implementation manners of the present invention. The descriptions of the above embodiments are only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A sentiment analysis method based on artificial intelligence, characterized in that: The steps include: Collecting target video materials of personnel, and extracting face information and voice information from the target video materials; Converting the speech information into text information, and obtaining text emotion intensity according to the text information; Extracting features from the speech information to obtain sound information, and obtaining speech emotion intensity based on the sound information; The sound information includes: volume, emotional words and intonation; Identify facial feature points of the face information, obtain micro-expressions according to the facial feature points, and calculate facial emotion intensity according to the micro-expressions; Obtaining a comprehensive emotion score according to the text emotion intensity, the voice emotion intensity and the facial emotion intensity; A sentiment analysis result is obtained according to the comprehensive sentiment score.
2. The artificial intelligence-based sentiment analysis method according to claim 1, characterized in that: Collecting target video materials of personnel and extracting face information and voice information from the target video materials, including: Performing face location on the target video material by using Haar features to obtain the face information; The target video material is subjected to audio separation by audio editing software to obtain the voice information.
3. The artificial intelligence-based sentiment analysis method according to claim 1, characterized in that: Converting the voice information into text information, and obtaining text emotion intensity according to the text information, including: Converting the voice information into the text information through an automatic voice recognition system; Performing data preprocessing operations on the text information through a natural language processing model to obtain text features; the data preprocessing operations include: text cleaning, word segmentation, and stop word removal; Use text with known sentiment labels as training sets to train the natural language processing model and obtain a text sentiment classification model; The emotional label of the text feature is predicted by the text emotion classification model, and the label confidence is calculated; the emotional labels include: positive, negative, neutral, angry, sad, happy and surprised; the calculation formula of the label confidence is: Among them, P w is the label confidence, f i is the score of the i-th sentiment tag, and K is the number of sentiment tags; The text sentiment intensity is calculated by the sentiment label and the confidence level; the calculation formula of the text sentiment intensity is: Among them, S w is the text sentiment intensity, K is the number of sentiment tags, P w is the label confidence, ω i is the weight of the i-th sentiment label.
4. The method for sentiment analysis based on artificial intelligence according to claim 1, characterized in that: Extracting features from the speech information to obtain sound information, and obtaining speech emotion intensity according to the sound information, including: The volume value is obtained by calculating the amplitude of the voice information; Identifying the emotional words in the voice information through an emotional dictionary and assigning different weights to the emotional words; Obtain the fundamental frequency of the voice information through a pitch tracking algorithm, and obtain the intonation through the variation amplitude of the fundamental frequency within a fixed time; The speech emotion intensity is calculated by using the volume value, the emotion vocabulary and the intonation.
5. The method for sentiment analysis based on artificial intelligence according to claim 4, characterized in that: Obtaining the fundamental frequency of the voice information by a pitch tracking algorithm, and obtaining the intonation by a variation amplitude of the fundamental frequency within a fixed time, including: Acquire the frequency spectrum information of the speech information by short-time Fourier transform; Obtaining an autocorrelation function according to the signal length of the spectrum information; Calculate the fundamental frequency according to the peak value of the autocorrelation function; Extracting a fundamental frequency sequence of the fundamental frequency within a fixed time window, and calculating the variation amplitude according to the fundamental frequency sequence; The change amplitude is compared with a preset amplitude threshold, and the tone is determined based on the comparison result.
6. The method for sentiment analysis based on artificial intelligence according to claim 4, characterized in that: The calculation formula of the speech emotion intensity is: Among them, S y is the speech emotion intensity, V is the volume value, R(t) is the intonation change, E is the emotion vocabulary intensity, and ⊙ is the element-by-element multiplication operation.
7. The method for sentiment analysis based on artificial intelligence according to claim 1, characterized in that: Identifying facial feature points of the face information, obtaining micro-expressions according to the facial feature points, and calculating facial emotion intensity according to the micro-expressions, including: Converting the facial information into a grayscale image; Performing face recognition on the grayscale image through a face detection model, and obtaining the facial feature points; Selecting any frame of the grayscale image as a target frame, and locating the facial feature points in the target frame; Obtaining a feature vector by comparing the position differences of facial feature points between adjacent frames of the grayscale image; Based on the random forest model, micro-expressions are obtained through the feature vectors; The facial emotion intensity is calculated by using the position difference of the facial feature points and the micro-expression.
8. The method for sentiment analysis based on artificial intelligence according to claim 7, characterized in that: The calculation formula of the facial emotion intensity is: Among them, S m is the intensity of facial emotion, M is the intensity of micro-expression, U is the stability index of facial feature points, k is the influence index of facial feature points, D is the absolute displacement of facial feature points, p is a constant, and T is the time duration parameter.
9. The method for sentiment analysis based on artificial intelligence according to claim 1, characterized in that: The calculation formula of the comprehensive sentiment score is: Among them, S z is the comprehensive sentiment score, S w is the text sentiment intensity, S y is the intensity of speech emotion, S m is the intensity of facial emotion, R(t) is the change of intonation, V is the volume value, G is the number of modal particles, and a, b and h are all constants.
10. An artificial intelligence-based sentiment analysis and system, characterized in that: include: An information collection module is used to collect target video materials of personnel and extract face information and voice information from the target video materials; A text analysis module, used to convert the voice information into text information, and obtain text emotion intensity according to the text information; A speech analysis module, used to extract features from the speech information to obtain sound information, and obtain speech emotion intensity based on the sound information; The sound information includes: volume, emotional words and intonation; A facial analysis module, used to identify facial feature points of the face information, obtain micro-expressions according to the facial feature points, and calculate facial emotion intensity according to the micro-expressions; A comprehensive evaluation module, used to obtain a comprehensive emotion score according to the text emotion intensity, the voice emotion intensity and the facial emotion intensity; The result judgment module is used to obtain the emotion analysis result according to the comprehensive emotion score.
Citation Information
Patent Citations
Various-information coupling emotion recognition method for human-computer interaction
CN104200804A
Emotion recognition system and method and electronic equipment
CN112016367A
Emotion recognition method and device based on voice, semantics and facial expression fusion
CN112686048A
Emotion recognition method, system and equipment and medium
CN113380271A
Child depressive emotion recognition method based on multi-modal artificial intelligence technology
CN114974254A
Cited By
Data classification method and platform based on AI and electronic equipment
CN120832411A
