Digitized meta-cognitive insomnia treatment and intervention method
By receiving scale data, initializing the state machine, and collecting behavioral characteristics in digital insomnia intervention technology, extending the lock-in time, and outputting physical stimulation signals, the problem of secondary increase in cognitive arousal in existing technologies is solved, and effective sleep efficiency improvement and biological clock restoration are achieved.
Patent Information
- Application Number
- CN202610349124.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-20
- Publication Date
- 2026-05-15
AI Technical Summary
Existing digital insomnia intervention technologies rely on semantic parsing to cause a secondary increase in cognitive arousal. They lack a dynamic closed-loop intervention mechanism based on underlying physical interaction characteristics, which cannot effectively block the misalignment of nighttime cognitive rumination, resulting in a decline in actual sleep efficiency and a prolonged recovery period.
By receiving initial scale data, the physical interaction arousal baseline threshold is calculated, the master control state machine is initialized, and multi-dimensional terminal behavioral feature data is collected. The anxiety corrector is triggered to extend the lock-in time parameter, output cross-modal physical stimulus control signal, block the semantic parsing of interactive data, and inject neutral guidance labels into the visual interface to achieve dynamic closed-loop intervention.
It effectively reduces cognitive arousal caused by excessive exposure to sleep data, dynamically calculates and monitors arousal parameters and outputs cross-modal physical stimuli, suppresses abnormal rumination periods, improves sleep efficiency and shortens the recovery time of circadian rhythm homeostasis.
Smart Images

Figure CN122031867A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital psychotherapy technology, specifically a digital metacognitive insomnia treatment and intervention method. Background Technology
[0002] Digital metacognitive insomnia treatment and intervention methods refer to data processing and control technologies that rely on smart terminal devices to collect terminal interaction data and multi-dimensional terminal behavioral characteristic data of insomnia patients, use underlying system models to reconstruct the cognitive operation logic of insomnia patients in the face of sleep catastrophic thinking, and output cross-modal physical stimulation control signals to suppress excessive cognitive arousal state.
[0003] Existing digital insomnia intervention technologies primarily collect initial sleep scale scores and nighttime sleep logs through applications running on smart terminal operating systems. They then utilize natural language processing engines to semantically analyze the interactive data input by end-users and output reassuring text messages and objective monitoring results to a visual interface. These technologies also incorporate conventional relaxation aids by playing white noise at set times at night, establishing a static intervention process based on passive monitoring data and simple behavioral recording.
[0004] Because existing digital insomnia intervention technologies rely on semantic parsing and real-time text feedback mechanisms when processing nighttime interactive data, and because they suffer from excessive exposure of sleep data, they lack the technical capacity to induce cognitive rumination and a secondary increase in cognitive arousal levels in end-users. Consequently, when end-users wake up in the middle of the night and exhibit compulsive checking behavior, these technologies fail to identify abrupt changes in abnormal states reflected by spatial micro-motion variance and touch event rate, lacking a mandatory intervention mechanism based on underlying physical interaction characteristics for dynamic closed-loop control. Furthermore, existing digital insomnia intervention technologies fail to output underlying hardware redirection and blocking commands in response to deteriorating cognitive conditions, causing the actual sleep efficiency parameters of end-users to exhibit a downward fluctuating and decaying trend. This prolongs the adjustment and recovery cycle of the insomnia patient's internal biological clock homeostasis, leading to intervention dropout and a collapse in intervention system compliance. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a digital metacognitive insomnia treatment and intervention method. It aims to solve the problems of existing digital insomnia intervention technologies relying on semantic parsing, which leads to a secondary increase in cognitive arousal, and lacking a dynamic closed-loop intervention mechanism based on underlying physical interaction characteristics. This results in the inability to effectively block the misalignment of nighttime cognitive rumination, thereby causing a decline in actual sleep efficiency and a prolonged recovery period.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] This invention provides a digital metacognitive insomnia treatment and intervention method, comprising the following steps:
[0008] Receive initial scale data, calculate the physical interaction wake-up baseline threshold, and initialize the master control state machine and state machine rollback flag in the system memory. The master control state machine is configured to run in the metacognitive therapy stage.
[0009] The system acquires interactive data input by the end user, performs low-level access isolation encapsulation on the interactive data, and allocates an initial lock time parameter to control the system to enter the worry period confirmation state, which is a sub-state of the metacognitive therapy stage.
[0010] During the period of concern, multi-dimensional terminal behavior feature data is collected and monitoring wake-up parameters are calculated. When the monitoring wake-up parameters are greater than the physical interaction wake-up baseline threshold, the anxiety corrector is triggered to recalculate and extend the initial lock time parameter to obtain the recalculated and extended lock time parameter, and the state machine rollback flag is accumulated.
[0011] Based on the accumulated state machine backoff flags, calculate the cross-modal physical stimulus intensity parameters and output the corresponding physical stimulus control signals to perform blocking interventions.
[0012] When the countdown of the recalculated and extended lock time parameter reaches zero, the underlying access isolation encapsulation state of the interactive data is released, and unidirectional time axis sliding rendering is performed on the unlocked interactive data.
[0013] The differential change of the state machine rollback marker is monitored. When the differential change returns to zero, the master state machine is triggered to transition to a new state, ending the current metacognitive therapy stage and transitioning to the cognitive therapy stage.
[0014] Furthermore, in the step of obtaining interactive data input by the end user, the natural language processing engine in the operating system is forcibly suspended by modifying the system call service routing table and executing a process that bypasses semantic parsing, in order to block the semantic parsing of the interactive data. The advanced encryption standard algorithm is used to encrypt the interactive data that has not undergone semantic parsing and encapsulate it into the underlying asynchronous data buffer.
[0015] Furthermore, in the step of calculating the monitoring wake-up parameters, the underlying sensor application interface and accessibility service interface are called to collect multi-dimensional terminal behavior feature data, including the spatial micro-motion variance of the inertial measurement unit, the frequency of application life cycle state switching, and the invalid touch event rate. The monitoring wake-up parameters are generated by multiplying and summing the data with the set behavior feature weight coefficients.
[0016] Furthermore, in the step of triggering the anxiety corrector, the difference between the monitoring wake-up parameter and the physical interaction wake-up baseline threshold is incremented by one and then subjected to a natural logarithmic function operation to obtain a logarithmic decay value. This value is then combined with a nonlinear penalty adjustment factor and the initial lock-up time parameter to calculate the recalculated and extended lock-up time parameter.
[0017] Furthermore, in the step of performing unidirectional timeline sliding rendering, the encryption state of the memory address space file handle permission of the underlying asynchronous data buffer is decrypted, blocking the editing and deletion permissions of interactive data, and neutral guide labels with objective attributes are injected into the visual interface to display the interactive data in the form of unidirectional timeline sliding.
[0018] Furthermore, after transitioning to the cognitive therapy stage, the total sleep duration and total bed rest duration are extracted based on sensor sleep stage data. The intervention duration is removed from the total bed rest duration, and the actual sleep efficiency parameter is calculated. The recommended sleep window duration for the next treatment cycle is calculated using the deviation value and window adjustment gain coefficient. The target sleep onset timestamp is generated by reverse calculation, and it is encapsulated as a daytime intervention configuration command. The alarm clock service interface is called to configure the associated light exposure time interval and the cutoff time point for stimulant intake.
[0019] This invention provides a digital metacognitive method for the treatment and intervention of insomnia. It has the following beneficial effects:
[0020] 1. This invention bypasses the semantic parsing process by asynchronously isolating and encapsulating interactive data, severing the system's semantic understanding of input content and real-time text feedback path, and allocating initial lock-in time parameters to control the system's entry into a state of concern confirmation. This helps address the shortcomings of existing technologies that cause secondary cognitive arousal due to excessive exposure of sleep data. When a user wakes up suddenly during the night and experiences a sudden change in interaction, it can limit the patient's excessive focus on historical data, thus reducing sleep quality fluctuations caused by cognitive rumination misalignment.
[0021] 2. In the state of confirmed anxiety period, this invention dynamically calculates the monitoring wake-up parameters based on the actual extracted terminal space micro-motion variance and invalid touch event rate, and triggers an anxiety corrector to extend the lock-up time parameter when the parameter exceeds the physical interaction wake-up baseline threshold; this helps to achieve mutual verification between the underlying physical operation characteristics and the abnormal cognitive wake-up state, enabling the control system to drive the audio device and vibration motor to output cross-modal physical stimulation to forcibly deprive excess cognitive computing resources, which is beneficial to suppressing abnormal rumination periods caused by compulsive checking behavior.
[0022] 3. This invention generates cross-modal physical stimulus intensity parameters in real time based on monitoring arousal deviations, and transforms the rumination behavior shift caused by cognitive mutations into hardware redirection intervention commands and lock-in time control. When the system monitoring conditions change abruptly due to deterioration of emotional state, the control method can quickly output driving signals to dissipate abnormal cognitive anxiety and smoothly converge to the steady-state baseline after the interference ends; it can eliminate the overshoot phenomenon caused by external psychological state mutations, suppress the fluctuation amplitude of actual sleep efficiency parameters, and shorten the adjustment and recovery time of internal biological clock homeostasis, which helps to improve the anti-emotional disturbance of the intervention system. Attached Figure Description
[0023] Figure 1 This is a system framework diagram of an embodiment of the present invention;
[0024] Figure 2 This is a schematic diagram of the method flow according to an embodiment of the present invention;
[0025] Figure 3 This is a graph showing the change in monitoring wake-up parameters in a specific application embodiment of the present invention.
[0026] Figure 4 This is a comparison curve of actual sleep efficiency parameters in a specific application embodiment of the present invention. Detailed Implementation
[0027] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] See attached document Figure 1 This invention provides a digital metacognitive insomnia treatment and intervention system, comprising:
[0029] The sleep quality assessment module and the sleep hygiene education module receive initial scale data input from the terminal, establish the physical interaction wake-up baseline threshold and intervention mode configuration word, and initialize the main control state machine and state machine rollback flag in the system memory.
[0030] The delayed worry skills training module obtains interactive data input from the terminal through the "Heartfelt Mailbox" interface, bypasses the semantic parsing process, encapsulates the interactive data into the underlying asynchronous data buffer, and allocates an initial lock time parameter to enable the system to enter the worry period confirmation state. In the worry period confirmation state, it collects the spatial micro-motion variance of the inertial measurement unit, the frequency of application lifecycle state switching, and the invalid touch event rate to calculate the monitoring wake-up parameter. When the monitoring wake-up parameter is greater than the physical interaction wake-up baseline threshold, the anxiety corrector is triggered, and the lock time parameter is extended according to the nonlinear penalty algorithm and the state machine rollback flag is accumulated.
[0031] The attention switching training module extracts the cumulative value of the state machine backtracking marker, calculates the spatial acoustic phase offset angle and vibration waveform envelope dispersion parameters, takes over the terminal audio output device and tactile vibration motor, and outputs the corresponding physical stimulus control signal.
[0032] The decentralized mind training module unlocks the encryption state of the asynchronous data buffer when the lock time parameter is zero, calls the Heartfelt Message Bottle visual component to execute the desensitization and exposure logic, and performs a one-way sliding rendering that blocks two-way interaction permissions on the unlocked data.
[0033] The Sleep Catastrophic Mind Reconstruction Exercise Module injects neutral guiding labels into the visual interface during the execution of unidirectional sliding rendering.
[0034] The cognitive reconstruction module, stimulus control module, and sleep behavior restriction module receive control instructions from the master state machine and execute form data collection and behavior intervention rule verification.
[0035] The master control state machine continuously monitors the differential change of the state machine rollback flag within a set sliding time window, and determines the system flow path based on the intervention mode configuration word when the differential change is zero.
[0036] The underlying control module includes an auxiliary relaxation training unit, which is configured as a resident background thread that continuously outputs audio mixes during the operation of the above module.
[0037] The overall workflow of this system is driven by a master state machine and runs on terminal devices equipped with physical sensors and execution hardware. After system startup, it enters the pre-intervention phase. The sleep quality assessment module and sleep hygiene education module read basic scale data, calculate the physical interactive arousal baseline threshold, and complete the initialization of underlying parameters. Simultaneously, the system writes the intervention mode configuration word based on external instructions to determine whether the current workflow is a joint intervention mode or an independent intervention mode. The underlying control module initiates the assisted relaxation training unit and maintains independent background operation.
[0038] The master state machine then transitions to the metacognitive therapy stage. When the terminal generates interactive input, the delayed worry skills training module captures data through the "Heartfelt Mailbox" receiving interface and performs asynchronous encapsulation, allocating a timestamp lock. The system enters the worry period confirmation state. The system summarizes hardware sensor data and application interaction frequency in real time to generate monitoring wake-up parameters. The anxiety corrector compares the monitoring wake-up parameters with the physical interaction wake-up baseline threshold. When the monitoring wake-up parameters exceed the baseline threshold, the anxiety corrector recalculates and extends the lock time parameter, accumulating the state machine backoff flag.
[0039] The attention switching training module reads the change value of the state machine's rollback marker and sends an exclusive control command to the operating system's hardware abstraction layer. Based on the rollback marker value, the system outputs spatial acoustic phase offset and vibration waveform signals to the underlying hardware. When the lock time countdown of the asynchronous data buffer reaches zero, the decentralized thinking training module acquires the buffered data, blocks editing and deletion permissions, and presents the visual content on the terminal screen in a unidirectional timeline sliding format. The sleep catastrophic thinking reconstruction exercise module simultaneously overlays neutral guiding labels onto the visual interface.
[0040] The master state machine continuously monitors the rate of change of the state machine rollback marker. When the differential change of the state machine rollback marker within a continuous time window is zero, the system determines that the frequency of physical operations and the micro-motion characteristics of the equipment have returned to the baseline level. The master state machine reads the intervention mode configuration word. If the intervention mode configuration word indicates that the system is in joint intervention mode, the master state machine terminates the metacognitive therapy stage and transitions to the cognitive therapy stage. The system sequentially calls the cognitive reconstruction module, the stimulus control module, and the sleep behavior restriction module to complete subsequent data processing. If the intervention mode configuration word indicates that the system is in independent intervention mode, the master state machine suspends the underlying asynchronous interrupt and terminates the current system workflow.
[0041] See attached document Figure 2 This invention provides a digital metacognitive insomnia treatment and intervention method, comprising the following steps:
[0042] S1, the sleep quality assessment module and the sleep hygiene education module receive the initial scale data input from the terminal, calculate and generate the physical interaction wake-up baseline threshold and intervention mode configuration word, initialize the main control state machine and state machine rollback flag in the system memory, and start the auxiliary relaxation training unit of the underlying control module to configure it as a resident background thread to continuously output audio mix.
[0043] S2, the delayed worry skills training module enters the metacognitive therapy stage based on the flow instructions of the master control state machine initialized in step S1. It obtains the interactive data input by the terminal through the Heart Mailbox receiving interface, bypasses the semantic parsing process, directly encapsulates the interactive data into the underlying asynchronous data buffer, and allocates initial lock time parameters to control the system to enter the worry period confirmation state.
[0044] S3, the delayed worry skills training module collects the spatial micro-motion variance of the terminal's inertial measurement unit, the frequency of application lifecycle state switching, and the invalid touch event rate during the worry period confirmation state triggered in step S2. It calculates the monitoring wake-up parameters within the current time window, compares the monitoring wake-up parameters with the physical interaction wake-up baseline threshold, and triggers the anxiety corrector when the monitoring wake-up parameters are greater than the physical interaction wake-up baseline threshold. It recalculates and extends the lock time parameters according to the nonlinear penalty algorithm, and accumulates the state machine rollback flag.
[0045] S4, the attention switching training module extracts the accumulated state machine backtracking marker value, dynamically calculates the spatial acoustic phase offset angle parameter and the vibration waveform envelope dispersion parameter according to the preset mathematical function, sends exclusive control instructions to the hardware abstraction layer of the terminal operating system to take over the audio output device and the tactile vibration motor, and outputs physical stimulation control signals corresponding to the spatial acoustic phase offset angle parameter and the vibration waveform envelope dispersion parameter.
[0046] S5, the decentralized thinking training module continuously monitors the locked time parameter. When the countdown of the locked time parameter reaches zero, it removes the encrypted encapsulation state of the underlying asynchronous data buffer, blocks the two-way editing and deletion interaction permissions of the unlocked data, and calls the Heart Message Drift Bottle visual component to perform one-way timeline sliding rendering. At the same time, the sleep disaster thinking reconstruction exercise module synchronously injects neutral guidance labels of objective attributes into the visual interface of the one-way timeline sliding rendering.
[0047] S6, the master control state machine continuously calculates the differential change of the state machine rollback mark according to the set sliding time window. When the differential change returns to zero, the system flow path is determined according to the intervention mode configuration word. When the intervention mode configuration word indicates the joint intervention mode, the underlying asynchronous interrupt is turned off and the flow is transferred to the cognitive therapy stage. The cognitive reconstruction module, stimulus control module and sleep behavior restriction module are woken up in sequence to receive feedback forms and execute behavioral intervention rule verification, forming a global control closed loop.
[0048] Step S1 specifically includes the following sub-steps:
[0049] S101, the sleep quality assessment module and the sleep hygiene education module present standardized assessment forms through the terminal's graphical user interface and receive initial scale data input from the terminal. The initial scale data includes the terminal user's insomnia severity index and trait anxiety score. For the front-end rendering of the standardized assessment form and the network communication and local persistence of the initial scale data, those skilled in the art can use conventional hypertext transfer protocols and database read / write technologies. The data collection and storage process is well-known in the field and will not be elaborated upon here.
[0050] S102, the sleep quality assessment module reads the initial scale data from the memory and calculates and generates a physical interaction wake-up baseline threshold. The physical interaction wake-up baseline threshold is defined as the benchmark value by which the system determines whether the terminal exhibits excessive monitoring and rumination behavior in subsequent operating cycles. The calculation process of the physical interaction wake-up baseline threshold relies on the multidimensional scores in the initial scale data, and the calculation formula is as follows:
[0051] ;
[0052] In the formula, The baseline threshold for the generated physical interactions is used to wake up the user. The actual score of the insomnia severity index in the initial scale data; The maximum score constant for the insomnia severity index set for the system is 28, based on the standard values of conventional clinical scales. The actual score for the trait anxiety rating; The maximum score constant for trait anxiety is 80, which is taken as the standard value for conventional clinical scales. and The preset baseline weight coefficients for the system are dynamically configured by the system within the range of 0.4 to 0.6 based on the focus of intervention, and must meet the following requirements: Constraints; The inherent hardware sampling compensation constant based on the terminal device type is obtained by pre-sampling and calibrating the underlying physical noise of the terminal's microelectromechanical sensors.
[0053] S103, the system processor generates an intervention mode configuration word based on the external setting instructions received from the terminal. The intervention mode configuration word is allocated as a single-byte control bit in the system memory, used to control the termination and transition path of the master state machine. When the external setting instruction indicates the use of a single therapy, the system writes a logic zero to the single-byte control bit, and the intervention mode configuration word indicates that the system is currently in an independent metacognitive intervention mode. When the external setting instruction indicates that standard behavioral rhythm intervention needs to be combined, the system writes a logic one to the single-byte control bit, and the intervention mode configuration word indicates that the system is currently in a combined intervention mode.
[0054] In step S104, the system processor allocates a protected memory address space within the system memory and initializes the master state machine and state machine rollback flag within this protected memory address space. The master state machine is instantiated as a system background service entity with deterministic state transition logic, and its initial running state is set to the pre-intervention state. The state machine rollback flag, as a global unsigned integer variable subsequently used to control the strength of cross-modal hardware redirection, is initialized to zero during initialization. The state machine rollback flag establishes a synchronization association with the hardware clock of the terminal operating system to maintain global time dimension counting consistency.
[0055] In step S105, the underlying control module sends a thread creation system call to the kernel space of the terminal operating system to start the auxiliary relaxation training unit. The auxiliary relaxation training unit is configured by the system as a resident background daemon with high survival priority. This resident background daemon runs independently of the main thread of the main control state machine's business logic, continuously outputting white noise or binaural beat audio mixing data streams to the terminal's audio hardware abstraction layer. For the lifecycle management of the background daemon and the underlying system-level playback control of the audio mixing data stream, those skilled in the art can use the operating system's standard thread scheduling interface and audio service application programming interface. The audio hardware driver process is a well-known technology in the field and will not be elaborated upon here.
[0056] This implementation method calculates the physical interaction arousal baseline threshold and generates the intervention mode configuration word by receiving initial scale data. Simultaneously, it initializes the master control state machine, state machine rollback flag, and resident background auxiliary relaxation training unit at the system bottom layer. This realizes the establishment of the system operating environment and the construction of personalized intervention benchmark parameters, which helps to provide objective data comparison reference and stable system-level operation guarantee for subsequent entry into the metacognitive therapy stage.
[0057] Step S2 specifically includes the following sub-steps:
[0058] S201, the master control state machine sends a flow instruction to the delayed worry skills training module. After receiving the flow instruction, the delayed worry skills training module switches the global system operation state from the pre-intervention stage to the metacognitive therapy stage.
[0059] To achieve physical-level acquisition of negative emotions, the delayed worry skills training module activates the "Heartfelt Mailbox" receiving interface on the terminal's graphical user interface. The Heartfelt Mailbox receiving interface is a graphical interactive window providing multimodal input components for receiving interactive data input by the terminal user. This interactive data consists of text and audio streams representing the terminal user's negative cognitions or sleep-related rumination. For the front-end view rendering of the graphical interactive window and the data capture of the multimodal input components, those skilled in the art can use standard front-end development frameworks and system input / output application programming interfaces (APIs). The view rendering and data capture processes are well-known technologies in the field and will not be elaborated upon here.
[0060] S202, the Delayed Worry Skills Training Module, after obtaining the interactive data input by the end user in real time through the Heartfelt Mailbox receiving interface, needs to cut off the catastrophic thinking association loop emphasized in cognitive behavioral therapy from the underlying logic.
[0061] Specifically, the delayed worry skills training module forcibly suspends the natural language processing engine in system memory, performing low-level routing operations that bypass the semantic parsing process by modifying the underlying system call service routing table. Bypassing the semantic parsing process instructs the system not to perform word segmentation, sentiment analysis, or intent recognition operations on entity content extraction from the interactive data, thus blocking the system from processing the specific semantic information carried by the interactive data. This ensures that the interactive data input by the end-user is recorded by the system only as objective physical input events, achieving cognitive decoupling between thought recording and emotional response.
[0062] S203, after acquiring and recording objective events, the delayed concern skills training module transforms the interactive data, which has not undergone semantic parsing, into binary data packets without a specific data structure. It then uses an Advanced Encryption Standard (AES) algorithm to perform symmetric encryption on the data packets and directly encapsulates the encrypted binary data packets into the asynchronous data buffer of the terminal's underlying file system. The asynchronous data buffer is an independently allocated, protected memory address space in the terminal's physical storage medium. The system modifies the file handle permissions of this memory address space to achieve hardware-level access isolation between the interactive data and the terminal user's front-end read permissions.
[0063] S204, To determine the duration of this access isolation state, the delay concern technique training module extracts the current system timestamp of the terminal operating system and calculates and allocates an initial lock time parameter according to the built-in delay intervention rules. The initial lock time parameter defines the expected countdown value for maintaining the encrypted isolation state of interactive data in the asynchronous data buffer. The specific mathematical formula for calculating the initial lock time parameter by the delay concern technique training module is as follows:
[0064] ;
[0065] In the formula, The initial locking time parameter is generated; This is the current system timestamp of the terminal operating system; The system's basic delay lock constant is set, with a value range of 120 seconds to 300 seconds; The actual score of the insomnia severity index established in step S1; The baseline threshold for triggering the calculation of the pre-set insomnia severity index was set to 14 points using large-sample clinical data on insomnia intervention. The time compensation weighting coefficient corresponding to the severity index is configured in the range of 10 seconds / minute to 30 seconds / minute; This is a function operation to find the maximum value.
[0066] S205, the delayed concern skills training module uniquely binds the initial lock time parameter to the binary data packet in the asynchronous data buffer and sends a status update signal to the master control state machine. Upon receiving the status update signal, the master control state machine controls the system to enter the concern period confirmation state.
[0067] During the period of concern confirmation, the master control state machine activates the system's underlying hardware timer, performing a linear decrement operation on the initial lock time parameter based on the terminal system's hardware clock. Due to the risk of interruption such as application suspension or power failure in mobile terminal devices, the initial lock time parameter and binding relationship are synchronously persisted to non-volatile memory by the system, ensuring seamless continuation of the countdown process when the terminal device recovers. The period of concern confirmation provides a continuous and independent observation window for subsequent dynamic acquisition of hardware sensor data and comparison with the physical interaction wake-up baseline threshold.
[0068] This implementation bypasses the semantic parsing process and directly encapsulates interactive data into an asynchronous data buffer. By combining the scale score with adaptive calculation and allocation of initial lock time parameters, it achieves hardware-level isolation and dynamic time locking of negative thought input data. This helps to block the rumination loop of end users repeatedly accessing interactive data and provides an objective data buffer basis for the system to subsequently enter the worry period to confirm the status and perform physical hardware redirection.
[0069] Step S3 specifically includes the following sub-steps:
[0070] In step S301, the delayed worry skills training module, under the worry period confirmation state triggered in step S2, initiates the physical behavior and system interaction monitoring process in the background of the terminal. To comprehensively quantify the patient's anxiety state during insomnia, the system needs to integrate data from both physical and interactive dimensions. Specifically, the delayed worry skills training module calls the terminal operating system's underlying sensor application interface and accessibility service interface to continuously collect multi-dimensional behavioral characteristic data within a preset time window. This multi-dimensional behavioral characteristic data includes the terminal's inertial measurement unit spatial micro-motion variance, application lifecycle state switching frequency, and invalid touch event rate. Specifically, the inertial measurement unit spatial micro-motion variance characterizes the user's limb rolling and anxiety level while lying down; the application lifecycle state switching frequency records the user's compulsive checking behavior of frequently switching between foreground applications and background processes; to overcome the sandbox security limitations of mobile operating systems, the system, through the aforementioned accessibility service interface or a globally transparent floating window mechanism, legally identifies and extracts high-frequency unconscious click actions generated by the user in screen areas without actual interactive interfaces, and uses these as the invalid touch event rate. Apart from special interface calls, the regular data acquisition process relies on the underlying event listening mechanism of the operating system, which is a well-known technology in the field and will not be elaborated here.
[0071] S302, after acquiring multidimensional behavioral feature data, the delayed worry technique training module inputs the multidimensional behavioral feature data into the built-in multidimensional state fusion calculation model to calculate the monitored arousal parameter within the current time window. The monitored arousal parameter is a comprehensive evaluation index that quantifies the end-user's current state of excessive physiological arousal and cognitive anxiety. From the perspective of cognitive behavioral intervention principles, anxiety accompanying insomnia is not only manifested in physical tossing and turning, but also in meaningless mobile phone operation behavior. Integrating the above three indicators can more objectively reflect the patient's true arousal level. The specific mathematical formula for calculating the monitored arousal parameter is as follows:
[0072] ;
[0073] In the formula, For the generated monitoring wake-up parameters; This represents the spatial micro-motion variance of the inertial measurement unit collected within the current time window. This refers to the frequency of application lifecycle state transitions within the current time window. The current time window length is set, and the value is usually set to a range of 15 to 60 seconds; This represents the number of invalid touch events captured within the current time window. This represents the total number of touch events within the current time window. , and The pre-calibrated behavioral feature weighting coefficients for the system correspond to the physical sensitivity of the sensor data. These coefficients are obtained through regression analysis of nocturnal polysomnography data from clinical insomnia patients and meet the following requirements: The constraints.
[0074] S303, after calculating the monitoring wake-up parameters, the system needs to further evaluate whether the wake-up level has exceeded the limit. At this time, the delayed worrying skills training module extracts the physical interaction wake-up baseline threshold calculated in step S1 and compares the monitoring wake-up parameters with the physical interaction wake-up baseline threshold in system memory. When the monitoring wake-up parameters are less than or equal to the physical interaction wake-up baseline threshold, it indicates that the end user is currently in a calm transition period, and the system maintains the current worry period confirmation state and the initial lock-in time parameter unchanged. Conversely, if the monitoring wake-up parameters are greater than the physical interaction wake-up baseline threshold, it indicates that the end user has exceeded the anxiety limit of the insomnia baseline threshold, and the delayed worrying skills training module immediately triggers the anxiety corrector. This anxiety corrector is a non-linear compensation control component independently encapsulated in the system background, used to perform reinforced cognitive isolation intervention.
[0075] S304. After the anxiety corrector is triggered, the initial lock-in time parameter will be read, and recalculated and extended according to a non-linear penalty algorithm. The purpose of extending the lock-in time parameter is to apply time-dimensional desensitization negative feedback to the end-user's excessive interactive behavior, preventing the end-user's compulsive attention to the content of the "Heartfelt Mailbox." To prevent the penalty time from increasing linearly and infinitely with the level of anxiety, thus triggering secondary loss of control and panic in the patient, the system adopts a logarithmic decay penalty mechanism with boundary convergence characteristics. The specific mathematical formula for calculating the extended lock-in time parameter is as follows:
[0076] ;
[0077] In the formula, The lock time parameter is recalculated and extended; The initial locking time parameters generated for step S2; The monitoring wake-up parameters calculated and obtained in step S302; The physical interaction wake-up baseline threshold generated in step S1; It is a non-linear penalty adjustment factor, and its value is set in the range of 0.5 to 1.5 according to the intervention intensity level of the system; This is an operation on the natural logarithm function.
[0078] S305, after completing the extended lock-time parameter recalculation, the anxiety corrector overwrites the extended lock-time parameter into the control handle of the asynchronous data buffer, updating the countdown task. Simultaneously, the anxiety corrector sends a state exception interrupt signal to the main control state machine. Upon receiving the interrupt signal, the main control state machine increments the state machine rollback flag in memory. The incrementing value of the rollback flag represents the severity of the end-user's deviation from the preset relaxation trajectory. The accumulated rollback flag serves as an input variable for subsequent dynamic adjustment of the cross-modal physical stimulus intensity, providing a quantitative basis for the system to enter the attention switching training module.
[0079] This implementation calculates and monitors arousal parameters in real time using multidimensional behavioral feature data, and compares them with the physical interaction arousal baseline threshold. When an excessive anxiety state is detected, a nonlinear penalty algorithm is triggered to extend the lock-in time parameter and accumulate state machine backtracking flags, achieving adaptive monitoring and negative feedback time locking of insomnia rumination behavior. This mechanism not only complements the underlying behavior capture methods of the terminal but also introduces a nonlinear algorithm to prevent panic, helping to break the terminal user's compulsive checking loop of negative thoughts and providing objective state data support for the subsequent generation of personalized cross-modal physical stimulus interventions.
[0080] Step S4 specifically includes the following sub-steps:
[0081] In step S401, after receiving the state exception interrupt signal sent in step S3 and completing the accumulation of the state machine rollback flag, the master control state machine sends an activation call instruction to the attention switching training module. To prevent internal rumination, the system needs to guide the end user to shift cognitive resources to the external physical perception environment. Upon receiving the activation call instruction, the attention switching training module reads the accumulated state machine rollback flag and the monitoring wake-up parameters calculated in step S3 from system memory. The state machine rollback flag and the monitoring wake-up parameters together constitute the multi-dimensional quantitative basis for the system to assess the severity of the end user's departure from the relaxation trajectory, enabling the attention switching training module to prepare to calculate the intervention intensity required for the system to perform hardware redirection based on the state machine rollback flag and the monitoring wake-up parameters.
[0082] In S402, after acquiring the state machine rollback flag and monitor wake-up parameters, the attention switching training module calls the built-in stimulus compensation algorithm engine to calculate the cross-modal physical stimulus intensity parameters. By introducing mindfulness landing technology and cognitive behavioral science principles, it utilizes external rhythmic sensory input to effectively deprive the brain of computational resources allocated to anxious thoughts, prompting the end-user's attention to shift from internal emotional experiences to external objective physical stimuli. The specific mathematical formula for the system's dynamic adjustment of intervention intensity is as follows:
[0083] ;
[0084] In the formula, To calculate the generated cross-modal physical stimulus intensity parameters; The basic hardware drive strength constant set for the system is set at the midpoint of the rated range based on the nominal output power of the terminal device; This is the nonlinear gain coefficient corresponding to the state machine rollback flag, with values configured in the range of 0.1 to 0.3; Add the state machine rollback flag to the S3 step for cumulative updates; To compensate for the overflow of awakening parameters, the weight is dynamically set within the range of 0.5 to 1.2 based on the stage of the insomnia severity index; The monitoring wake-up parameters obtained by calculating in step S3; The physical interaction wake-up baseline threshold generated in step S1; This is a function operation to find the maximum value.
[0085] S403, after calculating the cross-modal physical stimulus intensity parameters, the system needs to convert the abstract control variables into hardware drive signals at the terminal device's underlying level. At this point, the attention switching training module sends multi-threaded concurrent control instructions to the terminal operating system's hardware abstraction layer. These instructions include pulse-width modulation (PWM) signals controlling the terminal's linear motor to output rhythmic tactile vibrations, and display rendering instructions controlling the terminal screen to output a breathing light visual effect. To ensure that external stimuli effectively cover the cognitive threshold of internal anxiety, the duty cycle of the PWM signal and the brightness change period of the display rendering instructions are both positively correlated with the cross-modal physical stimulus intensity parameters. The attention switching training module guides the terminal user's sensory channels through cross-modal sound, light, and tactile coupling output, achieving an anchored shift of cognitive attention from negative cognitive activity to physical perception. Since the system call interface provided by the hardware abstraction layer involves terminal-level driver permissions, and the data distribution process relies on the operating system's standard device control protocol, which is a well-known technology in the field, it will not be elaborated upon here.
[0086] In step S404, during the continuous output of cross-modal physical stimuli, the master control state machine maintains polling calls to the background sensors, reuses the multi-dimensional state fusion calculation model from step S3, and performs periodic closed-loop evaluations of the end-user's monitoring and arousal parameters. Since continuous high-intensity physical stimulation can trigger perceptual adaptation or lead to adverse emotional agitation, the system needs to establish a dynamic intervention exit mechanism. The master control state machine compares the periodically updated monitoring and arousal parameters with the physical interaction arousal baseline threshold in memory space. When the monitoring and arousal parameters decrease and return to being less than or equal to the physical interaction arousal baseline threshold, it indicates that the end-user's abnormal anxiety has subsided. Based on the state feedback, the master control state machine immediately sends an intervention termination signal to the attention switching training module, shuts down the continuous output of underlying hardware driver instructions, and resets the system's global operating state to the pre-intervention state. Simultaneously, the master control state machine clears the state machine rollback flag, reconstructing a clean observation environment for the next dimension of the insomnia intervention cycle.
[0087] In this implementation, the main control state machine and the attention switching training module collaboratively read the state machine rollback flag and monitor the wake-up parameters to calculate the cross-modal physical stimulus intensity parameters, and convert them into multimodal hardware drive signals at the terminal bottom layer to execute a dynamic intervention closed loop. This achieves adaptive adjustment of the system intervention intensity and external physical anchoring of cognition, which helps to block the excessive cognitive wake-up loop of insomnia patients and provides a physical-level intervention safety net for the system to maintain safe and stable long-term sleep assistance operation.
[0088] Step S5 specifically includes the following sub-steps:
[0089] In S501, after detecting a system alarm or natural wake-up interaction event from the terminal operating system, the main control state machine switches the system's global operating state from sleep monitoring to intervention summary. To comprehensively review the actual effectiveness of the nighttime intervention, the system needs to retrieve continuous monitoring slices spanning the entire night. Specifically, the sleep quality assessment module extracts the nighttime intervention history timestamp sequence recorded in the underlying file system and simultaneously acquires the terminal's underlying sensor sleep stage data. It should be noted that obtaining objective sleep indicators relies on the operating system's underlying calendar provider and open health data interface; the data reading process is a well-known technology in the field and will not be elaborated upon here.
[0090] S502, after acquiring the nighttime intervention history timestamp sequence and sensor sleep stage data, the system enters the core efficacy quantification stage, namely, the sleep quality assessment module needs to calculate the end-user's actual sleep efficiency parameter. Unlike conventional sleep monitoring, sleep efficiency in this protocol is a core quantitative clinical indicator for measuring the recovery of sleep drive and the effectiveness of the intervention. Considering that patients are not in a typical sleep-attempting state during physical and cognitive interventions, this intervention time must be excluded from the calculation to obtain an objective and accurate insomnia assessment benchmark. The specific mathematical formula for calculating the actual sleep efficiency parameter is as follows:
[0091] ;
[0092] In the formula, To calculate the actual sleep efficiency parameters generated; This refers to the total sleep duration extracted by accumulating sleep stage data from sensors. The total bed rest time preset for end users from getting into bed to getting out of bed the night before; To cope with nighttime Summation function operation for each independent intervention event; The first time stamp sequence of nighttime intervention history records Duration of single cognitive and physical cross-modal intervention.
[0093] S503, after calculating the actual sleep efficiency parameters, the system needs to adaptively adjust the underlying intervention algorithm parameters based on the actual treatment effectiveness. In this step, the sleep quality assessment module calls the built-in optimizer to update the time compensation weight coefficient corresponding to the insomnia severity index. Numerical correction of the prior intervention intensity based on the posterior probability of the patient's true sleep efficiency can effectively avoid cognitive desensitization caused by long-term excessive physical interference, thereby maintaining the steady state of the intervention cycle. The specific mathematical formula for updating the compensation weight is as follows:
[0094] ;
[0095] In the formula, The updated time compensation weighting coefficient; The time compensation weighting coefficient corresponding to the severity index; The optimal learning rate constant set for the system is set within the range of 0.01 to 0.05; The target sleep efficiency parameter for cognitive behavioral intervention was preset to 0.85 based on a large sample of clinical insomnia standard values; The actual sleep efficiency parameter generated in step S502; This is a time decay factor that decreases non-linearly with the intervention period. To prevent the model from overfitting occasional daily sleep fluctuations, the specific formula for calculating the time decay factor is as follows:
[0096] ;
[0097] In the formula, This is the time decay factor; It is the base of the natural logarithm; This is a preset attenuation rate constant, typically set to 0.1; This represents the cumulative number of days the system has continuously performed sleep monitoring and intervention.
[0098] S504 After completing the closed-loop update of the parameters of the underlying algorithm, the sleep quality assessment module overwrites the updated time compensation weight coefficients into the system configuration file in non-volatile memory to complete the fine-tuning of the local model.
[0099] Simultaneously, the sleep quality assessment module encapsulates the extracted sensor sleep stage data and nighttime intervention history timestamp sequences into a standardized sleep log data package. To protect the security of patient medical privacy data, the underlying control module extracts the public key of the cloud server pre-installed in a secure environment, calls an asymmetric encryption algorithm to perform public key encryption on the sleep log data package, and uploads the encrypted sleep log data package to the cloud medical analysis server when the system has network communication capabilities. With the submission of the cloud synchronization task, the main control state machine terminates the associated background sensor polling calls and resident daemon processes, releases system running memory space, and the system officially enters daytime hibernation standby mode.
[0100] In this embodiment, the actual sleep efficiency parameter is calculated by extracting underlying sensor data through the detection system's wake-up events. This parameter is then used as a feedback variable to dynamically posteriorly correct and persistently overwrite the preset time compensation weight coefficients, achieving closed-loop evaluation of cognitive behavioral therapy and personalized iteration of system-level model weights. This self-closing mechanism of underlying parameters helps the system adaptively adjust the intensity of long-term assisted sleep intervention, providing objectively optimized historical data support for parameter distribution in the next intervention cycle.
[0101] Step S6 specifically includes the following sub-steps:
[0102] In step S601, after the main control state machine enters daytime hibernation standby mode, the cloud-based medical analysis server receives the encrypted sleep log data packet uploaded in step S5. To ensure the compliance and security of cloud data processing, the system relies on a pre-set key management system. Within a trusted execution environment, the cloud-based medical analysis server calls the asymmetric encryption private key matching the terminal's underlying layer to decrypt the data packet, thereby parsing and obtaining the terminal user's actual sleep efficiency parameters and total sleep duration. The data decryption and parsing process is a well-known technology in network communication and information security, and will not be elaborated upon here.
[0103] S602. After obtaining the analyzed actual sleep efficiency parameters and total sleep duration, the system needs to reshape the patient's sleep drive in the daytime dimension. Based on the principle of sleep restriction techniques in cognitive behavioral therapy, if the patient's actual sleep efficiency is lower than the target value, their bed rest time needs to be further reduced to increase sleep hunger; conversely, it should be appropriately extended. Based on this principle, the rhythm regulation engine built into the cloud-based medical analysis server calculates the recommended sleep window duration for the next intervention cycle based on the latest night's objective sleep indicators. The specific mathematical formula for calculating the recommended sleep window duration is as follows:
[0104] ;
[0105] In the formula, To calculate the recommended sleep window duration; This refers to the total sleep duration extracted by accumulating sleep stage data from sensors. The window adjustment gain coefficient preset for the system is set within the range of 0.5 to 1.5 based on the patient's age baseline data; The actual sleep efficiency parameter obtained in step S5; The target sleep efficiency parameter preset for the system has a constant value of 0.85; The base time adjustment step size was set to 15 minutes, based on clinical cognitive behavioral intervention guidelines.
[0106] S603, after calculating the recommended sleep window duration, in order to generate specific daytime execution constraints, the cloud-based medical analysis server reverse-engineers and generates the target sleep time stamp for the next cycle based on the fixed wake-up time stamp set by the end user and the aforementioned recommended sleep window duration.
[0107] Subsequently, the system extracts the built-in circadian rhythm intervention rules, performs time offset calculations based on the target sleep onset time stamp, and encapsulates the target sleep onset time stamp and daytime circadian rhythm behavior restriction rules into a daytime intervention configuration and delivery command. Specifically, the daytime circadian rhythm behavior restriction rules include a light exposure time interval calculated based on a first preset duration (usually configured to be 12 to 14 hours) prior to the target sleep onset time stamp, and a cutoff time point for central nervous system stimulant intake calculated based on a second preset duration (usually configured to be 6 to 8 hours). The cloud-based medical analysis server pushes the daytime intervention configuration and delivery command to the target terminal device via a secure hypertext transfer protocol.
[0108] S604: After receiving the daytime intervention configuration command, the terminal device needs to convert the cloud policy into a system-level constraint for the local entity. At this time, the system wakes up the sleep hygiene education module in the foreground. To implement rhythmic intervention in the daytime physical environment, the sleep hygiene education module parses the above configuration command and calls the terminal operating system's calendar provider and system alarm clock service interface to register the light exposure time interval and the deadline for stimulant intake as high-priority local system reminder events. Simultaneously, the sleep hygiene education module generates a daytime rhythmic task list through a graphical user interface for the terminal user to interact with and confirm.
[0109] This implementation method decrypts and analyzes sleep logs on a cloud server and calculates the recommended sleep window duration. Simultaneously, it sends intervention configurations to the terminal, including target sleep onset time and circadian rhythm behavior restriction rules with time offset constraints. These configurations are then registered as local reminder events by the terminal's underlying calendar and alarm clock services, achieving a closed-loop transformation of nighttime monitoring and assessment data into daytime entity behavior management. This mechanism, which alternates between day and night, helps to reshape the circadian rhythm of insomnia patients across the entire 24 / 7, providing a complete technical implementation path for building a comprehensive cognitive behavioral therapy system.
[0110] Specific application examples:
[0111] In this embodiment, the sleep quality assessment module receives the initial scale data from the end user, obtaining an actual score of 18 for the insomnia severity index and 62 for the trait anxiety score. The system configures a multi-dimensional state fusion calculation model based on the aforementioned scale input parameters and pre-calculates the initial value of the physical interaction wake-up baseline threshold within the target monitoring time window as 0.65, and the initial value of the basic delay lock constant as 300 seconds. During the 0-120 second phase, the system executes routine background monitoring instructions under stable sleep conditions. At the 120-second mark, a transient high-frequency interactive disturbance mutation, caused by the end user waking up suddenly during the night and triggering compulsive checking behavior, is applied to the system, leading to a deterioration of the monitoring conditions of the terminal's internal sensors.
[0112] See attached document Figure 3 The graph shows time on the horizontal axis (in seconds) and monitoring wake-up parameters on the vertical axis (dimensionless). The delay-concern skills training module extracts the spatial micro-motion variance of the inertial measurement unit and the invalid touch event rate in real time based on the system's operating status. The preset behavioral feature weighting coefficients are set with a physical sensitivity dominance coefficient of 0.6 and an application switching frequency gain coefficient of 0.3. The system multiplies the actual collected spatial micro-motion variance by the physical sensitivity dominance coefficient and the actual captured invalid touch event rate by the application switching frequency gain coefficient, then sums these products to calculate the final monitoring wake-up parameters. Figure 3 As the curve trend shows, during the undisturbed, stable operation phase from 0 to 120 seconds, the theoretical prediction and actual relaxation process are consistent. The monitored wake-up parameter value is far below the physical interaction wake-up baseline threshold, and the monitored wake-up parameter curve appears as a flat horizontal line, stably remaining near the baseline value of 0.30. At the 120-second mark, after being disturbed by forced check interaction behavior, the terminal's spatial micro-motion variance increases sharply, leading to heightened anxiety characteristics, increased frequency of invalid touches, and enhanced cognitive connectivity. The actual extracted monitored wake-up parameter value surges to 0.95. After the above linear superposition calculation, the monitored wake-up parameter curve shows a sudden, vertical upward surge, rapidly climbing from 0.30 to a peak of around 0.95, breaking through the physical interaction wake-up baseline threshold of 0.65. This quickly triggers the anxiety corrector to output an instruction to extend the lock-up time parameter to suppress the abnormally widened rumination period. As the cognitive anxiety caused by the disturbance is gradually dissipated by the cross-modal physical stimuli output by the subsequent attention switching training module, the actual cognitive state of the system begins to return to the nominal calm point, and the arousal bias decreases accordingly. The monitoring arousal parameter curve then shows an exponentially smooth recovery trend and converges again at about 350 seconds, and stabilizes again in the steady-state range below 0.65.
[0113] The attention switching training module receives the aforementioned dynamically changing abnormal state interruption signals in real time and continuously updates the cross-modal physical stimulus intensity parameters within the target physical channel. Based on the actual arousal overflow and positive polarity compensation parameters, the attention switching training module converts the reset control parameters into underlying hardware drive signals. The attention switching training module outputs these drive signals to the hardware abstraction layer of the terminal operating system, driving the audio output device and haptic vibration motor to perform precisely coupled rhythmic physical stimulus actions, forcibly depriving redundant cognitive computing resources and preventing catastrophic thinking.
[0114] Experimental verification and effect comparison section:
[0115] See attached document Figure 4The horizontal axis represents the intervention period in days, and the vertical axis represents the dimensionless actual sleep efficiency parameter. This embodiment compares and verifies the effectiveness of the method provided by this invention. The solid line in the figure represents the experimental group using the combined intervention mode control method of this application, and the dashed line represents the control group using the conventional passive monitoring and control method based on pure sleep recording and white noise playback. Figure 4 As the curve trend shows, during the initial adaptation phase of 0 to 7 days, the actual sleep efficiency parameter curves of both test systems stably coincided near the inefficient insomnia baseline of 0.62.
[0116] Combination Figure 4 The comparative validation data and curve evolution trends show that, after a sudden change in external psychological conditions at day 7, when patients became overly focused on historical sleep data, the system using conventional passive monitoring and control methods based on pure sleep recordings exhibited a drastic deterioration in sleep quality. Due to the inherent data exposure of its model and the lack of a mandatory closed loop with underlying physical barriers, it failed to identify the exacerbation of rumination behavior. Its actual sleep efficiency parameter showed a steep downward trend and quickly dropped to a trough of about 0.51, resulting in a severe sleep deprivation zone. With the delayed intervention of conventional sleep hygiene education, the dotted line crossed the 0.62 scale line and generated ineffective overshooting, forming a weak rebound peak of only about 0.68, which led to a severe collapse in compliance. After a long period of disordered alternating oscillations and decay, the system only slowly hovered in the inefficient range of 0.65 after about 28 days. The overall adjustment process was lengthy and resulted in a large number of intervention dropout samples.
[0117] In contrast, in the system employing the control method of this application, the asynchronous data encryption isolation command that bypasses semantic parsing and the real-time decoupling mechanism of high-frequency dynamic cross-modal physical stimulation directly transform the rumination behavior deviation caused by cognitive mutation into lock-in time parameters and hardware redirection intervention. Therefore, the actual fluctuation curve exhibits only a very small and smooth downward trend. The lowest actual sleep efficiency parameter trough of the solid line is strictly controlled at a safe level of approximately 0.60. After crossing the trough, the solid line rises smoothly and rapidly, with almost no obvious severe overshoot or repeated oscillations. It quickly converged and stabilized at the target high-quality baseline of 0.85 approximately 18 days prior. The intuitive comparison of the two sets of curve trends shows that the method provided by this invention effectively eliminates the cognitive rumination misalignment and quality oscillation trend caused by excessive exposure to sleep data, reducing the maximum actual sleep efficiency deviation from approximately 0.34 to 0.02. This significantly shortens the adjustment and recovery time of the internal biological clock homeostasis in insomnia patients from more than 4 weeks to less than 2 weeks, thereby improving the practicality of the digital insomnia intervention system against emotional disturbances and the effective sleep conversion rate.
Claims
1. A digital metacognitive insomnia treatment and intervention method, characterized in that, Includes the following steps: Receive initial scale data, calculate the physical interaction wake-up baseline threshold, and initialize the master control state machine and state machine rollback flag in the system memory. The master control state machine is configured to run in the metacognitive therapy stage. The system acquires interactive data input by the end user, performs low-level access isolation encapsulation on the interactive data, and allocates an initial lock time parameter to control the system to enter the worry period confirmation state, which is a sub-state of the metacognitive therapy stage. During the period of concern, multi-dimensional terminal behavior feature data is collected and monitoring wake-up parameters are calculated. When the monitoring wake-up parameters are greater than the physical interaction wake-up baseline threshold, the anxiety corrector is triggered to recalculate and extend the initial lock time parameter to obtain the recalculated and extended lock time parameter, and the state machine rollback flag is accumulated. Based on the accumulated state machine backoff flags, calculate the cross-modal physical stimulus intensity parameters and output the corresponding physical stimulus control signals to perform blocking interventions. When the countdown of the recalculated and extended lock time parameter reaches zero, the underlying access isolation encapsulation state of the interactive data is released, and unidirectional time axis sliding rendering is performed on the unlocked interactive data. The differential change of the state machine rollback marker is monitored. When the differential change returns to zero, the master state machine is triggered to transition to a new state, ending the current metacognitive therapy stage and transitioning to the cognitive therapy stage.
2. The digital metacognitive insomnia treatment and intervention method according to claim 1, characterized in that, The specific steps for receiving initial scale data, calculating the physical interaction wake-up baseline threshold, and initializing the master control state machine and state machine rollback flag in the system memory are as follows: Extract the initial scale data, which includes the insomnia severity index score and the trait anxiety score; The first product is obtained by dividing the insomnia severity index score by the set full score constant of the insomnia severity index and multiplying it by the set benchmark weight coefficient. The second product is obtained by dividing the trait anxiety score by the set full score constant of the trait anxiety score and multiplying it by the benchmark weight coefficient. The first product, the second product, and the set inherent hardware sampling compensation constant are added together to generate the physical interaction wake-up baseline threshold. Within the protected memory address space allocated by the system memory, initialize the master control state machine in the pre-intervention state and the state machine rollback flag with an initial value of zero.
3. The digital metacognitive insomnia treatment and intervention method according to claim 2, characterized in that, The specific steps for acquiring the interactive data input by the terminal user, performing low-level access isolation encapsulation on the interactive data, and allocating an initial lock time parameter to control the system to enter the concern period confirmation state are as follows: The natural language processing engine is forcibly suspended in the terminal operating system, and the semantic parsing process is bypassed by modifying the system call service routing table to block the semantic parsing of the interactive data. The interactive data that has not undergone semantic parsing is encrypted using the Advanced Encryption Standard algorithm, and the encrypted data is encapsulated into the underlying asynchronous data buffer to complete the underlying access isolation encapsulation. Based on the current system timestamp and the time compensation weight coefficient corresponding to the severity of insomnia, the initial lock time parameter is calculated and generated and bound to the underlying asynchronous data buffer, and the system switches to the state of concern period confirmation.
4. The digital metacognitive insomnia treatment and intervention method according to claim 1, characterized in that, The specific steps for collecting multi-dimensional terminal behavior feature data and calculating monitoring wake-up parameters are as follows: Call the underlying sensor application programming interface and accessibility service interface to collect multi-dimensional terminal behavior feature data within the current time window, including the spatial micro-motion variance of the inertial measurement unit, the frequency of application lifecycle state switching, and the invalid touch event rate; The physical parameters are obtained by multiplying the spatial micro-motion variance of the inertial measurement unit by the set behavioral feature weighting coefficients. The interaction parameter is obtained by dividing the frequency of application lifecycle state switching by the length of the current time window and then multiplying it by the behavior feature weight coefficient. The touch parameters are obtained by multiplying the invalid touch event rate by the behavioral feature weighting coefficient. The monitoring wake-up parameter is calculated by summing the physical parameter, the interaction parameter, and the touch parameter.
5. The digital metacognitive insomnia treatment and intervention method according to claim 1, characterized in that, The specific steps for triggering the anxiety corrector to recalculate and extend the initial lock time parameter when the monitored wake-up parameter is greater than the physical interaction wake-up baseline threshold, and accumulating the state machine rollback flag, are as follows: When the monitoring wake-up parameter is greater than the physical interaction wake-up baseline threshold, the difference between the monitoring wake-up parameter and the physical interaction wake-up baseline threshold is calculated. After adding one to the difference, perform a natural logarithmic function operation to obtain the logarithmic decay value; The logarithmic decay value is multiplied by the set nonlinear penalty adjustment factor, one is added, and then multiplied by the initial locking time parameter to calculate the recalculated and extended locking time parameter. The recalculated and extended lock time parameter is overwritten into the control handle, and an accumulation operation is performed on the state machine rollback flag in the memory space.
6. The digital metacognitive insomnia treatment and intervention method according to claim 1, characterized in that, The specific steps for calculating the cross-modal physical stimulus intensity parameters based on the accumulated state machine backtracking flags and outputting the corresponding physical stimulus control signals to perform blocking interventions are as follows: The overflow amount of the wake-up parameter is extracted by subtracting the monitoring wake-up parameter from the physical interaction wake-up baseline threshold. The wake-up parameter overflow is multiplied by the set wake-up overflow compensation weight to obtain the wake-up compensation value, and the accumulated state machine rollback flag is multiplied by the set nonlinear gain coefficient to obtain the rollback compensation value. The wake-up compensation value and the fallback compensation value are added together, and the result is multiplied by one and then multiplied by the set basic hardware drive intensity constant to calculate the cross-modal physical stimulus intensity parameter. The cross-modal physical stimulus intensity parameters are converted into multi-threaded concurrent control instructions and sent to the hardware abstraction layer. The output physical stimulus control signal, which includes pulse width modulation signals and display rendering instructions, is used to execute the blocking intervention.
7. The digital metacognitive insomnia treatment and intervention method according to claim 3, characterized in that, The specific steps for releasing the underlying access isolation encapsulation state of the interactive data and performing unidirectional timeline sliding rendering on the unlocked interactive data when the countdown of the recalculated and extended lock time parameter reaches zero are as follows: When the countdown of the recalculated and extended lock time parameter reaches zero, modify the file handle permissions of the memory address space of the underlying asynchronous data buffer and decrypt the state. Blocking the editing and deletion permissions of the interactive data is used to restrict repeated input operations on the interactive data. Neutral guide labels with objective attributes are synchronously injected into the visual interface of the terminal screen, and the interactive data is displayed in the form of unidirectional timeline sliding, and the unidirectional timeline sliding rendering is executed.
8. The digital metacognitive insomnia treatment and intervention method according to claim 1, characterized in that, The specific steps for monitoring the differential change of the state machine rollback marker, and ending the current metacognitive therapy stage and transitioning to the cognitive therapy stage when the differential change returns to zero are as follows: The differential change is obtained by monitoring the rate of change of the state machine rollback marker within a continuous time window. When the differential change returns to zero, the pre-stored intervention mode configuration word is extracted; When the intervention mode configuration word indication system is in the joint intervention mode, the metacognitive therapy phase is terminated and transitions to the cognitive therapy phase.
9. A digital metacognitive insomnia treatment and intervention method according to claim 1, characterized in that, The transition to the cognitive therapy stage also includes: After detecting a natural wake-up event from the terminal operating system, the underlying sensor sleep stage data and the nighttime intervention history timestamp sequence are obtained. The total sleep duration and total bed rest time are extracted based on the sleep stage data from the aforementioned sensors. The intervention duration recorded by the nighttime intervention history timestamp sequence is removed from the total bed rest time, and the actual sleep efficiency parameter is calculated based on the total sleep time using a division operation. The actual sleep efficiency parameter is used to perform posterior correction and persistent overwrite on the set sleep time compensation weight coefficient.
10. A digital metacognitive insomnia treatment and intervention method according to claim 9, characterized in that, The specific steps also include: Based on the deviation between the actual sleep efficiency parameter and the set target sleep efficiency parameter, and combined with the set window adjustment gain coefficient, the recommended sleep window duration for the next treatment cycle is calculated. Based on the fixed wake-up time stamp set on the terminal and the recommended sleep window duration, the target sleep time stamp is calculated in reverse. The target sleep time stamp and the set daytime rhythm behavior restriction rules are encapsulated into a daytime intervention configuration and issued as instructions.
