Anxiety risk detection system based on multi-scale time sequence feature fusion
An anxiety risk detection system that integrates multi-scale temporal features, combines short-term and long-term feature acquisition modules with an attention fusion module for anxiety risk detection. This solves the problems of insufficient data diversity and interpretability in anxiety risk detection systems, achieving high accuracy and high interpretability in anxiety risk detection.
Patent Information
- Application Number
- CN202511705585.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-20
- Publication Date
- 2026-02-13
AI Technical Summary
Existing anxiety risk detection systems are inadequate in terms of data diversity, complexity, and interpretability, making it difficult to fully integrate multimodal data, resulting in limited accuracy and a lack of interpretability in the detection results.
An anxiety risk detection system based on multi-scale temporal feature fusion is adopted. It acquires multimodal user data through short-term and long-term feature acquisition modules, performs feature fusion using an attention fusion module, and then detects anxiety risk through a detection module. The short-term feature acquisition module uses Fourier transform and local feature extraction, the long-term feature acquisition module uses one-dimensional causal convolution and variational modeling, and the attention fusion module integrates information by combining cross-branch and temporal attention.
It effectively simulates the mechanism by which the human brain processes emotional information, improving the accuracy and interpretability of anxiety risk detection. It can dynamically integrate short-term psychological state changes with long-term psychological trends, thereby increasing the credibility and transparency of the detection results.
Smart Images

Figure CN121528532A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of emotion detection, and particularly relates to an anxiety risk detection system based on multi-scale time sequence feature fusion. BACKGROUND
[0002] With the rapid development of artificial intelligence and deep learning technology, mental health monitoring and intervention systems gradually shift from traditional questionnaire surveys and manual interviews to data-driven intelligent methods. Especially in the aspect of anxiety risk detection, researchers try to use various data sources and model architectures to achieve accurate detection of individual emotional states.
[0003] In the prior art, the following mental health detection methods based on deep learning exist: (1) by analyzing the behavior data of individuals, using a deep learning model to extract features, early warning of mental health status is achieved; (2) a deep neural network is used to evaluate the mental health status of individuals and provide rehabilitation suggestions, which emphasizes the accuracy and individualization of the model in the evaluation process; (3) in a campus environment, combining psychological measurement tables and self-developed evaluation platforms, supporting mobile and desktop use, regular monitoring and individualized intervention of individual mental health are achieved.
[0004] Although the prior art has made some progress in anxiety risk detection, there are still some defects:
[0005] (1) Data diversity and complexity: the manifestation of anxiety state is diverse, involving physiological signals, behavior data, language expression and other dimensions, and existing systems often have difficulty in comprehensively integrating multi-modal data, resulting in limited accuracy of detection results.
[0006] (2) Lack of explainability: while deep learning models provide prediction results, they often lack explanation of the results, affecting user trust and acceptance of the system. SUMMARY
[0007] The anxiety risk detection system based on multi-scale time sequence feature fusion provided by the embodiments of the application can solve the problems of low accuracy and low explainability of anxiety risk detection.
[0008] The anxiety risk detection system based on multi-scale time sequence feature fusion provided by the embodiments of the application comprises:
[0009] The short-term feature acquisition module is configured to acquire short-term branch features of multi-modal data of a user; the short-term branch features are used to describe the psychological state changes of the user in a recent short time period;
[0010] The long-term feature acquisition module is configured to acquire long-term branch features of the multi-modal data; the long-term branch features are used to describe the stable psychological trend of the user in a long time period;
[0011] The attention fusion module is used to fuse short-term branch features and long-term branch features based on the attention mechanism to obtain the fusion result;
[0012] The detection module is used to process the fusion results to obtain the user's anxiety risk detection results.
[0013] Optionally, the short-term feature acquisition module includes:
[0014] The Fourier transform unit is used to perform short-time Fourier transform on multimodal data to obtain a frequency domain representation;
[0015] The compression unit is used to perform dynamic gated compression on the frequency domain representation to obtain the compressed frequency domain representation.
[0016] The inverse Fourier transform unit is used to perform an inverse Fourier transform on the compressed frequency domain representation to obtain the compressed time series.
[0017] The local feature extraction unit is used to extract local features from the compressed time series to obtain local features;
[0018] The reconstruction unit is used to compress and reconstruct local features to obtain short-term branch features.
[0019] Optionally, a compression unit is used to dynamically gate and compress the frequency domain representation using the following formula to obtain the compressed frequency domain representation. :
[0020] ;
[0021] in, This represents the Sigmoid activation function. This represents the learnable compression weights. Representing multimodal data The frequency domain representation, This represents the learnable frequency domain bias.
[0022] Optional, a local feature extraction unit, specifically used to extract the compressed feature using the following formula.
[0023] Local feature extraction is performed on time series data to obtain local features. :
[0024] ;
[0025] ;
[0026] in, Represents the ReLU activation function. and Both represent one-dimensional convolutional layers. This represents the compressed time series. Indicates to The result obtained by performing a local convolution operation.
[0027] Optionally, a reconstruction unit is used to compress and reconstruct local features using the following formula to obtain short-term branch features. :
[0028] ;
[0029] in, and Both represent learnable linear mapping parameters.
[0030] Optional, the long-term feature acquisition module includes:
[0031] The convolutional unit is used to extract long-term features of multimodal data in parallel using multiple one-dimensional causal convolutions with different dilation rates, resulting in long-term features at multiple scales; multiple scales correspond one-to-one with multiple different dilation rates;
[0032] The splicing unit is used to splice long-term features from multiple scales to obtain an overall representation;
[0033] The modeling unit is used to perform latent compression modeling on the overall representation to obtain the long-term latent variable representation;
[0034] The decoding unit is used to decode the long-term latent variable representation to obtain long-term branch features.
[0035] Optional, modeling units, specifically used to perform latent compression modeling of the overall representation using the following formula, to obtain a long-term latent variable representation. :
[0036] ;
[0037] ;
[0038] ;
[0039] in, Indicates learnable parameters, To represent as a whole, Indicates learnable parameters, Indicates based on The standard deviation of the generated latent space, Indicates based on The mean of the generated latent space, Indicates learnable parameters, Indicates learnable parameters, denotes element-wise multiplication, denotes noise subject to standard normal distribution.
[0040] Optionally, the decoding unit is specifically configured to perform the following steps:
[0041] decoding the long-term latent variable representation by using a nonlinear gating module to obtain long-term branch features :
[0042] ;
[0043] wherein, denotes a Sigmoid activation function, denotes a linear weight matrix of a gating path, denotes a bias term of the gating path, tanh( ) denotes a nonlinear activation, denotes a linear weight matrix of a feature path, denotes a bias term of the feature path.
[0044] Optionally, the attention fusion module is specifically configured to perform the following steps:
[0045] calculating a weighted influence of the long-term branch features on the short-term branch features by using a cross-branch attention module , and taking the weighted influence as a fusion feature ;
[0046] processing the fusion feature by using a time attention module to obtain a fusion result ;
[0047] wherein, , , , , , and are all learnable parameter matrices, denotes a scaling factor;
[0048] , denotes a feature value of the i-th time step of the fusion feature , denotes a number of time steps corresponding to the multi-modal data, denotes an attention weight of , , , , , and are trainable parameters, , denotes the dimension of the hidden layer in the temporal attention module, tanh( ) denotes a nonlinear activation, , .
[0049] Optionally, the detection module is specifically configured to perform the following steps:
[0050] The fusion result is processed by using a fully connected layer to obtain the anxiety risk detection result of the user :
[0051] ;
[0052] wherein, denotes a Sigmoid activation function, denotes the weight of the learnable fully connected layer, denotes the bias of the learnable fully connected layer.
[0053] The above scheme of the present application has the following beneficial effects:
[0054] In the embodiments of the present application, the psychological state changes of the user in a short period of time in the near future and the stable psychological trend of the user in a long period of time are obtained, and the short-term psychological state changes and the long-term stable psychological trend are dynamically fused, thereby effectively simulating the mechanism of the human brain when processing emotion-related information, and thus the accuracy and interpretability of the anxiety risk detection can be greatly improved when the anxiety risk detection is performed based on the fusion result.
[0055] Other beneficial effects of the present application will be described in detail in the subsequent specific embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0057] Figure 1 The structure schematic diagram of the anxiety risk detection system based on multi-scale time sequence feature fusion provided by an embodiment of the present application;
[0058] Figure 2 The structure schematic diagram of the short-term feature acquisition module provided by an embodiment of the present application;
[0059] Figure 3A structure diagram of a long-term feature acquisition module provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0060] In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular architectures, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application can be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
[0061] It is to be understood that the terminology "includes", "has", "holds", "contains" and / or "comprising", "including", "containing", "having" and / or "comprises" when used in the present specification and in the accompanying claims, specifies the presence of stated features, integers, steps, operations, elements, and / or components but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0062] It is also to be understood that the terminology "and / or" when used in the present specification and in the accompanying claims, refers to both a combination of the associated listed items as well as to all possible combinations of the associated listed items.
[0063] As used in the present specification and in the accompanying claims, the term "if' can be interpreted as meaning "when" or "upon" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [a described condition or event] is detected" can be interpreted to mean "upon determining" or "in response to determining" or "upon detecting [the described condition or event]" or "in response to detecting [the described condition or event]", depending on the context.
[0064] In addition, in the description of the present specification and in the accompanying claims, the terms "first", "second", "third", etc. are used only to distinguish descriptions, and cannot be understood as indicating or implying relative importance.
[0065] Reference in the specification to "one embodiment" or "some embodiments" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. The appearances of the phrase "in one embodiment" or "in some embodiments" in various places in the specification are not necessarily all referring to the same embodiment, although it can. The terms "including", "containing", "comprising", "having" and variations thereof in the specification are meant to encompass the item listed thereafter, but do not exclude the presence of one or more other items.
[0066] In view of the low accuracy and interpretability of current anxiety risk detection, the embodiment of the present application provides an anxiety risk detection system based on multi-scale time sequence feature fusion. The system obtains the psychological state change of the user in a short recent time period and the stable psychological trend of the user in a long time period, and dynamically fuses the short-term psychological state change and the long-term stable psychological trend, thereby effectively simulating the mechanism of the human brain in processing emotion-related information, and greatly improving the accuracy and interpretability of anxiety risk detection based on the fusion result.
[0067] The anxiety risk detection system based on multi-scale time sequence feature fusion provided by the present application will be exemplarily described below in combination with specific embodiments.
[0068] As shown in Figure 1 , the anxiety risk detection system based on multi-scale time sequence feature fusion provided by the embodiment of the present application comprises a short-term feature acquisition module, a long-term feature acquisition module, an attention fusion module and a detection module.
[0069] The short-term feature acquisition module is configured to acquire short-term branch features of multi-modal data of a user, and the short-term branch features are used to describe the psychological state change of the user in a short recent time period. The short recent time period refers to a short time period ending at the current time, for example, the last 7 days.
[0070] The long-term feature acquisition module is configured to acquire long-term branch features of the multi-modal data, and the long-term branch features are used to describe the stable psychological trend of the user in a long time period. The long time period refers to a continuous long time period ending at the current time, for example, the last 30 days.
[0071] The attention fusion module is configured to fuse the short-term branch features and the long-term branch features based on an attention mechanism to obtain a fusion result.
[0072] The detection module is configured to process the fusion result to obtain an anxiety risk detection result of the user. The anxiety risk detection result is used to indicate the anxiety risk degree of the user at a future time.
[0073] It should be noted that the information processing theory (IPT, Information Processing Theory) is a theoretical framework in cognitive psychology that describes human cognitive activities, emphasizing the mechanism of the human brain in receiving, storing, processing and outputting information. This theory analogizes the human cognitive process to the information processing process of a computer, mainly including the following core modules:
[0074] (1) Sensory input and attention selection
[0075] External stimuli first enter sensory registers (such as visual and auditory pathways), and the information is retained for a very short time. Through attention mechanisms, the system selectively processes important information while ignoring irrelevant stimuli. In anxious situations, stimuli such as sudden events, environmental stress, or social signals are quickly captured and elicit immediate responses.
[0076] (2) Working memory
[0077] Selected stimuli are temporarily stored in working memory for processing and analysis. Working memory has a limited capacity, and information is retained for a short time through rehearsal or processing. This stage can quickly reflect fluctuations in the current emotional state, such as a short-term increase in anxiety due to a sudden piece of news.
[0078] (3) Long-term memory
[0079] Information in working memory is encoded, integrated, and consolidated before entering the long-term memory system. Long-term memory stores past experiences, behavioral patterns, and emotional history, serving as a crucial basis for individual judgment, anticipation, and emotional regulation. In anxiety prediction, long-term memory corresponds to a user's past physiological, behavioral, and subjective emotional data, used to capture overall trends and individual patterns.
[0080] (4) Information processing process
[0081] Information circulates among sensory input, working memory, and long-term memory, forming judgments and behavioral responses through cognitive operations such as comparison, reasoning, and association. This process is time-dependent; short-term reactions are rapid but highly susceptible to noise, while long-term integration is robust but responses are slower.
[0082] (5) Output and behavioral decision-making
[0083] Processed information is used to guide behavioral decisions, such as emotion regulation, social interaction, or risk response.
[0084] Based on information processing theory, this application obtains users' psychological state changes in a short period of time and stable psychological trends in a long period of time, and dynamically integrates the short-term psychological state changes and long-term stable psychological trends. This can effectively simulate the mechanism of the human brain when processing emotion-related information, thereby greatly improving the accuracy and interpretability of anxiety risk detection when based on the fusion results.
[0085] The following is an example of the short-term feature acquisition module.
[0086] like Figure 2 As shown, the short-term feature acquisition module includes: a Fourier transform unit, a compression unit, an inverse Fourier transform unit, a local feature extraction unit, and a reconstruction unit.
[0087] The aforementioned Fourier transform unit is used to perform short-time Fourier transform on multimodal data to obtain a frequency domain representation.
[0088] The aforementioned multimodal data originates from continuous time-series information of user multimodal responses, encompassing four dimensions: physiological signals, behavioral patterns, subjective emotional assessments, and external context. This ensures the feasibility of model calculations and the realism of data collection. Specifically, the multimodal data can be analyzed... Perform a short-time Fourier transform to obtain the frequency domain representation. ,Right now .
[0089] in, This represents the Short Time Fourier Transform (SFT), which can effectively extract non-stationary signals. Local frequency components, This indicates the number of time steps corresponding to the multimodal data. This represents the feature dimension at each time step.
[0090] To capture time dependencies, the window length can be set to 30, i.e. Then multimode
[0091] State, data The characteristic sequence for 30 consecutive days (i.e., the last 30 days): , For the first The time step (i.e., the ) The characteristic sequence of (day).
[0092] ;
[0093] .
[0094] in, Physiological signal characteristics, As behavioral pattern characteristics, For subjective emotion assessment characteristics, External context features , and These correspond to the dimensions of the four types of features, specifically... for Dimensions for Dimensions for Dimensions for Dimensions.
[0095] wherein the physiological signal features can be collected by wearable devices (e.g., smartwatches, etc.) in real time, including heart rate (HR), heart rate variability (HRV), electrodermal activity (EDA), and skin temperature (Temp). In each one-minute sampling period, the system extracts statistical and frequency domain features, such as mean, standard deviation, dominant frequency energy, spectral entropy, etc., to form the physiological feature vector. For example:
[0096] ;
[0097] denotes the mean of heart rate on day , denotes the SDNN of heart rate variability on day (SDNN refers to the standard deviation of all normal sinus RR intervals within 24 hours, and RR interval refers to the interval time between adjacent heartbeats), denotes the mean of electrodermal activity on day , denotes the variance of skin temperature on day .
[0098] If the user measures the average heart rate on day to be 82 bpm, HRV(SDNN) to be 45 ms, the average electrodermal activity to be 0.35µS, and the temperature variance to be 0.28, then:
[0099] .
[0100] The behavior pattern features are recorded by the mobile phone application, including activity amount, rest quality, and social behavior frequency. Typical features include: daily steps, sleep duration, phone usage time, and social application opening times. For example:
[0101] ;
[0102] wherein denotes the daily steps, denotes the sleep duration, denotes the phone usage time, denotes the social application opening times.
[0103] If the user's steps on day are 7200, the sleep is 6.5 hours, the phone usage is 4.3 hours, and the social application is opened 38 times, then:
[0104] .
[0105] The subjective emotion evaluation features are obtained by completing a short self-evaluation questionnaire of emotion every day through a mobile terminal, and valence and arousal of two dimensions are recorded based on the Russell emotion circumplex model (Circumplex Model of Affect), and an anxiety self-evaluation score (Anxiety). Among them, the valence reflects the positive and negative of the user's subjective emotion (from “extremely unhappy” to “extremely happy”), the arousal represents the emotional activation level (from “extremely calm” to “extremely nervous”), and the two together constitute a continuous representation of the individual emotional state. The anxiety self-evaluation score is used to provide an explicit subjective risk label. An example questionnaire is shown in Table 1:
[0106] Table 1 Example questionnaire based on Russell emotion circumplex model If the user's step count is 7200 steps, sleep is 6.5 hours, mobile phone use is 4.3 hours, and social application is opened 38 times on the first day:
[0107] .
[0108] The subjective emotion evaluation features are obtained by completing a short self-evaluation questionnaire of emotion every day through a mobile terminal, and valence and arousal of two dimensions are recorded based on the Russell emotion circumplex model (Circumplex Model of Affect), and an anxiety self-evaluation score (Anxiety). Among them, the valence reflects the positive and negative of the user's subjective emotion (from “extremely unhappy” to “extremely happy”), the arousal represents the emotional activation level (from “extremely calm” to “extremely nervous”), and the two together constitute a continuous representation of the individual emotional state. The anxiety self-evaluation score is used to provide an explicit subjective risk label. An example questionnaire is shown in Table 1:
[0109] Table 1 Example questionnaire based on Russell emotion circumplex model
[0110] If the user's self-evaluation valence is 4.0 (low), arousal is 6.5 (high), and anxiety self-evaluation is 7.0 on the first day:
[0111] . The external context features include date (weekday / weekend), weather temperature, weather condition (sunny, rainy, cloudy), and geographical location category (home, school, company, etc.). For easy calculation, numerical encoding is used, for example:
[0112]
[0113] ;
[0114] wherein, represents a date, represents a weather temperature, represents a weather condition, represents a geographical location category.
[0115] If the day is Wednesday, the temperature is 25°C, the weather is sunny (encoded as 1), and the location is a school (encoded as 3), then:
[0116] .
[0117] Based on the above example, is: .
[0118] The compression unit is configured to perform dynamic gated compression on the frequency domain representation to obtain a compressed frequency domain representation.
[0119] In some embodiments of the present application, the compression unit is specifically configured to perform dynamic gated compression on the frequency domain representation by the following formula to obtain a compressed frequency domain representation :
[0120] ;
[0121] wherein, represents a Sigmoid activation function, represents a learnable compression weight, represents a frequency domain representation of the multi-modal data , and represents a learnable frequency domain bias.
[0122] The inverse Fourier transform unit is configured to perform inverse Fourier transform on the compressed frequency domain representation to obtain a compressed time sequence.
[0123] Specifically, the inverse Fourier transform on the compressed frequency domain representation can be performed by the following formula to obtain a compressed time sequence :
[0124] ;
[0125] wherein, represents an inverse Fourier transform, which is used to restore the time sequence structure.
[0126] The local feature extraction unit is configured to perform local feature extraction on the compressed time sequence to obtain a local feature.
[0127] In some embodiments of the present application, the local feature extraction unit is specifically configured to perform local feature extraction on the compressed time sequence by the following formula to obtain a local feature
[0128] The compressed time series is subjected to local feature extraction using the following formula to obtain local features. :
[0129] ;
[0130] ;
[0131] in, Represents the ReLU activation function. and Both represent one-dimensional convolutional layers used to capture local peaks and abrupt change patterns in temporal sequences. This represents the compressed time series. Indicates to The result obtained by performing a local convolution operation.
[0132] The above reconstruction unit is used to compress and reconstruct local features to obtain short-term branch features.
[0133] In some embodiments of this application, the reconstruction unit primarily reconstructs short-term branch features of the short-term representation through residual compression. Specifically, the reconstruction unit is used to compress and reconstruct local features using the following formula to obtain short-term branch features. :
[0134] ;
[0135] in, and All of these represent learnable linear mapping parameters, ensuring that features retain necessary temporal information while being compressed.
[0136] In summary, the short-term feature acquisition module combines frequency domain compression and time domain residual contraction mechanisms to suppress high-frequency interference and enhance local dynamics, thereby effectively simulating the rapid response mechanism of "perception-working memory" in the human cognitive system, describing the changes in the user's psychological state in a short period of time, and focusing on identifying drastic fluctuations and local anomalies in the short term.
[0137] The short-term branch features output by the short-term feature acquisition module reflect the immediate state of an individual (i.e., a user) within a short time window, and these features have the following properties:
[0138] High sensitivity: Strong response to short-term significant fluctuations in the input sequence (such as a sudden increase in heart rate, a sudden drop in sleep, etc.);
[0139] High-frequency dynamics: The spectrum of the output signal is mainly concentrated in the high-frequency range, indicating strong changes in a short period of time;
[0140] Volatility: Sensitivity to sudden events or changes in situation reflects an individual's (i.e., the user's) ability to react emotionally in real time.
[0141] This characteristic corresponds to the role of the "working memory system" in cognitive psychology, which is responsible for processing rapidly changing stimuli and immediate emotional feedback in the environment, thereby forming a rapid estimate of the current anxiety state.
[0142] The following is an illustrative example of the long-term feature acquisition module.
[0143] like Figure 3 As shown, the long-term feature acquisition module includes: a convolutional unit, a splicing unit, a modeling unit, and a decoding unit.
[0144] The above convolutional unit is used to extract long-term features of multimodal data in parallel using multiple one-dimensional causal convolutions with different inflation rates, resulting in long-term features at multiple scales; multiple scales correspond one-to-one with multiple different inflation rates.
[0145] It should be noted that the multimodal data input to the above convolutional units is the same as the multimodal data input to the short-term feature acquisition module, which is the aforementioned multimodal data. .
[0146] In some embodiments of this application, multiple different expansion rates can be utilized. One-dimensional causal convolution in parallel extraction of long-term features:
[0147] ;
[0148] in, , The quantity of expansion rate, To utilize the expansion rate One-dimensional causal convolution is used to extract features from multimodal data, yielding long-term features. This is a one-dimensional causal convolution. The dilation rate is... Used to control the size of the receptive field, ensuring that dependency patterns at different levels are effectively encoded.
[0149] The above splicing unit is used to splice long-term features at multiple scales to obtain an overall representation.
[0150] In some embodiments of this application, long-term features at multiple scales can be stitched together to obtain an overall representation using the following formula. :
[0151] ;
[0152] In the above formula, represents a feature concatenation operation, and the dimension is from extended to , represents the feature dimension of the long-term feature at a single scale.
[0153] The above modeling unit is configured to model latent compression of the overall representation, to obtain a long-term latent variable representation.
[0154] After obtaining the overall representation through the concatenation operation , a variational information bottleneck mechanism is introduced to model latent compression of the multi-scale long-term feature. First, two sets of linear transformations are used to generate mean and standard deviation parameters of the latent space, and then the reparameterization trick is used to sample the long-term latent variable representation from the latent distribution.
[0155] Specifically, the modeling unit is configured to model latent compression of the overall representation through the following formula, to obtain a long-term latent variable representation :
[0156] ;
[0157] ;
[0158] ;
[0159] wherein, represents a learnable parameter, represents the overall representation, represents a learnable parameter, represents the standard deviation of the latent space generated based on , represents the mean of the latent space generated based on , represents a learnable parameter, represents a learnable parameter, represents element-wise multiplication, represents noise following a standard normal distribution. , , , , , represents the feature dimension of the latent space.
[0160] The above decoding unit is configured to decode the long-term latent variable representation, to obtain a long-term branch feature.
[0161] In some embodiments of the present application, the latent variable can be decoded through a layer of nonlinear gating mechanism to generate a long-term semantic feature (i.e., a long-term branch feature).
[0162] In particular, the decoding unit is configured to perform the following steps:
[0163] decode the long-term latent variable representation using a nonlinear gating module to obtain long-term branch features :
[0164] ;
[0165] wherein, denotes a Sigmoid activation function, denotes a linear weight matrix of the gating path, denotes a bias term of the gating path, tanh( ) denotes a nonlinear activation, tanh( ) is used to generate fused features, denotes a linear weight matrix of the feature path, denotes a bias term of the feature path, denotes an element-wise multiplication, realizing gating control, , and are learnable parameters.
[0166] In summary, considering that long-term emotional evolution has problems such as information redundancy and fluctuation ambiguity, the long-term feature acquisition module compresses, abstracts, and generalizes modeling of multi-scale long-term features by introducing an information bottleneck idea and a variational modeling mechanism, enhances the structural robustness and generalization ability of the model in the long term, and thus effectively simulates the long-term memory mechanism in cognitive psychology, describes the stable psychological trend of the user in a long period of time, and captures the potential long-range dependence relationship of the user's emotional state in the time series.
[0167] The long-term branch features output by the long-term feature acquisition module represent the stable psychological trend of an individual (i.e., a user) in a long time scale, and the features include:
[0168] smoothness: small change in output between adjacent time points, reflecting the long-term inertia of emotions;
[0169] robustness: suppresses transient noise interference through a variational bottleneck mechanism, retaining only stable trend components;
[0170] abstraction: after multi-scale feature fusion, higher-level implicit representations are formed, similar to human summary and integration of emotional experience.
[0171] This feature corresponds to the "long-term memory system" in cognitive psychology, which mainly forms stable emotional patterns or anxiety susceptibility tendencies through multiple experience accumulations, providing a baseline reference for subsequent cognitive processing.
[0172] In some embodiments of this application, after obtaining long-term and short-term branch features, the attention fusion module employs a cross-branch attention fusion mechanism to establish an information exchange channel between long-term and short-term features, thereby achieving dynamic integration across multiple time scales. Through this mechanism, the model can capture long-term trends while maintaining high sensitivity to short-term sudden changes, ensuring that anxiety risk prediction possesses both stability and responsiveness.
[0173] Specifically, the attention fusion module described above is used to perform the following steps:
[0174] First, the weighted influence of long-term branch features on short-term branch features is calculated using the cross-branch attention module. and will weighted influence As a fusion feature Then, the temporal attention module is used to process the fused features. The process is performed to obtain the fusion result. .
[0175] in, , , , , , and These are all learnable parameter matrices used to map the original features to a unified attention space. This represents the scaling factor, with values ranging from 1 to 2. or The size of the last dimension of the matrix is used to prevent the attention weights from becoming too large, which could lead to gradient instability.
[0176] Weighted impact The calculation can be understood as follows: the short-term branch actively "inquires" about the relevance of the long-term branch at different time steps through a query, and the system uses the similarity matrix to... Weighted aggregation of long-term features yields a reconstructed long-term context representation from a short-term perspective. This operation allows the model to dynamically retrieve the long-term information most relevant to the current state while focusing on current changes, forming a temporally dependent fusion representation (i.e., fusion features). ).
[0177] To further highlight the importance of key time segments in the anxiety evolution process, the system uses the fused feature sequence (i.e., fused features) This paper introduces a time-wise attention mechanism. Its core idea is to identify the segment in the time sequence that contributes the most to the final prediction through learnable weights. For fused features... the eigenvalue of the fusion feature at the th time step, and the attention weight is obtained by Softmax normalization . Subsequently, the system weights and sums the features of all time steps according to the attention weight to obtain the sample-level global temporal representation (i.e., the fusion result ).
[0178] Specifically, , denotes the eigenvalue of the fusion feature at the th time step, denotes the number of time steps corresponding to the multi-modal data, denotes the attention weight of , denotes the relative importance of in the anxiety state evaluation, , , , and are trainable parameters, , denotes the dimension of the hidden layer in the temporal attention module, is a hyperparameter set according to actual conditions, used to control the complexity of the attention score calculation, and tanh( ) denotes a nonlinear activation, , .
[0179] After obtaining the fusion result , the detection module can process the fusion result using a fully connected layer to obtain the anxiety risk detection result of the user:
[0180] ;
[0181] wherein, denotes a Sigmoid activation function, denotes the weight of the learnable fully connected layer, denotes the bias of the learnable fully connected layer, and the anxiety risk detection result is a numerical value between 0 and 10, and the larger the value, the more anxious, 0 indicates complete non-anxiety, and 10 indicates extreme anxiety. Among them, , , denotes the input feature number of the fully connected layer.
[0182] It can be understood that, based on the characteristics of the aforementioned multi-modal data (e.g., data for nearly 30 days), the final output anxiety risk detection result can correspond to the anxiety risk detection value for the next 30 days.
[0183] In summary, the attention fusion module and the detection module realize the cooperative optimization of multi-time scale information in structure: the long-term branch provides stable emotional trend features, the short-term branch provides sensitive instantaneous reaction features, and the time attention module further emphasizes the prediction contribution of the key period after fusion, thereby effectively simulating the information processing process and output and behavior decision-making in cognitive psychology, realizing high-precision and interpretable anxiety risk detection.
[0184] It should be noted that the aforementioned anxiety risk detection system composed of the short-term feature acquisition module, the long-term feature acquisition module, the attention fusion module, and the detection module will be trained using a large number of training samples (each sample includes a data structure consistent with the aforementioned multi-modal data, and a label corresponding to the data, which is used to indicate the anxiety risk degree, a value between 0 and 10, the larger the value, the more anxious, 0 means completely not anxious, and 10 means extremely anxious) before being actually used for detection, so as to configure the learnable parameters (such as compression weights, learnable parameters, etc.), trainable parameters, and learnable matrices in the anxiety risk detection system to the best values, and ensure the detection accuracy. The training process of the anxiety risk detection system can use the training method of the commonly used convolutional neural network model, and the loss function of the training can use the mean square error loss.
[0185] Overall, the present application combines the multi-scale structure of the long-term branch and the short-term branch, and the core goal is to simultaneously improve the accuracy and interpretability of anxiety risk detection, especially for the non-stationarity and individual difference problems across time scales in emotional data. Existing methods (such as single LSTM or CNN model) often assume that emotional evolution is a smooth and continuous process, ignoring the coupling effect of anxiety between short-term stress and long-term personality inclination, resulting in difficulty in capturing sudden fluctuations and maintaining the stability of long-term trends. Therefore, the present application introduces two functionally complementary branch structures: First, the long-term branch (V-MSD-FM) is used to model the emotional change trend and individual stable features of the user on a time scale of several weeks or even months. For example, if a user has been in a state of high arousal but stable happiness for the past month (calculated as 30 days), this branch will extract this "high vigilance but stable mood" long-term pattern through multi-scale dilated convolution and variational bottleneck mechanism, thereby providing a baseline reference.
[0186] The second is a short-term branch (FDT-RSM) for capturing the user's immediate emotional fluctuations and environmental trigger reactions in the past few days. For example, when the user has been sleep-deprived or has drastically reduced exercise for three consecutive days, the branch will respond to the frequency energy changes, identify the abnormally high-frequency fluctuation characteristics in the short term, and thus reflect the possible acute anxiety reaction.
[0187] Through the attention fusion module, the system can dynamically balance the long-term steady-state characteristics and short-term disturbance signals. For example, when the short-term branch detects short-term high fluctuations but the long-term branch judges that the trend is stable, the anxiety risk output by the model will be reasonably suppressed to avoid "false positives"; conversely, when the short-term and long-term signals jointly point to an anxiety rising trend, the model will enhance the risk intensity output, achieving the unity of time consistency and context sensitivity.
[0188] The psychological basis of this structural design comes from the "dual-path model" of human emotional processing: the human brain has a "fast perceptual path" and a "slow cognitive path" when responding to emotional stimuli. The former corresponds to rapid sensory reactions (such as short-term stress), and the latter corresponds to the regulation process of long-term experience and emotional memory. Correspondingly, FDT-RSM simulates the immediate perceptual processing of the former, and V-MSD-FM simulates the long-term cognitive integration of the latter, enabling the model to have a human-like cognitive mechanism at the structural level. Therefore, this dual-branch design is not simply a superposition of modeling performance, but rather a mapping of the dual-time processing mechanism of human emotional regulation to the structural correspondence of deep networks, introducing a variational bottleneck mechanism and residual compression design, enabling the model to have clear feature paths and weight attribution capabilities, which is conducive to explaining the causes and changes of anxiety, providing traceable and understandable auxiliary information for clinical intervention, overcoming the limitations of "black box" prediction in the prior art, and greatly improving the accuracy and explainability of anxiety risk detection.
[0189] To verify the feasibility of the present application, the system conducted experiments on actual collected multi-source time series data. The experimental subjects were 16 users, with an average data collection period of about 3 months per user. The data included daily physiological signals (such as heart rate variability, sleep duration), behavioral patterns (such as mobile phone usage frequency, social interaction frequency), external context (such as date, weather), and daily emotional self-assessment questionnaires (based on the Russell emotional circle model to record happiness, arousal, and anxiety self-assessment scores).
[0190] The model input is a sequence of 30 consecutive days of multi-modal features of the user, and the model output is the average anxiety risk prediction value for the next 30 days. The short-term branch (FDT-RSM) mainly captures recent emotional fluctuations and sudden changes; the long-term branch (V-MSD-FM) extracts long-term trends and potential stable patterns. The cross-branch attention fusion module integrates short-term and long-term features to form the final prediction.
[0191] In the experiment, the detection results of the system are compared with two types of traditional time sequence models: single BiLSTM model and causal convolution network (TCN). The evaluation indexes include mean square error (MSE), mean absolute error (MAE) and Pearson correlation coefficient (r). The experimental results are shown in Table 2: Table 2 Comparison of experimental results of the method of the application and other methods
[0192] The experimental results show that the method of the application is obviously better than the traditional single-branch time sequence model in predicting the average anxiety risk of 16 users in the next 30 days, the mean square error is reduced by about 32%~36%, and the Pearson correlation coefficient is significantly improved, which verifies the effectiveness of short-term-long-term collaborative modeling and cross-branch attention fusion in capturing the regularity and trend of user emotional changes.
[0193] The above experimental results prove that the application can use historical multi-modal time sequence data to accurately predict the average anxiety state of users in the next week, providing a feasible basis for personalized intervention, and embodying the practicability and feasibility of the proposed neural network structure and method.
[0194] In summary, the application simulates the "perception-memory-response" chain in the human emotional processing process, combines frequency domain compression, variational information bottleneck and multi-scale causal convolution, and constructs a deep neural network structure with dynamic modeling and explainability. The system not only can early predict and time sequence analyze the individual anxiety state, but also can provide support for subsequent intervention strategies, and is suitable for psychological health monitoring, human-computer interaction, intelligent medical treatment and other scenes.
[0195] The above describes the preferred embodiments of the application. It should be noted that for those skilled in the art, without departing from the principles of the application, some improvements and refinements can be made, which should also be considered as the protection scope of the application.
Claims
1. An anxiety risk detection system based on multi-scale temporal feature fusion, characterized in that, include: The short-term feature acquisition module is used to acquire short-term branch features of the user's multimodal data; The short-term branch feature is used to describe the changes in the user's psychological state in a short period of time recently; The long-term feature acquisition module is used to acquire long-term branch features of the multimodal data; the long-term branch features are used to describe the stable psychological trends of the user over a long period of time. The attention fusion module is used to fuse the short-term branch features and the long-term branch features based on the attention mechanism to obtain a fusion result; The detection module is used to process the fusion results to obtain the user's anxiety risk detection results.
2. The anxiety risk detection system according to claim 1, characterized in that, The short-term feature acquisition module includes: The Fourier transform unit is used to perform a short-time Fourier transform on the multimodal data to obtain a frequency domain representation; A compression unit is used to perform dynamic gated compression on the frequency domain representation to obtain a compressed frequency domain representation. The inverse Fourier transform unit is used to perform an inverse Fourier transform on the compressed frequency domain representation to obtain the compressed time series. The local feature extraction unit is used to extract local features from the compressed time series to obtain local features; The reconstruction unit is used to compress and reconstruct the local features to obtain short-term branch features.
3. The anxiety risk detection system according to claim 2, characterized in that, The compression unit is specifically used to perform dynamic gated compression on the frequency domain representation using the following formula to obtain the compressed frequency domain representation. : ; in, This represents the Sigmoid activation function. This represents the learnable compression weights. Representing multimodal data The frequency domain representation, This represents the learnable frequency domain bias.
4. The anxiety risk detection system according to claim 3, characterized in that, The local feature extraction unit is specifically used to extract the compressed time series using the following formula. Local feature extraction, obtaining local features : ; ; in, Represents the ReLU activation function. and Both represent one-dimensional convolutional layers. This represents the compressed time series. Indicates to The result obtained by performing a local convolution operation.
5. The anxiety risk detection system according to claim 4, characterized in that, The reconstruction unit is specifically used to compress and reconstruct the local features using the following formula to obtain short-term branch features. : ; in, and Both represent learnable linear mapping parameters.
6. The anxiety risk detection system according to claim 1, characterized in that, The long-term feature acquisition module includes: The convolutional unit is used to extract long-term features of the multimodal data in parallel using multiple one-dimensional causal convolutions with different dilation rates, thereby obtaining long-term features at multiple scales; the multiple scales correspond one-to-one with the multiple different dilation rates; The splicing unit is used to splice long-term features from multiple scales to obtain an overall representation; A modeling unit is used to perform latent compression modeling on the overall representation to obtain a long-term latent variable representation; The decoding unit is used to decode the long-term latent variable representation to obtain long-term branch features.
7. The anxiety risk detection system according to claim 6, characterized in that, The modeling unit is specifically used to perform latent compression modeling on the overall representation using the following formula to obtain a long-term latent variable representation. : ; ; ; in, Indicates learnable parameters, This represents the overall representation. Indicates learnable parameters, Indicates based on The standard deviation of the generated latent space, Indicates based on The mean of the generated latent space, Indicates learnable parameters, Indicates learnable parameters, This represents element-wise multiplication. This represents noise that follows a standard normal distribution.
8. The anxiety risk detection system according to claim 7, characterized in that, The decoding unit is specifically used to perform the following steps: The long-term latent variable representation is decoded using a nonlinear gating module to obtain long-term branch features. : ; in, This represents the Sigmoid activation function. The linear weight matrix representing the gated path. The bias term representing the gated path, tanh( ) indicates nonlinear activation. The linear weight matrix representing the feature path. The bias term represents the feature path.
9. The anxiety risk detection system according to claim 1, characterized in that, The attention fusion module is specifically used to perform the following steps: The weighted influence of long-term branch features on short-term branch features is calculated using a cross-branch attention module. and will weighted influence As a fusion feature ; The fused features are processed using a time attention module. The process is performed to obtain the fusion result. ; in, , , , , , and All are learnable parameter matrices. Indicates the scaling factor; , Indicates fusion features The The feature values at each time step This indicates the number of time steps corresponding to the multimodal data. express Attention weights , , , and All of these are trainable parameters. , tanh represents the dimension of the hidden layer in the temporal attention module. ) indicates nonlinear activation. , .
10. The anxiety risk detection system according to claim 1, characterized in that, The detection module is specifically used to perform the following steps: The fusion result is processed using a fully connected layer to obtain the user's anxiety risk detection result. : ; in, This represents the Sigmoid activation function. This represents the weights of the learnable fully connected layer. This represents the bias of a learnable fully connected layer.
Citation Information
Cited By
Intelligent anxiety decision-making method and system based on knowledge retrieval enhancement
CN122201651A