Method and system for modeling a zebrafish stroke model based on hemodynamics
By using a hemodynamic-based approach to monitor blood flow velocity in real time and dynamically adjust light intensity, and employing hysteresis band and dual-modal control, the individual differences and physiological tremors in existing zebrafish stroke models have been addressed, thereby improving the accuracy and stability of the model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG UNIV OF TRADITIONAL CHINESE MEDICINE
- Filing Date
- 2026-03-03
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies, when constructing zebrafish stroke models, neglect individual differences in blood circulation rates, resulting in excessively large dispersion of the model's pathological state. This makes it difficult to accurately capture the critical transition point for thrombus formation. Furthermore, the adjustment of light intensity can lead to false triggering and response delays, disrupting the physiologically progressive process of thrombus formation.
By using a hemodynamic-based approach, blood flow velocity values are monitored in real time and light intensity is dynamically adjusted. By employing hysteresis band and dual-modal control mechanisms, the critical transition point for thrombus formation is accurately captured, avoiding false triggering and response delay, and ensuring the physiological gradualness of light intensity regulation.
This improved the uniformity and stability of the zebrafish stroke model, ensuring the accuracy and physiological progressiveness of the thrombosis process, and overcoming the control problems caused by individual differences and physiological fluctuations in traditional methods.
Smart Images

Figure CN122158165A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of closed-loop adaptive light control technology, and more specifically, this application relates to a modeling method and system for zebrafish stroke based on hemodynamics. Background Technology
[0002] Zebrafish stroke models are important tools for studying the pathological mechanisms of cerebrovascular disease. Their core lies in the precise induction of blood flow blockage in target brain regions through photochemical thrombosis. Current techniques employ a photosensitizer-mediated cold light irradiation scheme: first, a photosensitizer is injected into the zebrafish's circulatory system; then, a cold light source with a wavelength range of 405-470 nm is used to directionally irradiate the target cerebral vascular region. Under photochemical reactions, endothelial damage and platelet aggregation are stimulated, ultimately forming ischemic thrombi. During this process, the system operation is highly dependent on preset parameters, and the light source intensity is typically fixed at a certain value. The irradiation time was uniformly set to 20-25 minutes, and the countdown ended as the sign of modeling completion. Although this scheme has the advantage of ease of operation, its underlying logic is to regard thrombosis as a linear process in time, that is, to assume that all zebrafish individuals produce a uniform physiological response under the same physical stimulation.
[0003] Existing technologies for constructing zebrafish stroke models rely on fixed-duration cold light irradiation to induce thrombus formation. This method ignores individual differences in blood circulation rate, resulting in excessive dispersion of the model's pathological state. Furthermore, it suffers from the following bottlenecks: physiological fluctuations in blood flow velocity cause frequent false triggers of traditional threshold control, while simply expanding the control dead zone delays response speed, making it difficult to accurately capture the critical transition point for thrombus formation. Moreover, limited by the minimum resolvable increment of light intensity adjustment, the residuals generated by the continuous truncation of light adjustment commands oscillate and amplify within the system, ultimately leading to sudden jumps in light intensity and disrupting the physiologically gradual process of thrombus formation. Therefore, a hemodynamic-based zebrafish stroke modeling method and system are proposed to address this problem. Summary of the Invention
[0004] To address the aforementioned technical problems, this paper provides a method and system for modeling zebrafish stroke based on hemodynamics. This technical solution solves the problems mentioned in the background section.
[0005] To achieve the above objectives, the technical solution of the present invention is as follows:
[0006] In a first aspect, this application provides a method for modeling a zebrafish stroke model based on hemodynamics, the method comprising:
[0007] The target area image is acquired according to the preset sampling period and the blood flow velocity value is calculated. The light intensity and basic increment are initialized and the control state is set to coarse induction state.
[0008] The hysteresis band is calculated based on the fluctuation amplitude of the blood flow velocity value, and the target range is set with a preset target threshold as the center and the hysteresis band as the full width.
[0009] In the coarse induction state, the sign and magnitude of the basic increment are determined based on the relative position of the blood flow velocity value and the target interval. The correlation characteristics between the changes in light intensity and blood flow velocity value are statistically analyzed to generate response direction labels and amplitude classification coefficients. When the blood flow velocity value enters the target interval and reaches the preset stable duration, the system switches to the fine adjustment state.
[0010] In fine-tuning mode, based on the response direction label and amplitude grading coefficient, combined with the deviation between the blood flow velocity value and the preset target threshold and the changing trend of adjacent sampling cycles, the sign and magnitude of the basic increment are updated, and when the blood flow velocity value continuously reaches the preset number of times outside the target interval, it switches back to coarse induction mode.
[0011] In control mode, the modulus of the base increment is limited by a preset increment range, the limited base increment is added to the current light intensity, and aligned to the nearest resolvable increment to perform light adjustment;
[0012] When the blood flow velocity value remains within the target range for the preset modeling time, the light intensity is set to zero and the control state is terminated.
[0013] Secondly, this application provides a hemodynamic-based zebrafish stroke modeling system for implementing the hemodynamic-based zebrafish stroke modeling method described in any of the above claims, including:
[0014] The system initialization module is used to acquire images of the target area according to a preset sampling period and calculate blood flow velocity values, initialize light intensity and baseline increment, and set the control state to coarse induction state.
[0015] The target interval setting module is used to calculate the hysteresis band based on the jitter amplitude of the blood flow velocity value, and to set the target interval with a preset target threshold as the center and the hysteresis band as the full width.
[0016] The coarse induction control module is used to determine the sign and magnitude of the basic increment based on the relative position of the blood flow velocity value and the target interval in the coarse induction state, and simultaneously generate response direction labels and amplitude grading coefficients by statistically analyzing the correlation characteristics between the changes in light intensity and blood flow velocity value. When the blood flow velocity value enters the target interval and reaches the preset stable duration, it switches to the fine adjustment state.
[0017] The fine-tuning control module is used to update the sign and magnitude of the basic increment in the fine-tuning state, based on the response direction label and amplitude grading coefficient, combined with the deviation between the blood flow velocity value and the preset target threshold and the changing trend of adjacent sampling cycles. When the blood flow velocity value continuously reaches a preset number of times outside the target range, it switches back to the coarse induction state.
[0018] The illumination adjustment execution module is used to limit the modulus of the base increment within a preset increment range under control, add the limited base increment to the current illumination intensity, and align it to the nearest resolvable increment to perform illumination adjustment.
[0019] The control termination module is used to set the light intensity to zero and terminate the control state when the blood flow velocity value remains within the target range for a preset modeling time.
[0020] Thirdly, this application provides a computer device, the computer device including a memory and a processor, the memory storing code, and the processor being configured to acquire the code and execute the above-described hemodynamic-based zebrafish stroke modeling method.
[0021] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described hemodynamic-based zebrafish stroke modeling method.
[0022] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0023] This application uses an event-driven termination mechanism, which stops illumination when the blood flow velocity remains within the target range for a preset duration. This overcomes the shortcomings of traditional fixed-duration schemes that ignore individual differences in thrombus formation rate, enabling zebrafish with different circulatory characteristics to achieve similar thrombus maturity and improving the uniformity of the model.
[0024] This application overcomes the contradiction between false triggering and response delay caused by physiological jitter through dual-mode switching control and dynamic hysteresis band update. It can adaptively capture the critical transition point of thrombus formation and reduce the recognition delay of the critical transition point even under strong noise interference.
[0025] This application employs a strategy that combines the alignment of the accumulated value in the compensation pool with a release-lock mechanism to ensure the physiological gradualness of light intensity regulation, keeping the step change amplitude of light intensity within an appropriate range, and ensuring that the thrombosis curve closely matches the logical growth model curve. Attached Figure Description
[0026] The disclosure of this invention is illustrated with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. Wherein:
[0027] Figure 1 This is a flowchart of the zebrafish stroke modeling method based on hemodynamics proposed in this invention;
[0028] Figure 2 This is a structural block diagram of the zebrafish stroke modeling system based on hemodynamics proposed in this invention. Detailed Implementation
[0029] It is readily understood that, based on the technical solution of this invention, those skilled in the art can propose various interchangeable structural methods and implementations without altering the essential spirit of the invention. Therefore, the following detailed embodiments and accompanying drawings are merely illustrative examples of the technical solution of this invention and should not be considered as the entirety of the invention or as limitations or restrictions on the technical solution of this invention.
[0030] In existing technologies, zebrafish stroke models rely on fixed-duration cold light irradiation to induce thrombus formation, ignoring individual differences in blood circulation rates. This results in a high degree of dispersion in the model's pathological state. Furthermore, physiological fluctuations in blood flow velocity cause frequent false triggers in traditional threshold control. Expanding the control dead zone can easily lead to response speed delays, making it difficult to accurately capture the critical transition point of thrombus formation. At the same time, limited by the minimum resolvable increment of light intensity adjustment, the residuals generated by the continuous truncation of light intensity adjustment commands oscillate and amplify within the system, ultimately causing sudden changes in light intensity and disrupting the physiologically gradual process of thrombus formation.
[0031] To solve the above problems, refer to Figure 1 As shown, this application proposes a hemodynamic-based modeling method for zebrafish stroke, including:
[0032] The target area image is acquired according to the preset sampling period and the blood flow velocity value is calculated. The light intensity and the baseline increment are initialized, and the control state is set to the coarse induction state. The light intensity is initialized to a fixed empirical value, and the baseline increment is initialized to zero.
[0033] It should be noted that the target region image can be a zebrafish target brain region image, which is periodically captured by a microscopic imaging system. The captured image sequence is processed by particle image velocimetry (PIV) or Doppler ultrasound technology to generate a quantitative value reflecting the blood flow rate as a blood flow velocity value, and this blood flow velocity value is used as a feedback signal input for the control state.
[0034] The hysteresis band is calculated based on the fluctuation amplitude of the blood flow velocity value, and the target range is set with a preset target threshold as the center and the hysteresis band as the full width.
[0035] It should be noted that the hysteresis band is a dynamic buffer zone introduced to avoid frequent switching or oscillation near the preset target threshold, which helps to improve the stability of the control state; the target range refers to the blood flow velocity range centered on the preset target threshold and with the hysteresis band set to its full width. When the blood flow velocity value is within this range, it indicates that the thrombosis process is in an ideal or near-ideal state; the critical flow velocity for microvascular thrombosis formation in zebrafish brain is 2.8-3.2 mm / s, therefore, the preset target threshold can be taken as 3.0 mm / s;
[0036] In the coarse induction state, the sign and magnitude of the baseline increment are determined based on the relative position of the blood flow velocity value and the target interval. Simultaneously, the correlation characteristics between the changes in light intensity and blood flow velocity value are statistically analyzed to generate response direction labels and amplitude grading coefficients. When the blood flow velocity value enters the target interval and reaches the preset stabilization time, the system switches to the fine adjustment state. The preset stabilization time can be 5 seconds, i.e., 10 sampling cycles.
[0037] In fine-tuning mode, based on the response direction label and amplitude grading coefficient, and combined with the deviation between the blood flow velocity value and the preset target threshold and the changing trend of adjacent sampling cycles, the sign and magnitude of the basic increment are updated. When the blood flow velocity value continuously reaches a preset number of times outside the target interval, the system switches back to coarse induction mode. For example, the preset number of times can be 3.
[0038] In control mode, the modulus of the base increment is limited by a preset increment range. The limited base increment is then added to the current light intensity and aligned with the nearest resolvable increment to perform light adjustment. The preset increment range can be set to... ;
[0039] It should be noted that the control states include coarse induction state, fine adjustment state, and termination state. The coarse induction state is used to make rapid adjustments when the blood flow velocity value deviates significantly from the target range, while the fine adjustment state is used to make fine control when the blood flow velocity value is close to the target range.
[0040] When the blood flow velocity value remains within the target range for the preset modeling time, the light intensity is set to zero and the control state is terminated; among them, the average time of no less than 50 groups of experiments based on the complete formation of zebrafish thrombus is 115±5 seconds, and the preset modeling time can be 120 seconds.
[0041] Through the above technical solution, this application overcomes the limitations of traditional fixed-duration irradiation schemes that ignore individual differences by monitoring blood flow velocity values in real time and dynamically adjusting light intensity. By introducing hysteresis band and coarse-fine adjustment control mechanisms, it can adapt to physiological fluctuations in blood flow velocity values, accurately capture the critical transition point of thrombus formation, avoid false triggering and response delay, limit the amplitude of the basic increment of light intensity adjustment and align it to the minimum resolvable increment, suppress residual oscillations and sudden jumps in light intensity, ensure the physiologically gradual process of thrombus formation, and ultimately improve the accuracy and stability of zebrafish stroke model construction.
[0042] In an optional embodiment, the hysteresis band is calculated based on the jitter amplitude of the blood flow velocity value and the minimum resolvable increment of the light intensity, specifically including:
[0043] The sampling period includes a sampling sub-period and an adjustment sub-period, wherein the sampling sub-period is used to acquire the target area image, the adjustment sub-period is used to adjust the light intensity, and a first time window is set within the sampling sub-period and a second time window is set within the adjustment sub-period.
[0044] It should be noted that the sampling sub-period is triggered at the start of the sampling period to continuously capture images of the target area, and the adjustment sub-period is switched immediately after the sampling sub-period ends. For example, based on the requirement of covering at least 3 complete pulsation cycles of zebrafish cerebral arteries, the sampling sub-period can be 300ms, and based on the LED driver response delay plus the communication transmission delay, the adjustment sub-period can be 200ms. Therefore, the sampling period can be set to 500ms.
[0045] To further explain, to eliminate the jitter of the first and last frames of the imaging device and retain the stable data stream in the middle 200ms, the starting point of the first time window is set to 50ms of the sampling sub-period, and the length is 200ms; the starting point of the second time window is set to 20ms of the adjustment sub-period, and the length is 150ms.
[0046] Within the first time window, the fluctuation amplitude of the blood flow velocity value is calculated using the median absolute deviation; where the calculation window for the median absolute deviation is all sampling points within the first time window;
[0047] The half-width of the hysteresis band is calculated by weighting the minimum resolvable increment of jitter amplitude and illumination intensity, and is updated with the sampling cycle using a first-order exponential smoothing method. The half-width of the hysteresis band is updated at the end of the sampling sub-period of the current sampling cycle and takes effect immediately in the adjustment sub-period of the same sampling cycle. This allows the width of the hysteresis band to dynamically adapt to the long-term trend of the jitter amplitude of the blood flow velocity value, while also having a certain degree of lag, thus avoiding frequent and drastic changes in the hysteresis band caused by instantaneous fluctuations.
[0048] For example, taking a 12-bit DAC resolution LED driver as an example, its corresponding minimum resolvable increment is... The formula for calculating the hysteresis band half-width is:
[0049] ;
[0050] In the formula, The hysteresis band half-width is the current sampling period, and MAD is the median absolute deviation. The smallest resolvable increment of light intensity. , These are weighting coefficients, and their sum is 1; for example, , The values can be 0.25 and 0.75 respectively. The conversion factor is in units of 1 / 2. , and The dimension of is mm / s;
[0051] MAD characterizes the natural physiological fluctuations and measurement noise of blood flow velocity; it is an inherent variability of the controlled object. The limitation on the adjustment accuracy of the illumination system is the discreteness of the actuator, and both affect the stability of the control.
[0052] The expression for first-order exponential smoothing is:
[0053] ;
[0054] In the formula, This is the smoothed value of the hysteresis band half-width for the current sampling period. This is the smoothed value of the hysteresis band half-width from the previous sampling period. The hysteresis band half-width for the current sampling period. It is a smoothing factor and can be 0.6;
[0055] The above technical solution combines the fluctuation amplitude of blood flow velocity with the minimum resolvable increment of light intensity in a weighted manner, and calculates the fluctuation amplitude using the median absolute deviation. This not only considers the physiological fluctuations and measurement noise of blood flow velocity itself, but also takes into account the physical discreteness of the light adjustment hardware, avoiding frequent oscillations of the system at the edge of the target range caused by excessively large light adjustment steps. By dynamically updating the hysteresis band using a first-order exponential smoothing method, it can adapt to the slow changes in hemodynamic characteristics, maintain the stability and accuracy of control, and reduce unnecessary control actions.
[0056] In an optional embodiment, the sign and magnitude of the baseline increment are determined based on the relative position of the blood flow velocity value and the target interval. Simultaneously, the correlation characteristics between changes in light intensity and blood flow velocity value are statistically analyzed to generate response direction labels and amplitude grading coefficients, specifically including:
[0057] During the sampling sub-period, when the blood flow velocity value is higher than the upper limit of the target interval, the sign is negative; when it is lower than the lower limit of the target interval, the sign is positive; and when it is within the target interval, the base increment is set to zero.
[0058] Calculate the absolute difference between the blood flow velocity value and the nearest boundary of the target interval, and determine the modulus of the basic increment according to the preset increment mapping table;
[0059] For example, the absolute difference is denoted as (mm / s), the preset incremental mapping table can be:
[0060] when At that time, the modulus of the basic increment is taken as ;when At that time, the modulus of the basic increment is taken as ;when At that time, the modulus of the basic increment is taken as ;when At that time, the modulus of the basic increment is taken as ;
[0061] Within the second time window, the sign of the product of the change in light intensity and the change in blood flow velocity is calculated. The sign of the product that accounts for a proportion exceeding a preset proportion threshold within the second time window is used as the response direction label. If no product sign accounts for a proportion exceeding the preset proportion threshold, the response direction label is recorded as uncertain. For example, the preset proportion threshold can be 75%.
[0062] It should be noted that within the second time window, the product sign can indicate whether the change in light intensity and the change in blood flow velocity are in the same or opposite directions. If the increase in light intensity leads to an increase in blood flow velocity, the product sign is positive, and vice versa. The product sign with a proportion exceeding a preset proportion threshold is used as the response direction label. If no single product sign has a proportion exceeding the preset proportion threshold, the response direction label is recorded as uncertain, which indicates that the system response may be unstable or have a complex nonlinear relationship.
[0063] The amplitude grading coefficient is determined by comparing the absolute value of the change in blood flow velocity to the absolute value of the change in light intensity with a preset ratio range; where the absolute value ratio reflects the amplitude of the change in blood flow velocity caused by a unit change in light intensity.
[0064] For example, the ratio of absolute values is denoted as k, and the preset ratio range is: when When, the amplitude grading coefficient is 1; when When, the amplitude grading coefficient is 2; when At that time, the amplitude grading coefficient is set to 3; to adapt to the nonlinear characteristics of the physiological response of zebrafish vasoconstriction: when At that time, it indicates the initial stage of vascular endothelial injury; when When, it represents the main phase of thrombosis; when This period represents the risk period for vasospasm.
[0065] Through the above technical solution, under the coarse induction state, the sign and magnitude of the basic increment are determined according to the relative position of the blood flow velocity value and the target interval, accelerating the convergence of the blood flow velocity value to the target interval. At the same time, by synchronously statistically analyzing the correlation characteristics between changes in light intensity and blood flow velocity value, response direction labels and amplitude classification coefficients are generated. This enables dynamic quantification of the response behavior of blood flow velocity value to changes in light intensity, providing key guidance for subsequent fine-tuning. It avoids the oscillation or slow convergence problems that may be caused by blind adjustments after entering the fine-tuning state, thus improving the control accuracy and efficiency of zebrafish stroke model modeling.
[0066] In an optional embodiment, based on the response direction label and amplitude grading coefficient, and combined with the deviation of the blood flow velocity value from the preset target threshold and the changing trend of adjacent sampling periods, the sign and magnitude of the basic increment are updated, specifically including:
[0067] Map the amplitude grading coefficients to a preset gear set and output the step size of the corresponding gear as the initial modulus value.
[0068] For example, the preset gear set can be: when the amplitude grading coefficient is 1, the initial modulus value is When the amplitude grading coefficient is 2, the initial modulus is 2. When the amplitude grading coefficient is 3, the initial modulus is 3. ;
[0069] When the response direction label is positive, the sign of the base increment is set to be opposite to the sign of the deviation; when the response direction label is negative, the sign of the base increment is set to be the same as the sign of the deviation.
[0070] It should be noted that the response direction label indicates the correlation between changes in light intensity and changes in blood flow velocity. A positive label indicates that increasing light intensity will increase blood flow velocity, while a negative label indicates that increasing light intensity will decrease blood flow velocity. The deviation sign indicates whether the blood flow velocity value is too high or too low relative to the preset target threshold. Combining these two pieces of information, it is possible to accurately determine whether the light intensity should be increased or decreased to bring the blood flow velocity value closer to the target threshold.
[0071] When the response direction label is uncertain, it is first set to the opposite of the deviation sign and maintained for one sampling period. If the absolute value of the deviation increases in the next sampling period, the sign is reversed, and the initial modulus value is fixed to the step size corresponding to the minimum level in the current sampling period.
[0072] To further explain, when the response direction label is uncertain, an adaptive detection strategy is adopted: first, the control direction is set to be opposite to the deviation sign and maintained for one sampling period. If the absolute value of the deviation increases in the next sampling period, the sign is reversed. The initial modulus is fixed to the step size corresponding to the minimum gear in the current sampling period. When facing uncertain response characteristics, the control direction can be learned and corrected quickly and safely, which enhances the robustness of the system.
[0073] If the trend of change in adjacent sampling periods is the same as the sign of the deviation, the initial modulus value is increased by one level; if it is the opposite, it is decreased by one level.
[0074] It should be noted that if the trend of change in adjacent sampling periods is the same as the sign of the deviation, the initial modulus value will be increased by one level; if it is the opposite, it will be decreased by one level. The trend of change in adjacent sampling periods reflects whether the blood flow velocity value is approaching or moving away from the preset target threshold. If the blood flow velocity value is moving towards the preset target threshold, it indicates that the current adjustment strategy is effective, and the adjustment intensity is increased (increased by one level) to accelerate convergence. Conversely, it indicates that the current adjustment strategy is too aggressive or the direction is wrong, and the adjustment intensity is reduced (decreased by one level) to avoid overshoot or oscillation.
[0075] The absolute value of the deviation is matched with the preset three-level interval, and the initial modulus value after adjustment is scaled according to the matching result, which is used as the modulus value of the basic increment.
[0076] For example, the absolute value of the deviation is denoted as d, and the preset three-level interval can be: when When the scaling factor is 0.5, the scaling ratio is 0.5; when When the scaling factor is 1.0, the scaling ratio is 1.0; when At that time, the scaling ratio is 1.5;
[0077] Through the above technical solution, more precise and intelligent control of blood flow velocity values is achieved in the fine-tuning state. It utilizes the correlation characteristics between light intensity and blood flow velocity value changes in the coarse induction phase, combined with real-time deviation information and dynamic change trends, to perform multi-dimensional and adaptive sign and modulus updates on the basic increment of light intensity adjustment. This improves the speed and stability of blood flow velocity values converging towards the preset target threshold, avoids continuous fluctuations near the target range, and ensures the accuracy and reliability of the zebrafish stroke model modeling process.
[0078] In an optional embodiment, aligning to the nearest resolvable increment to perform illumination adjustment specifically includes:
[0079] The baseline increment after the limit is accumulated to the positive or negative compensation pool according to its sign, and the illumination adjustment is temporarily not performed; among them, because the zebrafish cerebral blood vessels have a high lag in response to vasomotor stimulation, adding the accumulation value of the negative compensation pool can enhance the ability to inhibit vasospasm.
[0080] When the absolute value of the accumulated value of any compensation pool exceeds the first preset threshold, the accumulated value is aligned to the most recent resolvable increment and illumination adjustment is performed. The residual generated by the alignment is written back to the corresponding compensation pool by sign. Before the accumulated value of the compensation pool falls back to the second preset threshold, the other compensation pool is prohibited from triggering illumination adjustment.
[0081] When the compensation pool is accumulated for m consecutive sampling cycles without illumination adjustment, and the absolute value of the deviation between the blood flow velocity value and the preset target threshold increases, the first trigger threshold is temporarily reduced by a preset ratio.
[0082] For example, the first preset threshold can be taken as follows: The second preset threshold can be taken as follows: Based on the physiological response delay of zebrafish vascular smooth muscle, which is typically 2-3 seconds and corresponds to the duration of 4-6 sampling cycles, m can be set to 5; the preset ratio can be set to 0.7, at which point the first trigger threshold drops to... To accelerate response and avoid cumulative lag;
[0083] By using the above technical solution, the base increment after amplitude limiting is accumulated into the positive or negative compensation pool, avoiding frequent invalid adjustments smaller than the minimum resolvable increment. When the accumulated value in the compensation pool reaches the first preset threshold, it is aligned to the nearest resolvable increment and illumination adjustment is performed, ensuring that each adjustment is effective and feasible. At the same time, the residual generated by alignment is written back to the compensation pool, ensuring the accuracy of long-term control and avoiding the accumulation of quantization errors. In addition, the mechanism of prohibiting the other compensation pool from triggering adjustment before the accumulated value in the compensation pool falls back to the second preset threshold prevents the system from making reverse adjustments in a short period of time and avoids control oscillation. By temporarily lowering the first preset threshold, the response speed to continuous deviations is improved, ensuring that illumination adjustment can be performed in a timely manner when rapid correction is required.
[0084] In an optional embodiment, after aligning to the nearest resolvable increment to perform illumination adjustment, a feedback maintenance mechanism for the compensation pool is also included:
[0085] After performing illumination adjustment, the actual change in illumination intensity is obtained and compared with the actual adjustment amount after alignment to the nearest resolvable increment to obtain the execution deviation; where the execution deviation is the actual change amount minus the actual adjustment amount;
[0086] When the absolute value of the execution deviation exceeds the preset tolerance threshold, the execution deviation is multiplied by the preset compensation coefficient and written into the corresponding compensation pool of the next adjustment sub-period according to the sign.
[0087] It should be noted that, at the smallest resolvable increment... At that time, the standard deviation of the actual output error of the LED driver was 1. Therefore, the preset tolerance threshold is taken as follows: To cover Range; the preset compensation coefficient can be 0.8;
[0088] When the absolute value of the execution deviation does not exceed the preset tolerance threshold, the compensation pool for the current execution of illumination adjustment is discharged according to the exponential decay model.
[0089] Specifically, the expression for the exponential decay model is:
[0090]
[0091] In the formula, This is the accumulated value of the compensation pool during the current sampling period. The accumulated value of the compensation pool in the previous sampling period is, It is the discharge coefficient and can be taken as 0.5;
[0092] Through the above technical solution, when there is a deviation between the actual change in light intensity and the actual adjustment amount that exceeds the preset tolerance threshold, the execution deviation can be captured in time and fed back to the compensation pool proportionally. This allows for correction of the execution deviation in subsequent adjustments, solving the problem of accumulated light intensity adjustment errors caused by inaccurate hardware response or external interference, and ensuring that the light intensity can more accurately approach the target value. When the execution deviation is within an acceptable range, the compensation pool is vented through an exponential decay model, avoiding the unnecessary accumulation of small errors. This enables high-precision control of light intensity even in discrete light intensity adjustment steps, and more accurately maintains the zebrafish brain blood flow velocity value within the target range.
[0093] In an optional embodiment, after the switch between the coarse-induced state and the fine-tuning state, cross-state consistency processing of the compensation pool is performed:
[0094] Check the matching of the sign of the first base increment after the switchover with the sign of the compensation pool:
[0095] If the two signs are opposite and the absolute value of the accumulated value of the compensation pool is less than the minimum resolvable increment of the light intensity, the compensation pool is immediately cleared to zero. Clearing the compensation pool can prevent it from having a weak but continuous offsetting effect on the new control direction and prevent the introduction of reverse execution deviation.
[0096] If the two have the same sign or the absolute value of the accumulated value of the compensation pool is not less than the minimum resolvable increment, the accumulated value in the compensation pool is retained; if the accumulation direction of the compensation pool is consistent with the control direction under the new control state, or if its accumulated value is large enough to produce an actual resolvable light intensity adjustment effect, the accumulated value is retained to maintain the continuity and efficiency of the control.
[0097] After the zeroing compensation pool is executed, the preset tolerance threshold is expanded by a preset multiple in the subsequent n sampling cycles; for example, to cover the physiological adaptation period of zebrafish blood vessels to state switching of 1.5 seconds, n can be 3-5, with a typical value of 3; the preset multiple can be 1.5.
[0098] By using the above technical solutions, and by conditionally clearing or retaining the compensation pool, and by dynamically adjusting the preset tolerance threshold after clearing, it can be ensured that the light intensity adjustment mechanism can quickly adapt to the new control state and smoothly transition after the state switch. This enables the blood flow velocity value to be maintained more accurately in dynamic scenarios where there are frequent switches between coarse induction and fine adjustment states, thereby improving the success rate and reliability of model modeling.
[0099] See Figure 2 As shown, this scheme proposes a hemodynamic-based zebrafish stroke modeling system to implement the aforementioned hemodynamic-based zebrafish stroke modeling method, including:
[0100] The system initialization module is used to acquire images of the target area according to a preset sampling period and calculate blood flow velocity values, initialize light intensity and baseline increment, and set the control state to coarse induction state.
[0101] The target interval setting module is used to calculate the hysteresis band based on the jitter amplitude of the blood flow velocity value, and to set the target interval with a preset target threshold as the center and the hysteresis band as the full width.
[0102] The coarse induction control module is used to determine the sign and magnitude of the basic increment based on the relative position of the blood flow velocity value and the target interval in the coarse induction state, and simultaneously generate response direction labels and amplitude grading coefficients by statistically analyzing the correlation characteristics between the changes in light intensity and blood flow velocity value. When the blood flow velocity value enters the target interval and reaches the preset stable duration, it switches to the fine adjustment state.
[0103] The fine-tuning control module is used to update the sign and magnitude of the basic increment in the fine-tuning state, based on the response direction label and amplitude grading coefficient, combined with the deviation between the blood flow velocity value and the preset target threshold and the changing trend of adjacent sampling cycles. When the blood flow velocity value continuously reaches a preset number of times outside the target range, it switches back to the coarse induction state.
[0104] The illumination adjustment execution module is used to limit the modulus of the base increment within a preset increment range under control, add the limited base increment to the current illumination intensity, and align it to the nearest resolvable increment to perform illumination adjustment.
[0105] The control termination module is used to set the light intensity to zero and terminate the control state when the blood flow velocity value remains within the target range for a preset modeling time.
[0106] In another embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above embodiments.
[0107] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps described above.
[0108] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the computer device to perform the steps described above.
[0109] The technical scope of this invention is not limited to the content described above. Those skilled in the art can make various modifications and variations to the above embodiments without departing from the technical concept of this invention, and all such modifications and variations should fall within the protection scope of this invention.
Claims
1. A method for modeling a zebrafish stroke based on hemodynamics, characterized in that, The method includes: The target area image is acquired according to the preset sampling period and the blood flow velocity value is calculated. The light intensity and basic increment are initialized and the control state is set to coarse induction state. The hysteresis band is calculated based on the fluctuation amplitude of the blood flow velocity value, and the target range is set with a preset target threshold as the center and the hysteresis band as the full width. In the coarse induction state, the sign and magnitude of the basic increment are determined based on the relative position of the blood flow velocity value and the target interval. The correlation characteristics between the changes in light intensity and blood flow velocity value are statistically analyzed to generate response direction labels and amplitude classification coefficients. When the blood flow velocity value enters the target interval and reaches the preset stable duration, the system switches to the fine adjustment state. In fine-tuning mode, based on the response direction label and amplitude grading coefficient, combined with the deviation between the blood flow velocity value and the preset target threshold and the changing trend of adjacent sampling cycles, the sign and magnitude of the basic increment are updated, and when the blood flow velocity value continuously reaches the preset number of times outside the target interval, it switches back to coarse induction mode. In control mode, the modulus of the base increment is limited by a preset increment range, the limited base increment is added to the current light intensity, and aligned to the nearest resolvable increment to perform light adjustment; When the blood flow velocity value remains within the target range for the preset modeling time, the light intensity is set to zero and the control state is terminated.
2. The method according to claim 1, characterized in that, The hysteresis band is calculated based on the amplitude of the fluctuation in blood flow velocity and the minimum resolvable increment of light intensity, specifically including: The sampling period includes a sampling sub-period and an adjustment sub-period, wherein the sampling sub-period is used to acquire the target area image, the adjustment sub-period is used to adjust the light intensity, and a first time window is set within the sampling sub-period and a second time window is set within the adjustment sub-period. Within the first time window, the fluctuation amplitude of blood flow velocity values is calculated using the median absolute deviation; The half-width of the hysteresis band is calculated by weighting the minimum resolvable increment of jitter amplitude and illumination intensity, and is updated with the sampling period using a first-order exponential smoothing method.
3. The method according to claim 2, characterized in that, The sign and magnitude of the baseline increment are determined based on the relative position of the blood flow velocity value and the target interval. Simultaneously, the correlation between changes in light intensity and blood flow velocity value is statistically analyzed to generate response direction labels and amplitude grading coefficients, specifically including: During the sampling sub-period, the sign is negative when the blood flow velocity value is higher than the upper limit of the target interval, positive when it is lower than the lower limit of the target interval, and the base increment is set to zero when it is within the target interval. Calculate the absolute difference between the blood flow velocity value and the nearest boundary of the target interval, and determine the modulus of the basic increment according to the preset increment mapping table; Within the second time window, the sign of the product of the change in light intensity and the change in blood flow velocity is calculated, and the sign of the product that accounts for more than a preset percentage threshold within the second time window is used as the response direction label. If no product sign accounts for more than the preset percentage threshold, the response direction label is recorded as uncertain. The amplitude grading coefficient is determined by comparing the absolute value of the change in blood flow velocity to the absolute value of the change in light intensity with a preset ratio range.
4. The method according to claim 3, characterized in that, Based on the response direction label and amplitude grading coefficient, and combined with the deviation between the blood flow velocity value and the preset target threshold, as well as the changing trend of adjacent sampling periods, the sign and magnitude of the basic increment are updated, specifically including: Map the amplitude grading coefficients to a preset gear set and output the step size of the corresponding gear as the initial modulus value. When the response direction label is positive, the sign of the base increment is set to be opposite to the sign of the deviation; when the response direction label is negative, the sign of the base increment is set to be the same as the sign of the deviation. When the response direction label is uncertain, it is first set to the opposite of the deviation sign and maintained for one sampling period. If the absolute value of the deviation increases in the next sampling period, the sign is reversed, and the initial modulus value is fixed to the step size corresponding to the minimum level in the current sampling period. If the trend of change in adjacent sampling periods is the same as the sign of the deviation, the initial modulus value is increased by one level; if it is the opposite, it is decreased by one level. The absolute value of the deviation is matched with a preset three-level interval, and the initial modulus value after adjustment is scaled according to the matching result, which is used as the modulus value of the basic increment.
5. The method according to claim 2, characterized in that, Align to the nearest resolvable increment to perform lighting adjustments, specifically including: The base increment after the limit is accumulated into the positive or negative compensation pool according to its sign, and the illumination adjustment is temporarily suspended. When the absolute value of the accumulated value of any compensation pool exceeds the first preset threshold, the accumulated value is aligned to the most recent resolvable increment and illumination adjustment is performed. The residual generated by the alignment is written back to the corresponding compensation pool by sign. Before the accumulated value of the compensation pool falls back to the second preset threshold, the other compensation pool is prohibited from triggering illumination adjustment. When there are m consecutive sampling cycles where only the compensation pool is accumulated without any illumination adjustment is performed, and the absolute value of the deviation between the blood flow velocity value and the preset target threshold increases, the first trigger threshold is temporarily reduced by a preset ratio.
6. The method according to claim 5, characterized in that, After aligning to the nearest resolvable increment to perform illumination adjustments, a feedback maintenance mechanism for the compensation pool is also included: After performing illumination adjustment, the actual change in illumination intensity is obtained and compared with the actual adjustment after aligning to the nearest resolvable increment to obtain the execution deviation. When the absolute value of the execution deviation exceeds the preset tolerance threshold, the execution deviation is multiplied by the preset compensation coefficient and written into the corresponding compensation pool of the next adjustment sub-period according to the sign. When the absolute value of the execution deviation does not exceed the preset tolerance threshold, the compensation pool for the current execution of illumination adjustment is discharged according to the exponential decay model.
7. The method according to claim 6, characterized in that, After the switch occurs between the coarse-induction state and the fine-tuning state, cross-state consistency processing of the compensation pool is performed: Check the matching of the sign of the first base increment after the switchover with the sign of the compensation pool: If the signs of the two are opposite and the absolute value of the accumulated value of the compensation pool is less than the minimum resolvable increment of the light intensity, then the compensation pool is immediately cleared to zero. If the two have the same sign or the absolute value of the accumulated value in the compensation pool is not less than the minimum resolvable increment, then the accumulated value in the compensation pool is retained. After the zeroing compensation pool is executed, the preset tolerance threshold will be increased by a preset multiple in the subsequent n sampling periods.
8. A hemodynamic-based zebrafish stroke modeling system, characterized in that, The method for implementing the hemodynamic-based zebrafish stroke model as described in any one of claims 1-7 includes: The system initialization module is used to acquire images of the target area according to a preset sampling period and calculate blood flow velocity values, initialize light intensity and baseline increment, and set the control state to coarse induction state. The target interval setting module is used to calculate the hysteresis band based on the jitter amplitude of the blood flow velocity value, and to set the target interval with a preset target threshold as the center and the hysteresis band as the full width. The coarse induction control module is used to determine the sign and magnitude of the basic increment based on the relative position of the blood flow velocity value and the target interval in the coarse induction state, and simultaneously generate response direction labels and amplitude grading coefficients by statistically analyzing the correlation characteristics between the changes in light intensity and blood flow velocity value. When the blood flow velocity value enters the target interval and reaches the preset stable duration, it switches to the fine adjustment state. The fine-tuning control module is used to update the sign and magnitude of the basic increment in the fine-tuning state, based on the response direction label and amplitude grading coefficient, combined with the deviation between the blood flow velocity value and the preset target threshold and the changing trend of adjacent sampling cycles. When the blood flow velocity value continuously reaches a preset number of times outside the target range, it switches back to the coarse induction state. The illumination adjustment execution module is used to limit the modulus of the base increment within a preset increment range under control, add the limited base increment to the current illumination intensity, and align it to the nearest resolvable increment to perform illumination adjustment. The control termination module is used to set the light intensity to zero and terminate the control state when the blood flow velocity value remains within the target range for a preset modeling time.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method described in any one of claims 1-7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-7.