Mental health monitoring method and system based on artificial intelligence

By introducing artificial intelligence technologies such as multi-source sensor networks, environmental context reasoning engines, Bayesian causal inference models and graph attention networks into the mental health monitoring system, the shortcomings of real-time dynamic monitoring of psychological states in the existing technology are solved, and effective analysis and adaptation to environmental factors and individual differences are achieved, and the accuracy and reliability of mental health monitoring are improved.

CN120048490AActive Publication Date: 2025-05-27PUYANG VOCATIONAL & TECHN COLLEGE

Patent Information

Application Number
CN202510177666.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-05-27
Estimated Expiration
2045-02-18

AI Technical Summary

Technical Problem

Existing mental health monitoring technologies are difficult to achieve real-time dynamic monitoring of psychological states, ignore the impact of environmental factors on psychological states, cannot adapt to individual differences, and lack effective fusion mechanisms for multi-source heterogeneous data.

Method used

Adopting a mental health monitoring method and system based on artificial intelligence, environmental parameters are collected in real time through a multi-source sensor network, scene recognition is performed using an environmental context inference engine, and environment-behavior interaction analysis and multi-dimensional feature fusion are carried out, environmental adaptive baseline model is constructed, and psychological state evaluation is performed through a multi-level anomaly detector.

Benefits of technology

Accurate real-time monitoring of mental health status is achieved, the ability to analyze environmental factors is enhanced, the monitoring deviation caused by individual differences is reduced, the deep fusion of multi-source heterogeneous data is achieved, and the accuracy and reliability of psychological status assessment is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120048490A_ABST
    Figure CN120048490A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and discloses a mental health monitoring method and system based on artificial intelligence. The method comprises the following steps: acquiring environmental parameters through a multi-source sensor network, and identifying scene features through an environmental context inference engine; according to the environmental features, extracting physiological features by adopting an adaptive algorithm; analyzing an environment and behavior relationship by using a Bayesian model; fusing the multi-dimensional features through a graph attention network; constructing an environment adaptive baseline based on transfer learning; and evaluating a psychological state and outputting an early warning in combination with multi-level anomaly detection. According to the method and the device, the psychological health state of the user can be accurately monitored in real time under the condition of considering the dynamic change of the environment, and the monitoring deviation caused by individual difference is overcome.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, and particularly to a mental health monitoring method and system based on artificial intelligence. Background Art

[0002] In the existing mental health monitoring technologies, methods such as questionnaire assessment, interview diagnosis, and physiological index monitoring are mainly adopted. Questionnaire assessment collects subjective perception data through standardized scales; interview diagnosis relies on professionals for status assessment; physiological index monitoring uses wearable devices to collect physiological data such as heart rate, electroencephalogram, and galvanic skin response. These methods analyze data from a single dimension or multiple dimensions to evaluate an individual's mental health status. At the same time, some monitoring systems have begun to introduce artificial intelligence technologies, using machine learning algorithms to process and analyze the monitoring data and establish a mental state assessment model.

[0003] However, the existing technologies still have the following deficiencies: Traditional methods mostly adopt a static assessment mode and are difficult to achieve real-time dynamic monitoring of mental states; secondly, existing monitoring systems generally ignore the impact of environmental factors on mental states and cannot accurately identify and compensate for the interference caused by environmental changes; thirdly, due to significant individual differences, general assessment criteria are difficult to adapt to the characteristics of different users and are prone to assessment biases; fourthly, existing technologies lack an effective fusion mechanism for multi-source heterogeneous data and are difficult to comprehensively analyze multi-dimensional data such as environment, physiology, and behavior. Summary of the Invention

[0004] This application provides a mental health monitoring method and system based on artificial intelligence, which is used to achieve accurate real-time monitoring of the user's mental health status considering the dynamic changes of the environment and overcome the monitoring biases caused by individual differences.

[0005] In a first aspect, the present application provides a mental health monitoring method based on artificial intelligence. The mental health monitoring method based on artificial intelligence includes: collecting environmental parameters in real time through a multi-source sensing network, performing scene recognition processing through an environmental context inference engine to obtain environmental semantic feature data; extracting features and modeling individual differences of multi-dimensional physiological signals through an environmental adaptive signal processing algorithm according to the environmental semantic feature data to obtain a personalized physiological feature vector after environmental compensation; using the environmental semantic feature data and the personalized physiological feature vector to perform environmental-behavior interaction analysis through a Bayesian causal inference model and output environmental-behavior association features; inputting the environmental-behavior association features and the personalized physiological feature vector into a graph attention network, performing multi-dimensional feature fusion through an environmental conditional gating mechanism to generate a dynamic feature representation; constructing sub-baselines for different environmental types by a hierarchical baseline transfer learning module according to the dynamic feature representation to obtain an environment-adaptive baseline model; evaluating the mental state through a multi-level anomaly detector based on the environment-adaptive baseline model, and outputting a warning signal through an environmental constraint anomaly scoring mechanism.

[0006] In a second aspect, the present application provides a mental health monitoring system based on artificial intelligence. The mental health monitoring system based on artificial intelligence includes: A collection module, configured to collect environmental parameters in real time through a multi-source sensing network, perform scene recognition processing through an environmental context inference engine to obtain environmental semantic feature data; A modeling module, configured to extract features and model individual differences of multi-dimensional physiological signals through an environmental adaptive signal processing algorithm according to the environmental semantic feature data to obtain a personalized physiological feature vector after environmental compensation; An analysis module, configured to use the environmental semantic feature data and the personalized physiological feature vector to perform environmental-behavior interaction analysis through a Bayesian causal inference model and output environmental-behavior association features; An input module, configured to input the environmental-behavior association features and the personalized physiological feature vector into a graph attention network, perform multi-dimensional feature fusion through an environmental conditional gating mechanism to generate a dynamic feature representation; A construction module, configured to construct sub-baselines for different environmental types by a hierarchical baseline transfer learning module according to the dynamic feature representation to obtain an environment-adaptive baseline model; An evaluation module, configured to evaluate the mental state through a multi-level anomaly detector based on the environment-adaptive baseline model, and output a warning signal through an environmental constraint anomaly scoring mechanism.

[0007] In the technical solution provided by this application, by collecting environmental parameters in real time through a multi-source sensing network and performing scene recognition processing through an environmental context inference engine, it is possible to comprehensively perceive and analyze the impact of environmental changes on mental states, effectively improving the accuracy and integrity of environmental factor analysis. The environmental adaptive signal processing algorithm extracts features from multi-dimensional physiological signals and models individual differences, solving the problem of insufficient environmental interference compensation in traditional methods and significantly enhancing the anti-interference ability of physiological feature extraction. The Bayesian causal inference model is used for environmental-behavior interaction analysis, establishing a causal association mapping between environmental changes and behavioral responses, and enhancing the interpretability of behavioral feature analysis. The environmental-behavior association features and personalized physiological feature vectors are input into the graph attention network, and multi-dimensional feature fusion is performed through an environmental condition gating mechanism, realizing the deep fusion of multi-source heterogeneous data and overcoming the problem of information loss in traditional feature fusion methods. The hierarchical baseline transfer learning module constructs sub-baselines for different environmental types, solving the problem of baseline shift caused by environmental changes and improving the adaptability of the baseline model to environmental changes. The multi-level anomaly detector combines an environmental constraint anomaly scoring mechanism to achieve multi-dimensional assessment of mental states and reduce the false alarm rate caused by environmental interference. The artificial intelligence algorithms in the overall solution are optimized and designed for the specific needs of mental health monitoring, including innovative points such as the attention mechanism for environmental perception, the graph structure representation of multi-modal data, and personalized modeling based on transfer learning. These algorithm features significantly improve the performance and reliability of the solution in practical applications. Through the synergistic effect of algorithms and models, the problem of mental health monitoring under dynamic environmental changes is effectively solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for description in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0009] Figure 1 FIG. is a schematic diagram of an embodiment of the artificial intelligence-based mental health monitoring method in the embodiments of this application; Figure 2 FIG. is a timing diagram of real-time collection of environmental parameters through a multi-source sensing network and scene recognition processing through an environmental context inference engine in the embodiments of this application; Figure 3 FIG. is a schematic diagram of the initial feature map structure in the embodiments of this application; Figure 4 FIG. is a schematic diagram of an embodiment of the artificial intelligence-based mental health monitoring system in the embodiments of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0010] An embodiment of the present application provides a mental health monitoring method and system based on artificial intelligence. Terms such as "first", "second", "third", "fourth", etc. (if any) in the specification, claims, and the above-mentioned drawings of the present application are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data used can be interchanged under appropriate circumstances so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the term "including" or "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0011] For ease of understanding, the specific process of the embodiment of the present application will be described below. Please refer to Figure 1 , an embodiment of the mental health monitoring method based on artificial intelligence in the embodiment of the present application includes: Step S101: Real-time collect environmental parameters through a multi-source sensing network, and perform scene recognition processing through an environmental context inference engine to obtain environmental semantic feature data; Step S102: Extract features and model individual differences of multi-dimensional physiological signals through an environmental adaptive signal processing algorithm according to the environmental semantic feature data, and obtain a personalized physiological feature vector after environmental compensation; Step S103: Use the environmental semantic feature data and the personalized physiological feature vector to perform environmental-behavior interaction analysis through a Bayesian causal inference model, and output environmental-behavior association features; Step S104: Input the environmental-behavior association features and the personalized physiological feature vector into a graph attention network, and perform multi-dimensional feature fusion through an environmental conditional gating mechanism to generate a dynamic feature representation; Step S105: According to the dynamic feature representation, a sub-baseline is constructed for different environmental types by a hierarchical baseline transfer learning module to obtain an environment-adaptive baseline model; Step S106: Based on the environment-adaptive baseline model, evaluate the mental state through a multi-level anomaly detector, and output a warning signal through an environment-constrained anomaly scoring mechanism.

[0012] It can be understood that the execution entity of the present application can be a mental health monitoring system based on artificial intelligence, or a terminal or a server. Specifically, it is not limited here. An embodiment of the present application will be described by taking the server as the execution entity as an example.

[0013] Specifically, environmental parameters are collected in real time through a multi-source sensing network. The multi-source sensing network consists of a temperature sensor, a humidity sensor, a light sensor, a noise sensor, and an air quality sensor, and the collection frequency is 1 Hz. After the environmental parameter collection is completed, it is processed by an environmental context inference engine for scene recognition. The environmental context inference engine standardizes the collected parameters, maps the temperature value to the range of 0-1, converts the humidity value to a relative humidity percentage, converts the light intensity to a lumen value, converts the noise to a decibel value, and dimensionlessizes the air quality index. Through environmental semantic analysis, the characteristics of different scenarios such as office, home, and outdoors are extracted to generate environmental semantic feature data.

[0014] For the collected environmental semantic feature data, an environmental adaptive signal processing algorithm is used to extract features and model individual differences of multi-dimensional physiological signals. The multi-dimensional physiological signals include electrocardiogram (ECG) signals, electroencephalogram (EEG) signals, skin conductance (SC) signals, and respiratory signals. The sampling frequency of the ECG signal is 250 Hz, the sampling frequency of the EEG signal is 1000 Hz, the sampling frequency of the SC signal is 50 Hz, and the sampling frequency of the respiratory signal is 20 Hz. The signals are preprocessed for noise reduction to remove power frequency interference and baseline drift. Then, according to the environmental semantic feature data, adaptive filtering is performed according to the signal characteristics in different environments to extract the physiological characteristics of an individual in a specific environment. For the ECG signal, the RR interval and heart rate variability parameters are extracted; for the EEG signal, the energy characteristics of the α, β, θ, and δ bands are extracted; for the SC signal, the conductance level and response amplitude are extracted; for the respiratory signal, the respiratory frequency and depth parameters are extracted. Through individual difference modeling, these features are compared with historical data to establish a personalized parameter mapping relationship, and a personalized physiological feature vector after environmental compensation is obtained. Based on the environmental semantic feature data and the personalized physiological feature vector, an environmental-behavior interaction analysis is performed through a Bayesian causal inference model. The Bayesian causal inference model analyzes the influence path of environmental changes on an individual's physiological and behavioral states by constructing a conditional probability network. The environmental semantic feature data is divided according to time windows, and the environmental state transition probability matrix is calculated. At the same time, a time series analysis is performed on the personalized physiological feature vector to extract the behavioral response pattern. Through conditional probability calculation, the causal association strength between environmental changes and behavioral responses is obtained, and environmental-behavior association features are output.

[0015] Input the environment-behavior association features and personalized physiological feature vectors into the graph attention network, and perform feature fusion through the environmental condition gating mechanism. The graph attention network constructs a feature map structure, represents different features as nodes in the graph, and represents the association between features as edges. Calculate the importance weights of each node through the attention mechanism to achieve dynamic selection of features. The environmental condition gating mechanism adjusts the strength of feature connections according to the current environmental conditions, so as to highlight the role of key features in different environments. Through feature propagation and aggregation, multi-dimensional features are fused into a unified representation form to generate dynamic feature representations. Based on the dynamic feature representations, the hierarchical baseline transfer learning module constructs sub-baselines for different environmental types. The hierarchical baselines include long-term baselines, medium-term baselines, and short-term baselines. The long-term baseline reflects the stable characteristics of individuals, the medium-term baseline describes the environmental adaptation process, and the short-term baseline depicts the immediate state changes. For each environmental type, construct the corresponding sub-baseline model. Through the transfer learning method, transfer the baseline knowledge in the existing environment to the new environment to quickly establish an environment-adaptive baseline model.

[0016] Based on the environment-adaptive baseline model, evaluate the mental state through a multi-level anomaly detector. The multi-level anomaly detection includes immediate anomaly detection, trend anomaly detection, and pattern anomaly detection. Immediate anomaly detection focuses on the deviation of the instantaneous state, trend anomaly detection analyzes the abnormal change trend, and pattern anomaly detection identifies abnormal behavior patterns. Through the environmental constraint anomaly scoring mechanism, consider the influence of environmental conditions on the determination of abnormal states, and generate anomaly scores with environmental constraints. Perform multi-level threshold judgments on the anomaly scores to determine the warning level and output warning signals.

[0017] Taking mental stress monitoring as an example, when the detection object is in an office environment, the environmental parameters show that the room temperature is 23°C, the relative humidity is 45%, the light intensity is 500 lux, the noise level is 45 dB, and the air quality index is good. The environmental semantic features indicate that this is a typical office scenario. Physiological signal monitoring shows a decrease in heart rate variability, a decrease in alpha-band energy, an increase in skin conductance level, and an increase in respiratory rate. Through environmental-behavior interaction analysis, it is found that this state change is related to the stress response caused by work pressure. After dynamic feature fusion, it shows that the stress level continuously deviates from the baseline. The results of multi-level anomaly detection show that trend anomaly detection finds that the stress level is on the rise, and pattern anomaly detection identifies a pattern of continuous stress accumulation. Considering the normal stress threshold in the office environment, the system generates a medium-level warning signal and recommends adjusting the work rhythm and stress management in a timely manner.

[0018] In the embodiments of the present application, by collecting environmental parameters in real time through a multi-source sensing network and performing scene recognition processing through an environmental context inference engine, it is possible to comprehensively perceive and analyze the impact of environmental changes on mental states, effectively improving the accuracy and integrity of environmental factor analysis. The environmental adaptive signal processing algorithm extracts features from multi-dimensional physiological signals and models individual differences, solving the problem of insufficient environmental interference compensation in traditional methods and significantly enhancing the anti-interference ability of physiological feature extraction. The Bayesian causal inference model is used for environmental-behavior interaction analysis, establishing a causal association mapping between environmental changes and behavioral responses, and enhancing the interpretability of behavioral feature analysis. The environmental-behavior association features and personalized physiological feature vectors are input into the graph attention network, and multi-dimensional feature fusion is performed through an environmental condition gating mechanism, realizing the deep fusion of multi-source heterogeneous data and overcoming the problem of information loss in traditional feature fusion methods. The hierarchical baseline transfer learning module constructs sub-baselines for different environmental types, solving the problem of baseline shift caused by environmental changes and improving the adaptability of the baseline model to environmental changes. The multi-level anomaly detector combines an environmental constraint anomaly scoring mechanism to achieve multi-dimensional evaluation of mental states and reduce the false alarm rate caused by environmental interference. The artificial intelligence algorithms in the overall solution are optimized and designed for the specific needs of mental health monitoring, including innovative points such as the attention mechanism for environmental perception, the graph structure representation of multi-modal data, and personalized modeling based on transfer learning. These algorithm features significantly improve the performance and reliability of the solution in practical applications. Through the synergistic effect of algorithms and models, the problem of mental health monitoring under dynamic environmental changes is effectively solved.

[0019] In a specific embodiment, the process of executing step S101 may specifically include the following steps: (1) Receive temperature, humidity, light, noise, and air quality data through a multi-source sensing network, input the temperature, humidity, light, noise, and air quality data into an environmental parameter normalization unit for standardization processing to obtain standardized environmental parameters; (2) Obtain barometric pressure, precipitation, and ultraviolet index data from the meteorological data interface, perform time series alignment processing on the barometric pressure, precipitation, and ultraviolet index data to obtain weather change characteristics; (3) Perform multi-source fusion positioning calculation on the GPS coordinates, WiFi signal strength, and Bluetooth beacon data collected by the positioning module, and output scene location information; (4) Use the image acquisition unit and the acoustic acquisition unit to obtain the image stream and audio stream of the surrounding environment, and process the image stream and audio stream through scene semantic analysis to obtain social environment characteristics; (5) Input the standardized environmental parameters, weather change characteristics, scene location information, and social environment characteristics into the environmental context inference engine for multi-modal feature fusion and scene semantic reasoning to obtain environmental semantic feature data; (6) Structurally store and update the environmental semantic feature data in real time to generate an environmental semantic feature data stream; (7) Through the environmental semantic feature data stream, timestamp mark and data verification are performed on the environmental semantic features, and the verified environmental semantic feature data is output.

[0020] Specifically, as Figure 2 shown, in the embodiment of the present application, a timing diagram of real-time collection of environmental parameters through a multi-source sensing network and scene recognition processing by an environmental context inference engine is presented, which shows the data transmission and processing relationships among the multi-source sensing network, the environmental parameter normalization unit, the meteorological data interface, the positioning module, the image acquisition unit, the acoustic acquisition unit, the environmental context inference engine, and the time series database. The timing diagram describes the complete process from environmental parameter collection to the generation of environmental semantic feature data, including key steps such as raw data collection, data standardization processing, timing alignment processing, multi-source fusion positioning, scene analysis, feature fusion, data storage, and verification.

[0021] The multi-source sensing network includes a temperature sensor, a humidity sensor, a light sensor, a noise sensor, and an air quality sensor. The temperature sensor collects Celsius temperature values with a sampling frequency of 1 Hz; the humidity sensor collects relative humidity percentages with a sampling frequency of 1 Hz; the light sensor collects light intensity in lux with a sampling frequency of 1 Hz; the noise sensor collects sound pressure levels in dB with a sampling frequency of 10 Hz; the air quality sensor collects indicators such as PM2.5, PM10, and CO2 concentrations with a sampling frequency of 0.1 Hz. The environmental parameter normalization unit performs standardization processing on these raw data, maps the temperature value to the [0, 1] interval, keeps the humidity value in percentage form, logarithmizes the light intensity, linearly normalizes the noise level, and maps the air quality indicators according to the national standard classification to obtain standardized environmental parameters.

[0022] The meteorological data interface obtains the barometric pressure, precipitation, and ultraviolet index data of meteorological stations in real time through the API. The unit of barometric pressure data is hectopascal, the unit of precipitation is millimeter per hour, and the ultraviolet index is a dimensionless value. Since the collection frequencies of different data are different, the barometric pressure data is once every 10 minutes, the precipitation data is once every 5 minutes, and the ultraviolet index is once every 30 minutes, so time series alignment processing is required. The time series alignment uses the interpolation method to unify all data into a time series with a 5-minute interval to form weather change characteristics. The data collected by the positioning module includes GPS coordinates, WiFi signal strength, and Bluetooth beacon data. GPS provides longitude and latitude information with a sampling frequency of 1Hz; the WiFi module scans the MAC addresses and signal strengths (RSSI) of surrounding access points once every 3 seconds; the Bluetooth beacon broadcasts the signal strength and unique identifier, which is updated every second. The multi-source fusion positioning calculation uses the weighted average method, mainly relying on GPS positioning outdoors, and combining WiFi and Bluetooth beacon data for triangulation indoors, and dynamically adjusting the weights according to the reliability of the signal strength to output unified scene location information.

[0023] The image acquisition unit acquires the environmental image stream with a resolution of 1920×1080 and a frame rate of 30fps; the acoustic acquisition unit acquires the environmental audio stream with a sampling rate of 44.1kHz and a bit depth of 16bit. The scene semantic analysis performs scene segmentation and object detection on the image stream to identify features such as crowd density, activity type, and scene category; performs acoustic event detection on the audio stream to identify features such as environmental noise type and vocal density. These features are combined to form social environment features, which describe the characteristics of the surrounding social scenes. The environmental context reasoning engine receives the standardized environmental parameters, weather change characteristics, scene location information, and social environment characteristics for multi-modal feature fusion. The feature fusion uses the attention mechanism to dynamically allocate weights according to the importance of different features in the current scene. The scene semantic reasoning is based on the rule base and probability graph model, maps the multi-modal features to predefined scene categories, such as office environment, home environment, outdoor environment, etc., and extracts the semantic attributes of the scene to generate environmental semantic feature data.

[0024] For the storage and update of environmental semantic feature data, a time-series database is used for structured storage. The data is organized by timestamp, supporting fast time-range queries and aggregation analysis. The real-time update mechanism ensures that new environmental semantic features can be written into the database in a timely manner, while maintaining the temporal continuity of the data, generating an environmental semantic feature data stream. The environmental semantic feature data stream is marked with timestamps to ensure the temporality and traceability of the data. Data verification includes integrity verification, consistency verification, and outlier detection. Integrity verification ensures that there are no missing time points in the data stream; consistency verification guarantees that the logical relationships between related features are reasonable; outlier detection identifies data points that deviate significantly from the normal range. The verified environmental semantic feature data serves as an important input for subsequent mental health monitoring.

[0025] For example, for a person working in an office, mental health monitoring is carried out. The multi-source sensor network collects the indoor temperature of 24°C, relative humidity of 45%, light intensity of 600 lux, average noise level of 52 dB, and air quality index of 75. These raw data are standardized and converted into a unified numerical range. At the same time, the atmospheric pressure of 1013.2 hPa, no precipitation, and ultraviolet index of 3 are obtained from the meteorological data interface, and a weather feature sequence is formed after time alignment. The positioning module determines the location in the office area through WiFi signal strength and Bluetooth beacon positioning. Image stream analysis shows a medium population density and an activity type mainly of sitting and working; audio stream analysis shows low-intensity human conversations and keyboard tapping sounds. The environmental context inference engine infers the current standard office scenario based on these features and extracts relevant environmental semantic features. These features are structured stored and updated in real time to form a continuous data stream. After being marked with timestamps and data verification, reliable environmental semantic feature data is output.

[0026] In a specific embodiment, the process of executing step S102 may specifically include the following steps: (1) Collect electrocardiogram (ECG), electroencephalogram (EEG), galvanic skin response (GSR), and respiratory data through a physiological signal acquisition device, and calculate the time-domain features of the ECG, EEG, GSR, and respiratory data to obtain the original physiological feature data; (2) Align the environmental semantic feature data with the original physiological feature data in time, and compensate for environmental interference in the original physiological feature data through weighted processing to obtain the compensated physiological features; (3) Decompose the compensated physiological features in the frequency domain, decompose the ECG signal into low-frequency, medium-frequency, and high-frequency components, and decompose the EEG signal into α, β, θ, and δ bands to obtain multi-band feature data; (4) Calculate the feature statistics, including mean, variance, kurtosis, and skewness, based on the multi-band feature data to generate a statistical feature vector; (5) Calculate the similarity between the statistical feature vector and the historical sample data, extract the individual feature difference parameters, and perform personalized correction on the statistical feature vector to obtain the corrected feature vector; (6) Perform dimensionality conversion and normalization processing on the corrected feature vector through an environment adaptive signal processing algorithm to obtain a personalized physiological feature vector after environment compensation.

[0027] Specifically, the sampling frequency of the electrocardiogram (ECG) signal collected by the physiological signal acquisition device is 250 Hz, and the P wave, QRS complex, and T wave features in the ECG waveform are collected; the sampling frequency of the electroencephalogram (EEG) signal is 1000 Hz, and the potential activities in key brain regions such as the frontal lobe and parietal lobe are collected; the sampling frequency of the skin conductance signal is 50 Hz, and the changes in skin conductance are recorded; the sampling frequency of the respiratory signal is 20 Hz, and the respiratory waveform is collected. Calculate the time-domain features of the collected signals. For the ECG signal, calculate the RR interval and heart rate variability; for the EEG signal, calculate the amplitude and power; for the skin conductance signal, calculate the baseline level and response amplitude; for the respiratory signal, calculate the respiratory frequency and depth to obtain the original physiological feature data.

[0028] The time alignment between the environmental semantic feature data and the original physiological feature data uses the interpolation method to unify all data to a time interval of 10 ms. Compensate for environmental interference through weighted processing, and the weight coefficient is dynamically adjusted according to the influence degree of environmental factors. For the influence of temperature, adjust the heart rate variability parameters according to the body temperature regulation response; for the influence of noise, correct the EEG wave amplitude; for the change in light, correct the skin conductance baseline level; for the influence of air quality, adjust the respiratory parameters to obtain the compensated physiological features. Perform frequency-domain decomposition on the compensated physiological features, and use the fast Fourier transform (FFT) to perform spectral analysis on the signals. The ECG signal is decomposed into low-frequency (0.01 - 0.04 Hz) reflecting sympathetic nerve activity, medium-frequency (0.04 - 0.15 Hz) reflecting blood pressure regulation, and high-frequency (0.15 - 0.4 Hz) reflecting parasympathetic nerve activity. The EEG signal is decomposed into δ waves (0.5 - 4 Hz) reflecting deep sleep state, θ waves (4 - 8 Hz) reflecting light sleep and attention, α waves (8 - 13 Hz) reflecting relaxation state, and β waves (13 - 30 Hz) reflecting wakefulness and concentration to obtain multi-band feature data.

[0029] Statistical feature calculation performs statistical analysis on the multi-band feature data. The mean reflects the overall level of the signal. For example, the average value of heart rate variability represents the autonomic nerve regulation ability; the variance describes the volatility of the signal. For example, the degree of variation of EEG wave amplitude represents the stability of brain activity; the kurtosis measures the sharpness of the distribution. For example, the suddenness of skin conductance response; the skewness represents the asymmetry of the distribution. For example, the regularity of the respiratory pattern. These statistics are combined to form a statistical feature vector.

[0030] Calculate the similarity between the statistical feature vector and the historical sample data, and use cosine similarity to measure the distance between feature vectors. The individual feature difference parameters include differences in baseline levels, response sensitivities, regulatory capabilities, etc. Perform personalized calibration on the statistical feature vector, adjust the dimension and range of the feature values according to the individual feature difference parameters, and obtain the calibrated feature vector. The environment adaptive signal processing algorithm processes the calibrated feature vector. Dimension conversion unifies different physiological indicators into the same feature space, and uses principal component analysis to reduce the feature dimension. Normalization maps the feature values to the interval [0, 1], considering the influence of environmental conditions on the normalization parameters, and obtains the personalized physiological feature vector after environmental compensation.

[0031] For example: When the monitoring object is in an office environment, physiological signals and environmental data are collected simultaneously. The electrocardiogram signal shows a shortening of the RR interval, indicating an increase in heart rate; the energy of the β wave in the electroencephalogram signal increases, indicating a high degree of concentration; the skin conductance level increases, reflecting emotional tension; and the breathing becomes rapid. The environmental data shows that the room temperature is relatively high and the noise interference is large. Perform time alignment to align the physiological data and environmental data to the same time axis. Then, perform compensation according to the environmental impact, such as reducing the influence weight of temperature on heart rate and eliminating the interference of noise on electroencephalogram. Perform frequency domain decomposition on the compensated signal, and analyze that the low-frequency component of the electrocardiogram signal increases, indicating an increase in sympathetic nerve activity; the proportion of the β wave in the electroencephalogram increases, reflecting an increase in cognitive load. Calculate the statistical features and find that the mean value of heart rate variability decreases, the variance of electroencephalogram amplitude increases, the kurtosis of skin conductance response increases, and the breathing regularity decreases. Comparing with the historical data of this user, it is found that the current state significantly deviates from the individual baseline level. After personalized calibration and dimension conversion, a feature vector reflecting the current psychological stress state is generated, providing a basis for subsequent stress level assessment.

[0032] In a specific embodiment, the process of executing step S103 may specifically include the following steps: (1) Divide the environmental semantic feature data into multiple time series segments according to time windows, perform feature extraction on each time series segment, and obtain the environmental state sequence; (2) Construct a state transition matrix based on the environmental state sequence, calculate the transition probability between environmental states through matrix decomposition, and obtain the environmental change pattern; (3) Segment the personalized physiological feature vector by sliding window, calculate the statistics and change trends within each window, and form the physiological state sequence; (4) Use the environmental change pattern and the physiological state sequence, and calculate the conditional probability distribution through the Bayesian causal inference model to obtain the environmental-physiological association metric; (5) Align the user activity data and social behavior data according to the time stamp, perform time series correlation analysis with the environmental-physiological association metric, and generate the behavior response feature; (6) Perform path analysis and weight calculation on the behavior response features through a multi-layer causal graph, and output the environment-behavior association features.

[0033] Specifically, divide the environmental semantic feature data according to a fixed window length of 10 minutes, with an overlap rate of 50% for each window, to form continuous time series segments. Extract features such as temperature change rate, humidity fluctuation range, light intensity gradient, noise spectrum features, and air quality index change for each time series segment, and form an environmental state vector. The environmental state vectors of multiple time series segments are arranged in chronological order to form an environmental state sequence. Based on the environmental state sequence, construct a state transition matrix to record the conversion relationship between different environmental states. Through matrix decomposition methods, decompose the state transition matrix into a basic state matrix and a transition probability matrix. The basic state matrix represents the typical state patterns of the environment, and the transition probability matrix describes the change rules between states. The matrix decomposition uses the non-negative matrix factorization algorithm to ensure that the decomposition results have physical meanings. By analyzing the main paths and jump features in the transition probability matrix, identify the typical patterns of environmental changes.

[0034] When segmenting the personalized physiological feature vector with a sliding window, the window length is set to 5 minutes and the sliding step is 1 minute. Calculate statistics such as mean heart rate variability, EEG energy distribution, change rate of skin conductance level, and respiratory frequency fluctuation within each window. At the same time, calculate the change trends of these indicators, including first-order differences, change accelerations, etc. Organize these features in chronological order to form a physiological state sequence describing the dynamic changes of the physiological state. The Bayesian causal inference model analyzes the association relationship between the environmental change pattern and the physiological state sequence by calculating the conditional probability distribution. Establish a conditional probability table from the environmental state to the physiological state, and then use the Bayesian network structure to describe the causal dependence relationship between variables. When calculating the environment-physiology association metric, comprehensively consider the direct causal impact and indirect transmission effects to obtain a quantitative association strength indicator.

[0035] User activity data includes exercise status, posture changes, operation behaviors, etc., and social behavior data includes conversation frequency, social interaction intensity, etc. Align these data to a unified time axis according to the time stamp, and perform time series correlation analysis with the environment-physiology association metric. The time series correlation analysis uses the dynamic time warping algorithm to calculate the time series dependence relationship between behavior changes and the environment-physiology association, and generate a feature vector reflecting the individual behavior response characteristics.

[0036] The path analysis and weight calculation of the multi-layer causal graph are expressed as: Among them, represents the association strength from environmental factor i to behavior response j, represents the direct influence coefficient of environmental factor i on intermediate state k, Indicates the intensity of the influence of the intermediate state k on the behavioral response j. is the importance weight of the intermediate state k, and n is the total number of intermediate states.

[0037] During the calculation process, It is calculated through the normalized value of the environmental characteristics: Among them, is the original influence value of the environmental factor i on the state k, is the significance coefficient of the environmental factor i, and p is the total number of environmental factors.

[0038] The environment-behavior association features are obtained through weighted combination: Among them, is the environment-behavior association feature, is the path importance weight, and q is the number of dimensions of the behavioral response.

[0039] For example: When conducting mental health monitoring in an office environment, the environmental semantic feature data records the environmental changes from morning to afternoon. Through time window partitioning, it is captured that the environmental state in the morning is mainly characterized by low noise and moderate light, the temperature rises and the personnel density increases at noon, and the light weakens and the air quality deteriorates in the afternoon. After these features form an environmental state sequence, a typical daily change pattern of the office environment is discovered through state transition analysis. The personalized physiological feature vectors during the same period show that the physiological indicators fluctuate accordingly with the environmental changes. For example, the electroencephalogram beta wave activity increases when the noise increases, and the heart rate variability is regulated when the temperature changes. Bayesian causal inference reveals the association relationship between environmental changes and physiological states. For example, it is found that the probability of the respiratory rate changing increases when the air quality deteriorates. Combining the recorded activity data and social behavior data, it is observed that the environmental changes trigger behavioral adjustments. For example, the conversation frequency decreases when the noise increases, and the activity intensity weakens when the temperature rises. Through multi-layer causal graph analysis, the direct and indirect paths of environmental factors affecting behavior are quantified, thereby constructing the environment-behavior association features.

[0040] In a specific embodiment, the process of executing step S104 may specifically include the following steps: (1) Align the environment-behavior association features and the personalized physiological feature vectors according to the time stamp, and generate a feature sequence matrix through data completion processing; (2) Construct feature nodes for the feature sequence matrix, calculate the connection weights between the nodes, and obtain the initial feature graph structure; (3) Use the attention calculation unit to score the importance of the nodes in the initial feature graph structure to generate an attention weight distribution. (4) Perform a gating operation on the attention weight distribution and the environmental condition information to dynamically adjust the feature connection strength and obtain the gated feature map; (5) Propagate and aggregate features of the gated feature map through a message passing mechanism to generate a node update vector; (6) Perform temporal combination and dimensional transformation on the node update vector and output the dynamic feature representation.

[0041] Specifically, perform time synchronization processing on the environment-behavior correlation features and the personalized physiological feature vectors, and use the interpolation method to unify data with different sampling frequencies to the same time scale. For the missing part of the data, complete it through linear interpolation or nearest neighbor interpolation to form a feature sequence matrix. Each row in the feature sequence matrix represents a time point, and each column corresponds to a feature dimension.

[0042] During the construction of feature nodes, each feature in the feature sequence matrix is represented as a node in the graph structure. The connection weight between nodes is calculated by the following formula: where represents the connection weight from node i to node j, is the importance coefficient at time point t, is the association strength between nodes i and j at time t, is the time decay factor, T is the total number of time steps, and N is the total number of nodes.

[0043] The calculation of the attention weight distribution uses the following formula: where is the attention weight of node i, is the feature similarity between nodes i and j, is the feature importance measure of node j, is the position encoding factor.

[0044] When performing the gating operation on the attention weight distribution and the environmental condition information, a dynamic threshold mechanism is adopted. Set the gating threshold according to the current environmental conditions to selectively retain or suppress the feature connection strength. The gating operation considers the comprehensive influence of environmental factors such as temperature, humidity, light, and noise, and dynamically adjusts the connection relationship between features. The message passing mechanism updates node features through an iterative method. In each iteration, a node collects information from its neighbor nodes and performs weighted aggregation according to the connection weights. The information aggregation process considers the influence of direct connections and multi-hop paths, and maintains the original feature information through residual connections. The node update process also considers the temporal dependence relationship to ensure the temporal consistency of features.

[0045] As shown Figure 3 in the figure, it is a schematic diagram of the initial feature map in the embodiment of the present application, which includes three main parts: physiological feature nodes (including heart rate variability, electroencephalogram activity, galvanic skin response, and respiratory characteristics), behavioral feature nodes (including activity intensity, concentration level, and interaction frequency), and environmental feature nodes (including temperature status, noise level, and light intensity). The arrows in the figure represent the connection relationships between different feature nodes, the bidirectional arrows represent the mutual influence between features, and the unidirectional arrows represent the influence of environmental features on physiological and behavioral features.

[0046] Perform temporal combination on the node update vectors to fuse features at different time scales. The dimensionality transformation process includes dimensionality reduction and feature mapping, which compress high-dimensional features into an appropriate dimensional space while maintaining the discriminative information of the features to form the final dynamic feature representation.

[0047] For example: In the mental health monitoring of an office scenario, the environment-behavior association features include the influence mode of environmental changes on behavior, and the personalized physiological feature vector includes physiological indicators such as heart rate, electroencephalogram, and galvanic skin response. Align these features at one-minute time intervals, and supplement the data at missing sampling time points through linear interpolation. In the construction of feature nodes, each physiological indicator and behavioral feature are represented as a node, such as the heart rate variability node, the electroencephalogram alpha wave node, the behavior activity node, etc. When calculating the connection weights between nodes, considering the correlations of different indicators in the office environment, for example, the strong correlation between electroencephalogram beta waves and behavioral concentration in a noisy environment. Score the importance of nodes through the attention mechanism, and it is found that there are significant differences in the importance of various indicators under different environmental states. For example, during high-intensity working periods, the weight of the electroencephalogram indicator is higher, while during rest periods, the weight of the heart rate variability indicator increases. The gating mechanism dynamically adjusts the strength of feature connections according to environmental conditions such as temperature changes and noise levels. Finally, through message passing and feature aggregation, a dynamic feature representation reflecting the current mental state is generated.

[0048] In a specific embodiment, the process of executing step S105 may specifically include the following steps: (1) Perform time series decomposition on the dynamic feature representation to separate long-term features, medium-term features, and short-term features, and obtain a hierarchical feature sequence; (2) Classify different environmental scenarios according to historical environmental data, establish an environmental type feature library, and form an environmental classification standard; (3) Group the hierarchical feature sequence according to the environmental classification standard, calculate statistical features for each group of data, and generate an environment-related feature set; (4) Perform subspace partitioning on the environment-related feature set, construct a feature distribution matrix under different environmental types, and obtain environmental sub-baseline data; (5) Perform feature mapping on the environmental sub-baseline data through migration transformation, establish the associated mapping relationship between environmental types, and obtain the baseline migration parameters; (6) Integrate and optimize the parameters of the baseline migration parameters and the environmental sub-baseline data, and output the environment adaptive baseline model.

[0049] Specifically, perform wavelet decomposition on the dynamic feature representation to separate the time series according to different time scales. The long-term features reflect the monthly or quarterly change trends, with a time span of more than 30 days; the medium-term features represent the weekly or dekadal fluctuation rules, with a time span of 7 - 30 days; the short-term features depict the intra-day or inter-day instant changes, with a time span of 1 - 7 days. Reconstruct the features at each scale through wavelet reconstruction to obtain the hierarchical feature sequence.

[0050] The type division of historical environmental data adopts the clustering analysis method. Standardize environmental parameters such as temperature, humidity, light, and noise, and then use the hierarchical clustering algorithm to group the environmental data. Consider the temporal correlation and spatial distribution characteristics of environmental parameters during the clustering process, and classify similar environmental states into the same category. When establishing the environmental type feature library, extract the typical feature patterns of each type of environment, including statistical features such as parameter mean, fluctuation range, and change trend, to form the environmental classification standard. When grouping the hierarchical feature sequence according to the environmental classification standard, adopt the nearest neighbor matching principle. Match the environmental state at each time point with the standard pattern in the environmental type feature library to determine the current environmental type. Calculate the statistical features for each group of data, including time domain features (mean, variance, kurtosis, skewness), frequency domain features (power spectral density, main frequency component), and non-linear features (approximate entropy, sample entropy), to generate the environmental related feature set.

[0051] The subspace division of the environmental related feature set adopts the locally linear embedding algorithm. For different environmental types, construct the local neighborhood relationship of the features to maintain the topological structure of the data. Project the high-dimensional features onto the low-dimensional subspace through feature mapping, and each subspace corresponds to the feature distribution under one environmental type. Combine the feature distribution matrices of all subspaces to form the environmental sub-baseline data. During the migration transformation process, adopt the domain adaptation method to perform feature mapping on the environmental sub-baseline data. Identify the feature distribution differences between the source environment domain and the target environment domain, and then design a feature transformation function to map the source domain features to the feature space of the target domain. Establish the associated mapping relationship between environmental types and obtain the baseline migration parameters by minimizing the distribution difference and maintaining the feature discriminability.

[0052] The integration of the baseline migration parameters and the environmental sub-baseline data adopts a weighted fusion strategy. Set the migration weight according to the environmental similarity to adaptively adjust the baseline data. The optimization calculation process adopts the gradient descent method to minimize the migration error and the baseline deviation, and output the environment adaptive baseline model.

[0053] For example, in the scenario of mental health monitoring in an office environment, time series decomposition is performed on the collected dynamic feature representations. The long-term features reflect the baseline mental states of employees in different seasons, such as the physiological rhythm changes in the air-conditioned environment in summer; the medium-term features show the state differences between weekdays and weekends, including the accumulation and recovery cycles of work stress; the short-term features capture the state fluctuations in daily work, such as the immediate impacts of events like meetings and deadlines. By analyzing historical environmental data, the office environment is divided into multiple typical types: standard office environment (temperature 22 - 26°C, relative humidity 40 - 60%, illumination 500 - 700 lux, environmental noise 45 - 55 dB), meeting environment (increased personnel density, elevated noise level), rest environment (reduced illumination intensity, reduced noise level), etc. A feature library is established for each environment type to record the typical distribution characteristics of environmental parameters.

[0054] Group the hierarchical feature sequences according to the environmental classification criteria. In the standard office environment, the heart rate variability remains within a stable range, and the electroencephalogram beta wave activity level is moderate; in the meeting environment, the attention index increases, and the skin conductance level fluctuation increases; in the rest environment, the alpha wave activity enhances, and the autonomic nervous system tends to be in a balanced state. Calculate the feature statistics for each situation and construct a feature distribution matrix. When the environment changes, such as switching from the standard office environment to the meeting environment, adjust the baseline parameters through the transfer learning method. Considering the influence mode of environmental changes on physiological indicators, establish a feature mapping relationship to achieve a smooth transition of the baseline model. The final environment-adaptive baseline model can dynamically adjust the evaluation criteria according to different environmental conditions and accurately reflect the changes in mental health status.

[0055] In a specific embodiment, the process of executing step S106 may specifically include the following steps: (1) Calculate the feature distance between the real-time mental state data and the environment-adaptive baseline model, and normalize the calculation result to obtain a deviation degree index; (2) Conduct hierarchical evaluation of the mental state according to the deviation degree index, calculate the immediate anomaly score, trend anomaly score, and pattern anomaly score through multi-scale comparison, and obtain an anomaly feature vector; (3) Calculate the spatio-temporal distribution characteristics of the abnormal state using the anomaly feature vector to generate an abnormal state distribution map; (4) Conduct correlation analysis between the abnormal state distribution map and the environmental conditions, calculate the environmental constraint weight coefficient, and form a constraint scoring parameter; (5) Perform weighted combination on the constraint scoring parameter and the anomaly feature vector, and generate a warning level identifier through multi-level threshold judgment; (6) Output a warning signal according to the mapping relationship between the warning level identifier and the environmental risk degree.

[0056] Specifically, due to the different dimensions and distributions of different feature dimensions, the features are standardized to transform the features of each dimension into the same scale space. The deviation value of each feature dimension from the baseline model is calculated, and considering the covariance relationship between features, a comprehensive deviation value is obtained. The deviation value is mapped to the interval [0, 1] through min-max normalization to generate a standardized deviation degree index. The hierarchical evaluation process is based on a multi-scale analysis framework. The instant anomaly score reflects the instantaneous deviation of the current state from the baseline, which is obtained by calculating the Euclidean distance of the feature vector; the trend anomaly score describes the dynamic characteristics of the state change, and the change rate and acceleration of the feature sequence are calculated using a sliding window; the pattern anomaly score characterizes the degree of anomaly of the behavior pattern, and the difference degree from the normal pattern is calculated through sequence pattern matching. These three types of scores constitute a multi-dimensional anomaly feature vector.

[0057] The calculation of the spatio-temporal distribution characteristics of the abnormal state includes the time dimension and the state space dimension. In the time dimension, the duration, occurrence frequency, and periodicity of the abnormal features are analyzed; in the state space dimension, the distribution range and aggregation degree of the abnormal state in different feature dimensions are calculated. These distribution characteristics are visually represented to form an abnormal state distribution map.

[0058] The correlation analysis between the abnormal state distribution map and environmental conditions uses two-way correlation calculation. The modulation effect of environmental factors on the abnormal state distribution is identified, and at the same time, the differences in the environmental sensitivity of the abnormal state are considered. Based on the correlation analysis, the weight coefficient of each environmental factor is calculated, and an environmental constraint scoring parameter is comprehensively formed. The weighted combination of the constraint scoring parameter and the anomaly feature vector adopts an adaptive weight strategy. The weights of each feature are dynamically adjusted according to the current environmental conditions, and the abnormal features with high environmental sensitivity are focused on. The multi-level threshold judgment divides the weighted abnormal degree into different levels to generate a hierarchical early warning identifier.

[0059] The mapping between the early warning level identifier and the environmental risk degree uses a piecewise mapping function. The early warning threshold is dynamically adjusted according to the environmental risk level. The early warning threshold is lowered in a high-risk environment to improve the early warning sensitivity; the early warning threshold is raised in a low-risk environment to reduce false alarms. The mapping result determines the level of the final output early warning signal.

[0060] For example, monitor the mental health status of an employee in an office environment. Compare the real-time monitoring data with the environment-adaptive baseline model, and it is found that the heart rate variability index is lower than the baseline mean, the EEG beta wave energy remains high, and the skin conductance level fluctuates more. Calculate the comprehensive deviation index based on these deviations. Multiscale analysis shows that the immediate anomaly score reflects the current highly stressed state; the trend anomaly score indicates that the stress level is continuously rising; the pattern anomaly score indicates that the work-rest pattern has been disrupted. The anomaly status distribution map shows that this state is mainly concentrated in the afternoon of weekdays and has a significant correlation with the environmental noise level and work task density. Environmental constraint analysis finds that abnormal states are more likely to occur in high-temperature and high-noise environments. Considering both the anomaly degree and environmental risk factors, it is determined that the current state reaches the moderate warning level, and it is recommended to take timely intervention measures, such as adjusting the work rhythm and improving the environmental conditions. This example demonstrates the complete processing flow from data collection, feature extraction to anomaly detection and warning generation, and reflects the important role of environmental factors in mental health monitoring.

[0061] In a specific embodiment, the process of performing the step of hierarchically evaluating the mental state according to the deviation degree index may specifically include the following steps: (1) Divide the deviation degree index into short-term sequences, medium-term sequences, and long-term sequences according to time windows, perform data smoothing processing on each sequence to obtain multiscale time series data; (2) Perform a sliding window analysis on the short-term sequences in the multiscale time series data, calculate the difference between the statistics within the window and the baseline threshold, and generate an immediate anomaly score; (3) Calculate the slope of the medium-term sequences in the multiscale time series data through trend decomposition, perform deviation analysis on the slope change and the baseline trend, and obtain a trend anomaly score; (4) Use the long-term sequences in the multiscale time series data to extract pattern features, identify abnormal patterns through sequence similarity calculation, and output a pattern anomaly score; (5) Combine and transform the dimensions of the immediate anomaly score, trend anomaly score, and pattern anomaly score to form an anomaly feature matrix; (6) Perform dimensionality reduction and normalization processing on the anomaly feature matrix to generate an anomaly feature vector.

[0062] Specifically, the short-term sequence uses a 1-hour time window to reflect the immediate state change; the medium-term sequence uses an 8-hour time window corresponding to the change of a single working day; the long-term sequence uses a 24-hour time window to represent the cross-day change pattern. Apply exponential weighted moving average smoothing processing to these sequences respectively to eliminate the influence of random fluctuations and obtain multiscale time series data.

[0063] The sliding window analysis of the short-term sequence uses a window length of 5 minutes and a window overlap rate of 50%. In each window, statistical measures such as heart rate variability deviation, EEG energy deviation, and skin conductance level deviation are calculated and compared with the corresponding baseline thresholds. The baseline thresholds are determined based on the normal fluctuation range of historical data, and the degree of exceeding the thresholds determines the magnitude of the immediate anomaly score.

[0064] The trend analysis of the medium-term sequence is calculated using the following formula: where, is the trend anomaly score, is the trend slope at the i-th time point, is the environmental modulation coefficient, is the weight factor, is the j-th component of the baseline trend vector, is the fluctuation compensation factor, n is the sequence length, and m is the feature dimension.

[0065] The pattern analysis of the long-term sequence uses the dynamic time warping algorithm to calculate the similarity between the current sequence and the historical normal patterns. By extracting the periodic features, mutation features, and cumulative features of the sequence, a pattern feature descriptor is constructed. Based on these features, the distance metric between sequences is calculated to identify abnormal behavior patterns and output the pattern anomaly score. The feature combination of the anomaly score adopts a multi-level structure. The first layer is the raw anomaly score, including the immediate anomaly score, trend anomaly score, and pattern anomaly score; the second layer is the cross feature, which calculates the interaction between different types of anomaly scores; the third layer is the temporal feature, which describes the time evolution feature of the anomaly score. These feature combinations form a three-dimensional feature matrix.

[0066] The dimensionality reduction of the feature matrix uses the principal component analysis method, retaining the principal components with a cumulative contribution rate reaching 95%. The reduced-dimensional features are processed by maximum-minimum normalization to map all features to the interval [0,1], generating a standardized anomaly feature vector.

[0067] For example, in the mental health monitoring of an office environment, the monitoring data of an employee for one day is continuously collected. The deviation degree indicators are divided according to different time scales: the short-term sequence records the state fluctuations during the work process, such as the change in attention during a meeting; the medium-term sequence reflects the state changes at different times in the morning and afternoon; the long-term sequence includes the work-rest cycle pattern for the whole day. Through sliding window analysis, it is found that during important meetings, the immediate abnormal score increases, manifested as an increase in heart rate and enhanced skin conductance activity. Trend analysis shows that there is a continuous trend of stress accumulation in the afternoon period, and the slope is significantly higher than the baseline level. Pattern analysis finds that the original regular work-rest rhythm is broken, showing an abnormal pattern of continuous tension. These abnormal scores are processed through feature combination and dimensionality reduction, and finally form a feature vector reflecting the overall abnormal state. This vector not only includes the degree of abnormality of the current state but also reflects the dynamic characteristics of state changes, providing a basis for subsequent early warning judgments.

[0068] In a specific embodiment, the process of performing the step of calculating the slope of the medium-term sequence in the multi-scale time series data through trend decomposition may specifically include the following steps: (1) Segment the medium-term sequence in the multi-scale time series data at a fixed step size, extract statistical features for each segment of data, and obtain sequence feature points; (2) Perform seasonal decomposition on the sequence feature points, separate the trend component, periodic component, and random component, and obtain trend sequence data; (3) Use the least squares method to perform linear fitting on the trend sequence data, calculate the slope values within each time period, and form a trend slope sequence; (4) Calculate the difference between the trend slope sequence and the baseline trend data, establish a slope deviation matrix, and obtain trend change characteristics; (5) Aggregate the trend change characteristics in the time dimension through weighted average to generate a trend deviation vector; (6) Perform amplitude normalization and threshold mapping on the trend deviation vector, and output the trend abnormal score.

[0069] Specifically, a fixed-step segmentation strategy is adopted. The mid-term sequence is divided into multiple time periods at a fixed step of 30 minutes, and a 10% overlapping interval is set between each time period to ensure data continuity. Statistical feature extraction is performed on the data within each time period, including statistics such as mean, variance, kurtosis, skewness, and entropy value. These statistics form a multi-dimensional feature vector, and each feature vector corresponds to a feature point on the time series, forming a discrete set of sequence feature points. The seasonal decomposition of the sequence feature points uses the X-12-ARIMA decomposition method. This method preprocesses the original sequence, including outlier detection and missing value filling, and then decomposes the sequence into a trend component, a periodic component, and a random component. The trend component reflects the long-term change trend of the data, the periodic component captures the cyclic change pattern of the data, and the random component contains irregular fluctuation components. The trend sequence data is formed by the trend component obtained through decomposition.

[0070] The linear fitting of the trend sequence data uses the piecewise least squares method. The trend sequence is divided into multiple sub-intervals according to the working period, and linear least squares fitting is applied within each sub-interval. The fitting process considers the weights of the data points, with larger weights for recent data points and gradually decaying weights for distant data points. By calculating the slope of the fitting line within each sub-interval, a trend slope sequence reflecting the state change rate is obtained. The difference between the trend slope sequence and the baseline trend data is calculated using the dynamic time warping method. The baseline trend data comes from historical data statistics and represents the change trend under normal conditions. By calculating the differences between the current trend slope sequence and the baseline trend data at different time points, a slope deviation matrix reflecting the degree of trend deviation is constructed. Each row of the deviation matrix corresponds to a time point, and each column corresponds to a feature dimension.

[0071] The time dimension aggregation of the trend change characteristics uses the exponentially weighted moving average method. For each feature dimension in the slope deviation matrix, a time decay factor is set so that recent deviation values have larger weights. Through weighted average calculation, the deviation values in the time dimension are aggregated into a vector, and each component represents the comprehensive deviation degree on the corresponding feature dimension, forming a trend deviation vector. The amplitude normalization process uses an adaptive threshold method. The distribution characteristics of the components of the trend deviation vector are calculated to determine the normalization parameter. Then the deviation values are mapped to the standard interval, and the mapping function is dynamically adjusted according to the environmental conditions. Finally, through multi-layer threshold judgment, the normalized deviation values are converted into trend anomaly scores.

[0072] For example, in the mental health monitoring of an office environment, the monitoring data of an employee for one day is analyzed. The medium-term sequence is divided into 30-minute steps, and the features within each time period are extracted. For example, within the time period from 9:00 to 9:30 in the morning, the statistical features of indicators such as heart rate variability, electroencephalogram energy, and skin conductance level are calculated. Through seasonal decomposition, it is found that these indicators have obvious daily variation patterns, such as periodic changes like the energetic period in the morning and the fatigued period in the afternoon. By segmentally fitting the trend component, it is found that after 4 consecutive hours of work, the stress indicator begins to rise rapidly, and the slope is significantly higher than the normal level. Comparing this trend change with the historical baseline, a deviation matrix is constructed, and a comprehensive deviation vector is obtained through time weighting. Finally, after normalization and threshold mapping, a trend anomaly score reflecting the degree of stress accumulation is output, providing a basis for timely adjustment of the work rhythm.

[0073] The above describes the method for mental health monitoring based on artificial intelligence in the embodiments of the present application. Next, the mental health monitoring system based on artificial intelligence in the embodiments of the present application will be described. Please refer to Figure 4 , an embodiment of the mental health monitoring system based on artificial intelligence in the embodiments of the present application includes: An acquisition module 201, configured to collect environmental parameters in real time through a multi-source sensing network, and perform scene recognition processing through an environmental context inference engine to obtain environmental semantic feature data; A modeling module 202, configured to extract features and model individual differences of multi-dimensional physiological signals through an environment-adaptive signal processing algorithm according to the environmental semantic feature data, and obtain a personalized physiological feature vector after environmental compensation; An analysis module 203, configured to perform environment-behavior interaction analysis through a Bayesian causal inference model by using the environmental semantic feature data and the personalized physiological feature vector, and output environment-behavior association features; An input module 204, configured to input the environment-behavior association features and the personalized physiological feature vector into a graph attention network, and perform multi-dimensional feature fusion through an environment-conditioned gating mechanism to generate a dynamic feature representation; A construction module 205, configured to construct sub-baselines for different environment types by a hierarchical baseline transfer learning module according to the dynamic feature representation to obtain an environment-adaptive baseline model; An evaluation module 206, configured to evaluate the mental state through a multi-level anomaly detector based on the environment-adaptive baseline model, and output a warning signal through an environment-constrained anomaly scoring mechanism.

[0074] Through the collaborative cooperation of the above-mentioned various components, the environmental parameters are collected in real time through a multi-source sensing network and processed by the environmental context inference engine for scene recognition, which can comprehensively perceive and analyze the impact of environmental changes on mental states, effectively improving the accuracy and integrity of environmental factor analysis. The environmental adaptive signal processing algorithm extracts features from multi-dimensional physiological signals and models individual differences, solving the problem of insufficient environmental interference compensation in traditional methods and significantly enhancing the anti-interference ability of physiological feature extraction. The Bayesian causal inference model is used for environmental-behavior interaction analysis, establishing a causal association mapping between environmental changes and behavioral responses and enhancing the interpretability of behavioral feature analysis. The environmental-behavior association features and personalized physiological feature vectors are input into the graph attention network, and multi-dimensional feature fusion is performed through the environmental condition gating mechanism, achieving the deep fusion of multi-source heterogeneous data and overcoming the problem of information loss in traditional feature fusion methods. The hierarchical baseline transfer learning module constructs sub-baselines for different environmental types, solving the problem of baseline shift caused by environmental changes and improving the adaptability of the baseline model to environmental changes. The multi-level anomaly detector combines the environmental constraint anomaly scoring mechanism to achieve multi-dimensional evaluation of mental states and reduce the false alarm rate caused by environmental interference. The artificial intelligence algorithms in the overall solution are optimized and designed for the specific requirements of mental health monitoring, including innovative points such as the attention mechanism for environmental perception, the graph structure representation of multi-modal data, and personalized modeling based on transfer learning. These algorithm features significantly improve the performance and reliability of the solution in practical applications. Through the synergistic effect of algorithms and models, the problem of mental health monitoring under dynamic environmental changes is effectively solved.

[0075] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, systems, and units can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0076] As described above, the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present application.

Claims

1. A mental health monitoring method based on artificial intelligence, characterized in that: The artificial intelligence-based mental health monitoring method includes: The environmental parameters are collected in real time through a multi-source sensor network, and the scene recognition is processed by the environmental context reasoning engine to obtain the environmental semantic feature data; According to the environmental semantic feature data, feature extraction and individual difference modeling are performed on multi-dimensional physiological signals through an environmental adaptive signal processing algorithm to obtain a personalized physiological feature vector after environmental compensation; Using the environmental semantic feature data and the personalized physiological feature vector, an environment-behavior interaction analysis is performed via a Bayesian causal inference model to output an environment-behavior association feature; Inputting the environment-behavior association feature and the personalized physiological feature vector into a graph attention network, performing multi-dimensional feature fusion through an environmental condition gating mechanism, and generating a dynamic feature representation; According to the dynamic feature representation, a hierarchical baseline transfer learning module constructs sub-baselines for different environment types to obtain an environment adaptive baseline model; Based on the environment-adaptive baseline model, the psychological state is evaluated through a multi-level anomaly detector, and a warning signal is output through an environment-constrained anomaly scoring mechanism.

2. The artificial intelligence-based mental health monitoring method according to claim 1, characterized in that: The environmental parameters are collected in real time through a multi-source sensor network, and scene recognition is performed by an environmental context reasoning engine to obtain environmental semantic feature data, including: Receiving temperature, humidity, light, noise and air quality data through a multi-source sensor network, inputting the temperature, humidity, light, noise and air quality data into an environmental parameter normalization unit for normalization processing, and obtaining standardized environmental parameters; Obtaining air pressure, precipitation, and ultraviolet index data from a meteorological data interface, performing time series alignment processing on the air pressure, precipitation, and ultraviolet index data, and obtaining weather change characteristics; Perform multi-source fusion positioning calculation on the GPS coordinates, WiFi signal strength, and Bluetooth beacon data collected by the positioning module, and output the scene location information; Using an image acquisition unit and an acoustic acquisition unit to acquire an image stream and an audio stream of the surrounding environment, and processing the image stream and the audio stream through scene semantic analysis to obtain social environment features; Inputting the standardized environmental parameters, the weather change characteristics, the scene location information and the social environment characteristics into an environmental context reasoning engine, performing multimodal feature fusion and scene semantic reasoning, and obtaining environmental semantic feature data; Performing structured storage and real-time updating on the environmental semantic feature data to generate an environmental semantic feature data stream; The environmental semantic feature data stream is used to perform time stamp marking and data verification on the environmental semantic feature, and the verified environmental semantic feature data is output.

3. The method for monitoring mental health based on artificial intelligence according to claim 1, characterized in that: The method of extracting features of multi-dimensional physiological signals and modeling individual differences through an environment adaptive signal processing algorithm according to the environment semantic feature data to obtain a personalized physiological feature vector after environment compensation includes: Collecting electrocardiogram, electroencephalogram, skin conduction and respiration data through a physiological signal acquisition device, and performing time domain feature calculation on the electrocardiogram, electroencephalogram, skin conduction and respiration data to obtain original physiological feature data; Time-aligning the environmental semantic feature data with the original physiological feature data, compensating for environmental interference in the original physiological feature data through weighted processing, and obtaining compensated physiological features; Performing frequency domain decomposition on the compensated physiological characteristics, decomposing the electrocardiogram signal into low-frequency, medium-frequency, and high-frequency components, and decomposing the electroencephalogram signal into α, β, θ, and δ bands, to obtain multi-band feature data; Calculating characteristic statistics according to the multi-band characteristic data, including mean, variance, kurtosis, and skewness, and generating a statistical characteristic vector; Calculate the similarity between the statistical feature vector and the historical sample data, extract the individual feature difference parameters, and perform personalized correction on the statistical feature vector to obtain a corrected feature vector; The corrected feature vector is dimensionally converted and normalized by an environment-adaptive signal processing algorithm to obtain a personalized physiological feature vector after environment compensation.

4. The method for monitoring mental health based on artificial intelligence according to claim 1, characterized in that: The method of using the environmental semantic feature data and the personalized physiological feature vector to perform environment-behavior interaction analysis via a Bayesian causal inference model and outputting environment-behavior association features includes: Dividing the environmental semantic feature data into multiple time series segments according to the time window, performing feature extraction on each time series segment, and obtaining an environmental state sequence; Constructing a state transition matrix according to the environmental state sequence, calculating the transition probability between environmental states by matrix decomposition, and obtaining an environmental change pattern; Segmenting the personalized physiological feature vector into sliding windows, calculating the statistics and change trends in each window, and forming a physiological state sequence; Utilizing the environmental change pattern and the physiological state sequence, a conditional probability distribution is calculated through a Bayesian causal inference model to obtain an environmental-physiological association metric; Aligning the user activity data and the social behavior data by timestamp, performing temporal correlation analysis with the environmental-physiological association metric, and generating a behavioral response feature; The behavior response characteristics are subjected to path analysis and weight calculation through a multi-layer causal graph, and the environment-behavior correlation characteristics are output.

5. The method for monitoring mental health based on artificial intelligence according to claim 1, characterized in that: The step of inputting the environment-behavior association feature and the personalized physiological feature vector into a graph attention network, performing multi-dimensional feature fusion through an environmental condition gating mechanism, and generating a dynamic feature representation includes: Aligning the environment-behavior association feature and the personalized physiological feature vector according to timestamps, and generating a feature sequence matrix through data completion processing; Constructing feature nodes for the feature sequence matrix, calculating connection weights between nodes, and obtaining an initial feature graph structure; Using an attention calculation unit to score the importance of nodes in the initial feature graph structure to generate an attention weight distribution; Performing a gated operation on the attention weight distribution and the environmental condition information, dynamically adjusting the feature connection strength, and obtaining a gated feature map; Performing feature propagation and aggregation on the gated feature graph through a message passing mechanism to generate a node update vector; The node update vectors are temporally combined and dimensionally transformed to output dynamic feature representation.

6. The method for monitoring mental health based on artificial intelligence according to claim 1, characterized in that: According to the dynamic feature representation, the hierarchical baseline transfer learning module constructs sub-baselines for different environment types to obtain an environment adaptive baseline model, including: Performing time series decomposition on the dynamic feature representation, separating long-term features, medium-term features and short-term features, and obtaining a hierarchical feature sequence; Classify different environmental scenarios based on historical environmental data, establish an environmental type feature library, and form an environmental classification standard; The hierarchical feature sequence is grouped according to the environmental classification standard, and statistical features are calculated for each group of data to generate an environment-related feature set; Performing subspace division on the environment-related feature set, constructing feature distribution matrices under different environment types, and obtaining environmental sub-baseline data; Perform feature mapping on the environmental sub-baseline data through migration transformation, establish an associated mapping relationship between environmental types, and obtain baseline migration parameters; The baseline migration parameters and the environmental sub-baseline data are integrated and optimized to output an environmental adaptive baseline model.

7. The method for monitoring mental health based on artificial intelligence according to claim 1, characterized in that: Based on the environment adaptive baseline model, the psychological state is evaluated by a multi-level anomaly detector, and a warning signal is output through an environment constraint anomaly scoring mechanism, including: Calculating the characteristic distance between the real-time psychological state data and the environmental adaptive baseline model, normalizing the calculation results, and obtaining a deviation degree index; Conducting a hierarchical assessment of the psychological state according to the deviation degree index, calculating the instant anomaly score, the trend anomaly score and the pattern anomaly score through multi-scale comparison, and obtaining an abnormal feature vector; Calculating the spatiotemporal distribution characteristics of the abnormal state using the abnormal feature vector to generate an abnormal state distribution map; Perform correlation analysis on the abnormal state distribution map and environmental conditions, calculate the environmental constraint weight coefficient, and form a constraint scoring parameter; Performing a weighted combination of the constraint scoring parameter and the abnormal feature vector, and generating a warning level mark through multi-level threshold judgment; According to the mapping relationship between the warning level identifier and the environmental risk degree, a warning signal is output.

8. The method for monitoring mental health based on artificial intelligence according to claim 7, characterized in that: The method of performing a hierarchical assessment of the psychological state according to the deviation degree index, calculating the instant anomaly score, the trend anomaly score and the pattern anomaly score through multi-scale comparison, and obtaining an abnormal feature vector includes: The deviation degree index is divided into short-term series, medium-term series and long-term series according to the time window, and each series is smoothed to obtain multi-scale time series data; Performing sliding window analysis on the short-term sequence in the multi-scale time series data, calculating the difference between the statistic in the window and the baseline threshold, and generating an instant anomaly score; By trend decomposition, the slope of the mid-term sequence in the multi-scale time series data is calculated, and the deviation analysis of the slope change and the baseline trend is performed to obtain a trend anomaly score; Extracting pattern features using the long-term sequence in the multi-scale time series data, identifying abnormal patterns through sequence similarity calculation, and outputting a pattern anomaly score; Performing feature combination and dimension conversion on the instant anomaly score, the trend anomaly score, and the pattern anomaly score to form an anomaly feature matrix; The abnormal feature matrix is ​​subjected to dimensionality reduction and normalization processing to generate an abnormal feature vector.

9. The artificial intelligence-based mental health monitoring method according to claim 8, characterized in that: The process of calculating the slope of the mid-term sequence in the multi-scale time series data by trend decomposition, performing deviation analysis on the slope change and the baseline trend, and obtaining a trend anomaly score includes: The mid-term sequence in the multi-scale time series data is segmented according to a fixed step length, and statistical features are extracted for each segment of data to obtain sequence feature points; Perform seasonal decomposition on the sequence characteristic points to separate trend components, periodic components and random components to obtain trend sequence data; Performing linear fitting on the trend sequence data using the least square method, calculating the slope value in each time period, and forming a trend slope sequence; Perform difference calculation on the trend slope sequence and the baseline trend data, establish a slope deviation matrix, and obtain trend change characteristics; Aggregating the trend change characteristics in the time dimension by weighted averaging to generate a trend deviation vector; The trend deviation vector is amplitude normalized and threshold mapped, and a trend anomaly score is output.

10. An artificial intelligence-based mental health monitoring system, used to implement the artificial intelligence-based mental health monitoring method as described in any one of claims 1 to 9, characterized in that: The artificial intelligence-based mental health monitoring system includes: The acquisition module is used to collect environmental parameters in real time through a multi-source sensor network, perform scene recognition processing through an environmental context reasoning engine, and obtain environmental semantic feature data; A modeling module, used to extract features of multi-dimensional physiological signals and perform individual difference modeling based on the environmental semantic feature data through an environmental adaptive signal processing algorithm to obtain a personalized physiological feature vector after environmental compensation; An analysis module, used to use the environmental semantic feature data and the personalized physiological feature vector to perform environment-behavior interaction analysis via a Bayesian causal inference model, and output environment-behavior association features; An input module, used for inputting the environment-behavior association feature and the personalized physiological feature vector into a graph attention network, performing multi-dimensional feature fusion through an environmental condition gating mechanism, and generating a dynamic feature representation; A construction module, configured to construct sub-baselines for different environment types by a hierarchical baseline transfer learning module according to the dynamic feature representation, so as to obtain an environment adaptive baseline model; The evaluation module is used to evaluate the psychological state through a multi-level anomaly detector based on the environmental adaptive baseline model, and output a warning signal through an environmental constraint anomaly scoring mechanism.

Citation Information

Patent Citations

  • Wearable multi-mode emotional state monitoring device

    CN112120716A

  • Psychological health index evaluation method and system

    CN112599245A

  • Mental fitness assessment systems and methods using physiologic signal inputs

    CN113993449A

  • Method and device for studying and judging state of operating personnel in deep and far sea

    CN116548970A

  • Mental health screening intelligent identification system based on large model

    CN118471498A

Cited By

  • Psychological state assessment method and system based on environmental perception, and readable storage medium

    CN120304829A

  • Psychological state assessment method, system, and readable storage medium based on environmental perception

    CN120304829B

  • AI large model psychological evaluation and dredging voice interaction method for micro hyperbaric oxygen chamber

    CN120859497A

  • Multi-parameter environmental sensor chip data fusion method based on artificial intelligence

    CN120996118A

  • Health data processing and alarming method for family monitoring group

    CN121117854A