Intelligent monitoring system for emotion fluctuation of psychiatric patient based on machine learning algorithm
The intelligent monitoring system for mood fluctuations in psychiatric patients based on machine learning algorithms has solved the problem of inaccurate monitoring caused by disease and individual differences, realized personalized mood monitoring, improved recognition accuracy and adaptability, and enhanced the system's adaptive optimization capabilities.
Patent Information
- Application Number
- CN202511644908.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-11
- Publication Date
- 2026-02-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies are inaccurate in monitoring emotions due to the vast differences in illness and individual characteristics among psychiatric patients, and cannot achieve accurate identification and monitoring of emotional fluctuations in all patients through a fixed monitoring method.
An intelligent monitoring system for emotional fluctuations in psychiatric patients based on machine learning algorithms is adopted. It collects physiological and video data, performs preprocessing, alignment and fusion, and trains an emotion recognition model by combining electronic medical records and historical disease data. The model parameters are dynamically optimized during the monitoring process, and personalized monitoring is achieved by using mechanisms such as composite loss function and shortest emotion dwell time.
It significantly improves the accuracy and clinical applicability of emotion monitoring, enhances the system's personalization and continuous learning capabilities, ensures the model's adaptability and recognition accuracy at different disease stages, and improves the reliability and adaptive optimization capabilities of the model's output results.
Smart Images

Figure CN121483610A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, specifically to an intelligent monitoring system for emotional fluctuations in psychiatric patients based on machine learning algorithms. Background Technology
[0002] For psychiatric patients, timely monitoring of their emotional fluctuations is crucial for disease control and treatment. However, due to limited time and energy, doctors and nurses cannot constantly monitor patients' emotional changes. Therefore, constructing an intelligent monitoring system for psychiatric patients' emotions, enabling timely observation of emotional fluctuations, is of great significance in helping doctors and nurses better intervene and treat patients. However, accurately identifying emotional fluctuations in psychiatric patients is not easy. Unlike ordinary people, the emotional expressions of psychiatric patients are complex and diverse. On the one hand, different mental illnesses and different stages of disease development may lead to patients exhibiting drastically different emotional fluctuation thresholds and characteristics. On the other hand, patients' emotional expressions are highly individualized, with significant differences in emotional expression patterns, tone of voice, and physiological signals among different patients. Therefore, achieving effective monitoring of the emotional fluctuations of all psychiatric patients through a fixed method faces many challenges.
[0003] Chinese patent CN117370768B discloses a method and system for detecting emotional fluctuations in mental patients. The method mainly includes: acquiring physiological data, voice data, facial expression data, and behavioral data of a target mental patient over a preset time period; determining whether the target mental patient exhibits abnormal emotional fluctuations based on the physiological data; if abnormal emotional fluctuations occur, determining a corresponding emotion recognition model based on the changing trends of the physiological data; different changing trends of physiological data correspond to one or more emotion recognition models, and different emotion recognition models are used to identify different emotions; converting the voice data, facial expression data, and behavioral data into target data features; and inputting the target data features into the corresponding emotion recognition model to obtain the corresponding emotion recognition result. While this method can achieve emotion recognition to a certain extent, it still overlooks three problems: First, the method only performs recognition when abnormal emotional fluctuations are observed, potentially ignoring changes when abnormal fluctuations are not detected; second, the threshold for judging abnormal emotional fluctuations may differ for different patients; and finally, the emotions of psychiatric patients have strong individual characteristics, and judging them without considering the disease and its progression may also lead to biased results. Overcoming the challenges of the disease and the vast differences in emotional expression among psychiatric patients to achieve accurate identification of patients' emotions has become a key research challenge. Summary of the Invention
[0004] This invention provides an intelligent monitoring system for emotional fluctuations in psychiatric patients based on machine learning algorithms. This system overcomes the problem that existing emotion recognition systems struggle to accurately identify and monitor the emotional fluctuations of all patients using a fixed monitoring method due to the significant differences in disease and individual characteristics among patients.
[0005] This invention provides an intelligent monitoring system for mood fluctuations in psychiatric patients based on machine learning algorithms.
[0006] include,
[0007] The acquisition module is used to collect patient physiological data and video data, compress them, and transmit them back.
[0008] A preprocessing module, which is connected to the acquisition module, is used to preprocess the physiological data and the video data;
[0009] An alignment module, which is connected to the preprocessing module, is used to align the physiological data with the video data;
[0010] A fusion module, connected to the alignment module, is used to fuse the physiological data with the video data to obtain observation data;
[0011] The medical record acquisition module is used to acquire the corresponding electronic medical record based on the patient, and to acquire the corresponding minimum emotional dwell time based on the corresponding disease in the electronic medical record;
[0012] The model building module is connected to the medical record acquisition module and is used to acquire corresponding historical disease data based on the disease, and to train the unfrozen layer of the pre-trained emotion recognition model based on the neural network algorithm based on the historical disease data to obtain the mental patient monitoring model.
[0013] A monitoring module, which is connected to the model building module and the fusion module, is used to identify the observation data in real time based on the mental patient monitoring model, and to issue a notification command when an emotional abnormality is detected.
[0014] An optimization module, which is connected to the medical record acquisition model and the monitoring module, is used to determine whether the identification of the mental patient monitoring model is qualified based on the proportion of the sum of the times of each emotion stay shorter than the shortest emotion stay in the current cycle in the current cycle duration, and, when the determination is unqualified, to correct the acquisition parameters and / or update the parameters, or to issue a notification instruction.
[0015] An update module, which is connected to the model building module and the fusion module, is used to periodically acquire the observation data and update the mental patient monitoring model based on the observation data.
[0016] An adjustment module, which is connected to the optimization module, the acquisition module and the update module, is used to adjust the parameters of the corresponding module based on the instructions of the optimization module;
[0017] The notification module, which is connected to the optimization module and the monitoring module, is used to output notifications based on notification instructions.
[0018] Furthermore, the update module is used to periodically acquire the observation data, and to construct a target feature distribution based on the characteristics of the observation data, and to construct a historical feature distribution based on the characteristics of the historical disease data, and to construct a composite loss function based on the maximum mean difference between the target feature distribution and the reference feature distribution, and to determine an update freeze ratio based on the disease stage in the electronic medical record, and to freeze the mental patient monitoring model based on the update freeze ratio, and to train the unfrozen layer of the mental patient monitoring model based on the composite loss function, historical disease data and observation data to obtain the updated mental patient monitoring model;
[0019] The update freeze ratio refers to the proportion of layers whose parameters remain unchanged when updating the mental patient monitoring model, in the total number of layers in the mental patient monitoring model.
[0020] The shortest duration of emotional retention refers to the shortest time that the patient's corresponding disease-related emotions are maintained.
[0021] Furthermore, the optimization module is also used to determine the abnormal percentage based on the proportion of the sum of the times when each emotion stays shorter than the shortest emotion stay in the current cycle within the current cycle duration, and to determine whether the identification of the mental patient monitoring model is qualified based on the abnormal percentage, and to maintain the system parameters and continue monitoring when qualified, or to adjust the weight of the composite loss function based on the ratio of the abnormal percentage to the preset abnormal percentage when unqualified.
[0022] Furthermore, the optimization module is also used to determine the abnormality ratio based on the ratio of the abnormality ratio to the preset abnormality ratio, and to increase the weight of the composite loss function based on the abnormality ratio, wherein the increase in the weight of the composite loss function is proportional to the abnormality ratio.
[0023] Furthermore, the optimization module is also used to determine the loss weight difference based on the difference between the loss weights of the loss function before and after the correction, and to reduce the learning rate when updating the mental patient monitoring model based on the loss weight difference, wherein the reduction in the learning rate is proportional to the loss weight difference.
[0024] Furthermore, the optimization module is also used to determine the learning rate difference based on the difference in learning rate when updating the monitoring model for mental patients before and after the correction, and to shorten the duration of the update cycle based on the learning rate difference, wherein the shortening of the update cycle duration is proportional to the learning rate difference.
[0025] Furthermore, the optimization module is also used to determine the cycle difference based on the difference in the update cycle duration before and after the correction, and to increase the batch size when updating the mental patient monitoring model based on the cycle difference, wherein the increase in the batch size when updating the mental patient monitoring model is proportional to the cycle difference.
[0026] Furthermore, the optimization module is also used to identify the fused observation data based on the modified mental patient monitoring model, and to determine the abnormality ratio based on the modified mental patient monitoring model, and to determine whether the identification of the mental patient monitoring model is qualified based on the modified abnormality ratio, and, if qualified, to maintain the system parameters and continue monitoring, or, if unqualified, to modify the compression ratio during compression and transmission based on the ratio of the preset completeness to the average completeness of the physiological data and the video data.
[0027] Furthermore, the optimization module is also used to determine data integrity based on the average of the physiological data and the video data integrity, and to determine a integrity ratio based on the ratio of the preset integrity to the data integrity, and to increase the compression ratio during compression and transmission based on the integrity ratio, wherein the increase in compression ratio is proportional to the integrity ratio.
[0028] Furthermore, the optimization module is also used to identify the fused observation data based on the modified mental patient monitoring model, and to determine the abnormality ratio based on the modified mental patient monitoring model, and to determine whether the identification by the mental patient monitoring model is qualified based on the modified abnormality ratio, and to maintain the system parameters and continue monitoring when qualified, or to determine that the acquisition module is malfunctioning when unqualified and to output a notification command.
[0029] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention provides an intelligent monitoring system for emotional fluctuations in psychiatric patients using machine learning algorithms. It collects and compresses physiological and video data from patients, then transmits it back. This data is then preprocessed, aligned, and fused to generate observational data suitable for analysis. Simultaneously, the system obtains the patient's electronic medical records, extracts the shortest duration of emotional states related to the patient's disease, and trains an emotion recognition model based on this information and historical disease data. This generates a personalized monitoring model for the patient. During the monitoring process, the system continuously monitors the emotion recognition effect and periodically optimizes the model's parameters when the effect is unsatisfactory, thereby promoting the model's rapid learning of individual characteristics. This effectively solves the problem of inaccurate emotion monitoring caused by significant differences in disease type, disease stage, and individual differences among patients, significantly improving the accuracy and clinical applicability of emotion monitoring.
[0030] Furthermore, by introducing a composite loss function and a maximum mean difference mechanism, combined with dynamically setting the update-freeze ratio according to the disease stage, the system can accurately adapt to the patient's current emotional characteristic distribution while maintaining model stability. This method effectively avoids model overfitting or excessive updates, improves the model's adaptability and recognition accuracy at different disease stages, and enhances the system's personalization and continuous learning capabilities.
[0031] Furthermore, the "shortest duration of emotional state" is introduced as a criterion, and combined with the abnormality rate to dynamically evaluate whether the model's identification is qualified, enabling the system to identify abnormal behaviors such as model misjudgment or overly rapid identification of emotional fluctuations. This mechanism effectively identifies unreasonable emotional fluctuation identification results, improves the reliability and clinical interpretability of the model's output results, and lays the foundation for subsequent optimization and adjustment.
[0032] Furthermore, by dynamically adjusting the weights of the composite loss function based on the ratio of the abnormality rate to a preset abnormality rate, the model can adaptively enhance its learning intensity for new features when the identification bias is large. This method improves the model's response speed to individual differences and changes in the patient's condition, enhances the system's adaptive optimization capability, and ensures that the model continuously reflects the patient's actual emotional state.
[0033] Furthermore, as the weights of the loss function increase, the system simultaneously reduces the learning rate to avoid training oscillations or divergence caused by gradient amplification. This mechanism ensures the stability and convergence of model training, maintains the controllability of the training process while performing reinforcement learning, and improves the efficiency and reliability of model updates.
[0034] Furthermore, by dynamically shortening the update cycle based on the learning rate difference, the model can respond more quickly and complete parameter adjustments when anomalies are identified. This mechanism enhances the system's real-time perception of emotional changes, making it particularly suitable for scenarios where psychiatric patients experience frequent emotional fluctuations, thus improving the system's timeliness and intervention effectiveness.
[0035] Furthermore, by dynamically increasing the batch size through periodic interpolation, the system can maintain training efficiency and stability even under high-frequency updates. This mechanism effectively balances update frequency and computational load, avoiding resource waste or gradient instability caused by frequent mini-batch training, thus improving model training efficiency and system performance.
[0036] Furthermore, if the model recognition still fails, the system dynamically adjusts the compression ratio based on data integrity to ensure the quality of transmitted data. This mechanism effectively addresses data loss issues caused by poor network conditions or abnormal data acquisition, ensuring the integrity and validity of the model's input data and improving recognition accuracy and system robustness.
[0037] Furthermore, by intelligently adjusting the compression ratio based on the integrity ratio, the system maximizes the retention of key emotional features while ensuring data transmission efficiency. This mechanism achieves a dynamic balance between data quality and transmission efficiency, avoiding information loss due to excessive compression and improving model recognition performance and clinical usability.
[0038] Furthermore, if the model still fails to meet the requirements after multiple rounds of optimization, the system automatically determines that the data acquisition module is malfunctioning and issues a notification, quickly locating the source of the problem. This mechanism avoids the waste of resources caused by blindly adjusting parameters, improves the efficiency of system fault diagnosis and maintenance response speed, and ensures the long-term stable operation and data reliability of the monitoring system. Attached Figure Description
[0039] Figure 1 This is a block diagram of the intelligent monitoring system for mood fluctuations in psychiatric patients based on machine learning algorithms, as described in this embodiment of the invention.
[0040] Figure 2 This is a flowchart illustrating the workflow of the intelligent monitoring system for mood fluctuations in psychiatric patients based on machine learning algorithms, as described in this embodiment of the invention.
[0041] Figure 3 This is a flowchart illustrating the process of determining the qualification of a mental patient monitoring model based on pattern similarity in an embodiment of the present invention.
[0042] Figure 4 This is a flowchart illustrating the process of increasing the loss weight of the composite loss function based on the anomaly ratio in an embodiment of the present invention. Detailed Implementation
[0043] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.
[0044] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0045] Please see Figure 1 The diagram shown is a block diagram of the intelligent monitoring system for emotional fluctuations of psychiatric patients based on machine learning algorithms in an embodiment of the present invention. The intelligent monitoring system for emotional fluctuations of psychiatric patients based on machine learning algorithms includes a data acquisition module, a preprocessing module, an alignment module, a fusion module, a medical record acquisition module, a model building module, a monitoring module, an optimization module, an update module, an adjustment module, and a notification module.
[0046] The acquisition module is used to collect patient physiological data and video data, compress them, and transmit them back.
[0047] A preprocessing module, which is connected to the acquisition module, is used to preprocess the physiological data and the video data;
[0048] An alignment module, which is connected to the preprocessing module, is used to align the physiological data with the video data;
[0049] A fusion module, connected to the alignment module, is used to fuse the physiological data with the video data to obtain observation data;
[0050] The medical record acquisition module is used to acquire the corresponding electronic medical record based on the patient, and to acquire the corresponding minimum emotional dwell time based on the corresponding disease in the electronic medical record;
[0051] The model building module is connected to the medical record acquisition module and is used to acquire corresponding historical disease data based on the disease, and to train the unfrozen layer of the pre-trained emotion recognition model based on the neural network algorithm based on the historical disease data to obtain the mental patient monitoring model.
[0052] A monitoring module, which is connected to the model building module and the fusion module, is used to identify the observation data in real time based on the mental patient monitoring model, and to issue a notification command when an emotional abnormality is detected.
[0053] An optimization module, which is connected to the medical record acquisition model, is used to determine whether the identification of the mental patient monitoring model is qualified based on the proportion of the sum of the times of each emotion stay shorter than the shortest emotion stay in the current cycle in the current cycle duration, and, when the determination is unqualified, to correct the acquisition parameters and / or update the parameters, or to issue a notification instruction.
[0054] An update module, which is connected to the model building module and the fusion module, is used to periodically acquire the observation data and update the mental patient monitoring model based on the observation data.
[0055] An adjustment module, which is connected to the optimization module, the acquisition module and the update module, is used to adjust the parameters of the corresponding module based on the instructions of the optimization module;
[0056] The notification module, which is connected to the optimization module and the monitoring module, is used to output notifications based on notification instructions.
[0057] When the acquisition module collects and compresses the patient's physiological data and video data, the compression ratio (CR) ranges from 30% to 50%.
[0058] When collecting patient physiological data and video data, the method of collecting patient physiological data and video data is not limited. Technicians can collect data using cameras or wearable acquisition devices as needed. The patient physiological data includes, but is not limited to, heart rate, blood pressure, respiratory rate, etc., which will not be elaborated here.
[0059] In the preprocessing module, the preprocessing of the physiological data is not limited, and can include noise reduction, etc. The preprocessing of the video data is not limited, and technicians can perform noise reduction, image enhancement, individual facial recognition, body movement recognition, etc. on the video data, which will not be elaborated here.
[0060] In the alignment module, there is no limitation on the method of aligning the physiological data with the video data. Technicians can use any one of the following: cross-correlation function, dynamic time warping, linear interpolation, and clock synchronization protocol.
[0061] When the fusion module fuses the physiological data with the video data, the fusion method is not limited. Technicians may use any one or more of the following methods: splicing, weighted average, dimensionality reduction or feature transformation. This will not be elaborated here.
[0062] The minimum emotional duration refers to the shortest time that the patient's corresponding disease-related emotions are maintained. The specific value of the minimum emotional duration is determined by the patient's corresponding disease, which will not be elaborated here.
[0063] In the model building module, when the unfrozen layer of the pre-trained emotion recognition model based on the neural network algorithm is trained based on historical disease data to obtain the mental patient monitoring model, the neural network algorithm includes, but is not limited to, any one of the following: feedforward neural network, multilayer perceptron, convolutional neural network, recurrent neural network, long short-term memory network, generative adversarial network, and deep Q network, which will not be elaborated here.
[0064] Based on the aforementioned disease, corresponding historical disease data is obtained. Then, based on the relationship between observed data and emotions within the corresponding historical disease data, the unfrozen layer of the emotion recognition model constructed using a neural network algorithm is trained. The process includes:
[0065] Obtain the training parameters corresponding to the emotion recognition model built based on convolutional neural networks;
[0066] Freeze the bottom 70%-80% of the emotion recognition model;
[0067] The emotion recognition model is trained using observed data from corresponding historical disease data as input and patient emotions as output. The learning rate of the unfrozen layer of the emotion recognition model is set to one-tenth of the initial learning rate. The predicted output is calculated through forward propagation, and then the loss value between the predicted value and the true value is calculated. The gradient of the loss value with respect to the parameters of the unfrozen layer is calculated. The Adam optimizer is used to update the parameters according to the gradient and the learning rate. The above steps are repeated until the loss value of the model converges. After convergence, the mental patient monitoring model is obtained.
[0068] When the update module periodically acquires the observation data, the value range of the period duration UP is 1-3h.
[0069] Please see Figure 2 The diagram shown is a flowchart of the intelligent monitoring system for emotional fluctuations of psychiatric patients based on machine learning algorithms in this embodiment of the invention. The workflow of the intelligent monitoring system for emotional fluctuations of psychiatric patients based on machine learning algorithms in this embodiment of the invention includes:
[0070] S1: The acquisition module collects the patient's physiological data and video data, compresses and transmits them back;
[0071] S2: The preprocessing module preprocesses the physiological data and the video data;
[0072] S3: The alignment module aligns the physiological data with the video data;
[0073] S4: The fusion module fuses the physiological data with the video data to obtain the observation data;
[0074] S5: The medical record acquisition module acquires the corresponding electronic medical record based on the patient, and acquires the corresponding shortest emotional dwell time based on the corresponding disease in the electronic medical record;
[0075] S6: The model building module obtains corresponding historical disease data based on the disease, and trains the unfrozen layer of the pre-trained emotion recognition model based on the neural network algorithm based on the historical disease data to obtain the mental patient monitoring model.
[0076] S7: The monitoring module identifies the observation data in real time based on the mental patient monitoring model, and issues a notification command when an emotional abnormality is detected;
[0077] S8: The optimization module determines whether the identification of the mental patient monitoring model is qualified based on the proportion of the sum of the times of each emotion stay shorter than the shortest emotion stay in the current cycle in the current cycle duration, and, if it is determined to be unqualified, it corrects the collection parameters and / or updates the parameters, or issues a notification instruction.
[0078] S9: The update module periodically acquires the observation data and updates the mental patient monitoring model based on the observation data;
[0079] S10: The adjustment module adjusts the corresponding module parameters based on the optimization module instructions;
[0080] S11: Output notification based on notification instruction.
[0081] Furthermore, the update module is used to periodically acquire the observation data, and to construct a target feature distribution based on the characteristics of the observation data, and to construct a historical feature distribution based on the characteristics of the historical disease data, and to construct a composite loss function based on the maximum mean difference between the target feature distribution and the reference feature distribution, and to determine an update freeze ratio based on the disease stage in the electronic medical record, and to freeze the mental patient monitoring model based on the update freeze ratio, and to train the unfrozen layer of the mental patient monitoring model based on the composite loss function, historical disease data and observation data to obtain the updated mental patient monitoring model;
[0082] The update freeze ratio refers to the proportion of layers whose parameters remain unchanged when updating the mental health patient monitoring model, out of the total number of layers in the mental health patient monitoring model. The specific value of the freeze ratio is determined based on the disease stage in the electronic medical record.
[0083] The initial freeze ratio is set at 90%.
[0084] The rate of chronic phase freeze in mental illness was 70%.
[0085] The freeze rate during the full development period is 65%.
[0086] Specifically, the process by which the update module updates the mental patient monitoring model based on observational data includes:
[0087] The observation data is acquired periodically, and the features of the observation data are extracted to construct the target feature distribution. There are n in total S One sample;
[0088] Extracting features from the historical disease data to construct a historical feature distribution There are n in total T For each sample, methods for extracting data features include, but are not limited to, splicing or fusion through neural networks;
[0089] Calculate the maximum mean difference between the target feature distribution and the reference feature distribution.
[0090] in, This represents two independent samples m and m from the same distribution. O Joint expectation, m=x, y For RBF kernel function, σ is the kernel width, and the value range of σ is set to 0.5-2;
[0091] The composite loss function LOSS = emotion recognition loss + composite loss function weight LFW × MMD. Here, emotion recognition loss refers to the loss calculated by cross-entropy loss between the predicted result and the true label when predicting corresponding historical disease data through the mental patient monitoring model. The composite loss function weight LFW is the weight that controls the balance between domain alignment and emotion recognition task. When LFW is too large, the model will focus too much on alignment and ignore emotion recognition accuracy. When LFW is too small, the alignment may be insufficient. Therefore, in this scheme, the value range of the composite loss function weight LFW is set to 0.2-0.6 to effectively ensure the alignment of cross-modal / cross-domain emotion feature distribution while avoiding excessive suppression of classification loss that would lead to a decrease in model discrimination performance.
[0092] During the update, the loss function is set to the composite loss function LOSS, the optimizer is the Adam optimizer, the learning rate LR ranges from 0.0001 to 0.001, the batch size ranges from 32 to 128, the number of training epochs is 50, and the training ends, resulting in the updated mental patient monitoring model.
[0093] Furthermore, the optimization module is also used to determine the abnormal percentage based on the proportion of the sum of the times when each emotion stays shorter than the shortest emotion stay in the current cycle within the current cycle duration, and to determine whether the identification of the mental patient monitoring model is qualified based on the abnormal percentage, and to maintain the system parameters and continue monitoring when qualified, or to adjust the weight of the composite loss function based on the ratio of the abnormal percentage to the preset abnormal percentage when unqualified.
[0094] A patient's emotional state is relatively continuous and stable over time. Even for psychiatric patients, their emotions cannot fluctuate frequently and drastically in an instant. The shortest emotional duration refers to the shortest time that the patient's corresponding emotional state is maintained. If the duration of the patient's emotional state is shorter than the shortest emotional duration, it is considered that the judgment may be erroneous. The abnormal proportion refers to the proportion of abnormal emotional durations (emotional durations shorter than the "shortest emotional duration") identified by the model within a certain time period. This reflects the model's bias in emotional recognition. Therefore, the abnormal proportion can be used to determine whether the psychiatric patient monitoring model is qualified. Through the abnormal proportion, this invention can quickly determine the recognition ability of the current psychiatric patient monitoring model, thereby laying the foundation for personalized and clinically relevant psychiatric monitoring.
[0095] Please see Figure 3 As shown, this is a flowchart illustrating the process of determining the qualification of the mental patient monitoring model based on pattern similarity in an embodiment of the present invention. The process by which the optimization module determines the qualification of the mental patient monitoring model based on the abnormality ratio includes:
[0096] The optimization module determines the abnormality percentage PA based on the proportion of the sum of the durations of each emotion that is shorter than the shortest emotion duration in the duration of the current cycle.
[0097] The abnormal percentage PA is compared with the preset abnormal percentage PA1. For different diseases, the shortest emotional duration may vary greatly. Therefore, the preset abnormal percentage PA1 is set to [2, 15%].
[0098] If the abnormal percentage PA is less than or equal to the preset abnormal percentage PA1, the optimization module determines that the mental patient monitoring model is qualified, and the optimization module maintains the system parameters and continues to monitor.
[0099] If the abnormal percentage PA is less than or equal to the preset abnormal percentage PA1, the optimization module determines that the mental patient monitoring model is unqualified, and the optimization module adjusts the weight of the composite loss function based on the ratio of the abnormal percentage to the preset abnormal percentage.
[0100] Furthermore, the optimization module is also used to determine the abnormality ratio based on the ratio of the abnormality ratio to the preset abnormality ratio, and to increase the weight of the composite loss function based on the abnormality ratio, wherein the increase in the weight of the composite loss function is proportional to the abnormality ratio.
[0101] When a model is deemed unqualified, it indicates that the existing model may have failed to effectively grasp the emotional characteristics of the patient's current disease. Increasing the weight of the composite loss function helps the model to more accurately capture and integrate new features from the current observation data, thereby guiding the model to focus on optimizing disease-related features that have not been fully learned, strengthening its recognition ability. The anomaly ratio reflects the degree of deviation of the model's current performance relative to the tolerance range. Dynamically increasing the weight of the composite loss function based on the anomaly ratio, with the increase being proportional to the ratio, helps guide the model to more accurately capture and adapt to the patient's current emotional characteristics, reducing misjudgments. At the same time, while improving the model's learning efficiency and recognition accuracy, it avoids training instability caused by blind adjustments, achieving a personalized, dynamic, and intelligent optimization closed loop.
[0102] Please see Figure 4 As shown, this is a flowchart illustrating the process of increasing the loss weight of the composite loss function based on the anomaly ratio in an embodiment of the present invention. The process by which the optimization module increases the loss weight of the composite loss function based on the anomaly ratio in this embodiment includes:
[0103] The optimization module determines the anomaly ratio PAR based on the ratio of the anomaly ratio to the preset anomaly ratio.
[0104] The abnormality ratio PAR is compared with the first preset abnormality ratio PAR1 and the second preset abnormality ratio PAR2, wherein the first preset abnormality ratio PAR1 is set to (1, 2] and the second preset abnormality ratio PAR2 is set to (2, 5].
[0105] If the abnormality ratio PAR is less than or equal to the first preset abnormality ratio PAR1, the optimization module uses the first weight correction threshold α1 to correct the composite loss function weight LFW. The corrected composite loss function weight LFW' = LFW × α1, where the first weight correction threshold α1 is set to 1.02.
[0106] If the abnormal percentage ratio PAR is greater than the first preset abnormal percentage ratio PAR1 and less than or equal to the second preset abnormal percentage ratio PAR2, then the optimization module uses the second weight correction threshold α2 to correct the composite loss function weight LFW. The corrected composite loss function weight LFW' = LFW × α2, where the second weight correction threshold α2 is set to 1.05.
[0107] If the abnormality ratio PAR is greater than the second preset abnormality ratio PAR2, the optimization module uses the third weight correction threshold α3 to correct the composite loss function weight LFW. The corrected composite loss function weight LFW' = LFW × α3, where the third weight correction threshold α3 is set to 1.1.
[0108] Furthermore, the optimization module is also used to determine the loss weight difference based on the difference between the loss weights of the loss function before and after the correction, and to reduce the learning rate when updating the mental patient monitoring model based on the loss weight difference, wherein the reduction in the learning rate is proportional to the loss weight difference.
[0109] Increasing the loss weights amplifies the gradient during backpropagation. If the learning rate is not adjusted, this can easily lead to oscillations or even divergence during model training, affecting convergence stability. The difference in loss weights reflects the magnitude of the weight adjustment, i.e., the optimization pressure the model is under in the current training phase. By proportionally reducing the learning rate based on the difference in loss weights, a dynamic balance between training step size and training intensity can be achieved. When the weight adjustment is large, the learning rate decreases significantly to ensure stable and safe training; when the weight adjustment is small, the learning rate is only fine-tuned to maintain high training efficiency. This design coordinates gradient changes and learning step size during model training, avoiding gradient explosion and training instability, while ensuring that the model can flexibly adapt to new anomalies, improving recognition accuracy, promoting stable and effective model convergence, and enhancing the autonomous optimization capability and reliability of the intelligent monitoring system in practical applications.
[0110] Specifically, the process by which the optimization module reduces the learning rate of the mental patient monitoring model during updates based on the loss weight difference includes:
[0111] The optimization module determines the loss weight difference (LWD) based on the difference between the loss weights of the loss function before and after the correction.
[0112] The loss weight difference LWD is compared with the set first preset loss weight difference LWD1 and second preset loss weight difference LWD2, wherein the first preset loss weight difference LWD1 is set to [0.004, 0.02] and the second preset loss weight difference LWD2 is set to (0.02, 0.05].
[0113] If the loss weight difference LWD is less than or equal to the first preset loss weight difference LWD1, the optimization module uses the first learning rate correction threshold β1 to correct the learning rate LR when updating the mental patient monitoring model. The corrected learning rate LR' = LR × β2, where the first learning rate correction threshold β1 is set to 0.98.
[0114] If the loss weight difference LWD is greater than the first preset loss weight difference LWD1 and less than or equal to the second preset loss weight difference LWD2, then the optimization module uses the second learning rate correction threshold β2 to correct the learning rate LR when updating the mental patient monitoring model. The corrected learning rate LR' = LR × β2, where the second learning rate correction threshold β2 is set to 0.95.
[0115] If the loss weight difference LWD is greater than the second preset loss weight difference LWD2, the optimization module uses the third learning rate correction threshold β3 to correct the learning rate LR when updating the mental patient monitoring model. The corrected learning rate LR' = LR × β3, where the third learning rate correction threshold β3 is set to 0.91.
[0116] Furthermore, the optimization module is also used to determine the learning rate difference based on the difference in learning rate when updating the monitoring model for mental patients before and after the correction, and to shorten the duration of the update cycle based on the learning rate difference, wherein the shortening of the update cycle duration is proportional to the learning rate difference.
[0117] By shortening the update cycle, this invention can accelerate the model parameter update frequency, allowing the model to receive new observation data and complete training more quickly. This enables rapid correction of recognition errors and improves the model's perception and adaptation speed to emotional changes. The learning rate difference reflects the magnitude of step size adjustment during model training. When the difference is large, it indicates increased optimization pressure on the model, requiring a shorter update cycle to accelerate the parameter update frequency. This ensures the coordination between training step size and training frequency, avoiding convergence delays or performance degradation caused by an imbalance in training rhythm. By automatically adjusting the update cycle, this invention achieves dynamic balance and intelligent closed-loop optimization in the training process. This not only enhances the model's ability to quickly adapt to new observation data but also ensures the real-time performance and stability of the intelligent monitoring system, improving the system's clinical practical value and ease of use.
[0118] Specifically, the optimization module shortens the update cycle based on the learning rate difference, including the following steps:
[0119] The optimization module determines the learning rate difference (LRD) based on the difference in learning rates when updating the monitoring model for mental patients before and after the correction.
[0120] The learning rate difference (LRD) is compared with a first preset learning rate difference (LRD1) and a second preset learning rate difference (LRD2), wherein the first preset learning rate difference (LRD1) is set to [0.000009, 0.000045], and the second preset learning rate difference (LRD2) is set to [0.000045, 0.00002].
[0121] If the learning rate difference LRD is less than or equal to the first preset learning rate difference LRD1, the optimization module uses a first duration correction threshold θ1 to correct the update cycle duration UP. The corrected update cycle duration UP' = UP × θ1, where the first duration correction threshold θ1 is set to 0.97.
[0122] If the learning rate difference LRD is greater than the first preset learning rate difference LRD1 and less than or equal to the second preset learning rate difference LRD2, then the optimization module uses a second duration correction threshold θ2 to correct the update cycle duration UP. The corrected update cycle duration UP' = UP × θ2, where the second duration correction threshold θ2 is set to 0.93.
[0123] If the learning rate difference LRD is greater than the second preset learning rate difference LRD2, the optimization module uses a third duration correction threshold θ3 to correct the update cycle duration UP. The corrected update cycle duration UP' = UP × θ3, where the third duration correction threshold θ3 is set to 0.88.
[0124] Furthermore, the optimization module is also used to determine the cycle difference based on the difference in the update cycle duration before and after the correction, and to increase the batch size when updating the mental patient monitoring model based on the cycle difference, wherein the increase in the batch size when updating the mental patient monitoring model is proportional to the cycle difference.
[0125] When the interval between model updates shortens and the number of updates increases, if the batch size for each update is not adjusted, the total number of parameter updates and the amount of computation during the overall training process will increase significantly, potentially leading to reduced training efficiency. Using a larger batch size allows for the processing of more samples in a single training iteration, improving parallel computing capabilities and reducing the overhead of frequent model update calls during training. The period difference reflects the degree of shortening of the update period, and the increase in batch size is proportional to this difference, thus coordinating the matching between training frequency and the amount of data processed per training iteration. By increasing the batch size, not only is the parallel efficiency of training improved and the computational overhead caused by frequent small batch updates reduced, but gradient estimation is also stabilized, enhancing the stability of the training process and the model convergence. This design achieves a dynamic balance between training rhythm and training quality, improves the system's intelligent control capabilities, and ensures that the system can still respond efficiently and stably to patients' emotional fluctuations even under high-frequency update conditions, enhancing the practicality and clinical value of the monitoring system.
[0126] Specifically, the process by which the optimization module increases the batch size during the update of the mental patient monitoring model based on the periodic difference includes:
[0127] The optimization module determines the cycle difference PD based on the difference in the update cycle duration before and after the correction.
[0128] The period difference PD is compared with a first preset period difference PD1 and a second preset period difference PD2, wherein the first preset period difference PD1 is set to [0.03, 0.15h] and the second preset period difference PD2 is set to (0.15, 0.3h].
[0129] If the period difference PD is less than or equal to the first preset period difference PD1, the optimization module uses the first batch size correction threshold З1 to correct the batch size BS when updating the mental patient monitoring model. Among them, the first batch size correction threshold З1=1.05 is set;
[0130] If the period difference PD is greater than the first preset period difference PD1 and less than or equal to the second preset period difference PD2, then the optimization module uses the second batch size correction threshold З2 to correct the batch size BS when updating the mental patient monitoring model. Among them, the second batch size correction threshold З2 is set to 1.11;
[0131] If the period difference PD is greater than the second preset period difference PD2, the optimization module uses a third batch size correction threshold З3 to correct the batch size BS during the update of the mental patient monitoring model. Among them, the third batch size correction threshold З3=1.2 is set.
[0132] Furthermore, the optimization module is also used to identify the fused observation data based on the modified mental patient monitoring model, and to determine the abnormality ratio based on the modified mental patient monitoring model, and to determine whether the identification of the mental patient monitoring model is qualified based on the modified abnormality ratio, and, if qualified, to maintain the system parameters and continue monitoring, or, if unqualified, to modify the compression ratio during compression and transmission based on the ratio of the preset completeness to the average completeness of the physiological data and the video data.
[0133] If the recognition performance is still unsatisfactory after multiple rounds of optimization and adjustment of the model parameters, the system further adjusts the compression ratio of the compressed data transmission by combining the anomaly ratio with the completeness of physiological and video data. This measure aims to improve the quality of input data, make up for information loss caused by factors such as poor network conditions, thereby ensuring that the model can obtain more complete and effective observation data, improve recognition accuracy, achieve adaptive closed-loop optimization, and enhance the robustness and practicality of the intelligent monitoring system.
[0134] Specifically, the optimization module's process for determining whether the mental patient monitoring model is qualified based on the corrected abnormality ratio includes:
[0135] After the optimization module corrects the mental patient monitoring model, it identifies the fused observation data and determines the abnormality rate PA' based on the corrected mental patient monitoring model;
[0136] If the abnormal percentage PA' is less than or equal to the preset abnormal percentage PA1, the optimization module determines that the mental patient monitoring model is qualified, and the optimization module maintains the system parameters and continues to monitor.
[0137] If the abnormal percentage PA' is less than or equal to the preset abnormal percentage PA1, the optimization module determines that the mental patient monitoring model identification is unqualified, and the optimization module corrects the compression ratio during compression and transmission based on the ratio of the preset completeness to the average completeness of the physiological data and the video data.
[0138] Furthermore, the optimization module is also used to determine data integrity based on the average of the physiological data and the video data integrity, and to determine a integrity ratio based on the ratio of the preset integrity to the data integrity, and to increase the compression ratio during compression and transmission based on the integrity ratio, wherein the increase in compression ratio is proportional to the integrity ratio.
[0139] The integrity ratio reflects the gap between the preset data integrity and the actual data integrity. When the ratio is large, it indicates that the data quality is insufficient. Based on this ratio, the compression ratio of the compressed data is dynamically increased, and the increase is proportional to the ratio. This can intelligently adjust the data compression level while ensuring transmission efficiency, avoid information loss due to excessive compression, achieve a balance between data quality and transmission efficiency, enhance the system's adaptability to network environment and data quality, and thus ensure the accuracy of model recognition and the stability and practicality of the monitoring system.
[0140] Specifically, the process by which the optimization module increases the compression ratio during compressed data transmission based on the integrity ratio includes:
[0141] The optimization module determines the data integrity DC based on the average of the physiological data and the video data integrity.
[0142] The optimization module determines the completeness ratio (DCR) based on the ratio of the preset completeness to the data completeness.
[0143] The data integrity ratio DCR is compared with the set first preset data integrity ratio DCR1 and second preset data integrity ratio DCR2, wherein the first preset data integrity ratio DCR1 is set to (1, 1.2] and the second preset data integrity ratio DCR2 is set to (1.2, 1.3].
[0144] If the data integrity ratio DCR is less than or equal to the first preset data integrity ratio DCR1, the optimization module uses the first compression correction threshold η1 to correct the compression ratio CR during compression and transmission. The corrected compression ratio CR' = CR × η1, where the first compression correction threshold η1 is set to 1.02.
[0145] If the data integrity ratio DCR is greater than the first preset data integrity ratio DCR1 and less than or equal to the second preset data integrity ratio DCR2, then the optimization module uses the second compression correction threshold η2 to correct the compression ratio CR during compression and transmission. The corrected compression ratio CR' = CR × η2, where the second compression correction threshold η2 is set to 1.05.
[0146] If the data integrity ratio DCR is greater than the second preset data integrity ratio DCR2, the optimization module uses the third compression correction threshold η3 to correct the compression ratio CR during compression and transmission. The corrected compression ratio CR' = CR × η3, where the third compression correction threshold η3 is set to 1.09.
[0147] Furthermore, the optimization module is also used to identify the fused observation data based on the modified mental patient monitoring model, and to determine the abnormality ratio based on the modified mental patient monitoring model, and to determine whether the identification by the mental patient monitoring model is qualified based on the modified abnormality ratio, and to maintain the system parameters and continue monitoring when qualified, or to determine that the acquisition module is malfunctioning when unqualified and to output a notification command.
[0148] If the model identification still fails after multiple rounds of parameter and compression adjustments, the system will determine that the acquisition module is malfunctioning. This design is based on the fact that the acquisition module is the key source of data quality, which can quickly locate faults, avoid blind optimization, improve the efficiency of problem diagnosis, ensure the accuracy of monitoring data and the reliability of system operation, and form a closed-loop fault detection and alarm mechanism that combines software and hardware, thereby enhancing the robustness and practicality of the intelligent monitoring system.
[0149] Specifically, the optimization module's process for determining whether the mental patient monitoring model is qualified based on the corrected abnormality ratio includes:
[0150] After the optimization module corrects the mental patient monitoring model, it identifies the fused observation data and determines the abnormality percentage PA based on the corrected mental patient monitoring model.
[0151] If the abnormal percentage PA" is less than or equal to the preset abnormal percentage PA1, the optimization module determines that the mental patient monitoring model is qualified, and the optimization module maintains the system parameters and continues to monitor.
[0152] If the abnormal percentage PA" is less than or equal to the preset abnormal percentage PA1, the optimization module determines that the mental patient monitoring model is unqualified, the optimization module determines that the acquisition module is malfunctioning, and outputs a notification command.
[0153] In summary, this invention addresses the clinical challenge of highly heterogeneous emotional expression among psychiatric patients by constructing a "medical record-driven personalized emotion monitoring closed-loop system." Starting with electronic medical records, the system automatically generates a monitoring model that matches the disease, its course, and individual signal characteristics. During operation, it uses real-time reasoning through physiological video fusion data and quantifies the reliability of the identification using the proportion of abnormalities. If the evaluation fails, the system sequentially performs a five-level progressive self-optimization process, adjusting the weighted loss function, learning rate, update cycle, batch size, and compression ratio until the output meets clinical confidence requirements. If it still fails, it automatically locates the fault in the acquisition module and issues an alarm. This closed-loop "medical record—model—parameter—hardware" chain enables the same hardware platform to continuously output high-precision, low-latency, and interpretable emotion monitoring results, overcoming the false alarm and missed alarm dilemmas caused by traditional fixed algorithms. This significantly enhances the practical value and universal applicability of intelligent emotion monitoring in psychiatry.
[0154] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.
Claims
1. A smart monitoring system for mood fluctuations in psychiatric patients based on machine learning algorithms, characterized in that, include, The acquisition module is used to collect patient physiological data and video data, compress them, and transmit them back. A preprocessing module, which is connected to the acquisition module, is used to preprocess the physiological data and the video data; An alignment module, which is connected to the preprocessing module, is used to align the physiological data with the video data; A fusion module, connected to the alignment module, is used to fuse the physiological data with the video data to obtain observation data; The medical record acquisition module is used to acquire the corresponding electronic medical record based on the patient, and to acquire the corresponding minimum emotional dwell time based on the corresponding disease in the electronic medical record; The model building module is connected to the medical record acquisition module and is used to acquire corresponding historical disease data based on the disease, and to train the unfrozen layer of the pre-trained emotion recognition model based on the neural network algorithm based on the historical disease data to obtain the mental patient monitoring model. A monitoring module, which is connected to the model building module and the fusion module, is used to identify the observation data in real time based on the mental patient monitoring model, and to issue a notification command when an emotional abnormality is detected. An optimization module, which is connected to the medical record acquisition model and the monitoring module, is used to determine whether the identification of the mental patient monitoring model is qualified based on the proportion of the sum of the times of each emotion stay shorter than the shortest emotion stay in the current cycle in the current cycle duration, and, when the determination is unqualified, to correct the acquisition parameters and / or update the parameters, or to issue a notification instruction. An update module, which is connected to the model building module and the fusion module, is used to periodically acquire the observation data and update the mental patient monitoring model based on the observation data. An adjustment module, which is connected to the optimization module, the acquisition module and the update module, is used to adjust the parameters of the corresponding module based on the instructions of the optimization module; The notification module, which is connected to the optimization module and the monitoring module, is used to output notifications based on notification instructions.
2. The intelligent monitoring system according to claim 1, characterized in that, The update module is used to periodically acquire the observation data, and to construct a target feature distribution based on the characteristics of the observation data, and to construct a historical feature distribution based on the characteristics of the historical disease data, and to construct a composite loss function based on the maximum mean difference between the target feature distribution and the reference feature distribution, and to determine the update freeze ratio based on the disease stage in the electronic medical record, and to freeze the mental patient monitoring model based on the update freeze ratio, and to train the unfrozen layer of the mental patient monitoring model based on the composite loss function, historical disease data and observation data to obtain the updated mental patient monitoring model; The update freeze ratio refers to the proportion of layers whose parameters remain unchanged when updating the mental patient monitoring model, in the total number of layers in the mental patient monitoring model. The shortest duration of emotional retention refers to the shortest time that the patient's corresponding disease-related emotions are maintained.
3. The intelligent monitoring system according to claim 2, characterized in that, The optimization module is also used to determine the abnormal percentage based on the proportion of the sum of the times when each emotion stays shorter than the shortest emotion stay in the current cycle within the current cycle duration, and to determine whether the identification of the mental patient monitoring model is qualified based on the abnormal percentage, and to maintain the system parameters and continue monitoring when qualified, or to adjust the weight of the composite loss function based on the ratio of the abnormal percentage to the preset abnormal percentage when unqualified.
4. The intelligent monitoring system according to claim 3, characterized in that, The optimization module is further configured to determine an anomaly ratio based on the ratio of the anomaly ratio to the preset anomaly ratio, and to increase the weight of the composite loss function based on the anomaly ratio, wherein the increase in the weight of the composite loss function is proportional to the anomaly ratio.
5. The intelligent monitoring system according to claim 4, characterized in that, The optimization module is also used to determine the loss weight difference based on the difference between the loss weights of the loss function before and after the correction, and to reduce the learning rate when updating the mental patient monitoring model based on the loss weight difference, wherein the reduction in the learning rate is proportional to the loss weight difference.
6. The intelligent monitoring system according to claim 5, characterized in that, The optimization module is also used to determine the learning rate difference based on the difference in learning rate when updating the monitoring model for mental patients before and after the correction, and to shorten the duration of the update cycle based on the learning rate difference, wherein the shortening of the update cycle duration is proportional to the learning rate difference.
7. The intelligent monitoring system according to claim 6, characterized in that, The optimization module is also used to determine the cycle difference based on the difference in the update cycle duration before and after the correction, and to increase the batch size when updating the mental patient monitoring model based on the cycle difference, wherein the increase in the batch size when updating the mental patient monitoring model is proportional to the cycle difference.
8. The intelligent monitoring system according to claim 7, characterized in that, The optimization module is also used to identify the fused observation data based on the modified mental patient monitoring model, and to determine the abnormality ratio based on the modified mental patient monitoring model, and to determine whether the identification of the mental patient monitoring model is qualified based on the modified abnormality ratio, and to maintain the system parameters and continue monitoring when qualified, or to modify the compression ratio during compression and transmission based on the ratio of the preset completeness to the average completeness of the physiological data and the video data when unqualified.
9. The intelligent monitoring system according to claim 8, characterized in that, The optimization module is also used to determine data integrity based on the average of the physiological data and the video data integrity, to determine a integrity ratio based on the ratio of the preset integrity to the data integrity, and to increase the compression ratio during compression and transmission based on the integrity ratio, wherein the increase in compression ratio is proportional to the integrity ratio.
10. The intelligent monitoring system according to claim 9, characterized in that, The optimization module is also used to identify the fused observation data based on the modified mental patient monitoring model, determine the abnormality rate based on the modified mental patient monitoring model, determine whether the identification by the mental patient monitoring model is qualified based on the modified abnormality rate, and maintain the system parameters and continue monitoring when qualified, or determine that the acquisition module is malfunctioning when unqualified and output a notification command.
Citation Information
Patent Citations
A method and system for detecting emotional fluctuations of mental patients
CN117370768B
