Depression emotion evaluation method based on emotional decay factor

By constructing a formula using text data and emotional decay factors in the evaluation of depressive mood, and adjusting the factor value through data variance, the problem of insufficient assumptions in the value of the emotional decay factor in the existing technology is solved, and the accurate representation of depressive mood values ​​is achieved. calculate.

CN118779455AInactive Publication Date: 2024-10-15JIAMUSI UNIVERSITY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411112597.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2024-10-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When constructing the emotional decay formula in the existing technology, the value of the emotional decay factor is based on assumptions, which results in the calculated depression mood value not being sufficiently representative of the data, lacking scientific basis, and unable to accurately represent the subject's emotional state.

Method used

By obtaining the target user's text data, labeling and classifying it, construct and train a text classifier, construct an emotional decay formula based on the emotional decay factor, and use the data variance to modify the emotional decay factor value until the first variance is less than the threshold or reaches the minimum value. The second variance is greater than the threshold or reaches the maximum value, ensuring the accuracy of the emotional decay factor value.

Benefits of technology

It achieves an accurate representation of depressive mood values, reduces the data differences of real depressed patients, increases the data differences of non-depressed patients, and improves the accuracy of calculations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779455A_ABST
    Figure CN118779455A_ABST
Patent Text Reader

Abstract

The invention particularly relates to a depressive emotion evaluation method based on an emotional decay factor, which comprises the following steps: acquiring text data of a target user, constructing and training a text classifier, constructing an emotional decay formula based on the emotional decay factor, determining an initial emotional decay factor numerical value, and evaluating the depressive emotion according to the initial emotional decay factor numerical value. The method comprises the following steps: classifying and identifying a batch of target depression patient text data by utilizing a text classifier, constructing an emotion decay formula, modifying an emotion decay factor value, constructing an emotion decay formula based on an optimized emotion decay factor value, and calculating a depression emotion value corresponding to the text data of a to-be-detected user by utilizing the trained text classifier. And calculating the average depressive emotion value of the to-be-detected user to determine the emotional state of the to-be-detected user. The emotion decay factor value is modified by using a data variance method, and the average depression emotion value of the to-be-tested user can be effectively calculated to determine the emotion state of the to-be-tested user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of emotion recognition, and in particular relates to a method for evaluating depression based on emotion decay factors. Background Art

[0002] In the evaluation of depressive emotions, relevant existing technologies include technologies that evaluate whether a user has depressive emotions by processing texts such as Weibo, such as patent document CN109977231B. This type of technology first selects text features, then classifies texts such as Weibo through a text classifier, determines the depressive emotional state of each Weibo, and then introduces an emotional decay factor, and calculates the user's depression value by constructing an emotional decay formula.

[0003] The specific processing process of this technology is as follows (some parameters in the literature description of the prior art are recorded incorrectly or non-standardly, and this application modifies them): mobilize the crowd to fill out the depression self-rating scale online, obtain the individual's depression scale score and Weibo nickname, collect their Weibo texts, and annotate the Weibo content through an expert system; preprocess the Weibo text, after feature selection and feature weighting, construct a word vector space based on the results of the feature selection and the results of the feature weighting, construct a text classifier to classify the Weibo text to be classified, and obtain the depressive emotional state c of each Weibo text, and the depressive emotional state c is represented by 1 and 0. For example, 1 represents a depressed state and 0 represents a non-depressed state; the depression index is calculated, which is the ratio of the number of depressed microblogs to the total number of microblogs, and the correlation between the depression index and the individual's depression scale score is tested by Pearson test, and the relationship between the depression level and the depression index is established according to the test result, and the depression level of the individual is characterized by the depression index; then, the emotional decay factor is introduced to obtain the depression emotion value corresponding to each microblog, and the individual depression situation is judged. The emotional decay factor is introduced, and the emotional decay formula is constructed to obtain the depression emotion value corresponding to each microblog. The formula is f(s)=f(s-1)+(-1) k e -q λ, where s is the ordinal number of the microblog, and the value range of s is: s=0,1,2,…,n, which means the 0th,1st,2nd,…,nth time point, and the initial state of any individual f(s=0)=0; f(s) represents the depression value corresponding to the microblog at the sth time point; f(s-1) represents the depression value corresponding to the microblog text at the previous time point; λ is the emotion decay factor, which represents the decay speed of emotion. Assuming that the depression emotion conforms to the half-life law, λ=0.5; The value of k is related to the microblog status at two adjacent time points;

[0004] q is a counting parameter. When there are two or more consecutive 0 states, if the state at the next moment is c=1, then q=1; when there are two or more consecutive 1 states, if the state at the next moment is c=0, the value of q is not set to 1, but is increased sequentially from the previous moment. During the alternating changes of the above two states, the value of f(s-1) remains unchanged and is still the depressive mood value of the previous moment. There is no problem with this type of technology in theory, and the emotional decay formula can indeed represent the changes in emotions. However, there are many problems in the actual implementation of this type of technology. For example, in the process of constructing the key emotional decay formula, the emotional decay factor is assumed to be determined based on the half-life law. In other words, the value of this type of parameter is based on assumptions. The emotional value calculated by the emotional decay formula is not representative enough for the data, and may even lack scientific basis. Therefore, the calculated depressive mood value cannot accurately represent the emotional state of the subject. Summary of the invention

[0005] The purpose of the present invention is to provide a method for evaluating depression based on an emotion decay factor to solve the problems raised in the above-mentioned background technology.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: The depression assessment method based on the emotion decay factor includes the following steps: Step 1: obtain text data of a target user and then annotate the text data of the target user, annotating the text data of the target user into text data of a depression patient and text data of a non-depression patient; Step 2 then constructs and trains a text classifier to classify and identify the text data of the target user, that is, to be able to identify whether the state of the text data of each target user is a depressive state; Step 3 then constructs an emotion decay formula based on the emotion decay factor to calculate the depression value corresponding to the text data of the target user, and can calculate the average depression value of the target user; wherein the emotion decay factor is used to characterize the emotion change, and the emotion decay formula is constructed based on the emotion decay factor; Step 4 then determines an initial sentiment decay factor value; Step 5: First, a batch of target depression patient text data is classified and identified using a text classifier to determine the depressive emotional state c of each text; a batch of target non-depressive patient text data is classified and identified using a text classifier to determine the depressive emotional state c of each text; Step 6: Then, based on the emotional decay factor value determined in the previous step, construct an emotional decay formula to calculate the depression value corresponding to the target depression patient's text data and the corresponding average depression value avg1 of each target depression patient; based on the emotional decay factor value determined in the previous step, construct an emotional decay formula to calculate the depression value corresponding to the target non-depression patient's text data and the corresponding average depression value avg2 of each target non-depression patient; then calculate the variance of all the average depression values ​​avg1 and define it as the first variance; then calculate the variance of all the average depression values ​​avg2 and define it as the second variance; Step 7 then modifies the emotional decay factor value and performs step 6 again until the first variance is less than the threshold or takes a minimum value, and the second variance is greater than the threshold or takes a maximum value, and stops modifying the emotional decay factor value; then determines that the emotional decay factor value after modification is the preferred emotional decay factor value; Step 8 then constructs an emotion decay formula based on the preferred emotion decay factor value and the trained text classifier calculates the depression value corresponding to the text data of the user to be tested, and calculates the average depression value of the user to be tested to determine the emotional state of the user to be tested.

[0007] Furthermore, the text data of the target user includes the target user's Weibo status data, WeChat Moments status data, and QQ Space status data.

[0008] Furthermore, a text classifier is trained to classify and identify the text data of the target user, wherein the text classifier includes: an algorithmic text classifier based on machine learning, an algorithmic text classifier based on deep learning, an algorithmic text classifier based on transfer learning, and an algorithmic text classifier based on a sentiment dictionary.

[0009] Furthermore, the sentiment decay formula can be constructed using an algorithm based on sliding prediction. f(t)=f(t-1)*λ+0.1p*(-1) k ; t is the ordinal number of the text, f(t=0)=0; f(t) represents the depression value corresponding to the text at the tth time point; f(t-1) represents the depression value corresponding to the text at the previous time point; λ is the emotion decay factor; c is the depressive emotional state of the text. The specific value of the depressive emotional state c is represented by 1 and 0, 1 represents the depressive state, and 0 represents the non-depressive state. The values ​​of k are as follows:

[0010] p is a counting parameter. When the depressive emotional state c appears in the 0 state for two or more consecutive times, if the depressive emotional state c at the next moment is 1, then q is 1; when the depressive emotional state c appears in the 1 state for two or more consecutive times, if the depressive emotional state c at the next moment is 0, then the value of q is not set to 1, but increases sequentially from the previous moment.

[0011] Furthermore, the initial sentiment decay factor value is 0.5.

[0012] Furthermore, modifying the emotional decay factor value includes increasing the emotional decay factor value and decreasing the emotional decay factor value.

[0013] A computer device includes a terminal device or a server, in which the data calculation program of the aforementioned depression emotion evaluation method based on emotion decay factor is configured.

[0014] Depression evaluation system based on emotion decay factor, A computer program product including instructions, when running on a computer, enables the computer to execute the above-mentioned depression emotion assessment method based on the emotion decay factor.

[0015] Beneficial Effects The present application uses the data variance method to modify the value of the emotion decay factor. The first variance is less than the threshold or takes the minimum value, indicating that the emotion decay factor value after this modification can make the performance data difference of real depression patients as small as possible, and the second variance is greater than the threshold or takes the maximum value, indicating that the emotion decay factor value after this modification can make the performance data difference of non-depression patients as large as possible. Therefore, the emotion decay factor value after this modification can represent the data more accurately, so the calculated depression mood value can also accurately represent the emotional state of the subject, so the average depression mood value of the user to be tested can be effectively calculated to determine the emotional state of the user to be tested. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 The present invention provides a flowchart of a method for evaluating depression based on affective decay factors. DETAILED DESCRIPTION

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

[0018] Depression assessment method based on emotion decay factor, such as Figure 1 As shown, the steps include: Step 1, obtaining text data of a target user, the text data of the target user including the target user's Weibo status data, WeChat Moments status data, and QQ Space status data; then annotating the text data of the target user, annotating the text data of the target user as text data of a patient with depression and text data of a patient without depression; Step 2, then construct and train a text classifier to classify and identify the text data of the target user, that is, to be able to identify whether the state of the text data of each target user is a depressive state; train the text classifier to classify and identify the text data of the target user, wherein the text classifier includes: Machine learning-based algorithms Text classifiers: These algorithms use machine learning techniques to train models so that they can automatically identify the sentiment of text. Common machine learning algorithms include Naive Bayes, Support Vector Machines (such as the algorithm used in existing technologies), Decision Trees, etc.

[0019] Deep Learning Based Algorithms Text Classifiers: These algorithms use deep learning techniques such as Convolutional Neural Networks (CNN) or Recurrent Neural Networks (RNN) to process text data and identify its sentiment. Both Convolutional Neural Networks (CNN) and Recurrent Neural Networks (RNN) can be used to identify text sentiment. Here are the general steps for both models: Preprocessing: This is a necessary step for any text sentiment analysis task. Preprocessing may include removing punctuation, converting to lowercase, removing stop words, stemming or lemmatization, etc. Feature Extraction: For CNN, the text is usually first converted to image format and then convolution operations are applied. For RNN, the text sequence can be processed directly. Model Training: For CNN, training usually involves the computation of convolutional layers followed by pooling layers (such as max pooling layers) to reduce the dimensionality of features. For RNN, training involves processing text sequences and using structures such as LSTM or GRU to capture long-term dependencies of text. Sentiment Classification: After the model is trained, the model can be used to classify the sentiment of new text. For CNN, classification is usually performed by converting the text to images and applying convolution operations. For RNN, text sequences can be directly processed for classification.

[0020] Transfer learning based algorithms Text classifiers: These algorithms use models trained on other tasks (such as natural language processing or image recognition tasks) and apply them to the sentiment recognition task.

[0021] Sentiment lexicon based algorithms Text classifiers: These algorithms use sentiment lexicons to analyze words and phrases in a text and determine the sentiment of the text based on the sentiment scores in the lexicon.

[0022] Step 3, then construct an emotion decay formula based on the emotion decay factor to calculate the depression value corresponding to the text data of the target user, and can calculate the average depression value of the target user; wherein the emotion decay factor is used to characterize the emotion change, and the emotion decay formula is constructed based on the emotion decay factor. The emotion decay formula can adopt a specific formula in the prior art, and the emotion decay formula can also be constructed using an algorithm based on sliding prediction, specifically: f(t)=f(t-1)*λ+0.1p*(-1) k t is the ordinal number of the text, and the value range of t is: t=0,1,2,…,n, which means the 0th,1st,2nd,…,nth time point, and the initial state of any target f(t=0)=0; f(t) represents the depression value corresponding to the text at the tth time point; f(t-1) represents the depression value corresponding to the text at the previous time point; λ is the emotion decay factor, and the initial λ=0.5; The value of k is related to the text state at two adjacent time points, c is the depressive emotional state of the text, and the specific value of the depressive emotional state c is represented by 1 and 0, 1 represents the depressive state, and 0 represents the non-depressive state; The values ​​of k are as follows:

[0023] p is a counting parameter. When the depressive emotional state c appears two or more consecutive 0 states, if the depressive emotional state c at the next moment is 1, then q = 1; when the depressive emotional state c appears two or more consecutive 1 states, if the depressive emotional state c at the next moment is 0, then the value of q is not set to 1, but increases in sequence from the previous moment. Step 4 then determines an initial sentiment decay factor value, such as an initial sentiment decay factor value of 0.5; Step 5: First, a batch of target depression patient text data is classified and identified using a text classifier to determine the depressive emotional state c of each text; a batch of target non-depressive patient text data is classified and identified using a text classifier to determine the depressive emotional state c of each text; Step 6: Then, based on the emotional decay factor value determined in the previous step, construct an emotional decay formula to calculate the depression value corresponding to the target depression patient's text data and the corresponding average depression value avg1 of each target depression patient; based on the emotional decay factor value determined in the previous step, construct an emotional decay formula to calculate the depression value corresponding to the target non-depression patient's text data and the corresponding average depression value avg2 of each target non-depression patient; then calculate the variance of all the average depression values ​​avg1 and define it as the first variance; then calculate the variance of all the average depression values ​​avg2 and define it as the second variance; Step 7 then modifies the emotional decay factor value, and modifying the emotional decay factor value includes increasing the emotional decay factor value, reducing the emotional decay factor value, and performing step 6 again until the first variance is less than the threshold or takes a minimum value, and the second variance is greater than the threshold or takes a maximum value, and then stop modifying the emotional decay factor value; the first variance is less than the threshold or takes a minimum value, indicating that the emotional decay factor value after this modification can make the performance data difference of real depression patients as small as possible, and the second variance is greater than the threshold or takes a maximum value, indicating that the emotional decay factor value after this modification can make the performance data difference of non-depression patients as large as possible, so the emotional decay factor value after this modification can represent the data more accurately, so the calculated depressive mood value can also accurately represent the emotional state of the subject, and then determine that the emotional decay factor value after modification is the preferred emotional decay factor value; Here is an example Python code implementation of steps 6 and 7: Python import numpy as np # We already have text data for patients with depression and those without depression # and a classifier that can classify the depressive state of the text depressed_patients_text = [...] # Depression patients text list non_depressed_patients_text = [...] # List of non-depressed patients text classifier = ... # Text classifier instance # Initial value of sentiment decay factor lambda_initial = 0.5 # Define sentiment decay function def emotional_decay(current_state, prev_emotion_value, lambda_factor,p): if current_state == 1: # Depressed state k = -1 else: # non-depressed state k = 1 # Calculate p based on the current state if prev_emotion_value is None or prev_emotion_value == 0: q = 0 elif current_state == 0 and prev_emotion_value == 0: q += 1 else: q = 1 emotion_value = prev_emotion_value * lambda_factor + 0.1 * p * (-1)**k return emotion_value, q # Calculate depression value def compute_emotion_values(texts, classifier, lambda_factor): emotion_values ​​= [] prev_emotion_value = 0 p = 0 for text in texts: state = classifier.classify(text) # The classifier has a classify method emotion_value, p = emotional_decay(state, prev_emotion_value,lambda_factor, p) emotion_values.append(emotion_value) prev_emotion_value = emotion_value avg_emotion_value = np.mean(emotion_values) return emotion_values, avg_emotion_value # Calculate variance def compute_variance(avg_emotion_values): variance = np.var(avg_emotion_values) return variance # Step 6: Calculate depression value and variance def step_6(depressed_texts, non_depressed_texts, lambda_factor): # Depressed patients depressed_emotion_values, depressed_avg_values = compute_emotion_values(depressed_texts, classifier, lambda_factor) first_variance = compute_variance(depressed_avg_values) # Non - depressed patients non_depressed_emotion_values, non_depressed_avg_values = compute_emotion_values(non_depressed_texts, classifier, lambda_factor) second_variance = compute_variance(non_depressed_avg_values) return first_variance, second_variance # Step 7: Modify the value of the emotion decay factor def step_7(depressed_texts, non_depressed_texts, lambda_factor,threshold_first, threshold_second): first_variance, second_variance = step_6(depressed_texts, non_depressed_texts, lambda_factor) while not (first_variance < threshold_first or first_variance ==np.min(first_variance)) \ or not (second_variance > threshold_second or second_variance == np.max(second_variance)): # Adjust the sentiment decay factor lambda_factor += 0.01 # Increase sentiment decay factor first_variance, second_variance = step_6(depressed_texts, non_depressed_texts, lambda_factor) return lambda_factor, first_variance, second_variance # Use step 7 optimal_lambda, first_variance_optimal, second_variance_optimal =step_7( depressed_patients_text, non_depressed_patients_text, lambda_initial, threshold_first=0.01, # first variance threshold threshold_second=0.05 # Second variance threshold ) print("Optimal Lambda:", optimal_lambda) print("First Variance Optimal:", first_variance_optimal) print("Second Variance Optimal:", second_variance_optimal) In the above code, threshold_first and threshold_second are predefined thresholds; Step 8 then constructs an emotion decay formula based on the preferred emotion decay factor value and the trained text classifier calculates the depression value corresponding to the text data of the user to be tested, and calculates the average depression value of the user to be tested to determine the emotional state of the user to be tested.

[0024] In summary, the present application uses the data variance method to modify the value of the emotion decay factor. The first variance is less than the threshold or takes the minimum value, indicating that the emotion decay factor value after this modification can make the performance data difference of real depression patients as small as possible, and the second variance is greater than the threshold or takes the maximum value, indicating that the emotion decay factor value after this modification can make the performance data difference of non-depression patients as large as possible. Therefore, the emotion decay factor value after this modification can represent the data more accurately, so the calculated depression value can also accurately represent the emotional state of the subject, so the average depression value of the user to be tested can be effectively calculated to determine the emotional state of the user to be tested.

[0025] The embodiments that require protection in this application include: The depression assessment method based on the emotion decay factor includes the following steps: Step 1: obtain text data of a target user and then annotate the text data of the target user, annotating the text data of the target user into text data of a depression patient and text data of a non-depression patient; Step 2 then constructs and trains a text classifier to classify and identify the text data of the target user, that is, to be able to identify whether the state of the text data of each target user is a depressive state; Step 3 then constructs an emotion decay formula based on the emotion decay factor to calculate the depression value corresponding to the text data of the target user, and can calculate the average depression value of the target user; wherein the emotion decay factor is used to characterize the emotion change, and the emotion decay formula is constructed based on the emotion decay factor; Step 4 then determines an initial sentiment decay factor value; Step 5: First, a batch of target depression patient text data is classified and identified using a text classifier to determine the depressive emotional state c of each text; a batch of target non-depressive patient text data is classified and identified using a text classifier to determine the depressive emotional state c of each text; Step 6: Then, based on the emotional decay factor value determined in the previous step, construct an emotional decay formula to calculate the depression value corresponding to the target depression patient's text data and the corresponding average depression value avg1 of each target depression patient; based on the emotional decay factor value determined in the previous step, construct an emotional decay formula to calculate the depression value corresponding to the target non-depression patient's text data and the corresponding average depression value avg2 of each target non-depression patient; then calculate the variance of all the average depression values ​​avg1 and define it as the first variance; then calculate the variance of all the average depression values ​​avg2 and define it as the second variance; Step 7 then modifies the emotional decay factor value and performs step 6 again until the first variance is less than the threshold or takes a minimum value, and the second variance is greater than the threshold or takes a maximum value, and stops modifying the emotional decay factor value; then determines that the emotional decay factor value after modification is the preferred emotional decay factor value; Step 8 then constructs an emotion decay formula based on the preferred emotion decay factor value and the trained text classifier calculates the depression value corresponding to the text data of the user to be tested, and calculates the average depression value of the user to be tested to determine the emotional state of the user to be tested.

[0026] Preferably, the text data of the target user includes the target user's Weibo status data, WeChat Moments status data, and QQ Space status data.

[0027] Preferably, a text classifier is trained to classify and identify text data of target users, wherein the text classifier includes: an algorithmic text classifier based on machine learning, an algorithmic text classifier based on deep learning, an algorithmic text classifier based on transfer learning, and an algorithmic text classifier based on a sentiment dictionary.

[0028] Preferably, the sentiment decay formula can be constructed using an algorithm based on sliding prediction. f(t)=f(t-1)*λ+0.1p*(-1) k ; t is the ordinal number of the text, f(t=0)=0; f(t) represents the depression value corresponding to the text at the tth time point; f(t-1) represents the depression value corresponding to the text at the previous time point; λ is the emotion decay factor; c is the depressive emotional state of the text. The specific value of the depressive emotional state c is represented by 1 and 0, 1 represents the depressive state, and 0 represents the non-depressive state. The values ​​of k are as follows:

[0029] p is a counting parameter. When the depressive emotional state c appears in the 0 state for two or more consecutive times, if the depressive emotional state c at the next moment is 1, then q is 1; when the depressive emotional state c appears in the 1 state for two or more consecutive times, if the depressive emotional state c at the next moment is 0, then the value of q is not set to 1, but increases sequentially from the previous moment.

[0030] Preferably, the initial sentiment decay factor value is 0.5.

[0031] Preferably, modifying the emotional decay factor value includes increasing the emotional decay factor value and decreasing the emotional decay factor value.

[0032] The embodiment of the present application further provides a computer device, which may include a terminal device or a server, and the data calculation program of the aforementioned depression emotion evaluation method based on the emotion decay factor may be configured in the computer device. The computer device is introduced below.

[0033] If the computer device is a terminal device, the present application embodiment provides a terminal device, taking the terminal device as a mobile phone as an example: The mobile phone includes components such as a radio frequency (RF) circuit, a memory, an input unit, a display unit, a sensor, an audio circuit, a wireless fidelity (WiFi) module, a processor, and a power supply.

[0034] RF circuits can be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information of the base station, it is processed by the processor; in addition, the designed uplink data is sent to the base station. Usually, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA for short), a duplexer, etc. In addition, the RF circuit can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile communication (GSM for short), General Packet Radio Service (GPRS for short), Code Division Multiple Access (CDMA for short), Wideband Code Division Multiple Access (WCDMA for short), Long Term Evolution (LTE for short), email, Short Messaging Service (SMS for short), etc.

[0035] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0036] The input unit can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit may include a touch panel and other input devices. The touch panel, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on or near the touch panel using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the contact coordinates, and then sends it to the processor, and can receive the command sent by the processor and execute it. In addition, the touch panel can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic waves. In addition to the touch panel, the input unit may also include other input devices. Specifically, other input devices may include but are not limited to one or more of a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, etc.

[0037] The display unit can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit may include a display panel, and optionally, the display panel may be configured in the form of a liquid crystal display (LiquidCrystal Display, LCD for short), an organic light-emitting diode (Organic Light-Emitting Diode, OLED for short), etc. Further, the touch panel may cover the display panel, and when the touch panel detects a touch operation on or near it, it is transmitted to the processor to determine the type of touch event, and then the processor provides corresponding visual output on the display panel according to the type of touch event. Although in the figure, the touch panel and the display panel are used as two independent components to realize the input and output functions of the mobile phone, in some embodiments, the touch panel and the display panel can be integrated to realize the input and output functions of the mobile phone.

[0038] The mobile phone may also include at least one sensor, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may configure the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may turn off the display panel and / or backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.

[0039] The audio circuit, speaker, and microphone can provide an audio interface between the user and the mobile phone. The audio circuit can convert the received audio data into an electrical signal and transmit it to the speaker, which converts it into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit and converted into audio data. The audio data is then processed by the output processor and sent to, for example, another mobile phone through the RF circuit, or the audio data is output to the memory for further processing.

[0040] WiFi is a short-range wireless transmission technology. A mobile phone can help users send and receive emails, browse web pages, and access streaming media through a WiFi module, which provides users with wireless broadband Internet access. Although the WiFi module is shown in the figure, it is understandable that it is not a necessary component of the mobile phone and can be omitted as needed without changing the essence of the invention.

[0041] The processor is the control center of the mobile phone. It uses various interfaces and lines to connect the various parts of the entire mobile phone. It executes various functions of the mobile phone and processes data by running or executing software programs and / or modules stored in the memory, and calling data stored in the memory, so as to monitor the mobile phone as a whole. Optionally, the processor may include one or more processing units; preferably, the processor may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor.

[0042] The mobile phone also includes a power source (such as a battery) for supplying power to various components. Preferably, the power source can be logically connected to the processor through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions.

[0043] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.

[0044] In this embodiment, the processor included in the terminal device also has the following functions: Execute the data calculation program of the depression mood assessment method based on the emotion decay factor.

[0045] If the computer device is a server, an embodiment of the present application also provides a server, which may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) (for example, one or more processors) and memories, and one or more storage media for storing applications or data (for example, one or more mass storage devices). Among them, the memory and the storage medium can be short-term storage or permanent storage. The program stored in the storage medium may include one or more modules, each of which may include a series of instruction operations on the server. Furthermore, the central processing unit can be configured to communicate with the storage medium and execute a series of instruction operations in the storage medium on the server.

[0046] The server may also include one or more power supplies, one or more wired or wireless network interfaces, one or more input and output interfaces, and / or one or more operating systems, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0047] In addition, an embodiment of the present application further provides a storage medium, wherein the storage medium is used to store a computer program, and the computer program is used to execute the method provided in the above embodiment.

[0048] The embodiments of the present application also provide a computer program product including instructions, which, when executed on a computer, enables the computer to execute the method provided in the above embodiments.

[0049] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium can be at least one of the following media: read-only memory (English: Read-only Memory, abbreviated: ROM), RAM, magnetic disk or optical disk, etc. Various media that can store program codes.

[0050] Therefore, the present application also discloses a depression mood assessment system based on emotional decay factors, including a computer program product of instructions, which, when executed on a computer, enables the computer to execute the above-mentioned depression mood assessment method based on emotional decay factors.

[0051] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for evaluating depression based on emotional decay factors, characterized in that: The steps include: Step 1: obtain text data of a target user and then annotate the text data of the target user, annotating the text data of the target user into text data of a depression patient and text data of a non-depression patient; Step 2 then constructs and trains a text classifier to classify and identify the text data of the target user, that is, to be able to identify whether the state of the text data of each target user is a depressive state; Step 3 then constructs an emotion decay formula based on the emotion decay factor to calculate the depression emotion value corresponding to the text data of the target user, and can calculate the average depression emotion value of the target user; The emotion decay factor is used to characterize the emotion change, and the emotion decay formula is constructed based on the emotion decay factor; Step 4 then determines an initial sentiment decay factor value; Step 5: First, a batch of target depression patient text data is classified and identified using a text classifier to determine the depressive emotional state c of each text; a batch of target non-depressive patient text data is classified and identified using a text classifier to determine the depressive emotional state c of each text; Step 6: Then, based on the emotional decay factor value determined in the previous step, construct an emotional decay formula to calculate the depression value corresponding to the target depression patient's text data and the corresponding average depression value avg1 of each target depression patient; based on the emotional decay factor value determined in the previous step, construct an emotional decay formula to calculate the depression value corresponding to the target non-depression patient's text data and the corresponding average depression value avg2 of each target non-depression patient; then calculate the variance of all the average depression values ​​avg1 and define it as the first variance; then calculate the variance of all the average depression values ​​avg2 and define it as the second variance; Step 7 then modifies the emotional decay factor value and performs step 6 again until the first variance is less than the threshold or takes a minimum value, and the second variance is greater than the threshold or takes a maximum value, and stops modifying the emotional decay factor value; then determines that the emotional decay factor value after modification is the preferred emotional decay factor value; Step 8 then constructs an emotion decay formula based on the preferred emotion decay factor value and the trained text classifier calculates the depression value corresponding to the text data of the user to be tested, and calculates the average depression value of the user to be tested to determine the emotional state of the user to be tested.

2. The method for evaluating depression based on the emotion decay factor according to claim 1, characterized in that: The text data of the target user includes the target user's Weibo status data, WeChat Moments status data, and QQ Space status data.

3. The method for evaluating depression based on the emotion decay factor according to claim 1, characterized in that: The text classifier is trained to classify and identify the text data of the target user, wherein the text classifiers include: algorithmic text classifier based on machine learning, algorithmic text classifier based on deep learning, algorithmic text classifier based on transfer learning, and algorithmic text classifier based on sentiment dictionary.

4. The method for evaluating depression based on the emotion decay factor according to claim 1, characterized in that: The sentiment decay formula can be constructed using an algorithm based on sliding prediction. f(t)=f(t-1)*λ+0.1p*(-1) k ; t is the ordinal number of the text, f(t=0)=0; f(t) represents the depression value corresponding to the text at the tth time point; f(t-1) represents the depression value corresponding to the text at the previous time point; λ is the emotion decay factor; c is the depressive emotional state of the text. The specific value of the depressive emotional state c is represented by 1 and 0, 1 represents the depressive state, and 0 represents the non-depressive state. The values ​​of k are as follows: p is a counting parameter. When the depressive emotional state c appears in the 0 state for two or more consecutive times, if the depressive emotional state c at the next moment is 1, then q is 1; when the depressive emotional state c appears in the 1 state for two or more consecutive times, if the depressive emotional state c at the next moment is 0, then the value of q is not set to 1, but increases sequentially from the previous moment.

5. The method for evaluating depression based on the emotion decay factor according to claim 4, characterized in that: The initial sentiment decay factor value is 0.

5.

6. The method for evaluating depression based on the emotion decay factor according to claim 1, characterized in that: Modifying the emotional decay factor value includes increasing the emotional decay factor value and decreasing the emotional decay factor value.

7. A computer device, characterized in that: It comprises a terminal device or a server, in which the data calculation program of the depression emotion assessment method based on the emotion decay factor described in claim 1 is configured.

8. A depression assessment system based on emotional decay factors, characterized in that: A computer program product comprising instructions, when running on a computer, enables the computer to execute the depression mood assessment method based on the emotion decay factor as described in claim 1.

Citation Information

Patent Citations

  • A Depressive Mood Analysis Method Based on Emotional Decay Factors

    CN109977231B