Mouse low-stress automatic sleep deprivation system based on behavior feedback control

By collecting mouse behavior data in real time through visual anchors and cameras, and combining Kalman filtering algorithm and motor perturbation, the problem of unnecessary or untimely mechanical stimulation in the rotating rod system was solved, achieving precise control and stability of sleep deprivation in mice and improving the reliability of experimental data.

CN121817092APending Publication Date: 2026-04-10林泽华
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
林泽华
Filing Date
2025-12-26
Publication Date
2026-04-10

Smart Images

  • Figure CN121817092A_ABST
    Figure CN121817092A_ABST
Patent Text Reader

Abstract

The invention provides a mouse low-stress automatic sleep deprivation system based on behavior feedback control, and relates to the technical field of biomedical research, and the mouse low-stress automatic sleep deprivation system comprises an acquisition module which is used for acquiring behavior video data of a mouse in a cage body in real time through visual anchor points and a camera which are arranged on the cage body, performing coordinate system calibration through the visual anchor points, and outputting the behavior video data of the mouse in the cage body; physical position information of the mouse is obtained; the analysis module is used for processing the movement track of the mouse between continuous frames based on the physical position information of the mouse so as to obtain the displacement and the movement speed of the mouse, and providing a preset displacement threshold value and a preset speed threshold value for state judgment; the judgment module is used for comparing the displacement and the movement speed with a displacement threshold value and a speed threshold value respectively according to the displacement and the movement speed, and judging that the mouse enters a static state when the displacement of multiple continuous frames is smaller than the displacement threshold value and the movement speed is smaller than the speed threshold value. According to the invention, integrated control of accurate identification, on-demand disturbance and long-term stable deprivation of low-stress damage is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of biomedical research technology, and in particular to an automated sleep deprivation system for mice with low stress based on behavioral feedback control. Background Technology

[0002] In the field of biomedical research, mouse sleep deprivation models are core tools for analyzing sleep physiology, exploring the mechanisms of neurodegenerative diseases, and evaluating the efficacy of sleep-regulating drugs. Currently, commercially available rotating rod sleep deprivation systems are commonly used in laboratories to conduct related experiments. In an experiment on the effects of sleep deprivation on synaptic plasticity in the hippocampus of mice, a research team used a rotating rod sleep deprivation system to subject 20 experimental mice to continuous sleep deprivation for 48 hours. According to the preset program of the rotating rod sleep deprivation system, the rod was slightly rotated every 15 minutes to prevent the mice from falling asleep through mechanical contact. At the same time, the EEG signals of the mice were recorded to verify the deprivation effect.

[0003] However, during the experiment, a technical flaw was discovered in the rotating rod sleep deprivation system: it lacked closed-loop control based on the real-time behavioral state of the mice and relied solely on fixed-time programmed perturbation triggers. When the mice were awake and active, the system would still initiate the rotation of the rod at the preset time. This excessive mechanical stimulation not only caused unnecessary interference to the mice but may also activate their stress response. Furthermore, when the mice fell asleep prematurely within the interval between two preset perturbation events, the system could not identify the sleep state in real time and had to wait until the next preset time point to trigger intervention. This resulted in short sleep fragments in the mice, making it impossible to achieve precise sleep deprivation. Ultimately, this led to significant fluctuations in the expression data of hippocampal synaptic proteins in some mice during the experiment, making it difficult to accurately reflect the true impact of sleep deprivation on synaptic plasticity. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide an automated sleep deprivation system for mice with low stress based on behavioral feedback control, which realizes the integrated control of accurate identification, on-demand perturbation and long-term stable deprivation of low stress injury.

[0005] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows: In a first aspect, a low-stress automated sleep deprivation system for mice based on behavioral feedback control includes: The acquisition module is used to acquire real-time video data of the mouse's behavior in the cage through visual anchor points and cameras arranged on the cage, and to calibrate the coordinate system through the visual anchor points to obtain the mouse's physical position information. The analysis module is used to process the mouse's motion trajectory between consecutive frames based on the mouse's physical location information to obtain the mouse's displacement and motion speed, and to provide preset displacement and speed thresholds for state determination. The determination module is used to compare the displacement amount and the movement speed with the displacement threshold and the speed threshold, respectively. When the displacement amount is less than the displacement threshold and the movement speed is less than the speed threshold for multiple consecutive frames, the mouse is determined to have entered a stationary state. The triggering module is used to obtain a disturbance trigger signal based on the mouse's still state when the duration of the mouse's still state exceeds a preset stillness time threshold; The drive module is used to control the drive motor to drive the movable base plate to make a small lateral reciprocating motion along the guide rail according to the disturbance trigger signal, so as to apply non-invasive disturbance to the mouse. The cooling module is used to start a cooling timer after the non-intrusive disturbance is completed to enter the cooling phase, and to suspend all disturbance triggering within a preset cooling time window; when the cooling time window ends, it automatically exits the cooling phase. The loop module is used to continue collecting new behavioral video data after the cooling phase ends, so as to obtain a closed-loop sleep deprivation process for continuous behavioral monitoring and disturbance control.

[0006] Furthermore, by using visual anchor points and cameras placed on the cage, real-time video data of the mouse's behavior within the cage is collected, and coordinate system calibration is performed using the visual anchor points to obtain the mouse's physical location information, including: The original video images containing visual anchor points and mice are captured by a camera. The original video images are then processed to extract the coordinate data of the visual anchor points in the image coordinate system. Based on the coordinate data in the image coordinate system, the mapping transformation relationship from the image coordinate system to the physical coordinate system of the cage is calculated; The mapping transformation relationship is applied to the input image processing of the automatic motion recognition algorithm. By performing grayscale conversion, background modeling and foreground extraction on the video frames, the coordinate position of the mouse in the image coordinate system is obtained. Furthermore, based on the mouse's physical location information, the mouse's motion trajectory between consecutive frames is processed to obtain the mouse's displacement and velocity, and preset displacement and velocity thresholds are provided for state determination, including: The mouse's physical location information acquired from multiple consecutive frames is combined to obtain a motion trajectory sequence; The Kalman filter algorithm was used to smooth and denoise the motion trajectory sequence to obtain the optimized mouse motion trajectory. Based on the optimized mouse motion trajectory, the mouse displacement between adjacent frames is calculated. Based on the displacement and video frame rate, the instantaneous movement speed of the mouse is calculated, and preset displacement and speed thresholds are provided to the state determination module as judgment criteria.

[0007] Furthermore, based on the displacement and motion velocity, comparisons are made with displacement thresholds and velocity thresholds, respectively. When the displacement is less than the displacement threshold and the motion velocity is less than the velocity threshold for multiple consecutive frames, the mouse is determined to have entered a stationary state, including: The displacement is compared with a preset displacement threshold, and the instantaneous velocity is compared with a preset velocity threshold to obtain the comparison result. Based on the comparison results, when the displacement of multiple consecutive frames is less than the displacement threshold and the instantaneous motion speed is less than the speed threshold, the mouse is determined to have entered a stationary state. Based on the mouse entering a resting state, a resting state timer is started to record the duration for which the mouse remains resting.

[0008] Furthermore, based on the mouse's resting state, when the duration of the mouse's resting state exceeds a preset resting time threshold, a disturbance trigger signal is obtained, including: Based on the duration of the mouse's resting state, the duration of the resting state is compared with a preset resting time threshold; When the duration of the static state exceeds the static time threshold, a disturbance trigger signal is obtained; and the disturbance trigger signal is sent to the drive module to trigger the motor disturbance operation.

[0009] Furthermore, based on the disturbance trigger signal, the drive motor is controlled to move the movable base plate along the guide rail in a small lateral reciprocating motion, applying a non-invasive disturbance to the mouse, including: It receives a disturbance trigger signal from the trigger module and obtains preset disturbance parameters, including motion amplitude and motion frequency; Based on the disturbance trigger signal and the preset disturbance parameters, the corresponding motor control command is obtained to control the silent stepper motor or servo motor to start running. The operation of the motor drives the transmission mechanism to move the movable base plate in a slight lateral reciprocating motion along the guide rail. The small reciprocating motion of the movable base plate creates a non-invasive physical disturbance to the mice in the cage, disrupting their sleep state.

[0010] Furthermore, after completing the non-intrusive perturbation, a cooling timer is started to enter the cooling phase, during which all perturbation triggering is paused within a preset cooling time window; when the cooling time window ends, the cooling phase is automatically exited, including: After the non-invasive perturbation was completed, a cooling timer was immediately started; during the timing of the cooling timer, the behavioral status of the mice was continuously monitored, but the generation and transmission of all perturbation trigger signals were suspended. When the cooldown timer reaches the preset cooldown time window, the cooldown timer will automatically stop and the disturbance trigger function will be reactivated.

[0011] Furthermore, after the cooling-off phase, new behavioral video data continues to be collected to obtain a closed-loop sleep deprivation process for continuous behavioral monitoring and disturbance control, including: Receive the trigger signal indicating the end of the cooling phase, and re-acquire new behavioral video data based on the trigger signal; resume real-time acquisition of mouse behavioral video data; The newly acquired behavioral video data is input into the automatic motion recognition algorithm, and the detection and analysis of the mouse's movement status is restarted based on the newly input data; Based on the detection and analysis of mouse movement state data, the complete processing flow from movement trajectory extraction to state determination is restarted; By cyclically executing the entire process of data acquisition, analysis, judgment, triggering, disturbance, and cooling, and based on continuously updated behavioral data, long-term adaptive closed-loop sleep deprivation control is achieved.

[0012] In a second aspect, a computing device includes: One or more processors; A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to execute the system.

[0013] Thirdly, a computer-readable storage medium storing a program that, when executed by a processor, performs the system.

[0014] The above-described solution of the present invention has at least the following beneficial effects: This system effectively overcomes the technical problems of existing mouse sleep deprivation devices, which rely solely on fixed-time program-triggered perturbations, resulting in inaccurate detection of awake mice and missed perturbations of mice that fall asleep prematurely. These problems stem from the use of real-time positioning and acquisition via visual anchors and cameras, Kalman filtering for smooth trajectory behavior analysis, continuous multi-frame displacement-velocity dual-threshold static determination, closed-loop control triggered by static exceeding the threshold, micro-amplitude lateral non-invasive perturbation of a movable base plate driven by a silent motor, and a closed-loop process involving cooling window protection and cyclic acquisition and analysis after cooling. This approach addresses the shortcomings of existing devices, such as insufficient accuracy in preventing the misinterpretation of awake mice and the missed perturbation of mice that fall asleep prematurely, as well as the significant stress response induced by traditional mechanical stimulation and the difficulty in maintaining long-term stable deprivation due to the lack of continuous closed-loop control. Furthermore, this system achieves accurate identification and on-demand intervention of mouse sleep states, reducing stress damage caused by unnecessary stimulation. Simultaneously, the automated closed-loop cycle ensures the stability and standardization of long-term sleep deprivation experiments, providing reliable and reproducible experimental tools for sleep physiology and neuropharmacology research, thereby improving the accuracy of experimental data and the credibility of research conclusions. Attached Figure Description

[0015] Figure 1This is a schematic diagram of an automated sleep deprivation system for mice based on behavioral feedback control, provided by an embodiment of the present invention.

[0016] Figure 2 This is a schematic diagram of a non-invasive, automated sleep deprivation system for mice based on behavioral feedback control, provided by an embodiment of the present invention. The system controls a drive motor to move a movable base plate along a guide rail in a small lateral reciprocating motion according to a disturbance trigger signal, thereby applying a non-invasive disturbance to the mouse.

[0017] Figure 3 This is a schematic diagram of a low-stress automated sleep deprivation system for mice based on behavioral feedback control.

[0018] 1. Control panel; 2. Motor; 3. Movable base plate; 4. Cage; 5. Guide rail; 6. Limit sensor; 7. Camera module; 8. Anchor point label location diagram. Detailed Implementation

[0019] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0020] like Figure 1 As shown, embodiments of the present invention propose an automated sleep deprivation system for mice under low stress based on behavioral feedback control, comprising: The acquisition module is used to acquire real-time video data of the mouse's behavior in the cage through visual anchor points and cameras arranged on the cage, and to calibrate the coordinate system through the visual anchor points to obtain the mouse's physical position information. The analysis module is used to process the mouse's motion trajectory between consecutive frames based on the mouse's physical location information to obtain the mouse's displacement and motion speed, and to provide preset displacement and speed thresholds for state determination. The determination module is used to compare the displacement amount and the movement speed with the displacement threshold and the speed threshold, respectively. When the displacement amount is less than the displacement threshold and the movement speed is less than the speed threshold for multiple consecutive frames, the mouse is determined to have entered a stationary state. The triggering module is used to obtain a disturbance trigger signal based on the mouse's still state when the duration of the mouse's still state exceeds a preset stillness time threshold; The drive module is used to control the drive motor to drive the movable base plate to make a small lateral reciprocating motion along the guide rail according to the disturbance trigger signal, so as to apply non-invasive disturbance to the mouse. The cooling module is used to start a cooling timer after the non-intrusive disturbance is completed to enter the cooling phase, and to suspend all disturbance triggering within a preset cooling time window; when the cooling time window ends, it automatically exits the cooling phase. The loop module is used to continue collecting new behavioral video data after the cooling phase ends, so as to obtain a closed-loop sleep deprivation process for continuous behavioral monitoring and disturbance control.

[0021] In this embodiment of the invention, the system effectively overcomes the technical problems of existing mouse sleep deprivation devices that rely solely on fixed-time program-triggered perturbations, resulting in false alarms in awake mice and missed alarms in mice that fall asleep prematurely. These problems include insufficient accuracy, significant stress responses caused by improper mechanical stimulation, and difficulty in maintaining stable deprivation effects due to a lack of continuous closed-loop control. The system employs real-time behavior acquisition combining visual anchors and cameras, continuous frame trajectory processing and displacement / velocity threshold setting based on physical location, continuous multi-frame dual-threshold determination of mouse stillness, triggering disturbances after a preset duration of stillness, a drive motor-driven micro-lateral non-invasive perturbation of a movable base plate, a cooling window to pause triggering after disturbance, and closed-loop control for cyclical acquisition after cooling. This achieves accurate identification and on-demand intervention of mouse sleep states, reduces stress damage caused by unnecessary stimulation, and enables long-term stable and standardized sleep deprivation through automated closed-loop cycles. This improves the reliability of experimental data and the reproducibility of results, providing a tool more suited to experimental needs for research in sleep physiology and related fields.

[0022] In a preferred embodiment of the present invention, visual anchor points and cameras arranged on the cage are used to collect real-time video data of the mouse's behavior within the cage, and coordinate system calibration is performed using the visual anchor points to obtain the mouse's physical position information, including: The system acquires raw video images containing visual anchor points and the mouse via a camera. The raw video images are then processed to extract the coordinate data of the visual anchor points in the image coordinate system. Specifically, this involves: first, hardware setup: fixing visual anchor points at the four corners and the midpoints of the two long sides of the mouse cage, ensuring the anchor points do not obstruct mouse movement and can be fully captured; selecting an industrial camera with a 1920x1080 pixel resolution and a frame rate of 30 frames per second, mounting it 50 cm directly above the cage and securing it with a bracket so the lens covers the entire interior of the cage; adjusting the camera's focus and exposure parameters until the image is clear and blur-free; and then starting the camera in continuous acquisition mode to ensure each raw frame is captured accurately. The video images simultaneously contain all visual anchors and the mice within the cages. The acquired single-frame raw images are first processed with Gaussian filtering to remove minor noise from the image. Then, adaptive histogram equalization is used to adjust the image brightness and contrast to make the anchor features more prominent. Next, the visual anchor recognition algorithm scans the image, locates the anchor outline, extracts edge features, and confirms the identity of each anchor by combining the anchor's own encoding. An image coordinate system is established with the top left corner of the image as the origin, the horizontal direction to the right as the X-axis, and the vertical direction downward as the Y-axis. The coordinate values ​​of the geometric center of each anchor outline are calculated. The average of the coordinates of the same anchor in three consecutive frames is taken as the final coordinate data of the anchor in the image coordinate system.

[0023] Based on coordinate data in the image coordinate system, the mapping transformation relationship from the image coordinate system to the cage's physical coordinate system is calculated. Specifically, the cage's physical coordinate system is defined with the lower left corner of the cage's bottom surface as the origin, the length direction as the X-axis, and the width direction as the Y-axis, with units set in millimeters. Using a vernier caliper with an accuracy of 0.01 millimeters, the actual position of the center of each visual anchor point in this physical coordinate system is measured. Each anchor point is measured three times, and the average value is taken as the accurate physical coordinate. The obtained image coordinates of each anchor point are then paired with their corresponding physical coordinates, ensuring at least four sets of pairings to guarantee transformation accuracy. This is because the perspective transformation method to be used subsequently requires establishing a projection transformation relationship between the image coordinate system and the cage's physical coordinate system. This relationship needs to be described by a 3x3 perspective transformation matrix, containing eight unknown parameters that need to be solved. The image coordinate-physical coordinate correspondence of each anchor point provides two equations for solving these parameters. Therefore, at least four sets of non-collinear corresponding points are needed to solve all the unknown parameters through mathematical calculations. This avoids uncertainty in the transformation model due to insufficient points and ensures the uniqueness and accuracy of the transformation. Based on these paired data, a perspective transformation method is used to construct a mapping model from the image coordinate system to the physical coordinate system of the cage. First, the coordinates of four or more anchor points are organized into pairs of input data. Then, the mathematical model of perspective transformation is solved using common numerical calculation methods such as the least squares method. The core of perspective transformation is to correct the perspective distortion caused by the angle when the camera is shooting. Through matrix operations, the distorted pixel positions in the image are mapped to the distortion-free physical positions on the bottom surface of the real cage. Finally, a 3x3 perspective transformation matrix is ​​calculated. This matrix is ​​like a transformation bridge connecting the two coordinate systems. It contains all the information of scaling, rotation, translation, and perspective distortion correction. By simply substituting the image coordinates of any point into this matrix, the corresponding physical coordinates can be obtained through coordinate operations.

[0024] An anchor point not involved in modeling is selected as a verification point, and its image coordinates are substituted into the aforementioned perspective transformation matrix to calculate the corresponding physical coordinates. Specifically, the image coordinates of the verification point are substituted into the corresponding operation logic of the matrix to obtain the transformed physical coordinates. The calculated result is then compared with the physical coordinates of the verification point actually measured with vernier calipers. If the error between the two exceeds 0.5 mm, it indicates that the parameter solution of the perspective transformation matrix is ​​not accurate enough. It is necessary to re-check the measurement data of the actual position of the anchor point and confirm the correct pairing of image coordinates and physical coordinates. Then, the parameters of the perspective transformation matrix are re-solved using the corrected corresponding point data. This process is repeatedly optimized until the transformation error of all verification points is controlled within 0.5 mm. The perspective transformation matrix and the corresponding mapping rules obtained at this time are the final determined mapping transformation relationship from the image coordinate system to the cage physical coordinate system, which can provide a reliable basis for the accurate calculation of the mouse's physical position.

[0025] The mapping transformation relationship is applied to the input image processing of the automatic motion recognition algorithm. By performing grayscale conversion, background modeling, and foreground extraction on video frames, the coordinate position of the mouse in the image coordinate system is obtained. Specifically, this includes: integrating the determined mapping transformation relationship into the image processing flow of the automatic motion recognition algorithm to ensure that the mapping transformation relationship can be called for each subsequent image frame; and processing the video frames transmitted in real time from the camera in sequence: the first step is to perform grayscale conversion, converting the color frames into 8-bit grayscale images, retaining brightness information to reduce the amount of computation and avoid color interference with mouse contour recognition; the second step is to build a background model, selecting 5 frames before the experiment when there were no mice. Using the cage image at frame 0 as a sample, a Gaussian mixture model is used to learn the sample features and construct a dynamic background model that can adapt to changes in lighting. The third step is to extract the foreground by performing a difference operation between the current video frame and the background model to obtain a difference image containing the mouse outline. An adaptive threshold is used to binarize the difference image to distinguish the foreground and background regions. Then, morphological opening and closing operations are used to remove noise points and holes in the foreground to improve the mouse outline. Finally, the mouse foreground region is located, and the geometric center of the minimum bounding rectangle of the region is calculated. The coordinates of this center are the coordinates of the mouse in the current frame image coordinate system. The frame number and acquisition time corresponding to this coordinate are recorded simultaneously.

[0026] In this embodiment of the invention, because the preferred embodiment employs a technique of arranging visual anchor points and cameras in the cage, first acquiring original video images containing the anchor points and the mouse, and extracting the image coordinate system coordinates of the anchor points, then calculating the mapping transformation relationship from the image coordinate system to the physical coordinate system of the cage, and simultaneously performing grayscale conversion, background modeling, and foreground extraction processing on the video frames, this effectively overcomes the technical problems of traditional mouse sleep deprivation methods, such as lack of accurate position monitoring basis, inability to establish the correspondence between image information and the physical space of the cage, leading to inaccurate identification of mouse movement state and subjective and large error in sleep determination. This allows for accurate acquisition of the mouse's true coordinate position information in the physical coordinate system of the cage, providing reliable data support for mouse movement trajectory analysis, displacement and movement speed calculation, and static state determination. This fundamentally improves the accuracy and standardization of state monitoring during sleep deprivation, laying the foundation for achieving precise closed-loop control.

[0027] In a preferred embodiment of the present invention, based on the physical location information of the mouse, the motion trajectory of the mouse between consecutive frames is processed to obtain the displacement and motion velocity of the mouse, and preset displacement thresholds and velocity thresholds are provided for state determination, including: The mouse's physical position information acquired from multiple consecutive frames is combined to obtain a motion trajectory sequence. Specifically, this involves: first, confirming that the camera has been continuously capturing video at a frame rate of 30 frames per second and outputting the mouse's physical position information for each frame. This information is derived from image coordinates through a defined mapping transformation relationship, containing millimeter-level precision X-axis and Y-axis physical coordinates and the corresponding frame's acquisition timestamp. Then, the construction period for the trajectory sequence is set. Considering the timeliness of mouse activity and data processing efficiency, 30 consecutive frames are selected as the basic data volume for a set of trajectory sequences. The mouse's physical position information from these 30 frames is arranged sequentially according to the acquisition time. Each position information is associated with the corresponding frame number and acquisition timestamp to obtain a mouse motion trajectory sequence containing both temporal and spatial dimensions. This ensures that subsequent analysis of the mouse's movement state can be based on changes in position within the sequence, avoiding biases in motion trend judgment caused by isolated single-frame position data. The Kalman filter algorithm was used to smooth and denoise the motion trajectory sequence, resulting in an optimized mouse motion trajectory. Specifically, this involved: first, initializing the core parameters of the Kalman filter algorithm, including state variables, state transition matrix, observation matrix, process noise covariance, and observation noise covariance. The state variables were set as the mouse's physical coordinates and movement speed; the state transition matrix was set based on the continuous characteristics of mouse movement, assuming that the mouse's movement speed changed gradually over a short period; the observation matrix was matched to the acquisition accuracy of the physical position information; the process noise covariance and observation noise covariance were set with reference to the position fluctuation range caused by image noise in previous preliminary experiments. To ensure reasonable noise weighting, the constructed motion trajectory sequence is input into the Kalman filter algorithm frame by frame: First, based on the optimized position of the previous frame and the set state transition matrix, the theoretical physical position of the mouse in the current frame is predicted; then, the actual physical position collected in the current frame is used as the observation value and compared with the theoretically predicted position. The prediction deviation is corrected by the algorithm's built-in update rules to obtain the optimized physical position of the current frame; the entire trajectory sequence is iteratively processed frame by frame in this process to eliminate position data jumps caused by image noise, slight fluctuations in light, or temporary occlusion by mouse fur, and finally outputs a continuous, smooth, and optimized motion trajectory that is consistent with the actual movement trend of the mouse.

[0028] Based on the optimized mouse movement trajectory, the displacement of the mouse between adjacent frames is calculated. Specifically, this includes: extracting the optimized physical positions of the mouse in adjacent frames sequentially based on the optimized movement trajectory. Assuming the positions in frame n are Xn and Yn, and the positions in frame (n+1) are Xn+1 and Yn+1, according to the logic for calculating the distance between two points in space, the linear distance the mouse moves in physical space between the two frames is calculated by comparing the difference between the X-axis coordinates and the difference between the Y-axis coordinates. This distance is the displacement of the mouse between adjacent frames. During the calculation process, adjacent frames are simultaneously recorded. The acquisition time difference between two frames is fixed at 30 frames per second, and the time difference between adjacent frames is fixed at 1 / 30 of a second, approximately 0.033 seconds. This ensures a clear correspondence between displacement and time. At the same time, an abnormal displacement detection mechanism is set up. If the displacement of a certain group of adjacent frames far exceeds the normal activity range of the mouse, such as a single displacement exceeding 20 millimeters, this value is based on the pre-experimental data of the mouse's daily activity range. It is then judged as abnormal data, and the displacement of the frame is automatically recalculated using the average of the optimized positions of the three frames before and after, to avoid displacement errors caused by extreme interference.

[0029] Based on the displacement and video frame rate, the instantaneous movement speed of the mouse is calculated, and preset displacement and speed thresholds are provided to the state determination module as judgment criteria. Specifically, the displacement of adjacent frames is divided by the corresponding time difference, which is 1 / 30 second, to obtain the instantaneous movement speed of the mouse in that time interval. The speed unit is uniformly set to millimeters per second. To address the research needs of mouse activity states in biomedical experiments, this study references the minimum range of movement when mice are awake and the maximum range of displacement when they are at rest, using preset displacement and velocity thresholds. The displacement threshold is set to 1 to 3 millimeters; when the displacement between adjacent frames falls within this range, the mouse's activity is minimal, approaching stillness. The velocity threshold is set to 5 millimeters per second; when the instantaneous velocity is below this value, the mouse's movement is slow, consistent with the behavior of about to enter sleep. These two thresholds are stored in the parameter library of the state determination module and set as fixed calls, ensuring that every mouse movement state determination is based on this unified and objective benchmark. This avoids misjudgments caused by the lack of clear determination criteria in traditional rotary lever systems. Furthermore, it supports fine-tuning the thresholds based on the activity differences between different mouse strains, such as the different activity ranges between adult and aged mice, improving system adaptability.

[0030] In this embodiment of the invention, because the preferred embodiment uses a technique of combining multiple consecutive frames of mouse physical position information into a motion trajectory sequence, smoothing and denoising the trajectory sequence using a Kalman filter algorithm, calculating the displacement of adjacent frames based on the optimized trajectory, and obtaining the instantaneous motion speed by combining the video frame rate, and providing preset displacement and speed thresholds as judgment criteria, it effectively overcomes the technical problems of traditional sleep deprivation systems that rely solely on single-frame position data to calculate motion parameters, are easily affected by image noise leading to large displacement and speed errors, and lack clear judgment criteria, resulting in subjective ambiguity in judging the mouse's motion state. This allows for the acquisition of smooth, continuous, accurate, and reliable mouse motion trajectories and motion parameters, providing the state judgment module with an objective and unified judgment basis, improving the accuracy of mouse movement and stillness recognition, avoiding false movements or missed judgments, providing high-quality data support for precise closed-loop sleep deprivation control based on behavioral feedback, reducing unnecessary disturbances or incomplete deprivation caused by state misjudgment, and ensuring the stability and reliability of experimental data.

[0031] In a preferred embodiment of the present invention, the displacement and movement speed are compared with displacement thresholds and speed thresholds, respectively. When the displacement is less than the displacement threshold and the movement speed is less than the speed threshold for multiple consecutive frames, the mouse is determined to have entered a stationary state, including: The displacement is compared with a preset displacement threshold, and the instantaneous motion velocity is compared with a preset velocity threshold to obtain the comparison result. Specifically, this includes: first, obtaining the mouse displacement of the current adjacent frame, obtaining the corresponding instantaneous motion velocity of the mouse, and simultaneously retrieving the preset displacement threshold and velocity threshold, where the displacement threshold is set to 1 to 3 mm and the velocity threshold is set to 5 mm / s. Then, a synchronous comparison mechanism is activated to compare the current displacement with the preset displacement threshold to determine if the displacement is less than the threshold; at the same time, the current instantaneous motion velocity is compared with the preset velocity threshold to determine if the motion velocity is less than the velocity threshold. During the comparison process, it is ensured that the two comparison operations are completed synchronously to avoid the time difference caused by the sequential comparison affecting the judgment result. After the comparison of each frame of data is completed, the single comparison result is recorded immediately, clearly indicating whether the current frame simultaneously meets the two conditions of displacement less than the threshold and motion velocity less than the threshold, providing basic data for continuous frame judgment.

[0032] Based on the comparison results, when multiple consecutive frames show displacement values ​​less than the displacement threshold and instantaneous movement speeds less than the speed threshold, the mouse is determined to be in a stationary state. Specifically, this involves: first, setting the number of consecutive frames; combining this with the camera's 30 frames per second acquisition rate; and then, to filter out single-frame position fluctuations caused by fur tremors or slight breathing, setting the number of consecutive frames to 3. A consecutive frame counting mechanism is established. Starting from the current frame, the comparison results from step 3.1 are retrieved frame by frame. If a frame simultaneously satisfies both displacement and movement speed thresholds, the consecutive frame count is incremented by 1. If a frame does not meet either condition, the consecutive frame count is immediately reset to 0, and the counting restarts. When the consecutive frame count reaches the preset 3 frames, the system automatically determines that the mouse is currently in a stationary state. If the consecutive frame count does not reach 3 frames, the current state remains non-stationary, and the same comparison and counting process is performed on the next frame, ensuring that the stationary state determination is not affected by instantaneous interference and only identifies the mouse's true stable stationary behavior.

[0033] Based on the mouse entering a stationary state, a stationary state timer is started to record the duration of the mouse's stationary state. Specifically, the timer is started immediately upon determining that the mouse has entered a stationary state. The timer starts counting in seconds and automatically updates the recorded stationary duration every second. At the same time, a timer linkage mechanism is established to compare the results of subsequent frames in real time: if the displacement and movement speed are both less than the threshold in subsequent frames, the timer continues to accumulate the count; if the comparison result of a certain frame shows that the above conditions are not met, the timer immediately stops counting, the recorded stationary duration is cleared to zero, and the system waits for the next stationary state determination signal to restart the timer. During the counting process, the system stores the stationary duration data at each moment in real time, providing accurate time basis for subsequent judgments on whether the mouse has reached the disturbance trigger condition of continuous stationary state for 15 seconds, avoiding the problem of disturbance being too early or too late due to inaccurate recording of stationary duration.

[0034] In this embodiment of the invention, because the preferred embodiment uses a technique of comparing the mouse displacement with a preset displacement threshold and the instantaneous movement speed with a preset speed threshold to obtain comparison results, and only when multiple consecutive frames are detected that the displacement is less than the displacement threshold and the instantaneous movement speed is less than the speed threshold, is the mouse determined to be in a stationary state. After the determination, a stationary state timer is started to record the duration of the mouse's stationary state. Therefore, this technique effectively overcomes the technical problems of traditional rotating rod sleep deprivation systems, which lack a mechanism for real-time multi-dimensional continuous determination of the stationary state, are prone to misjudging stationary state due to fluctuations in single-frame data, and thus lead to the application of unnecessary mechanical stimulation to awake mice or the missed intervention opportunity for mice that fall asleep early, and cannot accurately track the duration of stationary state. This technique can accurately filter out single-frame misjudgment interference, identify the mouse's true stationary state, and at the same time, clarify the duration of stationary state through a timer, providing an accurate time basis for subsequent judgment of whether sleep deprivation disturbance is triggered. This reduces unnecessary stimulation to awake mice to reduce stress response and avoids the situation where mice fall asleep early and are not intervened in time, ensuring the accuracy of sleep deprivation and providing support for the stability and reliability of experimental data.

[0035] In a preferred embodiment of the present invention, based on the mouse's still state, when the duration of the mouse's still state exceeds a preset stillness time threshold, a disturbance trigger signal is obtained, including: Based on the duration of the mouse's resting state, the duration of the resting state is compared with a preset resting time threshold. Specifically, the resting time threshold is first set by combining the pre-experimental data on mouse sleep behavior in biomedical experiments. Referring to the typical resting time before the mouse enters light sleep, the preset resting time threshold is set to 15 seconds. This threshold avoids accidental triggering of disturbance due to short pauses in the mouse, and can also capture the resting state of the mouse that is about to enter sleep in time, solving the problem that the traditional rotating rod system cannot intervene in time at a fixed interval of 15 minutes. Subsequently, a real-time data association mechanism is activated. Every second, the system retrieves the current cumulative duration of mouse stillness from the stillness timer to ensure that the acquired time data is completely synchronized with the actual stillness duration, without delay or deviation. Then, a time comparison program is started to compare the real-time retrieved stillness duration with a preset 15-second stillness time threshold every second. If the current stillness duration is less than 15 seconds, the comparison continues, and the data retrieval and comparison operation is repeated every second. If an anomaly occurs in the timer data during the comparison process, the system immediately pauses the comparison and issues a prompt signal, while retaining the stillness time record before the anomaly. Data retrieval and comparison are resumed after the fault is resolved, ensuring the continuity and accuracy of the entire comparison process and avoiding misjudgments or omissions due to data problems.

[0036] When the duration of the static state exceeds the static time threshold, a disturbance trigger signal is obtained and sent to the drive module to trigger the motor disturbance operation. Specifically, when the time comparison program detects that the duration of the mouse's static state exceeds a preset threshold of 15 seconds, the system immediately generates a disturbance trigger signal. This signal is a low-voltage electrical signal, and its strength and frequency are calibrated to ensure that it can be stably recognized by the drive module and will not interfere with other devices. Subsequently, the system transmits the disturbance trigger signal to the drive module in real time through the communication interface on the main control circuit board. During the transmission process, an anti-interference encoding method is used to avoid signal attenuation or distortion due to electromagnetic interference in the transmission path, ensuring that the drive module can accurately receive the trigger command. Upon receiving the disturbance trigger signal, the drive module immediately activates its internal motor control program. Based on preset low-stress disturbance parameters, it controls a silent stepper motor or servo motor to start running. The motor drives the movable base plate to perform a small lateral reciprocating motion along the guide rail via a transmission mechanism. The amplitude and frequency of this motion have been verified through pre-experiments to effectively wake mice and prevent them from entering deep sleep without triggering a stress response due to excessive movement. After starting the motor, the drive module sends a confirmation signal to the main control system indicating that the disturbance has been executed. Upon receiving the confirmation signal, the main control system records the trigger time and duration of the disturbance, providing a basis for experimental data traceability and analysis. The entire process avoids the problems of excessive disturbance when mice are awake or delayed disturbance when they are asleep, which are common with traditional rotary rod systems, achieving precise and low-stress sleep deprivation intervention.

[0037] In this embodiment of the invention, because this preferred embodiment uses a technique based on the recorded duration of the mouse's still state, comparing this duration with a preset still time threshold in real time, and generating a disturbance trigger signal when the still duration exceeds the threshold, and sending it to the drive module to trigger the motor disturbance operation, it effectively overcomes the technical problem that traditional rotary rod sleep deprivation systems only trigger disturbances according to a fixed time program, and cannot determine whether intervention is needed based on the actual still duration of the mouse. This leads to the mouse being activated by excessive stimulation when awake, and experiencing sleep fragments when falling asleep early due to lack of timely intervention, thus failing to achieve precise sleep deprivation. Therefore, it can trigger disturbances only when the mouse's still duration reaches the preset threshold, which avoids unnecessary interference to awake mice to reduce stress response, and can promptly prevent the mouse from forming effective sleep fragments, ensuring the accuracy of sleep deprivation, reducing fluctuations in the expression data of synaptic-related proteins in the mouse hippocampus during the experiment, and allowing the experimental results to more accurately reflect the true impact of sleep deprivation on synaptic plasticity.

[0038] like Figure 2 As shown, in another preferred embodiment of the present invention, according to the disturbance trigger signal, the drive motor is controlled to drive the movable base plate to perform a small-amplitude lateral reciprocating motion along the guide rail to apply a non-invasive disturbance to the mouse, including: The system receives a disturbance trigger signal from the trigger module and acquires preset disturbance parameters, including movement amplitude and movement frequency. Specifically, the drive module receives the disturbance trigger signal sent by the trigger module in real time through a dedicated signal transmission line between itself and the trigger module, ensuring that the signal transmission is delay-free and unaffected by electromagnetic interference. While receiving the signal, the drive module automatically retrieves the disturbance parameters pre-stored in the system parameter library. These parameters are set based on the results of previous mouse sleep deprivation pre-experiments. The movement amplitude is set to 0.5 to 5 mm. This range has been verified to allow mice to adjust their posture through slight displacement to disrupt sleep without causing stress due to excessive amplitude. The movement frequency is set to 0.1 to 1 Hz. This frequency can prevent mice from becoming fatigued due to excessive movement while ensuring a wake-up effect. After retrieving the parameters, the drive module performs a completeness check on the parameters to confirm that the values ​​of motion amplitude and motion frequency are within the preset reasonable range. If any abnormality is found in the parameters, such as values ​​exceeding the range or missing, a parameter abnormality prompt signal is immediately sent to the main control system. After the staff has investigated and repaired the problem, the subsequent steps can be continued to ensure that the disturbance parameters meet the requirements of low stress and high precision deprivation.

[0039] Based on the disturbance trigger signal and preset disturbance parameters, corresponding motor control commands are obtained to control the silent stepper motor or servo motor to start operation. Specifically, after confirming that a valid disturbance trigger signal has been received and that legal disturbance parameters have been obtained, the drive module activates its internal command generation unit. The command generation unit calculates the rotation angle and step distance of the silent stepper motor or servo motor according to the preset motion amplitude. For example, when the motion amplitude is set to 2 mm, the specific number of revolutions the motor needs to rotate and the rotation angle per step can be calculated by combining the reduction ratio of the transmission mechanism and the lead screw. At the same time, the motor rotation speed is calculated according to the preset motion frequency. For example, when the motion frequency is 0.5 Hz, the number of times the motor rotates per minute can be calculated. Subsequently, the command generation unit converts these calculation results into digital control commands that the motor can recognize. The commands contain details such as the motor start-up sequence, rotation direction switching nodes, and rotation speed holding duration. After generating the instruction, the drive module pre-verifies the instruction, simulates the motor's movement process of executing the instruction, and confirms that the movement amplitude and frequency corresponding to the instruction meet the preset parameter requirements. After the verification is passed, the drive module sends a start-up command to the silent stepper motor or servo motor, and at the same time activates the motor operation status monitoring function to track whether the motor starts normally in real time.

[0040] The operation of the motor drives the transmission mechanism to move the movable base plate in a slight lateral reciprocating motion along the guide rails. Specifically, after receiving a start command, the silent stepper motor or servo motor starts running according to the set rotation direction, speed, and angle. The motor output shaft is connected to the transmission mechanism via a coupling, preferably using a ball screw transmission device, which can balance transmission accuracy and running stability. The rotational motion of the motor can be converted into linear motion by the ball screw. The moving end of the transmission mechanism is fixedly connected to the movable base plate, which is supported by two parallel guide rails. Linear bearings are installed between the guide rails and the base plate. To reduce motion friction and operating noise, the movable base plate moves laterally back and forth along the guide rail under the drive of the motor. When the base plate moves to the preset left limit position, the limit sensor on the left side of the guide rail sends a position signal to the drive module. The drive module immediately controls the motor to reverse, causing the base plate to move to the right. When the base plate moves to the right limit position, the right limit sensor also sends a position signal, and the drive module controls the motor to reverse again, thus achieving continuous left and right reciprocating motion. Throughout the entire motion, the displacement of the base plate is strictly controlled within the preset range of motion to avoid mechanical failure or discomfort to the mice caused by overtravel.

[0041] The slight reciprocating movement of a movable base plate creates a non-invasive physical disturbance to the mice in the cage, disrupting their sleep state. Specifically, when the movable base plate makes slight lateral reciprocating movements on the guide rail, the mice placed in the cage above the base plate will perceive subtle changes in the support surface due to the slight displacement of the base plate, and will then naturally adjust their body posture to maintain balance. This posture adjustment does not require the mice to engage in continuous running or jumping or other forced movements, and is a non-invasive intervention. This differs from traditional rotating rod systems that directly touch the mice with the rod. The slight disturbance can interrupt the mice's impending sleep state or terminate their sleep. The pre-formed short sleep segments can solve the problem of traditional systems being unable to intervene in time between two preset intervals, and will not activate the hypothalamus, pituitary and adrenal axis of mice, thereby avoiding a significant increase in the stress hormone cortisol. During the perturbation process, the camera continuously monitors the mouse's status. If it finds that the mouse has resumed awake activity, that is, the motion recognition algorithm detects that the mouse's displacement or speed exceeds the threshold, the drive module will receive a pause signal sent by the main control system and stop the movement of the base plate in advance, further reducing unnecessary interference and ensuring that perturbation is only applied when the mouse needs to be awakened, thus achieving precise and low-stress sleep deprivation.

[0042] In this embodiment of the invention, the preferred embodiment uses a technique of receiving a disturbance trigger signal from a trigger module to obtain preset disturbance parameters such as the amplitude and frequency of movement. Based on the trigger signal and disturbance parameters, a corresponding motor control command is generated to control a silent stepper motor or servo motor to start and run. Then, through a transmission mechanism, a movable base plate is driven to perform a small-amplitude lateral reciprocating motion along the guide rail, thereby applying non-invasive physical disturbance to the mice in the cage. This effectively overcomes the technical problems of traditional rotating rod sleep deprivation systems, which rely on fixed program trigger rod mechanical contact, have highly invasive disturbance methods and uncontrollable parameters, and are prone to causing unnecessary mechanical stimulation to awake mice and activating their stress response. At the same time, the deprivation effect may be unstable due to improper contact intensity. This method can accurately disrupt the sleep state of mice with a non-invasive, parameter-controllable small-amplitude movement, avoiding the strong stress caused by direct mechanical contact and reducing environmental interference through silent motors and small-amplitude movements. This ensures the gentleness and stability of the sleep deprivation process, reduces the fluctuation of synaptic-related protein expression data in the hippocampus of mice in the experiment, and allows the experimental results to more accurately reflect the real impact of sleep deprivation on synaptic plasticity.

[0043] In a preferred embodiment of the present invention, after the non-intrusive perturbation is completed, a cooling timer is started to enter the cooling phase, and all perturbation triggering is paused within a preset cooling time window; when the cooling time window ends, the cooling phase is automatically exited, including: After the non-invasive perturbation is completed, the cooling timer is started immediately. During the timing of the cooling timer, the behavior of the mouse is continuously monitored, but the generation and transmission of all perturbation trigger signals are suspended. Specifically, after the drive module controls the movable base plate to complete one non-invasive perturbation, the drive module immediately sends a perturbation completion signal to the main control system. After receiving the signal, the main control system automatically starts the cooling timer. The cooling timer counts in real time in seconds and displays the remaining cooling time on the control panel, so that staff can check the progress in real time. During the cooling timer's timing, the camera maintains a video acquisition frequency of 30 frames per second, continuously acquiring video data of the mouse's behavior. The motion recognition algorithm also performs grayscale conversion, background modeling, foreground extraction, centroid calculation, and other processes normally, analyzing the mouse's displacement and movement speed in real time to determine whether the mouse is currently stationary. However, at this time, the main control system will pause the function of the trigger module in generating disturbance trigger signals and cut off the signal transmission path from the trigger module to the drive module. Even if the motion recognition algorithm determines that the mouse has been stationary for more than a preset threshold, no disturbance trigger signal will be generated, and no signal will be sent to the drive module. This design ensures continuous tracking of the mouse's behavioral state, avoids missing the signal of the mouse falling asleep again due to the cessation of monitoring, and also prevents the application of unnecessary disturbances during the short awakening period of the mouse, reducing the superposition of stress responses.

[0044] When the cooling timer reaches the preset cooling time window, it automatically stops and re-enables the perturbation trigger function. Specifically, based on previous low-stress experimental data, the preset cooling time window is set to 5 seconds. This duration has been verified to provide newly awakened mice with a brief wake-up buffer time, avoiding excessive stress caused by continuous perturbation, while also preventing mice from re-entering a sleep state and forming sleep fragments due to excessively long cooling times. When the cooling timer reaches 5 seconds, it automatically stops counting and sends a cooling end signal to the main control system. Upon receiving this signal, the main control system immediately removes the functional restrictions on the trigger module, re-enables the trigger module's function of generating perturbation trigger signals, and restores the signal transmission path between the trigger module and the drive module. Subsequently, the main control system sends a status update command to the control panel. The cooling status indicator light on the control panel changes from red to green, indicating to the staff that the system has exited the cooling phase and returned to the normal sleep deprivation monitoring-triggering state. At this time, the analysis results of the mouse's behavior state by the motion recognition algorithm will be used as the basis for disturbance triggering again. If the mouse's stillness time exceeds the preset threshold, the triggering module will generate a disturbance trigger signal and send it to the drive module. The drive module will then control the movement of the base plate according to the preset parameters to continue to perform precise sleep deprivation operations, ensuring that the sleep deprivation process is free of unnecessary disturbances and can prevent the mouse from falling asleep in time, maintaining stable deprivation efficiency.

[0045] In this embodiment of the invention, because the preferred embodiment adopts a technical means of starting a cooling timer immediately after the non-invasive perturbation is completed, continuously monitoring the mouse's behavior during the timing process but pausing the generation and transmission of all perturbation trigger signals, and automatically stopping the timing and re-enabling the perturbation trigger function when the timing reaches the preset cooling time window, it effectively overcomes the technical problems of traditional rotary rod sleep deprivation systems lacking a cooling mechanism after perturbation. These systems are prone to triggering the next perturbation according to a fixed program when the mouse is just awakened and in a brief state of wakefulness, resulting in excessive stress caused by continuous and redundant stimulation, or reducing the deprivation efficiency due to the lack of buffer time for the mouse to gradually adapt to the perturbation rhythm. Therefore, it can provide a brief wakefulness buffer time for the mouse that has just been awakened, avoiding the superposition of stress responses caused by excessive mechanical stimulation, and can ensure that the signal for the mouse to re-enter a sleep state is not missed through continuous monitoring. After the cooling time ends, the perturbation trigger function is restored in time to maintain a stable sleep deprivation efficiency, while reducing the mouse's adaptability to perturbation and ensuring the stability of experimental data and the accuracy of sleep deprivation.

[0046] In a preferred embodiment of the present invention, after the cooling phase ends, new behavioral video data continues to be collected to obtain a closed-loop sleep deprivation process for continuous behavioral monitoring and disturbance control, including: The system receives a trigger signal indicating the end of the cooling phase and re-acquires new behavioral video data based on this signal. Real-time acquisition of mouse behavioral video data resumes, specifically by receiving the signal immediately after the cooling timer reaches the preset cooling time window and sends a cooling end trigger signal. Upon receiving the signal, the camera module resumes real-time acquisition of mouse behavioral video data at a frequency of 30 frames per second, while maintaining stable operation of infrared or visible light supplementary lighting to ensure constant illumination inside the cage and prevent light variations from affecting video image clarity. During acquisition, the camera continuously covers the entire cage area, ensuring complete capture of mouse activity at any location within the cage. Each acquired video frame is transmitted in real-time to the main control system's image processing unit, providing continuous and complete raw data support for motion state analysis and preventing omissions in mouse behavioral state monitoring due to acquisition interruptions.

[0047] The newly acquired behavioral video data is input into the automatic motion recognition algorithm. Based on the new input data, the detection and analysis of the mouse's movement state are restarted. Specifically, the main control system's image processing unit receives the newly acquired behavioral video data and inputs each frame of video data sequentially into the automatic motion recognition algorithm. The automatic motion recognition algorithm performs grayscale conversion on the video frames, converting color frames into 8-bit grayscale images to reduce computation and eliminate color interference. Then, it calls the previously established dynamic background model and performs a difference operation between the current frame and the background model to extract the foreground region containing the mouse's outline. Next, it removes small noise points in the foreground region through morphological opening operations and fills the holes in the mouse's outline through closing operations to improve the mouse's outline morphology. At the same time, the automatic motion recognition algorithm calls the determined mapping transformation relationship from the image coordinate system to the cage's physical coordinate system to convert the image coordinates of the mouse's foreground region into physical coordinates with millimeter-level precision, providing spatial location basis for accurate analysis of the movement state.

[0048] Based on the detection and analysis of mouse motion state data, the complete processing flow from motion trajectory extraction to state determination is restarted. Specifically, this includes: based on the mouse physical coordinate data obtained by the automatic motion recognition algorithm, the system restarts the motion trajectory extraction process: combining the mouse physical coordinates of 10 consecutive frames in the order of acquisition time to obtain the mouse's motion trajectory sequence; then, using the Kalman filter algorithm to smooth and denoise the motion trajectory sequence, eliminating coordinate fluctuations caused by image noise or slight mouse shaking, resulting in an optimized motion trajectory. Based on the optimized trajectory, the system calculates the mouse's displacement between two adjacent frames and calculates the mouse's instantaneous motion velocity by combining the time interval between the two frames. The system compares the calculated displacement with a preset displacement threshold of 1 to 3 mm, and simultaneously compares the instantaneous motion velocity with a preset velocity threshold of 5 mm per second. By comparing the results of multiple consecutive frames, the system determines whether the mouse is in a stable motion or static state, completely replicating the entire process from motion trajectory extraction to velocity calculation and preliminary state determination.

[0049] By cyclically executing the entire process of acquisition, analysis, judgment, triggering, perturbation, and cooling, and based on continuously updated behavioral data, long-term adaptive closed-loop sleep deprivation control is achieved. Specifically, after the initial judgment of the mouse's movement state is completed, the system enters the cyclic execution process: if the mouse is determined to be in a moving state, it continuously returns to the video acquisition stage to continue monitoring changes in the mouse's behavior; if the mouse is determined to have displacement and velocity less than a displacement threshold for multiple consecutive frames, a static state timer is started. When the static duration exceeds a preset threshold of 15 seconds, the trigger module generates a perturbation trigger signal and sends it to the drive module. The drive module controls the movable base plate to perform a small-amplitude lateral reciprocating movement along the guide rail to apply a non-invasive perturbation; the perturbation is completed. Afterward, the system automatically starts a cooling timer to enter the cooling phase. After the cooling time window ends, it returns to restart video acquisition and analysis. This cycle repeats, executing the entire process of acquisition-analysis-judgment-trigger-perturbation-cooling. In the 48-hour sleep deprivation experiment, the intervention timing is dynamically adjusted based on the real-time updated behavioral data of the mice, without relying on a fixed time program. The system records the video frame information, mouse movement status data, perturbation trigger time, and cooling phase duration of each acquisition in real time, obtaining complete experimental data records. This ensures the accuracy and traceability of sleep deprivation during long-term experiments, avoids stress responses caused by mice adapting to fixed stimuli or unnecessary perturbations, and reduces fluctuations in hippocampal synapse-related protein expression data.

[0050] In this embodiment of the invention, because the preferred embodiment adopts the method of immediately resuming real-time acquisition of mouse behavior video after the cooling phase ends and receiving the cooling end trigger signal, the newly acquired video data is input into the automatic motion recognition algorithm to restart the detection and analysis of mouse movement status, and the complete processing flow from motion trajectory extraction to state determination is restarted synchronously. By cyclically executing the entire process of acquisition, analysis, determination, triggering, perturbation and cooling, and realizing long-term adaptive closed-loop based on continuously updated behavioral data, it effectively overcomes the technical problems of traditional rotating rod sleep deprivation systems that rely only on fixed time programs, lack continuous adaptive closed-loop control based on real-time behavioral data, cannot dynamically match changes in mouse behavior rhythm in long-term experiments, and are prone to decreased deprivation efficiency in the later stages, excessive stimulation to awake mice or missed intervention for mice that fall asleep early, ultimately leading to fluctuations in experimental data. Therefore, it can continuously track the real-time behavioral status of mice during long-term sleep deprivation, dynamically adjust the timing and frequency of intervention, and always maintain a precise and low-stress deprivation effect, avoiding data deviation caused by mice adapting to fixed stimuli or long-term stress, ensuring the stability and reliability of experimental data such as hippocampal synapse-related protein expression, and meeting the needs of biomedical research for long-term, high-precision sleep deprivation models.

[0051] In the embodiments provided by this invention, the system includes multiple cage modules, and the control module further includes a cooperative scheduling unit for allocating computing resources to the multiple cage modules and staggering their disturbance trigger times to achieve multi-cage parallel cooperative control, including: After the collaborative scheduling unit starts, it automatically scans and identifies the number of cage modules already connected to the system. Simultaneously, it acquires the behavioral video data parameters output by the cameras of each cage module, including video resolution, frame rate, and data volume per frame. The collaborative scheduling unit performs real-time evaluation of the main control system's computing resources, calculating the current CPU core utilization, GPU graphics processing power, and remaining memory capacity to determine the total resource scale available for image processing. Based on the number of cages and the video data volume of each cage, the collaborative scheduling unit allocates an independent image processing thread to each cage module. The number of threads matches the number of cages, and each thread occupies a specific amount of computing resources. The computational resource allocation is dynamically adjusted based on the amount of video data in the corresponding cage. For example, the computational resource allocation for cages acquiring 1080P resolution video is higher than that for cages acquiring 720P resolution video. During image processing, the collaborative scheduling unit continuously monitors the resource usage of each thread. If the image processing thread of a certain cage experiences insufficient resources, leading to data accumulation, some computational resources are immediately allocated from threads with redundant resources to supplement the data. This ensures that the behavioral video data of all cages can be processed in parallel and in real time, avoiding video analysis delays caused by uneven resource allocation and ensuring the timeliness and accuracy of the determination of the movement status of mice in each cage.

[0052] The collaborative scheduling unit first reads the preset perturbation strategy parameters. These parameters are set based on experimental requirements and include the time interval range for perturbation triggering of each cage, typically set to 1 to 2 seconds. The collaborative scheduling unit establishes a cage perturbation time record table, recording in real time the last perturbation trigger time of each cage module and whether it is currently in the cooling phase. When the state determination unit of a cage module outputs a signal that a perturbation needs to be triggered, the collaborative scheduling unit immediately queries the perturbation time record table to check whether other cage modules are in a perturbation execution state or about to trigger a perturbation. If other cages are in a perturbation execution state, the collaborative scheduling unit... According to a preset time interval, the perturbation trigger time of the current cage is delayed to 1 to 2 seconds after the perturbation of the previous cage ends. If there is no simultaneous perturbation, the current cage is allowed to trigger perturbation immediately, and the latest perturbation time of the cage is updated in the perturbation time record table. In this way, the perturbation trigger times of all cages are staggered, which avoids the competition for power resources and mechanical control resources caused by the simultaneous start of multiple drive modules, and also prevents the superposition of interference such as vibration and noise caused by simultaneous perturbation of multiple cages, reduces the additional stress stimulation on the mice in each cage, and ensures the stability of multi-cage parallel experimental data.

[0053] The collaborative scheduling unit has a parameter configuration module set up in the main control system's operation interface. This module includes a unified parameter setting area and an independent parameter setting area. In unified parameter setting mode, operators can select the cage modules that need to be configured in batches, and then input experimental parameters such as displacement threshold, velocity threshold, rest time threshold, cooling time window, and disturbance parameters. After clicking confirm, the collaborative scheduling unit synchronously sends these parameters to all selected cage modules, ensuring that these cages use consistent experimental conditions. This is suitable for batch experiments requiring controlled variables. In independent operation mode, operators can select a specific cage module individually in the interface and enter... The cage has an independent parameter configuration interface, allowing individual adjustment of various experimental parameters. For example, the displacement threshold can be adjusted to 2 to 4 mm for cages used for aged mice, while maintaining a displacement threshold of 1 to 3 mm for cages used for adult mice. After adjustment, only the parameter configuration of that cage is updated, without affecting the operating parameters of other cages. The collaborative scheduling unit automatically saves the parameter configuration file of each cage, supporting parameter backup and recovery. Furthermore, during the parallel operation of multiple cages, staff can switch between unified mode and independent mode at any time, which can both achieve batch management to improve operational efficiency and meet the personalized parameter requirements of different cages due to differences in mouse strains and experimental stages.

[0054] In the embodiments provided by the present invention, the main body of the present invention is a mouse cage-type sleep deprivation device, the structure of which mainly includes: a cage module, a moving plate, a guide rail sliding mechanism, a drive motor assembly, a control system and a monitoring interface module.

[0055] The cage module is a standard mouse breeding cage. A movable plate is fixedly installed at the bottom of the cage. The bottom plate supports the cage and enables lateral reciprocating movement. The movable bottom plate is supported by two parallel guide rails, which are fixed to the cage. A linear bearing is installed between the guide rails and the cage to ensure smooth movement of the deprivation rod with low friction and low noise.

[0056] A silent motor is installed on one side of the guide rail. The motor output shaft is connected to the wave rod via an eccentric wheel structure or a ball screw transmission device, which drives the wave rod to move back and forth along the guide rail. The motor is fixed next to the cage, and the transmission rod passes through the limiting groove and connects to the cage. The limiting groove is used to limit the range of motion of the descrambling rod and prevent it from overstepping its bounds.

[0057] The motor's operating parameters are controlled by the main control circuit board, which is installed inside the base. The circuit board houses a microprocessor unit, power module, drive module, and communication interface module. The main control board adjusts the motor speed and movement frequency through programmed control logic, enabling periodic or random lateral movement of the base plate. The control system supports manual, timed, and automatic operating modes. To prevent excessive motor load or position loss during movement, limit switches are installed at both ends of the base. When the base plate reaches its limit position, movement automatically stops, and the limit switch signal is transmitted back to the control system for closed-loop safety control.

[0058] When the device is running, the control system starts the motor according to the set program, which drives the deprivation lever to move laterally left and right along the guide rail. The slight movement of the base plate causes the mice in the cage to adjust their posture, thereby achieving sleep deprivation. When the movement stops or enters an interval phase, the mice can return to a resting state. By adjusting the movement frequency, amplitude, and interval time by the control system, different degrees of sleep deprivation experiments can be flexibly implemented.

[0059] Monitoring and positioning anchor point and motion recognition system: Anchor point layout and calibration method: Several visual anchor points are fixed on the bottom plate or four corners of the cage, preferably ArUco or AprilTag two-dimensional markers. The anchor point ID and pixel coordinates are identified in real time by the camera, and the affine transformation matrix from pixel to physical coordinates is calculated to achieve millimeter-level position calibration. When the system starts, it automatically detects the anchor point coordinates and performs a self-calibration process. When the reprojection error is >1mm, it prompts for recalibration.

[0060] Automatic motion recognition algorithm: The camera captures a 30fps video stream in real time, and constant illumination is maintained through infrared or visible light supplementation; the image processing flow includes grayscale conversion, background modeling, foreground extraction, connected component analysis, and centroid extraction; the mouse's centroid coordinates are mapped to physical coordinates (X,Y) using a calibration matrix, and the displacement ΔS of consecutive frames is calculated; if ΔS > threshold or velocity V > 5mm / s, it is determined to be moving, otherwise it is considered stationary; Kalman filtering is introduced to smooth noise and avoid false motion detection; the system triggers a disturbance after continuous stationary states exceed Tstatic, and multi-frame filtering and fault tolerance are implemented: sleep is only recognized after N consecutive frames of stationary states; the previous state prediction is maintained during occlusion; Supports single-cage single-mouse or multi-mouse recognition modes. The system's control logic and operation flow are as follows: The behavior recognition module continuously monitors the mouse's activity status; when the mouse is determined to be stationary for more than a set time T_static, the closed-loop control module triggers a motor disturbance; the disturbance amplitude is 0.5–5mm, and the frequency is 0.1–1Hz; after the disturbance ends, the system enters a cooling window Tcool to avoid continuous stimulation; the system re-enters the monitoring state and executes the cycle. Three operating modes are available: Timed mode: disturbance is performed at a fixed period; Closed-loop mode: automatic triggering based on the movement status; Randomized mode: disturbance is based on a pseudo-random algorithm to prevent animal adaptation. This device achieves non-invasive awakening through mechanical motion stimulation, without direct contact with the animal or the application of strong physical stimulation. The deprivation process is controllable, highly repeatable, and has a low stress level.

[0061] like Figure 3 As shown in the image above, the parts are named as follows: 1. Control panel 2. Motor 3. Movable base plate 4. Cage 5. Guide rail 6. Limit sensor 7. Camera module 8. Anchor point label location diagram; The control panel is the core control unit of the system, integrating the main control circuit, program control module, motor drive interface, and data communication port. The control panel allows for the setting and switching of various preemptive modes and precise control of disturbance frequency, amplitude, and runtime.

[0062] The motor drives the movable base plate to make small reciprocating movements along the guide rail. The motor is a silent stepper or servo motor, which, together with the transmission rod or lead screw structure, can produce smooth and controllable disturbances, avoiding strong vibrations that could cause stress to the experimental animals.

[0063] A movable base plate is installed under the cage to support the cage and allow for lateral sliding. The base plate moves in conjunction with the guide rail, and its displacement amplitude and speed are controlled by the control panel to achieve non-invasive, gentle disturbance to wake the mouse.

[0064] Cage; used to house laboratory mice, employing a standard mouse housing cage structure, with the bottom and movable base plate slidably connected via guide rails to ensure stable and safe movement. The cage can be quickly disassembled for easy cleaning and replacement.

[0065] Guide rails provide support and guidance for the sliding of the base plate. The guide rails are equipped with limiting structures and buffer pads at both ends to prevent the base plate from shifting or derailing, ensuring smooth movement and low noise.

[0066] Limit sensors, installed at both ends of the guide rail, are used to detect the movement position of the base plate. When the base plate reaches its limit position, the limit sensor triggers a signal to the control panel, automatically stopping or reversing the movement to prevent overtravel and mechanical damage.

[0067] Camera module; mounted on the top or side wall of the cage, used for real-time monitoring of mouse activity. The camera is equipped with infrared illumination, enabling it to capture image signals in both day and night conditions, and transmit video data to the main control system for motion recognition and behavior analysis.

[0068] Anchor point label location diagram; Visual anchor point labels affixed to the bottom plate or four corners of the cage are used for calibrating image coordinates and physical coordinates. Through anchor point recognition, millimeter-level precise positioning of the mouse can be achieved, providing spatial reference for automatic motion detection algorithms.

[0069] During the operation of this invention, the camera module establishes a coordinate system by recognizing anchor point labels and tracks the position of the mouse in the cage in real time. When the mouse is detected to be stationary for more than a set time threshold, the control panel automatically drives the motor to cause the movable base plate to generate a slight disturbance along the guide rail, thereby achieving mild wake-up and sleep deprivation. After the disturbance is completed, the system re-enters the monitoring state to achieve closed-loop control.

[0070] The invention adopts a modular and standardized design concept. The components are connected through standard interfaces, which can be quickly assembled, disassembled and expanded. This design not only improves the repeatability and maintenance convenience of the equipment, but also has good compatibility and promotion value. It can be used synchronously with EEG, EMG and video analysis systems and is suitable for a variety of animal sleep deprivation experimental scenarios.

[0071] Embodiments of the present invention also provide a computing device, including: a processor and a memory storing a computer program, wherein the computer program, when executed by the processor, performs the system as described above. All implementations in the above system embodiments are applicable to this embodiment and can achieve the same technical effects.

[0072] Embodiments of the present invention also provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the system as described above. All implementations in the above system embodiments are applicable to this embodiment and can achieve the same technical effects.

[0073] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A low-stress automated sleep deprivation system for mice based on behavioral feedback control, characterized in that, include: The acquisition module is used to acquire real-time video data of the mouse's behavior in the cage through visual anchor points and cameras arranged on the cage, and to calibrate the coordinate system through the visual anchor points to obtain the mouse's physical position information. The analysis module is used to process the mouse's motion trajectory between consecutive frames based on the mouse's physical location information to obtain the mouse's displacement and motion speed, and to provide preset displacement and speed thresholds for state determination. The determination module is used to compare the displacement amount and the movement speed with the displacement threshold and the speed threshold, respectively. When the displacement amount is less than the displacement threshold and the movement speed is less than the speed threshold for multiple consecutive frames, the mouse is determined to have entered a stationary state. The triggering module is used to obtain a disturbance trigger signal based on the mouse's still state when the duration of the mouse's still state exceeds a preset stillness time threshold; The drive module is used to control the drive motor to drive the movable base plate to make a small lateral reciprocating motion along the guide rail according to the disturbance trigger signal, so as to apply non-invasive disturbance to the mouse. The cooling module is used to start a cooling timer after the non-intrusive disturbance is completed to enter the cooling phase, and to suspend all disturbance triggering within a preset cooling time window; when the cooling time window ends, it automatically exits the cooling phase. The loop module is used to continue collecting new behavioral video data after the cooling phase ends, so as to obtain a closed-loop sleep deprivation process for continuous behavioral monitoring and disturbance control.

2. The automated sleep deprivation system for mice based on behavioral feedback control according to claim 1, characterized in that, By using visual anchor points and cameras placed on the cage, real-time video data of the mouse's behavior within the cage is collected. Coordinate system calibration is then performed using the visual anchor points to obtain the mouse's physical location information, including: The original video images containing visual anchor points and mice are captured by a camera. The original video images are then processed to extract the coordinate data of the visual anchor points in the image coordinate system. Based on the coordinate data in the image coordinate system, the mapping transformation relationship from the image coordinate system to the physical coordinate system of the cage is calculated; The mapping transformation relationship is applied to the input image processing of the automatic motion recognition algorithm. By performing grayscale conversion, background modeling and foreground extraction on the video frames, the coordinate position of the mouse in the image coordinate system is obtained. Based on the coordinate position, the physical position information of the mouse in the cage physical coordinate system is calculated through coordinate transformation.

3. The automated sleep deprivation system for mice based on behavioral feedback control according to claim 2, characterized in that, Based on the mouse's physical location information, the mouse's motion trajectory between consecutive frames is processed to obtain the mouse's displacement and velocity, and preset displacement and velocity thresholds are provided for state determination, including: The mouse's physical location information acquired from multiple consecutive frames is combined to obtain a motion trajectory sequence; The Kalman filter algorithm was used to smooth and denoise the motion trajectory sequence to obtain the optimized mouse motion trajectory. Based on the optimized mouse motion trajectory, the mouse displacement between adjacent frames is calculated. Based on the displacement and video frame rate, the instantaneous movement speed of the mouse is calculated, and preset displacement and speed thresholds are provided to the state determination module as judgment criteria.

4. The automated sleep deprivation system for mice based on behavioral feedback control according to claim 3, characterized in that, Based on the displacement and velocity, the values ​​are compared with displacement thresholds and velocity thresholds, respectively. When the displacement is less than the displacement threshold and the velocity is less than the velocity threshold for multiple consecutive frames, the mouse is determined to have entered a stationary state, including: The displacement is compared with a preset displacement threshold, and the instantaneous velocity is compared with a preset velocity threshold to obtain the comparison result. Based on the comparison results, when the displacement of multiple consecutive frames is less than the displacement threshold and the instantaneous motion speed is less than the speed threshold, the mouse is determined to have entered a stationary state. Based on the mouse entering a resting state, a resting state timer is started to record the duration for which the mouse remains resting.

5. The automated sleep deprivation system for mice based on behavioral feedback control according to claim 4, characterized in that, Based on the mouse's resting state, a disturbance trigger signal is obtained when the duration of the mouse's resting state exceeds a preset resting time threshold, including: Based on the duration of the mouse's resting state, the duration of the resting state is compared with a preset resting time threshold; When the duration of the static state exceeds the static time threshold, a disturbance trigger signal is obtained; and the disturbance trigger signal is sent to the drive module to trigger the motor disturbance operation.

6. The automated sleep deprivation system for mice based on behavioral feedback control according to claim 5, characterized in that, Based on the disturbance trigger signal, the drive motor is controlled to move the movable base plate along the guide rail in a small lateral reciprocating motion, applying a non-invasive disturbance to the mouse, including: It receives a disturbance trigger signal from the trigger module and obtains preset disturbance parameters, including motion amplitude and motion frequency; Based on the disturbance trigger signal and the preset disturbance parameters, the corresponding motor control command is obtained to control the silent stepper motor or servo motor to start running. The operation of the motor drives the transmission mechanism to move the movable base plate in a slight lateral reciprocating motion along the guide rail. The small reciprocating motion of the movable base plate creates a non-invasive physical disturbance to the mice in the cage, disrupting their sleep state.

7. The automated sleep deprivation system for mice based on behavioral feedback control according to claim 6, characterized in that, After completing the non-intrusive perturbation, a cooling timer is started to enter the cooling phase, during which all perturbation triggering is paused within a preset cooling time window; when the cooling time window ends, the cooling phase is automatically exited, including: After the non-invasive perturbation was completed, a cooling timer was immediately started; during the timing of the cooling timer, the behavioral status of the mice was continuously monitored, but the generation and transmission of all perturbation trigger signals were suspended. When the cooldown timer reaches the preset cooldown time window, the cooldown timer will automatically stop and the disturbance trigger function will be reactivated.

8. The automated sleep deprivation system for mice based on behavioral feedback control according to claim 7, characterized in that, After the cooling-off phase, new behavioral video data continues to be collected to obtain a closed-loop sleep deprivation process for continuous behavioral monitoring and disturbance control, including: Receive the trigger signal indicating the end of the cooling phase, and re-acquire new behavioral video data based on the trigger signal; resume real-time acquisition of mouse behavioral video data; The newly acquired behavioral video data is input into the automatic motion recognition algorithm, and the detection and analysis of the mouse's movement status is restarted based on the newly input data; Based on the detection and analysis of mouse movement state data, the complete processing flow from movement trajectory extraction to state determination is restarted; By cyclically executing the entire process of data acquisition, analysis, judgment, triggering, disturbance, and cooling, and based on continuously updated behavioral data, long-term adaptive closed-loop sleep deprivation control is achieved.

9. A computing device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to perform the system as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that, when executed by a processor, performs the system as described in any one of claims 1 to 8.