Method and system for driving and regulating behavior of caenorhabditis elegans based on digital twin

CN120615863BActive Publication Date: 2026-08-28SOUTHEAST UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510906665.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2026-08-28
Estimated Expiration
2045-07-02

AI Technical Summary

Technical Problem

现有技术中,针对秀丽线虫的行为调控主要依赖传统光遗传学实验手段,存在显著缺陷,如行为模拟精度不足、光照策略优化局限性、虚实交互机制缺失、多因素协同调控不足

Benefits of technology

[0039]1)本申请能够实现秀丽线虫行为的动态精准调控与跨尺度认知,通过现实-虚拟并行实验系统的闭环反馈机制,将光遗传学实验与数字孪生建模深度融合,首次在生物行为调控领域实现了行为状态的实时量化、虚拟模型的动态进化,以及最优光照策略的自主生成。该方法突破了传统生物实验依赖人工试错的局限性,为解析线虫神经-行为映射机制提供了数据驱动-模型仿真-精准干预的全链条技术路径。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120615863B_ABST
    Figure CN120615863B_ABST
Patent Text Reader

Abstract

The application discloses a method and system for driving and regulating Caenorhabditis elegans behavior based on digital twinning, which comprises the following steps: constructing a "real-virtual" parallel experiment system of Caenorhabditis elegans; starting a biological experiment system, recording the motion behavior video of Caenorhabditis elegans under different LED light conditions, and obtaining the quantitative data of the behavior state of the worm; training a pre-constructed virtual worm model based on LSTM-MDN by using the quantitative data of the behavior state of the worm; taking the trained virtual worm model as an interactive environment, training a light strategy agent by using a deep reinforcement learning algorithm, and generating a time sequence light control signal through a Markov decision process; inputting the time sequence light control signal generated by the light strategy agent into a program-controlled LED device, collecting experimental data in real time and calculating error indicators, triggering a rolling update mechanism to iteratively optimize the virtual worm model and the light strategy agent until the trajectory control precision and behavior fitting degree targets are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to a method and system for regulating the behavior of *C. elegans* based on digital twins, belonging to the field of biological behavior regulation technology. Background Technology

[0002] In the field of biological behavior regulation technology, *C. elegans* has become an important model organism for studying the interaction between biological behavior and the environment due to its simple nervous system and convenient genetic manipulation. Current technologies for behavioral regulation of *C. elegans* mainly rely on traditional optogenetic experimental methods, which have significant drawbacks, such as insufficient accuracy in behavioral simulation, limitations in optimizing illumination strategies, lack of virtual-real interaction mechanisms, and insufficient multi-factor synergistic regulation. Summary of the Invention

[0003] Objective: In view of at least one of the above technical problems, this application provides a method and system for regulating the behavior of *C. elegans* based on digital twins, which improves the fidelity of behavior simulation and the adaptability of the regulation strategy.

[0004] The technical solution adopted in this application is as follows:

[0005] Firstly, this application provides a method for regulating the behavior of *C. elegans* based on digital twins, including:

[0006] S1: Construct a "real-virtual" parallel experimental system for *C. elegans*, wherein the parallel experimental system includes an experimental platform, a programmable LED device, a high-definition camera system, a virtual nematode, and an illumination strategy agent; wherein the experimental platform, the programmable LED device, and the high-definition camera system constitute a real-world biological experimental system, and the virtual nematode and the illumination strategy agent constitute a virtual simulation system.

[0007] S2: Start the biological experiment system and use the high-definition camera system to film the experimental area, record the movement behavior video of nematodes under different LED light conditions, and obtain quantitative data of nematode behavior status. The quantitative data of nematode behavior status includes drug dosage, historical nematode location coordinates, historical and current t-second light mode, and current t-second nematode location coordinates.

[0008] S3: Use the quantified data of nematode behavior state to train the pre-built virtual nematode model based on LSTM-MDN to obtain the trained virtual nematode model.

[0009] S4: Using the trained virtual nematode model as the interactive environment, a lighting policy agent is trained using a deep reinforcement learning algorithm, and a time-series lighting control signal is generated through a Markov decision process.

[0010] S5. Closed-loop feedback and strategy optimization: Input the time-series lighting control signal generated by the lighting strategy agent into the programmable LED device, collect experimental data in real time and calculate error indicators, trigger the rolling update mechanism to iteratively optimize the virtual nematode model and the lighting strategy agent, repeat steps S3-S5 until the trajectory control accuracy and behavior consistency targets are met.

[0011] S6. Simulation experiments were conducted using a virtual nematode model and an illumination strategy agent.

[0012] In some embodiments, the method for obtaining the LSTM-MDN-based virtual nematode model includes:

[0013] The Long Short-Term Memory (LSTM) network and the Hybrid Density Network (MDN) are combined in a cascaded manner; the input of the virtual nematode model is used as the input of the LSTM network, the output of the LSTM network is used as the input of the MDN network, and the output of the MDN network is used as the output of the virtual nematode model.

[0014] Further processing of the quantitative data on nematode behavior states was carried out by designing a historical data time window with a variable length l. The drug dosage, the nematode position coordinates from the historical tl to t-1 seconds, the historical tl to t-1 seconds, and the current t seconds of illumination were used as features to construct a two-dimensional feature vector of the nematode behavior at the current t seconds, thus obtaining the initial training sample set.

[0015] The pre-constructed LSTM-MDN-based virtual nematode model is trained using an initial training sample set until the preset conditions are met, resulting in a well-trained virtual nematode model. The inputs to the virtual nematode model are the drug dosage, historical nematode location coordinates, and historical and current illumination patterns (at the current t-second interval). The output is the nematode location coordinates at the current t-second interval.

[0016] In some embodiments, S4: Using the trained virtual nematode model as the interactive environment, a lighting policy agent is trained using a deep reinforcement learning algorithm, and a temporal lighting control signal is generated through a Markov decision process, including:

[0017] S41. The optimal lighting strategy is generated and modeled as a Markov decision process. The state set, action set, and reward function of the Markov decision model are defined respectively. The state set includes the drug dosage, historical nematode position coordinates, and historical and current lighting methods. The action set includes the encoding of all lighting methods. The reward function is designed according to different optimal goals.

[0018] S42. Load the trained LSTM-MDN-based virtual nematode model as the interactive environment;

[0019] S43. The lighting policy agent is trained using a deep reinforcement learning training process to obtain a well-trained lighting policy agent;

[0020] S44. Using the trained illumination strategy agent, output a time-series illumination control signal of the same duration through a simulation experiment of a preset duration.

[0021] In some embodiments, S5. Closed-loop feedback and strategy optimization: The time-series illumination control signal generated by the illumination strategy agent is input into the programmable LED device, experimental data is collected in real time and error indicators are calculated, triggering a rolling update mechanism to iteratively optimize the virtual nematode model and the illumination strategy agent, repeating steps S3-S5 until the trajectory control accuracy and behavior consistency targets are met, including:

[0022] S51. Input the timing illumination control signal to the programmable LED device to conduct optogenetic experiments on real nematodes and collect experimental data;

[0023] S52. Based on the root mean square error, mean absolute percentage error, and Fraser initial distance score statistical analysis indicators of the experimental data, design rolling update trigger conditions;

[0024] S53. When the rolling update trigger condition is met, repeat steps S3-S5 until precise optogenetic regulation of nematode behavior is achieved, with specific indicators including the accuracy of movement trajectory control and the degree of consistency of behavioral patterns.

[0025] In some embodiments, the experimental platform is used to hold nematode elegans culture samples and supporting hardware, provides a horizontal and stable optical observation plane, and integrates a temperature control module and microenvironment regulation components to ensure the consistency of the physiological state of biological samples and the reliability of data acquisition in optogenetic experiments.

[0026] In some embodiments, the programmable LED device is used to receive a time-series illumination control signal output by a virtual simulation system, and to generate continuous illumination, intermittent illumination, or random light stimulation modes through programmable logic, thereby achieving precise application of optogenetic stimulation to *C. elegans*.

[0027] Furthermore, the programmable LED device supports three modes: continuous illumination, intermittent illumination, and random light stimulation. The duration of continuous illumination is preset to 5s, 10s, 30s, 60s, 90s, 120s, and 180s. The total duration of the intermittent illumination mode is set to 180s. The random light stimulation mode generates light on or off signals randomly at 5-second intervals, with a total duration of 180s.

[0028] In some embodiments, the high-definition camera system is used to achieve sub-pixel-level positioning and acquisition of the nematode's movement trajectory;

[0029] The high-definition camera system uses an industrial camera with a resolution of 1920×1080 and a frame rate of 30fps, combined with an OpenCV real-time tracking module, to achieve sub-pixel-level positioning of the nematode's movement trajectory.

[0030] In some embodiments, S2: Activate the biological experimental system, use a high-definition camera system to film the experimental area, and record video of the movement behavior of *C. elegans* under different LED lighting conditions, including:

[0031] Adjust the angle of the LED light module according to the experimental requirements, aim it at the center area of ​​the culture dish, 1-2 cm away from the sample surface, connect to a 220V AC power supply, set the light intensity parameters and spatial positioning accuracy through the CNC board, start the LED device, and monitor the movement behavior of Caenorhabditis elegans in real time through a high-definition camera system to ensure that the light stimulation signal is synchronized with the light control signal generated by the virtual simulation system.

[0032] Secondly, this application provides a system for controlling the behavior of *C. elegans* based on digital twins, including a processor and a storage medium;

[0033] The storage medium is used to store instructions;

[0034] The processor is configured to operate according to the instructions to execute the method according to the first aspect.

[0035] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.

[0036] Fourthly, this application provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect.

[0037] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect.

[0038] Beneficial Effects: The method and system for regulating the behavior of *C. elegans* based on digital twins provided in this application have the following advantages: By constructing a real-virtual parallel experimental system and integrating a hybrid density recurrent neural network, deep reinforcement learning algorithms, and a rolling update mechanism, high-precision simulation and dynamic regulation of *C. elegans* behavior are achieved. Compared with existing technologies, this application effectively improves the fidelity of behavioral simulation and the adaptability of regulatory strategies through the synergistic effect of a virtual-real bidirectional cognitive engine, an online evolutionary digital twin, and a federated learning regulatory strategy library, providing a new technical path for the precise regulation of biological behavior. It has the following advantages:

[0039] 1) This application enables dynamic and precise regulation and cross-scale cognition of the behavior of *C. elegans*. Through a closed-loop feedback mechanism of a real-virtual parallel experimental system, it deeply integrates optogenetic experiments with digital twin modeling, achieving for the first time in the field of biological behavior regulation real-time quantification of behavioral states, dynamic evolution of virtual models, and autonomous generation of optimal lighting strategies. This method overcomes the limitations of traditional biological experiments that rely on manual trial and error, providing a complete technical path of data-driven, model simulation, and precise intervention for analyzing the neural-behavioral mapping mechanism of *C. elegans*.

[0040] 2) Advantages of the Programmable LED Device: The programmable LED device boasts advantages in the precision of light stimulation and experimental compatibility. Its self-developed programmable LED device integrates multi-mode light stimulation functions, dynamic light intensity adjustment, and spatial positioning accuracy, enabling precise simulation of natural lighting conditions or customized optogenetic stimulation schemes. Compared to traditional manual light source control, this device achieves an upgrade in lighting strategies from experience-based design to algorithmic generation through real-time linkage between the CNC board and the simulation system, significantly improving experimental efficiency and repeatability.

[0041] 3) Advantages of video processing algorithms: Breakthroughs in the depth and robustness of biological behavior quantification using video processing algorithms. A computer vision algorithm based on Gaussian Mixture Model (GMM) and Kalman filtering achieves subcellular-level tracking accuracy with a single-frame nematode localization error ≤2 pixels. Furthermore, through variable time window feature engineering, the temporal dependence and random fluctuations of nematode behavior are quantified into two-dimensional feature vectors. This algorithm overcomes the subjectivity and inefficiency of traditional manual annotation, providing crucial data support for constructing high-fidelity virtual nematode models.

[0042] 4) The designed two-dimensional feature vector encoding and LSTM-MDN model can effectively improve the simulation fidelity of nematode behavior and better simulate the coherence and uncertainty of nematode behavior.

[0043] 5) The proposed illumination policy agent and virtual simulation experiment based on the reinforcement learning paradigm can be applied to a variety of optimization objectives and can achieve self-learning based on the proposed rolling update mechanism, thus meeting the practicality and applicability requirements over a longer period of time. Attached Figure Description

[0044] Figure 1 This is a schematic diagram of the method for regulating the behavior of *C. elegans* based on digital twins in the embodiments of this application;

[0045] Figure 2 This is a schematic diagram of the "real-virtual" parallel experimental system of *C. elegans* in the embodiments of this application;

[0046] Figure 3 This is a schematic diagram of the operation flow of the programmable LED device in the embodiments of this application;

[0047] Figure 4 These are partial original video screenshots (a) and representative screenshots (b) of the collected nematode movement behavior provided in the embodiments of this application.

[0048] Figure 5 This is a schematic diagram of the quantization program for the trajectory coordinates of *C. elegans* provided in the embodiments of this application;

[0049] Figure 6 This is a schematic diagram of the LSTM-MDN model in the embodiments of this application;

[0050] Figure 7 This is a comparison diagram of the nematode movement trajectory simulated by the LSTM-MDN model in the embodiments of this application and the actual trajectory;

[0051] Figure 8 This is a flowchart illustrating the training process of the DRL-based optimal illumination policy agent in this application embodiment.

[0052] Figure 9 This is a comparison diagram of the nematode movement trajectory under the optimal lighting mode in the embodiments of this application, showing the virtual simulation experiment and the real experiment.

[0053] Figure 10 This is a design block diagram of the programmable LED device in the embodiments of this application;

[0054] Figure 11 This is a schematic diagram of a physical photograph of the self-made programmable LED device in the embodiments of this application;

[0055] Figure 12 This is a schematic diagram of the module structure of the simulation experiment software in the embodiments of this application. Detailed Implementation

[0056] The present application will be further described below with reference to the accompanying drawings and embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present application, and should not be used to limit the scope of protection of the present application.

[0057] In the description of this application, "several" means one or more, "multiple" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.

[0058] In the description of this application, the terms "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0059] The term "and / or" simply describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0060] Example 1: This example provides a method for regulating the behavior of *C. elegans* based on digital twin technology, such as... Figure 1 As shown, it includes:

[0061] S1: Construct a "real-virtual" parallel experimental system for *C. elegans*, wherein the parallel experimental system includes an experimental platform, a programmable LED device, a high-definition camera system, a virtual nematode, and a lighting strategy agent; wherein the experimental platform, programmable LED device, and high-definition camera system constitute a real-world biological experimental system, and the virtual nematode and lighting strategy agent constitute a virtual simulation system, such as... Figure 2 As shown.

[0062] The experimental platform is used to hold the nematode elegans culture samples and supporting hardware, provides a horizontal and stable optical observation plane, and integrates a temperature control module and microenvironment regulation components to ensure the consistency of the physiological state of biological samples and the reliability of data acquisition in optogenetic experiments.

[0063] The programmable LED device receives timing-based illumination control signals from the virtual simulation system and generates continuous, intermittent, or random light stimulation modes through programmable logic to precisely apply optogenetic stimulation to *C. elegans*. Its design diagram and physical photograph are shown below. Figure 10 and Figure 11 As shown.

[0064] The high-definition camera system is used to achieve sub-pixel-level localization and acquisition of the nematode's movement trajectory. More specifically, the high-definition camera system uses an industrial camera with a resolution of 1920×1080 and a frame rate of 30fps, combined with an OpenCV real-time tracking module, to achieve sub-pixel-level localization of the nematode's movement trajectory (error ≤ 2 pixels).

[0065] Furthermore, such as Figure 3As shown, the programmable LED device supports three modes: continuous illumination, intermittent illumination, and random light stimulation. The duration of continuous illumination is preset to 5s, 10s, 30s, 60s, 90s, 120s, and 180s. The total duration of the intermittent illumination mode is set to 180s. The random light stimulation mode generates light on or off signals randomly at 5-second intervals, with a total duration of 180s.

[0066] More specifically, such as Figure 10 , Figure 11 As shown, the specific construction method of the programmable LED device includes:

[0067] S11. Hardware Components: The Arduino Uno CNC board is used as the control core, connecting a 470nm blue LED array, transformer and signal conditioning module, and communicating with the computer in real time via USB interface;

[0068] S12. Functional parameter settings: Supports three modes: continuous illumination, intermittent illumination, and random light stimulation; light intensity adjustment accuracy is ±0.1mW / cm²; time control error is ≤50ms.

[0069] S13. Optical Module Adjustment: According to experimental requirements, fix the LED light module on the experimental platform using an adjustable bracket, adjust the illumination angle (0-90° adjustable) and vertical distance (1-5cm) to ensure that the center of the light spot coincides with the nematode sample area in the culture dish, and achieve spatial positioning accuracy ≤0.5mm using a laser locator.

[0070] S14. System debugging process: Connect the 220V AC power supply to the transformer and convert it to 12V DC power supply; connect the Arduino CNC board to the computer via USB data cable.

[0071] S2: Start the biological experiment system and use a high-definition camera system to film the experimental area, record the movement behavior of nematodes under different LED lighting conditions, and obtain quantitative data on nematode behavior. The quantitative data on nematode behavior includes drug dosage, historical nematode location coordinates, historical and current lighting methods for the past t seconds, and current nematode location coordinates for the past t seconds.

[0072] In some embodiments, in step S2, the biological experimental system is activated, and a high-definition camera system is used to film the experimental area, recording videos of the movement behavior of *C. elegans* under different LED lighting conditions, including:

[0073] Adjust the angle of the LED light module according to the experimental requirements, aim it at the center area of ​​the culture dish, 1-2 cm away from the sample surface, connect to a 220V AC power supply, set the light intensity parameters (0-100mW / cm²) and spatial positioning accuracy (spot diameter ≤2mm) through the CNC board, start the LED device, and monitor the movement behavior video of Caenorhabditis elegans in real time through a high-definition camera system to ensure that the light stimulation signal is synchronized with the light control signal generated by the virtual simulation system (delay ≤50ms).

[0074] More specifically, a high-definition camera system was used to film the experimental area in real time, recording videos of the movement and behavior of *C. elegans* under different LED lighting conditions, such as... Figure 4 As shown, the specific parameters are as follows: Video format: MP4 / H.264 encoding, resolution: 1920×1080 pixels (1080p), frame rate: 30 frames / second (fps), storage duration: single experiment recording duration ≥ 300 seconds.

[0075] In some specific embodiments, the methods for collecting, processing, and quantifying nematode behavioral data, such as Figure 4 and Figure 5 As shown, it specifically includes:

[0076] S21. The synchronized L1-stage nematodes were transferred to a 9 cm measurement plate without NaCl, and video was captured at a frame rate of 5 fps. Two light stimulation modes were set: continuous 60 seconds without LED light and intermittent LED light (including different light-extinguishing cycles of 5-60 seconds).

[0077] S22. Fifty nematodes were selected for each group for dual-mode stimulation. Before recording, the nematodes were positioned in the center of the field of vision by image localization, and any residue on their body surface was removed beforehand on a foodless NGM plate.

[0078] S23. Develop a Python program based on the OpenCV image processing library to detect the coordinate sequence of the head, middle and tail of a nematode in real time.

[0079] S24. By calculating the displacement between adjacent frames using differential calculations, the instantaneous velocity v(t) = Δd / Δt and the angular velocity ω(t) = Δθ / Δt are derived, where Δd is the change in Euclidean distance and Δθ is the change in head orientation angle. A Savitzky-Golay filter is then used to smooth and denoise the original coordinate data.

[0080] More specifically, this includes video processing and feature extraction: a Gaussian mixture model is used to model the background of the video stream; a target detection algorithm is used to identify the nematode outline; and a Kalman filter algorithm is used to predict the motion trajectory, achieving subcellular-level tracking with a single-frame positioning error ≤ 2 pixels. Based on the tracking results, the motion speed per second, turning angle, and pause time percentage are calculated, and a historical data time window of variable length l is designed to extract a 12-dimensional feature vector containing drug dosage, historical l-second coordinate sequence, and current lighting mode. Z-score normalization is used to generate model training samples, such as... Figure 5 As shown.

[0081] S3: Use the quantified data of nematode behavior state to train the pre-built virtual nematode model based on LSTM-MDN to obtain the trained virtual nematode model.

[0082] In some embodiments, the method for obtaining the LSTM-MDN-based virtual nematode model in step S3 includes:

[0083] S31. Combine Long Short-Term Memory (LSTM) network and Hybrid Density Network (MDN) in a cascaded manner; use the input of the virtual nematode model as the input of the LSTM network, use the output of the LSTM network as the input of the MDN network, and use the output of the MDN network as the output of the virtual nematode model.

[0084] More specifically, such as Figure 6 As shown, the LSTM receives a two-dimensional feature vector as input to the model and outputs the mean μ of multiple Gaussian distributions. j Standard deviation σ j and weighting coefficient π j j=1,…,m, where m is the pre-set number of Gaussian distributions; MDN receives μ from the LSTM output. j σ j and π j The mixture distribution density p(x) is constructed using a weighted method and expressed by the following mathematical formula:

[0085]

[0086] Where x is the two-dimensional feature vector input to the model.

[0087] S32. Further process the quantitative data of nematode behavior state, design a historical data time window with a variable length l, and use the drug dosage, the nematode position coordinates from the historical tl to t-1 seconds, the historical tl to t-1 seconds and the current t seconds of illumination as features to construct a two-dimensional feature vector of the nematode behavior in the current t seconds, and obtain the initial training sample set;

[0088] S33. The pre-constructed virtual nematode model based on LSTM-MDN is trained using the initial training sample set until the preset conditions are met, and a trained virtual nematode model is obtained; wherein the input of the virtual nematode model is the drug dosage, historical nematode position coordinates, historical and current illumination methods in t seconds, and the output is the nematode position coordinates in the current t seconds.

[0089] like Figure 7 The image shown is a comparison between the nematode trajectory simulated by the virtual nematode model based on LSTM-MDN provided in this embodiment and the actual trajectory.

[0090] More specifically, the initial training sample set is divided into a training set, a validation set, and a test set. The LSTM-MDN model is initialized, fitted on the training set, and fine-tuned on the validation set. The trained LSTM-MDN model is then tested on the test set based on metrics such as mean absolute percentage error (MAPE), root mean square error (RMSE), and FID score.

[0091] S4: Using the trained virtual nematode model as the interactive environment, a lighting policy agent is trained using a deep reinforcement learning algorithm, and a time-series lighting control signal is generated through a Markov decision process.

[0092] In some embodiments, step S4 specifically includes:

[0093] S41. The optimal lighting strategy is generated and modeled as a Markov decision process. Define the state set, action set, and reward function of the Markov decision model. The state set includes the drug dosage, historical nematode location coordinates, and historical and current lighting modes. The action set includes the encoding of all lighting modes (e.g., 0 represents light off, 1 represents light on). Design reward functions according to different optimal goals.

[0094] For example, if the optimal objective is set to maximize the nematode's crawling path within a preset time period (e.g., 60 seconds), the reward function is designed as follows:

[0095]

[0096] In the above formula, r t It is the instantaneous reward function for the current t seconds, where ρ1, ρ2, and ρ3 are fixed proportionality coefficients, ρ1 + ρ2 + ρ3 = 1, p t It is the length of the nematode's crawling path in the current t seconds, v t v is the velocity of the nematode in the current t seconds. t-1 It is the speed of the nematode in t-1 seconds.

[0097] For example, if the optimal objective is set to maximize the distance between the nematode's head coordinates and the origin coordinates within a preset time period (e.g., 60 seconds), the reward function is designed as follows:

[0098]

[0099] In the above formula, d t v is the distance from the origin to the head coordinates of the nematode in the current t seconds. t It is the velocity of the nematode in t seconds, g t It is the angle between the head and body of the nematode at the current t-second interval.

[0100] S42. Load the trained LSTM-MDN-based virtual nematode model as the interactive environment;

[0101] S43. Select a DRL algorithm (such as DQN) and train the lighting policy agent using the standard reinforcement learning training process to obtain a trained lighting policy agent, such as... Figure 8 As shown;

[0102] S44. Using the trained illumination policy agent, output a time-series illumination control signal of the same duration (time resolution of 1 second) through a simulation experiment of a preset duration (e.g., 60 seconds).

[0103] S5. Closed-loop feedback and strategy optimization: Input the time-series lighting control signal generated by the lighting strategy agent into the programmable LED device, collect experimental data in real time and calculate error indicators, trigger the rolling update mechanism to iteratively optimize the virtual nematode model and the lighting strategy agent, repeat steps S3-S5 until the trajectory control accuracy and behavior consistency targets are met.

[0104] In some embodiments, step S5 specifically includes:

[0105] S51. Input the timing illumination control signal to the programmable LED device to conduct optogenetic experiments on real nematodes and collect experimental data; Figure 9 This is a comparison diagram of the nematode movement trajectory under the virtual simulation experiment and the real experiment under the optimal timing illumination control signal provided in this embodiment;

[0106] S52. Based on the statistical analysis indicators of root mean square error (RMSE), mean absolute percentage error (MAPE), and Fraser initial distance (FID) score of the experimental data, design rolling update trigger conditions;

[0107] More specifically, the rolling update trigger condition is: when the prediction error of the virtual nematode model exceeds 0.005 for three consecutive times, or when 70% of the nodes in the federated policy library recommend a new policy, the virtual nematode model update process is initiated.

[0108] S53. When the rolling update trigger condition is met, repeat steps S3-S5 until precise optogenetic regulation of nematode behavior is achieved. Specific indicators include the accuracy of movement trajectory control, the consistency of behavioral patterns, and the ability to generalize to multiple targets.

[0109] More specifically, the movement trajectory of nematodes was captured by a 200fps high-speed camera system, and the mean absolute percentage error (MAPE) was calculated to be ≤8%, and the FID score of the virtual and real behavior distribution was ≤10.

[0110] S6. Simulation experiments were conducted using a virtual nematode model and an illumination strategy agent.

[0111] Simulation experiments are conducted based on the optimal illumination sequence generated by the illumination strategy agent. The output is the movement trajectory of the virtual nematode model, which is used to compare with the movement trajectory of nematodes in real-world biological experiments.

[0112] Example 2: Based on Example 1, this example provides a system for regulating the behavior of *C. elegans* based on digital twin, including a processor and a storage medium;

[0113] The storage medium is used to store instructions;

[0114] The processor is configured to operate according to the instructions to execute the method according to Embodiment 1.

[0115] More specifically, such as Figure 12 As shown, the simulation software for the system specifically includes:

[0116] The data acquisition and processing module collects and records real-world nematode experimental videos. After processing using computer vision algorithms, the data is quantified into a series of behavioral state data of the nematodes, including movement speed, turning angle, and pause time. This quantified data provides samples for subsequent digital virtual nematode modeling and simulation training.

[0117] The virtual nematode training module is used to train virtual nematodes. The trained virtual nematodes provide an interactive environment for subsequent training of the illumination policy agent and simulation experiments.

[0118] The illumination strategy agent training module is used to train an agent with the optimal illumination strategy. Based on the DRL algorithm, the agent is trained through repeated interactions with virtual nematodes to generate the optimal illumination control signal. The generated optimal illumination control signal is then input into a programmable LED device for use in real-world biological experiments.

[0119] The simulation experiment module is used to test the behavioral results of virtual nematodes under the optimal lighting sequence. The input of this module is the optimal lighting sequence generated by the agent, and the output is the movement trajectory of the virtual nematode, which is used to compare with the movement trajectory of nematodes in real-world biological experiments.

[0120] Example 3: Based on Example 1, this example provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in Example 1.

[0121] Example 4: Based on Example 1, this example provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described in Example 1.

[0122] Example 5: Based on Example 1, this example provides a computer program product, including a computer program that, when executed by a processor, implements the method described in Example 1.

[0123] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0124] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0125] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0126] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0127] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for regulating the behavior of *C. elegans* based on digital twins, characterized in that, include: S1: Construct a "real-virtual" parallel experimental system for *C. elegans*, wherein the parallel experimental system includes an experimental platform, a programmable LED device, a high-definition camera system, a virtual nematode, and an illumination strategy agent; wherein the experimental platform, the programmable LED device, and the high-definition camera system constitute a real-world biological experimental system, and the virtual nematode and the illumination strategy agent constitute a virtual simulation system. S2: Activate the biological experimental system and use a high-definition camera system to film the experimental area, recording videos of the movement and behavior of *C. elegans* under different LED lighting conditions. Obtain quantitative data on the nematode's behavioral state, including drug dosage, historical nematode location coordinates, and historical and current data. t The lighting method per second and the current t The coordinates of the nematode's position in seconds; S3: Use the quantified data of nematode behavior state to train the pre-built virtual nematode model based on LSTM-MDN to obtain the trained virtual nematode model. S4: Using the trained virtual nematode model as the interactive environment, a lighting policy agent is trained using a deep reinforcement learning algorithm, and a time-series lighting control signal is generated through a Markov decision process. S5. Closed-loop feedback and strategy optimization: Input the time-series lighting control signal generated by the lighting strategy agent into the programmable LED device, collect experimental data in real time and calculate error indicators, trigger the rolling update mechanism to iteratively optimize the virtual nematode model and the lighting strategy agent, repeat steps S3-S5 until the trajectory control accuracy and behavior consistency targets are met. S6. Simulation experiments were conducted using a virtual nematode model and an illumination strategy agent. The method for obtaining the LSTM-MDN-based virtual nematode model includes: The Long Short-Term Memory (LSTM) network and the Hybrid Density Network (MDN) are combined in a cascaded manner; the input of the virtual nematode model is used as the input of the LSTM network, the output of the LSTM network is used as the input of the MDN network, and the output of the MDN network is used as the output of the virtual nematode model. Further processing of the nematode behavioral state quantification data, designing a variable-length... l Historical data time windows, including drug dosage, historical t - l arrive t-1 Seconds of nematode location coordinates, history t - l arrive t-1 Seconds and current t Using the lighting pattern per second as a feature, construct the current... t The two-dimensional feature vectors of the behavior of the nematode are used to obtain the initial training sample set; The pre-constructed LSTM-MDN-based virtual nematode model is trained using an initial training sample set until preset conditions are met, resulting in a well-trained virtual nematode model. The inputs to the virtual nematode model are drug dosage, historical nematode location coordinates, and historical and current data. t The lighting mode is per second, and the output is the current time. t The coordinates of the nematode's position in seconds.

2. The method according to claim 1, characterized in that, S4: Using the trained virtual nematode model as the interactive environment, a lighting policy agent is trained using a deep reinforcement learning algorithm. Temporal lighting control signals are generated through a Markov decision process, including: S41. The optimal lighting strategy is generated and modeled as a Markov decision process. The state set, action set, and reward function of the Markov decision model are defined respectively. The state set includes the drug dosage, historical nematode position coordinates, and historical and current lighting methods. The action set includes the encoding of all lighting methods. The reward function is designed according to different optimal goals. S42. Load the trained LSTM-MDN-based virtual nematode model as the interactive environment; S43. The lighting policy agent is trained using a deep reinforcement learning training process to obtain a well-trained lighting policy agent; S44. Using the trained illumination strategy agent, output a time-series illumination control signal of the same duration through a simulation experiment of a preset duration.

3. The method according to claim 1, characterized in that, S5. Closed-loop feedback and strategy optimization: Input the time-series illumination control signal generated by the illumination strategy agent into the programmable LED device, collect experimental data in real time and calculate error indicators, trigger a rolling update mechanism to iteratively optimize the virtual nematode model and the illumination strategy agent, repeat steps S3-S5 until the trajectory control accuracy and behavior consistency targets are met, including: S51. Input the timing illumination control signal to the programmable LED device to conduct optogenetic experiments on real nematodes and collect experimental data; S52. Based on the root mean square error, mean absolute percentage error, and Fraser initial distance score statistical analysis indicators of the experimental data, design rolling update trigger conditions; S53. When the rolling update trigger condition is met, repeat steps S3-S5 until precise optogenetic regulation of nematode behavior is achieved, with specific indicators including the accuracy of movement trajectory control and the degree of consistency of behavioral patterns.

4. The method according to claim 1, characterized in that, The experimental platform is used to hold the nematode elegans culture samples and supporting hardware, provides a horizontal and stable optical observation plane, and integrates a temperature control module and microenvironment regulation components to ensure the consistency of the physiological state of biological samples and the reliability of data acquisition in optogenetic experiments.

5. The method according to claim 1, characterized in that, The programmable LED device is used to receive the timing illumination control signal output by the virtual simulation system, and generate continuous illumination, intermittent illumination or random light stimulation modes through programmable logic to achieve precise application of optogenetic stimulation to nematodes.

6. The method according to claim 5, characterized in that, The programmable LED device supports three modes: continuous illumination, intermittent illumination, and random light stimulation. The duration of continuous illumination is preset to 5s, 10s, 30s, 60s, 90s, 120s, and 180s. The total duration of the intermittent illumination mode is set to 180s. The random light stimulation mode generates light on or off signals randomly at 5-second intervals, with a total duration of 180s.

7. The method according to claim 1, characterized in that, High-definition camera system is used to achieve sub-pixel-level positioning and acquisition of nematode movement trajectories; The high-definition camera system uses an industrial camera with a resolution of 1920×1080 and a frame rate of 30fps, combined with an OpenCV real-time tracking module, to achieve sub-pixel-level positioning of the nematode's movement trajectory.

8. The method according to claim 1, characterized in that, S2: Activate the biological experimental system and use a high-definition camera system to film the experimental area, recording videos of the movement behavior of *C. elegans* under different LED lighting conditions, including: Adjust the angle of the LED light module according to the experimental requirements, aim it at the center area of ​​the culture dish, 1-2 cm away from the sample surface, connect to a 220V AC power supply, set the light intensity parameters and spatial positioning accuracy through the CNC board, start the LED device, and monitor the movement behavior of Caenorhabditis elegans in real time through a high-definition camera system to ensure that the light stimulation signal is synchronized with the light control signal generated by the virtual simulation system.

9. A system for regulating the behavior of *C. elegans* based on digital twins, characterized in that, Including processor and storage media; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Digital twin model multi-dimensional and multi-scale verification method

    CN113010930A

  • Caenorhabditis elegans behavioral analysis method and system based on computer vision

    CN114694251A