Patient trajectory tracking system based on hospital Wi-Fi signal positioning
The system addresses precision and semantic understanding gaps in Wi-Fi patient tracking by using dynamic signal reconstruction and trajectory energy modeling, enabling effective risk prediction and management in hospitals.
Patent Information
- Application Number
- CN202510466343.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-07-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing Wi-Fi positioning system has problems in hospitals with low positioning accuracy, poor signal stability, insufficient understanding of trajectory behavior, weak linkage analysis ability of multiple patients, lack of dynamic behavior modeling and insufficient interpretability, resulting in limited application in clinical environments.
Technical means such as dynamic Wi-Fi signal fingerprint reconstruction, trajectory potential energy model, multi-patient trajectory clustering and dynamic risk diffusion boundary construction, behavioral contradiction factor warning and other technical means are adopted, and positioning accuracy and behavioral recognition capabilities are improved through Gaussian hybrid distribution adaptive learning, dynamic time regularization, graph structure modeling and other methods, and real-time monitoring and risk prediction of patient trajectory are achieved.
It realizes accurate identification and risk warning of patient behavior, improves the hospital's perception of behavioral safety of special patients, reduces the incidence of abnormal events, and can identify group abnormal behaviors in advance and actively control it, improving the adaptability and interpretability of the system.
Smart Images

Figure CN120321593A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a patient trajectory tracking system based on hospital Wi-Fi signal positioning. Background Art
[0002] Currently, the patient trajectories used for signal positioning on the market have played a certain role in improving the hospital's intelligent management level, assisting in patient behavior supervision, and improving the ability to respond to sudden risks. Especially in geriatric wards, psychiatric wards, rehabilitation areas and other places that require real-time supervision, it has been applied to a certain extent. However, there are still many deficiencies and disadvantages in actual engineering deployment, data processing logic, behavior recognition capabilities, system robustness, etc. These problems seriously limit the widespread promotion and efficient implementation of Wi-Fi positioning systems in clinical environments.
[0003] First, the current system has great limitations in positioning accuracy and signal stability. Traditional Wi-Fi positioning systems are mostly based on RSSI (received signal strength indication) triangulation positioning, signal fingerprint comparison or simple centroid algorithm. These methods are easily affected by the complex electromagnetic environment inside the hospital. For example, elevator startup, infusion pumps, electric beds, monitoring equipment, etc. will cause drastic signal fluctuations, thereby causing positioning point drift or false jumps in a short period of time, resulting in distortion of patient trajectories or even failure to restore the true path. At the same time, since the hospital Wi-Fi network is not designed for positioning, the AP deployment location is often based on network coverage rather than positioning requirements. This makes the positioning system often have blind spots or a sharp drop in accuracy at locations such as corridor corners, ward doors, and irregular spaces, causing path recognition to break, seriously affecting trajectory continuity and the accuracy of subsequent behavior analysis. Secondly, the existing system generally lacks "semantic-level understanding" of trajectory behavior, that is, the system can only identify "where the patient is", but cannot accurately judge "why it is there", "where to go", and "whether the intention is abnormal". Most systems only provide raw trajectory point aggregation or simple heat maps, and fail to introduce factors such as behavioral goals, regional semantics, and path logic for dynamic reasoning. Therefore, they cannot give accurate conclusions on key issues such as whether the patient is in a wandering state, whether he has deviated from the diagnosis and treatment area, whether he has tried to escape, and whether he has mistakenly entered a restricted area. They only rely on static rules such as time thresholds and stay radius to judge abnormalities, which is very easy to misreport and miss. Third, the current system is weak in the analysis of multi-patient linkage. In a real hospital environment, it is normal for individual behavior to affect others. Especially in scenes such as psychiatric wards and dementia wards, the behavior of an agitated patient can easily induce collective following, imitation, and collective gathering. However, most of the existing Wi-Fi trajectory systems are point-to-point isolated modeling, which cannot identify pattern overlap, asynchronous replication, and behavioral linkage between trajectories. They lack a modeling mechanism for the "trajectory propagation chain" and the "behavior diffusion network", resulting in the system being able to only alarm individual trajectories, but unable to judge the risk propagation trend, thereby missing the best time for intervention and even causing collective out-of-control events.
[0004] Fourth, the dynamic behavior modeling of traditional systems generally lacks the ability to update data and adapt models. It often relies on static fingerprint databases or early collected data to construct behavior models, ignoring factors such as the diurnal periodicity of hospital space usage frequency, changes in the density of the flow of people, and the switching of scene function time periods. This increases the probability of misjudgment in situations such as night shifts, holidays, and bed adjustments. At the same time, most systems lack self-learning and real-time correction mechanisms. Once the trajectory recognition model is deployed, it runs statically for a long time and cannot be incrementally optimized with new data, resulting in model aging and decreased adaptability. Especially when new departments are added or the building structure changes after renovation, the original parameters of the system are no longer applicable and need to be reconstructed as a whole, increasing the maintenance cost. There are significant shortcomings in the interpretability and visualization levels of the system. Although many Wi-Fi positioning systems can output trajectory points, heat maps, and behavior alarms, for medical staff, this information is still technology-oriented and difficult to form intuitive and operable intervention decisions. For example, the system shows that a certain patient has abnormal movement, but it cannot explain "what is the reason for the abnormality", "is there any connection with others", or "whether immediate intervention is needed". Medical staff can only rely on experience to judge whether to intervene, restricting the practicality of the system's auxiliary decision-making. Summary of the Invention
[0005] The purpose of the present invention is to provide a patient trajectory tracking system based on hospital Wi-Fi signal positioning, so as to solve some of the drawbacks and deficiencies pointed out in the background technology.
[0006] The technical solutions adopted by the present invention to solve its above technical problems include the following steps:
[0007] S1. Adopt dynamic Wi-Fi signal fingerprint reconstruction:
[0008] S1.1. Establish an RSSI fluctuation probability model for each AP in different time periods, and introduce Gaussian mixture distribution for adaptive learning; identify the existence of electromagnetic interference sources through continuous abnormal RSSI jumps, mark the abnormal points and isolate them;
[0009] S1.2. Continuously collect real-time data during the movement of patients for incremental fingerprint correction; gradually reweight the fingerprint database over time, taking into account historical stability and real-time accuracy;
[0010] S2. Adopt the patient movement path representation of the trajectory potential energy model:
[0011] S2.1. Convert the positioning point sequence into a spatio-temporal velocity vector to form a continuous path vector field; define the intention potential energy value in the path, and calculate it comprehensively according to the target point attraction, path deviation rate, and regional characteristics;
[0012] S2.2. Repeated high-potential transitions or abnormal potential dissipation in non-consultation areas can be judged as wandering and attempting to leave risk behaviors; construct a trajectory heat map + vector flow view to assist medical staff in identifying abnormal movement trajectories;
[0013] S3. Employ multi-patient trajectory clustering and dynamic risk diffusion boundary construction:
[0014] S3.1. Through dynamic time warping (DTW) sequence comparison, identify other patients whose trajectories highly overlap with those of abnormal patients; dynamically generate a risk contagion radius based on a comprehensive score of time synchronization rate, spatial proximity, and trajectory overlap degree;
[0015] S3.2. Use a graph structure to represent the clustering results as nodes and edges, and identify high-risk contact networks;
[0016] S3.3. Predict the spread path of the behavior of agitated patients leading multiple people to gather towards the exit, and deploy security in advance;
[0017] S4. Adopt system-level early warning using behavior contradiction factors: Define the activity patterns that each type of patient should follow, including scope, time, and frequency; compare the differences between the trajectory and the model to form a trajectory contradiction factor.
[0018] Furthermore, the method for representing the patient movement path of the trajectory potential energy model:
[0019] Capture the behavior trends and movement intentions of patients in the hospital, perform differential processing on adjacent positioning points to generate vectors representing direction and speed, and convert the original trajectory into a path vector field; the vector field represents the position change and reflects the direction consistency, speed stability, and intention continuity of the behavior;
[0020] Define the path vector within any time period as representing the movement direction and speed formed by the position change of the patient at time t i and t i+1 ; to evaluate behavior continuity, the following perturbation function is proposed:
[0021]
[0022] where:
[0023] are the current and previous trajectory vectors respectively; represents the dot product of the two vectors, measuring direction consistency; are the speed magnitudes respectively; ∈ is a very small positive number to prevent division by zero.
[0024] Furthermore, the method for representing the patient movement path of the trajectory potential energy model:
[0025] Introduce a potential energy model based on the path vector field. By simulating the behavior guidance relationship between the patient and the target in each area, it reflects the target rationality and deviation degree of the behavior; the potential energy is affected by the patient's current position and is also associated with the attractiveness of key areas within the hospital, including the outpatient clinic and the nurse station; define the following behavior potential energy function:
[0026]
[0027] Where:
[0028] E p (t) represents the behavior potential energy value of the patient at time t; T j is the position coordinate of the jth target area; ω j is the attraction weight of the regional target T j ; d(t, T j ) represents the path trajectory distance between the patient's current position and the target point T j ; λ j represents the attraction diffusion range, which determines the influence radius of a certain target area; ∈ is to prevent zero terms; σ(t) is the path deviation rate, indicating the degree to which the current position deviates from the access paths of all main target areas; η is the deviation penalty coefficient, which controls the weakening effect of deviation on the overall potential energy; ψ(R(t)) is the regional attribute function, which returns a weight value according to the characteristics of the region R(t) where the current position belongs.
[0029] Furthermore, the method for representing the patient's movement path of the trajectory potential energy model:
[0030] Abnormal behaviors are accompanied by large fluctuations or continuous jumps in potential energy within a short period of time; by aggregating and calculating the potential energy change sequence at consecutive time points, a dynamic risk assessment mechanism can be constructed to determine whether the behavior requires intervention; define the following risk function:
[0031]
[0032] Where:
[0033] Γ represents the risk index of the overall behavior trajectory; n is the number of discrete time points within the observation period; E p (t i ) is the behavior potential energy value of the patient at time point t i ; |E p (t i+1 ) - E p (t i )| is the potential energy fluctuation amplitude between adjacent time points, indicating the strength of the continuous stability of the behavior; θ is the fluctuation sensitivity coefficient; δ i is the determination factor for whether the current position belongs to a restricted area; χ iis the weight of the behavior label, and the risk is weighted and evaluated for special groups such as psychiatric patients and elderly people.
[0034] Furthermore, the multi-patient trajectory clustering and dynamic risk diffusion boundary construction method:
[0035] Extract the trajectories of patients with high behavior risks and set them as potential risk sources of transmission, including wanderers, agitators, and those attempting to leave; within the observation time window, compare the trajectories of all in-hospital patients; introduce the dynamic time warping (DTW) algorithm to calculate the trajectory similarity; DTW aligns the trajectory points on the time axis to identify non-synchronous but pattern-similar trajectory overlapping individuals; the trajectory similarity function is defined as follows:
[0036]
[0037] Where:
[0038] S DTW (A,B) is the dynamic similarity score of the trajectory sequences A and B; represents the set of trajectory vectors of two patients within the time window [t0, t n ; is the two-dimensional position coordinate vector corresponding to the time t; π(t) is the trajectory time alignment function for dynamically matching corresponding points between non-synchronous trajectory sequences; α k is the behavior alignment weight of the k-th point, reflecting the local elasticity of the trajectory.
[0039] Furthermore, the multi-patient trajectory clustering and dynamic risk diffusion boundary construction method:
[0040] After completing the trajectory alignment and similarity judgment, construct a multi-dimensional scoring function through three behavior factors: time synchronization rate, spatial proximity, and trajectory overlap rate; to quantify the behavior transmission probability between any two patients with similar trajectories, and then establish a dynamic transmission probability field, where the dynamic transmission probability field propagation depends on behavior similarity, rhythm synchronization, and path repetition; the behavior transmission scoring function is defined as follows:
[0041]
[0042] Where:
[0043] R i,j is the behavior transmission score between patient i and patient j; T is the total duration of the analysis time window; Ω t (i,j) represents the probability that two people appear in the same area at any moment, measuring time synchronization; Λ s(i, j) represents the proximity of the trajectories of two individuals in the hospital space; κ(i, j) is the trajectory overlap degree, reflecting whether the trajectory paths repeat multiple times in space; μ1, μ2, μ3 are the weight parameters corresponding to the above three factors, controlling the influence degree of each behavioral factor on the score; γ is the non-linear exponential parameter of the overlap degree, enabling the recognition of high-overlap behaviors to be amplified; ρ(t) is a dynamic adjustment function, adjusting the propagation sensitivity according to the hospital state at different times.
[0044] Furthermore, the behavioral transmission score R between multiple patients i,j After the calculation is completed, any pair of patients whose scores exceed the set threshold are abstracted as nodes of the graph structure, and the transmission relationship between the two is represented in the form of a weighted edge; the formed graph structure is the patient contact transmission map, where the nodes represent individuals and the edges represent potential transmission paths;
[0045] To identify the transmission source or leader, introduce the behavioral transmission centrality index, and conduct a weighted evaluation of the transmission potential of each node; the index measures whether the state of the connected patients is significantly affected if the behavior of the patient changes. The behavioral transmission centrality index function is as follows:
[0046]
[0047] Where:
[0048] C(v i ) represents the behavioral transmission centrality of node v in the graph i ; is the set of all adjacent nodes that have a transmission edge with node v i ; ξ ij represents the transmission weight of the edge between nodes i and j, which comes from the mapped value of R i,j ; represents the change rate of the transmission score of two individuals over time; χ ij (t) represents the correlation weight of the behavioral states of two individuals at time t.
[0049] The patient trajectory tracking system based on hospital Wi-Fi signal positioning of the present invention has significant practical application value and multi-dimensional beneficial effects, which are mainly reflected in the following aspects:
[0050] Through Wi-Fi signal fingerprint reconstruction and spatio-temporal vector field conversion, not only the current position of the patient can be obtained, but also their moving direction, speed trend and behavioral continuity can be identified, realizing the technical leap from "seeing the position" to "understanding the motivation", and greatly improving the hospital's perception ability of the behavioral safety of special patients (such as those in the psychiatric department, geriatric ward, and postoperative rehabilitation).
[0051] It can effectively identify the target deviation behavior and ambiguous intention state of patients. In particular, it can give early warnings for abnormal stays, path jumps, etc. in non-medical treatment areas, significantly reduce the incidence of risk events such as getting lost, escaping, wandering, and self-harm, and improve the supervision efficiency and life safety guarantee level of patients during their hospital stay.
[0052] With the help of Dynamic Time Warping (DTW) and trajectory overlap degree scoring, it can identify potential "behavior chains" that are asynchronous but highly overlapping in pattern. Furthermore, by spreading the scoring function and mining the behavior guidance path and propagation core through the contact map structure, it can achieve early identification and active control of group abnormal behaviors (such as collective leaving, collective imitation behaviors), filling the technical gap that traditional systems cannot handle "indirect group influence behaviors". Description of the Drawings
[0053] Figure 1 This is the flowchart of the patient trajectory tracking system based on hospital Wi-Fi signal positioning of the present invention.
[0054] Figure 2 This is the flowchart of the method for representing the patient movement path of the trajectory potential energy model of the present invention.
[0055] Figure 3 This is the flowchart of the method for multi-patient trajectory clustering and constructing the dynamic risk diffusion boundary of the present invention. Detailed Description of the Invention
[0056] The following will give a detailed description of the specific implementation manner of the present invention in conjunction with the drawings.
[0057] By deeply modeling the Wi-Fi signal and dynamically reconstructing the fingerprint, the positioning accuracy of patients and the stability of the system are improved. In this system, first, step S1 is implemented, that is, the dynamic Wi-Fi signal fingerprint reconstruction method is adopted to carry out targeted modeling and update mechanism for the variable and complex electromagnetic environment in the hospital, which specifically includes two sub-steps S1.1 and S1.2. In step S1.1, the system will establish a RSSI (Received Signal Strength) fluctuation probability model based on time period division for each Wi-Fi access point (AP) deployed in the hospital. This model takes time as the main axis and uses Gaussian Mixture Distribution (GMM) for adaptive learning and modeling in combination with the historical signal change characteristics, that is, capturing the change trend of the signal strength distribution in different time periods to form a dynamically variable probability description; on this basis, when the system detects that a certain RSSI signal has continuous jumps, that is, its change speed exceeds the normal fluctuation range allowed by the model, this is determined to be an abnormal signal disturbance possibly caused by an electromagnetic interference source (such as the start of an elevator, monitoring equipment, electric bed or large equipment), and by marking these fluctuation points and isolating and removing them, it prevents them from interfering with the stability of the overall fingerprint model.
[0058] Then in S1.2, the system will synchronously collect real-time Wi-Fi data while the patient is moving continuously, and compare the newly collected data with the existing fingerprint database to implement an incremental update mechanism for the signal fingerprint, that is, instead of rebuilding the entire fingerprint library, the new data is incorporated in a way that minimizes disturbance, and the system maintains sensitivity and robustness to environmental changes through small batch corrections. At the same time, the system assigns a time-attenuation weight to each fingerprint sample. The closer the data is to the current moment, the higher the weight is, and the data farther away from the current moment gradually decays, realizing the time-weighted reconstruction of the fingerprint library. This dynamic balance mechanism of "historical stability" and "real-time sensitivity" enables the system to take advantage of long-term accumulated data.
[0059] Step S2 is used to further model the patient's movement path at the semantic level, that is, the trajectory potential model is used to structurally express the patient's movement path within the hospital and identify risk behaviors. Specifically, in step S2.1, the system first converts the continuous sequence of positioning points into spatiotemporal velocity vectors to form a path vector field with directionality and velocity information. Each pair of adjacent positioning points calculates the displacement velocity and direction of movement based on the timestamp, thereby forming a set of continuous vector flows, indicating not only where the patient's movement trajectory is, but also where it is heading and how it changes speed. This vector field can reflect the patient's movement trend, stay pattern and behavioral stability.
[0060] Subsequently, the system introduced the intention potential energy model based on the path vector, that is, assigning a potential energy value to each trajectory segment to measure the patient's behavioral tendency towards targets in the surrounding area. This potential energy value is calculated comprehensively from three dimensions: the first is the attraction of the target point, that is, whether areas such as the consulting room, nurse station, and toilet are in the direction of the patient's path. The stronger the attraction, the clearer the behavior. The second is the path deviation rate, which is used to evaluate whether the current trajectory has deviated from the main path or the expected area. For example, if it suddenly turns into a non-consultation area, the deviation rate will increase. The third is the regional characteristic factor, which identifies the functional attributes of the patient's current area. If it belongs to a restricted area or a back-end logistics area, it constitutes a risk label. The system dynamically calculates the intention potential energy value of each point based on the above factors to measure whether the patient's behavior is clear at this time and whether it is in a reasonable spatial range. Then in step S2.2, the system analyzes the potential energy changes in the continuous path to determine abnormal behavior. If there are frequent potential energy jumps in the non-consultation area, that is, the patient's behavioral goals change frequently, the path jumps sharply, or the trajectory shows a high potential energy density but cannot be attributed to any target area, the system can determine that the patient has behavior without a clear purpose, such as wandering, restlessness, or trying to leave; if the potential energy value shows abnormal dissipation in space, that is, the movement seems random, the intention is vague, and the direction is chaotic, then the system can determine it as mental abnormality or path loss.
[0061] The identification of the behavioral transmission relationship among multiple patients and the prediction of the potential risk diffusion trend are achieved through step S3. That is, a multi-patient trajectory clustering and dynamic risk diffusion boundary construction mechanism is adopted. The core goal of the system at this stage is to conduct an associated modeling of the originally isolated patient behavioral trajectories, so as to uncover potential linkage behaviors, high-risk contact networks, and collective behavior trends. In step S3.1, the system first selects patients with high-risk behaviors as the behavioral transmission sources, such as individuals with behavioral characteristics like abnormal wandering, high-potential jumps, and target deviation. Subsequently, the dynamic time warping (DTW) algorithm is invoked to perform a time series comparison of their trajectories with the trajectories of other patients in the whole hospital. The DTW algorithm can effectively identify individuals with similar spatial paths and movement rhythms in different time periods. Even if two people do not appear simultaneously, it can also determine whether they have highly overlapping behavior patterns. Based on this, the system identifies the patients who may be affected by their behaviors. Then, the system further conducts a three-dimensional behavioral contact scoring for these trajectory-overlapping individuals, calculating the time synchronization rate (i.e., whether two people appear on similar paths at the same time), the spatial proximity (i.e., whether there is a possibility of physical contact between two people), and the trajectory overlap degree (i.e., the frequency and length of the coincidence of the behavior routes). A risk contagion radius is dynamically generated based on the comprehensive scoring of these three indicators. This radius is not a fixed distance but a probability field defined by behavioral proximity, and its range expands with the increase in the similarity of trajectories and synchronous behaviors, and is used to describe the behavioral contagion ability and range that an abnormal individual may have on the surrounding population.
[0062] In step S3.2, the system abstracts all pairs of individuals with scores exceeding the threshold into a graph structure for modeling. Each patient serves as a node in the graph. If there is significant trajectory similarity and behavioral coincidence between two people, a weighted edge is established between the nodes, and the weight of the edge represents the magnitude of the transmission score. Eventually, a multi-patient high-risk contact network is formed. This network not only shows the potential behavioral influence relationships among individuals but also, through the centrality analysis in the graph structure, can identify the nodes with the greatest transmission influence, that is, those people who may guide others or become the starting points of paths in terms of behavior. In step S3.3, the system further deduces the possible paths of behavioral spread based on the contact network, especially focusing on the analysis of individuals with guiding behaviors such as restlessness, attempting to leave, and continuous wandering. When the graph shows that their behaviors have begun to affect multiple adjacent nodes and their movement directions are concentrated towards the hospital exit, restricted area, or outside the ward area, the system will predict that there is a collective spread trend for this behavior, that is, it may lead more patients to concentrate on the same path, such as gathering towards the outpatient exit collectively or crossing the restricted passage simultaneously.
[0063] Further, step S4 introduces a system-level risk warning mechanism, that is, the difference between the patient's trajectory behavior and its expected behavioral norms is modeled and quantified by using behavioral contradiction factors, so as to determine whether there is a violation of management rules, deviation from the expected state or the need for emergency intervention. The core idea of this mechanism is to build an interpretable and computable warning indicator based on rule-driven, by defining the degree of match between patient categories and behavioral models. The system first divides patients into several types according to their specific diseases, hospitalization types, nursing levels or special attributes, and sets a normal activity pattern model for each type of patient. The model contains multiple dimensions, such as the range of physical space for activities (for example, they cannot leave the ward or designated floor), the allowed activity time period (for example, they should not move for a long time in the middle of the night), and the upper and lower limits of activity frequency (for example, the number of movements per day should not exceed a certain threshold). These parameters constitute the patient's "trajectory behavior model to be followed". The system calculates the patient's activity pattern in the background. These models are stored in a configured manner and automatically matched with patient labels. The system then compares the actual collected patient trajectory with the standard model of its type point by point, analyzes whether there are abnormal deviations in the trajectory in dimensions such as space, time, and rhythm, and introduces a trajectory contradiction factor for quantitative calculation. This factor measures the degree of deviation between the actual trajectory and the expected model. If a certain section of the trajectory shows frequent crossing of boundaries, abnormal activity time, or activity frequency significantly higher than the set threshold, the contradiction factor value of this section of the trajectory will increase significantly. The system aggregates and analyzes the contradiction factors of the overall trajectory. When the cumulative value exceeds the set tolerance threshold, the system will consider that the patient's current behavior is seriously inconsistent with expectations, thereby triggering a system-level early warning mechanism, and automatically pushing abnormal reminders of the patient to the nurse station, doctor terminal or security management platform. Combined with other risk indicators such as trajectory potential energy value, propagation score, path prediction results, etc., the system can further perform multi-source early warning fusion to achieve three-dimensional active intervention for high-risk patients.
[0064] Embodiment 1:
[0065] In a five-story comprehensive inpatient building of a central hospital, the hospital has deployed more than 150 Wi-Fi access points (APs), each with a coverage range of about 15 to 25 meters. Combined with the layout of the hospital's departments and corridors, it can achieve high-density Wi-Fi coverage throughout the building. The system will record the patient's location data in real time based on the Wi-Fi sensor bracelet worn by the patient. Each positioning point contains (x, y) coordinates and timestamps, and the positioning frequency is collected every 5 seconds. We selected "Wang", a patient who actually lives in the psychiatric rehabilitation ward on the third floor, as an example. The patient is a 65-year-old male with mild cognitive impairment. He is usually allowed to move around in the psychiatric rehabilitation area and the public rest area on the third floor, but is not allowed to enter the fourth floor or try to leave the third floor area without permission.
[0066] During the period from 9:05 to 9:20 in the morning on a certain day, the system recorded a total of 180 positioning points of Wang, covering the whole process from his leaving the room, moving along the corridor, bypassing the nurse's station, to approaching the elevator. First, the system performs differential processing on these positioning points. Each two adjacent points form a path vector. Assuming the adjacent time interval Δt is 5 seconds, the trajectory vector is expressed as:
[0067]
[0068] where P i =(x i ,y i ), and the unit of the calculated vector is meters per second. Assuming that in the 30 - second time period from 9:10:00 to 9:10:30, the sequence of Wang's trajectory points is as follows:
[0069] P1=(23.0,14.5) at t1 = 9:10:00
[0070] P2=(24.2,14.7) at t2 = 9:10:05
[0071] P3=(25.1,15.1) at t3 = 9:10:10
[0072] P4=(26.9,17.3) at t4 = 9:10:15
[0073] According to the trajectory difference, vectors are generated:
[0074]
[0075] Then the system substitutes these vector pairs into the perturbation function for calculation in turn. This function is used to quantify the composite behavior stability of direction offset and speed change, and is defined as:
[0076]
[0077] The values used by the system are as follows:
[0078] Dot product
[0079] Vector modulus
[0080] Vector modulus
[0081] Set a very small positive number ∈ = 0.0001
[0082] Substituting into the formula gives:
[0083]
[0084] This value is very close to 0, indicating that Wang's behavior during this period has good direction consistency and speed stability, meeting the expected path structure. However, in the following vector group and , the direction angle suddenly changes by nearly 90 degrees, and the speed increases significantly. The calculated disturbance function value rises above 0.017, which is significantly higher than the system-set interference sensitivity threshold (the recommended threshold range is between 0.005 and 0.01, adjusted according to the ward risk level). The system records this abnormal behavior, which may mean that Wang has changed direction and deviated from the main path of the rehabilitation area on the third floor.
[0085] Subsequently, further analysis is introduced with the potential energy model. It is found that Wang's path during this section lacks a clear attracting target. Instead of moving towards the diagnosis and treatment area, the nurse station, or the regular rest area, he detours multiple times in the area near the elevator. The vector path direction is unstable, and multiple trajectory points are located in the unauthorized edge area. Based on this, the system evaluates that his behavior intention is unclear and infers that there may be a risk of behavior loss or attempting to enter other areas. Finally, the system marks this path as a "high contradiction factor trajectory section", triggers a low-level warning and pushes it to the nurse station, and records it as key evidence for subsequent behavior risk scoring.
[0086] In this embodiment, a composite potential energy function regarding behavior target attraction, spatial deviation, and regional attributes is further established to characterize the "intention rationality" of Wang's behavior at different times. Starting from analyzing Wang's behavior at 9:10:15, his current position is P = (26.9, 17.3), which is at the corridor corner area next to the east elevator on the third floor.
[0087] The system sets three main target areas on the third floor of the hospital, namely the nurse station T1 = (20.0, 15.0), the rehabilitation activity area T2 = (22.5, 19.0), and the medical observation area T3 = (28.0, 14.0). These areas are the dominant spaces that patients should approach in their behavior patterns. The system sets attraction weights for them respectively: ω1 = 1.0, ω2 = 0.7, ω3 = 0.9, indicating that the nurse station has the highest attractiveness. The attraction diffusion range parameters (λ j ) of each target point are λ1 = 25, λ2 = 16, λ3 = 20, in square meters, indicating that their influence range radius is between 4 and 6 meters. To prevent zero error, the system sets ∈ = 0.01.
[0088] First, the system calculates the path trajectory distances between Wang's current position and the three target areas:
[0089]
[0090] Then, substitute into the first part of the potential energy function and sum the terms for the three target areas respectively:
[0091]
[0092] Further evaluate the path deviation rate σ(t) of Wang at this moment, that is, whether the current trajectory deviates from the reasonable path leading to the target area. According to the angle deviation between the direction of the trajectory in the vector field and the line connecting to the target point in the previous text, the system calculates that its deviation rate is σ(t) = 0.55 (between 0 and 1, where 1 means complete deviation). Set the deviation penalty coefficient η = -4.0, indicating that the deviation behavior has a negative penalty on the potential energy. Then the deviation term is η·σ(t) = -4.0·0.55 = -2.2. In addition, the system calls the regional attribute function ψ(R(t)) to determine whether the current position belongs to an area outside the authority. The system recognizes that Wang is currently at the edge of an unauthorized area, and sets the risk level of this area to medium, then assigns the return value of the regional attribute function to be ψ(R(t)) = +1.2. Combining all parts gives:
[0093] E p (t) = 12.72 + (-2.2) + 1.2 = 11.72
[0094] The system presets the potential energy threshold range for normal behavior intention as 6.0 ≤ E p (t) ≤ 9.5. Values higher than this range indicate that the behavior target is highly unclear or misleading. Since the current behavior potential energy value of Wang reaches 11.72, far exceeding the normal upper limit, the system determines this behavior as "high potential energy abnormal transition", and further combines information such as the increase in the vector perturbation value and the increase in path deviation in the previous text, and comprehensively marks the current trajectory segment as "abnormal wandering or attempting to leave behavior". Subsequently, the system superimposes and marks this path segment with a red high-risk line in the trajectory heat + vector flow diagram, and pushes low-level immediate intervention suggestions to the nurse workstation, and at the same time incorporates this trajectory into the risk propagation module to evaluate its possible impact on other patients.
[0095] The system continuously monitors the sequence of behavior potential energy changes in the next period of time in this embodiment, and performs aggregation analysis through the risk function Γ to determine whether the current behavior reaches the level that requires manual or automatic intervention. In this stage, the system uses a 5-minute observation window, from 9:10:00 to 9:15:00, samples the trajectory every 5 seconds, and obtains a sequence of potential energy values E p (t1), E p (t2), …, E p (t 60 ). To ensure the concreteness of the example, we take the actual values of 7 key points among them to simulate the trend:
[0096] E p (t1) = 6.7,
[0097] E p (t2) = 6.9,
[0098] E p (t3) = 8.1,
[0099] E p (t4) = 10.9,
[0100] E p (t5) = 11.7,
[0101] E p (t6) = 8.2,
[0102] E p (t7) = 7.0.
[0103] It can be seen from the data that Wang's behavioral potential energy increased significantly between t3 and t5 and then decreased rapidly after t6, showing typical characteristics of "continuous jumps within a short period of time". The system calculates the change amplitude of potential energy at adjacent time points and substitutes it into the risk function:
[0104]
[0105] Set the sensitivity coefficient θ = 1.6, which is within the recommended range of 1.3 ≤ θ ≤ 2.0. The higher the sensitivity, the greater the response to slight fluctuations; the system recognizes that Wang appeared in the unauthorized area near the elevator passage at t4 and t5, so δ4 = δ5 = 1, and δ i = 0 for the remaining time points in the authorized area; since Wang is a patient with mild cognitive impairment, the behavioral sensitivity is up-regulated, so the behavioral label weight is uniformly set to χ i = 0.3, and this weight is configurable, with the recommended range of 0 ≤ χ i ≤ 0.8, and the upper limit is set for high-risk groups. The following is the calculation details of the first six risk items:
[0106] 1. |6.9 - 6.7| 1.6 = 0.2 1.6 ≈ 0.074, risk factor = 0.074·(1 + 0 + 0.3) = 0.074·1.3 = 0.0962
[0107] 2. |8.1 - 6.9| 1.6 = 1.2 1.6 ≈ 1.515, risk factor = 1.515·1.3 = 1.9695
[0108] 3. |10.9 - 8.1| 1.6 = 2.8 1.6 ≈ 6.66, δ4 = 1, risk factor = 6.66·(1 + 1 + 0.3) = 6.66·2.3 = 15.318
[0109] 4. |11.7 - 10.9| 1.6 = 0.8 1.6 ≈0.733, δ5 = 1, risk factor = 0.733 · 2.3 = 1.6859
[0110] 5. |8.2 - 11.7| 1.6 = 3.5 1.6 ≈9.92, risk factor = 9.92 · 1.3 = 12.896
[0111] 6. |7.0 - 8.2| 1.6 = 1.2 1.6 ≈1.515, risk factor = 1.515 · 1.3 = 1.9695
[0112] Adding the above 6 risk values gives: Γ sum ≈0.0962 + 1.9695 + 15.318 + 1.6859 + 12.896 + 1.9695 ≈ 33.9351
[0113] Since there are a total of 60 points in the observation section, and the above 6 sections account for 6 / 59 sections in the calculation, the temporary average is:
[0114]
[0115] The system defines the behavioral risk level of Γ as follows: low risk Γ < 0.15, medium risk 0.15 ≤ Γ < 0.4, high risk Γ ≥ 0.4. The current value significantly exceeds the high - risk threshold. Therefore, the system immediately marks Wang as a patient with high - risk behavior. At the same time, due to the obvious path change of his trajectory from the authorized area towards the exit direction, and the high - value points of the potential energy model concentrated in the area around the elevator entrance, under the multiple conditions of strong behavior fluctuations, high regional risks, and sensitive identities recognized by the system, the system links the trajectory vector flow and the heat map, triggers an orange - level warning on the nurse's terminal interface, and schedules security personnel to go to the elevator entrance for intervention and handling. At the same time, the system records this trajectory and incorporates it into the subsequent propagation model to monitor whether there are similar trajectory linkage behaviors among other patients. This example fully demonstrates how the risk function Γ in the present invention constructs a real - time dynamic, interpretable, and quantifiable trajectory behavior risk assessment mechanism under the conditions of integrating trajectory change trends, spatial permission offsets, and patient individual characteristics, and proves its feasibility and practicality by substituting specific data and formulas.
[0116] Example 2:
[0117] Based on Example 1, Wang's abnormal trajectory is extracted as an observation template. Then, within the time window of the last 10 minutes, the trajectory data of 52 patients on the same floor or adjacent floors are extracted from the inpatient data of the entire hospital. The system compares the trajectories of these patients with Wang's trajectory one by one to determine whether there is a trend of highly similar behavioral paths or possible "guidance" to similar paths.
[0118] In order to identify similar behaviors across time periods, the system introduces the dynamic time warping algorithm (DTW) for nonlinear trajectory matching. Unlike ordinary Euclidean trajectory matching, DTW allows the time nodes of two trajectories to be incompletely synchronized. As long as the path shape and movement rhythm are similar, they can also be judged to be highly similar. This strategy is extremely critical because in real scenarios, imitation, following, or subtle trajectory linkage behaviors do not always occur synchronously.
[0119] The system defines the trajectory similarity function as follows:
[0120]
[0121] in, are Wang and another patient in the observation window [t0,t n ], each vector is the two-dimensional spatial coordinate at time t, the trajectory sampling frequency is set to once every 5 seconds, and the total window length is set to 10 minutes, that is, the number of trajectory points per person K = 120. The trajectory time alignment function π(t) is used for nonlinear matching. For example, Wang’s position at 9:10 is compared with a patient on the same path at 9:12. The behavior alignment weight α k Set to 0.5≤α k ≤1.5, used to adjust the behavior matching elasticity of different time periods or spatial segments. In this example, most weights are set to 1.0, and the weights of segments near the elevator and nurse station are increased to 1.3 to enhance the matching sensitivity of key areas.
[0122] For example, during the comparison process, the system found that the trajectory path of the patient "Liu" who was active on the third floor at the same time between 9:13 and 9:17 was almost the same as that of Wang between 9:10 and 9:14. When Wang was circling the elevator area, Liu took the same U-turn path 3 minutes later. The system automatically aligns the path segments through the DTW algorithm and calculates the similarity score S DTW (A 王 ,B 刘 )≈18.6, the system defines the similarity threshold as 25, the lower the score, the more similar the trajectory, so Wang and Liu were judged as a "high trajectory similarity pair". Others such as "Zhang" and "Ding" scored higher than 40 and were excluded from the risk contact radius.
[0123] Subsequently, the system constructs a risk propagation boundary based on the DTW score, and includes patients with a trajectory similarity lower than 25 into the primary contact risk population. The system further considers the spatial proximity, time coincidence rate, and behavior label risk between this population and Wang, and weights and integrates their propagation weights. In the risk diffusion radius control model of the system, the similarity weight coefficient is β1 = 0.5, the spatial distance weight is β2 = 0.3, and the time coincidence rate weight is β3 = 0.2. After weighting the three, Liu obtains a propagation risk score of 0.82 (with a full score of 1.0), exceeding the propagation risk threshold of 0.7. The system establishes an edge connection between Liu and Wang in the patient propagation network and assigns a propagation probability edge weight.
[0124] The system finally outputs a graph-like propagation relationship network with "Wang" as the core node and 2 patients (such as Liu and another patient with partially overlapping trajectories) as secondary nodes, and displays it in a highlighted graphical manner on the nurse management terminal in real time. At the same time, it is predicted that if Wang continues to move and guides others to move towards the exit direction, it may trigger an aggregation behavior within the next 10 minutes. Therefore, on-duty nurses are mobilized in advance to conduct pre-inspections on the critical path to inhibit the spread of the behavior chain.
[0125] In this embodiment, the multi-dimensional propagation scoring module is further started to quantitatively analyze whether there is a "potential behavior impact" between the two. The core is to calculate the strength of the propagation possibility between them within the current observation window through the behavior propagation scoring function R i,j and then determine whether it needs to be included in the risk diffusion control boundary.
[0126] The behavior propagation scoring function adopted by the present invention integrates three dimensions: time synchronization, spatial proximity, and trajectory overlap rate, supplemented by a dynamic weight adjustment mechanism, to form a "behavior contact scoring model" that can adapt to the activity density in different time periods and different regions. Its definition is as follows:
[0127]
[0128] In this example, the system uses T = 600 seconds (10 minutes) as the analysis window, with a sampling frequency of once every 5 seconds, and a total of 120 time segments are obtained. The system starts to evaluate the three indicators between Wang (i) and Liu (j) in each time segment respectively. First, calculate the time synchronization Ω t (i, j): The system finds that Liu and Wang appear in the same area in at least 34 time slices on the similar path (defining "the same area" with a spatial neighborhood radius of 2 meters), then the synchronization rate is Secondly, for the spatial proximity Λ s (i, j), calculate that the average distance between the two is 2.7 meters at these 120 moments. The system sets the proximity function to be the inverse normalization processing of the distance, and the reference upper limit is 10 meters. Therefore, it can be obtained that:
[0129]
[0130] Next is the trajectory overlap rate κ(i,j). The system calculates that there are about 17 completely overlapping paths in the trajectory paths of the two people (such as the same route from the ward to the elevator entrance), accounting for 35.4% of the total 48 trajectory segments of Wang. Therefore, κ(i,j) = 0.354. The system sets the amplification factor γ of this parameter to 2.2 (recommended range 1.5 - 3.0) to improve the recognition sensitivity of highly overlapping behaviors, and calculates:
[0131] κ(i,j) γ = 0.354 2.2 ≈ 0.096
[0132] Subsequently is the adjustment function ρ(t). Since it is the peak period of morning activities, the system uniformly assigns ρ(t) = 1.2 for the whole period (it can be set to 0.8 - 1.0 during non-peak periods and reduced to below 0.5 at night). The system default parameter weights are μ1 = 0.4, μ2 = 0.4, and μ3 = 0.2 (it is recommended that the weights of the three items satisfy μ1 + μ2 + μ3 = 1 and each item is not less than 0.2). Substitute the above values into the calculation of the overall average propagation score:
[0133]
[0134] R i,j = (0.1132 + 0.292 + 0.0192)·1.2 = 0.4244·1.2 ≈ 0.5093
[0135] Since the entire integral term is a constant value, the result after integration is still multiplied by T and then divided by T. Finally, we get R i,j ≈ 0.5093. According to the system's classification standard for the propagation risk level: the low-risk propagation score is R i,j < 0.35, the medium-risk is 0.35 ≤ R i,j < 0.5, and the high-risk propagation is R i,j ≥ 0.5. Therefore, the behavior propagation score between Wang and Liu is determined to be in a high-risk marginal state and is included in the key observation objects. At the same time, the system dynamically adjusts the edge weight between the two in the propagation graph to 0.51 for use as input data in the subsequent propagation path prediction model. In addition, the system adds the other two patients with an R score exceeding 0.45 to the contact sub-network with Wang as the core, constructs a preliminary behavior diffusion graph with 3 nodes, 3 edges, and the edge weight range between 0.47 and 0.51, and predicts that if Wang enters the core passage to the elevator within the next 5 minutes, there is a probability of more than 25% of forming a "collective tendency" behavior chain. The system displays a risk level of "yellow light - secondary attention" at the nurse terminal, prompting the on-duty nurse to actively observe the dynamics of this area to prevent the loss of control of the patient group behavior.
[0136] In this embodiment, in order to further identify whether there is a "source" or "behavior guide" in the graph, the system introduces a behavioral propagation centrality index function, which is used to measure the potential ability of any patient in the graph to cause a chain reaction in the behavioral states of adjacent patients in the entire graph structure if their behavior changes.
[0137] The behavioral propagation centrality function is defined as follows:
[0138]
[0139] where v i represents a patient node in the graph, is the set of all adjacent nodes that have a propagation connection with v i , ξ ij is the propagation weight of the edge between patients i and j, which is derived from the previously calculated R i,j , and the value range is set to 0 ≤ ξ ij ≤ 1, represents the change rate of the propagation score between two people over time, which is used to judge whether the risk is expanding or converging, and χ ij (t) represents the behavioral state linkage weight, which is defined as a comprehensive factor in dimensions such as whether the behavioral trends between two people are consistent and whether the risk labels overlap. The setting range is 0 ≤ χ ij (t) ≤ 2.0, and a value higher than 1 indicates a strong linkage tendency.
[0140] Taking the current propagation graph as an example, the node corresponding to Wang is v1, and its adjacent nodes include Liu v2, Zhang v3, and Ding v4. The propagation edge weights are: ξ 12 = 0.51, ξ 13 = 0.44, ξ 14 = 0.47. Through behavioral evolution monitoring, the system found that in the past 5 minutes, the R 1,2 (t) between Wang and Liu increased from 0.38 to 0.51, and the growth rate is:
[0141] The change in the propagation score between Zhang and Wang is not significant while the change in the propagation score of Ding is relatively large because he is close to Wang's passing path In terms of the behavioral linkage factor, the system evaluates that Wang and Liu have consistent mental state labels (both are medium-risk groups with cognitive impairments) and similar activity path rhythms, and sets χ 12 (t) = 1.5; Zhang is an ordinary patient without the same behavioral characteristics, and χ 13 (t) = 0.6; Ding is a strongly intervened object and has a record of trying to escape after discharge. The system improves the risk behavior linkage for him and sets χ 14 (t) = 1.8.
[0142] Substitute these data into the centrality function to calculate the propagation centrality of Wang:
[0143]
[0144] C(v1) = 0.51·(1 + 0.00043·1.5) + 0.44·(1 + 0.0001·0.6) + 0.47·(1 + 0.0012·1.8)
[0145] C(v1) = 0.51·1.000645 + 0.44·1.00006 + 0.47·1.00216 ≈ 0.5103 + 0.4400 + 0.4710
[0146] ≈1.4213
[0147] The system sets the following recognition criteria according to the propagation centrality score: low impact centrality is C(v i ) < 0.9, medium is 0.9 ≤ C(v i ) < 1.2, and high propagation centrality is C(v i ) ≥ 1.2. Wang's centrality score reaches 1.421, and it is clearly determined as the "behavior guide" in the current small propagation network.
[0148] The system immediately highlights the node of Wang in the propagation graph in red, indicating that he has the ability to guide potential collective behaviors. Without manual intervention, subsequent trajectory behaviors may form an extended node group in the graph, causing secondary behavior spread such as collective wandering, collective movement to unauthorized areas, or behavior imitation. Therefore, the system issues a structural warning and dynamically deploys subsequent monitoring logic: on the one hand, deploy "behavior braking points" on Wang's path, that is, configure nurse patrol reminders at the terminals of his reachable paths (such as the entrances to stairways and elevators); on the other hand, perform short-cycle re-evaluation on patients with centrality greater than 1.0 in the propagation graph every 3 minutes, and activate the prediction model to evaluate whether there is a trend of "outward diffusion" of centrality in the network.
[0149] This process realizes the identification and quantitative judgment of the key points of behavior guidance in the patient group structure by introducing the propagation centrality index C(v i ), combined with the change speed of the propagation score and the behavior state linkage factor. It not only improves the system's ability to identify potential behavior diffusion chains, but also provides the priority sorting logic for behavior intervention for actual hospital managers, further verifying the engineering adaptability, controllability, and real-time value of the present invention in the dynamic population environment of a real hospital.
[0150] The basic principles, main features and advantages of the present invention have been shown and described above. Those skilled in the art should understand that the present invention is not limited by the above embodiments. What is described in the above embodiments and the specification only illustrates the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of the present invention claimed is defined by the appended claims and their equivalents.
Claims
1. A patient trajectory tracking system based on hospital Wi-Fi signal positioning, characterized in that Including the following steps: S1. Adopt dynamic Wi-Fi signal fingerprint reconstruction: S1.
1. Establish the RSSI fluctuation probability model of each AP in different time periods, and introduce Gaussian mixture distribution for adaptive learning; Identify the existence of electromagnetic interference sources through continuous RSSI abnormal jumps, mark the abnormal points and isolate them; S1.
2. Continuously collect real-time data during the patient's movement, and perform incremental fingerprint correction; gradually reweight the fingerprint database over time, taking into account historical stability and real-time accuracy; S2. Characterize the patient's movement path using the trajectory potential energy model: S2.
1. Convert the sequence of positioning points into a spatio-temporal velocity vector to form a continuous path vector field; define the intention potential energy value in the path, and comprehensively calculate it according to the target point attraction, path deviation rate, and regional characteristics; S2.
2. If there are high potential energy jumps or abnormal potential energy dissipation repeatedly in the non-consulting area, it can be judged as wandering or attempting to leave risk behaviors; construct a trajectory heat map + vector flow view to assist medical staff in identifying abnormal movement lines; S3. Adopt multi-patient trajectory clustering and construct dynamic risk diffusion boundaries: S3.
1. Through dynamic time warping (DTW) sequence comparison, find other patients whose trajectories highly overlap with the abnormal patient's trajectory; comprehensively score according to the time synchronization rate, spatial proximity, and trajectory overlap degree, and dynamically generate the risk contagion radius; S3.
2. Use a graph structure to represent the clustering results as nodes and edges, and identify the high-risk contact network; S3.
3. Predict the spread path of the behavior of agitated patients leading multiple people to gather towards the exit, and deploy security in advance; S4. System-level early warning using behavior contradiction factors: Define the activity patterns that each type of patient should follow, including scope, time, and frequency; Compare the difference degree between the trajectory and the model to form a trajectory contradiction factor.
2. The patient trajectory tracking system based on hospital Wi-Fi signal positioning according to claim 1, wherein The method for characterizing the patient's movement path using the trajectory potential energy model: Capture the behavior trend and movement intention of the patient in the hospital, perform differential processing on adjacent positioning points to generate vectors representing direction and speed, and convert the original trajectory into a path vector field; the vector field expresses the position change and reflects the direction consistency, speed stability, and intention continuity of the behavior; Define the path vector within any time period as indicating the movement direction and speed formed by the position change of the patient at time t i and t i+1 The following perturbation function is proposed to evaluate the behavior continuity: Where: are the current and previous trajectory vectors respectively; represents the dot product of the two vectors, measuring the direction consistency; are the magnitudes of the velocities respectively; ∈ is a very small positive number to prevent division by zero.
3. The patient trajectory tracking system based on hospital Wi-Fi signal positioning according to claim 2, wherein The method for characterizing the patient's movement path using the trajectory potential energy model: Introduce a potential energy model on the basis of the path vector field, and reflect the target rationality and deviation degree of the behavior by simulating the behavior guidance relationship between the patient and the targets in each area; the potential energy is affected by the patient's current position and is also associated with the attractiveness of key areas in the hospital, including outpatient clinics and nurse stations.
4. The patient trajectory tracking system based on hospital Wi-Fi signal positioning according to claim 3, wherein The method for characterizing the patient's movement path using the trajectory potential energy model: Abnormal behaviors are accompanied by large fluctuations or continuous jumps in potential energy within a short period of time; by aggregating and calculating the potential energy change sequence at consecutive time points, a dynamic risk assessment mechanism can be constructed to determine whether the behavior requires intervention; define the following risk function: Where: Γ represents the risk index of the overall behavior trajectory; n is the number of discrete time points within the observation period; E p (t i ) is the behavior potential energy value of the patient at time point t i ; |E p (t i+1 )E p (t i )| is the potential energy fluctuation amplitude between adjacent time points, indicating the strength of behavioral continuous stability; θ is the fluctuation sensitivity coefficient; δ i is the decision factor for whether the current position belongs to the restricted area; χ i is the behavior label weight, which is used to weightedly evaluate the risk for special groups such as psychiatric patients and the elderly.
5. The patient trajectory tracking system based on hospital Wi-Fi signal positioning according to claim 1, wherein The method for multi-patient trajectory clustering and constructing dynamic risk diffusion boundaries: Extract the trajectories of patients with high behavioral risks and set them as potential risk transmission sources, including wanderers, agitators, and those attempting to leave; within the observation time window, compare the trajectories of all in-hospital patients; introduce the dynamic time warping (DTW) algorithm to calculate trajectory similarity; DTW aligns trajectory points on the time axis to identify individuals with non-synchronous but similar pattern trajectory overlaps.
6. The patient trajectory tracking system based on hospital Wi-Fi signal positioning according to claim 5, characterized in that The multi-patient trajectory clustering and dynamic risk diffusion boundary construction method: After completing trajectory alignment and similarity judgment, construct a multi-dimensional scoring function through three behavioral factors: time synchronization rate, spatial proximity, and trajectory overlap rate; to quantify the behavioral transmission probability between any two patients with similar trajectories, and then establish a dynamic transmission probability field, the dynamic transmission probability field propagation depends on behavior similarity, rhythm synchronization, and path repetition; the behavioral transmission scoring function is defined as follows: Where: R i,j is the behavior transmission score between patient i and patient j; T is the total duration of the analysis time window; Ω t (i, j) represents the probability that two people appear in the same area at any moment, measuring time synchronization; Λ s (i, j) represents the proximity of the trajectories of two people in the hospital space; κ(i, j) is the trajectory overlap degree, reflecting whether the trajectory path repeats multiple times in space; μ1, μ2, μ3 are the weight parameters corresponding to the above three factors, controlling the influence degree of each behavior factor on the score; γ is the non-linear exponential parameter of the overlap degree, enabling high-overlap degree behaviors to be magnified and recognized; ρ(t) is the dynamic adjustment function, adjusting the transmission sensitivity according to the hospital state at different times.
7. The patient trajectory tracking system based on hospital Wi-Fi signal positioning according to claim 6, characterized in that The behavior transmission score R between multiple patients i,j After the calculation is completed, any pair of patients whose scores exceed the set threshold is abstracted into a graph structure node, and the transmission relationship between the two is represented in the form of a weighted edge; the formed graph structure is the patient contact transmission map, where the nodes represent individuals and the edges represent potential transmission paths; Identify the transmission source or leader, introduce the behavioral transmission centrality index, and conduct a weighted assessment of the transmission potential of each node; the index measures whether a change in a patient's behavior significantly affects the state of connected patients, and the behavioral transmission centrality index function is as follows: Where: C(v i ) represents the behavior propagation centrality of node v in the graph i ; is the set of all adjacent nodes that have propagation edges with node v i ; ξ ij represents the propagation weight of the edge between nodes i and j, which is derived from the mapping value of R i,j ; represents the rate of change of the two-person propagation score over time; χ ij (t) represents the correlation weight of the behavioral states of two people at time t