Psychological health early warning system based on patient behavior trajectory analysis
By analyzing a combination of user behavior patterns and sleep data, personalized mental health warnings are provided, solving the problem of low accuracy in judging different users using the same standard in existing technologies, and achieving more accurate warnings.
Patent Information
- Application Number
- CN202511600570.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-04
- Publication Date
- 2026-01-20
AI Technical Summary
Existing mental health early warning systems suffer from low accuracy and poor early warning effects due to the different behavioral patterns of different users and the use of the same standard for evaluation.
A mental health early warning system based on patient behavior trajectory analysis is adopted. The system acquires user location and sleep data through a data acquisition unit, analyzes behavioral complexity and spatial complexity through a behavior analysis unit, and provides early warning by combining the consistency between changes in behavior and sleep through a fusion analysis unit.
It improves the accuracy of mental health status assessment, reduces the possibility of false alarms, and enhances the effectiveness of early warning.
Smart Images

Figure CN121366745A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of mental health monitoring, in particular to a mental health early warning system based on patient behavior trajectory analysis. BACKGROUND
[0002] In related technologies, a mental health early warning system can judge the mental health of a user based on fixed evaluation criteria through user self-reporting or collected sensor data, and issue a warning.
[0003] However, in the above method, different users have different behavior patterns, and it is inaccurate to judge the mental health of different users based on the same standard, resulting in low accuracy and poor warning effect. SUMMARY
[0004] In order to solve the technical problem that different users have different behavior patterns, and it is inaccurate to judge the mental health of different users based on the same standard, resulting in low accuracy and poor warning effect, the purpose of the present application is to provide a mental health early warning system based on patient behavior trajectory analysis, and the technical solution adopted is as follows: The embodiment of the present application provides a mental health early warning system based on patient behavior trajectory analysis, which comprises a data acquisition unit, a behavior analysis unit, a fusion analysis unit and a warning unit. The data acquisition unit is used to acquire position data and sleep data of a user in each time period in a historical time period. The behavior analysis unit is used to determine the behavior complexity and spatial complexity of the user in each time period based on the position data of the user in each time period in the historical time period. The behavior analysis unit is also used to determine the behavior specificity index of each time period based on the behavior complexity and spatial complexity of each time period and the behavior complexity and spatial complexity of the historical time period of each time period. The behavior specificity index of one time period is used to represent the difference between the behavior of the user in the time period and the historical regular behavior. The fusion analysis unit is used to determine the consistency of the change of behavior and sleep in each time period based on the behavior specificity index of each time period and the sleep data of each time period in the historical time period. The warning unit is used to output warning information based on the consistency of the change of behavior and sleep in each time period.
[0005] Optionally, the position data of each time period comprises a plurality of track points and a collection time of each track point, the behavior analysis unit comprises a spatial complexity analysis subunit, which is configured to: perform first clustering processing on the track points in each time period respectively to obtain a plurality of core areas in each time period, and one core area comprises at least one track point; determine a stay duration of each core area based on the collection time of the track points included in the core area; and determine the spatial complexity in each time period based on the stay duration of each core area and the number of core areas in each time period.
[0006] Optionally, the behavior analysis unit comprises a behavior complexity analysis subunit, which is configured to: determine a plurality of moving behaviors in each core area and a moving duration of each moving behavior based on the time corresponding to each track point in each core area; perform second clustering processing on the moving behaviors in each core area to obtain a plurality of similar behavior sets, and one similar behavior set comprises at least one moving behavior; determine a trigger probability of each similar behavior set based on the proportion of the moving duration of at least one moving behavior in the similar behavior set to the stay duration of the core area to which the similar behavior set belongs; determine the behavior complexity of each time period based on the trigger probability of each similar behavior set in each time period and the number of behaviors in each similar behavior set.
[0007] Optionally, the behavior analysis unit is specifically configured to: perform third clustering processing on the center points of all core areas in a historical time period based on the distance between the center points of different core areas to obtain a plurality of frequently-visited area ranges, and one frequently-visited area range comprises at least one core area; determine a historical behavior complexity of each frequently-visited area range based on the behavior complexity of each core area included in the frequently-visited area range in the historical time period; determine a behavior specificity index of each core area in a first time period based on the historical behavior complexity of each frequently-visited area range, the behavior complexity of each core area in the first time period, the number of core areas included in each frequently-visited area range, and the spatial complexity in the first time period, the first time period being any time period in the historical time period; and determine a behavior specificity indicator of the first time period based on the behavior specificity index of each core area in the first time period.
[0008] Optionally, the historical behavior complexity of the range of the frequently-visited area includes a historical mean value and a historical standard deviation, and the behavior analysis unit is specifically configured to: determine a behavior deviation value of the first core area in the first time period based on the historical mean value of the first frequently-visited area range, the historical standard deviation of the first frequently-visited area range, and the behavior complexity of the first core area in the first time period, the first frequently-visited area range being any of the plurality of frequently-visited area ranges, and the first core area being any core area in the first frequently-visited area range; and determine a behavior specificity index of the first core area in the first time period based on the behavior deviation value of the first core area in the first time period, the number of core areas included in the first frequently-visited area range, and the spatial complexity in the first time period.
[0009] Optionally, the behavior analysis unit is specifically configured to: determine a weight of each core area based on the stay duration of the core area; and determine a behavior specificity index of the first time period based on the weight of each core area and the behavior specificity index of each core area in the first time period.
[0010] Optionally, the fusion analysis unit is specifically configured to: determine a sleep quality index of the first time period based on the sleep data of the first time period and the sleep data of the historical time period of the first time period; and determine a consistency of changes of behavior and sleep of the first time period based on the behavior specificity index of the first time period and the sleep quality index of the first time period.
[0011] Optionally, the warning unit is specifically configured to: output real-time warning information corresponding to the consistency of changes of behavior and sleep in the current time period based on the consistency of changes of behavior and sleep in the current time period and a first correspondence relationship, the first correspondence relationship including a plurality of real-time warning numerical interval and real-time warning information corresponding to each real-time warning numerical interval.
[0012] Optionally, the warning unit is specifically configured to: determine a mean value of the consistency of changes of behavior and sleep in the historical time period; and output long-term warning information corresponding to the mean value of the consistency of changes of behavior and sleep in the current time period based on the mean value of the consistency of changes of behavior and sleep in the current time period and a second correspondence relationship, the second correspondence relationship including a plurality of long-term warning numerical interval and long-term warning information corresponding to each long-term warning numerical interval.
[0013] Optionally, the data acquisition unit is specifically configured to: acquire original coordinate data in the historical time period; determine an instantaneous speed of each coordinate based on the original coordinate data; delete coordinate points with an instantaneous speed exceeding a preset instantaneous speed interval from the original coordinate data; and perform interpolation on the missing data based on a preset filtering algorithm to obtain the position data.
[0014] The application has the following beneficial effects: In the embodiment of the application, the mental health early warning system can accurately, comprehensively and individually reflect the behavior change of the user itself by analyzing the behavior complexity and spatial complexity of the user in each time period, the difference between each time period and the historical normal state (i.e. the behavior specificity index), taking itself as a control group, and cross- verifying with sleep data, and warning through the consistency of the behavior and sleep changes, which can improve the accuracy of the user's mental health state judgment, reduce the possibility of false positives, and improve the warning effect. BRIEF DESCRIPTION OF DRAWINGS
[0015] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the application or the prior art, the drawings needed to be used in the embodiment or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.
[0016] Figure 1 A structure diagram of a mental health early warning system based on patient behavior trajectory analysis provided by one embodiment of the application; Figure 2 A structure diagram of another mental health early warning system based on patient behavior trajectory analysis provided by one embodiment of the application; Figure 3 A structure diagram of another mental health early warning system based on patient behavior trajectory analysis provided by one embodiment of the application. DETAILED DESCRIPTION
[0017] In order to further illustrate the technical means and effects adopted by the application to achieve the predetermined invention purpose, the specific implementation, structure, features and effects of the mental health early warning system based on patient behavior trajectory analysis according to the application are described in detail as follows in combination with the drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.
[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the application belongs.
[0019] Currently, for adult entering the work, due to the long-term high pressure and monotonous work environment of this group of people, the mental health changes of this group of people are subtle and difficult to detect; and the existing mental health capture of this group of people relies on low-frequency questionnaire survey and psychological counseling, when this group of people finds their own mental health problems, the problems are often serious; The mental health early warning system in the prior art mainly depends on user self-reporting or single-dimensional passive sensor data, has strong subjectivity and low data source reliability, many systems use pre-defined fixed thresholds or group standards to judge whether the individual behavior is abnormal, ignores the uniqueness and dynamic change of the user's personal behavior pattern, resulting in low early warning accuracy and high false positive rate; at the same time, the analysis of user behavior trajectory in the existing scheme is limited to a single dimension of space or time, and cannot combine multi-period regional behavior changes and sleep quality for deep fusion analysis, so it is difficult to capture the subtle fluctuations and long-term evolution trend of the mental state, and there is a possibility of misjudgment in judging the behavior changes caused by positive life changes and the negative behavior degradation caused by psychological distress.
[0020] The specific scheme of the mental health early warning system based on patient behavior trajectory analysis provided by the present application will be described in detail below in combination with the drawings.
[0021] Please refer to Figure 1 , which shows the structure diagram of the mental health early warning system based on patient behavior trajectory analysis provided by an embodiment of the present application.
[0022] As Figure 1 shown, the mental health early warning system based on patient behavior trajectory analysis 10 includes a data acquisition unit 101, a behavior analysis unit 102, a fusion analysis unit 103, and a warning unit 104.
[0023] The data acquisition unit 101 is configured to acquire the position data and sleep data of the user in each time period in a historical time period.
[0024] It should be understood that the position data is a continuous latitude and longitude sequence with a time stamp, that is, a plurality of coordinate points at continuous time points.
[0025] In the embodiment of the present application, a coordinate point at a time is referred to as a trajectory point, and the position data at a time includes a trajectory point and the acquisition time of the trajectory point. Optionally, the historical time period can be 180 days, and a time period can be 1 day.
[0026] Optionally, a time period can be adjusted according to the user's regular sleep time, for example, from 7 am to the next morning at 7 am.
[0027] Optionally, the original global positioning system (GPS) coordinate data can be collected by a smart device carried by the user, and the original GPS coordinate data is determined as the position data, and the sleep data is collected by a smart watch or a smart bracelet worn by the user.
[0028] Optionally, the collection frequency of the position data can be 1 time per minute.
[0029] Optionally, the sleep data can include heart rate, total sleep duration, duration of different sleep stages (including light sleep period, deep sleep period, and rapid eye movement period), and the like.
[0030] In an optional implementation, the collected original coordinates can be preprocessed, and the data collection unit 101 is specifically configured to: obtain original coordinate data in the historical time period; determine the instantaneous speed of each coordinate according to the original coordinate data; delete coordinate points with instantaneous speed exceeding a preset instantaneous speed interval from the original coordinate data; and interpolate the missing data based on a preset filtering algorithm to obtain the position data.
[0031] It should be understood that the original coordinate data is the original GPS coordinate data collected as described above.
[0032] Optionally, the instantaneous speed of each coordinate can be determined based on the distance between coordinate points at adjacent time points and the time difference between adjacent time points.
[0033] It should be understood that when the instantaneous speed of a coordinate point exceeds the preset instantaneous speed interval, the coordinate point is abnormal, and the coordinate point can be marked as a drift point and deleted.
[0034] Optionally, the preset instantaneous speed interval can be multiple, such as a walking instantaneous speed interval, a cycling instantaneous speed interval, a driving instantaneous speed interval, and the like.
[0035] Optionally, the user's daily walking speed range, cycling speed range, and driving speed range can be set, and then twice the speed range of each speed range is determined as the walking instantaneous speed interval, the cycling instantaneous speed interval, and the driving instantaneous speed interval.
[0036] For example, the user's daily walking speed range is 0.5-5 km / h (kilometers per hour), the cycling speed range is 5-25 km / h, and the driving speed range is 20-120 km / h, then the walking instantaneous speed interval is 0.25-10 km / h, the cycling instantaneous speed interval is 2.5-50 km / h, and the driving instantaneous speed interval is 40-240 km / h.
[0037] Optionally, the acceleration of each coordinate point can also be calculated, and when the acceleration of a coordinate point exceeds a preset human body acceleration threshold, the coordinate point is marked as an abrupt abnormal point, and the coordinate point is deleted.
[0038] For example, the preset human body acceleration threshold can be 5 m / s² (meter per second squared).
[0039] It can be understood that due to the deletion of some coordinate points or the fact that the user does not wear a smart device at some time, part of the data is lost, and therefore, the current coordinate data can be interpolated to complete the missing period of coordinate points to form a continuous coordinate sequence without breakpoints.
[0040] Optionally, the interpolation processing can be performed by an extended Kalman filter (EKF).
[0041] The behavior analysis unit 102 is configured to determine the behavior complexity and the spatial complexity of the user in each time period based on the position data of the user in each time period in the historical time period.
[0042] It can be understood that narrow spatial activity range (low spatial entropy) and irregular time rhythm (low time entropy) are related to psychological problems such as depression and anxiety.
[0043] It should be understood that the spatial complexity of the user in a time period is used to represent the discreteness and diversity of the spatial distribution of the activity range of the user in the time period, and the behavior complexity of the user in a time period is used to represent the richness of the behavior mode of the behavior of the user in the time period in different location activities.
[0044] Optionally, the spatial complexity of the user in each time period can be determined based on the number of different locations in the position data of the user in each time period, and the behavior complexity of the user in each time period can be determined based on the number of visits of the user to each location in each time period.
[0045] The behavior analysis unit 102 is further configured to determine the behavior specificity index of each time period based on the behavior complexity and the spatial complexity of each time period and the behavior complexity and the spatial complexity of the historical time period of each time period.
[0046] The behavior specificity index of a time period is used to represent the difference between the behavior of the user in the time period and the historical regular behavior.
[0047] It can be understood that the behavior complexity and the spatial complexity of a time period and the behavior complexity and the spatial complexity of the historical time period can be compared to obtain the behavior specificity index of the time period.
[0048] Optionally, the product of the behavior complexity and the space complexity of a time period can be determined as the activity diversity of the time period, and a difference between the activity diversity of each time period and an average of the activity diversity in the historical time period is taken as the behavior specificity indicator of each time period.
[0049] The fusion analysis unit 103 is configured to determine the consistency of the change of the behavior and the sleep of each time period based on the behavior specificity indicator of each time period and the sleep data of each time period in the historical time period.
[0050] It should be understood that there is an influence relationship between the actual mental health of the user and the sleep at night. When negative mental states such as anxiety and depression exist, the actual sleep of the user will be significantly abnormal, for example, the proportion of deep sleep time decreases, or the overall sleep time shortens (insomnia leads to). When positive mental states exist, the actual sleep of the user tends to be stable or improves to a certain extent.
[0051] It can be understood that, in the case that the behavior specificity indicator of the user in a time period becomes high and the sleep quality becomes poor, or in the case that the behavior specificity indicator of the user in a time period becomes low and the sleep quality becomes good, it indicates that the change of the behavior and the sleep of the user is relatively consistent.
[0052] In an implementation manner of the embodiment of the present application, the fusion analysis unit 103 is specifically configured to: determine the sleep quality index of each time period based on the sleep data of each time period and the sleep data of the historical time period of each time period; and determine the consistency of the change of the behavior and the sleep of each time period based on the behavior specificity indicator of each time period and the sleep quality index of the first time period.
[0053] In an optional implementation manner, the average and the standard deviation of the total sleep time, the average and the standard deviation of the light sleep time, the average and the standard deviation of the deep sleep time, and the average and the standard deviation of the rapid eye movement time of the historical time period can be determined respectively, and then the scores of the total sleep time, the light sleep time, the deep sleep time, and the rapid eye movement time of each time period are evaluated based on the standard score (Z-Score), and the average of the scores of the total sleep time, the light sleep time, the deep sleep time, and the rapid eye movement time of each time period is determined as the sleep quality index of each time period.
[0054] In an alternative implementation, the behavior specificity index and the sleep quality index of each time period in the historical time period can be normalized respectively to have a value range of [-1, 1], and then a two-dimensional vector between the behavior specificity index and the sleep quality index of each time period is constructed, the two-dimensional vector between the behavior specificity index and the sleep quality index of each day is mapped in a two-dimensional coordinate, and the consistency of the change of the behavior and the sleep of each time period is determined based on the cosine value of the angle between the two-dimensional vector of each time period and the reference vector (1, 1).
[0055] Optionally, the behavior specificity index (or the sleep quality index) of each time period can be normalized based on the maximum-minimum value normalization method.
[0056] Optionally, the two-dimensional coordinate includes four quadrants, and a direction from the coordinate origin to the coordinate (1, 1) in the first quadrant can be defined as the direction of the highest positive feedback.
[0057] It can be understood that the reference vector (1, 1) represents an ideal positive change, i.e., more active behavior and better sleep, which is the most positive health signal.
[0058] It should be understood that when the behavior specificity index of a certain time period is positive, it means that the behavior of the user in the time period is more active and richer than usual; when the behavior specificity index of a certain time period is negative, it means that the behavior of the user in the time period is more monotonous than usual; when the sleep quality index of a certain time period is positive, it means that the sleep in the time period is better than usual; when the sleep quality index of a certain time period is negative, it means that the sleep in the time period is worse than usual.
[0059] Optionally, the consistency of the change of the behavior and the sleep of a time period satisfies the following formula: ; wherein, represents the consistency of the change of the behavior and the sleep of the time period , represents the behavior specificity index of the time period , represents the sleep quality index of the time period .
[0060] According to the above formula, the two-dimensional vector composed of the behavior specificity index and the sleep quality index of the time period is ( , ), and the above formula can be used to evaluate the two-dimensional vector ( , Consistency with the direction of the reference vector (1, 1).
[0061] When and are both positive and close in value, , it means that the direction of the two-dimensional vector ( , ) is almost the same as the direction of the reference vector (1, 1). At this time, the user's behavior is significantly active, and sleep is significantly improved, which is a strong positive signal.
[0062] When and are both positive or both negative, , it means that the angle between the two-dimensional vector ( , ) and the reference vector (1, 1) is less than 90 degrees. At this time, the user's behavior and sleep change in the same direction (good or bad), which is considered a "coordinated" state.
[0063] When and one of the indicators is close to 0, or both absolute values are equal but signs are opposite, , it means that the two-dimensional vector ( , ) is perpendicular to the reference vector (1, 1). At this time, there is no significant correlation or mutual offset between the user's behavior and sleep changes, indicating a stable state or no clear signal.
[0064] When and are opposite (one positive and one negative), , it means that the angle between the two-dimensional vector ( , ) and the reference vector (1, 1) is greater than 90 degrees. At this time, the behavior and sleep change in the opposite direction, which is a "disorder" state (such as active behavior but deteriorating sleep, or behavior withdrawal but improved sleep), which is a risk signal that needs attention.
[0065] When and are both negative and close in value, , it means that the direction of the two-dimensional vector ( , ) is completely opposite to the direction of the reference vector (1, 1). At this time, the user's behavior is significantly withdrawn, and sleep is significantly deteriorated, sending the strongest negative warning signal.
[0066] It can be understood that when the behavior and sleep performance of the user are contradictory, it indicates that the physiological state of the user is in a state of imbalance, and such performance is often a precursor to the occurrence of psychological problems. Therefore, the consistency of the change direction of the behavior and the sleep is more important than the single behavior change or the sleep change.
[0067] Optionally, when and are positive at the same time or negative at the same time, further analysis can be performed when and are positive at the same time, indicating an active state, and when and are negative at the same time, indicating a negative state.
[0068] It can be understood that the sleep quality of the user can be personalized by comparing the historical sleep data with the current sleep data, and then the behavior and sleep coordination verification mechanism can distinguish the more real state of the user, thereby improving the judgment accuracy.
[0069] The warning unit 104 is configured to output warning information based on the consistency of the change of the behavior and the sleep in each time period.
[0070] Optionally, the warning information can include the consistency of the change of the behavior and the sleep in each time period, the sleep quality index, and the behavior-specific index.
[0071] In an optional implementation, the warning unit 104 is specifically configured to output real-time warning information corresponding to the consistency of the change of the behavior and the sleep in the current time period based on the consistency of the change of the behavior and the sleep in the current time period and a first corresponding relationship.
[0072] The first corresponding relationship includes a plurality of real-time warning value intervals and real-time warning information corresponding to each real-time warning value interval.
[0073] For example, the real-time warning value interval can be set based on the value range of the above-mentioned , and the real-time warning information corresponding to each real-time warning value interval can be generated based on the meaning represented by the value range of each .
[0074] For example, when , the real-time warning value space can be set as , and when , the real-time warning value space can be set as .
[0075] It can be understood that the mental health of the user is a gradual accumulation process, and therefore, the early warning can be performed based on the consistency of the changes in the behavior and sleep in the historical time period. In another optional implementation, the early warning unit 104 is specifically further configured to: determine a mean value of the consistency of the changes in the behavior and sleep in the historical time period; and output long-term early warning information corresponding to the mean value of the consistency of the changes in the behavior and sleep in the current time period based on the mean value of the consistency of the changes in the behavior and sleep in the current time period and the second correspondence.
[0076] The second correspondence includes a plurality of long-term early warning value intervals and long-term early warning information corresponding to each long-term early warning value interval.
[0077] Optionally, the mean value of the consistency of the changes in the behavior and sleep in the historical time period is set as When , only the value of the is displayed: when , the long-term early warning information can prompt the user to perform more outdoor activities or exercises; when , the long-term early warning information can suggest the user to pay attention to the mental health state, perform more outdoor activities or exercises, and suggest the user to consult a psychologist for further examination and treatment.
[0078] It can be understood that the output of the real-time early warning information can provide immediate reminders for sudden state decline, so that the user can understand the state change of the user, and the output of the long-term early warning can identify the persistent and gradual risk, effectively avoiding excessive early warning caused by single-day normal fluctuations, and being more intelligent and humanized.
[0079] In the embodiments of the present application, the mental health early warning system can accurately, comprehensively, and individually reflect the behavior change of the user by analyzing the behavior complexity and spatial complexity of the user in each time period, the difference between each time period and the historical normal state (i.e., the behavior specificity index), and taking itself as a control group, and cross-verification is performed in combination with the sleep data, early warning is performed through the consistency of the changes in the behavior and sleep, the accuracy of the judgment of the mental health state of the user is improved, the possibility of false positives is reduced, and the early warning effect is improved.
[0080] In one implementation of the embodiments of the present application, the position data of each time period includes a plurality of track points and a collection time of each track point, and the behavior complexity and the spatial complexity are calculated based on the track points. Figure 1 For example, Figure 2As shown, the behavior analysis unit 102 includes a space complexity analysis subunit 201, which is used to: perform a first clustering process on the trajectory points in each time period to obtain multiple core regions in each time period; determine the dwell time of each core region based on the collection time of the trajectory points included in each core region; and determine the space complexity in each time period based on the dwell time of each core region and the number of core regions in each time period.
[0081] One core region includes at least one trajectory point.
[0082] Optionally, the distance between every two trajectory points can be determined, and then the first clustering process can be performed based on the distance between the trajectory points and the density-based spatial clustering of applications with noise (DBSCAN) algorithm.
[0083] Optionally, in the first clustering process based on the DBSCAN density clustering algorithm, the neighborhood radius can be set to 50 meters and the minimum number of points (MinPts) to 10.
[0084] Optionally, the dwell time in a core area can be determined based on the acquisition time of the first trajectory point and the acquisition time of the last trajectory point within the core area.
[0085] Optionally, the sum of the dwell times in multiple core areas within each time period can be used to determine the time period. The total dwell time within the core area is determined, and then the percentage of dwell time in each core area within the total dwell time is determined. Based on this percentage of dwell time in each core area within the total dwell time, the information entropy formula is substituted to obtain the space complexity of each time period.
[0086] Alternatively, the space complexity of a time period satisfies the following formula: ; in, Indicates time period space complexity, Indicates time period Inner Duration and time cycle of stay in each core area The percentage of total stay within the premises. Indicates time period The number of inner core areas.
[0087] Based on the above formula, it should be understood that when A value close to 0 indicates that the user only visits one area, or spends most of their time in that area, indicating an extremely narrow and monotonous activity range. This manifests as "behavioral withdrawal," a trait highly correlated with mental health issues such as depression, anxiety, and social isolation. A higher value indicates that the user's time is relatively evenly distributed across the various core areas, with a wide range of activities and rich and diverse spatial activity patterns, which is usually related to a positive psychological state.
[0088] Understandably, the space complexity analysis subunit 201 considers both the number of locations visited by the user and the duration of their stay at each location, accurately quantifying the spatial breadth of the user's activities and providing a more realistic reflection of the user's activity status.
[0089] Combination Figure 2 ,like Figure 3 As shown, in one implementation of this application embodiment, the behavior analysis unit 102 includes a behavior complexity analysis subunit 301, which is used to: determine multiple movement behaviors and the movement duration of each movement behavior in each core area based on the time corresponding to each trajectory point in each core area; perform a second clustering process on the movement behaviors in each core area to obtain multiple similar behavior sets; determine the trigger probability of each similar behavior set based on the proportion of the dwell time of at least one movement behavior in the similar behavior set in its respective core area; and determine the behavior complexity of each time period based on the trigger probability of each similar behavior set and the number of behaviors in each similar behavior set within each time period.
[0090] A set of similar behaviors includes at least one movement behavior.
[0091] It should be understood that the duration of a movement is the duration of that movement.
[0092] In one alternative implementation, trajectory points with instantaneous speeds greater than a moving speed threshold can be selected and identified as moving points. The acquisition times corresponding to moving points at consecutive moments can be merged to obtain multiple moving time periods. The behavior within each moving time period can be identified as a moving behavior. All trajectory points within the moving time period can be connected in chronological order to obtain the moving trajectory of the moving behavior. The duration of the moving time period can be identified as the moving duration of the moving behavior.
[0093] For example, the moving speed threshold can be 0.5 m / s.
[0094] Optionally, the second clustering processing can be performed on the plurality of mobile behaviors based on the similarity between the mobile trajectories of different mobile behaviors, and mobile behaviors with similar trajectory shapes can be clustered into a similar behavior set.
[0095] Optionally, the similarity between different mobile trajectories can be determined according to the coordinates of the trajectory points in the mobile trajectories.
[0096] Optionally, the second clustering processing can be K-means clustering algorithm (K-means) clustering, and the elbow method can be used to obtain the optimal K.
[0097] Optionally, the trigger probability of a similar behavior set is the ratio of the sum of the mobile duration of each mobile behavior in at least one similar behavior set to the stay duration of the corresponding core area.
[0098] Optionally, the trigger probabilities of the plurality of similar behavior sets can also be standardized.
[0099] Optionally, the product of the trigger probability of each similar behavior set and the number of mobile behaviors of the similar behavior set can be determined as the behavior complexity of the similar behavior set, the sum of the behavior complexity of each similar behavior set in each core area can be determined as the behavior complexity of the core area, and the sum of the behavior complexity of each core area in the time period can be determined as the behavior complexity of the time period.
[0100] It can be understood that the behavior complexity analysis subunit 301 can quantify the richness of the behavior mode of the user in a specific place. By identifying and clustering the mobile behaviors, not only can the region where the user is located be determined, but also what the user does in the region can be analyzed in depth, thereby complementing the analysis of the spatial extent by the spatial complexity analysis subunit 201, jointly judging the diversity of the personal behavior of the user, and enhancing the ability of the psychological health warning system 10 to perceive abnormalities.
[0101] In combination with the process of analyzing the spatial complexity by the spatial complexity analysis subunit 201 and the process of analyzing the behavior complexity by the behavior complexity analysis subunit 301, when the behavior analysis unit 102 is used to determine the behavior specificity index of each time period based on the behavior complexity and the spatial complexity of each time period, and the behavior complexity and the spatial complexity of the historical time periods of each time period, the behavior analysis unit 102 is specifically used for: The third clustering processing is performed on the center points of all core areas in the historical time period based on distances between the center points of different core areas, to obtain a plurality of frequently-visited area ranges; a historical behavior complexity of each frequently-visited area range is determined based on a behavior complexity of each core area included in the frequently-visited area range in the historical time period; a behavior specificity index of each core area in the first time period is determined based on the historical behavior complexity of the each frequently-visited area range, the behavior complexity of the each core area in the first time period, a number of core areas included in the each frequently-visited area range, and a spatial complexity in the first time period; and a behavior specificity index of the first time period is determined based on the behavior specificity index of the each core area in the first time period.
[0102] The first time period is any time period in the historical time period.
[0103] It can be understood that when a user stays in the same and single environment for a long time, mental problems such as anxiety and depression may occur, and therefore the mental health of the user can be analyzed by comparing the change difference of the core areas between different time periods. Specifically, the change difference of the core areas between different time periods is reflected in two aspects: the position change between the core areas of different days, and the behavior change in the core areas of similar positions corresponding to different days.
[0104] Optionally, the third clustering processing can be a Kmeans clustering algorithm, the center points of all core areas are projected in a city map coordinate system, the center points of all core areas are clustered based on the Euclidean distance between two center points, and the elbow method is used to obtain the optimal K. The center points with similar distances can be clustered into a cluster, and one cluster corresponds to one frequently-visited area range.
[0105] Optionally, the mean of the coordinates of the plurality of trajectory points included in one core area can be determined as the coordinates of the center point of the core area.
[0106] Optionally, during the third clustering processing, the center points with similar distances and small time period differences can also be clustered into a cluster in combination with the time period corresponding to each center point (i.e. the time period between the earliest time and the latest time of the trajectory points in the core area where the center point is located).
[0107] It can be understood that the core area in one core area represents the user's visit to the frequently-visited area range in one time period, and the total number of center points in one frequently-visited area range represents the access behavior frequency of the user to the frequently-visited area range. The higher the access frequency is, the more times the user visits the frequently-visited area range; and the lower the access frequency is, the less times the user visits the frequently-visited area range, and the higher the specificity of the frequently-visited area range is.
[0108] In one alternative implementation, the average behavioral complexity of each core region included in each frequently visited region over a historical time period can be determined as the historical behavioral complexity of each frequently visited region.
[0109] In another alternative implementation, the standard deviation of the behavioral complexity of each core region included in each frequently visited region over a historical time period can be used to determine the historical behavioral complexity of each frequently visited region.
[0110] In one implementation of this application, the historical behavioral complexity of a frequently visited region range includes the historical mean and the historical standard deviation. The first frequently visited region range is any one of the plurality of frequently visited region ranges, and the first core region is any core region in the first frequently visited region range. Taking the first core region in the first frequently visited region range as an example, the behavioral deviation value of the first core region in the first time period can be determined first based on the historical mean of the first frequently visited region range, the historical standard deviation of the first frequently visited region range, and the behavioral complexity of the first core region in the first time period. Then, based on the behavioral deviation value of the first core region in the first time period, the number of core regions included in the first frequently visited region range, and the spatial complexity in the first time period, the behavioral specificity index of the first core region in the first time period can be determined.
[0111] Optionally, behavioral specificity of the first and core regions within the first time period can be determined based on standardized difference scores.
[0112] The behavioral deviation of a core region within a time period satisfies the following formula: ; in, Indicates time period Inner behavioral deviation values for each core region Indicates time period Inner The behavioral complexity of each core area Indicates the range of frequently visited areas Historical average, Indicates the range of frequently visited areas The historical standard deviation.
[0113] In the above formula, When the value is positive, it indicates the time period. Inner The behavioral complexity of each core area is higher than historical norms; the larger the value, the greater the deviation from historical norms. When the value is negative, it indicates a time period. Inner The behavioral complexity of each core area is lower than the historical norm. The smaller the value, the greater the deviation from the historical norm. Whether it is higher or lower than the historical norm, it is a kind of "behavioral anomaly".
[0114] It is understandable that by comparing the behavioral complexity of a certain core area on a certain day (i.e., the current behavior) with the user's historical behavioral complexity (i.e., the user's historical baseline), unreasonable fixed thresholds are eliminated, and the deviation of the user's behavior can be characterized in a personalized way.
[0115] Optionally, the greater the spatial complexity of the first core region within the first time period, the smaller the specificity and the smaller the behavioral specificity index. Similarly, the smaller the number of core regions included in the range of the first frequently visited region, the smaller the behavioral specificity index should be. Therefore, the reciprocal of the spatial complexity within the first time period and the reciprocal of the number of core regions included in the range of the first frequently visited region can be obtained. Then, the product of the behavioral deviation value of the first core region within the first time period, the reciprocal of the number of core regions included in the range of the first frequently visited region, and the reciprocal of the spatial complexity within the first time period can be determined as the behavioral specificity index of the first core region within the first time period.
[0116] It should be noted that in practical applications, when the space complexity is zero, it can be replaced with a very small positive number (such as 1e-5) to avoid calculation errors.
[0117] In one alternative implementation, the mean of the behavior-specific indices of all core regions within each first time period can be used as the behavior-specific index for that first time period.
[0118] In another alternative implementation, the weight of each core region can be determined based on the dwell time of each core region; and the behavior-specific index of each core region in the first time period can be determined based on the weight of each core region and the behavior-specific index of each core region in the first time period.
[0119] It should be understood that the longer a user stays in a core area, the greater the weight of the user's behavior specificity index in that core area.
[0120] Optionally, the dwell time of all core areas within the first time period can be normalized to obtain the weight of each core area.
[0121] Optionally, the behavior specificity indexes of each core area in the first time period are weighted and averaged based on the weight of each core area, to obtain the behavior specificity index of the first time period.
[0122] It can be understood that by introducing the length of stay as the weight and performing weighted averaging, the evaluation conclusion can be made more reliable by avoiding interference from accidental changes of the secondary place.
[0123] In the embodiments of the present application, the core areas in the historical time period are clustered to obtain the range of the frequently-visited area, and the behavior deviation value of the current behavior relative to the personal historical behavior is calculated based on the range, to establish a completely personalized dynamic behavior baseline. The personalized baseline makes the early warning standard vary from person to person and from place to place, and can effectively distinguish normal daily fluctuations from real abnormal signals, so as to improve the early warning sensitivity while significantly reducing the false positive rate.
[0124] In summary, the psychological health early warning system based on patient behavior trajectory analysis provided by the embodiments of the present application automatically identifies the inherent behavior period and important area of the user from the GPS trajectory of the user through an unsupervised clustering algorithm, realizes the high personalization and automation of behavior analysis, and effectively overcomes the disadvantages of subjective report bias and preset rule rigidity. The system can sensitively capture subtle and clinically significant behavior deviations by constructing a multi-dimensional personal dynamic behavior baseline, significantly improving the accuracy and early warning of the system. The innovative introduction of the association analysis model of behavior specificity and sleep quality enables the system to distinguish behavior attributes, effectively identifies positive behavior exploration and negative functional withdrawal, thereby significantly reducing the false positive rate and avoiding unnecessary interference to the user.
[0125] It should be noted that the above-mentioned order of the embodiments of the present application is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are possible or can be advantageous.
[0126] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment mainly describes the differences from other embodiments.
Claims
1. A mental health early warning system based on patient behavior trajectory analysis, characterized in that, The method comprises the following steps: The data acquisition unit is configured to acquire position data and sleep data of a user in each time period in a historical time period; The behavior analysis unit is configured to determine behavior complexity and spatial complexity of the user in each time period based on the position data of the user in each time period in the historical time period; The behavior analysis unit is further configured to determine a behavior specificity index of each time period based on the behavior complexity and the spatial complexity of each time period and the behavior complexity and the spatial complexity of a historical time period of each time period, the behavior specificity index of one time period being used to represent a difference degree between the behavior of the user in the time period and a historical regular behavior; The fusion analysis unit is configured to determine a change consistency between the behavior and the sleep of each time period based on the behavior specificity index of each time period and sleep data of each time period in the historical time period; The early warning unit is configured to output early warning information based on the change consistency between the behavior and the sleep of each time period.
2. The mental health early warning system based on patient behavior trajectory analysis of claim 1, wherein, The position data of each time period comprises a plurality of trajectory points and an acquisition time of each trajectory point, the behavior analysis unit comprises a spatial complexity analysis subunit, and the spatial complexity analysis subunit is configured to: perform first clustering processing on the trajectory points in each time period respectively to obtain a plurality of core areas in each time period, and one core area comprises at least one trajectory point; determine a stay duration of each core area based on the acquisition time of the trajectory points included in each core area; determine the spatial complexity in each time period based on the stay duration of each core area and the number of core areas in each time period. 3.The mental health early warning system based on patient behavior trajectory analysis of claim 2, wherein, The behavior analysis unit comprises a behavior complexity analysis subunit, and the behavior complexity analysis subunit is configured to: determine a plurality of moving behaviors in each core area and a moving duration of each moving behavior based on the time corresponding to each trajectory point in each core area; perform second clustering processing on the moving behaviors in each core area to obtain a plurality of similar behavior sets, and one similar behavior set comprises at least one moving behavior; determine a trigger probability of each similar behavior set based on a proportion of the moving duration of at least one moving behavior in the similar behavior set in the stay duration of the core area to which the moving behavior belongs; determine the behavior complexity of each time period based on the trigger probability of each similar behavior set in each time period and the number of behaviors in each similar behavior set.
4. The mental health early warning system based on patient behavior trajectory analysis of claim 3, wherein, The behavior analysis unit is specifically configured to: perform third clustering processing on the center points of all core areas in the historical time period based on distances between the center points of different core areas to obtain a plurality of frequently-visited area ranges, and one frequently-visited area range comprises at least one core area; determine a historical behavior complexity of each frequently-visited area range based on the behavior complexity of each core area included in each frequently-visited area range in the historical time period. determine a behavior specificity index of each core area in the first time period based on the historical behavior complexity of each frequently-visited area range, the behavior complexity of each core area in the first time period, the number of core areas included in each frequently-visited area range, and the spatial complexity in the first time period, the first time period being any time period in the historical time period; determine a behavior specificity index of the first time period based on the behavior specificity index of each core area in the first time period.
5. The mental health early warning system based on patient behavior trajectory analysis of claim 4, wherein, The historical behavior complexity of a frequently-visited area range includes a historical mean value and a historical standard deviation, and the behavior analysis unit is specifically configured to: determine a behavior deviation value of a first core area in the first time period based on the historical mean value of a first frequently-visited area range, the historical standard deviation of the first frequently-visited area range, and the behavior complexity of the first core area in the first time period, the first frequently-visited area range being any of the frequently-visited area ranges, and the first core area being any core area in the first frequently-visited area range; determine a behavior specificity index of the first core area in the first time period based on the behavior deviation value of the first core area in the first time period, the number of core areas included in the first frequently-visited area range, and the spatial complexity in the first time period. 6.The mental health early warning system based on patient behavior trajectory analysis of claim 4, wherein, The behavior analysis unit is specifically configured to: determine a weight of each core area based on the stay duration of each core area; determine a behavior specificity index of the first time period based on the weight of each core area and the behavior specificity index of each core area in the first time period.
7. The mental health early warning system based on patient behavior trajectory analysis of claim 1, wherein, The fusion analysis unit is specifically configured to: determine a sleep quality index of the first time period based on sleep data of the first time period and sleep data of a historical time period of the first time period; determine a consistency of behavior and sleep change of the first time period based on the behavior specificity index of the first time period and the sleep quality index of the first time period. 8.The mental health early warning system based on patient behavior trajectory analysis of claim 1, wherein, The early warning unit is specifically configured to: output real-time early warning information corresponding to the consistency of behavior and sleep change in the current time period based on the consistency of behavior and sleep change in the current time period and a first correspondence relationship, the first correspondence relationship including a plurality of real-time early warning numerical intervals and real-time early warning information corresponding to each real-time early warning numerical interval. 9.The mental health early warning system based on patient behavior trajectory analysis of claim 1, wherein, The early warning unit is specifically configured to: determine a mean value of the consistency of behavior and sleep change in the historical time period; output long-term early warning information corresponding to the mean value of the consistency of behavior and sleep change in the current time period based on the mean value of the consistency of behavior and sleep change in the current time period and a second correspondence relationship, the second correspondence relationship including a plurality of long-term early warning numerical intervals and long-term early warning information corresponding to each long-term early warning numerical interval.
10. The mental health early warning system based on patient behavior trajectory analysis of claim 1, wherein, The data collection unit is specifically configured to: acquire original coordinate data in the historical time period; determine an instantaneous speed of each coordinate based on the original coordinate data; delete coordinate points with instantaneous speed beyond a preset instantaneous speed interval from the original coordinate data; interpolate the missing data based on a preset filtering algorithm to obtain the position data.