A portable traditional Chinese medicine constitution insomnia intelligent diagnosis method, device and medium

By collecting data before falling asleep and at night to generate a diurnal transition base and a steady-state reference profile, and combining it with physical constitution question and answer data to identify the nighttime onset transition window, an insomnia formation chain is generated. This solves the problem that the abnormal onset location at night is not closely related to physical constitution, and achieves accurate localization and differentiation of different instability patterns in insomnia diagnosis.

CN123166573APending Publication Date: 2026-11-27CHENZHOU IND TECHNOLOGY RESEARCH INSTITUTE OF XIANGNAN UNIVERSITY +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611254446.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies for diagnosing insomnia suffer from insufficient identification of the onset of nocturnal abnormalities and a weak correlation between physical constitution and the nocturnal abnormal process, resulting in inadequate characterization of the early stages of insomnia formation and insufficient ability to distinguish between different nocturnal instability patterns.

Method used

By collecting pre-sleep homeostasis reference data and continuous nighttime monitoring data, an individual diurnal transition baseline and pre-sleep homeostasis reference profile are generated. The nighttime initiation transition window is identified, and a body constitution deviation constraint vector is generated by combining the body constitution basic question and answer data. The nighttime initiation transition sequence is screened, an insomnia formation chain is generated, and multi-level diversion judgment is performed to determine the body constitution deviation trigger window.

Benefits of technology

It enables accurate localization of the onset of nocturnal insomnia abnormalities, closely links the TCM constitution direction with the nocturnal abnormal process, distinguishes different nocturnal instability patterns and determines the constitution shift trigger window, thus improving the accuracy and comprehensiveness of insomnia diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123166573A_ABST
    Figure CN123166573A_ABST
Patent Text Reader

Abstract

The application discloses a portable traditional Chinese medicine constitution insomnia intelligent diagnosis method and device and medium, and relates to the technical field of sleep diagnosis, and comprises the following steps: collecting steady-state reference data before falling asleep, night continuous monitoring data and constitution related input data, generating individual diurnal transition base, steady-state reference contour before falling asleep and effective monitoring credible markers; identifying a night starting turning window, generating a night starting turning candidate sequence and a starting turning representation group; generating a constitution offset constraint vector and screening to obtain a constitution constraint starting turning sequence; generating an insomnia formation chain, and acquiring continuous turning times, reverse rollback times and constitution direction closure depth; performing multi-layer shunt judgment, determining a constitution offset trigger window and outputting traditional Chinese medicine constitution insomnia diagnosis data. The application can identify the night abnormal starting position based on the individual steady-state baseline, establish the closure association between the traditional Chinese medicine constitution direction and the night abnormal starting process, and complete the differentiation of different night instability forms and the determination of the constitution offset trigger window.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of sleep diagnosis technology, and in particular to a portable intelligent diagnostic method, device and medium for TCM constitution-related insomnia. Background Technology

[0002] With the development of wearable monitoring, mobile terminal data collection, and sleep physiological signal analysis technologies, portable insomnia diagnosis is gradually evolving from single-questionnaire assessment to multi-source data fusion. Conventional methods typically collect nighttime monitoring information such as pulse waves, body movement, skin conductance, and body surface temperature, combined with sleep logs, symptom scales, or subjective complaints, to identify states such as difficulty falling asleep, frequent awakenings, early awakenings, and decreased sleep quality. In traditional Chinese medicine applications, constitution-related questions, subjective symptom classification, and body constitution analysis are often introduced to help determine the relationship between insomnia and individual constitution.

[0003] However, the aforementioned conventional methods still have two limitations in practical applications. First, many methods focus on static judgment of overnight monitoring results, rarely identifying the starting and turning points of nocturnal abnormalities from the individual's pre-sleep homeostasis baseline, resulting in insufficient characterization of the early stages of insomnia formation. Second, information on physical constitution and nocturnal physiological abnormalities are often used in parallel, lacking characterization of the closed-loop relationship between physical constitution and the onset and subsequent expansion of abnormalities, thus leaving room for improvement in the ability to distinguish different forms of nocturnal instability. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides a portable intelligent diagnostic method for TCM constitution-related insomnia, which solves the problems of insufficient identification of the starting location of nighttime abnormalities and weak correlation between constitution direction and nighttime abnormality process in existing technologies.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, this invention provides a portable intelligent diagnostic method for TCM constitution-related insomnia, comprising: collecting pre-sleep homeostatic reference data, continuous nighttime monitoring data, and constitution-related input data; and generating an individual diurnal transition baseline, a pre-sleep homeostatic reference profile, and valid monitoring credibility markers after quality correction and time alignment; performing sliding window analysis on the individual diurnal transition baseline based on the pre-sleep homeostatic reference profile to identify the nighttime initiation transition window and generate a nighttime initiation transition candidate sequence and an initiation transition characterization group; and generating a constitution offset constraint vector through constitution-based question-and-answer data and pre-sleep complaint data. The system combines a constitution offset constraint rule base to screen candidate nighttime initiation transition sequences, generating constitution-constrained initiation transition sequences. Starting from the nighttime initiation transition window in the constitution-constrained initiation transition sequence, the system identifies the transitional relationships between perturbation extension segments along the nighttime time axis, generating an insomnia formation chain and obtaining the number of consecutive transitions, the number of reverse regressions, and the depth of constitution directional closure. Based on the effective monitoring credibility markers, the insomnia formation chain, the number of consecutive transitions, the number of reverse regressions, and the depth of constitution directional closure, the system performs multi-level triage judgment, determines the constitution offset trigger window, and outputs TCM constitution-related insomnia diagnostic data.

[0007] As a preferred embodiment of the portable TCM constitution-based intelligent diagnostic method for insomnia described in this invention, the generation of an individual diurnal transition base, a pre-sleep homeostatic reference profile, and a reliable effective monitoring marker includes: collecting pre-sleep homeostatic reference data, continuous nighttime monitoring data, and constitution-related input data, and performing unified time processing and quality correction to form quality-corrected multi-source time-series data; constructing an individual diurnal transition base based on the quality-corrected multi-source time-series data; calculating the homeostatic reference convergence through the heartbeat interval fluctuation coefficient, skin conductance change rate, and body dynamic-static-homeostatic deviation to generate a pre-sleep homeostatic reference profile; and generating a reliable effective monitoring marker based on the effective proportion of each signal during the continuous nighttime monitoring period and the total effective nighttime monitoring duration.

[0008] As a preferred embodiment of the portable TCM constitution-based intelligent diagnostic method for insomnia described in this invention, the generation of the candidate sequence and the characterization group of nighttime initiation transition includes: expanding the individual diurnal transition base according to a uniform sampling step size and segmenting it with a continuous sliding window; calculating the stability of the heartbeat interval, the slope of skin conductance fluctuations, the persistence of body dynamics and static stability, and the recovery status of skin temperature to obtain abnormal characterization items; calculating the nighttime initiation transition closure value based on the number of abnormal characterization items, the weakest cross-boundary ratio, the continuous co-occurrence retention ratio, the sequential discreteness, and the number of round-trip reversals to identify the nighttime initiation transition window; and arranging all nighttime initiation transition windows in the order of appearance to generate the candidate sequence and the characterization group of nighttime initiation transition.

[0009] As a preferred embodiment of the portable TCM constitution-based intelligent diagnostic method for insomnia described in this invention, the generation of the constitution offset constraint vector includes: merging the basic constitution-based question-and-answer data according to the directions of heat imbalance, deficiency imbalance, stagnation imbalance, and phlegm-dampness imbalance to obtain the item activation ratio for each constitution direction; merging the pre-sleep complaint data according to the directions of heat imbalance, deficiency imbalance, stagnation imbalance, and phlegm-dampness imbalance to obtain the complaint synergy ratio for each constitution direction; calculating the offset constraint strength for each constitution direction based on the item activation ratio, complaint synergy ratio, and number of conflicting complaints; combining the offset constraint strengths of each constitution direction to form a constitution offset constraint vector, and determining the dominant constitution offset direction.

[0010] As a preferred embodiment of the portable TCM constitution-based intelligent diagnostic method for insomnia described in this invention, the generation of the constitution constraint initiation and transition sequence includes: matching the initiation and transition representation groups corresponding to each nighttime initiation and transition window using a constitution offset constraint rule library corresponding to the dominant constitution offset direction; calculating the constitution constraint closure value of each nighttime initiation and transition window based on the overlap ratio of abnormal representation items, the consistency ratio of the order of occurrence of abnormal representation items, the consistency ratio of the dominant abnormal representation direction, and the number of conflicting representation items; retaining nighttime initiation and transition windows with constitution constraint closure values ​​not lower than the constitution constraint recognition threshold and whose dominant abnormal representation direction and dominant constitution offset direction are consistent, thereby generating the constitution constraint initiation and transition sequence.

[0011] As a preferred embodiment of the portable TCM constitution-based intelligent diagnostic method for insomnia described in this invention, the generation of the insomnia formation chain includes: taking the termination time of each constitution constraint initiation transition window as the starting point for subsequent tracking, sequentially extracting continuous monitoring segments along the nighttime time axis; extracting the cardiac interval fluctuation coefficient, skin conductance change rate, body dynamics-static stability deviation, and skin temperature recovery advancement for each continuous monitoring segment, identifying abnormal characterization items, and generating a disturbance expansion characterization group; calculating the transition and inheritance lock value for two adjacent continuous monitoring segments based on the time connection relationship, the inheritance relationship of abnormal characterization items, the fallback and breakage situation, and the consistency relationship between the dominant abnormal characterization direction and the dominant constitution offset direction; when the transition and inheritance lock value is not lower than the transition and inheritance identification threshold, the latter continuous monitoring segment is determined as a valid transition and inheritance segment and concatenated with the former continuous monitoring segment; combining all valid transition and inheritance segments obtained sequentially after the same nighttime initiation transition window according to the nighttime time axis to generate the insomnia formation chain.

[0012] As a preferred embodiment of the portable TCM constitution-based intelligent diagnostic method for insomnia described in this invention, the acquisition of the number of consecutive turns, the number of reverse retreats, and the closure depth of the constitution direction includes: taking the number of segments that maintain directional continuity along the time sequence of the insomnia formation chain as the longest consecutive consistent turn level, and taking the number of all adjacent connections in the insomnia formation chain as the total turn level; determining the closure depth of the constitution direction by the ratio of the longest consecutive consistent turn level to the total turn level; generating turn-continuity pattern markers for the insomnia formation chain; the turn-continuity pattern markers include: when the number of consecutive turns is zero, it is recorded as a single recovery type; when the number of consecutive turns is greater than zero and the number of reverse retreats is not less than the number of consecutive turns, it is recorded as a recurring fluctuation type; when the number of consecutive turns is greater than zero, the number of reverse retreats is less than the number of consecutive turns, and the closure depth of the constitution direction is not less than the closure depth recognition threshold, it is recorded as a continuous cascade type.

[0013] As a preferred embodiment of the portable TCM constitution-based intelligent diagnostic method for insomnia described in this invention, the step of determining the constitution offset trigger window and outputting TCM constitution-based insomnia diagnostic data includes: based on effective monitoring credible markers and constitution constraint initiation and transition sequences, determining whether the current nighttime data meets the diagnostic output requirements and whether the nighttime abnormalities have constitution constraint significance; when the monitoring data is valid and a constitution constraint initiation and transition sequence exists, then a hierarchical judgment is performed based on the insomnia formation chain; the insomnia formation chain that meets the TCM constitution-based insomnia diagnostic state is preferentially determined as the target insomnia formation chain, and the constitution constraint initiation and transition window corresponding to the target insomnia formation chain is determined as the constitution offset trigger window, and the TCM constitution-based insomnia diagnostic data is output.

[0014] In a second aspect, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, implements any step of the portable TCM constitution-based intelligent diagnostic method for insomnia as described in the first aspect of the present invention.

[0015] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any step of the portable TCM constitution-based intelligent diagnostic method for insomnia as described in the first aspect of the present invention.

[0016] The beneficial effects of this invention are as follows: by constructing an individual diurnal transition base and a pre-sleep steady-state reference profile, the starting position of nighttime insomnia abnormalities can be identified using the individual steady-state baseline; by generating a constitution offset constraint vector and combining it with a constitution offset constraint rule library to screen candidate sequences for nighttime initiation and transition, a closed association between the TCM constitution direction and the nighttime abnormality initiation process can be achieved; by generating an insomnia formation chain and combining it with the number of consecutive turns, the number of reverse retreats, and the closure depth of the constitution direction, different nighttime instability patterns can be distinguished and the constitution offset trigger window can be determined. Attached Figure Description

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

[0018] Figure 1 A flowchart for a portable intelligent diagnostic method for insomnia based on TCM constitution.

[0019] Figure 2 A flowchart generated from the basic data.

[0020] Figure 3 The flowchart for identifying the start and turn points.

[0021] Figure 4 This is a flowchart of the diagnostic output.

[0022] Figure 5 A comparative data chart showing the positioning deviation of the trigger window for body displacement.

[0023] Figure 6 This is a comparative data graph showing the stability of chain-based diagnostics. Detailed Implementation

[0024] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0025] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0026] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0027] Reference Figures 1-6 As one embodiment of the present invention, this embodiment provides a portable intelligent diagnostic method for insomnia based on traditional Chinese medicine constitution, comprising the following steps: S1. Collect pre-sleep homeostasis reference data, nighttime continuous monitoring data, and physical condition-related input data. After quality correction and time alignment, generate an individual diurnal transition baseline, pre-sleep homeostasis reference profile, and reliable markers for effective monitoring.

[0028] In this embodiment, the diagnostic subject wears a portable monitoring device on their wrist and completes information entry and time synchronization via a mobile terminal.

[0029] Among them, the wrist-worn portable monitoring device is used to collect pulse wave signals, skin conductance signals, skin temperature signals and body movement signals, and the mobile terminal is used to input basic physical condition question and answer data and pre-sleep complaint data, and to calibrate all collected data as a unified time reference.

[0030] Specifically, before entering nighttime monitoring, the resting period before falling asleep is determined.

[0031] Among them, the resting period before falling asleep is the continuous collection period after the diagnostic subject has finished washing up, stopped eating, stopped strenuous activity, and maintained a semi-reclining or sitting position.

[0032] During the continuous acquisition period, raw pulse wave sequences, raw skin conductance sequences, raw skin temperature sequences, and raw body movement sequences were continuously acquired to obtain steady-state reference data before falling asleep.

[0033] At the same time, the mobile terminal guides the diagnostic subjects to complete the entry of basic physical condition Q&A data and bedtime chief complaint data.

[0034] Among them, the basic constitution question and answer data should include at least the scores of items related to imbalance of heat, imbalance of deficiency, imbalance of stagnation and imbalance of phlegm and dampness, and the pre-sleep complaint data should include at least the complaint status items related to irritability, palpitations, heaviness of sleep, fear of cold, dry mouth and morning fatigue, and obtain the constitution-related input data.

[0035] Furthermore, the wrist-worn portable monitoring device will continue to operate during the nighttime continuous monitoring period.

[0036] The continuous nighttime monitoring period begins when the subject finishes active interaction and enters a sleep preparation state, and ends when the monitoring ends the following morning.

[0037] During the continuous nighttime monitoring period, nighttime pulse wave sequences, nighttime skin conductance change sequences, nighttime skin temperature sequences, and nighttime body movement sequences are continuously collected. The time interval between adjacent pulse peaks is extracted from the nighttime pulse wave sequences to form the nighttime heart rate interval sequence, thereby obtaining continuous nighttime monitoring data.

[0038] The homeostatic reference data before sleep, the continuous monitoring data at night, and the physical fitness-related input data were processed in a unified time.

[0039] Specifically, using the current time of the mobile terminal as the main time reference, the sampled values ​​uploaded by the wrist portable monitoring device at each moment are mapped to the same time axis; for cases where the sampling frequencies of pulse wave signals, skin conductance signals, skin temperature signals and body movement signals are different, all signals are resampled according to a uniform sampling step size (e.g., 1 second) to obtain time-aligned multi-source time-series data.

[0040] Furthermore, quality correction is performed on the time-aligned multi-source time-series data.

[0041] For pulse wave signals, bandpass filtering is first performed to remove baseline drift and high-frequency noise, and then the continuity of adjacent pulse peak intervals is checked. When the interval between adjacent pulse peaks deviates from the local median interval by a set multiple (e.g., 1.8 times), or when the pulse wave peak-valley morphology does not meet the characteristics of continuous physiological rhythm, the corresponding segment is recorded as a pulse wave distortion segment and is removed. For skin conductance signals, low-pass smoothing is first performed, and then the slope change of adjacent sampling points is calculated. When the skin conductance signal remains flat continuously and is accompanied by abnormal contact impedance, the corresponding segment is removed. The segments are marked as skin level flat failure segments and are removed. For body motion signals, triaxial acceleration is synthesized to obtain the body motion amplitude sequence. When the body motion amplitude shows an isolated spike within a very short time and is not accompanied by synchronous changes in pulse wave, skin conductance, or skin temperature, the corresponding segment is marked as a body motion impact abnormal segment and is removed. For skin temperature signals, when there is an instantaneous jump that exceeds the physiological range, neighborhood repair is performed on the jump point. Data segments that are temporally continuous and meet the quality requirements are retained to form multi-source time-series data after quality correction.

[0042] Furthermore, an individual day-night transition base is constructed.

[0043] Specifically, pulse wave, skin conductance, skin temperature, and body movement data from the pre-sleep steady-state reference data are combined according to a uniform sampling step size to form a pre-sleep reference time sequence segment.

[0044] The nocturnal pulse wave sequence, nocturnal intercardia sequence, nocturnal skin conductance change sequence, nocturnal skin temperature sequence, and nocturnal body movement sequence from the continuous nighttime monitoring data are spliced ​​together in the same timeline order after the reference time segment before falling asleep, forming an individual diurnal transition base covering the resting stage before falling asleep to the continuous nighttime monitoring stage.

[0045] Among them, the individual diurnal transition base is used to characterize the complete temporal background of the diagnostic subject's transition from pre-sleep homeostasis to the nighttime sleep process.

[0046] Further construct a homeostatic reference profile before falling asleep.

[0047] Specifically, during the resting data collection period before sleep onset, pulse waves, skin conductance, and body movement signals are segmented and statistically analyzed using a continuous sliding window. The ratio of the standard deviation to the mean of the time interval between consecutive pulse peaks is used as the heart rate fluctuation coefficient. The difference between the instantaneous amplitude of the synthesized triaxial acceleration and the resting baseline amplitude is calculated, and the absolute value is used as the body movement-steady-state deviation. The steady-state reference convergence is calculated by dividing the difference in skin conductance values ​​between adjacent sampling times by the corresponding time interval as the skin conductance change rate, expressed as: ; in, Indicates the first The steady-state reference convergence corresponding to each sliding window Indicates the first The steady progress of cardiac interval within a sliding window Indicates the first The progress of the electrostatic stability of the skin within a sliding window. Indicates the first The volumetric dynamic and static stability progress within a sliding window.

[0048] It should be noted that, By the first The inner heartbeat fluctuation coefficient of each sliding window is calculated by comparing it with the upper limit of the allowable fluctuation during the resting phase before falling asleep, and then converting it using the reverse normalization method. By the first The rate of change of electrodermal activity within a sliding window is obtained by inversely normalizing the upper limit of the allowable static change of electrodermal activity. By the first The deviation of body motion and static stability within each sliding window is obtained by inverse normalization of the upper limit of allowable deviation of body motion and static stability; the upper limit of allowable fluctuation during the resting stage before falling asleep is determined by statistically analyzing the fluctuation coefficient of the heart interval continuously collected during the resting period before falling asleep, and selecting the maximum fluctuation value corresponding to the absence of significant upward jump in the fluctuation coefficient of the heart interval in multiple consecutive segments. The upper limit of allowable fluctuation is preferably in the range of [0.03, 0.08]. The upper limit of allowable change in skin conductance static stability is determined by statistically analyzing the skin conductance change rate continuously collected during the resting period before falling asleep, and selecting the maximum change value corresponding to the absence of a continuous increase in the skin conductance change rate in multiple consecutive segments. The upper limit of allowable change is preferably in the range of [0.005 μS / s, 0.03 μS / s]. The upper limit of allowable deviation of body motion and static stability is determined by statistically analyzing the body motion deviation continuously collected during the resting period before falling asleep, and selecting the maximum deviation value corresponding to the absence of a continuous amplification in the body motion deviation in multiple consecutive segments. The upper limit of allowable deviation is preferably in the range of [0.01g, 0.08g].

[0049] It should be noted that the reverse normalization method first calculates the ratio of the corresponding fluctuation, change or deviation to the corresponding allowable upper limit, and then subtracts the ratio from 1 to obtain the corresponding stability measure; when the calculation result is greater than 1, it is taken as 1, and when the calculation result is less than 0, it is taken as 0.

[0050] The steady-state reference convergence of each sliding window is calculated in chronological order along the resting period before sleep onset. When the steady-state reference convergence of multiple consecutive sliding windows (e.g., 4) is higher than the convergence judgment threshold, the corresponding time period is determined as the steady-state reference segment before sleep onset. The baseline ranges of heart interval, skin conductance, skin temperature, and body dynamics and steady-state within the steady-state reference segment before sleep onset are extracted to generate the steady-state reference profile before sleep onset.

[0051] It should be noted that the convergence threshold is determined by calculating the steady-state reference convergence of multiple consecutive confirmed valid pre-sleep resting samples and selecting a critical value that can stably distinguish between resting sample segments and non-resting disturbance sample segments, preferably in the range of [0.70, 0.90].

[0052] Furthermore, generate valid and reliable monitoring tags.

[0053] Specifically, the effective duration percentages of pulse waves, skin conductance, and body movement during continuous nighttime monitoring periods are statistically analyzed, along with the total effective nighttime monitoring duration. The minimum effective percentage is used as the primary credible constraint. When the minimum effective percentage is not lower than the lower limit of the credible percentage and the total effective nighttime monitoring duration is not lower than the lower limit of the monitoring duration, the current nighttime monitoring result is considered to meet the credible output conditions, and a valid monitoring credible marker is generated as valid. Otherwise, a valid monitoring credible marker is generated as invalid.

[0054] It should be noted that the lower limit of the reliable proportion is determined by statistically analyzing the proportion of effective pulse wave duration, effective skin conductance duration, and effective body movement duration of multiple consecutive confirmed effective nighttime samples, and selecting the critical proportion that can stably distinguish between effective and ineffective nighttime samples, with a preferred value range of [0.60, 0.85]. The lower limit of the monitoring duration is determined by statistically analyzing the total effective nighttime monitoring duration of multiple consecutive confirmed effective nighttime samples, and selecting the critical duration that can guarantee the shortest continuous monitoring duration required for nighttime initiation transition window identification and insomnia formation chain determination, with a preferred value range of 3 to 6 hours.

[0055] S2. Based on the steady-state reference profile before falling asleep, perform sliding window analysis on the individual diurnal transition base, identify the nighttime initiation transition window, and generate candidate sequences and initiation transition characterization groups for the nighttime initiation transition.

[0056] Individual day-night transition bases are unfolded sequentially according to a uniform sampling step size, and nighttime monitoring segments are segmented using a continuous sliding window.

[0057] For each sliding window, the stability of the cardiac interval, the slope of skin conductance fluctuations, the persistence of body dynamics and statics, and the advance of skin temperature recovery were calculated.

[0058] Among them, the stability of the heartbeat interval is obtained by taking the ratio of the standard deviation to the mean of the time interval between consecutive pulse peaks; the slope of skin conductance fluctuation is obtained by dividing the difference of skin conductance values ​​at adjacent sampling times by the corresponding time interval; the persistence of body motion and static stability is obtained by statistically analyzing the duration of continuous low body motion state within the current sliding window; and the advance of skin temperature recovery is obtained by calculating the difference between the temperature value at the first moment and the temperature value at the last moment of the skin temperature sequence within the current sliding window.

[0059] Furthermore, the fluctuation coefficient of the heart interval within the current sliding window is compared with the upper limit of the allowable fluctuation during the resting stage before sleep in the steady-state reference profile before sleep. When the fluctuation coefficient of the heart interval within the current sliding window is higher than the upper limit of the allowable fluctuation during the resting stage before sleep, the sliding window is recorded as the window of decreased heart interval stability.

[0060] The rate of change of electrodermal charge (EDC) within the current sliding window is compared with the upper limit of allowable change of EDC in the steady-state reference profile before falling asleep. When the rate of change of EDC within the current sliding window is higher than the upper limit of allowable change of EDC, the sliding window is recorded as the window with rising EDC oscillation slope.

[0061] The deviation of body motion and static stability within the current sliding window is compared with the upper limit of allowable deviation of body motion and static stability in the steady-state reference profile before falling asleep; when the deviation of body motion and static stability within the current sliding window is higher than the upper limit of allowable deviation of body motion and static stability, and the continuous low body motion state is interrupted, the sliding window is recorded as the continuous interruption window of body motion and static stability.

[0062] The amount of skin temperature recovery progress within the current sliding window is compared with the resting skin temperature progress level in the steady-state reference profile before falling asleep; when the amount of skin temperature recovery progress within the current sliding window and the previous sliding window is lower than the resting skin temperature progress level, the current sliding window is recorded as the skin temperature recovery hysteresis window.

[0063] Decreased cardiac interval stability, increased skin conductance fluctuation slope, persistent interruption of body dynamics and homeostasis, and delayed skin temperature recovery were identified as abnormal characteristics.

[0064] To further identify the starting point of the transition from steady state to unstable state at night from anomalous changes, the nighttime initiation transition latch value is calculated for each sliding window, expressed as: ; in, Indicates the first The nighttime start transition latch value corresponding to each sliding window. Indicates the first The number of abnormal representations that have appeared within each sliding window Indicates the first The weakest out-of-bounds ratio among the abnormal characteristics has appeared within the sliding window. Indicates the first The ratio of continuous co-occurrence of anomaly representations within a sliding window Indicates the first The sequential dispersion of anomaly representations within a sliding window. Indicates the first The number of times the anomaly representation direction reverses back and forth within a sliding window.

[0065] It should be noted that, By from the first The minimum value is selected from the out-of-bounds ratios corresponding to the abnormal indicators that have appeared in the sliding window. By the first The value is obtained by comparing the duration during which abnormal characterization items are continuously maintained within a sliding window with the total duration of the sliding window. By the first The time span between the first and last occurrence of an anomaly in a sliding window is divided by the total duration of the sliding window. The number of times the anomaly direction reverses back and forth is obtained by reading the dominant anomaly direction at each sampling moment in the current sliding window in chronological order and counting the number of complete back-and-forth changes in the dominant anomaly direction, such as changing from enhancement to weakening and then back to enhancement, or from weakening to enhancement and then back to weakening.

[0066] It should also be noted that, since the nighttime initiation turning point blocking value is constructed by combining the number of outliers, the weakest crossover ratio, and the continuous co-occurrence retention ratio, and by combining sequential dispersion and round-trip reversal number, the nighttime initiation turning point blocking value will only continue to rise when multiple types of outlier characteristics appear consecutively within the same sliding window, the weakest outlier characteristic has also crossed the steady-state boundary, and the outlier direction continues to advance. This allows the single outlier fluctuation to be distinguished from the true nighttime initiation turning point process.

[0067] Furthermore, the nighttime start-turn-off latch values ​​of adjacent sliding windows are compared in nighttime timeline order, and the order of occurrence of the four types of abnormal characterization items is checked simultaneously.

[0068] When at least two or more of the following abnormal characteristics appear in multiple consecutive sliding windows: decreased cardiac interval stability, increased skin conductance fluctuation slope, persistent interruption of body dynamics and homeostasis, and delayed skin temperature recovery, and the nighttime initiation transition closure value of the later sliding window is higher than that of the previous sliding window, and the cross-boundary ratio corresponding to the abnormal characteristics has not decreased, the corresponding continuous time period is determined as the nighttime initiation transition window.

[0069] Among them, the anomaly representation direction is used to indicate the change trend of the anomaly representation item in the current sliding window relative to the previous sliding window; when the cross-boundary ratio of the corresponding anomaly representation item in the current sliding window is higher than that in the previous sliding window, it is recorded as the enhancement direction; when the cross-boundary ratio of the corresponding anomaly representation item in the current sliding window is lower than that in the previous sliding window, it is recorded as the weakening direction; when multiple anomaly representation items exist at the same time, the direction corresponding to the anomaly representation item with the longest duration and the largest change amplitude is taken as the dominant anomaly representation direction.

[0070] Arrange all nighttime inflection windows in chronological order of their appearance to generate a candidate sequence for nighttime inflection.

[0071] Furthermore, the composition of abnormal representation items, the order of occurrence of abnormal representation items, and the dominant abnormal representation direction within each nighttime initiation transition window are recorded to generate an initiation transition representation group.

[0072] The initial transition characterization group includes at least the initial transition window number, the composition of the abnormal characterization items, the type of the first abnormal characterization item, the type of the last abnormal characterization item, and the dominant abnormal characterization direction.

[0073] Preferably, when multiple consecutive sliding windows of the nighttime initiation transition lockout value are higher than the initiation transition identification threshold, and the time interval between the corresponding abnormal characterization items does not exceed the same continuous observation duration range, the multiple consecutive sliding windows are merged into the same nighttime initiation transition window; when two adjacent nighttime initiation transition windows fall back to the range of the steady-state reference profile before falling asleep, the two are distinguished as two independent nighttime initiation transition windows.

[0074] It should be noted that the threshold for identifying the initiation transition is determined by calculating the nighttime initiation transition lockout value for multiple consecutive confirmed valid nighttime samples, and selecting a critical value that can stably distinguish the pre-sleep resting continuation segment from the nighttime unstable initiation segment, preferably in the range of [1.20, 2.50].

[0075] S3. Generate a physical constitution offset constraint vector by using the basic physical constitution question and answer data and the pre-sleep complaint data, and filter the candidate sequences for nighttime start and turn-off in combination with the physical constitution offset constraint rule library to generate the physical constitution constraint start and turn-off sequence.

[0076] Furthermore, the basic physical fitness questionnaire data was categorized by direction.

[0077] In the basic constitution question and answer data, the scores of items related to the heat imbalance direction were grouped into the heat item group, the scores of items related to the deficiency imbalance direction were grouped into the deficiency item group, the scores of items related to the stagnation imbalance direction were grouped into the stagnation item group, and the scores of items related to the phlegm-dampness imbalance direction were grouped into the phlegm-dampness item group. The number of items that met the item triggering requirements in each item group was counted, and the ratio of the number of items that met the item triggering requirements to the total number of items in each direction was calculated to obtain the activation ratio of heat item, deficiency item, stagnation item, and phlegm-dampness item.

[0078] The item score refers to the quantitative data corresponding to each question and answer item in the basic physical fitness question and answer data. Each basic physical fitness question and answer item uses the same five-level equidistant rating scale, with scores of 0, 1, 2, 3, and 4 respectively. 0 indicates that the corresponding performance of the item did not appear, 1 indicates that it appeared occasionally, 2 indicates that it appeared sometimes, 3 indicates that it appeared frequently, and 4 indicates that it appeared continuously or significantly. After the diagnostic subject completes the selection, the score corresponding to the selected graded answer option is read as the item score. The item triggering requirement is determined by comparing the current item score with the directional trigger value of the item in the basic physical fitness question and answer data. When the current item score reaches the corresponding directional trigger value, the item is recorded as an activated item.

[0079] It should be noted that the historical valid physical constitution question and answer samples are divided into samples with valid directions and samples with invalid directions according to whether the corresponding physical constitution direction is valid. The average score of the same question and answer item in the samples with valid directions and the average score in the samples with invalid directions are calculated respectively. The midpoint between the average score of the item in the samples with valid directions and the average score in the samples with invalid directions is taken as the direction trigger value. The preferred value range of the direction trigger value is [1,4].

[0080] Furthermore, the data on pre-sleep complaints were categorized by direction.

[0081] The complaints of irritability, dry mouth, and a feeling of heat before falling asleep were categorized into the heat imbalance group; the complaints of chills, fatigue, and weakness before falling asleep were categorized into the deficiency imbalance group; the complaints of palpitations, emotional tension, and restless thinking before falling asleep were categorized into the stagnation imbalance group; and the complaints of heaviness, chest tightness, and sluggishness before falling asleep were categorized into the phlegm-dampness imbalance group. The number of triggered complaints in each group was counted, and the ratio of the number of triggered complaints to the total number of complaints in each group was calculated to obtain the heat imbalance synergy ratio, deficiency imbalance synergy ratio, stagnation imbalance synergy ratio, and phlegm-dampness imbalance synergy ratio.

[0082] The triggering of a chief complaint item is obtained by reading whether the corresponding status item in the pre-sleep chief complaint data is checked, entered, or confirmed. When a chief complaint item is confirmed, the chief complaint item is recorded as a triggered chief complaint item.

[0083] To transform the basic physical fitness questionnaire data and bedtime complaint data into directional constraints, the offset constraint strength for each physical fitness direction is calculated separately, as expressed by: ; in, Indicates body constitution direction The corresponding offset constraint strength, Indicates body constitution direction The corresponding item activation ratio, Indicates body constitution direction The corresponding chief complaint coordination ratio, Indicates body constitution direction The corresponding number of conflicting complaints.

[0084] It should be noted that the physical constitution direction This includes imbalances related to heat, deficiency, stagnation, and phlegm-dampness; item activation ratio. The entry activation ratio is defined as the ratio of the number of entries activated in the current direction to the total number of entries in the current direction; the principal synergy ratio. The chief complaint synergy ratio is calculated as the ratio of the number of chief complaints triggered in the current direction to the total number of chief complaints in the current direction; the number of conflicting chief complaints. The number of main complaints that are opposite to or significantly inconsistent with the current direction is obtained by statistical analysis.

[0085] It should also be noted that, since the strength of the physical orientation offset constraint is constructed by enhancing both the item activation ratio and the subject complaint co-compatibility ratio and suppressing both the number of conflicting subject complaints, the offset constraint strength of a certain orientation will only increase when a certain orientation has both high physical base item support and strong bedtime subject complaint co-compatibility support, and there are few subject complaints that conflict with that orientation. This can avoid misjudging the orientation based on a single question or a single subject complaint.

[0086] Furthermore, the offset constraint strengths in the directions of heat imbalance, deficiency imbalance, stagnation imbalance, and phlegm-dampness imbalance are calculated separately, and the offset constraint strengths in the four directions are combined in directional order to generate a constitution offset constraint vector.

[0087] Preferably, the direction with the greatest offset constraint strength is recorded as the offset direction of the main conductor material at the current night.

[0088] Call the pre-built body offset constraint rule library.

[0089] The constitution offset constraint rule base is formed by reading historically confirmed valid nighttime samples and extracting the abnormal characterization items, the type of the first abnormal characterization item, the type of the last abnormal characterization item, and the dominant abnormal characterization direction from the starting turning characterization group according to the dominant constitution offset direction. The rule base is further formed by statistically analyzing the combination relationship and the sequential relationship of repeated abnormal characterization items in the same direction. In the constitution offset constraint rule base, each constitution offset direction corresponds to at least one set of starting turning characterization rules. The starting turning characterization rules include at least the abnormal characterization item composition that can be retained, the type of the first abnormal characterization item that can be retained, the type of the last abnormal characterization item that can be retained, and the dominant abnormal characterization direction that can be retained.

[0090] In the specific screening process, each nighttime initiation and transition window in the candidate sequence is used as a unit. The initiation and transition characterization group corresponding to the nighttime initiation and transition window is read and matched with the initiation and transition characterization rule corresponding to the current dominant physical shift direction at night. The physical constraint closure value is calculated for each nighttime initiation and transition window, and the expression is as follows: ; in, Indicates the first The physical constraint closure value corresponding to the nighttime inflection window. Indicates the first The overlap ratio is formed by the anomaly representation items corresponding to the nighttime initiation transition window. Indicates the first The order of occurrence of abnormal representation items corresponding to the nighttime inflection window is consistent. Indicates the first The consistency ratio of the dominant anomaly representation direction corresponding to the nighttime initiation transition window Indicates the first The number of conflict representation terms corresponding to each nighttime inflection window.

[0091] It should be noted that the overlap ratio of outlier representation terms is determined by the first... The ratio of the number of anomalous representations with the same rule as the current dominant body shift direction in the initial nighttime turning window to the total number of anomalous representations required by that rule is used as... The consistency ratio of the order of occurrence of abnormal characterization items is determined by the first... Anomalies appearing chronologically within each nighttime inflection window are compared position-by-position with the expected order in the current direction rule, and the ratio of the number of consistent positions to the total number of positions compared is used as the statistical measure. The consistency ratio of the dominant anomaly representation direction is determined by the first... The dominant anomaly representation direction at the start of the nighttime turning window is determined by whether it aligns with the allowed direction in the corresponding rule for the current dominant constitution offset direction; a value of 1 is assigned if they align, and 0 if they do not. The number of conflicting representation items is determined by statistically analyzing the first... The number of abnormal characterization items that are significantly inconsistent with the current dominant body's offset direction rule in the initial turning window of each night is obtained.

[0092] Furthermore, the physical constraint closure value is calculated for each nighttime start-turn candidate window in the nighttime start-turn candidate sequence, and the physical constraint closure value is compared with the physical constraint recognition threshold.

[0093] When the If the physical constraint closure value corresponding to a night-starting turning window is not lower than the physical constraint identification threshold, and the dominant abnormality representation direction of the night-starting turning window is consistent with the current dominant physical offset direction, then the night-starting turning window will be retained as the physical constraint starting turning window.

[0094] When the If the physical constraint closure value corresponding to a night-starting turning window is lower than the physical constraint identification threshold, or if the dominant abnormality representation direction of the night-starting turning window is inconsistent with the dominant physical offset direction of the current night, the night-starting turning window is recorded as a non-physical constraint perturbation window.

[0095] It should be noted that the physical constraint recognition threshold is determined by calculating the physical constraint closure value for multiple consecutive confirmed valid historical nighttime samples, and selecting a critical value that can stably distinguish between the physical constraint initiation transition window and the non-physical constraint disturbance window. The preferred value range is [0.40, 0.70].

[0096] Arrange all retained physical constraint initiation transition windows in nighttime timeline order to generate physical constraint initiation transition sequence; arrange all unretained non-physical constraint perturbation windows in nighttime timeline order to generate non-physical constraint perturbation sequence.

[0097] Furthermore, the matching degree is graded based on the size of the physical constraint closure value corresponding to each retained physical constraint inflection window.

[0098] When the physical constraint closure value reaches the high matching threshold, it is recorded as a continuous matching level.

[0099] When the physical constraint closure value reaches the medium matching threshold but not the high matching threshold, it is recorded as the dominant matching level.

[0100] When the physical constraint closure value reaches the low matching threshold but not the medium matching threshold, it is recorded as a one-way matching level.

[0101] It should be noted that the high matching threshold, medium matching threshold, and low matching threshold are determined by calculating the physical constraint closure value for multiple consecutive confirmed valid historical nighttime samples, and selecting the critical value that can stably distinguish between high consistency samples, medium consistency samples, and low consistency samples. The preferred value ranges are [0.75, 0.95], [0.50, 0.75], and [0.25, 0.50], respectively.

[0102] Among them, the physical offset constraint vector is used to characterize the physical offset direction that is more likely to be valid at the current night; the physical constraint initiation turning sequence is used to characterize the night initiation turning window that has formed a constraint closure with the dominant physical offset direction; the non-physical constraint perturbation sequence is used to characterize the perturbation window that has night anomalies but has not formed physical direction constraints; and the physical constraint matching level is used to characterize the degree of matching between each physical constraint initiation turning window and the dominant physical offset direction.

[0103] S4. Starting from the nighttime initiation transition window in the initial transition sequence of physical constraints, identify the transition relationship between perturbation extension segments along the nighttime time axis, generate the insomnia formation chain, and obtain the number of consecutive transitions, the number of reverse regressions, and the closure depth of the physical direction.

[0104] Specifically, the end time of each physical constraint initiation transition window is used as the starting point for subsequent tracking, and continuous monitoring segments are extracted sequentially according to a uniform sampling step size.

[0105] For each continuous monitoring segment, the heart rate fluctuation coefficient, skin conductance rate of change, body dynamics-static stability deviation, and skin temperature recovery advance are calculated to obtain the abnormal characterization items in the current continuous monitoring segment.

[0106] Furthermore, the composition of anomalous characterization items, the order of occurrence of anomalous characterization items, and the dominant anomalous characterization direction in the current continuous monitoring segment are recorded to generate a disturbance expansion characterization group.

[0107] Among them, the disturbance extension characterization group refers to the characterization set of continuous monitoring segments that have experienced abnormal deviations after the night-start inflection window.

[0108] Furthermore, for two adjacent continuous monitoring segments, it is determined whether the latter continuous monitoring segment is a valid transition segment from the former continuous monitoring segment.

[0109] In the specific judgment, the time connection relationship between the two is compared first. When the start time of the later continuous monitoring segment is within the continuous observation time range after the end time of the previous continuous monitoring segment, it is recorded as meeting the time connection condition. Otherwise, it is recorded as not meeting the time connection condition. When the time connection condition is not met, the later continuous monitoring segment is treated as a new independent continuous monitoring segment.

[0110] It should be noted that the range of continuous observation duration is determined by statistically analyzing the time intervals between adjacent unstable segments in the historical valid nighttime samples and selecting the critical duration that can stably distinguish segments within the same unstable chain from segments of different unstable events. The preferred range is [20 seconds, 90 seconds].

[0111] Furthermore, determine whether the abnormal representations maintain a sequential relationship.

[0112] Specifically, the perturbation expansion characterization group in the previous continuous monitoring segment is read, and the perturbation expansion characterization group in the next continuous monitoring segment is read. The number of abnormal characterization items in the previous continuous monitoring segment that still exist in the next continuous monitoring segment is counted, and the ratio of the number of characterization items to the total number of abnormal characterization items in the previous continuous monitoring segment is used as the abnormal inheritance ratio. At the same time, it is determined whether the dominant abnormal characterization direction of the next continuous monitoring segment is consistent with the dominant physical offset direction corresponding to the physical offset constraint vector.

[0113] When the directions are consistent, the direction continuation is considered valid; when they are inconsistent, the direction continuation is considered invalid.

[0114] Furthermore, the actual time interval between two adjacent continuous monitoring segments is read, and the difference between the upper limit of the continuous observation duration range and the actual time interval is taken as the upper limit time difference, and the ratio of the upper limit time difference to the upper limit of the continuous observation duration range is taken as the time convergence ratio.

[0115] Among them, the shorter the actual time interval, the higher the time convergence ratio.

[0116] Furthermore, it is determined whether a complete fallback process occurs from the end of the previous continuous monitoring segment to the start of the next continuous monitoring segment, returning to the steady-state reference profile range before falling asleep; if a complete fallback process occurs, it is recorded as a fallback break.

[0117] The complete fallback process refers to the abnormal characteristics that appeared in the previous continuous monitoring segment exiting the abnormal state in subsequent continuous monitoring data and continuously returning to the steady-state reference profile range before falling asleep, and no new abnormal characteristics appearing again during the continuous stabilization period.

[0118] Furthermore, in order to transform abnormal inheritance relationships, temporal connections, and directional succession relationships into quantities that can be used for chained decision-making.

[0119] In this embodiment, the smaller of the abnormal inheritance ratio and the time convergence ratio is used as the short-board item, and the directional acceptance value is used as the opening and closing gating item. At the same time, the turning acceptance locking value of two adjacent continuous monitoring segments is calculated and obtained by multiplying the number of fall-off fractures, so as to distinguish the real instability expansion process and the re-stabilization process after short-term fluctuations.

[0120] The expression for the turnaround and acceptance lock value is: ; in, Indicates the first The transition and connection lock values ​​between adjacent continuous monitoring segments, Indicates the first The anomaly inheritance ratio between adjacent continuous monitoring segments, Indicates the first The time convergence ratio between adjacent consecutive monitoring segments Indicates the first For the directional continuity value between adjacent continuous monitoring segments, Indicates the first The number of drops and breaks between adjacent continuous monitoring segments.

[0121] It should be noted that, The anomaly inheritance ratio is defined as the ratio of the number of anomaly characteristics that are still retained in the subsequent continuous monitoring segment to the total number of anomaly characteristics in the previous continuous monitoring segment. The time convergence ratio is calculated by subtracting the actual time interval between two adjacent continuous monitoring segments from the upper limit of the continuous observation duration range and then comparing it with the upper limit of the continuous observation duration range. The value is obtained by determining whether the dominant abnormality representation direction of the next continuous monitoring segment is consistent with the dominant body offset direction corresponding to the body offset constraint vector. When they are consistent, the value is 1; when they are inconsistent, the value is 0. The data is obtained by statistically analyzing whether a complete fallback process occurs within the steady-state reference profile before falling asleep, after the termination of the previous continuous monitoring segment and before the start of the next continuous monitoring segment. If a complete fallback process occurs, it is recorded as 1; otherwise, it is recorded as 0. When there are multiple falls followed by instability, the count is accumulated based on the actual number of complete fallback processes.

[0122] Furthermore, the transition and connection locking values ​​of each pair of adjacent continuous monitoring segments are compared with the transition and connection identification threshold.

[0123] When the turning and acceptance lock value is not lower than the turning and acceptance identification threshold, the next continuous monitoring segment is recorded as a valid turning and acceptance segment and concatenated with the previous continuous monitoring segment.

[0124] When the conversion and acceptance lock value is lower than the conversion and acceptance identification threshold, no serial connection is performed.

[0125] It should be noted that the transition and acceptance identification threshold is determined by calculating the transition and acceptance locking value for multiple consecutive confirmed valid nighttime samples, and selecting a critical value that can stably distinguish the acceptance segment and non-acceptance segment within the same insomnia formation chain. The preferred value range is [0.30, 0.60].

[0126] Furthermore, by sequentially connecting all effective transitional segments obtained after the same initial transition window according to the nighttime timeline, an insomnia formation chain is generated.

[0127] If there is no valid transition segment that meets the transition recognition threshold after the same physical constraint starting transition window, then only the physical constraint starting transition window itself is recorded as a single insomnia formation chain.

[0128] Furthermore, the number of consecutive turns, the number of reverse regressions, and the depth of closure in the physical direction are statistically analyzed for each chain of insomnia formation.

[0129] The number of consecutive turns is obtained by counting the number of adjacent segments in the insomnia formation chain that meet the turn acceptance recognition threshold; the number of reverse regressions is obtained by reading the dominant abnormal representation direction of each segment in the insomnia formation chain in chronological order, and counting the number of times the dominant abnormal representation direction changes from being consistent with the dominant constitution offset direction to being inconsistent, and the subsequent segment still meets the condition for the establishment of the abnormal representation item.

[0130] In this embodiment, in order to further characterize the degree to which the entire insomnia formation chain maintains closed progression along the dominant constitution offset direction, the ratio of the longest continuous consistent turning stage to the total turning stage is used to construct the constitution direction closure depth. When most segments in the entire insomnia formation chain continue to advance along the dominant constitution offset direction, the constitution direction closure depth will increase; when there are frequent directional interruptions or directional reversals in the insomnia formation chain, the constitution direction closure depth will decrease.

[0131] The longest continuous consistent transition level is obtained by counting the number of segments that maintain a continuous direction of succession along the time sequence of the insomnia formation chain; the total transition level is obtained by counting the number of all adjacent succession relationships in the insomnia formation chain. When the insomnia formation chain is a single segment and there are no adjacent succession relationships, the total transition level is recorded as 1 and the longest continuous consistent transition level is recorded as 0.

[0132] Furthermore, based on the number of consecutive turns, the number of reverse retreats, and the closure depth in the body direction, a turning and connection pattern marker is generated for each insomnia formation chain.

[0133] Specifically, when the number of consecutive reversals is zero, the insomnia chain is recorded as a single-recovery type.

[0134] When the number of consecutive reversals is greater than zero and the number of reverse regressions is not less than the number of consecutive reversals, the insomnia chain is recorded as a recurring fluctuation type.

[0135] When the number of consecutive turns is greater than zero, the number of reverse retreats is less than the number of consecutive turns, and the closure depth in the body direction is not less than the closure depth recognition threshold, the insomnia chain is recorded as a continuous cascade type.

[0136] It should be noted that the closure depth recognition threshold is determined by calculating the closure depth in the body direction for multiple consecutive confirmed valid nighttime samples, and selecting a critical value that can stably distinguish between continuous expanding samples and fluctuating samples. The preferred value range is [0.50, 0.80].

[0137] Further record which physical constraint initiation and transition window each insomnia formation chain corresponds to, and generate chain-window correspondence.

[0138] Specifically, the physical constraint initiation transition window number to which the first segment of each insomnia formation chain belongs is used as the starting window number of the insomnia formation chain, and the insomnia formation chain number and the starting window number are stored in correspondence to generate the chain window correspondence relationship.

[0139] Among them, the insomnia formation chain is used to characterize the chain-like instability process formed by the gradual expansion of abnormal nighttime states along the direction of the dominant body constitution.

[0140] S5. Based on the effective monitoring of reliable markers, insomnia formation chain, number of consecutive turns, number of reverse retreats, and body constitution closure depth, perform multi-level diversion judgment, determine the body constitution offset trigger window, and output TCM body constitution insomnia diagnosis data.

[0141] Furthermore, based on the effective monitoring of reliable markers, it is determined whether the current nighttime data meets the diagnostic output requirements.

[0142] When a valid monitoring credible marker is invalid, the system will not perform a constitution-based insomnia classification output on the current nighttime data. Instead, it will only record the reason for the current nighttime monitoring failure and the effective percentage of each signal, and output data indicating insufficient monitoring effectiveness.

[0143] The reasons for monitoring failure include insufficient effective percentage of pulse wave, insufficient effective percentage of skin conductance, insufficient effective percentage of body movement, and insufficient total effective monitoring time at night.

[0144] When the effective monitoring credible marker is valid, further determine whether the nighttime anomaly has significance for physical constraints.

[0145] Specifically, read the non-physical constraint perturbation sequence and the physical constraint initiation and transition sequence; when the physical constraint initiation and transition sequence is empty and the non-physical constraint perturbation sequence is not empty, it indicates that although there is an abnormal perturbation at night, the abnormal perturbation has not formed a constraint closure with the dominant physical offset direction. At this time, the current night state is recorded as a general night perturbation state; when the physical constraint initiation and transition sequence is not empty, it indicates that there is at least one night initiation and transition window that has formed a constraint closure with the dominant physical offset direction at night. At this time, chain-like flow judgment is performed.

[0146] Furthermore, chain-by-chain judgments are made based on the insomnia formation chain.

[0147] Specifically, based on the chain window correspondence, the number of the physical constraint starting transition window corresponding to each insomnia formation chain is read, and the physical constraint matching level corresponding to the physical constraint starting transition window is read. The layering judgment is then performed in combination with the folding and connecting form mark of the insomnia formation chain, the number of consecutive folds, the number of reverse retreats, and the physical direction closure depth.

[0148] When the transition pattern corresponding to a certain insomnia formation chain is marked as a single recovery type, it indicates that although the physical constraint initiation transition window has appeared in the current night, the corresponding insomnia formation chain has not continued to expand, and only shows a return to stability after a single trigger. At this time, the night state corresponding to the insomnia formation chain is recorded as the physical deviation trigger non-expansion state, and the number of the physical constraint initiation transition window, the time of occurrence, and the dominant physical deviation direction are retained for subsequent cross-night continuous observation.

[0149] When the transition pattern corresponding to a certain insomnia formation chain is marked as a repetitive fluctuation type, it indicates that although a chain-like instability process has been formed at night, there are many reverse regressions or directional interruptions during the chain-like instability process, and the degree of chain closure is insufficient. At this time, the night state corresponding to the insomnia formation chain is recorded as the constitution deviation triggered fluctuation state, and the number of consecutive transitions, the number of reverse regressions, the depth of constitution directional closure, and the corresponding constitution constraint matching level of the insomnia formation chain are further recorded for subsequent consecutive nights of review.

[0150] When the folding and connecting pattern corresponding to a certain insomnia formation chain is marked as a continuous cascading type, a third layer of closure judgment is further performed by combining the closure depth of the physical direction and the matching level of the physical constraint.

[0151] Specifically, when the closure depth of the constitution does not meet the closure confirmation requirements, the nighttime state corresponding to the insomnia formation chain is recorded as the insomnia tendency state of the constitution to be confirmed.

[0152] When the closure depth of the constitution direction reaches the closure confirmation requirement, and the constitution constraint matching level corresponding to the insomnia formation chain is the dominant matching level or the continuous matching level, and the number of reverse regressions is less than the number of continuous turns, the nighttime state corresponding to the insomnia formation chain is recorded as the TCM constitution insomnia diagnosis state.

[0153] The closure confirmation requires reading the closure depth in the body direction from multiple consecutive confirmed valid nighttime samples, and selecting a critical value that can stably distinguish the closed insomnia formation chain from the unconfirmed insomnia formation chain. The preferred value range is [0.60, 0.85].

[0154] Furthermore, when multiple insomnia formation chains exist simultaneously during the current night, these chains are prioritized, with the chain meeting the diagnostic criteria for TCM constitution-related insomnia being selected first. If multiple insomnia formation chains all meet the diagnostic criteria for TCM constitution-related insomnia, the chain with the higher closure depth in the constitution direction is selected first. If multiple insomnia formation chains have the same closure depth in the constitution direction, the chain with the higher corresponding constitution constraint matching level is selected first. If the constitution constraint matching levels are still the same, the chain with the earlier start time is selected first to determine the target insomnia formation chain for the current night.

[0155] Furthermore, based on the chain window correspondence, the physical constraint starting transition window number corresponding to the target insomnia formation chain is read, and the physical constraint starting transition window is determined as the physical offset trigger window.

[0156] Among them, the constitution shift trigger window is used to represent the first effective nighttime initiation turning window driven by the dominant constitution shift direction and eventually extending into the insomnia formation chain.

[0157] Furthermore, generate diagnostic output information for the current night.

[0158] Specifically, when the current nighttime state is a normal nighttime disturbance state, a prompt message is output indicating that a nighttime anomaly exists but no physical constraint closure has been formed.

[0159] When the current nighttime state is a body shift trigger without expansion state, output the dominant body shift direction, the time when the body shift trigger window occurs, and the non-expansion prompt information.

[0160] When the current nighttime state is a state of fluctuation triggered by body constitution shift, the output includes the dominant body constitution shift direction, the time when the body constitution shift trigger window occurs, the degree of fluctuation in the insomnia formation chain, and suggested retesting information.

[0161] When the current nighttime state is a state of insomnia tendency to be confirmed, the output includes the dominant body constitution shift direction, the time when the body constitution shift trigger window occurs, the closure depth of the body constitution direction, and the confirmation prompt information.

[0162] When the current nighttime state is a TCM constitution-based insomnia diagnosis state, the system outputs the dominant constitution offset direction, the time when the constitution offset trigger window occurs, the turning and connecting pattern markers corresponding to the target insomnia formation chain, the number of consecutive turns, the number of reverse retreats, and the closure depth of the constitution direction, and stores the diagnostic information in association with the monitoring records of the night.

[0163] The TCM constitution-based insomnia diagnostic data includes the dominant constitution deviation direction, constitution deviation trigger window number and occurrence time, target insomnia formation chain number, turning and connecting morphological markers, number of consecutive turnings, number of reverse retreats, constitution direction closure depth, constitution constraint matching level, and the diagnosis type corresponding to the current night.

[0164] Individualized intervention recommendations are generated based on TCM constitution-based insomnia diagnosis data.

[0165] For example, when the dominant constitution shifts towards heat imbalance, and the trigger window for this shift often appears in the early stages of sleep onset, followed by a cascading chain of insomnia, it indicates a tendency towards difficulty reducing pre-sleep excitation and difficulty falling asleep. In this case, intervention suggestions to reduce pre-sleep excitation load should be prioritized. When the dominant constitution shifts towards deficiency imbalance, and the trigger window often appears in the later night, with a higher degree of closure in this constitution direction, it indicates a tendency towards insufficient maintenance of the later night and frequent awakenings. In this case, intervention suggestions to improve the ability to maintain the later night should be prioritized. When the dominant constitution shifts towards stagnation imbalance, and there are many instances of reverse regression, it indicates a tendency towards volatility and emotion-related issues. In this case, suggestions for continuous retesting and investigation of volatility triggers should be prioritized, rather than a direct strong diagnosis. When the dominant constitution shifts towards phlegm-dampness imbalance, and the corresponding insomnia chain shows a delayed and expanding pattern, it indicates that the current nocturnal instability process is more characterized by persistent fatigue, decreased sleep quality, and slow recovery after falling asleep. Therefore, suggestions for conditioning based on phlegm-dampness imbalance should be prioritized.

[0166] It should be noted that the individualized intervention recommendations output in this embodiment are only intended to provide doctors or relevant experts with diagnostic suggestions for reference, and cannot be directly used as the final treatment method for patients.

[0167] In this embodiment, to verify the impact of different diagnostic processing methods on the accuracy of body constitution shift trigger window localization, a comparative analysis of the localization deviations of the body constitution shift trigger window in multiple nighttime samples was conducted using the proposed method, the body constitution-free screening method, and the all-night static discrimination method. Figure 5As shown, the instantaneous deviation curve corresponding to the scheme of the present invention is at a low level overall, and its rolling mean is also consistently lower than that of the deconstrained screening scheme and the overnight static discrimination scheme. This indicates that the present invention can more accurately identify the abnormal starting position related to the dominant body deviation direction during continuous nighttime monitoring. In contrast, the positioning deviation of the deconstrained screening scheme and the overnight static discrimination scheme fluctuates more significantly, and some samples show a large increase, indicating that they are more susceptible to short-term abnormal disturbances or non-body constraint abnormalities. Therefore, the present invention can effectively improve the positioning accuracy of the body deviation trigger window by constructing an individual day-night transition base and combining it with body deviation constraints for screening.

[0168] In this embodiment, to verify the impact of different diagnostic treatment methods on the stability of chain diagnosis, a comparative analysis of the chain diagnosis stability of the proposed scheme, the deconstitutionalized screening scheme, and the all-night static discrimination scheme was conducted on multiple nighttime samples; such as Figure 6 As shown, the instantaneous stability curve of the present invention remains in a high range overall, and its rolling mean is consistently higher than that of the constitution-free screening scheme and the overnight static discrimination scheme. This indicates that the present invention has better continuity and stability in identifying the insomnia formation chain and its transitional relationships. Especially in the section where nighttime sample fluctuations are more obvious, the present invention can still maintain a high level of stability, while the constitution-free screening scheme and the overnight static discrimination scheme are more likely to show declines and discrete fluctuations, indicating that their ability to distinguish different nighttime instability patterns is relatively insufficient. It can be seen that the present invention, by introducing the number of consecutive transitions, the number of reverse retreats, and the depth of closure in the constitution direction for joint judgment, can more stably distinguish different instability patterns and improve the consistency of TCM constitution-based insomnia diagnosis output.

[0169] This embodiment also provides a computer device suitable for the portable TCM constitution-based intelligent diagnosis method for insomnia, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to realize the portable TCM constitution-based intelligent diagnosis method for insomnia as proposed in the above embodiment.

[0170] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0171] This embodiment also provides a storage medium storing a computer program, which, when executed by a processor, implements the portable intelligent diagnostic method for TCM constitution-related insomnia as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0172] In summary, this invention achieves the identification of the onset location of nocturnal insomnia abnormalities by constructing an individual diurnal transition base and a pre-sleep steady-state reference profile; it achieves a closed correlation between the TCM constitution direction and the onset process of nocturnal abnormalities by generating a constitution offset constraint vector and filtering the candidate sequences of nocturnal onset turning points in combination with a constitution offset constraint rule library; and it achieves the differentiation of different nocturnal instability patterns and the determination of constitution offset trigger windows by generating an insomnia formation chain and combining the number of consecutive turns, the number of reverse retreats, and the closure depth of the constitution direction.

[0173] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A portable intelligent diagnostic method for insomnia based on traditional Chinese medicine constitution, characterized in that, include: Collect pre-sleep homeostasis reference data, nighttime continuous monitoring data, and body constitution-related input data. After quality correction and time alignment, generate an individual diurnal transition baseline, pre-sleep homeostasis reference profile, and reliable markers for effective monitoring. Based on the pre-sleep steady-state reference profile, a sliding window analysis is performed on the individual diurnal transition base to identify the nighttime initiation transition window and generate candidate sequences and characterization groups of nighttime initiation transitions. A physical fitness deviation constraint vector is generated by using basic physical fitness question and answer data and pre-sleep complaint data. The physical fitness deviation constraint rule library is then used to filter the candidate sequences for nighttime start and turn, and a physical fitness constraint start and turn sequence is generated. Starting from the nighttime initiation transition window in the initial transition sequence of physical constraints, the transition relationship between perturbation extension segments is identified along the nighttime time axis to generate the insomnia formation chain, and the number of consecutive transitions, the number of reverse regressions, and the depth of closure in the physical direction are obtained. Based on the effective monitoring of reliable markers, insomnia formation chain, number of consecutive turns, number of reverse retreats, and body constitution closure depth, multi-level diversion judgment is performed to determine the body constitution offset trigger window and output TCM body constitution insomnia diagnosis data.

2. The portable intelligent diagnostic method for insomnia based on TCM constitution as described in claim 1, characterized in that, The generated individual day-night transition baseline, pre-sleep homeostasis reference profile, and effective monitoring reliable markers include: Collect homeostatic reference data before sleep, continuous nighttime monitoring data, and physical fitness-related input data, and perform unified time processing and quality correction to form quality-corrected multi-source time-series data; An individual day-night transition basis is constructed based on quality-corrected multi-source time-series data; The steady-state reference convergence is calculated by the heartbeat interval fluctuation coefficient, skin conductance rate of change, and body dynamic-static-steady-state deviation, and a steady-state reference profile before falling asleep is generated. A reliable marker for effective monitoring is generated based on the effective percentage of each signal during the continuous nighttime monitoring period and the total effective nighttime monitoring duration.

3. The portable intelligent diagnostic method for TCM constitution-related insomnia as described in claim 1 or 2, characterized in that, The generation of the candidate sequence for nighttime initiation of a transition and the initiation of a transition characterization set includes: The individual day-night transition base is expanded according to a uniform sampling step size and segmented using a continuous sliding window. The stability of the cardiac interval, the slope of skin conductance fluctuations, the persistence of body dynamics and static homeostasis, and the recovery status of skin temperature were calculated to obtain abnormal characterization items. The nighttime initiation turning point blocking value is calculated based on the number of abnormal characterization items, the weakest cross-boundary ratio, the continuous co-occurrence retention ratio, the sequential discreteness, and the number of round-trip reversals, and the nighttime initiation turning point window is identified. All nighttime initiation transition windows are arranged in order of appearance to generate a nighttime initiation transition candidate sequence and an initiation transition characterization group.

4. The portable intelligent diagnostic method for insomnia based on TCM constitution as described in claim 1, characterized in that, The generated body mass offset constraint vector includes: The basic constitution question and answer data were grouped into four categories: heat imbalance, deficiency imbalance, stagnation imbalance, and phlegm-dampness imbalance, and the item activation ratio for each constitution category was obtained. The pre-sleep complaints data were grouped into categories such as heat imbalance, deficiency imbalance, stagnation imbalance, and phlegm-dampness imbalance to obtain the compatibility ratio of complaints for each constitution. The offset constraint strength for each constitution direction is calculated by the item activation ratio, chief complaint synergy ratio, and number of conflicting chief complaints for each constitution direction. The offset constraint strengths of each body type direction are combined to form a body type offset constraint vector, and the dominant body type offset direction is determined.

5. The portable intelligent diagnostic method for insomnia based on TCM constitution as described in claim 4, characterized in that, The generation of the physical constraint initiation transition sequence includes: By using the body offset constraint rule library corresponding to the dominant body offset direction, the starting transition characterization group corresponding to each nighttime starting transition window is matched. Based on the overlap ratio of abnormal characterization items, the consistency ratio of the order of occurrence of abnormal characterization items, the consistency ratio of the dominant abnormal characterization direction, and the number of conflicting characterization items, calculate the physical constraint closure value of each nighttime initiation turning window. The nighttime initiation transition window is retained if the physical constraint closure value is not lower than the physical constraint identification threshold and the dominant abnormal characterization direction is consistent with the dominant physical deviation direction, and a physical constraint initiation transition sequence is generated.

6. The portable intelligent diagnostic method for TCM constitution-related insomnia as described in claim 4 or 5, characterized in that, The insomnia formation chain includes: Using the end time of the transition window of each physical constraint as the starting point for subsequent tracking, continuous monitoring segments are sequentially extracted along the nighttime time axis. For each continuous monitoring segment, the heart rate fluctuation coefficient, skin conductance rate of change, body dynamics and static stability deviation, and skin temperature recovery progress were extracted to identify abnormal characterization items and generate a perturbation expansion characterization group. For two adjacent continuous monitoring segments, the turning and connection locking value is calculated based on the time connection relationship, the inheritance relationship of abnormal characterization items, the fall and breakage situation, and the consistency relationship between the dominant abnormal characterization direction and the dominant body displacement direction. When the turning and acceptance locking value is not lower than the turning and acceptance identification threshold, the next continuous monitoring segment is determined as a valid turning and acceptance segment and is connected in series with the previous continuous monitoring segment. All valid transitional segments obtained sequentially after the starting transition window of the same night are combined in nighttime timeline order to generate the insomnia formation chain.

7. The portable intelligent diagnostic method for insomnia based on TCM constitution as described in claim 6, characterized in that, The acquisition of the number of consecutive turns, the number of reverse retreats, and the closure depth in the body direction includes: The number of segments that maintain a continuous direction along the time sequence of the insomnia formation chain is taken as the longest continuous consistent transition level, and the number of all adjacent transition relationships in the insomnia formation chain is taken as the total transition level. The body direction closure depth is determined by the ratio of the longest continuous consistent turning series to the total number of turning series; The formation chain of insomnia is marked by the generation of transitional and successive morphological markers; The folding and receiving form marking includes, when the number of consecutive folds is zero, it is marked as a single recovery type; When the number of consecutive turns is greater than zero and the number of reverse retreats is not less than the number of consecutive turns, it is called a repetitive fluctuation type; When the number of consecutive turns is greater than zero, the number of reverse retreats is less than the number of consecutive turns, and the closure depth in the body direction is not less than the closure depth recognition threshold, it is recorded as a continuous cascade type.

8. The portable intelligent diagnostic method for TCM constitution-related insomnia as described in claim 2 or 5, characterized in that, The process of determining the constitution offset trigger window and outputting TCM constitution-related insomnia diagnostic data includes: Based on the effective monitoring of reliable markers and the initiation and transition sequences of physical constraints, it is determined whether the current nighttime data meets the diagnostic output requirements and whether the nighttime abnormalities have significance for physical constraints. When the monitoring data is valid and there is a transitional sequence of physical constraints, the insomnia formation chain is used as the unit for stratification and judgment. The insomnia formation chain that meets the diagnostic criteria for TCM constitution-related insomnia is preferentially identified as the target insomnia formation chain, and the constitution constraint initiation transition window corresponding to the target insomnia formation chain is identified as the constitution offset trigger window, and TCM constitution-related insomnia diagnostic data is output.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the portable TCM constitution-based intelligent diagnostic method for insomnia as described in any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the portable TCM constitution-based intelligent diagnostic method for insomnia as described in any one of claims 1 to 8.