A method and system for early warning of wandering behavior in alzheimer's patients

By constructing a hierarchical graph attention network and a causal dilation encoder early warning model, and combining sensor data, the problems of lag and high false alarm rate in the early warning of wandering behavior of Alzheimer's patients in the existing technology are solved, and high-precision early warning and accurate differentiation are achieved.

CN121533719BActive Publication Date: 2026-04-17湖南工商大学
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
湖南工商大学
Filing Date
2026-01-20
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing intelligent monitoring devices suffer from problems such as delayed warnings and high false alarm rates in predicting wandering behavior in Alzheimer's patients, making it impossible to intervene in advance or accurately distinguish between purposeful walking and aimless wandering.

Method used

A loitering behavior early warning model is constructed using a hierarchical graph attention network and a causal dilation encoder. It integrates spatial and temporal context features, collects data through motion and physiological sensors and environmental sensors, and performs multimodal fusion by combining cross-graph attention mechanism and gating mechanism to output the loitering behavior early warning level.

Benefits of technology

It improved the accuracy of early warning, reduced the false alarm rate, and enabled early warning and accurate differentiation of wandering behavior in Alzheimer's patients, thus reducing false alarms and missed reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121533719B_ABST
    Figure CN121533719B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of medical care, and particularly discloses a wandering behavior early warning method and system for Alzheimer's disease patients, wherein the method constructs a physical space graph and a logical relationship graph through a hierarchical graph attention network; the method introduces the logical relationship graph into the physical space graph, adds the logical and causal correlation of the behavior of the patient into a behavior prediction algorithm, improves the prediction accuracy, and reduces the false positive rate. The application also proposes a multi-modal fusion strategy based on a gating mechanism, which retains the fine-grained correlation between modes, reduces the limitation of noise and missing data, and thus improves the prediction accuracy of context-aware fusion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical care technology, specifically to a method and system for early warning of wandering behavior in Alzheimer's patients. Background Technology

[0002] Unconscious wandering is one of the most common symptoms of Alzheimer's disease, often accompanied by a range of behaviors such as emotional agitation and getting lost. If caregivers do not notice the patient's wandering behavior in time, the patient may go out alone, get lost, and face the risk of getting lost. Alzheimer's patients already have memory confusion and poor communication skills, so once they get lost, the difficulty of finding them increases significantly. Medical research shows that wandering behavior occurs quite frequently, and there are numerous cases of wandering behavior developing into getting lost. This poses a huge and exhausting problem for family members and caregivers, and is the biggest challenge in providing care and rehabilitation for Alzheimer's patients.

[0003] Currently, there are two main approaches to addressing this issue: human care and intelligent monitoring equipment. However, each has its shortcomings in practical application. Human caregivers are meticulous and have strong adaptability, but they cannot provide 24-hour real-time monitoring. Furthermore, human caregivers can only handle post-incident issues and find it difficult to detect loitering behavior in advance.

[0004] Intelligent monitoring devices can monitor 24 hours a day and are relatively cheaper, but their early warning systems are sometimes delayed.

[0005] Existing smart care technologies are mostly reactive, such as door magnetic alarms and electronic fences. The alarm is triggered only when the patient has already left the safe area, which is too late and cannot provide preventative intervention. Secondly, the data used is limited, resulting in a high false alarm rate. Relying solely on GPS positioning or a single motion sensor cannot accurately distinguish between purposeful walking and aimless wandering, and is prone to generating a large number of false alarms due to normal activities.

[0006] In conclusion, there is an urgent need for a method and system to predict wandering behavior in Alzheimer's patients and address the problems in existing technologies. Summary of the Invention

[0007] The purpose of this invention is to provide a method and system for early warning of wandering behavior in Alzheimer's patients, and the specific technical solution is as follows:

[0008] A method for predicting wandering behavior in Alzheimer's patients includes the following steps:

[0009] Patients are fitted with motion and physiological sensors, and environmental sensors are installed in their living areas to collect motion and physiological data and environmental data. The motion and physiological data and environmental data are then input into a loitering behavior early warning model, which outputs a loitering behavior early warning level.

[0010] The process of constructing a loitering behavior early warning model includes:

[0011] S1: Construct a hierarchical graph attention network, which includes a physical space graph and a logical relationship graph. A cross-graph attention mechanism is used to combine the physical space graph and the logical relationship graph. The hierarchical graph attention network is used to fuse spatial context feature vectors.

[0012] S2: Construct a causal dilation encoder, which includes a causal mask, causal dilation, and multi-head self-attention. The causal dilation encoder is used to fuse temporal context feature vectors.

[0013] S3: Multimodal late-stage fusion based on gating mechanism, fusing the outputs of hierarchical graph attention network and causal dilation encoder to obtain the loitering behavior warning level;

[0014] S4: Construct the loss function and train the algorithms from S1 to S3 to obtain the loitering behavior early warning model.

[0015] Optionally, in S1, the nodes of the physical space graph include environmental sensor data, and the nodes are connected by edges. The edges of the physical space graph include strong connection edges, weak connection edges, and multi-hop connection edges. Strong connection edges represent two locations that are directly connected and pass through a high-frequency living area. Weak connection edges represent two locations that are directly connected and pass through a low-frequency living area. Multi-hop connections represent living areas that need to pass through other living areas to reach.

[0016] Optionally, in S1, for the physical space graph, the first node feature is obtained by initializing node features, calculating the first attention coefficient, normalizing the attention weight, and weighted summing of adjacent nodes.

[0017] Optionally, in S1, the nodes of the logical relationship graph include anxiety index, gait disorder index, circadian rhythm stability, nighttime bed-getting frequency, and environmental triggering factors, where:

[0018] The anxiety index is calculated using the following formula:

[0019] ;

[0020] in, Indicates anxiety index, express function, Indicates heart rate variability. Weights representing heart rate variability Indicates skin conductance response. Indicates the weight of skin conductance response. Indicates the bias term;

[0021] The formula for calculating the gait disorder index is as follows:

[0022] ;

[0023] in, Indicates the gait disorder index, The approximate entropy represents the computational speedup. Indicates acceleration signal, This indicates the number of times one paces back and forth within a living area. express The weights;

[0024] The formula for calculating the stability of the circadian rhythm is as follows:

[0025] ;

[0026] in, Indicates the stability of the diurnal rhythm. Indicates the start time of the patient's activity. Indicates the patient's sleep onset time;

[0027] The formula for calculating environmental triggering factors is as follows:

[0028] ;

[0029] in, Indicates environmental triggering factors, Indicates an indicator function, Indicates environmental noise. Indicates the environmental noise threshold. Indicates ambient light. Indicates the ambient light threshold;

[0030] The edges of a logical relationship graph include cooperative relationships and causal relationships;

[0031] The formula for calculating the collaborative relationship is as follows:

[0032] ;

[0033] in, express and Mutual information value between them and These represent two nodes on the logical relationship diagram. This represents the probability that two variables occur simultaneously. express The probability of it occurring alone, express The probability of it occurring alone, Indicates Take the expected value of the weighted average for each weight;

[0034] The causal relationship is determined using the Granger causality test node. Past values ​​of the section The impact of the future value of a point.

[0035] Optionally, in S1, for the logical relationship graph, the second node features are obtained by initializing node features, calculating the second attention coefficient, and weighted summing of adjacent nodes;

[0036] The expression for calculating the second attention coefficient is as follows:

[0037] ;

[0038] in, Indicates the second attention coefficient. This represents a learnable attention vector. and Representing nodes respectively and The feature space obtained by projection after linear transformation; This represents an element in the adjacency matrix.

[0039] Optionally, in S1, the cross-graph attention mechanism combines the physical space graph and the logical relationship graph to obtain the relevance scores of the physical space graph nodes and the logical relationship graph nodes. The relevance scores are then added to the original features of the physical space graph nodes using residuals to obtain the final node features.

[0040] The computational expression for the cross-graph attention mechanism is as follows:

[0041] ;

[0042] in, Indicates the relevance score. Indicates the features of the first node. Indicates the features of the second node. Represents feature weights, express function, Represents a learnable vector;

[0043] The final node feature calculation expression is as follows:

[0044] ;

[0045] in, Represents the final node characteristics, express function, Represents a logical node. Indicates the number of the logical node.

[0046] Optionally, in S2, the causal dilation encoder comprises multiple identical independent layer stacks, each independent layer comprising a causal dilation sublayer and a multi-head self-attention sublayer, with residual connections and layer normalization between the sublayers;

[0047] The causal dilation sublayer is based on one-dimensional convolution, with holes inserted between the elements of the convolution kernel to extract local temporal features;

[0048] The multi-head self-attention sublayer includes a self-attention mechanism and a multi-head mechanism. The self-attention mechanism is a causal mask, and the multi-head mechanism is used to map the input features to different subspaces and calculate the attention score separately. Finally, the attention of different subspaces is aggregated to obtain the preliminary prediction result.

[0049] Optionally, in S3, multimodal late-stage fusion is performed based on a gating mechanism, for each time step. The fusion process includes:

[0050] Step 1: Modality transformation, projecting the features of each modality into a common fusion space, unifying the dimensions and adding nonlinearity, as shown in the following expression:

[0051] ;

[0052] in, Represents the modal characteristics after transformation. Represents the initial modal characteristics. The weights representing modal features Bias terms representing modal characteristics, This represents data from the motion module, physiological module, and environmental module.

[0053] Step 2: Gating calculation, calculate a set of modal importance weights, as shown in the following expression:

[0054] ;

[0055] in, The [;] denotes modal importance weights, and [;] denotes vector concatenation. This represents the hidden state of the fused mode in the previous time step. , and Representing different learnable parameters, express function, This represents the characteristics of the transformed motion module. This represents the transformed physiological module characteristics. This represents the characteristics of the transformed environment module;

[0056] Step 3: Weighted fusion. The transformed modal features are weighted and summed using the calculated modal importance weights to obtain the fused representation at the current time step. The expression is as follows:

[0057] ;

[0058] in, , , They represent , , The corresponding modal importance weights;

[0059] Step 4: Hidden state update. Update the hidden state to record the fused historical memory. The expression is as follows:

[0060] ;

[0061] in, This represents the hidden state at the current moment. This represents the hidden state after weighted fusion. and This represents the weights and biases of the fused representation.

[0062] Optionally, in S4, the loss function expression used for algorithm training is as follows:

[0063] ;

[0064] ;

[0065] ;

[0066] in, This represents the total training loss. Indicates the main loss. Indicates auxiliary loss, Indicates hyperparameters, N Indicates the number of samples. This represents a risk parameter used to prevent underreporting. Indicates the true label, This indicates the probability that the model predicts the sample to be a positive sample. This represents the difference between the predicted values ​​at two adjacent time steps. T This represents the total number of time steps.

[0067] In addition, the present invention also provides a wandering behavior early warning system for Alzheimer's patients, for implementing the wandering behavior early warning method as described above, the wandering behavior early warning system comprising:

[0068] The data sensing module includes motion and physiological sensors, environmental sensors, and a human input interface. The motion and physiological sensors are used to collect the patient's sleep data, heart rate variability, skin conductance response, and real-time location. The environmental sensors are used to collect sound and light data of the patient's living area. The human input interface is used to manually correct errors in the sensor data.

[0069] The intelligent analysis module is used to build a loitering behavior early warning model, input the data collected by the data sensing module into the loitering behavior early warning model, and output the loitering behavior early warning level;

[0070] The early warning module is used to provide corresponding early warning information based on the warning level of loitering behavior.

[0071] The application of the technical solution of the present invention has the following beneficial effects:

[0072] This invention constructs a physical space graph and a logical relationship graph using a hierarchical graph attention network. By incorporating the logical relationship graph into the physical space graph, the causal relationships of patient behavior are integrated into the behavior prediction algorithm, improving prediction accuracy and reducing the false alarm rate. Furthermore, this invention proposes a multimodal fusion strategy based on a gating mechanism. This strategy preserves fine-grained relationships between modalities while reducing the limitations imposed by noise and missing data, thereby improving the prediction accuracy of context-aware fusion.

[0073] In addition to the objectives, features, and advantages described above, the present invention has other objectives, features, and advantages. The invention will now be described in further detail with reference to the figures. Attached Figure Description

[0074] To more clearly illustrate the technical solutions of the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0075] Figure 1 This is a flowchart illustrating the construction process of the loitering behavior early warning model in a preferred embodiment of the present invention.

[0076] Figure 2 This is a framework diagram of the loitering behavior early warning model in a preferred embodiment of the present invention. Detailed Implementation

[0077] To enable those skilled in the art to better understand the present invention, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0078] Example:

[0079] like Figure 1 As shown in the figure, this embodiment provides a method for early warning of wandering behavior in Alzheimer's patients, including the following steps:

[0080] Patients are fitted with motion and physiological sensors, and environmental sensors are installed in their living areas to collect motion and physiological data and environmental data. The motion and physiological data and environmental data are then input into a loitering behavior early warning model, which outputs a loitering behavior early warning level.

[0081] The construction process of the loitering behavior early warning model includes (S1 to S4):

[0082] S1: Construct a hierarchical graph attention network, which includes a physical space graph and a logical relationship graph. A cross-graph attention mechanism is used to combine the physical space graph and the logical relationship graph. The hierarchical graph attention network is used to fuse spatial context feature vectors.

[0083] In this embodiment, the nodes of the physical space graph include environmental sensor data, and the edges of the physical space graph include strong connection edges, weak connection edges, and multi-hop connection edges. Strong connection edges represent living areas that are directly connected between two locations and pass through frequently, weak connection edges represent living areas that are directly connected and pass through frequently, and multi-hop connections represent living areas that need to pass through other living areas to reach.

[0084] Specifically, the physical space diagram in this embodiment can be defined as follows: ,in, It is represented as a collection of nodes, mainly various environmental sensors. It is a set of edges. If two nodes are directly connected in space, then an undirected edge is formed between the two nodes. An edge is not formed if there is no direct connection. It is an adjacency matrix, a simplified digital version of the physical space graph, with matrix elements... Represents a node and The connection strength between them can be initialized based on distance or traffic frequency. , Represents a node and There are no direct connections; initially, only 0 and 1 are used to distinguish the connection status of edges. The edge weights increase as the frequency of patient visits to the two nodes increases, thus distinguishing high-frequency areas from ordinary areas. The adjacency matrix is ​​then used to digitize the entire physical space graph.

[0085] Furthermore, for the physical space graph, the first node feature is obtained by initializing node features, calculating the first attention coefficient, normalized attention weights, and weighted summation of adjacent nodes, where:

[0086] Node feature initialization: It is the set of all nodes; in this embodiment, It's the main gate. It's the living room. It is the patient's bedroom. It is a pressure sensor on the bed (the bed where the patient usually sleeps). It's the bedroom window. It's a balcony, and the other nodes also correspond to specific locations; each node has a corresponding feature vector, which describes its location within a given area. The patient's status and basic information at any given time; feature vectors are used It indicates that it includes two-dimensional spatial coordinates. This is used to determine the position of the node within the entire plane; sensor readings mainly refer to the readings of the patient's wearable device in the current state and some special nodes, such as the readings of indicators such as heart rate, blood pressure, and heart rate variability index when the patient is at the door; whether the door magnet is open or closed, whether the window is open, the pressure pad reading, etc.; patient status mainly refers to whether the signal of the patient's wearable device is detected at this node, 1 indicates that the information is detected and the patient is within the node range, 0 indicates that the information is not detected and the patient is not within the node range; time refers to the time period of the day at time t. In order to better show the periodicity of time, time is specially encoded, and each time point is encoded. t Transformed into two consecutive features: , Meanwhile, nighttime is from 10 PM to 6 AM, represented by 1, while other times are represented by 0; the eigenvectors at the same time can form a eigenmatrix. ,in, N Indicates the number of nodes. D It is the dimension of the feature vector.

[0087] Calculating the first attention coefficient, which is essentially quantifying the relationships between edges, is done using a weight matrix. Perform a linear transformation on the feature vectors of all nodes and project them onto a new feature space. For each edge, calculate a normalized attention coefficient. Used to measure nodes For nodes The importance of this is calculated using the following expression:

[0088] ;

[0089] Where || denotes the concatenation of vectors. It is a learnable weight vector that transforms the concatenated vector into a scalar. It is a non-linear activation function that allows small negative values ​​to pass through.

[0090] Normalized attention weights: To ensure comparability across different nodes, a softmax function is used to normalize the attention weights of the nodes. The attention coefficients of all neighbors are normalized. After normalization, The expression for calculating the attention coefficient is as follows:

[0091] ;

[0092] in, This represents the attention coefficient.

[0093] Weighted summation: The node is obtained by weighted summation of the transformation features of all neighboring nodes. V i The final features are then processed through a non-linear activation function to update the nodes. The expression for the node update is as follows:

[0094] ;

[0095] in, For the updated node Features ELU It is a non-linear activation function.

[0096] Furthermore, this embodiment can also introduce a multi-head attention mechanism in node updates to assist in learning the patient's personalized characteristics. The node update expression with the multi-head attention mechanism is as follows:

[0097] ;

[0098] in, M This represents the number of heads, and the final feature vector dimension is... .

[0099] In this embodiment, the logic diagram can be defined as follows: , It is a collection of nodes, representing state indicators abstracted from sensor data; It is a set of edges, representing the potential association between two logical nodes; It is an adjacency matrix. Unlike the physical space graph, the elements in the adjacency matrix here are no longer 0 or 1, but a learnable parameter that represents the strength of the logical relationship.

[0100] Furthermore, the nodes of the logical relationship graph include anxiety index, gait disorder index, circadian rhythm stability, number of times the patient gets out of bed at night, and environmental triggering factors. The node characteristics are calculated as follows:

[0101] The anxiety index is calculated using the following formula:

[0102] ;

[0103] in, Indicates anxiety index, express function, Indicates heart rate variability. Weights representing heart rate variability Indicates skin conductance response. Indicates the weight of skin conductance response. Indicates the bias term;

[0104] The formula for calculating the gait disorder index is as follows:

[0105] ;

[0106] in, Indicates the gait disorder index, The approximate entropy represents the computational speedup. Indicates acceleration signal, This indicates the number of times one paces back and forth within a living area. express The weights;

[0107] The formula for calculating the stability of the circadian rhythm is as follows:

[0108] ;

[0109] in, Indicates the stability of the diurnal rhythm. Indicates the start time of the patient's activity. Indicates the patient's sleep onset time;

[0110] The formula for calculating environmental triggering factors is as follows:

[0111] ;

[0112] in, Indicates environmental triggering factors, Indicates an indicator function, Indicates environmental noise. Indicates the environmental noise threshold. Indicates ambient light. Indicates the ambient light threshold;

[0113] The edges of a logical relationship graph include cooperative relationships and causal relationships;

[0114] The formula for calculating the collaborative relationship is as follows:

[0115] ;

[0116] in, express and Mutual information value between them and These represent two nodes on the logical relationship diagram. This represents the probability that two variables occur simultaneously. express The probability of it occurring alone, express The probability of it occurring alone, Indicates Take the expected value of the weighted average for each weight;

[0117] The causal relationship is determined using the Granger causality test node. Past values ​​of the section The impact of the future value of a point.

[0118] In this embodiment, for the logical relationship graph, the second node feature is obtained by initializing node features, calculating the second attention coefficient, and weighted summing of adjacent nodes;

[0119] Specifically, node features can be initialized through the calculation of node features, and the expression for calculating the second attention coefficient is as follows:

[0120] ;

[0121] in, Indicates the second attention coefficient. This represents a learnable attention vector. and Representing nodes respectively and The feature space obtained by projection after linear transformation; This represents an element in the adjacency matrix.

[0122] It should be noted that the weighted summation of adjacent nodes is calculated in the same way as the weighted summation of the physical space graph, and will not be repeated here.

[0123] Furthermore, the cross-graph attention mechanism combines the physical space graph and the logical relationship graph to obtain the relevance scores of the physical space graph nodes and the logical relationship graph nodes. The relevance scores are then added to the original features of the physical space graph nodes using residuals to obtain the final node features.

[0124] The computational expression for the cross-graph attention mechanism is as follows:

[0125] ;

[0126] in, Indicates the relevance score. Indicates the features of the first node. Indicates the features of the second node. Represents feature weights, express function, Represents a learnable vector;

[0127] The final node feature calculation expression is as follows:

[0128] ;

[0129] in, Represents the final node characteristics, express function, Represents a logical node. Indicates the number of the logical node.

[0130] S2: Construct a causal dilation encoder, which includes a causal mask, causal dilation, and multi-head self-attention. The causal dilation encoder is used to fuse temporal context feature vectors.

[0131] In this embodiment, the causal dilation encoder comprises multiple identical independent layer stacks. Each independent layer includes a causal dilation sublayer and a multi-head self-attention sublayer. The sublayers are connected by residual connections and layer normalization. Specifically, the causal dilation encoder is a structure composed of multiple identical layer stacks, each layer containing two core sublayers. Each sublayer is connected by residual connections and layer normalization. The first sublayer is the causal dilation sublayer, and the second is the multi-head self-attention sublayer. The causal dilation sublayer is based on traditional one-dimensional convolution, with holes inserted between the elements of the convolution kernel.

[0132] The causal dilation sublayer is based on one-dimensional convolution, with holes inserted between the elements of the convolution kernel to extract local temporal features;

[0133] The multi-head self-attention sublayer includes a self-attention mechanism and a multi-head mechanism. The self-attention mechanism is a causal mask, and the multi-head mechanism is used to map the input features to different subspaces and calculate the attention score separately. Finally, the attention of different subspaces is aggregated to obtain the preliminary prediction result.

[0134] Self-attention mechanism: By setting all elements on the main diagonal and above to 0, and the bottom left element to 0, ... lower triangular matrix The dimension is T'×T', where T' is the length of the input sequence; the expression for the triangular matrix is ​​as follows:

[0135] ;

[0136] in, This represents the time step index of the output sequence A. Represents the time step index of the input sequence B; when When time B is earlier than time A, the mask value is 0, indicating that sequence B is allowed to be observed. The time frame is defined as the current moment B being later than moment A, which is a future moment, and the mask value is [value missing]. This indicates that sequence B is completely off-limits; this mask ensures that during computation time steps... i When assigning attention weights, all The contribution of future time steps is completely blocked.

[0137] Multi-head mechanism: The input feature data is mapped to multiple different subspaces, each head independently calculates the attention score, and finally the analysis results of each head are summed, so that the algorithm can analyze time series data independently from different perspectives at the same time.

[0138] S3: Multimodal late-stage fusion based on gating mechanism, fusing the outputs of hierarchical graph attention network and causal dilation encoder to obtain the loitering behavior warning level.

[0139] In this embodiment, multimodal late-stage fusion is performed based on a gating mechanism, for each time step The fusion process includes:

[0140] Step 1: Modality transformation, projecting the features of each modality into a common fusion space, unifying the dimensions and adding nonlinearity, as shown in the following expression:

[0141] ;

[0142] in, Represents the modal characteristics after transformation. Represents the initial modal characteristics. The weights representing modal features Bias terms representing modal characteristics, The data represents the motion module, physiological module, and environmental module. In this embodiment, the sensors can be divided into motion module, physiological module, and environmental module, with each of the three modules corresponding to different sensor data.

[0143] Step 2: Gating calculation, calculate a set of modal importance weights, as shown in the following expression:

[0144] ;

[0145] in, The [;] denotes modal importance weights, and [;] denotes vector concatenation. This represents the hidden state of the fused mode in the previous time step. , and Representing different learnable parameters, express function, This represents the characteristics of the transformed motion module. This represents the transformed physiological module characteristics. This represents the characteristics of the transformed environment module;

[0146] Step 3: Weighted fusion. The transformed modal features are weighted and summed using the calculated modal importance weights to obtain the fused representation at the current time step. The expression is as follows:

[0147] ;

[0148] in, , , They represent , , The corresponding modal importance weights;

[0149] Step 4: Hidden state update. Update the hidden state to record the fused historical memory. The expression is as follows:

[0150] ;

[0151] in, This represents the hidden state at the current moment. This represents the hidden state after weighted fusion. and This represents the weights and biases of the fused representation.

[0152] S4: Construct the loss function and train the algorithms from S1 to S3 to obtain the loitering behavior early warning model.

[0153] In this embodiment, the loss function used for algorithm training is expressed as follows:

[0154] ;

[0155] ;

[0156] ;

[0157] in, This represents the total training loss. Indicates the main loss. Indicates auxiliary loss, Indicates hyperparameters, N Indicates the number of samples. This represents a risk parameter used to prevent underreporting. Indicates the true label, This indicates the probability that the model predicts the sample to be a positive sample. This represents the difference between the predicted values ​​at two adjacent time steps. T This represents the total number of time steps.

[0158] In addition, the present invention also provides a wandering behavior early warning system for Alzheimer's patients, for implementing the wandering behavior early warning method as described above, the wandering behavior early warning system comprising:

[0159] The data sensing module includes motion and physiological sensors, environmental sensors, and a human input interface. The motion and physiological sensors are used to collect the patient's sleep data, heart rate variability, skin conductance response, and real-time location. The environmental sensors are used to collect sound and light data of the patient's living area. The human input interface is used to manually correct errors in the sensor data.

[0160] The intelligent analysis module is used to build a loitering behavior early warning model, input the data collected by the data sensing module into the loitering behavior early warning model, and output the loitering behavior early warning level;

[0161] The early warning module is used to provide corresponding early warning information based on the warning level of loitering behavior.

[0162] In this embodiment, the sensors in the data sensing module are specifically as follows:

[0163] Motion and physiological sensors (which can be implemented through smart wearable devices):

[0164] 1) Motion and Sleep Quality Monitoring Sensor: Used to monitor patients' daily behavior, i.e., motion and sleep quality detection. The motion and sleep quality monitoring sensor includes a high-precision, low-noise six-axis MEMS inertial measurement unit (IMU) that continuously collects three-axis acceleration and three-axis angular velocity data. Machine learning algorithms are used to classify and identify motion patterns. Combining PPG and IMU data, cosine similarity detection and clustering algorithms are used to divide sleep-wake cycles and estimate macroscopic parameters such as sleep efficiency and number of awakenings.

[0165] 2) Photoplethysmography (PPG) sensor: This sensor collects a patient's heart rate (HR) or heart rate variability (HRV) data. It uses green LED light shining onto the skin, penetrating to the capillaries. The blood absorbs the green light; during heart contractions, the increased blood volume results in greater light absorption and less light reflected back to the sensor. By detecting this periodic change in the intensity of the reflected light, the heart rate can be calculated. Simultaneously, subtle changes in pulse intervals can be extracted from the raw PPG signal to calculate a series of indicators (such as SDNN and RMSSD). These indicators directly reflect the excitation level of the autonomic nervous system (anxiety and stress can lead to a decrease in HRV).

[0166] 3) Skin Conductivity Response (GSR) Sensor: This sensor measures skin conductivity using two electrodes. When a person experiences anxiety, tension, or emotional excitement, the sympathetic nervous system is activated, leading to sweating of the palms and soles (even if invisible to the naked eye). The electrolytes in the sweat increase the skin's conductivity. It primarily measures two indicators: skin conductivity level (SCL), a slowly changing baseline conductivity level reflecting a long-term, persistent state of anxiety; and skin conductivity response, a rapid, sudden peak in conductivity reflecting immediate emotional fluctuations or startle responses.

[0167] 4) Real-time Location Tracking System (Hybrid Positioning): The hybrid positioning system consists of multiple positioning functions. When the patient leaves home, the device switches from indoor mode to outing alert mode and sequentially activates low-power positioning: first, it quickly obtains the approximate location via Wi-Fi scanning; when the signal is poor, it seamlessly switches to cellular network base station positioning to ensure wide-area coverage; in emergencies, it activates the high-precision BeiDou module for precise positioning. All data is transmitted back to the cloud via Wi-Fi or NB-IoT, and finally integrated and presented on the caregiver's app as the patient's real-time location and movement trajectory, achieving zero-delay monitoring from passive response to proactive protection.

[0168] Environmental sensors:

[0169] 1) Door and Window Sensor: Employs Reed Switch Technology. The door and window sensor consists of two parts: a magnet and a sensor containing a metal reed, powered by a built-in button battery. The sensor body is mounted on the door or window frame, and the magnet is mounted on the door or window, ensuring that both are aligned and close enough when closed (<2cm in this embodiment). When the door / window is closed, the magnet approaches the sensor, the reed closes, the circuit is connected, and the state is "closed"; when the door / window is opened, the magnet moves away, the reed opens, the circuit is broken, and the state immediately changes to "open". Signal transmission is via Zigbee, a protocol designed for smart homes, offering low power consumption, years of battery life, and the ability to form a mesh network with a stable signal. The sensor is paired with a Samsung SmartThings home smart gateway. When the gateway receives a "open" state change event from the sensor, it immediately determines its importance. If it is triggered late at night or when the patient is alone, it is considered a high-risk event.

[0170] 2) Pressure Pad: This pad contains multiple pressure sensors or a layer of conductive ink / fabric. When pressure is applied, the internal circuitry activates, generating a "trigger" signal. The pad itself is passive and requires a wireless transmitter powered by a battery, which uses the Zigbee protocol to send "on / off" status signals. The pad is placed between the sheets and mattress, under the cushion of a frequently used chair, or under a doormat. When the pressure pad under the bed switches from a closed signal to an open signal, it indicates the patient has gotten out of bed; when the pressure pad at the door is triggered, it indicates the patient is very close to the exit. This is a very early and clear warning signal, especially at night.

[0171] 3) Acoustic-optical sensor: Composed of a photoresistor and a miniature microphone. The resistance of the photoresistor changes with light intensity. The miniature microphone, in conjunction with the circuitry, measures the decibel level of ambient sound. It only records volume, not audio, ensuring absolute privacy. Placed in the center of the living room or the patient's main activity area, it provides representative environmental data. The sensor also communicates via the Zigbee protocol. In dimly lit environments, such as when lights are off at dusk, it may exacerbate the patient's confusion and fear (sunset syndrome). Sustained high-decibel noise, such as loud television or family arguments, may cause anxiety and agitation. The system can be configured to automatically turn on the living room lights when the light level is <10 lux and the time is around sunset to prevent anxiety.

[0172] Manual input interface:

[0173] The human input interface is used to input subjective events or emergencies that the machine cannot perceive, such as visits from relatives and friends, family gatherings, etc. When sensor data produces large errors, human input can correct the model's judgment, helping the system learn the correlation between specific events and patient behavior, and building a unique predictive model for each patient. For example, when a relative or friend visits a patient, the caregiver records the event through a caregiver app on their mobile phone. Subsequently, if the radar detects that the patient's activity level has increased by 50% compared to usual, the calibration module will recognize that the increased activity level occurred during the visit and will automatically lower the risk weight of the activity level, thus avoiding unnecessary alarms.

[0174] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for early warning of wandering behavior in Alzheimer's patients, characterized in that, Includes the following steps: Patients are fitted with motion and physiological sensors, and environmental sensors are installed in their living areas to collect motion and physiological data and environmental data. The motion and physiological data and environmental data are then input into a loitering behavior early warning model, which outputs a loitering behavior early warning level. The process of constructing a loitering behavior early warning model includes: S1: Construct a hierarchical graph attention network, which includes a physical space graph and a logical relationship graph. A cross-graph attention mechanism is used to combine the physical space graph and the logical relationship graph. The hierarchical graph attention network is used to fuse spatial context feature vectors. S2: Construct a causal dilation encoder, which includes a causal mask, causal dilation, and multi-head self-attention. The causal dilation encoder is used to fuse temporal context feature vectors. S3: Multimodal late-stage fusion based on gating mechanism, fusing the outputs of hierarchical graph attention network and causal dilation encoder to obtain the loitering behavior warning level; S4: Construct the loss function and train the algorithms from S1 to S3 to obtain the loitering behavior early warning model; In S1, the nodes of the physical space graph include environmental sensor data. The nodes are connected by edges. The edges of the physical space graph include strong connection edges, weak connection edges, and multi-hop connection edges. Strong connection edges indicate that two locations are directly connected and pass through a high-frequency living area. Weak connection edges indicate that they are directly connected and pass through a low-frequency living area. Multi-hop connections indicate living areas that need to pass through other living areas to reach. For the physical space graph, the first node feature is obtained by initializing node features, calculating the first attention coefficient, normalizing the attention weight, and weighted summing of adjacent nodes; For the logical relationship graph, the second node feature is obtained by initializing the node features, calculating the second attention coefficient, and weighted summing of the adjacent nodes; The expression for calculating the second attention coefficient is as follows: ; in, Indicates the second attention coefficient. This represents a learnable attention vector. and Representing nodes respectively and The feature space obtained by projection after linear transformation; This represents an element in the adjacency matrix.

2. The loitering behavior early warning method according to claim 1, characterized in that, In S1, the nodes of the logistic graph include anxiety index, gait disorder index, circadian rhythm stability, nighttime bed-getting frequency, and environmental triggers, among which: The anxiety index is calculated using the following formula: ; in, Indicates anxiety index, express function, Indicates heart rate variability. Weights representing heart rate variability Indicates skin conductance response. Indicates the weight of skin conductance response. Indicates the bias term; The formula for calculating the gait disorder index is as follows: ; in, Indicates the gait disorder index, The approximate entropy represents the computational speedup. Indicates acceleration signal, This indicates the number of times one paces back and forth within a living area. express The weights; The formula for calculating the stability of the circadian rhythm is as follows: ; in, Indicates the stability of the diurnal rhythm. Indicates the start time of the patient's activity. Indicates the patient's sleep onset time; The formula for calculating environmental triggering factors is as follows: ; in, Indicates environmental triggering factors, Indicates an indicator function, Indicates environmental noise. Indicates the environmental noise threshold. Indicates ambient light. Indicates the ambient light threshold; The edges of a logical relationship graph include cooperative relationships and causal relationships; The formula for calculating the collaborative relationship is as follows: ; in, express and Mutual information values ​​between them and These represent two nodes on the logical relationship diagram. This represents the probability that two variables occur simultaneously. express The probability of it occurring alone, express The probability of it occurring alone, Indicates Take the expected value of the weighted average for each weight; The causal relationship is determined using the Granger causality test node. Past values ​​of the section The impact of the future value of a point.

3. The loitering behavior early warning method according to claim 2, characterized in that, In S1, the cross-graph attention mechanism combines the physical space graph and the logical relationship graph to obtain the relevance scores of the physical space graph nodes and the logical relationship graph nodes. The relevance scores are then added to the original features of the physical space graph nodes using residuals to obtain the final node features. The computational expression for the cross-graph attention mechanism is as follows: ; in, Indicates the relevance score. Indicates the features of the first node. Indicates the features of the second node. Represents feature weights, express function, Represents a learnable vector; The final node feature calculation expression is as follows: ; in, Represents the final node characteristics, express function, Represents a logical node. Indicates the number of the logical node.

4. The loitering behavior early warning method according to claim 3, characterized in that, In S2, the causal dilation encoder consists of multiple identical independent layer stacks, each layer including a causal dilation sublayer and a multi-head self-attention sublayer, with residual connections and layer normalization between the sublayers; The causal dilation sublayer is based on one-dimensional convolution, with holes inserted between the elements of the convolution kernel to extract local temporal features; The multi-head self-attention sublayer includes a self-attention mechanism and a multi-head mechanism. The self-attention mechanism is a causal mask, and the multi-head mechanism is used to map the input features to different subspaces and calculate the attention score separately. Finally, the attention of different subspaces is aggregated to obtain the preliminary prediction result.

5. The loitering behavior early warning method according to claim 4, characterized in that, In S3, multimodal late-stage fusion is performed based on a gating mechanism, for each time step The fusion process includes: Step 1: Modality transformation, projecting the features of each modality into a common fusion space, unifying the dimensions and adding nonlinearity, as shown in the following expression: ; in, Represents the modal characteristics after transformation. Represents the initial modal characteristics. The weights representing modal features Bias terms representing modal characteristics, This represents data from the motion module, physiological module, and environmental module. Step 2: Gating calculation, calculate a set of modal importance weights, as shown in the following expression: ; in, The [;] denotes modal importance weights, and [;] denotes vector concatenation. This represents the hidden state of the fused mode in the previous time step. , and Representing different learnable parameters, express function, This represents the characteristics of the transformed motion module. This represents the transformed physiological module characteristics. This represents the characteristics of the transformed environment module; Step 3: Weighted fusion. The transformed modal features are weighted and summed using the calculated modal importance weights to obtain the fused representation at the current time step. The expression is as follows: ; in, , , They represent , , The corresponding modal importance weights; Step 4: Hidden state update. Update the hidden state to record the fused historical memory. The expression is as follows: ; in, This represents the hidden state at the current moment. This represents the hidden state after weighted fusion. and This represents the weights and biases of the fused representation.

6. The loitering behavior early warning method according to claim 5, characterized in that, In S4, the loss function used for algorithm training is expressed as follows: ; ; ; in, This represents the total training loss. Indicates the main loss. Indicates auxiliary loss, Indicates hyperparameters, N Indicates the number of samples. This represents a risk parameter used to prevent underreporting. Indicates the true label, This indicates the probability that the model predicts the sample to be a positive sample. This represents the difference between the predicted values ​​at two adjacent time steps. T This represents the total number of time steps.

7. A system for early warning of wandering behavior in Alzheimer's patients, characterized in that, For implementing the loitering behavior early warning method as described in any one of claims 1-6, the loitering behavior early warning system comprises: The data sensing module includes motion and physiological sensors, environmental sensors, and a human input interface. The motion and physiological sensors are used to collect the patient's sleep data, heart rate variability, skin conductance response, and real-time location. The environmental sensors are used to collect sound and light data of the patient's living area. The human input interface is used to manually correct errors in the sensor data. The intelligent analysis module is used to build a loitering behavior early warning model, input the data collected by the data sensing module into the loitering behavior early warning model, and output the loitering behavior early warning level; The early warning module is used to provide corresponding early warning information based on the warning level of loitering behavior.

Citation Information

Patent Citations

  • Alzheimer disease diagnosis method based on multi-modal cross attention

    CN118116573A

  • Rare disease knowledge graph construction method based on modal injection and multi-modal fusion

    CN120806104A