Intelligent ward system for psychiatric inpatients
Through multi-dimensional data collection and machine learning, emotion prediction models are constructed, combined with blockchain encryption and reinforcement learning, precise personalized management and safety intervention in the emotions of psychiatric patients is achieved, solving the shortcomings of traditional technologies and improving the quality of medical services.
Patent Information
- Application Number
- CN202510521417.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-08-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional psychiatric inpatient emotional management and psychological intervention technologies have problems such as insufficient 24/7 monitoring, strong subjectivity, lack of personalization, and data security risks, which are difficult to meet the needs of modern medical services.
The multi-dimensional data acquisition module, emotion prediction model construction module and intervention plan generation module are adopted, combined with machine learning, blockchain encryption and reinforcement learning technology, personalized emotion prediction and intervention plan push are realized, and real-time monitoring and intervention through intelligent terminals.
It improves the accuracy and personalization of emotional predictions, enhances data security, provides decision-making support for medical staff, guarantees patient privacy, and improves the quality of medical services.
Smart Images

Figure CN120412918A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical devices, and particularly to an intelligent ward system for inpatients in the department of psychiatry. Background Art
[0002] With the continuous progress of psychiatric medical technology and the increasing requirements of patients for the quality of medical services, the emotional management and psychological intervention of inpatients in the department of psychiatry have become key links in psychiatric treatment. Due to the particularity and complexity of the condition of inpatients in the department of psychiatry, their emotional states often fluctuate greatly, which is likely to affect the treatment effect and rehabilitation process of patients.
[0003] In traditional psychiatric treatment, the management and intervention of the emotions of inpatients mainly rely on the empirical judgment of medical staff and simple manual monitoring means. This method has many disadvantages: First, it is difficult for manual monitoring to achieve all-weather and non-missing tracking, and it is easy to miss key information on the emotional changes of patients. Second, empirical judgments are often subjective, lacking scientificity and accuracy. Third, traditional intervention means are single, lacking personalization and pertinence, and it is difficult to meet the needs of different patients. In addition, traditional technologies have security risks in the process of data collection, transmission, and storage, and the protection of patient privacy is insufficient, which is likely to lead to medical disputes and trust crises.
[0004] In summary, the traditional emotional management and psychological intervention technologies for inpatients in the department of psychiatry are no longer able to meet the needs of modern medical services. With the progress of technology and the improvement of patients' requirements for the quality of medical services, therefore, it is particularly important to develop an intelligent ward system for inpatients in the department of psychiatry. Summary of the Invention
[0005] The purpose of the present invention is to make up for the deficiencies of the existing technology and provide an intelligent ward system for inpatients in the department of psychiatry. It can comprehensively collect multi-dimensional data of patients, use advanced artificial intelligence technology for emotion prediction, generate personalized intervention plans according to the individual characteristics and historical data of patients, and ensure the security of data and the protection of patient privacy.
[0006] To solve the above technical problems, the present invention provides the following technical solution: An intelligent ward system for inpatients in the department of psychiatry, the system includes the following components: a multi-dimensional data collection module, a data transmission and storage module, an emotion prediction model construction module, and an intervention plan generation and push module;
[0007] The multi-dimensional data collection module: used to collect the behavioral data, physiological index data, and language expression data of patients;
[0008] The data transmission and storage module: It is used to transmit the data collected by the multi-dimensional data collection module to the central server for storage in real time;
[0009] The emotion prediction model construction module: Based on machine learning, an emotion prediction model is constructed, and the model is trained using the multi-dimensional data stored in the long term to predict the risk of emotional fluctuations of patients;
[0010] The intervention plan generation and push module; When the emotion prediction model predicts that a patient has a risk of emotional fluctuations, a personalized relaxation guidance and psychological intervention plan is generated according to the patient's individual characteristics and historical data, and is pushed to the patient through the intelligent terminal in the ward.
[0011] Furthermore, for the behavior data collection part in the multi-dimensional data collection module, a multi-modal fusion computer vision algorithm is adopted. Specifically: First, the video stream collected by the high-definition camera is frame-divided, and each frame image is denoted as I i , i = 1, 2, …, n. Through the improved Harris corner detection algorithm, the feature points P j in the image are extracted, j = 1, 2, …, m, and the gradient direction and amplitude of each feature point are calculated. For the analysis of the patient's walking trajectory, the Kalman filter algorithm is introduced. Its state transition equation is X k |k-1 = AX k-1|k-1 + Q k-1 , where X k |k-1 is the predicted state vector, A is the state transition matrix, Q k-1 is the process noise covariance matrix, the observation equation is Z k = HX k|k-1 + R k , Z k is the observation vector, H is the observation matrix, R k is the observation noise covariance matrix. By continuously iterating the Kalman filter, the walking trajectory of the patient in the ward is accurately tracked. For the analysis of the action frequency, the autoregressive moving average model in time series analysis is used. The model expression is where y t is the action frequency observation value at the current moment, φ i and θ j are the autoregressive coefficient and the moving average coefficient respectively, ∈ t-j is the white noise sequence. By training the ARMA model, the accurate action frequency characteristics are obtained, and then the emotional state of the patient is more accurately inferred.
[0012] Furthermore, in the physiological index acquisition part of the multi-dimensional data acquisition module, an adaptive threshold adjustment physiological signal acquisition algorithm is adopted. For heart rate acquisition, assuming the original heart rate signal collected is HR(t), first, wavelet transform is used for denoising. The wavelet transform formula is where f(t) is the original signal, ψ(t) is the wavelet basis function, a is the scale factor, b is the translation factor, and the denoised signal is HR d (t). Then, the heart rate abnormality is determined through the adaptive threshold algorithm. The calculation formula of the adaptive threshold T is T = μ + ασ, where μ is the mean value of the heart rate within a period of time, σ is the standard deviation, and α is a coefficient dynamically adjusted according to the historical heart rate fluctuation of the patient, which is determined by combining empirical values with machine learning algorithms. By performing cluster analysis on the heart rate data of the patient in the past week, the α value under different fluctuation degrees is determined. For physiological indexes such as blood pressure and skin conductance response, a similar adaptive threshold adjustment algorithm is also adopted, combined with wavelet transform denoising, to more accurately collect the physiological index data reflecting the patient's emotional changes.
[0013] Furthermore, in the language expression acquisition part of the multi-dimensional data acquisition module, a language feature extraction algorithm based on semantic sentiment analysis is used. First, the text recognized by the speech recognition system is segmented, and the text S is segmented into a word sequence w1, w2, …, w n , and then an improved word vector model is used to generate the vector representation of each word During its generation process, the position information of the word in the sentence is considered. By introducing the position weight matrix P, the word vector The update formula is where is the position vector. For semantic sentiment analysis, a classification model based on a convolutional neural network is adopted. The input is the word vector sequence of the text, and after passing through the convolutional layer, pooling layer, and fully connected layer, the sentiment classification result is output. The convolution operation formula of the convolutional layer is where c i,j is the convolution result, w m,n is the convolution kernel weight, x i +m,j+n is the input feature map, and b is the bias. Through this algorithm, the speech rate, intonation, and word-using characteristics of the patient's language are deeply analyzed to more accurately judge the patient's emotional state.
[0014] Furthermore, in the data transmission and storage module, data transmission adopts an encryption transmission algorithm based on blockchain. At the data sending end, the collected data is grouped, and each group of data is denoted as D i , and a hash operation is performed on each group of data. The hash value is denoted as H(D i) The hash algorithm adopted is a custom security hash algorithm SHA-Custom, and its operation process is as follows: For data D i Perform block processing, with the length of each block of data being L. Perform specific bit operations and logical operations on each block of data in sequence to obtain the final hash value H(D i ), and then package information such as the hash value, data, and timestamp into a blockchain transaction block and transmit it to the central server through the blockchain network. At the data receiving end, the server verifies the received transaction block. By recalculating the hash value and comparing it with the received hash value, the integrity and security of the data during transmission are ensured. At the same time, using the distributed ledger feature of the blockchain, the immutability of data transmission is guaranteed, improving the reliability of data transmission, and further providing a reliable data basis for subsequent emotion prediction and intervention.
[0015] Furthermore, in the emotion prediction model construction module, the constructed emotion prediction model adopts a recurrent neural network based on a multi-scale attention mechanism. The model input is a sequence of feature vectors F1, F2, …, F T obtained after feature extraction from multi-dimensional data. In the RNN network, the hidden layer state update formula is h t =σ(W ih F t +W hh h t-1 +b h ), where σ is the activation function, W ih is the weight matrix input to the hidden layer, W hh is the weight matrix from the hidden layer to the hidden layer, b h is the bias. The multi-scale attention mechanism performs convolution operations on the input features in the time dimension through convolution kernels of different scales to obtain feature representations of different scales. Let the convolution kernel sizes be k1, k2, k3 respectively, and the convolution feature representations be C1, C2, C3 respectively. The fused feature representation is obtained through the calculation of attention weights where α i is the attention weight, calculated through the softmax function, s i is the score obtained by processing C i through a fully connected layer. Through this multi-scale attention mechanism, the model can better capture the complex relationship between multi-dimensional data and the patient's emotions at different time scales, improving the accuracy of emotion prediction.
[0016] Furthermore, in the intervention plan generation and push module, the generation of personalized relaxation guidance and psychological intervention plans adopts a recommendation algorithm based on reinforcement learning. First, a state space S is constructed. The state consists of the current emotion prediction result of the patient, historical emotion data, and personal preference information, denoted as s t , and the action space A is various preset relaxation guidance and psychological intervention plans, denoted as a i , i = 1, 2, …, k, and the reward function R(s t , a t ) is set according to the emotional improvement of the patient after receiving the intervention plan. If the patient's emotion is significantly improved, a higher reward is given. If there is no obvious change in the emotion, the reward value is 0. If the emotion deteriorates, the reward value is -3. By continuously making action selections and state transitions in the state space, the Q-value is updated using the Q-learning algorithm. The Q-value update formula is where α is the learning rate and γ is the discount factor. After a large number of trainings, the optimal intervention plan recommendation strategy is obtained, so as to generate a more effective personalized intervention plan according to the real-time state of the patient.
[0017] Furthermore, the intelligent ward system also includes a medical staff auxiliary decision-making module. This module analyzes the results of the emotion prediction model and the implementation effect of the intervention plan to provide decision-making support for medical staff. For the emotion prediction result, visualization technology is used to display the emotion risk trend of the patient in the form of a chart. For the analysis of the implementation effect of the intervention plan, by comparing the changes in multi-dimensional data of the patient before and after receiving the intervention, such as the changes in heart rate, blood pressure, and behavioral action frequency before and after receiving music relaxation intervention, the improvement rate is calculated. The improvement rate calculation formula is: Based on these analysis results, medical staff can more intuitively understand the changes in the patient's condition, adjust the treatment plan in a timely manner, and improve the quality of medical services.
[0018] Furthermore, the intelligent ward system is equipped with a patient privacy protection module. During the data collection process, data involving patient privacy is encrypted. For video data, a homomorphic encryption algorithm is used to perform operations such as feature extraction on the video in the encrypted state. The homomorphic encryption algorithm allows specific operations to be performed on ciphertext, and its operation result is the same as the result obtained by performing the same operation on plaintext and then encrypting it. Let the encryption function be E() and the decryption function be D(). For a video image I, the encrypted image is E(I). Feature extraction operation f(E(I)) is performed on the encrypted image to obtain the encrypted feature result E(F), and then the feature result F = D(E(F)) is obtained through the decryption function. For physiological index data and language expression data, an attribute-based encryption method is adopted. Different attributes are set according to the sensitivity of the data and access permissions. Only authorized personnel with the corresponding attribute private key can decrypt the data. Through these privacy protection measures, while ensuring the realization of the functions of the intelligent ward system, the privacy and security of patients are fully protected.
[0019] Compared with the prior art, the intelligent ward system for psychiatric inpatients has the following beneficial effects:
[0020] First, through the multi-dimensional data collection module, the system comprehensively collects the patient's behavior data, physiological index data, and language expression data, and uses the emotion prediction model constructed by machine learning for long-term training to accurately predict the risk of patient emotion fluctuations. At the same time, the intervention plan generation and push module generates personalized relaxation guidance and psychological intervention plans according to the patient's individual characteristics and historical data, and pushes them to the patient in real time through the intelligent terminal in the ward, thereby improving the accuracy and personalization level of emotion prediction and intervention.
[0021] Second, through the medical staff assistant decision-making module, the system provides comprehensive decision-making support for medical staff. This module deeply analyzes the results of the emotion prediction model and the implementation effect of the intervention plan, intuitively displays the patient's emotion risk trend in the form of a chart, and calculates the improvement rate to help medical staff better understand the patient's condition changes and adjust the treatment plan in a timely manner. In addition, the system is also equipped with a patient privacy protection module, which takes strict encryption measures in all aspects of data collection, transmission, and storage to ensure the privacy and security of patients, enhancing the trust and sense of security of patients and medical staff.
[0022] Other advantages, objectives, and features of the present invention will be described to some extent in the subsequent specification, and to some extent, will be obvious to those skilled in the art based on the study of the following text, or can be learned from the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0024] Figure 1 It is a functional implementation flowchart of an intelligent ward system for psychiatric inpatients;
[0025] Figure 2 It is an overall architecture flowchart of an intelligent ward system for psychiatric inpatients. Detailed implementation manners
[0026] To further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following will, in conjunction with the accompanying drawings and preferred embodiments, describe in detail the specific implementation manners, structures, features, and effects of the present invention as follows.
[0027] Embodiment 1
[0028] This embodiment describes that in a certain psychiatric ward, patient A moves around in the ward daily, and the intelligent ward system starts all-round monitoring, and the multi-dimensional data acquisition module collects various types of information in real time.
[0029] In terms of behavior data, a high-definition camera captures a video stream and performs frame-by-frame processing (each frame image is denoted as I i ), uses an improved Harris corner detection algorithm to extract feature points P j , and calculates the gradient direction and amplitude. The Kalman filter algorithm (the state transition equation is X k|k-1 = AX k-1|k-1 + Q k-1 , and the observation equation is Z k = HX k|k-1 + R k ) is used to track the walking trajectory of the patient, and the autoregressive moving average model is used to analyze the action frequency. When collecting physiological index data, the original heart rate signal HR(t) is denoised by wavelet transform to obtain HR d (t), and then the abnormal heart rate situation is judged by the adaptive threshold algorithm (T = μ + ασ). Similar methods are used for blood pressure and skin conductance response indicators. When collecting language expression data, the speech recognition text is segmented into w1, w2,..., w n , and an improved word vector model (considering position information, the update formula is ) is used to generate vector representations, and a classification model based on a convolutional neural network (the convolution operation formula is Perform semantic sentiment analysis.
[0030] The collected data is grouped (each group of data is denoted as D i ), and is hashed through a custom secure hash algorithm SHA-Custom (obtaining a hash value H(D i )), and the hash value, data, and timestamp are packaged into a blockchain transaction block and transmitted to the central server for storage through the blockchain network.
[0031] The emotion prediction model construction module uses a recurrent neural network based on a multi-scale attention mechanism, and inputs a multi-dimensional data feature vector sequence. The hidden layer state update formula in the RNN network is h t =σ(W ih F t +W hh h t-1 +b h ). The multi-scale attention mechanism obtains feature representations C1, C2, C3 through convolution with different scale convolutional kernels (sizes are k1, k2, k3 respectively), and the fused feature representation is (where s i is the score obtained by processing C i through a fully connected layer), and based on this, the risk of the patient's emotional fluctuations is predicted. If it is predicted that patient A has a risk of emotional fluctuations, the intervention plan generation and push module, based on the recommendation algorithm of reinforcement learning, constructs a state space (composed of the current emotion prediction result, historical emotion data, and personal preference information, denoted as s t ) and an action space (preset relaxation guidance and psychological intervention plans, denoted as a i ), according to the reward function (set according to the improvement of the emotion, a higher reward is given for obvious improvement, the reward value is 0 for no obvious change, and the reward value is -3 for deterioration), and uses the Q-learning algorithm (the Q-value update formula is ) to generate a personalized relaxation guidance and psychological intervention plan, and push it to patient A through the intelligent terminal in the ward.
[0032] Example 2
[0033] This example describes that in a certain psychiatric ward, there is a patient named Xiao Wang with bipolar disorder. In the ward, the multi-dimensional data collection module is always in a working state, collecting all kinds of data of Xiao Wang in an all-round way.
[0034] In terms of behavioral data collection, a high-definition camera constantly captures every move of Xiao Wang. Using computer vision algorithms with multi-modal fusion, the captured video stream is frame-processed. Each frame of the image becomes the basis for analysis. Through an improved Harris corner detection algorithm, feature points in the image are accurately extracted. Based on this, the Kalman filtering algorithm starts to function. The algorithm iterates continuously to precisely track Xiao Wang's walking trajectory in the ward. At this time, the system monitors that Xiao Wang's walking trajectory becomes chaotic and disorderly, no longer normal pacing or activities. At the same time, his movement frequency also shows abnormalities, manifested as large-scale and high-frequency movements, such as frequently waving his arms and pacing back and forth rapidly.
[0035] In the part of physiological index collection, an adaptive threshold adjustment physiological signal collection algorithm is adopted. After the device for monitoring heart rate collects the original heart rate signal, it first performs denoising processing through wavelet transform to remove interference signals and obtain more accurate heart rate data. Then, the adaptive threshold algorithm starts to work. By calculating the mean and standard deviation of the heart rate over a period of time and combining with a coefficient dynamically adjusted according to Xiao Wang's historical heart rate fluctuations, it judges whether the heart rate is abnormal. At this time, it is found that Xiao Wang's heart rate has increased significantly compared to usual. Moreover, the collection processes of other physiological indexes such as blood pressure and skin conductance response are similar. After processing and analysis, it is found that Xiao Wang's blood pressure has risen sharply and the skin conductance response has also shown abnormalities, all of which indicate that his body is in a highly tense state.
[0036] In the part of language expression collection, when Xiao Wang communicates with medical staff or other patients, the speech recognition system converts his words into text. Subsequently, a language feature extraction algorithm based on semantic sentiment analysis starts to work. It performs word segmentation on the text, splitting it into a sequence of words. Using an improved word vector model, during the process of generating the vector representation of each word, it fully considers the position information of the word in the sentence and updates the vector by introducing a position weight matrix. Finally, a classification model based on a convolutional neural network is used for semantic sentiment analysis. The results show that Xiao Wang's words are full of anger and anxiety emotions, such as he frequently complains and his speech is aggressive.
[0037] These multi-dimensional data collected are transmitted to the central server for storage in real time and securely through an encryption transmission algorithm based on blockchain. The data is grouped at the sending end, and each group of data undergoes a hashing operation. A custom secure hash algorithm SHA-Custom is used. The operation process includes block processing of the data and specific bit operations and logical operations to obtain a hash value. The hash value, data, and timestamp information are packaged into a blockchain transaction block and transmitted to the central server through the blockchain network. At the receiving end, the server uses the distributed ledger feature of the blockchain to verify the received transaction block, recalculates the hash value and compares it with the received hash value to ensure the integrity and security of the data.
[0038] The emotion prediction model construction module uses a recurrent neural network based on a multi-scale attention mechanism. This model takes the sequence of feature vectors after feature extraction from multi-dimensional data as input. In the RNN network, the hidden layer state is updated according to a specific formula. The multi-scale attention mechanism performs convolution operations on the input features in the time dimension through convolution kernels of different scales to obtain feature representations of different scales, and then calculates the fused feature representation through attention weights. After training with long-term stored multi-dimensional data, the model can accurately predict the risk of the patient's emotional fluctuations. At this time, the model determines that Xiao Wang has a high risk of deteriorating condition and emotional out-of-control.
[0039] After receiving the warning from the emotion prediction model, the intervention plan generation and push module immediately starts the generation process of the emergency intervention plan. This module uses a recommendation algorithm based on reinforcement learning to construct a state space and an action space. The state space consists of Xiao Wang's current emotion prediction result, historical emotion data, and personal preference information, and the action space is various preset relaxation guidance and psychological intervention plans. The reward function is set according to the improvement of Xiao Wang's emotion after receiving the intervention plan. In this emergency situation, the intervention plan generation and push module quickly generates an emergency intervention plan. On the one hand, it pushes an emergency psychological comfort audio to Xiao Wang through the intelligent terminal in the ward. The audio content is carefully designed, including soothing music and gentle guiding words, to try to stabilize his emotion. On the other hand, it sends an alarm to the medical staff assistance decision-making module, detailing Xiao Wang's abnormal situation and risk level.
[0040] After receiving the alarm, the medical staff assistance decision-making module quickly processes the information. Through visualization technology, it displays the emotional risk trend of Xiao Wang in the form of a chart, enabling medical staff to intuitively see the sharp rise in risk. At the same time, this module deeply analyzes Xiao Wang's multi-dimensional data, compares the changes in various data before and after the abnormality, and combines this information. The medical staff quickly responds and arranges experienced medical staff to go to the ward for on-site intervention. After the medical staff arrives at the ward, according to Xiao Wang's actual situation, they use professional psychological counseling skills and necessary medical measures to successfully relieve his emotion, avoiding possible self-harm or harming behaviors and ensuring the safety of other patients and medical staff in the ward. Throughout the process, the patient privacy protection module strictly implements privacy protection measures. The video data uses a homomorphic encryption algorithm to perform operations such as feature extraction on the video in the encrypted state to ensure the security of the video data during the processing. The physiological index data and language expression data use an attribute-based encryption method, setting different attributes according to the sensitivity of the data and access rights. Only authorized personnel with the corresponding attribute private keys can decrypt the data, fully protecting Xiao Wang's privacy.
[0041] The above are only the preferred embodiments of the present invention, and do not impose any form of limitation on the present invention. Although the present invention has been disclosed above with the preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some changes or modifications to the equivalent embodiments of equivalent changes within the scope of the technical solution of the present invention. However, as long as it does not depart from the content of the technical solution of the present invention, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solution of the present invention.
Claims
1. An intelligent ward system for psychiatric inpatients, characterized in that, The system includes the following components: a multi-dimensional data acquisition module, a data transmission and storage module, an emotion prediction model construction module, and an intervention plan generation and push module; The multi-dimensional data acquisition module: is used to collect the patient's behavioral data, physiological index data, and language expression data; The data transmission and storage module: is used to transmit the data collected by the multi-dimensional data acquisition module to the central server for storage in real time; The emotion prediction model construction module: constructs an emotion prediction model based on machine learning, and uses the long-term stored multi-dimensional data to train the model to predict the risk of patient emotion fluctuations; The intervention plan generation and push module; When the emotion prediction model predicts that the patient has a risk of emotion fluctuations, a personalized relaxation guidance and psychological intervention plan is generated according to the patient's individual characteristics and historical data, and is pushed to the patient through the intelligent terminal in the ward.
2. The intelligent ward system for psychiatric inpatients according to claim 1, characterized in that, In the behavior data acquisition part of the multi-dimensional data acquisition module, a computer vision algorithm based on multi-modal fusion is adopted. Specifically: First, the video stream collected by the high-definition camera is frame-divided, and each frame of image is denoted as I i , and feature points P in the image are extracted through an improved Harris corner detection algorithm j . And the gradient direction and amplitude of each feature point are calculated. For the analysis of the patient's walking trajectory, the Kalman filter algorithm is introduced, and its state transition equation is X k |k-1 = AX k-1|k-1 +Q k-1 , where X k |k-1 is the predicted state vector, A is the state transition matrix, and Q k-1 is the process noise covariance matrix. The observation equation is Z k = HX k|k-1 +R k , Z k is the observation vector, H is the observation matrix, and R k is the observation noise covariance matrix. By continuously iterating the Kalman filter, the walking trajectory of the patient in the ward is accurately tracked. For the analysis of action frequency, the autoregressive moving average model in time series analysis is used, and the model expression is where y t is the action frequency observation value at the current moment, φ i and θ j are the autoregressive coefficient and the moving average coefficient respectively, and ∈ t-j is a white noise sequence.
3. The intelligent ward system for psychiatric inpatients according to claim 1, characterized in that In the physiological index acquisition part of the multi-dimensional data acquisition module, an adaptive threshold adjustment physiological signal acquisition algorithm is adopted. For heart rate acquisition, assuming the original heart rate signal collected is HR(t), first, wavelet transform is used for denoising. The wavelet transform formula is where f(t) is the original signal, ψ(t) is the wavelet basis function, a is the scale factor, b is the translation factor, and the denoised signal is HR d (t). Then, the heart rate abnormality is determined through the adaptive threshold algorithm. The calculation formula of the adaptive threshold T is T = μ + ασ, where μ is the mean value of the heart rate within a period of time, σ is the standard deviation, and α is a coefficient dynamically adjusted according to the historical heart rate fluctuation of the patient. For physiological indexes such as blood pressure and skin electrical response, a similar adaptive threshold adjustment algorithm is also adopted, combined with wavelet transform denoising.
4. The intelligent ward system for psychiatric inpatients according to claim 1, characterized in that, In the language expression acquisition part of the multi-dimensional data acquisition module, using the language feature extraction algorithm based on semantic sentiment analysis, first perform word segmentation on the text recognized by the speech recognition system, and divide the text S into a word sequence w1, w2, …, w n , and then use the improved word vector model to generate the vector representation of each word During its generation process, consider the position information of the word in the sentence. By introducing the position weight matrix P, the word vector The update formula is where is the position vector. For semantic sentiment analysis, adopt a classification model based on a convolutional neural network. The input is the word vector sequence of the text. After passing through the convolutional layer, pooling layer and fully connected layer, the sentiment classification result is output. The convolution operation formula of the convolutional layer is where c i,j is the convolution result, w m,n is the convolution kernel weight, x i +m,j+n is the input feature map, and b is the bias.
5. An intelligent ward system for psychiatric inpatients according to claim 1, characterized in that, In the data transmission and storage module, data transmission adopts an encryption transmission algorithm based on blockchain. At the data sending end, the collected data is grouped, and each group of data is denoted as D i , a hash operation is performed on each group of data, and the hash value is denoted as H(D i ). The hash algorithm adopted is a custom security hash algorithm SHA-Custom, and its operation process is as follows: the data D i is block-processed, the length of each block of data is L, and specific bit operations and logical operations are sequentially performed on each block of data to obtain the final hash value H(D i ). Then, information such as the hash value, data, and timestamp is packaged into a blockchain transaction block and transmitted to the central server through the blockchain network. At the data receiving end, the server verifies the received transaction block by recalculating the hash value and comparing it with the received hash value.
6. The intelligent ward system for psychiatric inpatients according to claim 1, characterized in that, In the emotion prediction model construction module, the constructed emotion prediction model adopts a recurrent neural network based on a multi-scale attention mechanism. The model input is a sequence of feature vectors F1, F2, …, F after feature extraction from multi-dimensional data T , in the RNN network, the hidden layer state update formula is h t = σ(W ih F t + W hh h t-1 + b h ), where σ is the activation function, W ih is the weight matrix input to the hidden layer, W hh is the weight matrix from the hidden layer to the hidden layer, b h is the bias. The multi-scale attention mechanism performs convolution operations on the input features in the time dimension through convolution kernels of different scales to obtain feature representations of different scales. Let the convolution kernel sizes be k1, k2, k3 respectively, and the convolution feature representations be C1, C2, C3 respectively. The fused feature representation is obtained through attention weight calculation where α i is the attention weight, s i is the score obtained by processing C i through a fully connected layer 7. An intelligent ward system for psychiatric inpatients according to claim 1, characterized in that, In the intervention plan generation and push module, the generation of personalized relaxation guidance and psychological intervention plans adopts a recommendation algorithm based on reinforcement learning. First, a state space S is constructed. The state consists of the current emotion prediction result of the patient, historical emotion data, and personal preference information, denoted as s t , and the action space A is various preset relaxation guidance and psychological intervention plans, denoted as a i , and the reward function R(s t , a t ) is set according to the improvement of the patient's emotion after receiving the intervention plan. By continuously making action selections and state transitions in the state space, the Q-value is updated using the Q-learning algorithm. The Q-value update formula is where α is the learning rate and γ is the discount factor.
8. An intelligent ward system for psychiatric inpatients according to claim 1, characterized in that, The intelligent ward system also includes a decision-making assistance module for medical staff. This module analyzes the results of the emotion prediction model and the implementation effects of the intervention plan to provide decision-making support for medical staff. For the emotion prediction results, visualization technology is used to display the patient's emotion risk trend in the form of a chart. For the analysis of the implementation effects of the intervention plan, by comparing the changes in multi-dimensional data of the patient before and after receiving the intervention, such as the changes in heart rate, blood pressure, and behavioral action frequency before and after receiving music relaxation intervention, the improvement rate is calculated. The formula for calculating the improvement rate is:
9. The intelligent ward system for psychiatric inpatients according to claim 1, characterized in that, The intelligent ward system is equipped with a patient privacy protection module. During the data acquisition process, data involving patient privacy is encrypted. For video data, a homomorphic encryption algorithm is used to perform operations such as feature extraction on the video in the encrypted state. The homomorphic encryption algorithm allows specific operations to be performed on ciphertext, and its operation result is the same as the result after performing the same operation on plaintext and then encrypting. Let the encryption function be E(), and the decryption function be D(). For video image I, the encrypted image is E(I). Feature extraction operation f(E(I)) is performed on the encrypted image to obtain the encrypted feature result E(F), and then the feature result F = D(E(F)) is obtained through the decryption function. For physiological index data and language expression data, an attribute-based encryption method is used. Different attributes are set according to the sensitivity and access rights of the data, and only authorized personnel with the corresponding attribute private key can decrypt the data.