Zebra fish toxicology exposure experiment control system and method thereof
By introducing proportional-integral-derivative (PID) control algorithms and finite state machines into zebrafish toxicology experiments, the problem of discontinuous control of environmental parameters was solved, the stability and consistency of experimental conditions were achieved, and the reliability and repeatability of experimental results were improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-14
- Publication Date
- 2026-04-10
AI Technical Summary
In existing zebrafish toxicology exposure experiments, the control of environmental parameters lacks continuity and consistency, resulting in bias and poor repeatability of experimental results, making it difficult to meet the requirements of chronic toxicity tests and batch comparative experiments.
By employing proportional-integral-derivative (PID) control algorithms and finite state machine (FDM) technology, an exposure condition time schedule is constructed. Through an environmental stability execution module, an exposure process constraint module, and a process trajectory consistency module, continuous adjustment of parameters such as temperature, dissolved oxygen, and conductivity, as well as strict control of the stage sequence, are achieved to ensure experimental consistency.
This improved the reliability and repeatability of experimental data, reduced experimental bias, enhanced the synergistic stability of environmental and process control, and ensured the consistency and traceability of zebrafish exposure conditions.
Smart Images

Figure CN121833095A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of toxic biological detection technology, and in particular to a control system and method for zebrafish toxicological exposure experiments. Background Technology
[0002] The field of toxic biological detection technology specifically involves experimental control techniques for detecting and evaluating the toxic effects of chemical substances, biological agents, and environmental pollutants using model organisms. This technology uses living organisms as response carriers and determines the toxicity level, mode of action, and risk level of the tested substance by controlling exposure environmental parameters and observing changes in the organism's physiology, survival, and behavior. The core of this technology lies in constructing a stable, repeatable, and parameter-controllable experimental environment to reduce the impact of external interference on the detection results.
[0003] The purpose of a zebrafish toxicology exposure experiment control system is to maintain aquatic environmental parameters within a preset range during the toxicology experiment period, ensuring the consistency and repeatability of zebrafish exposure conditions. The system continuously controls parameters such as temperature, dissolved oxygen, conductivity, and photoperiod to reduce the interference of environmental fluctuations on the physiological response of zebrafish during the experiment, thereby achieving a stable assessment of the toxic effects of chemical substances. The system can improve the reliability of experimental data and meet the requirements of long-term environmental consistency for chronic toxicity tests and batch comparative experiments.
[0004] Existing technologies often rely on setting up and intermittently checking to maintain the exposure environment in practice. The experimental protocols frequently use manual timing to connect phases and illumination cycles, lacking a unified timeline for phase start and end times. This leads to time deviations in water change, oxygen replenishment, and temperature adjustment by different operators. In chronic exposure experiments, these deviations accumulate, causing discrepancies in phase sequence and residence duration, thus affecting the consistency of exposure dose and stress conditions. Environmental parameter control is mostly based on independent adjustment of single devices. Adjustments to parameters such as temperature, dissolved oxygen, and conductivity lack continuous time-indexed tracking and deviation direction constraints, resulting in short-term overshoot. When the aquariums swing back, it is difficult to review and pinpoint the time period of the fluctuation. Insufficient inspection frequency when a batch of aquariums are running simultaneously can amplify the fluctuations and create batch-to-batch differences. At the process level, operation checklists and manual logs are often used to confirm the progress of each stage. There is a lack of a structured verification mechanism for the sequence of stages and the dwell time of each stage. Abnormal stages are often only discovered after the experiment is over, resulting in process drift samples mixed into the same batch of data. Deviation identification often stops at the comparison of the endpoint indicators and lacks the means to pinpoint the deviation to a specific stage segment. Often, we can only retrospectively guess the cause when the result is abnormal, and we cannot provide clear evidence of the time segment, which leads to an increase in the number of repeated experiments and a longer detection cycle. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the existing technology and to propose a zebrafish toxicological exposure experimental control system and method.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a zebrafish toxicology exposure experimental control system includes: Exposure condition arrangement module: Based on the zebrafish toxicology exposure experiment protocol, read the experimental batch number and aquarium specification identifier, match the stage identifier and light start and end fields in the protocol, adjust the continuity of stage time boundaries to form a unified time axis mapping relationship, and construct an exposure condition time arrangement table. Environmental stability execution module: Based on the exposure condition time arrangement table, it reads the corresponding stage set value by referring to the current time index, and uses the proportional-integral-derivative control algorithm to handle the control deviation. It judges the direction of the difference between the aquarium water temperature value and the set value, selects the execution path, and generates an environmental stability operation trajectory. Exposure process constraint module: Based on the stable operation trajectory of the environment, according to the constraint method of finite state machine on state identifiers and state transition order, it identifies the exposure stage identifier corresponding to the current time and verifies the consistency of the stage order, calculates the stage duration and compares it with the allowable interval to obtain the exposure process execution sequence; Process trajectory consistency module: Based on the stable operation trajectory of the environment and the execution sequence of the exposed process, it extracts the corresponding operation segments of each stage and aligns the start and end time boundaries of the stage, verifies the parameter change trend within the stage, marks the cross-stage extended trajectory and continuous abnormal segments, and establishes a set of process deviation time segments. Experimental Consistency Identification Module: Based on the process deviation time segment set, it counts the duration of abnormal segments in each stage, calculates the proportion of the stage duration, and combines the exposure process execution sequence to sort out the stage completeness, archives the chronic exposure cycle sequence status, and outputs the experimental process consistency identifier.
[0007] As a further aspect of the present invention, the exposure condition time schedule includes experimental batch number, stage identifier, start and end time of each stage, and start and end time of illumination; the stable environmental operation trajectory includes time index, corresponding stage identifier, and temperature change direction information; the exposure process execution sequence includes stage identifier, stage duration, and stage order information; the process deviation time segment set includes deviation stage identifier, deviation start and end time, and deviation duration; and the experimental process consistency identifier includes deviation percentage information of each stage and chronic exposure cycle sequence status.
[0008] As a further aspect of the present invention, the exposure condition orchestration module includes: The scheme field organization submodule: Based on the zebrafish toxicology exposure experiment scheme, read the experimental batch number and aquarium specification identifier, extract the stage identifier field and the light start and end field in the scheme one by one, check the completeness of the fields, and arrange the stage number and time field according to the scheme order, retaining the corresponding relationship unchanged, to form a scheme stage field set; Time axis mapping submodule: Based on the stage field set of the scheme, it checks the order of stage start time and end time, compares the continuity of adjacent stage time nodes, adjusts time boundaries with intervals and overlaps, arranges all stage time points in a unified order, and constructs an exposure condition time arrangement table.
[0009] As a further aspect of the present invention, the environment stabilization execution module includes: Stage setting comparison submodule: Based on the exposure condition time arrangement table, read the stage setting value corresponding to the time index and locate the aquarium water temperature value. Combined with the definition of control deviation in the proportional integral derivative control algorithm, compare the temperature value with the stage setting value one by one according to the time index, mark the direction of difference and register the time position, and generate a temperature deviation record set. Deviation path determination submodule: Based on the temperature deviation record set, compare the deviation directions under adjacent time indices, continuously check the consistency of the deviation directions, merge time periods and distinguish between states, and generate an execution path sequence; The trajectory convergence submodule tracks the changes in actions corresponding to each path in chronological order based on the execution path sequence. It records the changes in actions that are continuously and consistently deviated from the time period, and keeps the action state unchanged and records the time points when the direction changes, thereby generating a stable running trajectory.
[0010] As a further aspect of the present invention, the proportional-integral-derivative (PID) control algorithm obtains the aquarium water temperature value under the current time index based on the set value of the corresponding stage in the exposure condition time schedule table, calculates the control deviation between the temperature value and the set value, uses the control deviation as the input of the proportional component and retains the sign direction, accumulates the control deviation under continuous time indices to form an integral component, and records the changing trend of the control deviation under adjacent time indices to form a derivative component. Then, the proportional component, integral component and derivative component are used together to determine the amount of adjustment action change under the current time index, and the process of deviation acquisition, component update and action adjustment is repeated in subsequent time indices.
[0011] As a further aspect of the present invention, the exposed process constraint module includes: The stage identifier identification submodule: Based on the stable operation trajectory of the environment, combined with the definition of state identifiers and state transition order of the finite state machine, it identifies the exposed stage identifier corresponding to the current time and verifies the consistency of the stage order. It reads the corresponding stage number of the operation record one by one along the time index, compares it with the stage number of the adjacent record, records the position of the stage number change and marks the time node, and generates a stage identifier sequence. Phase duration verification submodule: Based on the phase identifier sequence, segment and merge consecutive records with the same phase number, calculate the difference between the start time and end time of each segment, compare the difference with the allowed time interval of the phase item by item, mark the segments that exceed the interval and record their numbers, and generate an abnormal phase record set; Process sequence summary submodule: Based on the abnormal stage record set, summarize all stage numbers and corresponding durations in time index order, retain the association between abnormal markers and stage numbers, arrange the stage records in order and unify the numbering to obtain the exposed process execution sequence.
[0012] As a further embodiment of the present invention, the finite state machine uses the time index recorded in the stable operation trajectory of the environment as the driving sequence, initializes each exposure stage number as a state identifier, reads the corresponding stage number under continuous time index and determines whether the current state is maintained or changed, triggers state switching and records the switching time when a change in stage number is detected, accumulates the time span corresponding to the same stage number during the state maintenance period to form the state dwell time, and compares the state dwell time with the allowed time interval of the stage to mark abnormal states, and summarizes all state identifiers, state dwell times and abnormal marks according to the time index order to form a complete state execution sequence.
[0013] As a further aspect of the present invention, the process trajectory consistency module includes: Stage Trajectory Alignment Submodule: Based on the stable operation trajectory of the environment and the execution sequence of the exposure process, extract the operation records within the corresponding time range of each exposure stage, filter and match the records according to the stage start time, correct the first and last times of the records, remove records that cross adjacent stages and rearrange the time order to generate a stage operation trajectory set; Deviation segment marking submodule: Based on the stage operation trajectory set, check the direction of change of temperature, dissolved oxygen and conductivity values within each stage, continuously mark the time position of the direction reversal, merge adjacent abnormal time periods and record the stage number and time interval, and establish a process deviation time segment set.
[0014] As a further aspect of the present invention, the experimental consistency identification module includes: Deviation Duration Statistics Submodule: Based on the process deviation time segment set, read the start time and end time corresponding to the abnormal segment of each exposure stage one by one, calculate the duration of a single segment in chronological order and accumulate the duration of the same stage segment, and convert the accumulated result with the total duration of the stage to form a stage deviation percentage set. Process Status Archiving Submodule: Based on the set of stage deviation percentages, combined with the order of stage numbers in the exposure process execution sequence, the deviation percentage and stage position relationship are matched stage by stage, the sequential status of each stage in the chronic exposure cycle is sorted out and archived in the complete cycle order, and the experimental process consistency identifier is output.
[0015] A method for controlling zebrafish toxicological exposure experiments, wherein the method is based on the aforementioned zebrafish toxicological exposure experiment control system and includes the following steps: S1: Based on the experimental batch number, aquarium specification identifier, stage identifier field and light start and end field given in the zebrafish toxicology exposure experiment protocol, organize the time sequence of each stage and map them to the same time axis to establish an exposure condition time arrangement table. S2: Based on the exposure condition time schedule table, retrieve the corresponding stage set value according to the time index, and then make a directional judgment with the aquarium water temperature value. Record the adjustment changes under the continuous time index to form a stable environmental operation trajectory. S3: Based on the stable operation trajectory of the environment, identify the exposure stage identifiers corresponding to each time index, verify the stage sequence relationship and count the stage duration, organize the duration and allowable interval to obtain the exposure process execution sequence; S4: Based on the stable operation trajectory of the environment and the execution sequence of the exposure process, extract the operation records within the corresponding time range of each stage, align the start and end times of the stages and mark the abnormal change segments, and establish a set of process deviation time segments; S5: Based on the process deviation time segment set, summarize the duration of abnormal segments in each stage and proportionally adjust it with the total stage duration. Combined with the stage sequence information in the exposure process execution sequence, output the experimental process consistency identifier.
[0016] Compared with the prior art, the advantages and positive effects of the present invention are as follows: 1. In this invention, by introducing the proportional-integral-derivative control algorithm into the water environment regulation process, the control deviation is no longer limited to instantaneous numerical comparison, but is broken down into continuous adjustment criteria with directionality, cumulativeity and trend constraints, so that the aquarium water temperature forms a traceable running trajectory in the time index dimension, avoiding the amplification of short-term fluctuations in the chronic exposure cycle and affecting the biological response judgment. 2. In this invention, by using a finite state machine to expose process constraints, the stage switching that originally depended on confirmation is transformed into a formal process based on state identifiers and switching order, so that each exposed stage forms clear boundaries in terms of time sequence and duration interval, and the comparison between stage dwell time and allowable interval no longer depends on post-event verification. 3. In this invention, by continuously recording the deviation direction and convergence amplitude, the environmental change process is made traceable and stage-separable, which is beneficial to maintaining the adjustment consistency between different aquariums in batch experiments. Moreover, the integrity of the experimental process and the consistency of the stages have a verifiable basis, thereby enhancing the overall synergistic stability of environmental control and process control in toxic biological detection. Attached Figure Description
[0017] Figure 1 This is a system flowchart of the present invention; Figure 2 This is a schematic diagram of the method steps of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0019] Example 1 Please see Figure 1 This invention provides a technical solution: a zebrafish toxicology exposure experiment control system comprising: Exposure condition arrangement module: Based on the zebrafish toxicology exposure experiment protocol, read the experimental batch number and aquarium specification identifier, match the stage identifier and light start and end fields in the protocol, adjust the continuity of stage time boundaries to form a unified time axis mapping relationship, and construct an exposure condition time arrangement table. Environmental stability execution module: Based on the exposure condition time arrangement table, it reads the corresponding stage set value by referring to the current time index, and uses the proportional-integral-derivative control algorithm to handle the control deviation. It judges the direction of the difference between the aquarium water temperature value and the set value, selects the execution path, and generates an environmental stability operation trajectory. Exposure process constraint module: Based on the stable operation trajectory of the environment, according to the constraint method of finite state machine on state identifiers and state transition order, it identifies the exposure stage identifier corresponding to the current time and verifies the consistency of the stage order, calculates the stage duration and compares it with the allowable interval to obtain the exposure process execution sequence; Process trajectory consistency module: Based on the stable operation trajectory of the environment and the execution sequence of the exposed process, it extracts the corresponding operation segments of each stage and aligns the start and end time boundaries of the stage, verifies the parameter change trend within the stage, marks the cross-stage extended trajectory and continuous abnormal segments, and establishes a set of process deviation time segments. Experimental Consistency Identification Module: Based on the process deviation time segment set, it counts the duration of abnormal segments in each stage, calculates the proportion of the stage duration, and combines the exposure process execution sequence to sort out the stage completeness, archives the chronic exposure cycle sequence status, and outputs the experimental process consistency identifier.
[0020] The exposure condition time schedule includes the experimental batch number, stage identifier, start and end times of each stage, and start and end times of illumination. The stable environmental operation trajectory includes the time index, corresponding stage identifier, and temperature change direction information. The exposure process execution sequence includes stage identifier, stage duration, and stage order information. The process deviation time segment set includes deviation stage identifier, deviation start and end times, and deviation duration. The experimental process consistency identifier includes deviation percentage information for each stage and the chronic exposure cycle sequence status.
[0021] The exposure condition orchestration module includes: The scheme field organization submodule: Based on the zebrafish toxicology exposure experiment scheme, read the experimental batch number and aquarium specification identifier, extract the stage identifier field and the light start and end field in the scheme one by one, check the completeness of the fields, and arrange the stage number and time field according to the scheme order, retaining the corresponding relationship unchanged, to form a scheme stage field set; Timeline mapping submodule: Based on the scheme phase field set, it checks the order of phase start time and end time, compares the continuity of adjacent phase time nodes, adjusts time boundaries with intervals and overlaps, arranges all phase time points in a unified order, and constructs an exposure condition time arrangement table. The protocol field organization submodule, based on the zebrafish toxicology exposure experiment protocol text, reads the protocol file line by line, locates the experimental batch number field and limits it to a combination of numbers and letters of no more than 32 characters, reads the aquarium specification identifier and limits it to three preset values: 3 liters, 5 liters, and 10 liters, numbers the stage identifier field in the protocol according to the order of appearance as stage 1, stage 2, and stage 3, reads the corresponding light start time and light end time and limits the time format to 24-hour format and the minute precision to 1 minute, records missing fields as null values, keeps the original order of read fields without adjustment, and writes the stage number, light start time, and light end time into the record row according to the original correspondence, accumulating them one by one to generate the protocol stage field set; The timeline mapping submodule, based on the scheme phase field set, converts the start and end times of illumination for each phase into cumulative minutes since the start of the experiment. The start time of the experiment is recorded as 0 minutes, and the remaining time is converted into integer minutes according to the actual time. The end time of adjacent phases is compared with the start time of the next phase. When the difference between the two is greater than 1 minute, the start time of the next phase is adjusted to the end time of the previous phase plus 1 minute. When the two overlap and the overlap time does not exceed 10 minutes, the end time of the previous phase is adjusted to the start time of the next phase minus 1 minute. All phases are re-sorted according to the corrected minute index and the time field is written back, finally forming a phase time record arranged continuously in minutes, and constructing an exposure condition time arrangement table.
[0022] The environment-stable execution module includes: Phase setting comparison submodule: Based on the exposure condition time arrangement table, read the phase setting value corresponding to the time index and locate the aquarium water temperature value. Combining the definition of control deviation in the proportional integral derivative control algorithm, compare the temperature value with the phase setting value one by one according to the time index, mark the direction of difference and register the time position, and generate a temperature deviation record set. Deviation Path Determination Submodule: Based on the temperature deviation record set, it compares the deviation directions under adjacent time indices, continuously checks the consistency of the deviation directions, merges time periods and distinguishes between states, and generates an execution path sequence; The trajectory convergence submodule tracks the changes in actions corresponding to each path in chronological order based on the execution path sequence. It records the changes in actions that are continuously and consistently deviating from the time period, and keeps the action state unchanged and records the time point when the direction changes, thus generating a stable running trajectory in the environment. The phase setting control submodule, based on the exposure condition time arrangement table, uses a proportional-integral-derivative (PID) control algorithm to traverse the time index in 1-minute increments. It reads the phase setting temperature value corresponding to the current time index, with phase setting temperatures limited to 24, 26, and 28 degrees Celsius. Simultaneously, it reads the aquarium water temperature value, with a temperature sampling resolution of 0.1 degrees Celsius. Utilizing the control deviation definition method in the PID control algorithm, it subtracts the phase setting value from the current temperature value to form a signed deviation. The positive and negative directions of the deviation are recorded and bound to the time index. The deviation direction and absolute value under each time index are written into the recording unit. Continuous writing forms a data set sorted by time, generating a temperature deviation record set. Deviation Path Determination Submodule: Based on the temperature deviation record set, it determines the consistency of continuous deviation direction by reading adjacent records one by one in the order of time index. It compares the deviation direction of the previous time index with that of the next time index. When two or more consecutive time indexes have the same deviation direction, the corresponding time index segments are merged into the same deviation segment, and the segment status is marked as rising or falling. When the deviation direction changes, the previous segment ends and the start and end times of the segment are recorded. Different segments are numbered in the order of appearance and their status is registered. The segments are accumulated one by one to form a sequentially arranged data structure and generate an execution path sequence. The trajectory convergence submodule, based on the execution path sequence, reads the corresponding time range of each deviation segment in sequence according to the path number, using a step-by-step decreasing action amplitude rule. It records the adjustment action change once per minute within the same deviation segment, with the initial action change limited to 0.5 degrees Celsius. Subsequently, it records the action change in 0.1 degrees Celsius increments under the continuous time index. When a path switching time point corresponding to a change in deviation direction is detected, it keeps the action change before the time point from decreasing and records a fixed value. The action change records under each path are written into the trajectory table along with the corresponding time index. Continuous writing forms a complete time series, generating a stable operating trajectory for the environment.
[0023] The proportional-integral-derivative (PID) control algorithm obtains the aquarium water temperature value at the current time index based on the set value of the corresponding stage in the exposure condition time schedule table, calculates the control deviation between the temperature value and the set value, uses the control deviation as the input of the proportional component and retains the sign direction, accumulates the control deviation at continuous time indices to form the integral component, and records the changing trend of the control deviation at adjacent time indices to form the derivative component. Then, the proportional component, integral component and derivative component are used together to determine the amount of adjustment action change at the current time index, and the process of deviation acquisition, component update and action adjustment is repeated in subsequent time indices. The proportional-integral-derivative (PID) control algorithm is based on the formula:
[0024] in: For time index The amount of change in the adjustment action at that time This is the current time index number. This is the historical time index number used in the integral calculation. To identify the exposure phase Determined stage scheduling gain coefficient, For time index The corresponding exposure stage identifier, This is the proportional control coefficient. The integral control coefficient, These are the differential control coefficients. To set the temperature weighting factor, The stage is identified as The set temperature value, For time index The water temperature in the aquarium at that time. For time index The water temperature in the aquarium at that time. For time index Time corresponding stage identifier The set temperature value, The time interval between adjacent time indices. The differential smoothing coefficient is... For time index The water temperature in the aquarium at that time; Execution process: The system indexes at various times. First, determine the current exposure stage identifier based on the exposure condition time schedule. And read the set temperature value corresponding to the stage. Then, the water temperature in the aquarium was collected. By setting a temperature weighting coefficient After correcting the set temperature for the stage, it forms a proportional adjustment term with the current temperature, determined by the proportionality coefficient. Determine the instantaneous adjustment range, and simultaneously adjust the system along the time index direction from... to Historical temperature deviation Accumulate and combine with time intervals The integral adjustment term is formed by the integral coefficient. To constrain chronic offset trends, the system further utilizes the current time index. Compared to the previous time index The differential adjustment term is constructed using the temperature difference, and the differential smoothing coefficient is used to construct the differential adjustment term. Suppressing the effects of short-term noise, and then using the differential coefficients. Limiting the adjustment rate, the final results of the proportional, integral, and derivative terms are multiplied uniformly by the step identifier. Determined stage scheduling gain coefficient Generate a time index The amount of adjustment of the action change It is used to drive the water environment regulation actuator, thereby achieving the continuity, consistency and traceability of water temperature regulation behavior under different exposure stages.
[0025] The exposed process constraint module includes: Stage Identification Submodule: Based on the stable operation trajectory of the environment, combined with the definition of state identifiers and state transition sequence by finite state machine, it identifies the exposed stage identifier corresponding to the current time and verifies the consistency of the stage sequence. It reads the corresponding stage number of the operation record one by one along the time index, compares it with the stage number of adjacent record, records the position of stage number change and marks the time node, and generates a stage identifier sequence. Phase duration verification submodule: Based on the phase identifier sequence, it segments and merges consecutive records with the same phase number, calculates the difference between the start time and end time of each segment, compares the difference with the allowed time interval of the phase item by item, marks the segments that exceed the interval and records their numbers, and generates an abnormal phase record set. Process Sequence Summary Submodule: Based on the abnormal stage record set, it summarizes all stage numbers and corresponding durations in time index order, retains the association between abnormal markers and stage numbers, and arranges the stage records in order and unifies the numbering to obtain the exposed process execution sequence. Stage Identification Submodule: Based on the stable operation trajectory of the environment, a finite state machine is used to use the exposed stage number as the state identifier set and the set size is limited to no more than 8. The stage number is read one by one in the record order. The state switching confirmation window length is introduced as the switching judgment condition of three consecutive records with consistent changes. At the same time, the state jitter ignore threshold is set so that a single change with less than two consecutive records is not counted as a switch. For the confirmed switch, the position index of the switch occurrence is recorded and the before and after numbers of the state are registered. All valid state identifiers and switching nodes are written into the sequence table in order to generate the stage identifier sequence. Phase Duration Verification Submodule: Based on the phase identifier sequence, it performs interval merging operations on consecutive identical state identifiers through segmented dwell statistics. During the merging process, a maximum allowable number of state bounces is introduced. The same phase number cannot be repeated more than once in 20 adjacent records. Segments exceeding the number of bounces are not included in the dwell statistics. The difference between the starting record index and the ending record index is calculated to form the segment length for the retained segment. The segment length is compared with the allowed interval of the phase. Only the segment number and corresponding state number that exceed the interval are recorded, generating an abnormal phase record set. The process sequence summary submodule: Based on the abnormal stage record set, it uses a sequential mapping method to establish a mapping relationship between all status numbers in the stage identifier sequence according to the order of their first appearance. For each complete traversal, all stage numbers are written into a status sequence integrity verification flag. Abnormal segment numbers are embedded into the corresponding stage mapping records, keeping the original record order unchanged. For duplicate stage numbers, only the existing mapping numbers are referenced. The summary forms a continuous status list, resulting in the exposed process execution sequence.
[0026] The finite state machine uses the time index recorded in the stable operation trajectory of the environment as the driving sequence. Each exposure stage number is initialized as a state identifier. Under the continuous time index, the corresponding stage number is read and the current state is determined to be either maintained or changed. When a change in stage number is detected, a state switch is triggered and the switch time is recorded. During the state maintenance period, the time span corresponding to the same stage number is accumulated to form the state dwell time. The state dwell time is compared with the allowed time interval of the stage to mark abnormal states. All state identifiers, state dwell times and abnormal marks are summarized in the order of time index to form a complete state execution sequence. Finite state machines, according to the formula:
[0027] in: For the first Each state execution unit This is the index for the status segment number. For the first The status identifier corresponding to each status segment. For the first State dwell time for each state segment For the first Anomaly marking results for each state segment, For time indexing The function that reads the exposure phase number and maps it to a status identifier outputs the value. This is a mapping function from stage number to status identifier. For the first The start time index of each state segment. For the first Index of the next state transition time after the end of a state segment. A fixed time interval between adjacent time indices. This is an indicator function that takes the value when the condition within the parentheses is true. Otherwise, the value is , The status is marked as The minimum permitted stay time for each stage, The status is marked as The maximum allowed stay time for each stage, The status is marked as The corresponding permitted stay time range; Execution process: First, in the... Index of start time of each state segment At that point, through the mapping function Convert the exposure stage number read from the time index into a status identifier. Then, the location where the stage number changes is detected along the time index direction, and the next switching time index is determined. Then use a fixed time interval index difference Converted to state dwell time Next, read the status identifier from the exposure phase time constraint configuration. The corresponding minimum permitted stay time and the maximum permitted length of stay and state dwell time Compare and judge with the allowed interval, when When it falls outside the allowed range, it is indicated by the function. Generate exception markers Otherwise, a non-abnormal marker is generated. Finally, the status will be marked. State dwell time and exception markers Combined to form a state execution unit And according to the state segment number The ascending sequence is used to construct a complete execution sequence of the exposed process status.
[0028] The process trajectory consistency module includes: Phase Trajectory Alignment Submodule: Based on the stable operation trajectory of the environment and the execution sequence of the exposure process, it extracts the operation records within the corresponding time range of each exposure phase, filters and matches the records according to the start time of the phase, corrects the first and last times of the records, removes records that cross adjacent phases, rearranges the time order, and generates a set of phase operation trajectories. Deviation segment marking submodule: Based on the stage operation trajectory set, it checks the direction of change of temperature, dissolved oxygen and conductivity values within each stage, continuously marks the time position of the direction reversal, merges adjacent abnormal time periods and records the stage number and time interval, and establishes a process deviation time segment set. The stage trajectory alignment submodule reads the start and end time indices of each stage in the exposure process execution sequence based on the stable environmental operation trajectory and the exposure process execution sequence. It then performs a point-by-point matching operation on the time index sequence recorded in the stable environmental operation trajectory using the algorithm's time scaling alignment rule. The trajectory segments with offsets of no more than 5 records before and after the stage start time are included in the candidate set. The minimum matching path is determined by calculating the cumulative path cost of the time index difference for each segment. The time indices at the beginning and end of the matching path are corrected and written. At the same time, the running records that cross adjacent stage numbers are marked for deletion and removed from the sequence. The remaining records are then reordered and renumbered according to the time index. The continuous running records corresponding to each stage are written into an independent trajectory list to generate a stage running trajectory set. Deviation Segment Marking Submodule: Based on the stage operation trajectory set, the module reads temperature, dissolved oxygen, and conductivity values one by one in the recorded order of each stage trajectory through sequence alignment marking based on direction continuity determination. It calculates the direction of value change between two adjacent records and marks the position where the same parameter has two or more consecutive opposite directions as a direction reversal point. It expands no more than three records before and after the direction reversal point to form candidate abnormal segments. At the same time, it performs a merging marking operation on the reversal of different parameters at the same time index. It merges candidate segments with consecutive time indices and an interval of no more than two records and writes the stage number, segment start time index, and end time index. After traversing all stages, it summarizes all marked segments and establishes a process deviation time segment set.
[0029] The experiment consistency identification module includes: Deviation Duration Statistics Submodule: Based on the process deviation time segment set, read the start time and end time corresponding to the abnormal segment of each exposure stage one by one, calculate the duration of a single segment in chronological order and accumulate the duration of the same stage segment, and convert the accumulated result with the total duration of the stage to form a stage deviation percentage set; Process Status Archiving Submodule: Based on the stage deviation percentage set and combined with the stage number arrangement order in the exposure process execution sequence, the deviation percentage and stage position relationship are matched stage by stage, the sequential status of each stage in the chronic exposure cycle is sorted out and archived in the complete cycle order, and the experimental process consistency identifier is output. Deviation Duration Statistics Submodule: Based on the process deviation time segment set, it reads abnormal segment records one by one. The record content is limited to stage number, start time index, and end time index. The time index unit is set to 1 minute. For a single segment, the duration is obtained by subtracting the start time index from the end time index. The duration is taken as an integer value in minutes. No more than 50 abnormal segments are allowed under the same stage number. The duration of each segment is added up to form the stage abnormal total duration record. At the same time, the total duration corresponding to the stage is read from the exposed process execution sequence. The total duration of the stage is limited to the range of 300 minutes to 4320 minutes. The stage abnormal total duration is proportionally converted to the stage total duration. The proportional result is retained to 2 decimal places and written into the record for each stage to generate a stage deviation percentage set. The process status archiving submodule, based on the stage deviation percentage set, uses sequential mapping archiving to read stage numbers one by one along the execution sequence of the exposed process. The allowed range for stage numbers is set from 1 to 8. Each stage number is matched with the corresponding deviation percentage record and bound to the sequential index value in the process sequence. The sequential index starts from 1 and increments. The sequential index of the same stage number is recorded only once in the same cycle. When the number of stage numbers in the complete process cycle reaches a preset value, a cycle completion flag is written. The cycle completion flag is set to 1, and the remaining records are set to 0. The stage number, sequential index, deviation percentage, and cycle completion flag are written to the archiving record table and stored continuously in cycle order. The consistency identifier of the experimental process is output.
[0030] Please see Figure 2 A method for controlling zebrafish toxicological exposure experiments includes the following steps: S1: Based on the experimental batch number, aquarium specification identifier, stage identifier field and light start and end field given in the zebrafish toxicology exposure experiment protocol, organize the time sequence of each stage and map them to the same time axis to establish an exposure condition time arrangement table. S2: Based on the exposure condition time schedule, retrieve the corresponding stage set value according to the time index, and then make a directional judgment with the aquarium water temperature value. Record the adjustment changes under the continuous time index to form a stable environmental operation trajectory. S3: Based on the stable operation trajectory of the environment, identify the exposure stage identifiers corresponding to each time index, verify the stage sequence relationship and count the stage duration, organize the duration and allowable interval to obtain the exposure process execution sequence; S4: Based on the stable operation trajectory of the environment and the execution sequence of the exposed process, extract the operation records within the corresponding time range of each stage, align the start and end times of the stages and mark the abnormal change segments, and establish a set of process deviation time segments; S5: Based on the process deviation time segment set, summarize the duration of abnormal segments in each stage and proportionally adjust it with the total stage duration. Combined with the stage sequence information in the exposure process execution sequence, output the experimental process consistency identifier.
[0031] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A control system for zebrafish toxicological exposure experiments, characterized in that, The system includes: Exposure condition arrangement module: Based on the zebrafish toxicology exposure experiment protocol, read the experimental batch number and aquarium specification identifier, match the stage identifier and light start and end fields in the protocol, adjust the continuity of stage time boundaries to form a unified time axis mapping relationship, and construct an exposure condition time arrangement table. Environmental stability execution module: Based on the exposure condition time arrangement table, it reads the corresponding stage set value by referring to the current time index, and uses the proportional-integral-derivative control algorithm to handle the control deviation. It judges the direction of the difference between the aquarium water temperature value and the set value, selects the execution path, and generates an environmental stability operation trajectory. Exposure process constraint module: Based on the stable operation trajectory of the environment, according to the constraint method of finite state machine on state identifiers and state transition order, it identifies the exposure stage identifier corresponding to the current time and verifies the consistency of the stage order, calculates the stage duration and compares it with the allowable interval to obtain the exposure process execution sequence; Process trajectory consistency module: Based on the stable operation trajectory of the environment and the execution sequence of the exposed process, it extracts the corresponding operation segments of each stage and aligns the start and end time boundaries of the stage, verifies the parameter change trend within the stage, marks the cross-stage extended trajectory and continuous abnormal segments, and establishes a set of process deviation time segments. Experimental Consistency Identification Module: Based on the process deviation time segment set, it counts the duration of abnormal segments in each stage, calculates the proportion of the stage duration, and combines the exposure process execution sequence to sort out the stage completeness, archives the chronic exposure cycle sequence status, and outputs the experimental process consistency identifier.
2. The zebrafish toxicology exposure experimental control system according to claim 1, characterized in that, The exposure condition time schedule includes the experimental batch number, stage identifier, start and end times of each stage, and start and end times of illumination. The stable environmental operation trajectory includes a time index, corresponding stage identifier, and temperature change direction information. The exposure process execution sequence includes stage identifier, stage duration, and stage order information. The process deviation time segment set includes deviation stage identifier, deviation start and end times, and deviation duration. The experimental process consistency identifier includes deviation percentage information for each stage and the chronic exposure cycle sequence status.
3. The zebrafish toxicology exposure experimental control system according to claim 1, characterized in that, The exposure condition orchestration module includes: The scheme field organization submodule: Based on the zebrafish toxicology exposure experiment scheme, read the experimental batch number and aquarium specification identifier, extract the stage identifier field and the light start and end field in the scheme one by one, check the completeness of the fields, and arrange the stage number and time field according to the scheme order, retaining the corresponding relationship unchanged, to form the scheme stage field set; Time axis mapping submodule: Based on the stage field set of the scheme, it checks the order of stage start time and end time, compares the continuity of adjacent stage time nodes, adjusts time boundaries with intervals and overlaps, arranges all stage time points in a unified order, and constructs an exposure condition time arrangement table.
4. The zebrafish toxicology exposure experimental control system according to claim 1, characterized in that, The environment stabilization execution module includes: Stage setting comparison submodule: Based on the exposure condition time arrangement table, read the stage setting value corresponding to the time index and locate the aquarium water temperature value. Combined with the definition of control deviation in the proportional integral derivative control algorithm, compare the temperature value with the stage setting value one by one according to the time index, mark the direction of difference and register the time position, and generate a temperature deviation record set. Deviation path determination submodule: Based on the temperature deviation record set, compare the deviation directions under adjacent time indices, continuously check the consistency of the deviation directions, merge time periods and distinguish between states, and generate an execution path sequence; The trajectory convergence submodule tracks the changes in actions corresponding to each path in chronological order based on the execution path sequence. It records the changes in actions that are continuously and consistently deviated from the time period, and keeps the action state unchanged and records the time point when the direction changes, thereby generating a stable running trajectory in the environment.
5. The zebrafish toxicology exposure experimental control system according to claim 1, characterized in that, The proportional-integral-derivative (PID) control algorithm obtains the aquarium water temperature value at the current time index based on the set value of the corresponding stage in the exposure condition time schedule table, calculates the control deviation between the temperature value and the set value, uses the control deviation as the input of the proportional component and retains the sign direction, accumulates the control deviation at continuous time indices to form the integral component, and records the changing trend of the control deviation at adjacent time indices to form the derivative component. Then, the proportional component, integral component and derivative component are used together to determine the amount of adjustment action change at the current time index, and the process of deviation acquisition, component update and action adjustment is repeated in subsequent time indices.
6. The zebrafish toxicology exposure experimental control system according to claim 1, characterized in that, The exposure process constraint module includes: The stage identifier identification submodule: Based on the stable operation trajectory of the environment, combined with the definition of state identifiers and state transition order of the finite state machine, it identifies the exposed stage identifier corresponding to the current time and verifies the consistency of the stage order. It reads the corresponding stage number of the operation record one by one along the time index, compares it with the stage number of the adjacent record, records the position of the stage number change and marks the time node, and generates a stage identifier sequence. Phase duration verification submodule: Based on the phase identifier sequence, segment and merge consecutive records with the same phase number, calculate the difference between the start time and end time of each segment, compare the difference with the allowed time interval of the phase item by item, mark the segments that exceed the interval and record the number, and generate an abnormal phase record set; Process sequence summary submodule: Based on the abnormal stage record set, summarize all stage numbers and corresponding durations in time index order, retain the association between abnormal markers and stage numbers, arrange the stage records in order and unify the numbering to obtain the exposed process execution sequence.
7. The zebrafish toxicology exposure experiment control system according to claim 1, characterized in that, The finite state machine uses the time index recorded in the stable operation trajectory of the environment as the driving sequence, initializes each exposure stage number as a state identifier, reads the corresponding stage number under continuous time index and determines whether the current state is maintained or changed, triggers state switching and records the switching time when a change in stage number is detected, accumulates the time span corresponding to the same stage number during the state maintenance period to form the state dwell time, compares the state dwell time with the allowed time interval of the stage to mark abnormal states, and summarizes all state identifiers, state dwell times and abnormal marks according to the time index order to form a complete state execution sequence.
8. The zebrafish toxicology exposure experimental control system according to claim 1, characterized in that, The process trajectory consistency module includes: Stage Trajectory Alignment Submodule: Based on the stable operation trajectory of the environment and the execution sequence of the exposure process, extract the operation records within the corresponding time range of each exposure stage, filter and match the records according to the stage start time, correct the first and last times of the records, remove records that cross adjacent stages and rearrange the time order to generate a stage operation trajectory set; Deviation segment marking submodule: Based on the stage operation trajectory set, check the direction of change of temperature, dissolved oxygen and conductivity values within each stage, continuously mark the time position of the direction reversal, merge adjacent abnormal time periods and record the stage number and time interval, and establish a process deviation time segment set.
9. The zebrafish toxicology exposure experimental control system according to claim 1, characterized in that, The experiment consistency identification module includes: Deviation Duration Statistics Submodule: Based on the process deviation time segment set, read the start time and end time corresponding to the abnormal segment of each exposure stage one by one, calculate the duration of a single segment in chronological order and accumulate the duration of the same stage segment, and convert the accumulated result with the total duration of the stage to form a stage deviation percentage set. Process Status Archiving Submodule: Based on the set of stage deviation percentages, combined with the order of stage numbers in the exposure process execution sequence, the deviation percentage and stage position relationship are matched stage by stage, the sequential status of each stage in the chronic exposure cycle is sorted out and archived in the complete cycle order, and the experimental process consistency identifier is output.
10. A method for controlling zebrafish toxicological exposure experiments, characterized in that, The zebrafish toxicology exposure experiment control system according to any one of claims 1-9 includes the following steps: S1: Based on the experimental batch number, aquarium specification identifier, stage identifier field and light start and end field given in the zebrafish toxicology exposure experiment protocol, organize the time sequence of each stage and map them to the same time axis to establish an exposure condition time arrangement table. S2: Based on the exposure condition time schedule table, retrieve the corresponding stage set value according to the time index, and then make a directional judgment with the aquarium water temperature value. Record the adjustment changes under the continuous time index to form a stable environmental operation trajectory. S3: Based on the stable operation trajectory of the environment, identify the exposure stage identifiers corresponding to each time index, verify the stage sequence relationship and count the stage duration, organize the duration and allowable interval to obtain the exposure process execution sequence; S4: Based on the stable operation trajectory of the environment and the execution sequence of the exposure process, extract the operation records within the corresponding time range of each stage, align the start and end times of the stages and mark the abnormal change segments, and establish a set of process deviation time segments; S5: Based on the process deviation time segment set, summarize the duration of abnormal segments in each stage and proportionally adjust it with the total stage duration. Combined with the stage sequence information in the exposure process execution sequence, output the experimental process consistency identifier.