Emotional intelligent speaker system and emotional intelligent speaker for depression group
By using a custom wake-up word and voiceprint recognition module, combined with active recording and voice recognition technology, it provides emotional intelligent chat and home control, solving the problem that existing smart speakers cannot actively detect user speech and recognize depressive emotions, improving user experience and smart home compatibility, and realizing a suitable home environment and psychological counseling.
Patent Information
- Application Number
- CN202211318554.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-26
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2042-10-26
AI Technical Summary
Existing smart speakers cannot actively detect whether a user is speaking, resulting in incomplete recordings or wasted resources. They also cannot accurately identify the emotions of people with depression and provide effective emotional interaction and health monitoring. Furthermore, incompatibility between smart home devices from different brands affects the user experience.
The voice wake-up module employs a custom wake word and voiceprint recognition, combined with active recording and voice recognition technology to analyze user emotions, providing emotional intelligent chat and home control functions, including health monitoring, intelligent chat, life assistant and home control modules. It uses the Gini-TextRank algorithm to extract keywords for depression consultation Q&A, and achieves hardware connection through Raspberry Pi development board and Google Voice HAT.
It enables proactive and emotional interaction with people suffering from depression, improves user experience and the accuracy of emotion recognition, reduces resource waste, provides a suitable home environment and psychological support, and enhances the compatibility and user control capabilities of smart homes.
Smart Images

Figure CN115460504B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of smart speakers, and in particular relates to an emotional smart speaker system and an emotional smart speaker for people with depression. Background Art
[0002] Depression, also known as depressive disorder, is a mood disorder. In 2020, the World Health Organization reported that over 264 million people worldwide suffer from depression, with 800,000 dying annually from depression. In China, over 95 million people suffer from generalized depression, and nearly 80% of those with depression go undetected. Data shows that the average person spends approximately eight hours a day at home, while those with depression often experience social anxiety and may spend even more, or even all, of their time at home. Smart speakers are a tool for home consumers to access the internet using voice and a gateway to control smart home devices. They are widely used in smart homes, smart conference rooms, and early childhood education settings. Major manufacturers are vying to enter the smart speaker market, vying for a share of the pie, creating a vibrant and diverse field.
[0003] Beyond everyday interactive functions, how to incorporate emotional interaction into smart speakers is also a key focus for various manufacturers. For example, the Dingdong smart speaker, co-developed by iFlytek and JD.com, offers customizable wake-up words. Xiaomi's Xiaoai speakers and Xiaomi Sound can recognize children's faces to enter child mode. Baidu's Xiaodu speaker can adopt a child-friendly voice to match child-friendly features. Huawei's AI speakers and SoundX, as well as Alibaba's Tmall Genie, can simulate a parent's voice. Data such as facial expressions, voice emotions, body movements, text messages, and even physiological signals are being used in emotionally interactive smart devices to simulate, identify, and understand human emotional processes.
[0004] However, as the design of smart speakers for people with depression is still in its infancy, there are few emotionally-sensitive smart devices on the market that are similar to the design in this patent. Amazon's Echo smart speaker can group users' questions based on their type. Questions are categorized as depression, abuse, and personal assault. To address these issues, Amazon has established relationships with crisis intervention counselors and collaborated with its internal legal and public relations departments to provide concise and effective responses that are both helpful to users and do not contain redundant information.
[0005] Through the above analysis, the problems and defects of the existing technology are as follows:
[0006] (1) It cannot actively detect whether the user is speaking, resulting in a poor user experience. It is also unable to accurately identify the user's emotions through speech recognition and natural language processing technologies. Most smart speaker recording modules adopt a passive fixed recording time solution. When this method is used for people with depression, the recording may be incomplete or the user may have to wait for the recording time to end after speaking, which affects the user experience and also causes a waste of program resources.
[0007] (2) The lack of emotional chat function means that users can only communicate with each other in a simple and rigid manner, which is unable to monitor the health status of the depressed group and provide guidance through chat. Currently, most smart speakers use a generative chat method, and the quality of the generated answers is likely to be problematic. For example, there may be incoherent sentences, syntactic errors, or seemingly low-level errors such as irrelevant answers. Without an emotional interaction mode for the depressed group, it is impossible to achieve emotional recognition and targeted psychological counseling for the depressed group.
[0008] (3) Smart homes cannot specifically build a suitable home environment for people with depression, and each brand has its own ecosystem. Since smart homes of different brands are not compatible, the lack of good adaptability between different devices has affected the user experience. Summary of the Invention
[0009] In response to the problems existing in the prior art, the present invention provides an emotional smart speaker system and an emotional smart speaker for people with depression.
[0010] The present invention is implemented as follows: an emotional intelligent speaker system for depression groups, the emotional intelligent speaker system for depression groups comprising:
[0011] The voice wake-up module is used to wake up the system using a customized wake-up word with voiceprint recognition, while actively determining whether the user is speaking and recording the spoken content to directly complete the command;
[0012] Health monitoring module, used to analyze the user's mood score to determine the user's depression status;
[0013] Intelligent chat module, including daily chat submodule and psychological counseling submodule, used for chatting and relieving depression;
[0014] Life Assistant module, including smart reminder, life guide and smart weather sub-modules, used to remind set things, weather conditions and answer consultation questions;
[0015] The home control module includes smart lighting and smart access control sub-modules, which are used to intelligently control lighting and access control.
[0016] Furthermore, the voice wake-up module uses the mainstream Snowboy offline voice wake-up and customizes the wake-up word to "Hi, Yunqi", so the emotional smart speaker is named Yunqi.
[0017] Furthermore, the health monitoring module uses active recording and voice recognition technology to record the conversation between the user and Yunqi, and analyzes the user's emotional score by extracting semantic feature information from the text to determine the user's depression status. The depression status is divided into three levels: mild, moderate and severe. If the depression status is severe, a text message notification will be sent to the doctor or family for timely intervention.
[0018] The specific process of the active recording is as follows:
[0019] (1.1) Detect whether the speaker is speaking and set the sampling frequency threshold to 30Hz. If the sound sampling frequency is greater than the threshold 30Hz, start recording. Otherwise, wait for recording.
[0020] (1.2) When the human voice sampling frequency is detected to be less than the threshold of 1000Hz, re-detect after 2s; if the human voice sampling frequency is greater than the given threshold of 1000Hz, return to re-detection;
[0021] (1.3) If the human voice sampling frequency detected again is less than the threshold of 1000Hz, it is determined that the speech has ended. After the speech ends, the recording is stopped and the file IO and API call operations are performed.
[0022] Furthermore, the specific process of the intelligent chat module is as follows:
[0023] When the system detects that the wake-up word containing Yunqi is successfully matched and enters the intelligent chat, it will prompt: the chat function is successfully enabled; then it enters the recording mode, encapsulates the recorded data into a fixed format, converts the voice into text by calling the Baidu speech recognition service, and then calls the Turing robot API to obtain the question and answer content; finally, the question and answer content is passed to the Baidu speech synthesis service again, and the question and answer content is converted into an audio file and played through the speaker;
[0024] The daily chat submodule includes: letting Yunqi act as the user's "tree hole", chatting with the user to relieve boredom, reduce the user's life pressure and kill leisure time;
[0025] The specific process of the psychological counseling submodule is as follows:
[0026] (2.1) Detect whether the conversation message contains the word "consultation"; if not, it indicates that it is just daily chat; if so, calculate the emotion score of the question according to Algorithm 1 to determine the depressive state;
[0027] (2.2) Use keyword extraction retrieval-based question answering algorithm to extract keywords from conversation information;
[0028] (2.3) Enter the corresponding depression consultation question and answer database based on keywords and depression status to search and provide answers.
[0029] Furthermore, the algorithm 1 includes:
[0030] (3.1) After the user text S is segmented, a user vocabulary set is obtained; words belonging to the seven categories of joy, good, anger, sorrow, fear, hate, and surprise are found in the user text from the Chinese emotional vocabulary ontology library to obtain the user emotion word set senWord;
[0031] (3.2) Calculate the seven categories of sentiment scores, using the sentiment word prefix weight W to simulate modifying words, with the default value of W = 1; if a negation word appears between two sentiment words, then W = -W; if a degree adverb appears between two sentiment words, then W = W*float(A.(value())), where A.(value()) represents the value of the degree adverb library A;
[0032] (3.3) The final emotion score of the text is returned to derive the potential depression state, which is divided into four levels: normal, mild, moderate, and severe. Normal is answered by the Turing robot, while mild, moderate, and severe are answered by searching the corresponding level question and answer library respectively.
[0033] Furthermore, the calculation process of the emotion score is:
[0034] The Chinese sentiment vocabulary ontology is used to analyze the user-level metadata feature emotions and emotional dimensions. The speech is converted into text and the sentiment words in the text are located and counted. The influence of modifying words is excluded. The sentiment score ES is expressed as:
[0035]
[0036] Among them, ES∈[-1,1], i represents the number of sentiment words in the text after word segmentation; W1 i Represents the basic sentiment value of the i-th sentiment word, and its value can be determined according to the basic sentiment word list; Represents the polarity of the i-th sentiment word, with a positive value of 1, a negative value of -1, and a neutral value of 0; Represents the negation word before the i-th sentiment word, the negation value is -1, the double negation and no negation value is 1; Represents the degree adverb before the i-th sentiment word, and takes values of 1, 2, 3, 4, and 5 according to different degrees.
[0037] Furthermore, the keyword search question answering algorithm includes:
[0038] The user question Q is cleaned, and then the common vocabulary is loaded and segmented using the Jieba word segmentation tool. The user question is vectorized using the Word2Vev model to generate word vectors; the Gini-TextRank method is then used to extract the three keywords with the highest weights. Finally, the answer is retrieved from the corresponding depression level question and answer library based on the keywords.
[0039] Furthermore, the specific process of the Gini-TextRank method is as follows:
[0040] Use nodes to represent each word in the word vector, initialize the weight value of each node to the inverse value of the Gini coefficient of the word vector, set the window size to k, and when the distance between two words in the question is less than k, add an edge connecting the two nodes. Based on the obtained node set K and edge set E, a weighted vocabulary network graph is constructed. Through multiple iterative calculations, the weight value TR (V i ) converges, and finally selects the top three words with high weights as keywords;
[0041] Node V i The weight value TR(V i ) is expressed as:
[0042]
[0043] Among them, E ji Represents any two nodes V i and V j The weight of the connecting edge, V k ∈Out(V j ) represents V k Pointing V j , V j ∈lnV i Represents pointing to V j The entire set of , d represents the damping coefficient, 1-d represents the probability value of the current word node pointing to other word nodes, TR(V j ) is the node V j Gini-TextRank weight value after adding weight information.
[0044] Furthermore, the depression consultation question and answer database is the psychological counseling corpus Emotional First AidDataset, which includes 20,000 psychological counseling data; when used, the question and answer content is cleaned to remove traditional Chinese characters, special symbols, sensitive information and grammatical errors, and the number of characters for each answer is set between 5 and 300; at the same time, the questions and corresponding answers are divided into three levels: mild, moderate and severe according to the label tags of trouble type s1, mental illness s2 and SOS s3.
[0045] Furthermore, the specific process of the intelligent reminder submodule is as follows: according to the settings, reminding the user to take antidepressant drugs or things that need attention on time;
[0046] The specific process of the intelligent weather submodule is: every 2 hours, the air conditioner is adjusted by querying temperature, humidity and weather information to provide a suitable home environment;
[0047] The specific process of the life guide submodule is: answering questions asked by users and reporting them.
[0048] Furthermore, the specific process of the intelligent lighting submodule is as follows:
[0049] The emotional smart speaker system is used to control home appliances and complete light switching operations. At the same time, the emotional smart speaker system adjusts the light color to golden or milky white according to the depressive state;
[0050] The specific process of the intelligent access control submodule is as follows:
[0051] Install a camera and doorbell at the door to notify you when the doorbell is pressed; if no one is at home, leave a message and send an email; in critical moments, turn on the emergency access control status and automatically open the door for specific emergency contacts.
[0052] Furthermore, the working principle of the emotional intelligent speaker system includes:
[0053] Step 1: Wake up the system using a custom wake-up word. After waking up, the system will give a ding-ding-ding sound feedback through speech synthesis.
[0054] Step 2: The system enters recording mode to record the voice. When the voice is finished, the voice file is processed and uploaded to the Baidu speech recognition cloud server.
[0055] In step three, the cloud server starts voice recognition and semantic understanding, and then returns the command in text form. The system calls the sub-module in the system by identifying the returned text content.
[0056] Another object of the present invention is to provide an emotional smart speaker for people with depression that implements the emotional smart speaker system for people with depression. The emotional smart speaker for people with depression includes:
[0057] The main module of the system consists of a Raspberry Pi 3B+ development board, a Google Voice HAT voice expansion board, a dual-microphone expansion board, a 3-inch speaker, several connecting cables and a speaker housing, and is used for human-computer interaction;
[0058] The voice module, consisting of the dual-microphone array expansion board and the voice expansion board in the Voice HAT kit, is used to improve noise and perform stereo recording;
[0059] The home control module, consisting of a 1000-ohm resistor, an LED light, a push button switch, and a USB camera, is used to control smart access control and smart lighting based on the GPIO interface of the Raspberry Pi 3B+ development board;
[0060] The hardware connection relationship of the system's main modules is as follows: the Raspberry Pi 3B+ development board and the Google Voice HAT voice expansion board are connected through 40 GPIO pins;
[0061] The hardware connections of the voice module are as follows: the dual-microphone expansion board is connected to the Mic port of the Google Voice HAT voice expansion board via a plug-in cable, and the 3-inch speaker is connected to the Speaker port of the Google Voice HAT voice expansion board via a plug-in cable;
[0062] The hardware connections for the home control module are as follows: The 5V terminal of the Servo01 interface on the voice expansion board is connected via a cable to a 1000-ohm resistor R1, then to the positive terminal of LED1. Finally, the negative terminal of LED1 is connected to a pin on the Servo01 interface on the voice expansion board. The 5V terminal of the Servo02 interface on the voice expansion board is connected via a cable to a 1000-ohm resistor R2, then to the positive terminal of LED2. Finally, the negative terminal of LED2 is connected to a pin on the Servo02 interface on the voice expansion board. The 5V terminal of the Servo03 interface on the voice expansion board is connected via a cable to a 1000-ohm resistor R3 and the positive terminal of the push switch. The other end of the 1000-ohm resistor R3 is connected to the positive terminal of LED3. Finally, the negative terminal of LED3 and the negative terminal of the push switch are connected to a pin on the Servo03 interface on the voice expansion board. The USB camera port is connected to the USB segment of the Raspberry Pi 3B+ development board.
[0063] Furthermore, the Raspberry Pi 3B+ development board is an ARM-based microcomputer motherboard that realizes human-computer interaction by burning the operating system through an SD card, and uses Python to write software; in addition, the Raspberry Pi 3B+ also comes with 40 programmable GPIO interfaces, which can drive different peripherals, including switches, sensors, etc.; the Google Voice HAT voice expansion board is an expansion board compatible with the Raspberry Pi 40-pin interface; the dual-microphone expansion board is comparable to the human ear, used to accurately receive commands issued by the user; the 3-inch speaker is the loud voice of the speaker, which can produce clear sound; the speaker shell is independently designed, with a simple and elegant appearance, and reserved for a microphone, speaker port and two function expansion ports for developing more functions.
[0064] Furthermore, the dual-microphone array expansion board is manufactured based on MEMS (Micro-Electro-Mechanical System) technology, which can effectively improve and eliminate most noise. It includes two high-quality microphones and can perform stereo recording. The voice expansion board connects to the microphone expansion board and the speaker through the Raspberry Pi GPIO port. Its audio chip can also realize the processing of dual-microphone stereo channels, the mutual conversion of sound analog signals to digital signals, and the storage and reading of digital quantities, and reserves 19 GPIO ports for developers to develop more functions.
[0065] Furthermore, the specific process of controlling smart access control and smart lighting based on the GPIO interface of the Raspberry Pi 3B+ development board is as follows:
[0066] Outputting high and low levels at the GPIO interface or reading changes in pin level status through the GPIO interface controls the light bulb switch and doorbell trigger; the written code exchanges data with the hardware through the GPIO port to control hardware operation and read hardware working status signals, interrupt signals, etc.; the hardware includes LED lights, switches, etc., using LED lights of different colors to simulate the lighting systems of the living room and bedroom; a push button switch is used to simulate the doorbell.
[0067] In combination with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the present invention are as follows:
[0068] This invention can control the device using a custom wake-up word with voiceprint recognition. The speaker will also proactively detect whether the user is speaking and record the spoken content to directly complete the command. During the chat, voice recognition technology can be used to determine the user's current emotional state; if an abnormality is detected, monitoring and early warning will be initiated.
[0069] At the same time, a depression consultation question and answer database has been added, which can use synthesized voices with different tones and speaking speeds to chat and enlighten users.
[0070] Furthermore, home control features have been added, including smart lighting and smart access control. Users can control home appliances and perform operations such as turning lights on and off through speakers. The system will also adjust the lighting color to golden or milky white based on the user's depression, creating a suitable light and color for the space. The system can improve negative moods through the impact of ambient lighting on mood, thereby achieving an anti-depressant effect. A camera and doorbell are installed at the door to notify the user when a visitor presses the doorbell. If no one is home, the visitor can also leave a message and email it to the user. In critical moments, emergency access control can even be enabled to automatically open the door for specific emergency contacts.
[0071] The embodiment of the present invention analyzes the binary classification accuracy of the emotion recognition algorithm for questions in the efaqa psychological counseling question and answer database, and the result is as high as 79.4%;
[0072] At the same time, the Gini-TextRank keyword extraction method proposed in the present invention has an accuracy of 0.674 for extracting 3 keywords in a sentence with no more than 200 characters, which is significantly higher than the TF-IDF, LDA and classic TextRank methods, and can meet the actual needs of this system.
[0073] In addition, the Raspberry Pi development board used in the speaker hardware system disclosed in the present invention has the characteristics of low cost and high efficiency. It can connect to home appliances via Bluetooth and WiFi and has good compatibility. It can adjust the smart home in real time according to environmental psychology and the user's emotional state to create a suitable home environment for them.
[0074] The IoT functions such as smart lighting and smart access control and other system functions of the speaker of the present invention have successfully passed functional testing and stress testing, with a success rate of 90% in the stress test, and can achieve the expected effect of the system design.
[0075] The expected benefits and commercial value after the technical solution of the present invention is transformed as follows: Currently, there are few intelligent emotional smart speaker systems for people with depression on the market. The emotional interaction, low cost, low usage threshold and good user experience of the present invention can be applied to hospitals, schools, communities and individual users after being transformed into products, bringing direct economic benefits. There are few or almost no competing products on the market, the industry competition pressure is small, and the commercial value potential is huge.
[0076] The technical solution of the present invention fills the technical gaps in the industry at home and abroad: the psychological counseling part of the emotional intelligent chat designed for the depression group and the smart home part that adjusts in real time according to environmental psychology and the user's emotional state fill the technical gaps in the industry at home and abroad, and achieve psychological counseling and relief for the depression group from different angles of environment and communication.
[0077] The technical solution of this invention solves a long-cherished but unsuccessful technical challenge: the emotionally-enabled smart speaker disclosed in this invention overcomes the lack of chat functionality and stilted conversations found in traditional speakers. It can proactively detect whether the user is speaking, significantly improving the user experience. It accurately identifies user emotions through speech recognition and natural language processing, avoiding the waste of program resources. Furthermore, it develops an intelligent chat function and an emotionally-driven interactive mode specifically for those with depression, effectively enhancing the user's communication experience and the quality of responses.
[0078] Whether the technical solution of the present invention overcomes technical bias: The present invention uses customizable wake-up words, emotion monitoring, and tone and volume adjustment to achieve emotional chat with users, which to a certain extent solves the unnatural technical bias of smart speaker chat. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] Figure 1 This is a functional structure diagram of the emotional intelligent speaker system provided by an embodiment of the present invention;
[0080] Figure 2 This is a flow chart of the volume determination standard provided by an embodiment of the present invention;
[0081] Figure 3 This is a diagram showing part of the corpus of the question-and-answer database provided by an embodiment of the present invention;
[0082] Figure 4 This is the intelligent chat technology roadmap provided by the embodiment of the present invention;
[0083] Figure 5 This is a working principle diagram of the smart speaker Yunqi provided by an embodiment of the present invention;
[0084] Figure 6 This is a prototype diagram of a home control system provided by an embodiment of the present invention;
[0085] Figure 7 This is the Raspberry Pi 3B+ development board provided by an embodiment of the present invention;
[0086] Figure 8 This is a voice expansion board provided by an embodiment of the present invention;
[0087] Figure 9 The speaker provided by the embodiment of the present invention;
[0088] Figure 10 This is a diagram of the minimum system structure of the Raspberry Pi provided by an embodiment of the present invention;
[0089] Figure 11 This is a schematic diagram of a reserved interface for a voice module provided in an embodiment of the present invention;
[0090] Figure 12 This is a circuit diagram of a smart doorbell provided by an embodiment of the present invention;
[0091] Figure 13 is a circuit diagram of a power module provided by an embodiment of the present invention;
[0092] Figure 14 is a diagram showing the connection structure of hardware modules provided by an embodiment of the present invention;
[0093] Figure 15 This is a circuit diagram of a lighting system provided by an embodiment of the present invention.
[0094] In the figure: 1. Raspberry Pi power interface; 2. Raspberry Pi USB interface; 3. Raspberry Pi GPIO pins; 4. USB camera; 5. Speaker base; 6. Speaker cover; 7. Voice expansion board microphone interface; 8. Microphone expansion board; 9. Voice expansion board speaker interface; 10. Smart access control and smart lighting hardware connection part; 11. Voice expansion board Servo01 interface; 12. Voice expansion board Servo02 interface; 13. Voice expansion board Servo03 interface; 14. Speaker; 15. Voice expansion board GPIO interface. DETAILED DESCRIPTION
[0095] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0096] In order to enable those skilled in the art to fully understand how to implement the present invention, this section provides an explanatory embodiment that expands on the technical solutions of the claims.
[0097] like Figure 1 As shown, the emotional intelligent speaker system for depression patients provided by the embodiment of the present invention includes:
[0098] Voice wake-up module, used to wake up the system;
[0099] Health monitoring module, used to analyze the user's mood score to determine the user's depression status;
[0100] Intelligent chat module, including daily chat and psychological counseling sub-modules, used for chatting and relieving depression;
[0101] Life Assistant module, including smart reminder, life guide and smart weather sub-modules, used to remind set things, weather conditions and answer consultation questions;
[0102] The home control module includes smart lighting and smart access control sub-modules, which are used to intelligently control lighting and access control.
[0103] Furthermore, the voice wake-up module uses the mainstream Snowboy offline voice wake-up and customizes the wake-up word to "Hi, Yunqi", so the emotional smart speaker is named Yunqi;
[0104] The health monitoring system uses active recording and voice recognition technology to record the conversation between the user and Yunqi, and analyzes the user's emotional score by extracting semantic feature information from the text to determine the user's depression state. The present invention divides depression into three levels: mild, moderate and severe. When the depression state is severe, a text message notification will be sent to the doctor or family for timely intervention.
[0105] like Figure 2 As shown, the specific process of recording the speech content is as follows:
[0106] First, the system detects whether the user is speaking and sets the sampling frequency threshold to 30Hz, which is lower than the normal human frequency. If the sampling frequency is greater than the threshold, recording begins; otherwise, the system waits. This gives the user some time to think while conversing with the speaker, reducing resource waste and improving the user experience.
[0107] Secondly, since people with depression speak intermittently, when the human voice sampling frequency is detected to be less than the threshold of 1000Hz, it is necessary to retest after 2 seconds; if the human voice sampling frequency is greater than the given threshold of 1000Hz, it will return to retest.
[0108] Finally, if the human voice sampling frequency detected again is less than the given threshold, it is determined that the speech has ended. After the user finishes speaking, the recording is immediately stopped and operations such as file IO and API calls are performed.
[0109] Furthermore, the intelligent chat module includes:
[0110] The daily chat submodule includes: letting Yunqi act as the user's "tree hole", chatting with the user to relieve boredom, reduce the user's life pressure and kill leisure time;
[0111] The specific process of the psychological counseling submodule includes:
[0112] If the health monitoring function detects that the user is in a depressed state, Yunqi will act as a counselor and use the depression consultation Q&A library to ask questions with the user to effectively alleviate their depression.
[0113] Furthermore, the working principle of the daily chat submodule is as follows:
[0114] The present invention adopts Turing robot generative dialogue in daily chat mode, and uses question-and-answer library retrieval dialogue in the confession mode based on factual response and psychological counseling tasks; the daily chat function of the present invention can call the Turing chat robot API to obtain question and answer content, and then realize intelligent dialogue through speech synthesis.
[0115] When the user issues a command and detects that the wake-up word containing "Yunqi" can be successfully matched and enter the intelligent chat function, and a prompt "Chat function successfully started" is displayed; then the recording mode is entered, the recording data is encapsulated into a fixed format, and the voice is converted into text by calling Baidu's voice recognition service, and then the Turing robot is called to get the answer; finally, the answer content is passed to Baidu's voice synthesis service again, and it is converted into an audio file and played through the speaker. This article uses the psychological counseling corpus Emotional First Aid Dataset as a depression counseling question and answer database. It is currently the first publicly available Chinese psychological counseling dialogue corpus. The corpus has a large amount of data and rich content, including 20,000 psychological counseling data. When used, the question and answer content will be cleaned to remove traditional Chinese characters, special symbols, sensitive information and grammatical errors, and the number of characters for each answer will be set between 5-300. At the same time, the questions and corresponding answers will be divided into three levels: mild, moderate and severe according to the label tags s1 (trouble type), s2 (mental illness), and s3 (SOS). Figure 3 Shown is a partial display of the corpus of the depression consultation question and answer database.
[0116] like Figure 4 As shown in the figure, Yunqi has added an emotional intelligent chat function on the basis of calling the Turing chat robot API to complete daily conversations. The specific process of daily chat is as follows:
[0117] First, the system will detect whether the word "consultation" is contained in the conversation message between the user and Yunqi; if not, it means that the user wants to use basic functions; if so, the emotional score of the user's question is calculated according to Algorithm 1 to determine his or her depressive state.
[0118] Secondly, the keyword extraction method Gini-TextRand proposed by the present invention is used to extract the keywords of the question;
[0119] Finally, according to the keywords and depression level, the corresponding depression consultation question and answer database is searched and answered to achieve the purpose of psychological guidance for users.
[0120] Furthermore, the algorithm 1 includes:
[0121] (1.1) After the user text S is segmented, a user vocabulary set is obtained; words belonging to the seven categories of joy, good, anger, sorrow, fear, hate, and surprise are found in the user text using the Chinese emotional vocabulary ontology of Dalian University of Technology, and the user emotional word set senWord is obtained;
[0122] (1.2) When calculating the scores of each category of emotions, the prefix weight W of the emotion word is used to simulate the presence of modifying words. The default value is W = 1; if a negative word appears between two emotion words, then W = -W; if a degree adverb appears between two emotion words, then W = W*float(A.(value()));
[0123] (1.3) Return the final sentiment score of the text and derive the user's potential depression state, which is divided into four levels: normal, mild, moderate, and severe. For normal, the Turing robot will answer, while for mild, moderate, and severe, the corresponding level question and answer database will be retrieved to answer.
[0124] Furthermore, the calculation process of the emotion score is:
[0125] The Dalian University of Technology Chinese Sentiment Lexicon Ontology Library is used to analyze the user-level metadata feature emotions and emotional dimensions. It is necessary to convert speech into text and locate and count the emotional words in it, and exclude the influence of modifying words. The emotion score ES is expressed as:
[0126]
[0127] Among them, ES∈[-1,1], i represents the number of sentiment words in the text after word segmentation; W1 i Represents the basic sentiment value of the i-th sentiment word, and its value can be determined according to the basic sentiment word list; Represents the polarity of the i-th sentiment word, with a positive value of 1, a negative value of -1, and a neutral value of 0; Represents the negation word before the i-th sentiment word, the negation value is -1, the double negation and no negation value is 1; Represents the degree adverb before the i-th sentiment word, and takes values of 1, 2, 3, 4, and 5 according to different degrees.
[0128] Furthermore, the keyword extraction method Gini-TextRand includes:
[0129] The Word2Vev model was used to vectorize the sentences to generate word vectors, and then the Gini-TextRank method was used to extract the three keywords with the highest weights. Finally, the keywords were retrieved in the corresponding depression level question and answer database to obtain the answer sentences.
[0130] Furthermore, the specific process of the Gini-TextRank method is as follows:
[0131] Initialize the weight value of each node to the inverse value of the Gini coefficient of the current word, build a weighted vocabulary network graph corresponding to the current question, and calculate the weight value TR (V i )convergence;
[0132] Node V i Gini-TextRank value TR(V i ) is expressed as:
[0133]
[0134] Among them, E ji Represents any two nodes V i and V j The weight of the connecting edge, V k ∈Out(V j ) represents V k Pointing V j , V j ∈lnV i Represents pointing to V j The entire set of , d represents the damping coefficient, 1-d represents the probability value of the current word node pointing to other word nodes, TR(V j ) is the node V j The Gini-TextRank value after adding weight information. In reality, not all nodes have a pointing relationship with each other, so d is taken as 0.8 in the calculation to ensure that the algorithm can eventually converge.
[0135] Furthermore, the depression consultation question and answer database is the psychological counseling corpus Emotional First AidDataset. As a depression consultation question and answer database, it is the first publicly available Chinese psychological counseling dialogue corpus. The corpus has a large amount of data and rich content, including 20,000 psychological counseling data;
[0136] When in use, the question and answer content will be cleaned to remove traditional Chinese characters, special symbols, sensitive information and grammatical errors, and the number of characters for each answer will be set between 5 and 300. At the same time, the questions and corresponding answers will be divided into three levels: mild, moderate and severe according to the label s1 (trouble type), s2 (mental illness) and s3 (SOS).
[0137] The specific process of the intelligent reminder submodule is: according to the user's settings, remind the user to take antidepressant drugs or things that need attention on time;
[0138] The specific process of the intelligent weather submodule is: by querying weather information such as temperature and humidity every 2 hours, the air conditioner is adjusted in real time to provide users with a suitable home environment;
[0139] The specific process of the life guide submodule is: answering questions asked by users and reporting them.
[0140] The specific process of the intelligent lighting submodule is as follows: users can control home appliances through the speaker, complete operations such as turning lights on and off, and at the same time, the system will adjust the light color to golden, milky white, etc. according to the user's depression state, creating a suitable space light and color, and improving negative emotions through the influence of ambient light on mood to achieve anti-depression effect;
[0141] The specific process of the smart access control sub-module is as follows: Yunqi provides users with smart access control functions, installs cameras and doorbells at the door, and notifies users when visitors press the doorbell. If no one is at home, visitors can also leave a message and send it to the user via email. It can even turn on the emergency access control status in critical moments to automatically open the door for specific emergency contacts.
[0142] like Figure 5 As shown, Yunqi uses voice control to implement various functions. It needs to judge the user's command and then enter the corresponding sub-function for further processing. The working principle includes:
[0143] Step 1: Wake up the system using a custom wake-up word. After waking up, the system will give a "ding ding ding" sound feedback through speech synthesis.
[0144] Step 2: The system enters recording mode to record the user's voice. When the user finishes speaking, the voice file is processed and uploaded to the Baidu speech recognition cloud server.
[0145] In step three, the cloud server starts voice recognition and semantic understanding, and then returns the user command in text form. The system calls the corresponding sub-function in the program by identifying the returned text content.
[0146] In order to prove the creativity and technical value of the technical solution of the present invention, this section provides application examples of the claimed technical solution on specific products or related technologies.
[0147] like Figure 6 As shown, an embodiment of the present invention further provides an emotional smart speaker for depression patients, and the emotional smart speaker for depression patients includes:
[0148] The main module of the system consists of a Raspberry Pi 3B+ development board, a Google Voice HAT voice expansion board, a dual-microphone expansion board, a 3-inch speaker, several connecting cables and a speaker housing, and is used for human-computer interaction; Figure 7 It is the Raspberry Pi 3B+ development board in the main module of the system. Figure 8 For the voice expansion board, Figure 9 It is a 3-inch speaker;
[0149] The voice module, consisting of the dual-microphone array expansion board and the voice expansion board in the Voice HAT kit, is used to improve noise and perform stereo recording;
[0150] Home control module, used to control smart access control and smart lighting based on the Raspberry Pi GPIO interface;
[0151] Please refer to the system main module connection relationship Figure 6 、 Figure 7 and Figure 8 , Raspberry Pi GPIO pin 3 is connected to the voice expansion board GPIO interface 15, the speaker cover 6 is connected to the speaker base 5 through a snap, and the circuit design of the Raspberry Pi power interface is as follows Figure 13 , Raspberry Pi GPIO instructions are as follows Figure 10 ;
[0152] Please refer to the voice module connection relationship Figure 7 、 Figure 8 and Figure 9 The microphone expansion board 8 is connected to the microphone interface 8 of the voice expansion board through a plug-in line, and the speaker 14 is connected to the speaker interface 9 of the voice expansion board through a plug-in line. The description of each interface of the voice expansion board is as follows Figure 11 ;
[0153] Please refer to the home control module connection relationship Figure 6 and Figure 8 , USB camera 4 is connected to Raspberry Pi USB interface 2, the 5V end of voice expansion board Servo01 interface 11 is connected to 1000 ohm resistor R1 through a connecting line, and then to the positive pole of LED1, and finally the negative pole of LED1 is connected to the Pin end of voice expansion board Servo01 interface. The 5V end of voice expansion board Servo02 interface 12 is connected to 1000 ohm resistor R2 through a connecting line, and then to the positive pole of LED2, and finally the negative pole of LED2 is connected to the Pin end of voice expansion board Servo02 interface. The 5V end of voice expansion board Servo03 interface 13 is connected to 1000 ohm resistor R3 and the positive pole of push switch through a connecting line, the other end of 1000 ohm resistor R3 is connected to the positive pole of LED3, and finally the negative pole of LED3 and the negative pole of push switch are connected to the Pin end of voice expansion board Servo03 interface. The smart doorbell circuit design is as follows: Figure 11 , intelligent lighting circuit design such as Figure 14 .
[0154] Furthermore, the Raspberry Pi 3B+ is an ARM-based microcomputer motherboard that realizes human-computer interaction by burning the operating system through an SD card, and uses Python to write software; in addition, the Raspberry Pi 3B+ also comes with 40 programmable GPIO interfaces, which can drive different peripherals, including switches, sensors, etc.; the Google Voice HAT voice expansion board is an expansion board compatible with the Raspberry Pi 40-pin interface; the dual-microphone expansion board is comparable to the human ear, used to accurately receive commands issued by the user; the 3-inch speaker is the loud voice of the speaker and can produce clear sound; the speaker shell is independently designed, with a simple and elegant appearance, and reserved for a microphone, speaker port and two function expansion ports for developing more functions.
[0155] Furthermore, the dual-microphone array expansion board is manufactured based on MEMS (Micro-Electro-Mechanical System) technology, which can effectively improve and eliminate most noise. It includes two high-quality microphones and can perform stereo recording. The voice expansion board connects to the microphone expansion board and the speaker through the Raspberry Pi GPIO port. Its audio chip can also realize the processing of dual-microphone stereo channels, the mutual conversion of sound analog signals to digital signals, and the storage and reading of digital quantities, and reserves 19 GPIO ports for developers to develop more functions.
[0156] Furthermore, the specific process of controlling smart access control and smart lighting based on the Raspberry Pi GPIO interface is as follows:
[0157] Output high and low levels at the GPIO interface or read the pin level status changes through the GPIO interface to control the light bulb switch and doorbell trigger; the written code exchanges data with the hardware through the GPIO port to control the hardware operation and read the hardware's working status signal, interrupt signal, etc. The hardware includes LED lights, switches, etc., using LED lights of different colors to simulate the lighting system of the living room and bedroom; a key switch is used to simulate the doorbell. Each hardware module and connection instructions are as follows Figure 10-15 shown.
[0158] The embodiments of the present invention have achieved some positive results during the development or use process, and indeed have great advantages over the existing technology. The following content describes them in conjunction with data, charts, etc. from the experimental process.
[0159] Example 1: Analysis of the binary classification accuracy of the sentiment recognition algorithm for questions in the efaqa psychological counseling question and answer database. The specific process is as follows:
[0160] This paper uses the Dalian University of Technology Chinese Sentiment Lexicon Ontology (abbreviated as the Ontology) to analyze user-level metadata features, emotions, and sentiment dimensions. The Ontology provides lexically fine-grained sentiment. To calculate a user's sentiment score, the speech is converted to text and the sentiment words within are located and counted, while excluding the influence of modifiers. The sentiment score can be calculated using Formula 1.
[0161] Table 1 Examples of negative words and degree adverbs
[0162]
[0163]
[0164] Specifically, examples of negation word library and degree adverb word library are shown in Table 1, where degree adverbs are weighted to indicate the intensity of their emphasis. Based on the above considerations, the user-level metadata feature emotion and emotional dimension calculation algorithm proposed in this invention is shown in Algorithm 1. Its basic process is as follows: (1) After the user text S is segmented, the user vocabulary set is obtained. Then, the words belonging to the seven categories of joy, good, anger, sorrow, fear, hate, and shock in the user text are found through the ontology library to obtain the user emotion word set senWord; (2) When calculating the emotion scores of each category, the weight W of the emotion word prefix is used to simulate the appearance of modifying words. The default value is W = 1. If a negation word appears between two emotion words, then W = -W; if a degree adverb appears between two emotion words, then W = W*float(A.(value())); (3) The final emotion score of the text is returned to obtain the user's potential depression state, which is divided into four levels: normal, mild, moderate, and severe. Normal is answered by Turing robot, while mild, moderate, and severe are answered by searching the corresponding level question and answer library respectively.
[0165] Algorithm 1 Sentiment and Emotion Scoring Algorithm
[0166]
[0167]
[0168] Example 2: The accuracy of the Gini-TextRank keyword extraction method in extracting three keywords from a sentence with no more than 200 characters is analyzed. The specific process is as follows:
[0169] The TextRank algorithm is a graph-based ranking algorithm for keyword extraction. It uses co-occurrence information (semantics) between words to extract keywords. Keyword and keyword group extraction can be achieved by constructing a lexical network graph of the user's question content. Multiple words form a sentence, or a set, and each word is represented as a node in the graph. If two words have a grammatical relationship, they are connected by an edge in the graph. Then, through iterative learning, each word will have a different TextRank value. The specific calculation is shown in Formula 3:
[0170]
[0171] Among them, V i Represents the current word node, Out(V j ) represents the collection of other nodes pointed to by the current node, lnV i Represents pointing to V j The entire set of , d represents the damping coefficient, 1-d represents the probability value of the current word node pointing to other word nodes, and in the experiment, d is set to 0.85 to ensure the convergence of the algorithm.
[0172] The Gini index is a metric used to express data uncertainty. Its formula is as follows:
[0173]
[0174] The larger G is, the higher the uncertainty of the data is; the smaller G is, the lower the uncertainty of the data is; when G = 0, all samples belong to the same category. Therefore, the Gini coefficient of the current word is negatively correlated with its weight value. The inverse of the Gini coefficient of each word is used as its corresponding initial weight value.
[0175] In traditional TextRank algorithms, all words have the same importance, meaning all word nodes have a weight of 1. However, a sentence may contain both content words and modified function words, which carry more practical meaning. Compared to function words, content words, including verbs and nouns, better reflect the true intent of the user's question and are more suitable as keywords for querying answers.
[0176] In order to reflect the importance of words in questions, this paper uses the Gini coefficient to improve the traditional TextRank algorithm. The basic idea is to initialize the weight value of each node to the inverse value of the Gini coefficient of the current word, build a weighted vocabulary network graph corresponding to the current question, and perform multiple iterative calculations until convergence. The Gini-TextRank value of each word is used to quantify its importance, thereby converting the text keyword extraction problem into a ranking process. Node V i The Gini-TextRank value after adding weight information can be calculated by Formula 2.
[0177] After proposing the Gini-TextRank method, the present invention implements a keyword-retrieval question-answering algorithm based on this method. Its basic process is as follows: use the Word2Vev model to vectorize the sentence and generate a word vector, then use Gini-TextRank to extract the three keywords with the highest weight, and finally retrieve the keyword in the corresponding depression level question-answering database to obtain the answer sentence. The corresponding pseudo code is shown in Algorithm 2. Its basic process is as follows: (1) clean the user question Q, then load the general vocabulary and use the Jieba word segmentation tool to segment the words, and then use the word2vec model to generate the word vector; (2) set the window size to k, when the distance between two words in the question is less than k, add an edge connecting the two vertices to the set, and construct a weighted directed graph based on the obtained vertex set K and edge set E; (3) calculate the weight value of each vertex according to formula (4), iterate multiple times until convergence, sort according to the textrank value of each word, and finally select the top three words with the highest weight as keywords.
[0178] Algorithm 2 Retrieval-based Question Answering Algorithm
[0179]
[0180]
[0181] This paper uses three metrics—precision (P), recall (R), and F1 value—to evaluate the effectiveness of different keyword extraction methods. Using manual extraction of three keywords as the correct criterion, Gini-TextRank was compared with three other methods: TF-IDF, LDA, and TextRank. The evaluation results are shown in Table 2. Experiments found that Gini-TextRank achieved significantly higher accuracy than the other three methods for extracting three keywords from sentences with no more than 200 characters, meeting the practical requirements of this system.
[0182] Table 2 Keyword extraction results of different methods
[0183]
[0184] Example 3: The prototype of the smart home control system designed in this paper is as follows Figure 6 As shown, in order to ensure the reliability and stability of the system, functional testing and stress testing are required.
[0185] Functional testing: System functional testing involves simulating system usage to detect any obvious errors in the entire system, including software and hardware. By proactively creating trigger conditions for each function, the system then tests each function item by item, using functional test cases, to ensure it operates normally and achieves its intended function.
[0186] Testing process: (1) Verify whether the smart speaker can be successfully awakened by a custom wake-up word and whether a feedback prompt tone is played after awakening; (2) Verify whether the life assistant can be accessed through different commands and different functions (smart reminder, life guide, smart weather) can be completed; (3) Verify whether the home control can be accessed through different commands and different functions (smart lighting, smart access control) can be completed, and whether various hardware can work normally and cooperate with the software to complete the function settings. (4) Verify whether the user's emotions can be detected based on the realization of daily chat functions, and the question and answer library can be successfully retrieved through user questions and accurate answers can be generated.
[0187] Test results: The functional test results of this system are shown in Table 3. By actively creating the trigger conditions for each function, the results show that there are no obvious errors in each function, and all functions can operate normally and meet the design requirements.
[0188] Table 3 Functional test results
[0189]
[0190]
[0191] Stress testing: Stress testing involves applying increasing load to the system to determine the maximum service level it can provide. By repeatedly triggering various system functions, the number of errors encountered in each function is counted to ensure that the error rate does not affect the user experience. This test covers eight functions, including voice wake-up, smart chat, email sending, and lighting control.
[0192] Test process: The test environment is a smart home control system. By actively creating trigger conditions for each function, each function is tested in the order shown in Table 3, and the number of tests, successes, and failures is recorded.
[0193] Test Results: The test results are shown in Table 4. The average response time for the Life Guide was long and the success rate was relatively low. This was due to network issues causing access failures and the complexity of the information obtained from the WikiHow website, which required the elimination of useless information before reporting. The average response time for face recognition was slightly long and the success rate was slightly low. This was due to the poor camera angle, which resulted in a failure in facial image comparison. The response time for retrieval and question answering was long. This was due to the large emotional vocabulary ontology and corpus, as well as the time-consuming file I / O and retrieval. The remaining modules processed less data and did not require extensive data processing. Therefore, the average response time was short, the response speed was fast, and the test results had a high success rate. The user experience was positive during subsequent use. Overall, all modules of the entire system achieved the expected results.
[0194] Table 4 Stress test results
[0195]
[0196]
[0197] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware portion can be implemented using dedicated logic; the software portion can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. Those skilled in the art will appreciate that the above-mentioned devices and methods can be implemented using computer-executable instructions and / or contained in processor control code, for example, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, or can be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.
[0198] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with this technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered by the scope of protection of the present invention.
Claims
1. An emotional intelligent speaker system for people with depression, characterized by: The emotional intelligent speaker system for depression patients includes: The voice wake-up module is used to wake up the system using a customized wake-up word with voiceprint recognition, while actively determining whether the user is speaking and recording the spoken content to directly complete the command; Health monitoring module, used to analyze the user's emotional score to determine the user's depression status; Intelligent chat module, including daily chat submodule and psychological counseling submodule, used for chatting and relieving depression; The life assistant module includes a smart reminder submodule, a life guide submodule, and a smart weather submodule, which are used to remind set events, weather conditions, and answer consultation questions; Home control module, including smart lighting sub-module and smart access control sub-module, used for intelligent control of lighting and access control; The voice wake-up module uses Snowboy offline voice wake-up and customizes the wake-up word to: Hi, Yunqi. At the same time, the emotional smart speaker is named Yunqi. The health monitoring module uses active recording and voice recognition technology to record conversations with Yunqi, and extracts semantic feature information from the text to analyze the user's emotional score to determine the user's depression status. The depression status is divided into three levels: mild, moderate, and severe. If the depression status is severe, a text message notification will be sent to the doctor or family. The specific process of the active recording is as follows: (1.1) Detect whether the speaker is speaking and set the sampling frequency threshold to 30Hz. If the sound sampling frequency is greater than the threshold 30Hz, start recording. Otherwise, wait for recording. (1.2) When the human voice sampling frequency is detected to be less than the threshold of 1000Hz, re-detect after 2s; if the human voice sampling frequency is greater than the given threshold of 1000Hz, return to re-detection; (1.3) If the human voice sampling frequency detected again is less than the threshold of 1000Hz, it is determined that the speech has ended. After the speech ends, the recording is stopped and the file IO and API call operations are performed; The specific process of the psychological counseling submodule is as follows: (2.1) Detect whether the conversation message contains the word "consultation"; if not, it indicates that it is just daily chat; if so, calculate the sentiment score of the question according to Algorithm 1 to determine the depressive state; (2.2) Use keyword extraction retrieval-based question answering algorithm to extract keywords from conversation information; (2.3) Enter the corresponding depression consultation question and answer database based on keywords and depression status to search and provide answers.
2. The emotional intelligent speaker system for depression patients as claimed in claim 1, characterized in that: The specific process of the intelligent chat module is as follows: When the system detects that the wake-up words containing Yunqi can be successfully matched and enter the intelligent chat, it will prompt: the chat function is successfully turned on; then it will enter the recording mode, encapsulate the recording data into a fixed format, convert the voice into text by calling Baidu's speech recognition service, and then call the Turing robot API to obtain the question and answer content; finally, the question and answer content will be passed to Baidu's speech synthesis service again, and the question and answer content will be converted into an audio file and played through the speaker.
3. The emotional intelligent speaker system for depression patients as claimed in claim 2, characterized in that: The algorithm 1 includes: (3.1) After segmenting the user text S, a user vocabulary set is obtained; words belonging to the seven categories of joy, good, anger, sadness, fear, hate, and surprise are found in the user text from the Chinese emotional vocabulary ontology to obtain the user emotion word set senWord; (3.2) Calculate the seven categories of emotion scores using the emotion word prefix weights W Simulate modifying words, default W =1; if a negative word appears between two sentiment words, then W =- W ; If a degree adverb appears between two sentiment words, then W = W *float(A.(value())), A.(value()) represents the value of the degree adverb library A; (3.3) Return the final sentiment score of the text and derive the potential depression state, which is divided into four levels: normal, mild, moderate, and severe. Normal is answered by the Turing robot, while mild, moderate, and severe are answered by searching the corresponding level question and answer library.
4. The emotional intelligent speaker system for depression patients as claimed in claim 2, characterized in that: The calculation process of the emotion score is: The Chinese emotional vocabulary ontology is used to analyze the user-level metadata feature emotions and emotional dimensions, convert the speech into text and locate the emotional words in the text, excluding the influence of modifying words, and the emotional score The expression is: in, Represents the number of sentiment words in the text after word segmentation; Representative The basic sentiment value of each sentiment word can be determined according to the basic sentiment word list; Representative The polarity of each sentiment word, positive value is 1, negative value is -1, and neutral value is 0; Representative In the case of a negation word before a sentiment word, the negation value is -1, and the double negation and no negation value are 1; Representative The degree adverbs before sentiment words take values of 1, 2, 3, 4, and 5 according to different degrees.
5. The emotional intelligent speaker system for depression patients as claimed in claim 2, characterized in that: The keyword search question answering algorithm includes: The user question Q is cleaned, and then the common vocabulary is loaded and segmented using the Jieba word segmentation tool. The user question is vectorized using the Word2Vev model to generate word vectors; the Gini-TextRank method is then used to extract the three keywords with the highest weights. Finally, the answer is retrieved from the corresponding depression level question and answer library based on the keywords.
6. The emotional intelligent speaker system for depression patients as claimed in claim 5, characterized in that: The specific process of the Gini-TextRank method is as follows: Use nodes to represent each word in the word vector, initialize the weight value of each node to the inverse value of the Gini coefficient of the word vector, set the window size to k, and when the distance between two words in the question is less than k, add an edge connecting the two nodes to the set. According to the obtained node set K and edge set E, a vocabulary network graph with weights is constructed. The weight value of each node is calculated through multiple iterations until it is Converge, and finally select the top three words with high weights as keywords; node The weight value of Gini-TextRank after adding weight information The expression is: in, Represents any two nodes The weight of the edge connecting them, represent point to Representative direction The entire collection of d Represents the damping coefficient, 1- d Represents the probability value of the current word node pointing to other word nodes, For nodes Gini-TextRank weight value after adding weight information; The depression consultation question and answer database is the Emotional First Aid Dataset, a psychological counseling corpus, which includes 20,000 psychological counseling data. When used, the question and answer content is cleaned to remove traditional Chinese characters, special symbols, sensitive information, and grammatical errors, and the number of characters for each answer is set between 5 and 300. At the same time, the questions and corresponding answers are divided into three levels: mild, moderate, and severe according to the label tags of trouble type s1, mental illness s2, and SOS s3; The specific process of the intelligent reminder submodule is as follows: according to the settings, remind the user to take antidepressant drugs or things that need attention on time; The specific process of the intelligent weather submodule is: every 2 hours, the air conditioner is adjusted by querying temperature, humidity and weather information to provide a suitable home environment; The specific process of the life guide submodule is: answering questions asked by users and reporting them; the specific process of the smart lighting submodule is: The emotional smart speaker system is used to control home appliances and complete light switching operations. At the same time, the emotional smart speaker system adjusts the light color to golden or milky white according to the depressive state; The specific process of the intelligent access control submodule is as follows: Install a camera and doorbell at the door to notify you when the doorbell is pressed; if no one is at home, leave a message and send an email; in critical moments, turn on the emergency access status and automatically open the door for specific emergency contacts.
7. An emotional smart speaker for people with depression that implements the emotional smart speaker system for people with depression as described in any one of claims 1 to 6, characterized in that: The emotional smart speaker for depression patients includes: The system main module consists of a Raspberry Pi 3B+ development board, a Google Voice HAT voice expansion board, a dual-microphone expansion board, a 3-inch speaker, several connecting cables, and a speaker housing. The Raspberry Pi 3B+ development board and the Google Voice HAT voice expansion board are connected via GPIO pins, the dual-microphone expansion board is connected to the Mic interface of the Google Voice HAT voice expansion board via a plug-in cable, and the 3-inch speaker is connected to the Speaker interface of the Google Voice HAT voice expansion board via a plug-in cable for human-computer interaction. The voice module consists of a dual-microphone array expansion board and a voice expansion board, which is used to improve noise and perform stereo recording; The home control module consists of multiple 1000-ohm resistors, multiple LED lights, a push button switch, and a USB camera. The interface of the Google Voice HAT voice expansion board is connected to the 1000-ohm resistor via a connecting line and then to the positive electrode of the LED light. Finally, the negative electrode of the LED light is connected to the pin end of the interface of the Google Voice HAT voice expansion board. The socket of the USB camera is connected to the USB segment of the Raspberry Pi 3B+ development board, and is used to control smart access control and smart lighting based on the GPIO interface of the Raspberry Pi 3B+ development board.
8. The emotional smart speaker for depression patients as claimed in claim 7, characterized in that: The Raspberry Pi 3B+ development board realizes human-computer interaction by burning the operating system through an SD card, uses Python language to write software, and drives peripherals through multiple programming interfaces, including switches and sensors; The Google Voice HAT voice expansion board is an expansion board compatible with the 40-pin interface of the Raspberry Pi 3B+ development board; The dual-microphone expansion board is used to accurately receive commands issued by the user; The 3-inch speaker is used for clear sound; The speaker housing is provided with a microphone, a speaker port and multiple function expansion ports for function development; The dual-microphone array expansion board includes two high-quality microphones for stereo recording and noise cancellation; The voice expansion board is connected to the dual-microphone array expansion board and the 3-inch speaker through the GPIO interface of the Raspberry Pi 3B+ development board. The audio chip of the voice expansion board is used to process the dual-microphone stereo channels, the mutual conversion of sound analog signals to digital signals, and the storage and reading of digital quantities, and multiple GPIO interfaces are reserved for developing more functions; The specific process of controlling smart access control and smart lighting based on the GPIO interface of the Raspberry Pi 3B+ development board is as follows: Control the light bulb switch and doorbell trigger by outputting high and low levels at the GPIO interface or reading changes in the pin level state at the GPIO interface; The written code is used to exchange data with hardware through the GPIO interface, control hardware operation, and read hardware working status signals and interrupt signals; the hardware includes LED lights and push buttons. Different colors of LED lights are used to simulate the lighting systems of the living room and bedroom, and the push buttons are used to simulate doorbells.
Citation Information
Patent Citations
Data processing method and device, terminal and storage medium
CN112637296A